(()=>{functione(e,t){for(vara=0;a<t.length;a++){varn=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}vart=function(){functiont(e,a){!function(e,t){if(!(einstanceoft))thrownewTypeError("Cannot call a class as a function")}(this,t),this.publicKey=e,this.loginId=a,this.cardHolderName=document.getElementById("cardholder_name"),this.cardButton=document.getElementById("card_button")}vara,n,r;returna=t,(n=[{key:"handleAuthorization",value:function(){vare=$("#my-card"),t={};t.clientKey=this.publicKey,t.apiLoginID=this.loginId;vara={};a.cardNumber=e.CardJs("cardNumber").replace(/[^\d]/g,""),a.month=e.CardJs("expiryMonth").replace(/[^\d]/g,""),a.year=e.CardJs("expiryYear").replace(/[^\d]/g,""),a.cardCode=document.getElementById("cvv").value.replace(/[^\d]/g,"");varn={};returnn.authData=t,n.cardData=a,document.getElementById("card_button").disabled=!0,document.querySelector("#card_button > svg").classList.remove("hidden"),document.querySelector("#card_button > span").classList.add("hidden"),Accept.dispatchData(n,this.responseHandler),!1}},{key:"responseHandler",value:function(e){return"Error"===e.messages.resultCode?($("#errors").show().html("<p>"+e.messages.message[0].code+": "+e.messages.message[0].text+"</p>"),document.getElementById("card_button").disabled=!1,document.querySelector("#card_button > svg").classList.add("hidden"),document.querySelector("#card_button > span").classList.remove("hidden")):"Ok"===e.messages.resultCode&&(document.getElementById("dataDescriptor").value=e.opaqueData.dataDescriptor,document.getElementById("dataValue").value=e.opaqueData.dataValue,document.getElementById("server_response").submit()),!1}},{key:"handle",value:function(){vare=this;returnthis.cardButton.addEventListener("click",(function(){e.cardButton.disabled=!e.cardButton.disabled,e.handleAuthorization()})),this}}])&&e(a.prototype,n),r&&e(a,r),t}();newt(document.querySelector('meta[name="authorize-public-key"]').content,document.querySelector('meta[name="authorize-login-id"]').content).handle()})();