OwlCyberSecurity - MANAGER
Edit File: give-add-v2form.js
(()=>{var e={32485:(e,t)=>{var a;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t<arguments.length;t++){var a=arguments[t];if(a){var l=typeof a;if("string"===l||"number"===l)e.push(a);else if(Array.isArray(a)){if(a.length){var r=o.apply(null,a);r&&e.push(r)}}else if("object"===l){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){e.push(a.toString());continue}for(var i in a)n.call(a,i)&&a[i]&&e.push(i)}}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(a=function(){return o}.apply(t,[]))||(e.exports=a)}()},5338:(e,t,a)=>{"use strict";var n=a(75795);t.H=n.createRoot,n.hydrateRoot},75795:e=>{"use strict";e.exports=window.ReactDOM}},t={};function a(n){var o=t[n];if(void 0!==o)return o.exports;var l=t[n]={exports:{}};return e[n](l,l.exports,a),l.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.React;var t=a(5338),n=a(75795);const o=window.wp.i18n;function l(){return(0,e.createElement)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M5.5 2a1 1 0 0 0-2 0v1.5H2a1 1 0 0 0 0 2h1.5V7a1 1 0 0 0 2 0V5.5H7a1 1 0 0 0 0-2H5.5V2zM5.5 17a1 1 0 1 0-2 0v1.5H2a1 1 0 1 0 0 2h1.5V22a1 1 0 1 0 2 0v-1.5H7a1 1 0 1 0 0-2H5.5V17zM13.933 2.641a1 1 0 0 0-1.866 0L10.332 7.15c-.3.78-.394 1.006-.523 1.188a2 2 0 0 1-.471.47c-.182.13-.407.224-1.188.524L3.64 11.067a1 1 0 0 0 0 1.866l4.509 1.735c.78.3 1.006.394 1.188.523.182.13.341.29.47.471.13.182.224.407.524 1.188l1.735 4.509a1 1 0 0 0 1.866 0l1.735-4.509c.3-.78.394-1.006.523-1.188.13-.182.29-.341.471-.47.182-.13.407-.224 1.188-.524l4.509-1.735a1 1 0 0 0 0-1.866L17.85 9.332c-.78-.3-1.006-.394-1.188-.523a2.001 2.001 0 0 1-.47-.471c-.13-.182-.224-.407-.524-1.188L13.933 2.64z",fill:"#F2CC0C"}))}function r({...t}){return(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"23",height:"23",viewBox:"0 0 24 24",...t},(0,e.createElement)("path",{d:"M18.707 6.707a1 1 0 0 0-1.414-1.414L12 10.586 6.707 5.293a1 1 0 0 0-1.414 1.414L10.586 12l-5.293 5.293a1 1 0 1 0 1.414 1.414L12 13.414l5.293 5.293a1 1 0 0 0 1.414-1.414L13.414 12l5.293-5.293z"}))}function i(){return(0,e.createElement)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.063.986a1.531 1.531 0 0 1 1.872 0l.783.601.98-.129c.69-.09 1.354.294 1.62.935l.377.913.911.376h.002c.641.267 1.025.93.935 1.62l-.13.98.602.783a1.534 1.534 0 0 1 0 1.872l-.601.783.129.98c.09.69-.294 1.354-.935 1.62h-.002l-.91.377-.378.912a1.537 1.537 0 0 1-1.62.936l-.98-.13-.783.601a1.531 1.531 0 0 1-1.872 0l-.782-.6-.98.129a1.537 1.537 0 0 1-1.62-.936l-.377-.912-.911-.376H2.39a1.537 1.537 0 0 1-.935-1.621l.129-.98-.601-.783a1.533 1.533 0 0 1 0-1.872l.601-.782-.129-.98c-.09-.69.294-1.354.935-1.62l.002-.001.91-.376.377-.913a1.537 1.537 0 0 1 1.62-.935l.98.13.783-.602zm3.741 5.82a.667.667 0 0 0-.943-.943L7.333 8.392 6.47 7.53a.667.667 0 1 0-.943.943L6.86 9.806c.26.26.683.26.943 0l3-3z",fill:"#459948"}))}function c(){return(0,e.createElement)("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.createElement)("path",{d:"M8.769.79a1.333 1.333 0 0 0-.538 0c-.205.041-.388.144-.533.225l-.04.022L3.374 3.42c-.272.15-.409.226-.454.326a.333.333 0 0 0 0 .275c.044.1.18.177.452.33l4.866 2.737c.096.054.143.08.194.09.045.01.091.01.136 0 .05-.01.098-.036.193-.09l4.867-2.738c.272-.152.408-.229.453-.33a.333.333 0 0 0-.001-.274c-.046-.1-.182-.175-.454-.326-1.12-.624-3.109-1.729-4.284-2.382l-.04-.022C9.156.934 8.973.831 8.769.79zM15.164 5.926c0-.3 0-.449-.063-.536a.333.333 0 0 0-.233-.136c-.107-.012-.238.061-.499.208L9.44 8.236a.739.739 0 0 0-.185.123.333.333 0 0 0-.07.12c-.017.051-.017.108-.017.222v5.45c0 .298 0 .447.062.534a.333.333 0 0 0 .232.137c.107.012.237-.06.497-.204l4.317-2.398.042-.023c.154-.085.348-.192.497-.353.128-.14.226-.305.285-.486.07-.208.068-.43.068-.605v-.048l-.003-4.78zM7.042 14.618c.26.144.39.216.497.204a.333.333 0 0 0 .232-.137c.062-.087.062-.236.062-.534V8.7c0-.114 0-.17-.016-.221a.333.333 0 0 0-.071-.121.739.739 0 0 0-.185-.123l-4.93-2.774c-.261-.146-.392-.22-.499-.208a.333.333 0 0 0-.233.136c-.063.087-.063.237-.063.536l-.003 4.779v.048c0 .176-.001.397.068.605.06.18.156.346.285.486.149.161.343.268.497.353l.042.023 4.317 2.398z"}))}function s({title:t,icon:a,children:l,insertInto:i,handleClose:c,isOpen:s=!0,showHeader:m=!0,showCloseIcon:d=!0,wrapperClassName:u=""}){const g=(0,e.useCallback)((e=>{27===e.keyCode&&"function"==typeof c&&c(e)}),[]);return(0,e.useEffect)((()=>(document.addEventListener("keydown",g,!1),()=>{document.removeEventListener("keydown",g,!1)})),[]),(0,e.useEffect)((()=>(s?document.body.classList.add("modalDialog-open"):document.body.classList.remove("modalDialog-open"),()=>{document.body.classList.remove("modalDialog-open")})),[s]),s?(0,n.createPortal)((0,e.createElement)("div",{className:`givewp-modal-wrapper ${u}`},(0,e.createElement)("div",{role:"dialog","aria-label":t,className:"givewp-modal-dialog"},(0,e.createElement)("div",{className:"givewp-modal-dialog-content"},m?(0,e.createElement)("div",{className:"givewp-modal-header"},a&&(0,e.createElement)("div",{className:"givewp-modal-icon-header"},a),t,d&&c&&(0,e.createElement)("button",{"aria-label":(0,o.__)("Close dialog","give"),className:"givewp-modal-close",onClick:c},(0,e.createElement)(r,{"aria-label":(0,o.__)("Close dialog icon","give")}))):(0,e.createElement)(e.Fragment,null,d&&c&&(0,e.createElement)("button",{"aria-label":(0,o.__)("Close dialog","give"),className:"givewp-modal-close-headless",onClick:c},(0,e.createElement)(r,{"aria-label":(0,o.__)("Close dialog icon","give")})),a&&(0,e.createElement)("div",{className:"givewp-modal-icon-center"},a)),(0,e.createElement)("div",{className:"givewp-modal-content"},l)))),i?document.querySelector(i):document.body):null}var m=a(32485),d=a.n(m);const u=(0,e.forwardRef)((({children:t,type:a="button",variant:n="primary",size:o="small",disabled:l=!1,className:r,...i},c)=>(0,e.createElement)("button",{ref:c,disabled:l,type:a,className:d()("givewp-button",n,o,r),...i},t))),g={banner:"_2h6z1WAyzMFMVkihAzzg",closeIcon:"qNBSrIIPNNIWcrLqBwzG",icon:"V_WExHwz1tiH05FzbQFl",text:"d13wc_KVwqqM61ggldc7",button:"UtAerh6pU4vUJz0I7ja8",message:"xT2yLrdYsccKlRDqe8th",title:"bPCE3MbXwHvXZY7jqKYV",center:"sqTlczpjZos5O22_2MDz",info:"emTa5O89Dauq8cKmvEHj",itemsContainer:"dpQsrz8m39VkuFSgM5Ay",item:"HaRlq6zssr6mlPVriKoH",imageContainer:"a46E0Cum83GjFlv5Zxz7",tryNewFormBuilderButton:"JXLGJezguuIsfRomn21D",actionsContainer:"btkkq1EBDXk2zpc3qluk",formName:"scy_GbE4XEqGmk03jITl",checkbox:"ntbyxn9e567HjI2WfI7_",migrationGuideBox:"HaHzA7HVCAHZWyokDDce",migrationGuideTitle:"ZqJ9W9WxUmtRhfUYgRYx",migrationGuideContent:"KEbapqzp7CXucGo9a5ls",proceedButton:"rysTj9NW67pUA96Qhnw1",link:"QGPZb56rmfpDOM1XWKrz"},p=window.wp.element;function v({isUpgrading:t,isEditing:a,handleClose:n}){const{supportedAddons:r,supportedGateways:c,migrationApiRoot:m,apiNonce:d}=window.GiveDonationForms;return(0,e.createElement)(s,{isOpen:!0,title:(0,o.__)("Feature notice","give"),handleClose:n},(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:g.title},(0,e.createElement)(l,null)," ",(0,o.__)("What's new","give")),(0,e.createElement)("p",{className:g.message},(0,p.createInterpolateElement)((0,o.sprintf)((0,o.__)('GiveWP 3.0 introduces an enhanced forms experience powered by the new Visual Donation Form Builder. The team is still working on add-on and gateway compatibility. If you need to use an add-on or gateway that isn\'t listed, use the "%sAdd form%s" option for now.',"give"),"<b>","</b>"),{b:(0,e.createElement)("strong",null)})),r.length>0&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:g.title},(0,o.__)("Supported add-ons","give")),(0,e.createElement)("div",{className:g.itemsContainer},r.map((t=>(0,e.createElement)("div",{className:g.item,key:t},(0,e.createElement)(i,null),t))))),c.length>0&&(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:g.title},(0,o.__)("Supported gateways","give")),(0,e.createElement)("div",{className:g.itemsContainer},c.map((t=>(0,e.createElement)("div",{className:g.item,key:t},(0,e.createElement)(i,null),t))))),t?(0,e.createElement)(u,{size:"large",onClick:async()=>{const e=await fetch(m+"/"+window.give_vars.post_id,{method:"post",headers:{"Content-Type":"application/json","X-WP-Nonce":d}}),t=await e.json();e.ok?window.location=t.redirect:alert("Error migrating form")},className:g.proceedButton},(0,o.__)("Proceed with upgrade","give")):(0,e.createElement)(u,{size:"large",onClick:()=>{a&&sessionStorage.setItem("givewp-show-return-btn","true"),window.location.href="edit.php?post_type=give_forms&page=give-campaigns&new=campaign"},className:g.proceedButton},(0,o.__)("Proceed with the new form builder","give")),(0,e.createElement)("div",{className:g.link},(0,e.createElement)("a",{href:"https://docs.givewp.com/compat-guide",rel:"noopener noreferrer",target:"_blank"},(0,o.__)("Read more on Add-ons and Gateways compatibility","give")))))}function w({onClick:t}){return(0,e.createElement)("button",{className:g.tryNewFormBuilderButton,onClick:t},(0,e.createElement)(c,null)," ",(0,o.__)("Use the new visual form builder","give"))}const h=document.createElement("div");function E({isUpgrading:t=!1,isEditing:a=!1,showDialog:l,setShowDialog:r}){return(0,e.useEffect)((()=>{const e=document.querySelector(".wp-header-end");e.parentNode.insertBefore(h,e)}),[h]),(0,e.createElement)(e.Fragment,null,(0,e.createElement)((()=>(0,n.createPortal)((0,e.createElement)("div",{className:g.actionsContainer},(0,e.createElement)("div",{className:g.tryNewFormBuilderBtnContainer},(0,e.createElement)(w,{onClick:()=>r({show:!0,upgrading:!1})})),window.GiveDonationForms.campaignUrl&&(0,e.createElement)("a",{href:window.GiveDonationForms.campaignUrl},(0,o.__)("Manage Campaign","give"))),h)),null),l&&(0,e.createElement)(v,{isUpgrading:t,isEditing:a,handleClose:()=>r(!1)}))}const f=document.createElement("div"),y=document.querySelector(".wp-header-end");y.parentNode.insertBefore(f,y),(0,t.H)(f).render((0,e.createElement)(e.StrictMode,null,(0,e.createElement)((function(){const[t,a]=(0,e.useState)(!1);return(0,e.createElement)(E,{showDialog:t,setShowDialog:a})}),null)))})()})();