(()=>{var e={322:()=>{Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r})},1669:e=>{"use strict";e.exports=jQuery},3797:()=>{Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})},3869:()=>{String.prototype.includes||(String.prototype.includes=function(e,t){"use strict";return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)})},4600:()=>{[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}))},7550:()=>{wp.domReady((()=>{document.querySelector(".edds-requirements-not-met")&&(document.querySelector(".edd-settings-wrap .submit").style.display="none")})),wp.domReady((()=>{const e=document.getElementById("edds-payment-gateways-stripe-unmet-requirements");if(!e)return;const t=document.querySelector('label[for="edd_settings[gateways][stripe]"]');t.parentNode.insertBefore(e,t.nextSibling);const n=document.getElementById("edd_settings[gateways][stripe]");n.disabled=!0,n.checked=!1,e.insertBefore(n,e.querySelector("p")),e.insertBefore(t,e.querySelector("p"))}))}},t={};function n(r){var s=t[r];if(void 0!==s)return s.exports;var o=t[r]={exports:{}};return e[r](o,o.exports,n),o.exports}(()=>{"use strict";n(7550),n(3869),n(3797),n(322),n(4600);var e=n(1669);n(1669),wp.domReady((()=>{const t=document.getElementById("edds-stripe-connect-account"),n=document.getElementById("edds-stripe-disconnect-reconnect");if(t&&!t.hasAttribute("data-onboarding-wizard"))return function(t,n){const r={type:"POST",dataType:"json",xhrFields:{withCredentials:!0},url:window.edd_scripts&&window.edd_scripts.ajaxurl||window.ajaxurl,data:{action:"edds_stripe_connect_account_info",...n}},s=e.Deferred((function(t){t.jqXHR=e.ajax(r).done((function(e){"1"!==e&&1!==e||(e={success:!0}),"object"==typeof e&&void 0!==typeof e.success?t[e.success?"resolveWith":"rejectWith"](this,[e.data]):t.rejectWith(this,[e])})).fail((function(){t.rejectWith(this,arguments)}))})),o=s.promise();return o.abort=function(){return s.jqXHR.abort(),this},o}(0,{...t.dataset}).done((e=>{t.classList.remove("loading"),t.innerHTML=e.message,t.classList.add(`notice-${e.status}`),n.classList.remove("loading"),e.actions&&(n.innerHTML=e.actions);const r=document.getElementById("edd_settings[stripe_statement_descriptor]"),s=document.getElementById("edd_settings[stripe_statement_descriptor_prefix]");if(r.classList.remove("edd-text-loading"),s.classList.remove("edd-text-loading"),e.account){const t=e.account.settings.payments.statement_descriptor||"",n=e.account.settings.card_payments.statement_descriptor_prefix||"";r.value=t||"",s.value=n||""}})).fail((e=>{t.innerHTML=e.message,t.classList.add("notice-error")}))}))})()})();