(()=>{functione(n){returne="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(e){returntypeofe}:function(e){returne&&"function"==typeofSymbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeofe},e(n)}functionn(e,n){for(vart=0;t<n.length;t++){varr=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"inr&&(r.writable=!0),Object.defineProperty(e,o(r.key),r)}}functiont(e,t,r){returnt&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}functionr(e,n,t){return(n=o(n))ine?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}functiono(n){vart=function(n,t){if("object"!==e(n)||null===n)returnn;varr=n[Symbol.toPrimitive];if(void0!==r){varo=r.call(n,t||"default");if("object"!==e(o))returno;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(n)}(n,"string");return"symbol"===e(t)?t:String(t)}vari=t((functione(n){vart=this;!function(e,n){if(!(einstanceofn))thrownewTypeError("Cannot call a class as a function")}(this,e),r(this,"handleAuthorization",(function(){vare=$("#my-card"),n={api_login_id:t.apiLoginId,card_number:e.CardJs("cardNumber").replace(/[^\d]/g,""),expire_year:e.CardJs("expiryYear").replace(/[^\d]/g,""),expire_month:e.CardJs("expiryMonth").replace(/[^\d]/g,""),cvv:document.getElementById("cvv").value.replace(/[^\d]/g,"")};returndocument.getElementById("pay-now")&&(document.getElementById("pay-now").disabled=!0,document.querySelector("#pay-now > svg").classList.remove("hidden"),document.querySelector("#pay-now > span").classList.add("hidden")),forte.createToken(n).success(t.successResponseHandler).error(t.failedResponseHandler),!1})),r(this,"successResponseHandler",(function(e){returndocument.getElementById("payment_token").value=e.onetime_token,document.getElementById("card_brand").value=e.card_type,document.getElementById("server_response").submit(),!1})),r(this,"failedResponseHandler",(function(e){varn='<div class="alert alert-failure mb-4"><ul><li>'+e.response_description+"</li></ul></div>";returndocument.getElementById("forte_errors").innerHTML=n,document.getElementById("pay-now").disabled=!1,document.querySelector("#pay-now > svg").classList.add("hidden"),document.querySelector("#pay-now > span").classList.remove("hidden"),!1})),r(this,"handle",(function(){vare=document.getElementById("pay-now");returne&&e.addEventListener("click",(function(e){t.handleAuthorization()})),t})),this.apiLoginId=n,this.cardHolderName=document.getElementById("cardholder_name")}));newi(document.querySelector('meta[name="forte-api-login-id"]').content).handle()})();