(()=>{vare,t,n,o,r,i;functiona(e,t){for(varn=0;n<t.length;n++){varo=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"ino&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}functionc(e,t,n){returnt&&a(e.prototype,t),n&&a(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}functionu(e,t,n){returntine?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}varl=c((functione(t,n){varo=this;!function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,e),u(this,"setupStripe",(function(){returno.stripeConnect?o.stripe=Stripe(o.key,{stripeAccount:o.stripeConnect}):o.stripe=Stripe(o.key),o})),u(this,"handle",(function(){o.onlyAuthorization?document.getElementById("authorize-bacs").addEventListener("click",(function(e){document.getElementById("authorize-bacs").disabled=!0,document.querySelector("#authorize-bacs > svg").classList.remove("hidden"),document.querySelector("#authorize-bacs > span").classList.add("hidden"),location.href=document.querySelector("meta[name=stripe-redirect-url").content})):document.getElementById("pay-now").addEventListener("click",(function(e){document.querySelector("input[name=token]").value;vart=document.getElementById("pay-now");o.payNowButton=t,o.payNowButton.disabled=!0,o.payNowButton.querySelector("svg").classList.remove("hidden"),o.payNowButton.querySelector("span").classList.add("hidden"),stripe.confirmBacsDebitPayment(document.querySelector("meta[name=pi-client-secret").content)}))})),this.key=t,this.errors=document.getElementById("errors"),this.stripeConnect=n,this.onlyAuthorization=m})),d=null!==(e=null===(t=document.querySelector('meta[name="stripe-publishable-key"]'))||void0===t?void0:t.content)&&void0!==e?e:"",s=null!==(n=null===(o=document.querySelector('meta[name="stripe-account-id"]'))||void0===o?void0:o.content)&&void0!==n?n:"",m=null!==(r=null===(i=document.querySelector('meta[name="only-authorization"]'))||void0===i?void0:i.content)&&void0!==r?r:"";newl(d,s).setupStripe().handle()})();