!function(t){vare={};functionr(n){if(e[n])returne[n].exports;varo=e[n]={i:n,l:!1,exports:{}};returnt[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeofSymbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)returnt;if(4&e&&"object"==typeoft&&t&&t.__esModule)returnt;varn=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeoft)for(varoint)r.d(n,o,function(e){returnt[e]}.bind(null,o));returnn},r.n=function(t){vare=t&&t.__esModule?function(){returnt.default}:function(){returnt};returnr.d(e,"a",e),e},r.o=function(t,e){returnObject.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=23)}({23:function(t,e,r){t.exports=r("flnV")},flnV:function(t,e,r){"use strict";r.r(e);varn=r("o0o1"),o=r.n(n);functioni(t,e,r,n,o,i,a){try{varc=t[i](a),u=c.value}catch(t){returnvoidr(t)}c.done?e(u):Promise.resolve(u).then(n,o)}functiona(t){returnfunction(){vare=this,r=arguments;returnnewPromise((function(n,o){vara=t.apply(e,r);functionc(t){i(a,n,o,c,u,"next",t)}functionu(t){i(a,n,o,c,u,"throw",t)}c(void0)}))}}functionc(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}(new(function(){functiont(){!function(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}(this,t),this.appId=document.querySelector("meta[name=square-appId]").content,this.locationId=document.querySelector("meta[name=square-locationId]").content,this.isLoaded=!1}vare,r,n,i,u,s,l;returne=t,(r=[{key:"init",value:(l=a(o.a.mark((functiont(){vare;returno.a.wrap((function(t){for(;;)switch(t.prev=t.next){case0:returnthis.payments=Square.payments(this.appId,this.locationId),t.next=3,this.payments.card();case3:returnthis.card=t.sent,t.next=6,this.card.attach("#card-container");case6:this.isLoaded=!0,(e=document.querySelector(".sq-card-iframe-container"))&&e.setAttribute("style","150px !important"),document.querySelector(".toggle-payment-with-token")&&document.getElementById("card-container").classList.add("hidden");case11:case"end":returnt.stop()}}),t,this)}))),function(){returnl.apply(this,arguments)})},{key:"completePaymentWithoutToken",value:(s=a(o.a.mark((functiont(e){varr,n;returno.a.wrap((function(t){for(;;)switch(t.prev=t.next){case0:returndocument.getElementById("errors").hidden=!0,e.target.parentElement.disabled=!0,t.next=4,this.card.tokenize();case4:if("OK"!==(r=t.sent).status){t.next=10;break}returndocument.getElementById("sourceId").value=r.token,(n=document.querySelector('input[name="token-billing-checkbox"]:checked'))&&(document.querySelector('input[name="store_card"]').value=n.value),t.abrupt("return",document.getElementById("server_response").submit());case10:document.getElementById("errors").textContent=r.errors[0].message,document.getElementById("errors").hidden=!1,e.target.parentElement.disabled=!1;case13:case"end":returnt.stop()}}),t,this)}))),function(t){returns.apply(this,arguments)})},{key:"completePaymentUsingToken",value:(u=a(o.a.mark((functiont(e){returno.a.wrap((function(t){for(;;)switch(t.prev=t.next){case0:returne.target.parentElement.disabled=!0,t.abrupt("return",document.getElementById("server_response").submit());case2:case"end":returnt.stop()}}),t)}))),function(t){returnu.apply(this,arguments)})},{key:"handle",value:(i=a(o.a.mark((functiont(){vare,r,n,i,c=this;returno.a.wrap((function(t){for(;;)switch(t.prev=t.next){case0:returnt.next=2,this.init();case2:null===(e=document.getElementById("authorize-card"))||void0===e||e.addEventListener("click",(function(t){returnc.completePaymentWithoutToken(t)})),null===(r=document.getElementById("pay-now"))||void0===r||r.addEventListener("click",(function(t){returndocument.querySelector("input[name=token]").value?c