4b937552f203be51562c58a8b999937f30bca0db656d043daa60a4a21088c1ba

Source Code:

!function(s){function e(e){for(var t,n,r=e[0],o=e[1],a=0,i=[];a<r.length;a++)n=r[a],Object.prototype.hasOwnProperty.call(u,n)&&u[n]&&i.push(u[n][0]),u[n]=0;for(t in o)Object.prototype.hasOwnProperty.call(o,t)&&(s[t]=o[t]);for(c&&c(e);i.length;)i.shift()()}var n={},u={3:0};function l(e){if(n[e])return n[e].exports;var t=n[e]={i:e,l:!1,exports:{}};return s[e].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.e=function(o){var e,a,i,t,s,n,r=[],c=u[o];return 0!==c&&(c?r.push(c[2]):(e=new Promise(function(e,t){c=u[o]=[e,t]}),r.push(c[2]=e),(a=document.createElement("script")).charset="utf-8",a.timeout=120,l.nc&&a.setAttribute("nonce",l.nc),a.src=l.p+"fingerprinted/js/"+({1:"elements-afterpay-clearpay-message"}[n=o]||n)+"-"+{1:"547a37188aaf730cdeaea6601600d1a3"}[n]+".js",i=new Error,t=function(e){a.onerror=a.onload=null,clearTimeout(s);var t,n,r=u[o];0!==r&&(r&&(t=e&&("load"===e.type?"missing":e.type),n=e&&e.target&&e.target.src,i.message="Loading chunk "+o+" failed.\n("+t+": "+n+")",i.name="ChunkLoadError",i.type=t,i.request=n,r[1](i)),u[o]=void 0)},s=setTimeout(function(){t({type:"timeout",target:a})},12e4),a.onerror=a.onload=t,document.head.appendChild(a))),Promise.all(r)},l.m=s,l.c=n,l.d=function(e,t,n){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(t,e){if(1&e&&(t=l(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(l.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)l.d(n,r,function(e){return t[e]}.bind(null,r));return n},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="https://js.stripe.com/v3/",l.oe=function(e){throw console.error(e),e};var t=window.__webpackStripeJSv3Jsonp=window.__webpackStripeJSv3Jsonp||[],r=t.push.bind(t);t.push=e,t=t.slice();for(var o=0;o<t.length;o++)e(t[o]);var c=r;l(l.s=18)}([function(e,t,n){"use strict";var r=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,Error),o);function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,e));return window.__stripeElementsController&&window.__stripeElementsController.reportIntegrationError(e),t.name="IntegrationError",Object.defineProperty(t,"message",{value:t.message,enumerable:!0}),t}t.a=r},function(e,t,n){"use strict";n.d(t,"l",function(){return d}),n.d(t,"i",function(){return m}),n.d(t,"f",function(){return h}),n.d(t,"c",function(){return a.a}),n.d(t,"e",function(){return s}),n.d(t,"d",function(){return c}),n.d(t,"b",function(){return u.a}),n.d(t,"k",function(){return p}),n.d(t,"g",function(){return l}),n.d(t,"h",function(){return _}),n.d(t,"a",function(){return y}),n.d(t,"j",function(){return b});function r(e){return"https://js.stripe.com/v3/"+(e||"")}var o=n(9),a=n(8),i=n(3),s=function(e){switch(e){case"ADDRESS_AUTOCOMPLETE":return r("checkout-inner-address-autocomplete-ab83ec0e86f6e5b627e48e236fb56d74.html");case"CARD_ELEMENT":return r("elements-inner-card-00971f08745beafac9aa1ca32ac05dd8.html");case"CARD_LIGHT_ELEMENT":return r("elements-inner-card-light-bf89a5855e815075ed69ce02e06a0195.html");case"CONTROLLER":return r("controller-a89ce0acef846cd6d00bc457d2a88714.html");case"METRICS_CONTROLLER":return r("m-outer-8826b02b000b4fc2c04c76c52ebc9050.html");case"PAYMENT_REQUEST_ELEMENT":return r("elements-inner-payment-request-a6c6c189839cea51bd7acfe0f954e0ca.html");case"PAYMENT_REQUEST_BROWSER":return r("payment-request-inner-browser-0e0bd9ff0829332becf2cdcf2fedc4e2.html");case"PAYMENT_REQUEST_GOOGLE_PAY":return r("payment-request-inner-google-pay-bf31ed95d86c5b687b9a5c6aa6a0a403.html");case"IBAN_ELEMENT":return r("elements-inner-iban-2812bc0d5515e042e8084e5fa01bc9db.html");case"IDEAL_BANK_ELEMENT":return r("elements-inner-ideal-bank-246eefeb9c71c56a27dc4a0ab5b25555.html");case"P24_BANK_ELEMENT":return r("elements-inner-p24-bank-228c0cc4d7cda7702be31ac7c6fc4669.html");case"AUTHORIZE_WITH_URL":return r("authorize-with-url-inner-bcaa645b073c3221e90969bf1f4692b0.html");case"STRIPE_3DS2_CHALLENGE":return r("three-ds-2-challenge-bf141b593e81e55f3672385223a5b737.html");case"STRIPE_3DS2_FINGERPRINT":return r("three-ds-2-fingerprint-800ee16427cba88fa9b7ed9477dcc8e3.html");case"AU_BANK_ACCOUNT_ELEMENT":return r("elements-inner-au-bank-account-d533bd5f72323f4bd7de58158a6f9681.html");case"FPX_BANK_ELEMENT":return r("elements-inner-fpx-bank-01e0c6471ee771e377802ef3bd092087.html");case"LIGHTBOX_APP":return r("lightbox-inner-29fa3c3467665f724ebdac8b023a284b.html");case"ISSUING_CARD_NUMBER_DISPLAY_ELEMENT":return r("elements-inner-issuing-card-number-display-f4b42c40a558af42d03eb772f0fc43cd.html");case"ISSUING_CARD_CVC_DISPLAY_ELEMENT":return r("elements-inner-issuing-card-cvc-display-9ae4028d4fd78d4aa4e6e6e4832fd769.html");case"ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT":return r("elements-inner-issuing-card-expiry-display-48319e91139aad7323a37172beb77cde.html");case"EPS_BANK_ELEMENT":return r("elements-inner-eps-bank-77e0b9a7b64d0d7100958baed64bd13f.html");case"HCAPTCHA_APP":return r("hcaptcha-inner-89d0af3988adf850f01cba34cf3875ee.html");case"NETBANKING_BANK_ELEMENT":return r("elements-inner-netbanking-bank-5e32899f9249a1695528698b88ae63be.html");case"AFTERPAY_MESSAGE_MODAL_ELEMENT":return r("elements-inner-afterpay-message-modal-706efaf25adc4179833b35346e2abc8a.html");case"INSTANT_DEBITS_APP":return r("instant-debits-app-03f92cf6f380fab63c1ef0108c7a024d.html");case"AUTHENTICATION_ELEMENT":return r("elements-inner-authentication-03c68b8d852f65beb032f5fd8828774e.html");default:return Object(i.a)(e)}},c=function(e){var t={frameborder:"0",allowTransparency:"true",scrolling:"no",allowpaymentrequest:"true"};return"PAYMENT_REQUEST_GOOGLE_PAY"===e&&(t.sandbox=["allow-scripts","allow-forms","allow-popups","allow-popups-to-escape-sandbox","allow-same-origin"].join(" "),t.referrerpolicy="origin"),t},u=n(4),l={PAYMENT_INTENT:"PAYMENT_INTENT",SETUP_INTENT:"SETUP_INTENT"},p=[u.a.card,u.a.cardNumber,u.a.cardExpiry,u.a.cardCvc,u.a.postalCode],d="https://js.stripe.com/v3/",f=Object(o.d)(d),m=f?f.origin:"",h="https://verify.stripe.com/",_={family:"font-family",src:"src",unicodeRange:"unicode-range",style:"font-style",variant:"font-variant",stretch:"font-stretch",weight:"font-weight",display:"font-display"},y=Object.keys(_).reduce(function(e,t){return e[_[t]]=t,e},{}),b=[u.a.idealBank,u.a.p24Bank,u.a.netbankingBank,u.a.idealBankSecondary,u.a.p24BankSecondary,u.a.netbankingBankSecondary,u.a.fpxBank,u.a.fpxBankSecondary,u.a.epsBank,u.a.epsBankSecondary]},function(e,t,n){"use strict";var r=n(15),o=n.n(r),a=window.Promise?Promise:o.a;t.a=a},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(e,t){throw new Error(1<arguments.length&&void 0!==t?t:"absurd")}},function(e,t,n){"use strict";var r={card:"card",cardNumber:"cardNumber",cardExpiry:"cardExpiry",cardCvc:"cardCvc",postalCode:"postalCode",iban:"iban",idealBank:"idealBank",p24Bank:"p24Bank",paymentRequestButton:"paymentRequestButton",auBankAccount:"auBankAccount",fpxBank:"fpxBank",netbankingBank:"netbankingBank",epsBank:"epsBank",afterpayClearpayMessage:"afterpayClearpayMessage",authentication:"authentication",idealBankSecondary:"idealBankSecondary",p24BankSecondary:"p24BankSecondary",auBankAccountNumber:"auBankAccountNumber",auBsb:"auBsb",fpxBankSecondary:"fpxBankSecondary",netbankingBankSecondary:"netbankingBankSecondary",issuingCardNumberDisplay:"issuingCardNumberDisplay",issuingCardCvcDisplay:"issuingCardCvcDisplay",issuingCardExpiryDisplay:"issuingCardExpiryDisplay",epsBankSecondary:"epsBankSecondary",afterpayClearpayMessageModal:"afterpayClearpayMessageModal",authenticationPopover:"authenticationPopover"};t.a=r},function(e,t,n){"use strict";n.d(t,"f",function(){return c}),n.d(t,"d",function(){return u}),n.d(t,"c",function(){return p}),n.d(t,"e",function(){return d}),n.d(t,"a",function(){return f}),n.d(t,"g",function(){return m}),n.d(t,"b",function(){return _});function r(e,t){return!!e.documentElement&&e.documentElement.contains(t)}var o=n(16),a=n.n(o),i=n(0),s=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},c=function(e,t){var o={};t.forEach(function(e){var t=s(e,2),n=t[0],r=t[1];n.split(/\s+/).forEach(function(e){e&&(o[e]=o[e]||r)})}),e.className=a()(e.className,o)},u=function(e,t){e.style.cssText=Object.keys(t).map(function(e){return e+": "+t[e]+" !important;"}).join(" ")},l={border:"none",margin:"0",padding:"0",width:"1px","min-width":"100%",overflow:"hidden",display:"block",visibility:"hidden",position:"fixed",height:"1px","pointer-events":"none","user-select":"none"},p=function(e){u(e,l)},d=function(e){try{return window.parent.frames[e]}catch(e){return null}},f=function(){if(!document.body)throw new i.a("Stripe.js requires that your page has a <body> element.");return document.body},m=function(e){return requestAnimationFrame(function(){requestAnimationFrame(e)})},h="isConnected"in window.Node.prototype?function(e,t){return t.isConnected&&t.ownerDocument===e}:r,_=function(e,t){return!r(e,t)&&h(e,t)}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e};function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a=Date.now?function(){return Date.now()}:function(){return(new Date).getTime()},i=a(),s=window.performance&&window.performance.now?function(){return window.performance.now()}:function(){return a()-i},c=(r(u,[{key:"getAsPosixTime",value:function(){return a()-this.getElapsedTime()}},{key:"getElapsedTime",value:function(e){return Math.round((e?e.timestampValue:s())-this.timestampValue)}},{key:"valueOf",value:function(){return Math.round(this.timestampValue)}}],[{key:"fromPosixTime",value:function(e){return new u(e-a()+s())}}]),u);function u(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),this.timestampValue=null!=e?e:s()}},function(e,t,n){"use strict";n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o}),n.d(t,"c",function(){return a}),n.d(t,"e",function(){return c}),n.d(t,"f",function(){return u}),n.d(t,"d",function(){return l});var i=n(2),s=n(6),f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]},o=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1},m="[object Object]",a=function t(e,n){if("object"!==(void 0===e?"undefined":f(e))||"object"!==(void 0===n?"undefined":f(n)))return e===n;if(null===e||null===n)return e===n;var r=Array.isArray(e);if(r!==Array.isArray(n))return!1;var o=Object.prototype.toString.call(e)===m;if(o!=(Object.prototype.toString.call(n)===m))return!1;if(!o&&!r)return!1;var a=Object.keys(e),i=Object.keys(n);if(a.length!==i.length)return!1;for(var s={},c=0;c<a.length;c++)s[a[c]]=!0;for(var u=0;u<i.length;u++)s[i[u]]=!0;var l=Object.keys(s);if(l.length!==a.length)return!1;var p=e,d=n;return l.every(function(e){return t(p[e],d[e])})},c=function(e,t){for(var n={},r=0;r<t.length;r++)n[t[r]]=!0;for(var o=[],a=0;a<e.length;a++)n[e[a]]&&o.push(e[a]);return o},u=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n];return t},l=function(r,o){var a=0;return new i.a(function e(t){for(var n=new s.a;a<r.length&&n.getElapsedTime()<50;)o(r[a]),a++;a===r.length?t():setTimeout(function(){return e(t)})})}},function(e,t,n){"use strict";t.a={ADDRESS_AUTOCOMPLETE:"ADDRESS_AUTOCOMPLETE",CARD_ELEMENT:"CARD_ELEMENT",CARD_LIGHT_ELEMENT:"CARD_LIGHT_ELEMENT",CONTROLLER:"CONTROLLER",METRICS_CONTROLLER:"METRICS_CONTROLLER",PAYMENT_REQUEST_ELEMENT:"PAYMENT_REQUEST_ELEMENT",PAYMENT_REQUEST_BROWSER:"PAYMENT_REQUEST_BROWSER",PAYMENT_REQUEST_GOOGLE_PAY:"PAYMENT_REQUEST_GOOGLE_PAY",IBAN_ELEMENT:"IBAN_ELEMENT",IDEAL_BANK_ELEMENT:"IDEAL_BANK_ELEMENT",P24_BANK_ELEMENT:"P24_BANK_ELEMENT",AUTHORIZE_WITH_URL:"AUTHORIZE_WITH_URL",STRIPE_3DS2_CHALLENGE:"STRIPE_3DS2_CHALLENGE",STRIPE_3DS2_FINGERPRINT:"STRIPE_3DS2_FINGERPRINT",AU_BANK_ACCOUNT_ELEMENT:"AU_BANK_ACCOUNT_ELEMENT",FPX_BANK_ELEMENT:"FPX_BANK_ELEMENT",LIGHTBOX_APP:"LIGHTBOX_APP",ISSUING_CARD_NUMBER_DISPLAY_ELEMENT:"ISSUING_CARD_NUMBER_DISPLAY_ELEMENT",ISSUING_CARD_CVC_DISPLAY_ELEMENT:"ISSUING_CARD_CVC_DISPLAY_ELEMENT",ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT:"ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT",EPS_BANK_ELEMENT:"EPS_BANK_ELEMENT",HCAPTCHA_APP:"HCAPTCHA_APP",NETBANKING_BANK_ELEMENT:"NETBANKING_BANK_ELEMENT",AFTERPAY_MESSAGE_MODAL_ELEMENT:"AFTERPAY_MESSAGE_MODAL_ELEMENT",INSTANT_DEBITS_APP:"INSTANT_DEBITS_APP",AUTHENTICATION_ELEMENT:"AUTHENTICATION_ELEMENT"}},function(e,t,n){"use strict";n.d(t,"b",function(){return s}),n.d(t,"a",function(){return o}),n.d(t,"d",function(){return a}),n.d(t,"c",function(){return i});var r=/^(http(s)?):\/\//,s=function(e){return r.test(e)},o=function(e){var t=e.match(r);return t&&t.length?t[1]:null},a=function(e){if(!s(e))return null;var t=document.createElement("a");t.href=e;var n=t.protocol,r=t.host,o=t.pathname,a=/:80$/,i=/:443$/;return"http:"===n&&a.test(r)?r=r.replace(a,""):"https:"===n&&i.test(r)&&(r=r.replace(i,"")),{host:r,protocol:n,origin:n+"//"+r,path:o}},i=function(e,t){if("/"!==t[0])return""+e.replace(/\/[^/]*$/,"/")+t;var n=a(e);return n?""+n.origin+t:t}},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return a}),n.d(t,"c",function(){return i});var r=n(0),o=function(r){var o={},a={};return function(e){var t="_"+e;if("string"==typeof e&&void 0!==o[t])return o[t];if("number"==typeof e&&void 0!==a[t])return a[t];var n=r(e);return"string"==typeof e&&(o[t]=n),"number"==typeof e&&(a[t]=n),n}},a=function(e,t){var n=!1;return function(){if(n)throw new r.a(t);n=!0;try{return e.apply(void 0,arguments).then(function(e){return n=!1,e},function(e){throw n=!1,e})}catch(e){throw n=!1,e}}},i=function(e){var t=e;return function(){t&&(t.apply(void 0,arguments),t=null)}}},function(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return r});var o=n(9),a=function(e,t){var n=Object(o.d)(e),r=Object(o.d)(t);return!(!n||!r)&&n.origin===r.origin},r=function(e){return a(e,"https://js.stripe.com/v3/")||(t=e,n=Object(o.d)(t),"stripe.com"===(r=n?n.host:"")||!!r.match(/\.stripe\.(com|me)$/));var t,n,r}},function(e,t,n){"use strict";var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function u(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}t.a=function o(a,i){var s=[];return Object.keys(a).forEach(function(e){var t,n=a[e],r=i?i+"["+e+"]":e;n&&"object"===(void 0===n?"undefined":c(n))?""!==(t=o(n,r))&&(s=[].concat(u(s),[t])):null!=n&&(s=[].concat(u(s),[r+"="+encodeURIComponent(String(n))]))}),s.join("&").replace(/%20/g,"+")}},function(e,t,n){"use strict";t.a=function(e,t){return e?window.getComputedStyle(e,t):null}},function(e,t,n){"use strict";n.d(t,"b",function(){return r}),n.d(t,"c",function(){return s}),n.d(t,"a",function(){return c});var o=n(10),a=n(7),i=n(13),r=function(t,e){var n=Array.prototype.slice.call(document.querySelectorAll("a[href], area[href], input:not([disabled]),\n  select:not([disabled]), textarea:not([disabled]), button:not([disabled]),\n  object, embed, *[tabindex], *[contenteditable]")).filter(function(e){var t=e.getAttribute("tabindex"),n=!t||0<=parseInt(t,10),r=e.getBoundingClientRect(),o=Object(i.a)(e),a=0<r.width&&0<r.height&&o&&"hidden"!==o.getPropertyValue("visibility");return n&&a});return n[Object(a.b)(n,function(e){return e===t||t.contains(e)})+("previous"===e?-1:1)]},s=function(e,t){return e.then(function(){return Object(a.d)(t,function(e){var t=e.element,n=e.tabIndex;""===n?t.removeAttribute("tabindex"):t.setAttribute("tabindex",n)})})},c=function(n){var r=[],e=Object(a.d)(document.querySelectorAll("*"),function(e){var t=e.getAttribute("tabindex")||"";n!==e&&(e.tabIndex=-1),r.push({element:e,tabIndex:t})}),t=Object(o.c)(function(){s(e,r)});return{lockedPromise:e,lockedElements:r,restoreFocus:t}}},function(e,t,n){"use strict";var c=n(19);e.exports=c;var r=l(!0),o=l(!1),a=l(null),i=l(void 0),s=l(0),u=l("");function l(e){var t=new c(c._61);return t._81=1,t._65=e,t}c.resolve=function(e){if(e instanceof c)return e;if(null===e)return a;if(void 0===e)return i;if(!0===e)return r;if(!1===e)return o;if(0===e)return s;if(""===e)return u;if("object"==typeof e||"function"==typeof e)try{var t=e.then;if("function"==typeof t)return new c(t.bind(e))}catch(n){return new c(function(e,t){t(n)})}return l(e)},c.all=function(e){var s=Array.prototype.slice.call(e);return new c(function(o,a){if(0===s.length)return o([]);var i=s.length;for(var e=0;e<s.length;e++)!function t(n,e){if(e&&("object"==typeof e||"function"==typeof e)){if(e instanceof c&&e.then===c.prototype.then){for(;3===e._81;)e=e._65;return 1===e._81?t(n,e._65):(2===e._81&&a(e._65),void e.then(function(e){t(n,e)},a))}var r=e.then;if("function"==typeof r)return void new c(r.bind(e)).then(function(e){t(n,e)},a)}s[n]=e,0==--i&&o(s)}(e,s[e])})},c.reject=function(n){return new c(function(e,t){t(n)})},c.race=function(e){return new c(function(t,n){e.forEach(function(e){c.resolve(e).then(t,n)})})},c.prototype.catch=function(e){return this.then(null,e)}},function(t,n,e){var r;!function(){"use strict";var e=function(){function i(){}function s(e,t){for(var n=t.length,r=0;r<n;++r)!function(e,t){if(!t)return;var n=typeof t;"string"==n?function(e,t){for(var n=t.split(a),r=n.length,o=0;o<r;++o)e[n[o]]=!0}(e,t):Array.isArray(t)?s(e,t):"object"==n?function(e,t){for(var n in t)o.call(t,n)&&(e[n]=!!t[n])}(e,t):"number"==n&&(e[t]=!0)}(e,t[r])}i.prototype=Object.create(null);var o={}.hasOwnProperty;var a=/\s+/;return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new i;s(r,t);var o,a=[];for(o in r)r[o]&&a.push(o);return a.join(" ")}}();t.exports?t.exports=e:void 0===(r=function(){return e}.apply(n,[]))||(t.exports=r)}()},function(e,t){e.exports=function(e){return"_"+e.split("").map(function(e){return e.charCodeAt(0)}).reduce(function(e,t){return(e<<5)-e+t&(e<<5)-e+t},0).toString().replace(/[-.]/g,"_")}},function(e,t,n){e.exports=n(27)},function(e,t,n){"use strict";var o=n(20);function i(){}var a=null,s={};function c(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._45=0,this._81=0,this._65=null,this._54=null,e!==i&&f(e,this)}function u(e,t){for(;3===e._81;)e=e._65;if(c._10&&c._10(e),0===e._81)return 0===e._45?(e._45=1,void(e._54=t)):1===e._45?(e._45=2,void(e._54=[e._54,t])):void e._54.push(t);var n,r;n=e,r=t,o(function(){var e,t=1===n._81?r.onFulfilled:r.onRejected;null!==t?(e=function(e,t){try{return e(t)}catch(e){return a=e,s}}(t,n._65))===s?p(r.promise,a):l(r.promise,e):(1===n._81?l:p)(r.promise,n._65)})}function l(e,t){if(t===e)return p(e,new TypeError("A promise cannot be resolved with itself.")),0;if(t&&("object"==typeof t||"function"==typeof t)){var n=function(e){try{return e.then}catch(e){return a=e,s}}(t);if(n===s)return p(e,a),0;if(n===e.then&&t instanceof c)return e._81=3,e._65=t,void r(e);if("function"==typeof n)return void f(n.bind(t),e)}e._81=1,e._65=t,r(e)}function p(e,t){e._81=2,e._65=t,c._97&&c._97(e,t),r(e)}function r(e){if(1===e._45&&(u(e,e._54),e._54=null),2===e._45){for(var t=0;t<e._54.length;t++)u(e,e._54[t]);e._54=null}}function d(e,t,n){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.promise=n}function f(e,t){var n=!1,r=function(e,t,n){try{e(t,n)}catch(e){return a=e,s}}(e,function(e){n||(n=!0,l(t,e))},function(e){n||(n=!0,p(t,e))});n||r!==s||(n=!0,p(t,a))}(e.exports=c)._10=null,c._97=null,c._61=i,c.prototype.then=function(e,t){if(this.constructor!==c)return o=e,a=t,new(r=this).constructor(function(e,t){var n=new c(i);n.then(e,t),u(r,new d(o,a,n))});var r,o,a,n=new c(i);return u(this,new d(e,t,n)),n}},function(d,e,t){"use strict";(function(e){function t(e){r.length||(n(),0),r[r.length]=e}d.exports=t;var n,r=[],o=0;function a(){for(;o<r.length;){var e=o;if(o+=1,r[e].call(),1024<o){for(var t=0,n=r.length-o;t<n;t++)r[t]=r[t+o];r.length-=o,o=0}}r.length=0,o=0,0}var i,s,c,u=void 0!==e?e:self,l=u.MutationObserver||u.WebKitMutationObserver;function p(r){return function(){var e=setTimeout(n,0),t=setInterval(n,50);function n(){clearTimeout(e),clearInterval(t),r()}}}n="function"==typeof l?(i=1,s=new l(a),c=document.createTextNode(""),s.observe(c,{characterData:!0}),function(){i=-i,c.data=i}):p(a),t.requestFlush=n,t.makeRequestCallFromTimer=p}).call(this,t(21))},function(e,t){var n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){},,,,,function(e,t,m){"use strict";m.r(t);function r(e,t){return 0<=e.indexOf(t)}var T=m(0),h=m(3),w=m(7),n=["aed","afn","all","amd","ang","aoa","ars","aud","awg","azn","bam","bbd","bdt","bgn","bhd","bif","bmd","bnd","bob","brl","bsd","btn","bwp","byr","bzd","cad","cdf","chf","clf","clp","cny","cop","crc","cuc","cup","cve","czk","djf","dkk","dop","dzd","egp","ern","etb","eur","fjd","fkp","gbp","gel","ghs","gip","gmd","gnf","gtq","gyd","hkd","hnl","hrk","htg","huf","idr","ils","inr","iqd","irr","isk","jmd","jod","jpy","kes","kgs","khr","kmf","kpw","krw","kwd","kyd","kzt","lak","lbp","lkr","lrd","lsl","ltl","lvl","lyd","mad","mdl","mga","mkd","mmk","mnt","mop","mro","mur","mvr","mwk","mxn","myr","mzn","nad","ngn","nio","nok","npr","nzd","omr","pab","pen","pgk","php","pkr","pln","pyg","qar","ron","rsd","rub","rwf","sar","sbd","scr","sdg","sek","sgd","shp","skk","sll","sos","srd","ssp","std","svc","syp","szl","thb","tjs","tmt","tnd","top","try","ttd","twd","tzs","uah","ugx","usd","uyu","uzs","vef","vnd","vuv","wst","xaf","xag","xau","xcd","xdr","xof","xpf","yer","zar","zmk","zmw","btc","jep","eek","ghc","mtl","tmm","yen","zwd","zwl","zwn","zwr"],o={AE:"AE",AT:"AT",AU:"AU",BE:"BE",BG:"BG",BR:"BR",CA:"CA",CH:"CH",CI:"CI",CR:"CR",CY:"CY",CZ:"CZ",DE:"DE",DK:"DK",DO:"DO",EE:"EE",ES:"ES",FI:"FI",FR:"FR",GB:"GB",GI:"GI",GR:"GR",GT:"GT",HK:"HK",HU:"HU",ID:"ID",IE:"IE",IN:"IN",IT:"IT",JP:"JP",LI:"LI",LT:"LT",LU:"LU",LV:"LV",MT:"MT",MX:"MX",MY:"MY",NL:"NL",NO:"NO",NZ:"NZ",PE:"PE",PH:"PH",PL:"PL",PT:"PT",RO:"RO",SE:"SE",SG:"SG",SI:"SI",SK:"SK",SN:"SN",TH:"TH",TT:"TT",US:"US",UY:"UY"},a=Object.keys(o),i={googlePay:"googlePay",applePay:"applePay",browserCard:"browserCard"},s=Object.keys(i),c={live:"live",test:"test",unknown:"unknown"},_=function(e){return/^pk_test_/.test(e)?c.test:/^pk_live_/.test(e)?c.live:c.unknown},v=m(9),l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function f(e,t,n){return"Invalid value for "+n.label+": "+(n.path.join(".")||"value")+" should be "+e+". You specified: "+t+"."}function y(e,t){return{type:"valid",value:e,warnings:1<arguments.length&&void 0!==t?t:[]}}function g(e){return{error:e,errorType:"full",type:"error"}}function b(e,t,n){var r=new T.a(f(e,t,n));return g(r)}function E(e,t,n){return{expected:e,actual:String(t),options:n,errorType:"mismatch",type:"error"}}function S(e,t){return u({},e,{path:[].concat(d(e.path),[t])})}function P(n){return function(e,t){return void 0===e?y(e):n(e,t)}}function O(b,v){return function(e,t){function n(e){var t=e.options.path.join(".")||"value";return{error:t+" should be "+e.expected,actual:t+" as "+e.actual}}function r(e,t,n){return g(new T.a("Invalid value for "+e+": "+t+". You specified "+n+"."))}var o=b(e,t),a=v(e,t);if("error"!==o.type||"error"!==a.type)return"valid"===o.type?o:a;if("mismatch"===o.errorType&&"mismatch"===a.errorType){var i=n(o),s=i.error,c=i.actual,u=n(a),l=u.error,p=u.actual;return r(t.label,s===l?s:s+" or "+l,c===p?c:c+" and "+p)}if("mismatch"===o.errorType){var d=n(o),f=d.error,m=d.actual;return r(t.label,f,m)}if("mismatch"!==a.errorType)return g(o.error);var h=n(a),_=h.error,y=h.actual;return r(t.label,_,y)}}function k(o,a){return function(t,e){var n=Object(w.a)(o,function(e){return e===t});if(void 0!==n)return y(n);var r=a?"a recognized string.":"one of the following strings: "+o.join(", ");return E(r,t,e)}}function A(n){return function(e,t){return"string"==typeof e&&0===e.indexOf(n)?y(e):E("a string starting with "+n,e,t)}}function I(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return k(t,!1)}function j(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return k(t,!0)}function C(e,t){return"string"==typeof e?y(e):E("a string",e,t)}function R(n,r){return function(e,t){return void 0===e?y(r()):n(e,t)}}function N(e,t){return"boolean"==typeof e?y(e):E("a boolean",e,t)}function M(e,t){return"number"==typeof e?y(e):E("a number",e,t)}function x(n){return function(e,t){return"number"==typeof e&&n<e?y(e):E("a number greater than "+n,e,t)}}function L(n){return function(e,t){return"number"==typeof e&&e===parseInt(e,10)&&(!n||0<=e)?y(e):E(n?"a positive amount in the currency's subunit":"an amount in the currency's subunit",e,t)}}function D(e,t){return L(!1)(e,t)}function B(e,t){return e&&"object"===(void 0===e?"undefined":l(e))?y(e):E("an object",e,t)}function F(r){return function(e,n){return Array.isArray(e)?e.map(function(e,t){return r(e,S(n,String(t)))}).reduce(function(e,t){return"error"===e.type?e:"error"===t.type?t:y([].concat(d(e.value),[t.value]),[].concat(d(e.warnings),d(t.warnings)))},y([])):E("array",e,n)}}function q(u){return function(c){return function(e,t){if(Array.isArray(e)){var n=c(e,t);if("valid"===n.type)for(var r={},o=0;o<n.value.length;o+=1){var a=n.value[o];if("object"===(void 0===a?"undefined":l(a))&&a&&"string"==typeof a[u]){var i=a[u],s="_"+i;if(r[s])return g(new T.a("Duplicate value for "+u+": "+i+". The property '"+u+"' of '"+t.path.join(".")+"' has to be unique."));r[s]=!0}}return n}return E("array",e,t)}}}function U(n){return function(e,t){return void 0===e?y(void 0):E("used in "+n+" instead",e,t)}}function H(s){return function(i){return function(e,r){if(!e||"object"!==(void 0===e?"undefined":l(e))||Array.isArray(e))return E("an object",e,r);var o=e,t=Object(w.a)(Object.keys(o),function(e){return!i[e]});if(t&&s)return g(new T.a("Invalid "+r.label+" parameter: "+[].concat(d(r.path),[t]).join(".")+" is not an accepted parameter."));var n=Object.keys(o),a=y({});return t&&(a=n.reduce(function(e,t){return i[t]?e:y(e.value,[].concat(d(e.warnings),["Unrecognized "+r.label+" parameter: "+[].concat(d(r.path),[t]).join(".")+" is not a recognized parameter. This may cause issues with your integration in the future."]))},a)),Object.keys(i).reduce(function(e,t){if("error"===e.type)return e;var n=(0,i[t])(o[t],S(r,t));return"valid"===n.type&&void 0!==n.value?y(u({},e.value,p({},t,n.value)),[].concat(d(e.warnings),d(n.warnings))):"valid"===n.type?y(e.value,[].concat(d(e.warnings),d(n.warnings))):n},a)}}}function z(e,t,n,r){var o=r||{},a=e(t,{authenticatedOrigin:o.authenticatedOrigin||"",element:o.element||"",label:n,path:o.path||[]});return"valid"===a.type||"full"===a.errorType?a:{type:"error",errorType:"full",error:new T.a(f(a.expected,a.actual,a.options))}}function G(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return e?(parseInt(e,10)^16*Math.random()>>parseInt(e,10)/4).toString(16):"00000000-0000-4000-8000-000000000000".replace(/[08]/g,G)}function Y(e){var t=e.controllerId,n=e.frameId,r=e.targetOrigin,o=e.type,a=r,i=void 0;"controller"===o?i=Object(ie.e)(n):"group"===o?i=Object(ie.e)(t):"outer"===o||"hosted"===o?i=window.frames[n]:"inner"===o&&(a=a||"*",i=window.parent),a=a||ee.i,i&&"function"==typeof i.postMessage&&i.postMessage(JSON.stringify(se({},e,{__stripeJsV3:!0})),a)}function W(e,t){var n=e._isUserError||"IntegrationError"===e.name;throw t&&!n&&t.report("fatal.uncaught_error",{iframe:!1,name:e.name,element:"outer",message:e.message||e.description,fileName:e.fileName,lineNumber:e.lineNumber,columnNumber:e.columnNumber,stack:e.stack&&e.stack.substring(0,1e3)}),e}function K(r,o){return function(e,t,n){try{return r.call(this,e,t,n)}catch(e){return W(e,o||this&&this._controller)}}}var V=I.apply(void 0,d(a)),J=I.apply(void 0,d(n)),$=I.apply(void 0,d(s)),X=(I.apply(void 0,d(Object.keys(c))),H(!0)),Q=H(!1),Z=function(e,t,n,r){var o=z(e,t,n,r);switch(o.type){case"valid":return{value:o.value,warnings:o.warnings};case"error":throw o.error;default:return Object(h.a)(o)}},ee=m(1),te=("00"+Math.floor(1e3*Math.random())).slice(-3),ne=0,re=function(e){return""+e+te+ne++},oe=m(12),ae=m(2),ie=m(5),se=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ce=(m(22),function(t,n){return function(e){try{return t.call(this,e)}catch(e){return W(e,n||this&&this._controller)}}}),ue=function(n,r){return function(e,t){try{return n.call(this,e,t)}catch(e){return W(e,r||this&&this._controller)}}};function le(){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,le),this._emit=function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return(a._callbacks[e]||[]).forEach(function(e){var t=e.fn;if(t._isUserCallback)try{t.apply(void 0,n)}catch(e){throw e._isUserError=!0,e}else t.apply(void 0,n)}),a},this._once=function(t,n){return a._on(t,function e(){a._off(t,e),n.apply(void 0,arguments)},n)},this._removeAllListeners=function(){return a._callbacks={},a},this._on=function(e,t,n){return a._callbacks[e]=a._callbacks[e]||[],a._callbacks[e].push({original:n,fn:t}),a},this._validateUserOn=function(e,t){},this._userOn=function(e,t){if("string"!=typeof e)throw new T.a("When adding an event listener, the first argument should be a string event name.");if("function"!=typeof t)throw new T.a("When adding an event listener, the second argument should be a function callback.");return a._validateUserOn(e,t),t._isUserCallback=!0,a._on(e,t)},this._hasRegisteredListener=function(e){return a._callbacks[e]&&0<a._callbacks[e].length},this._off=function(e,t){if(t){for(var n,r=a._callbacks[e],o=0;o<r.length;o++)if((n=r[o]).fn===t||n.original===t){r.splice(o,1);break}}else delete a._callbacks[e];return a},this._callbacks={};var r,o,e=ue(this._userOn),t=ue(this._off),n=ue(this._once),i=ce(this._hasRegisteredListener),s=ce(this._removeAllListeners),c=(r=this._emit,function(){try{for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.call.apply(r,[this].concat(t))}catch(e){return W(e,o||this&&this._controller)}});this.on=this.addListener=this.addEventListener=e,this.off=this.removeListener=this.removeEventListener=t,this.once=n,this.hasRegisteredListener=i,this.removeAllListeners=s,this.emit=c}var pe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},de=function(e,t,n){return t&&fe(e.prototype,t),n&&fe(e,n),e};function fe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function me(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function he(e){var t=e.type,n=e.controllerId,r=e.listenerRegistry,o=e.betas,a=e.appParams;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,he);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(he.__proto__||Object.getPrototypeOf(he)).call(this));return i._sendFAReq=function(n){var r=re(n.tag);return new ae.a(function(e,t){i._requests[r]={resolve:e,reject:t},i._send({message:{action:"stripe-frame-action",payload:{nonce:r,faReq:n}},type:"outer",frameId:i.id,controllerId:i._controllerId})})},i.action={perform3DS2Challenge:function(e){return i._sendFAReq({tag:"PERFORM_3DS2_CHALLENGE",value:e})},perform3DS2Fingerprint:function(e){return i._sendFAReq({tag:"PERFORM_3DS2_FINGERPRINT",value:e})},show3DS2Spinner:function(e){return i._sendFAReq({tag:"SHOW_3DS2_SPINNER",value:e})},checkCanMakePayment:function(e){return i._sendFAReq({tag:"CHECK_CAN_MAKE_PAYMENT",value:e})},closeLightboxFrame:function(e){return i._sendFAReq({tag:"CLOSE_LIGHTBOX_FRAME",value:e})},openLightboxFrame:function(e){return i._sendFAReq({tag:"OPEN_LIGHTBOX_FRAME",value:e})}},i.type=t,i.loaded=!1,i._controllerId=n,i._persistentMessages=[],i._queuedMessages=[],i._requests={},i._listenerRegistry=r,i.id=i._generateId(),i._iframe=i._createIFrame(t,o,a),i._on("load",function(){i.loaded=!0,i._ensureMounted(),i.loaded&&(i._persistentMessages.forEach(function(e){return i._send(e)}),i._queuedMessages.forEach(function(e){return i._send(e)}),i._queuedMessages=[])}),i._on("title",function(e){var t=e.title;i._iframe.setAttribute("title",t)}),i}var _e=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(he,le),de(he,[{key:"_generateId",value:function(){return re("__privateStripeFrame")}},{key:"send",value:function(e){this._send({message:e,type:"outer",frameId:this.id,controllerId:this._controllerId})}},{key:"sendPersistent",value:function(e){this._ensureMounted();var t={message:e,type:"outer",frameId:this.id,controllerId:this._controllerId};this._persistentMessages=[].concat(me(this._persistentMessages),[t]),this.loaded&&Y(t)}},{key:"resolve",value:function(e,t){this._requests[e]&&this._requests[e].resolve(t)}},{key:"reject",value:function(e,t){this._requests[e]&&this._requests[e].reject(t)}},{key:"_send",value:function(e){this._ensureMounted(),this.loaded?Y(e):this._queuedMessages=[].concat(me(this._queuedMessages),[e])}},{key:"appendTo",value:function(e){this._emit("mount",{anchor:e}),e.appendChild(this._iframe)}},{key:"unmount",value:function(){this.loaded=!1,this._emit("unload")}},{key:"destroy",value:function(){this.unmount();var e=this._iframe.parentElement;e&&e.removeChild(this._iframe),this._emit("destroy")}},{key:"_ensureMounted",value:function(){this._isMounted()||this.unmount()}},{key:"_isMounted",value:function(){return!!document.body&&document.body.contains(this._iframe)}},{key:"_createIFrame",value:function(e,t,n){var r=window.location.href.toString(),o="string"==typeof n?n:Object(oe.a)(pe({},n||{},{referrer:r,controllerId:this._controllerId})),a=document.createElement("iframe");a.setAttribute("name",this.id);var i=Object(ee.d)(e);return Object.keys(i).forEach(function(e){a.setAttribute(e,i[e])}),n&&n.allowCamera&&a.setAttribute("allow","camera"),a.src=Object(ee.e)(e)+(o?"#":"")+o,a}}]),he),ye=function(e,t,n){return t&&be(e.prototype,t),n&&be(e,n),e};function be(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ve(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var o=Object.getPrototypeOf(e);return null===o?void 0:ve(o,t,n)}if("value"in r)return r.value;var a=r.get;return void 0!==a?a.call(n):void 0}function ge(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,ge);var t,n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(ge.__proto__||Object.getPrototypeOf(ge)).call(this,e));return n.autoload=e.autoload||!1,"complete"===document.readyState?n._ensureMounted():(t=n._ensureMounted.bind(n),n._listenerRegistry.addEventListener(document,"DOMContentLoaded",t),n._listenerRegistry.addEventListener(window,"load",t),setTimeout(t,5e3)),n}var we=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(ge,_e),ye(ge,[{key:"_ensureMounted",value:function(){ve(ge.prototype.__proto__||Object.getPrototypeOf(ge.prototype),"_ensureMounted",this).call(this),this._isMounted()||this._autoMount()}},{key:"_autoMount",value:function(){var e=document.body;if(e){var t=document.querySelector("#stripe-hidden-frames-container")||e;this.appendTo(t)}else if("complete"===document.readyState||"interactive"===document.readyState)throw new T.a("Stripe.js requires that your page has a <body> element.");this.autoload&&(this.loaded=!0)}},{key:"_createIFrame",value:function(e,t,n){var r=ve(ge.prototype.__proto__||Object.getPrototypeOf(ge.prototype),"_createIFrame",this).call(this,e,t,n);return r.setAttribute("aria-hidden","true"),r.setAttribute("tabIndex","-1"),Object(ie.c)(r),r}}]),ge),Ee=function(e,t,n){return t&&Se(e.prototype,t),n&&Se(e,n),e};function Se(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pe(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Pe),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(Pe.__proto__||Object.getPrototypeOf(Pe)).apply(this,arguments))}function Oe(e){return/Edge\//i.test(e)}function ke(e){return/(MSIE ([0-9]{1,}[.0-9]{0,})|Trident\/)/i.test(e)}function Ae(e){return/SamsungBrowser/.test(e)}function Te(e){return/iPad|iPhone/i.test(e)&&!ke(e)}function Ie(e){return/^((?!chrome|android).)*safari/i.test(e)&&!Ae(e)}function je(e){return/Android/i.test(e)&&!ke(e)}var Ce,Re,Ne,Me,xe,Le=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Pe,we),Ee(Pe,[{key:"_generateId",value:function(){return this._controllerId}}]),Pe),De=window.navigator.userAgent,Be=Oe(De),Fe=(/Edge\/((1[0-6]\.)|0\.)/i.test(De),ke(De)),qe=(/MSIE ([0-9]{1,}[.0-9]{0,})/i.test(De),Te(De)),Ue=(Te(Ce=De)||je(Ce),je(De),/Android 4\./i.test(Re=De)&&!/Chrome/i.test(Re)&&je(Re),Ie(De)),He=(Ie(Ne=De)&&Te(Ne),/Firefox\//i.test(De),/Firefox\/(50|51|[0-4]?\d)([^\d]|$)/i.test(De),Ae(De)),ze=(/Chrome\/(6[6-9]|[7-9]\d+|[1-9]\d{2,})/i.test(De),/AppleWebKit/i.test(Me=De)&&!/Chrome/i.test(Me)&&!Oe(Me)&&!ke(Me)),Ge=/Chrome/i.test(xe=De)&&!Oe(xe),Ye=(/CriOS/i.test(De),Ue&&"download"in document.createElement("a")),We=function(e,t,n){return t&&Ke(e.prototype,t),n&&Ke(e,n),e};function Ke(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ve={border:"none",margin:"0",padding:"0",width:"1px","min-width":"100%",overflow:"hidden",display:"block","user-select":"none","will-change":"transform"};function Je(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Je);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(Je.__proto__||Object.getPrototypeOf(Je)).call(this,e));return Ue&&n._listenerRegistry.addEventListener(document,"transitionstart",function(e){switch(e.propertyName){case"opacity":case"transform":case"visibility":var t=e.target;n._isMounted()&&t.contains(n._iframe)&&n._forceRepaint()}},{passive:!0}),n}var $e=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(Je,_e),We(Je,[{key:"update",value:function(e){this.send({action:"stripe-user-update",payload:e})}},{key:"updateStyle",value:function(t){var n=this;Object.keys(t).forEach(function(e){n._iframe.style[e]=t[e]})}},{key:"focus",value:function(){this.loaded&&(Ue?this._iframe.focus():this.send({action:"stripe-user-focus",payload:{}}))}},{key:"blur",value:function(){this.loaded&&(this._iframe.contentWindow.blur(),this._iframe.blur(),document.activeElement===this._iframe&&window.focus())}},{key:"clear",value:function(){this.send({action:"stripe-user-clear",payload:{}})}},{key:"_createIFrame",value:function(e,t,n){var r=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in o)return o.value;var i=o.get;return void 0!==i?i.call(r):void 0}(Je.prototype.__proto__||Object.getPrototypeOf(Je.prototype),"_createIFrame",this).call(this,e,t,n);return r.setAttribute("title","Secure payment input frame"),Object(ie.d)(r,Ve),r}},{key:"_forceRepaint",value:function(){var e=this._iframe,t=e.style.display;e.style.display="none";var n=e.offsetHeight;return e.style.display=t,n}}]),Je),Xe=m(10),Qe=m(14),Ze=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var et={display:"block",position:"fixed","z-index":"2147483647",background:"rgba(40,40,40,0)",transition:"background 400ms ease","will-change":"background",top:"0",left:"0",right:"0",bottom:"0"},tt=Ze({},et,{background:"rgba(40,40,40,0.75)"}),nt=function e(t){var b=this,n=t.lockScrolling,r=t.lockFocus,o=t.lockFocusOn,a=t.listenerRegistry;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.domElement=document.createElement("div"),this._runOnHide=[],this.mount=function(){var e=Object(ie.a)();b.domElement.style.display="none",e.contains(b.domElement)||e.insertBefore(b.domElement,e.firstChild)},this.show=function(){var e,t,n,r,o,a,i,s,c,u,l,p,d,f,m,h,_,y;Object(ie.d)(b.domElement,et),b._lockScrolling&&(t=Object(ie.a)(),n=t.style,r=n.position,o=n.top,a=n.left,i=n.bottom,s=n.right,c=n.overflow,u=document.documentElement?document.documentElement.style:{overflow:"",scrollBehavior:""},l=u.overflow,p=u.scrollBehavior,d=window,f=d.pageXOffset,m=d.pageYOffset,h=document.documentElement?window.innerWidth-document.documentElement.offsetWidth:0,_=document.documentElement?window.innerHeight-document.documentElement.offsetHeight:0,t.style.position="fixed",t.style.overflow="hidden",document.documentElement&&(document.documentElement.style.overflow="visible",document.documentElement.style.scrollBehavior="auto"),t.style.top=-m+"px",t.style.left=-f+"px",t.style.right=h+"px",t.style.bottom=_+"px",e=Object(Xe.c)(function(){t.style.position=r,t.style.top=o,t.style.left=a,t.style.bottom=i,t.style.right=s,t.style.overflow=c,document.documentElement&&(document.documentElement.style.overflow=l),window.scrollTo(f,m),document.documentElement&&(document.documentElement.style.scrollBehavior=p)}),b._runOnHide.push(e)),b._lockFocus&&(y=Object(Qe.a)(b._lockFocusOn).restoreFocus,b._runOnHide.push(y))},this.fadeIn=function(){setTimeout(function(){Object(ie.d)(b.domElement,tt)})},this.fadeOut=function(){return new ae.a(function(e){Object(ie.d)(b.domElement,et),setTimeout(e,500),b._listenerRegistry.addEventListener(b.domElement,"transitionend",e)}).then(function(){for(b.domElement.style.display="none";b._runOnHide.length;)b._runOnHide.pop()()})},this.unmount=function(){Object(ie.a)().removeChild(b.domElement)},this._lockScrolling=!!n,this._lockFocus=!!r,this._lockFocusOn=o||null,this._listenerRegistry=a},rt=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in o)return o.value;var i=o.get;return void 0!==i?i.call(r):void 0};var ot={position:"absolute",left:"0",top:"0",height:"100%",width:"100%"};function at(e){var t=e.type,n=e.controllerId,r=e.listenerRegistry,o=e.options;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,at);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(at.__proto__||Object.getPrototypeOf(at)).call(this,{type:t,controllerId:n,listenerRegistry:r,appParams:o}));return a._autoMount=function(){a.appendTo(a._backdrop.domElement),a._backdrop.mount()},a.show=function(){a._backdrop.show(),Object(ie.d)(a._iframe,ot)},a.fadeInBackdrop=function(){a._backdrop.fadeIn()},a._backdropFadeoutPromise=null,a.fadeOutBackdrop=function(){return a._backdropFadeoutPromise||(a._backdropFadeoutPromise=a._backdrop.fadeOut()),a._backdropFadeoutPromise},a.destroy=function(){var e=0<arguments.length&&void 0!==arguments[0]&&arguments[0],t=a.fadeOutBackdrop().then(function(){a._backdrop.unmount(),e||rt(at.prototype.__proto__||Object.getPrototypeOf(at.prototype),"destroy",a).call(a)});return e&&rt(at.prototype.__proto__||Object.getPrototypeOf(at.prototype),"destroy",a).call(a),t},a._backdrop=new nt({lockScrolling:!0,lockFocus:!0,lockFocusOn:a._iframe,listenerRegistry:r}),a._autoMount(),a}var it=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(at,_e),at),st=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ut=function(e,t,n){return t&&lt(e.prototype,t),n&&lt(e,n),e};function lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pt={display:"block",position:"absolute","z-index":"1000",width:"1px","min-width":"100%",margin:"2px 0 0 0",padding:"0",border:"none",overflow:"hidden"};function dt(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,dt),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(dt.__proto__||Object.getPrototypeOf(dt)).apply(this,arguments))}function ft(e){var t=e.name,n=e.value,r=e.expiresIn,o=e.path,a=e.domain,i=new Date,s=r||31536e6;i.setTime(i.getTime()+s);var c=o||"/",u=(n||"").replace(/[^!#-+\--:<-[\]-~]/g,encodeURIComponent),l=encodeURIComponent(t)+"="+u+";expires="+i.toGMTString()+";path="+c+";SameSite=Lax";return a&&(l+=";domain="+a),document.cookie=l}function mt(n){var e=Object(w.a)(document.cookie.split("; "),function(e){var t=e.indexOf("=");return decodeURIComponent(e.substr(0,t))===n});if(e){var t=e.indexOf("=");return decodeURIComponent(e.substr(t+1))}return null}function ht(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var _t=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(dt,_e),ut(dt,[{key:"updateStyle",value:function(t){var n=this;Object.keys(t).forEach(function(e){n._iframe.style[e]=t[e]})}},{key:"update",value:function(e){this.send({action:"stripe-user-update",payload:e})}},{key:"_createIFrame",value:function(e,t,n){var r=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var a=Object.getPrototypeOf(t);return null===a?void 0:e(a,n,r)}if("value"in o)return o.value;var i=o.get;return void 0!==i?i.call(r):void 0}(dt.prototype.__proto__||Object.getPrototypeOf(dt.prototype),"_createIFrame",this).call(this,e,t,n&&"object"===(void 0===n?"undefined":ct(n))?st({},n,{isSecondaryFrame:!0}):n);return Object(ie.d)(r,pt),r.style.height="0",r}}]),dt),yt=m(11),bt=["button","checkbox","file","hidden","image","submit","radio","reset"],vt=function(e){var t=e.tagName;if(e.isContentEditable||"TEXTAREA"===t)return!0;if("INPUT"!==t)return!1;var n=e.getAttribute("type");return-1===bt.indexOf(n)},gt=function(e){var u={};return e.replace(/\+/g," ").split("&").forEach(function(e,t){var n,r=e.split("="),o=decodeURIComponent(r[0]),a=u,i=0,s=o.split("]["),c=s.length-1,c=/\[/.test(s[0])&&/\]$/.test(s[c])?(s[c]=s[c].replace(/\]$/,""),(s=s.shift().split("[").concat(s)).length-1):0;if(!(0<=s.indexOf("__proto__")))if(2===r.length)if(n=decodeURIComponent(r[1]),c)for(;i<=c;i++){if(o=""===s[i]?a.length:s[i],!ht(a,o)&&a[o])return;a[o]=i<c?a[o]||(s[i+1]&&isNaN(s[i+1])?{}:[]):n,a=a[o]}else if(Array.isArray(u[o]))u[o].push(n);else if(void 0!==u[o]){if(!ht(u,o))return;u[o]=[u[o],n]}else u[o]=n;else o&&(u[o]="")}),u},wt=m(17),Et=m.n(wt),St=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Ot(e){return e&&"object"===(void 0===e?"undefined":Pt(e))&&(e.constructor===Array||e.constructor===Object)}function kt(e){return Ot(e)?Array.isArray(e)?e.slice(0,e.length):St({},e):e}function At(i){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(Array.isArray(t[0])&&i)return kt(t[0]);var a=Array.isArray(t[0])?[]:{};return t.forEach(function(o){o&&Object.keys(o).forEach(function(e){var t=a[e],n=o[e],r=Ot(t)&&!(i&&Array.isArray(t));"object"===(void 0===n?"undefined":Pt(n))&&r?a[e]=At(i)(t,kt(n)):void 0!==n?a[e]=(Ot(n)?At(i):kt)(n):void 0!==t&&(a[e]=t)})}),a}}var Tt=At(!1),It=At(!0),jt=ee.l.replace(/\/$/,"");var Ct="_1776170249",Rt=function(e){var t,n,r,o=(r=!0,(n=Ct)in(t={})?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t);try{var a=gt(e.slice(e.indexOf("?")+1));Object.keys(a).forEach(function(e){var t=Et()(e),n=a[e];t===Ct&&"false"===n&&(o[t]=!1)})}catch(e){}return o}(function(e){try{if(e.currentScript)return e.currentScript.src;var t=e.querySelectorAll('script[src^="'+jt+'"]'),n=Object(w.a)(t,function(e){var t=(e.getAttribute("src")||"").split("?")[0];return new RegExp("^"+jt+"/?$").test(t)});return n&&n.getAttribute("src")||""}catch(e){return""}}(document))[Ct],Nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Mt=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},xt=function(){var o=[];return{addEventListener:function(e,t,n,r){e.addEventListener(t,n,r),o.push([e,t,n,r])},removeEventListener:function(d,f,m,h){d.removeEventListener(f,m,h),o=o.filter(function(e){return t=e,n=Mt([d,f,m,h],4),r=n[0],o=n[1],a=n[2],i=n[3],s=Mt(t,4),c=s[0],u=s[1],l=s[2],p=s[3],c!==r||u!==o||l!==a||!0===("object"===(void 0===i?"undefined":Nt(i))&&i?i.capture:i)!=(!0===("object"===(void 0===p?"undefined":Nt(p))&&p?p.capture:p));var t,n,r,o,a,i,s,c,u,l,p})}}};function Lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Dt(e){return 42===e.length}function Bt(e,t,n){return n?!e||!Dt(e)&&Dt(t)?t:e:G()}var Ft="__privateStripeMetricsController",qt={MERCHANT:"merchant",SESSION:"session"},Ut="NA",Ht=(function(e,t,n){return t&&Lt(e.prototype,t),n&&Lt(e,n),e}(zt,[{key:"ids",value:function(){return{guid:this._guid,muid:this._muid,sid:this._sid}}},{key:"idsPromise",value:function(){var e=this;return this._idsPromise.then(function(){return e.ids()})}},{key:"_establishMessageChannel",value:function(e){if(!Rt)return this._guid=G(),void e();this._listenerRegistry.addEventListener(window,"message",this._handleMessage(e))}},{key:"_startIntervalCheck",value:function(){var t=this,n=window.location.href;setInterval(function(){var e=window.location.href;e!==n&&(t.send(function(e){return{action:"ping",payload:{sid:e.sid,muid:e.muid,title:document.title,referrer:document.referrer,url:document.location.href,version:6}}}),n=e)},5e3)}},{key:"report",value:function(t,n){this.send(function(e){return{action:"track",payload:{sid:e.sid,muid:e.muid,url:document.location.href,source:t,data:n,version:6}}})}},{key:"send",value:function(e){var t=this;this._idsPromise.then(function(){try{t._controllerFrame&&t._controllerFrame.send(e(t.ids()))}catch(e){}})}},{key:"_testLatency",value:function(){var n=this,r=new Date;this._listenerRegistry.addEventListener(document,"mousemove",function e(){try{var t=new Date;n._latencies.push(t-r),10<=n._latencies.length&&(n.report("mouse-timings-10",n._latencies),n._listenerRegistry.removeEventListener(document,"mousemove",e)),r=t}catch(e){}})}},{key:"_extractMetaReferrerPolicy",value:function(){var e=document.querySelector("meta[name=referrer]");return null!=e&&e instanceof HTMLMetaElement?e.content.toLowerCase():null}},{key:"_extractUrl",value:function(e){var t=document.location.href;switch(e){case"origin":case"strict-origin":case"origin-when-cross-origin":case"strict-origin-when-cross-origin":return document.location.origin;case"unsafe-url":return t.split("#")[0];default:return t}}},{key:"_buildFrameQueryString",value:function(){var e=this._extractMetaReferrerPolicy(),t=this._extractUrl(e),n={url:t,title:document.title,referrer:document.referrer,muid:this._muid,sid:this._sid,version:6,preview:Object(yt.b)(t)};return null!=e&&(n.metaReferrerPolicy=e),Object.keys(n).map(function(e){return null!=n[e]?e+"="+encodeURIComponent(n[e].toString()):null}).join("&")}},{key:"_getID",value:function(e,t){var n=1<arguments.length&&void 0!==t?t:Ut;switch(e){case qt.MERCHANT:if(this._doNotPersist)return Bt(this._muid,n,Rt);try{var r="__stripe_mid",o=Bt(mt(r),n,Rt);return Dt(o)&&ft({name:r,value:o,domain:"."+document.location.hostname}),o}catch(e){return Ut}case qt.SESSION:if(this._doNotPersist)return Bt(this._sid,n,Rt);try{var a="__stripe_sid",i=Bt(mt(a),n,Rt);return Dt(i)&&ft({name:a,value:i,domain:"."+document.location.hostname,expiresIn:18e5}),i}catch(e){return Ut}default:throw new Error("Invalid ID type specified: "+e)}}}]),zt);function zt(){var e,t,n,l=this,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,zt),this._controllerFrame=null,this._latencies=[],this._handleMessage=function(u){return function(e){var t=e.data,n=e.origin;if(Object(yt.b)(n)&&"string"==typeof t)try{var r,o,a,i=JSON.parse(t),s=i.originatingScript,c=i.payload;"m2"===s&&(r=c.guid,o=c.muid,a=c.sid,l._guid=r,l._muid=l._getID(qt.MERCHANT,o),l._sid=l._getID(qt.SESSION,a),u())}catch(e){}}},r.checkoutIds?(t=(e=r.checkoutIds).muid,n=e.sid,this._guid=Ut,this._muid=t,this._sid=n,this._doNotPersist=!0):(this._guid=Ut,this._muid=this._getID(qt.MERCHANT),this._sid=this._getID(qt.SESSION),this._doNotPersist=!1),this._listenerRegistry=xt(),this._idsPromise=new ae.a(function(e){l._establishMessageChannel(e)}),this._id=re(Ft),Rt&&(this._controllerFrame=new Le({type:ee.c.METRICS_CONTROLLER,controllerId:this._id,listenerRegistry:this._listenerRegistry,autoload:!0,appParams:this._buildFrameQueryString()}),this._startIntervalCheck(),setTimeout(this._testLatency.bind(this),2e3+500*Math.random()))}var Gt,Yt=null,Wt=function(e){return Yt=new Ht(0<arguments.length&&void 0!==e?e:{})},Kt=!1,Vt=function(){var t=Yt;t&&(Kt||(Kt=!0,t.send(function(e){return{action:"ping",payload:{v2:2,sid:e.sid,muid:e.muid,title:document.title,referrer:document.referrer,url:document.location.href,version:6}}}),t.send(function(e){return{action:"track",payload:{sid:e.sid,muid:e.muid,url:document.location.href,source:"mouse-timings-10-v2",data:t._latencies,version:6}}})))},Jt=m(6),$t={checkout_beta_2:"checkout_beta_2",checkout_beta_3:"checkout_beta_3",checkout_beta_4:"checkout_beta_4",checkout_beta_testcards:"checkout_beta_testcards",payment_intent_beta_1:"payment_intent_beta_1",payment_intent_beta_2:"payment_intent_beta_2",payment_intent_beta_3:"payment_intent_beta_3",card_payment_method_beta_1:"card_payment_method_beta_1",acknowledge_ie9_deprecation:"acknowledge_ie9_deprecation",cvc_update_beta_1:"cvc_update_beta_1",google_pay_beta_1:"google_pay_beta_1",google_pay_beta_2:"google_pay_beta_2",acss_debit_beta_1:"acss_debit_beta_1",acss_debit_beta_2:"acss_debit_beta_2",afterpay_clearpay_pm_beta_1:"afterpay_clearpay_pm_beta_1",alipay_pm_beta_1:"alipay_pm_beta_1",au_bank_account_beta_1:"au_bank_account_beta_1",au_bank_account_beta_2:"au_bank_account_beta_2",bacs_debit_beta:"bacs_debit_beta",bancontact_pm_beta_1:"bancontact_pm_beta_1",boleto_pm_beta_1:"boleto_pm_beta_1",eps_pm_beta_1:"eps_pm_beta_1",fpx_bank_beta_1:"fpx_bank_beta_1",giropay_pm_beta_1:"giropay_pm_beta_1",grabpay_pm_beta_1:"grabpay_pm_beta_1",ideal_pm_beta_1:"ideal_pm_beta_1",konbini_pm_beta_1:"konbini_pm_beta_1",line_items_beta_1:"line_items_beta_1",oxxo_pm_beta_1:"oxxo_pm_beta_1",p24_pm_beta_1:"p24_pm_beta_1",paypal_pm_beta_1:"paypal_pm_beta_1",sepa_pm_beta_1:"sepa_pm_beta_1",sofort_pm_beta_1:"sofort_pm_beta_1",tax_product_beta_1:"tax_product_beta_1",wechat_pay_pm_beta_1:"wechat_pay_pm_beta_1",wechat_pay_pm_beta_2:"wechat_pay_pm_beta_2",checkout_beta_locales:"checkout_beta_locales",stripe_js_beta_locales:"stripe_js_beta_locales",ideal_sepa_beta_1:"ideal_sepa_beta_1",sofort_sepa_beta_1:"sofort_sepa_beta_1",bancontact_sepa_beta_1:"bancontact_sepa_beta_1",upi_beta_1:"upi_beta_1",issuing_elements_1:"issuing_elements_1",return_intents_beta_1:"return_intents_beta_1",netbanking_beta_1:"netbanking_beta_1",eps_bank_beta_1:"eps_bank_beta_1",card_light_beta_1:"card_light_beta_1",no_card_light_beta_1:"no_card_light_beta_1",p24_bank_beta_1:"p24_bank_beta_1",netbanking_bank_beta_1:"netbanking_bank_beta_1",instant_debits_beta_1:"instant_debits_beta_1",expresspay_beta_1:"expresspay_beta_1",identity_dialog_1:"identity_dialog_1"},Xt=Object.freeze({netbankingBank:"netbanking_bank_beta_1",authentication:"expresspay_beta_1"}),Qt=Object.keys($t),Zt=function(e,t){return 0<=e.indexOf(t)},en=!1,tn=function(e){en||"null"===(null!=e?e:window.origin)&&(en=!0,console.error("Stripe.js requires 'allow-same-origin' if sandboxed."))};function nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var rn,on,an=(nn(Gt={},ee.b.card,{unique:!0,conflict:[ee.b.cardNumber,ee.b.cardExpiry,ee.b.cardCvc,ee.b.postalCode],beta:!1,implementation:"legacy"}),nn(Gt,ee.b.cardNumber,{unique:!0,conflict:[ee.b.card],beta:!1,implementation:"legacy"}),nn(Gt,ee.b.cardExpiry,{unique:!0,conflict:[ee.b.card],beta:!1,implementation:"legacy"}),nn(Gt,ee.b.cardCvc,{unique:!0,conflict:[ee.b.card],beta:!1,implementation:"legacy"}),nn(Gt,ee.b.postalCode,{unique:!0,conflict:[ee.b.card],beta:!1,implementation:"legacy"}),nn(Gt,ee.b.paymentRequestButton,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),nn(Gt,ee.b.iban,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),nn(Gt,ee.b.idealBank,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),nn(Gt,ee.b.p24Bank,{unique:!0,conflict:[],beta:!1,implementation:"legacy"}),nn(Gt,ee.b.auBankAccount,{unique:!0,beta:!1,conflict:[],implementation:"legacy"}),nn(Gt,ee.b.fpxBank,{unique:!0,beta:!1,conflict:[],implementation:"legacy"}),nn(Gt,ee.b.netbankingBank,{unique:!0,beta:!0,conflict:[],implementation:"legacy"}),nn(Gt,ee.b.issuingCardNumberDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),nn(Gt,ee.b.issuingCardCvcDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),nn(Gt,ee.b.issuingCardExpiryDisplay,{unique:!1,beta:!0,conflict:[],implementation:"legacy"}),nn(Gt,ee.b.epsBank,{unique:!0,conflict:[],beta:!0,implementation:"legacy"}),nn(Gt,ee.b.afterpayClearpayMessage,{unique:!1,conflict:[],beta:!1,implementation:"afterpay_message"}),nn(Gt,ee.b.authentication,{unique:!0,conflict:[],beta:!0,implementation:"frame"}),Gt);function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var cn="__PrivateStripeElement",un=["brand"],ln=(sn(rn={},ee.b.card,un),sn(rn,ee.b.cardNumber,un),sn(rn,ee.b.iban,["country","bankName"]),sn(rn,ee.b.auBankAccount,["bankName","branchName"]),rn),pn=(sn(on={},ee.b.idealBank,{secondary:ee.b.idealBankSecondary}),sn(on,ee.b.p24Bank,{secondary:ee.b.p24BankSecondary}),sn(on,ee.b.fpxBank,{secondary:ee.b.fpxBankSecondary}),sn(on,ee.b.netbankingBank,{secondary:ee.b.netbankingBankSecondary}),sn(on,ee.b.epsBank,{secondary:ee.b.epsBankSecondary}),sn(on,ee.b.authentication,{secondary:ee.b.authenticationPopover}),on),dn=m(4),fn=m(8);var mn,hn,_n,yn=cn+"-input",bn=cn+"-safariInput",vn="StripeElement",gn=(mn={},hn=dn.a.authentication,_n=fn.a.AUTHENTICATION_ELEMENT,hn in mn?Object.defineProperty(mn,hn,{value:_n,enumerable:!0,configurable:!0,writable:!0}):mn[hn]=_n,mn),wn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function En(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Pn(e,t){return document.activeElement===e._iframe||e._iframe.parentElement&&document.activeElement===t}function On(e){return"object"===(void 0===e?"undefined":Sn(e))&&null!==e&&"IntegrationError"===e.name?new T.a("string"==typeof e.message?e.message:""):e}var kn="__privateStripeController",An=!1,Tn={},In=function(e){return{cl:!Zt(e,"no_card_light_beta_1")&&(Zt(e,"card_light_beta_1")||Math.random()<0),clc:Math.random()<0}},jn=(function(e,t,n){return t&&En(e.prototype,t),n&&En(e,n),e}(Cn,[{key:"registerWrapper",value:function(e){this._controllerFrame.send({action:"stripe-wrapper-register",payload:{wrapperLibrary:e}})}}]),Cn);function Cn(e){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Cn),Nn.call(this);var t=e.listenerRegistry,r=e.stripeJsLoadTimestamp,o=e.stripeCreateTimestamp,a=e.onFirstLoad,i=e.betas,s=function(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["listenerRegistry","stripeJsLoadTimestamp","stripeCreateTimestamp","onFirstLoad","betas"]),c=s.apiKey,u=s.stripeAccount,l=s.stripeJsId,p=s.locale;this._id=re(kn),this._stripeJsId=l,this._apiKey=c,this._stripeAccount=u,this._listenerRegistry=t,this._betas=i,this._flags=In(i),this._controllerFrame=new Le({type:ee.c.CONTROLLER,betas:i,controllerId:this._id,listenerRegistry:t,appParams:wn({},s,{outerFlags:this._flags,betas:i,stripeJsLoadTime:r.getAsPosixTime()})}),this._stripeJsLoadTimestamp=r,this._createTimestamp=o,this._loadCount=0;function d(e){var t=e.anchor;n._mountTimestamp=new Jt.a,t!==document.body&&n.report("controller.mount.custom_container")}this._controllerFrame._isMounted()?d({anchor:this._controllerFrame._iframe.parentElement}):this._controllerFrame._once("mount",d),a&&this._controllerFrame._once("load",a),this._frames={},this._requests={},this._setupPostMessage(),this._handleMessage=ue(this._handleMessage,this),this.action.fetchLocale({locale:p||"auto"})}function Rn(){var e=document.querySelectorAll("meta[name=viewport][content]"),t=e[e.length-1];return t&&t instanceof HTMLMetaElement?t.content:""}var Nn=function(){var p=this;this._sendCAReq=function(n){var r=re(n.tag);return new ae.a(function(e,t){p._requests[r]={resolve:e,reject:t},p._controllerFrame.send({action:"stripe-safe-controller-action-request",payload:{nonce:r,caReq:n}})})},this.keyMode=function(){return _(p._apiKey)},this.action={retrievePaymentIntent:function(e){return p._sendCAReq({tag:"RETRIEVE_PAYMENT_INTENT",value:e})},confirmPaymentIntent:function(e){return p._sendCAReq({tag:"CONFIRM_PAYMENT_INTENT",value:e})},cancelPaymentIntentSource:function(e){return p._sendCAReq({tag:"CANCEL_PAYMENT_INTENT_SOURCE",value:e})},confirmSetupIntent:function(e){return p._sendCAReq({tag:"CONFIRM_SETUP_INTENT",value:e})},retrieveSetupIntent:function(e){return p._sendCAReq({tag:"RETRIEVE_SETUP_INTENT",value:e})},cancelSetupIntentSource:function(e){return p._sendCAReq({tag:"CANCEL_SETUP_INTENT_SOURCE",value:e})},fetchLocale:function(e){return p._sendCAReq({tag:"FETCH_LOCALE",value:e})},updateCSSFonts:function(e){return p._sendCAReq({tag:"UPDATE_CSS_FONTS",value:e})},createApplePaySession:function(e){return p._sendCAReq({tag:"CREATE_APPLE_PAY_SESSION",value:e})},retrieveSource:function(e){return p._sendCAReq({tag:"RETRIEVE_SOURCE",value:e})},tokenizeWithElement:function(e){return p._sendCAReq({tag:"TOKENIZE_WITH_ELEMENT",value:e})},tokenizeCvcUpdate:function(e){return p._sendCAReq({tag:"TOKENIZE_CVC_UPDATE",value:e})},tokenizeWithData:function(e){return p._sendCAReq({tag:"TOKENIZE_WITH_DATA",value:e})},createSourceWithElement:function(e){return p._sendCAReq({tag:"CREATE_SOURCE_WITH_ELEMENT",value:e})},createSourceWithData:function(e){return p._sendCAReq({tag:"CREATE_SOURCE_WITH_DATA",value:e})},createPaymentMethodWithElement:function(e){return p._sendCAReq({tag:"CREATE_PAYMENT_METHOD_WITH_ELEMENT",value:e})},createPaymentMethodWithData:function(e){return p._sendCAReq({tag:"CREATE_PAYMENT_METHOD_WITH_DATA",value:e})},createPaymentPage:function(e){return p._sendCAReq({tag:"CREATE_PAYMENT_PAGE",value:e})},createPaymentPageWithSession:function(e){return p._sendCAReq({tag:"CREATE_PAYMENT_PAGE_WITH_SESSION",value:e})},createRadarSession:function(e){return p._sendCAReq({tag:"CREATE_RADAR_SESSION",value:e})},authenticate3DS2:function(e){return p._sendCAReq({tag:"AUTHENTICATE_3DS2",value:e})},verifyMicrodepositsForPayment:function(e){return p._sendCAReq({tag:"VERIFY_MICRODEPOSITS_FOR_PAYMENT",value:e})},verifyMicrodepositsForSetup:function(e){return p._sendCAReq({tag:"VERIFY_MICRODEPOSITS_FOR_SETUP",value:e})},retrieveIssuingCard:function(e){return p._sendCAReq({tag:"RETRIEVE_ISSUING_CARD",value:e})},updatePaymentIntent:function(e){return p._sendCAReq({tag:"UPDATE_PAYMENT_INTENT",value:e})},createAcssDebitSession:function(e){return p._sendCAReq({tag:"CREATE_ACSS_DEBIT_SESSION",value:e})},confirmReturnIntent:function(e){return p._sendCAReq({tag:"CONFIRM_RETURN_INTENT",value:e})},localizeError:function(e){return p._sendCAReq({tag:"LOCALIZE_ERROR",value:e})}},this.createElementFrame=function(e,t,n,r){var o=p._betas,a=new $e({type:e,betas:o,controllerId:p._id,listenerRegistry:p._listenerRegistry,appParams:wn({},r,{componentName:t,keyMode:_(p._apiKey),apiKey:p._apiKey})});return p._setupFrame(a,e,n)},this.createSecondaryElementFrame=function(e,t,n,r,o){var a=p._betas,i=new _t({type:e,betas:a,controllerId:p._id,listenerRegistry:p._listenerRegistry,appParams:wn({},o,{componentName:t,primaryElementType:n,keyMode:_(p._apiKey)})});return p._setupFrame(i,e,r)},this.createHiddenFrame=function(e,t){var n=new we({type:e,betas:p._betas,controllerId:p._id,listenerRegistry:p._listenerRegistry,appParams:t});return p._setupFrame(n,e)},this.createLightboxFrame=function(e){var t=e.type,n=e.options,r=new it({type:t,controllerId:p._id,listenerRegistry:p._listenerRegistry,options:wn({},n,{betas:p._betas})});return p._setupFrame(r,t)},this.getFlags=function(){return p._flags},this._setupFrame=function(e,t,n){return p._frames[e.id]=e,p._controllerFrame.sendPersistent({action:"stripe-user-createframe",payload:{newFrameId:e.id,frameType:t,groupId:n}}),e._on("unload",function(){p._controllerFrame.sendPersistent({action:"stripe-frame-unload",payload:{unloadedFrameId:e.id}})}),e._on("destroy",function(){delete p._frames[e.id],p._controllerFrame.sendPersistent({action:"stripe-frame-destroy",payload:{destroyedFrameId:e.id}})}),e._on("load",function(){p._controllerFrame.sendPersistent({action:"stripe-frame-load",payload:{loadedFrameId:e.id}}),p._controllerFrame.loaded&&e.send({action:"stripe-controller-load",payload:{}})}),e},this.report=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};p._controllerFrame.send({action:"stripe-controller-report",payload:{event:e,data:t}})},this.warn=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];p._controllerFrame.send({action:"stripe-controller-warn",payload:{args:t}})},this.controllerFor=function(){return"outer"},this._setupPostMessage=function(){p._listenerRegistry.addEventListener(window,"message",function(e){var t=e.data,n=e.origin,r=e.source,o=function(e){try{var t="string"==typeof e?JSON.parse(e):e;return t.__stripeJsV3?t:null}catch(e){return null}}(t);o&&(Object(yt.a)(ee.i,n)?p._handleMessage(o,r):tn(n))})},this._nodeIsKnownElement=function(e){return e&&"IFRAME"===e.nodeName&&!!p._frames[e.getAttribute("name")||""]},this._handleMessage=function(e,t){var n=e.controllerId,r=e.frameId,o=e.message,a=p._frames[r];if(n===p._id)switch(o.action){case"stripe-frame-event":var i=o.payload.event,s=o.payload.data;if(a){if(qe){var c=a._iframe.parentElement,u=c&&c.querySelector("."+yn);if("focus"===i&&!An&&u&&!Pn(a,u)&&!Tn[r]){u.focus(),An=!0,Tn[r]=!0,setTimeout(function(){Tn[r]=!1},1e3);break}if("blur"===i&&An){An=!1;break}"blur"===i&&Ye&&setTimeout(function(){var e,t,n=document.activeElement;!n||Pn(a,u)||vt(n)||p._nodeIsKnownElement(n)||((e=c&&c.querySelector("."+bn))&&((t=e).disabled=!1,t.focus(),t.blur(),t.disabled=!0),n.focus())},400)}"load"===i&&(s=wn({},s,{source:t})),a._emit(i,s)}break;case"stripe-frame-action-response":a&&a.resolve(o.payload.nonce,o.payload.faRes);break;case"stripe-frame-action-error":a&&a.reject(o.payload.nonce,On(o.payload.faErr));break;case"stripe-frame-error":throw new T.a(o.payload.message);case"stripe-integration-error":a&&a._emit("__privateIntegrationError",{message:o.payload.message});break;case"stripe-controller-load":p._controllerFrame._emit("load",{source:t}),p._loadCount++,Object.keys(p._frames).forEach(function(e){return p._frames[e].send({action:"stripe-controller-load",payload:{}})});var l=p._createTimestamp.getAsPosixTime();p._controllerFrame.send({action:"stripe-user-mount",payload:{timestamps:{stripeJsLoad:p._stripeJsLoadTimestamp.getAsPosixTime(),stripeCreate:l,create:l,mount:p._mountTimestamp.getAsPosixTime()},loadCount:p._loadCount,matchFrame:t===p._controllerFrame._iframe.contentWindow,rtl:!1,paymentRequestButtonType:null}});break;case"stripe-safe-controller-action-response":p._requests[o.payload.nonce]&&p._requests[o.payload.nonce].resolve(o.payload.caRes);break;case"stripe-safe-controller-action-error":p._requests[o.payload.nonce]&&p._requests[o.payload.nonce].reject(On(o.payload.caErr));break;case"stripe-api-call":Vt()}}},Mn=jn;function xn(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,xn);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(xn.__proto__||Object.getPrototypeOf(xn)).call(this));return e.name="NetworkError",e.type="network_error",e}var Ln=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(xn,Error),xn),Dn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Bn=function f(m){return new ae.a(function(e,t){var n=m.method,r=m.url,o=m.data,a=m.headers,i=m.withCredentials,s=m.contentType,c=void 0===s?"application/x-www-form-urlencoded":s,u="";o&&"application/x-www-form-urlencoded"===c?u=Object(oe.a)(o):o&&"application/json"===c&&(u=JSON.stringify(o));var l="GET"===n&&u?r+"?"+u:r,p="GET"===n?"":u,d=new XMLHttpRequest;i&&(d.withCredentials=i),d.open(n,l,!0),d.setRequestHeader("Accept","application/json"),d.setRequestHeader("Content-Type",c),a&&Object.keys(a).forEach(function(e){var t=a[e];"string"==typeof t&&d.setRequestHeader(e,t)}),d.onreadystatechange=function(){4===d.readyState&&(d.onreadystatechange=function(){},0===d.status?i?t(new Ln):f(Dn({},m,{withCredentials:!0})).then(e,t):e(d))};try{d.send(p)}catch(e){t(e)}})},Fn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function qn(e,c){var t=e.reduce(function(e,t){var n,r,o,a=function(e,t){var n=e.indexOf(":");if(-1===n)throw new T.a("Invalid css declaration in file from "+t+': "'+e+'"');var r=e.slice(0,n).trim(),o=ee.a[r];if(!o)throw new T.a("Unsupported css property in file from "+t+': "'+r+'"');return{property:o,value:e.slice(n+1).trim()}}(t,c),i=a.property,s=a.value;return Fn({},e,(o=s,(r=i)in(n={})?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,n))},{});return["family","src"].forEach(function(e){if(!t[e])throw new T.a("Missing css property in file from "+c+': "'+ee.h[e]+'"')}),t}function Un(e,t){var n,r,o,a="string"==typeof(n=e)&&Object(w.a)(Object.keys(an),function(e){return e===n})||null;if(!a||(r=t,(o=Xt[a])&&!Zt(r,o))){var i="string"==typeof e?e:void 0===e?"undefined":Yn(e);throw new T.a("A valid Element name must be provided. Valid Elements are:\n  "+Object.keys(an).filter(function(e){return!an[e].beta}).join(", ")+"; you passed: "+i+".")}}var Hn,zn=function(r){return Bn({url:r,method:"GET"}).then(function(e){return e.responseText}).then(function(e){return function(e,t){var n=e.match(/@font-face[ ]?{[^}]*}/g);if(!n)throw new T.a("No @font-face rules found in file from "+t);return n}(e,r).map(function(e){var t,n=function(e,t){var n=e.replace(/\/\*.*\*\//g,"").trim(),r=(n.length&&/;$/.test(n)?n:n+";").match(/((([^;(]*\([^()]*\)[^;)]*)|[^;]+)+)(?=;)/g);if(!r)throw new T.a("Found @font-face rule containing no valid font-properties in file from "+t);return r}((t=e.match(/@font-face[ ]?{([^}]*)}/))?t[1]:"",r);return qn(n,r)})})},Gn=(Hn=["hu","mt","tr","zh-HK","zh-TW"],function(e,t){return Zt(t,$t.stripe_js_beta_locales)||-1===Hn.indexOf(e)?e:"auto"}),Yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wn=function(e,t,n){var r,o=0<arguments.length&&void 0!==e?e:"1.2em",a=1<arguments.length&&void 0!==t?t:"14px",i=1===(r=(2<arguments.length&&void 0!==n?n:"0").split(" ").map(function(e){return parseInt(e.trim(),10)})).length||2===r.length?2*r[0]:3===r.length||4===r.length?r[0]+r[2]:0;if("string"==typeof o&&/^[0-9.]+px$/.test(o))return parseFloat(o.toString().replace(/[^0-9.]/g,""))+i+"px";var s=parseFloat(o.toString().replace(/[^0-9.]/g,"")),c=parseFloat("14px".replace(/[^0-9.]/g,"")),u=parseFloat(a.toString().replace(/[^0-9.]/g,"")),l=void 0;if("string"==typeof a&&/^(\d+|\d*\.\d+)px$/.test(a))l=u;else if("string"==typeof a&&/^(\d+|\d*\.\d+)em$/.test(a))l=u*c;else if("string"==typeof a&&/^(\d+|\d*\.\d+)%$/.test(a))l=u/100*c;else{if("string"!=typeof a||!/^[\d.]+$/.test(a)&&!/^\d*\.(px|em|%)$/.test(a))return"100%";l=c}var p=s*l+i+"px";return/^[0-9.]+px$/.test(p)?p:"100%"},Kn=m(13),Vn=function(e,n){return e.reduce(function(e,t){return e.then(function(e){return"SATISFIED"===e.type?e:t().then(function(e){return n(e)?{type:"SATISFIED",value:e}:{type:"UNSATISFIED"}})})},ae.a.resolve({type:"UNSATISFIED"}))},Jn=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$n={success:"success",fail:"fail",invalid_shipping_address:"invalid_shipping_address"},Xn={shipping:"shipping",delivery:"delivery",pickup:"pickup"},Qn=Jn({success:"success"},{fail:"fail",invalid_payer_name:"invalid_payer_name",invalid_payer_email:"invalid_payer_email",invalid_payer_phone:"invalid_payer_phone",invalid_shipping_address:"invalid_shipping_address"}),Zn={merchantCapabilities:["supports3DS"],displayItems:[]};function er(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function tr(e){if(window.ApplePaySession)try{return window.ApplePaySession.supportsVersion(e)}catch(e){return}}var nr=Q({amount:function(e,t){return L(!0)(e,t)},label:C,pending:P(N)}),rr=Q({amount:D,label:C,pending:P(N)}),or=Q({amount:D,label:C,pending:P(N),id:R(C,function(){return re("shippingOption")}),detail:R(C,function(){return""})}),ar=I.apply(void 0,er(Object.keys(Xn))),ir=Q({origin:C,name:C}),sr=Q({displayItems:P(F(rr)),shippingOptions:P(q("id")(F(or))),wallets:P(F($)),total:nr,requestShipping:P(N),requestPayerName:P(N),requestPayerEmail:P(N),requestPayerPhone:P(N),shippingType:P(ar),currency:J,country:V,jcbEnabled:P(N),__billingDetailsEmailOverride:P(C),__minApplePayVersion:P(M),__merchantDetails:P(ir),__skipGooglePayInPaymentRequest:P(N),__isCheckout:P(N)}),cr=X({currency:P(J),displayItems:P(F(rr)),shippingOptions:P(q("id")(F(or))),total:P(nr)}),ur=Q({displayItems:P(F(rr)),shippingOptions:P(q("id")(F(or))),total:P(nr),status:function(e,t){return I.apply(void 0,er(Object.keys($n)))(-1!==["invalid_payer_name","invalid_payer_email","invalid_payer_phone"].indexOf(e)?"fail":e,t)}}),lr=I.apply(void 0,er(Object.keys(Qn))),pr=function(e){return window.ApplePaySession?["APPLE_PAY"]:Zt(e,$t.google_pay_beta_2)?["GOOGLE_PAY"]:Zt(e,$t.google_pay_beta_1)?["GOOGLE_PAY","BROWSER"]:["BROWSER"]},dr=function(e,t){var n=[];return window.ApplePaySession?r(e,i.applePay)&&n.push("APPLE_PAY"):(Zt(t,$t.google_pay_beta_1)&&r(e,i.googlePay)&&n.push("GOOGLE_PAY"),r(e,i.browserCard)&&n.push("BROWSER")),n},fr=2,mr=Object(Xe.b)(function(e){return window.ApplePaySession.canMakePaymentsWithActiveCard(e)}),hr=function(n,r,o,a,e){var t=4<arguments.length&&void 0!==e?e:fr,i=Math.max(fr,t);if(window.ApplePaySession){if(function(){try{return window.location.origin===window.top.location.origin}catch(e){return!1}}()){if(window.ApplePaySession.supportsVersion(i)){var s="merchant."+(r?[n,r]:[n]).join(".")+".stripe";return mr(s).then(function(e){var t;return a("pr.apple_pay.can_make_payment_native_response",{available:e}),o&&!e&&window.console&&(t=r?"or stripeAccount parameter ("+r+") ":"",window.console.warn("Either you do not have a card saved to your Wallet or the current domain ("+n+") "+t+"is not registered for Apple Pay. Visit https://dashboard.stripe.com/account/apple_pay to register this domain.")),e})}return o&&window.console&&window.console.warn("This version of Safari does not support ApplePay JS version "+i+"."),ae.a.resolve(!1)}return ae.a.resolve(!1)}return ae.a.resolve(!1)};function _r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function yr(e,t){var n="US"===e||t?["discover","diners","jcb"].concat(Er):Er;return-1!==Sr.indexOf(e)?["amex"].concat(_r(n)):n}function br(e,t){var n,r={unitSize:1/(n=Pr[t.toLowerCase()]||100),fractionDigits:Math.ceil(Math.log(n)/Math.log(10))};return(e*r.unitSize).toFixed(r.fractionDigits)}var vr,gr,wr,Er=["mastercard","visa"],Sr=["AT","AU","BE","CA","CH","DE","DK","EE","ES","FI","FR","GB","GR","HK","IE","IT","JP","LT","LU","LV","MX","NL","NO","NZ","PL","PT","SE","SG","US"],Pr={bif:1,clp:1,djf:1,gnf:1,jpy:1,kmf:1,krw:1,mga:1,pyg:1,rwf:1,vnd:1,vuv:1,xaf:1,xof:1,xpf:1,bhd:1e3,jod:1e3,kwd:1e3,omr:1e3,tnd:1e3},Or=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function kr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ar(e,t){return{amount:br(e.amount,t.currency),label:e.label,type:e.pending?"pending":"final"}}function Tr(e,t){return new window.ApplePayError(e,t)}function Ir(t){return function(e){return e[t]&&"string"==typeof e[t]?e[t].toUpperCase():null}}var jr,Cr=(kr(vr={},Qn.success,0),kr(vr,Qn.fail,1),kr(vr,Qn.invalid_payer_name,2),kr(vr,Qn.invalid_shipping_address,3),kr(vr,Qn.invalid_payer_phone,4),kr(vr,Qn.invalid_payer_email,4),vr),Rr=(kr(gr={},Qn.success,function(){return null}),kr(gr,Qn.fail,function(){return null}),kr(gr,Qn.invalid_payer_name,function(){return Tr("billingContactInvalid","name")}),kr(gr,Qn.invalid_shipping_address,function(){return Tr("shippingContactInvalid","postalAddress")}),kr(gr,Qn.invalid_payer_phone,function(){return Tr("shippingContactInvalid","phoneNumber")}),kr(gr,Qn.invalid_payer_email,function(){return Tr("shippingContactInvalid","emailAddress")}),gr),Nr=(kr(wr={},Xn.pickup,"storePickup"),kr(wr,Xn.shipping,"shipping"),kr(wr,Xn.delivery,"delivery"),wr),Mr={total:function(e){return Ar(e.total,e)},lineItems:function(t){return t.displayItems?t.displayItems.map(function(e){return Ar(e,t)}):[]},shippingMethods:function(r){return r.shippingOptions?r.shippingOptions.map(function(e){return n=r,{amount:br((t=e).amount,n.currency),label:t.label,detail:t.detail,identifier:t.id};var t,n}):[]}},xr={shippingType:function(e){var t=e.shippingType;if(!t)return null;var n=Nr[t];if(void 0!==n)return n;throw new T.a("Invalid value for shippingType: "+t)},requiredBillingContactFields:function(e){return e.requestPayerName?["postalAddress"]:null},requiredShippingContactFields:function(e){var t=[];return e.requestShipping&&t.push("postalAddress"),e.requestPayerEmail&&t.push("email"),e.requestPayerPhone&&t.push("phone"),t.length?t:null},countryCode:Ir("country"),currencyCode:Ir("currency"),merchantCapabilities:(jr="merchantCapabilities",function(e){return e[jr]||null}),supportedNetworks:function(e){var t,n,r=(t=e.country,n=e.jcbEnabled||!1,yr(t,n).reduce(function(e,t){return"mastercard"===t?[].concat(_r(e),["masterCard"]):"diners"===t?e:[].concat(_r(e),[t])},[]));return tr(4)&&r.push("maestro"),r}},Lr={status:function(e){var t=Cr[e.status];return tr(3)&&1<t?1:t},error:function(e){return tr(3)?Rr[e.status]():null}},Dr=Or({},Mr,xr),Br=Or({},Mr,Lr),Fr=function(e){var r=Or({},Zn,e);return Object.keys(Dr).reduce(function(e,t){var n=(0,Dr[t])(r);return null!==n?Or({},e,kr({},t,n)):e},{})},qr=function(r){return Object.keys(Br).reduce(function(e,t){var n=(0,Br[t])(r);return null!==n?Or({},e,kr({},t,n)):e},{})};function Ur(e){return"string"==typeof e?e:null}function Hr(e){return e?[e.givenName,e.familyName].filter(function(e){return e&&"string"==typeof e}).join(" "):null}var zr=function(e){var t=e.addressLines,n=e.countryCode,r=e.postalCode,o=e.administrativeArea,a=e.locality,i=e.phoneNumber,s=Ur(n);return{addressLine:Array.isArray(t)?t.reduce(function(e,t){return"string"==typeof t?[].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e),[t]):e},[]):[],country:s?s.toUpperCase():"",postalCode:Ur(r)||"",recipient:Hr(e)||"",region:Ur(o)||"",city:Ur(a)||"",phone:Ur(i)||"",sortingCode:"",dependentLocality:"",organization:""}},Gr=function(e,t){var n=e.identifier,r=e.label;return t.filter(function(e){return e.id===n&&e.label===r})[0]},Yr=function(e,t){var n,r,o=e.shippingContact,a=e.shippingMethod,i=e.billingContact;return{shippingOption:a&&t.shippingOptions&&t.shippingOptions.length?Gr(a,t.shippingOptions):null,shippingAddress:o?zr(o):null,payerEmail:(r=o)?Ur(r.emailAddress):null,payerPhone:(n=o)?Ur(n.phoneNumber):null,payerName:Hr(i),walletName:"applePay",methodName:"apple-pay"}},Wr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Kr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var Jr={austria:"AT",sterreich:"AT",csterreich:"AT",au:"AU",australia:"AU",belgium:"BE",br:"BR",brasil:"BR",brazil:"BR",ca:"CA",canada:"CA",ch:"CH",schweiz:"CH",switzerland:"CH",china:"CN",czechrepublic:"CZ",de:"DE",deutschland:"DE",germany:"DE",danmark:"DK",denmark:"DK",es:"ES",espaa:"ES",spain:"ES",finland:"FI",suomi:"FI",fr:"FR",hk:"HK",hongkong:"HK",england:"GB",gb:"GB",uk:"GB",unitedkingdom:"GB",scotland:"GB",wales:"GB",it:"IT",italy:"IT",italia:"IT",japan:"JP",lietuva:"LT",luxembourg:"LU",netherlands:"NL",nederland:"NL",norway:"NO",poland:"PL",polska:"PL",russia:"RU",saudiarabia:"SA",se:"SE",sweden:"SE",sverige:"SE",singapore:"SG",us:"US",usa:"US",unitedstatesofamerica:"US",unitedstates:"US",estadosunidos:"US"},$r=function(e,t){return e&&"object"===(void 0===e?"undefined":Vr(e))?t(e):null};function Xr(e){var s=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Xr),this._onEvent=function(){},this.setEventHandler=function(e){s._onEvent=e},this.canMakePayment=function(){return hr(window.location.hostname,s._authentication.accountId,_(s._authentication.apiKey)===c.test,s._report,s._minimumVersion)},this.update=function(e){s._initialPaymentRequest=It(s._paymentRequestOptions,e),s._initializeSessionState()},this.show=function(){s._initializeSessionState();var e=void 0;try{e=new window.ApplePaySession(s._minimumVersion,Fr(s._paymentRequestOptions))}catch(e){throw"Must create a new ApplePaySession from a user gesture handler."===e.message?new T.a("show() must be called from a user gesture handler (such as a click handler, after the user clicks a button)."):e}s._privateSession=e,s._setupSession(e,s._usesButtonElement()),e.begin(),s._isShowing=!0},this.abort=function(){s._privateSession&&s._privateSession.abort()},this._warn=function(e){},this._report=function(e,t){s._controller.report(e,Wr({},t,{backingLibrary:"APPLE_PAY",usesButtonElement:s._usesButtonElement()}))},this._validateMerchant=function(t,n){return function(e){s._controller.action.createApplePaySession({data:{validation_url:e.validationURL,domain_name:window.location.hostname,display_name:s._paymentRequestOptions.total.label},usesButtonElement:n}).then(function(e){if(s._isShowing)switch(e.type){case"object":t.completeMerchantValidation(JSON.parse(e.object.session));break;case"error":s._handleValidationError(t)(e.error);break;default:Object(h.a)(e)}},s._handleValidationError(t))}},this._handleValidationError=function(n){return function(e){s._report("error.pr.apple_pay.session_creation_failed",{error:e}),n.abort();var t=e.message;"string"==typeof t&&s._controller.warn(t)}},this._paymentAuthorized=function(a){return function(e){var o=e.payment,t=s._usesButtonElement()?ee.b.paymentRequestButton:null;s._controller.action.tokenizeWithData({type:"apple_pay",elementName:t,tokenData:Wr({},o,{billingContact:$r(o.billingContact,s._normalizeContact)}),mids:s._mids}).then(function(e){var t,n,r;"error"===e.type?(a.completePayment(window.ApplePaySession.STATUS_FAILURE),s._report("error.pr.create_token_failed",{error:e.error})):(t=$r(o.shippingContact,s._normalizeContact),n=$r(o.billingContact,s._normalizeContact),t&&s._paymentRequestOptions.requestShipping&&!t.countryCode&&a.completePayment(window.ApplePaySession.STATUS_INVALID_SHIPPING_POSTAL_ADDRESS),r=Yr({shippingContact:t,billingContact:n},s._paymentRequestOptions),s._onToken(a)(Wr({},r,{shippingOption:s._privateShippingOption,token:e.object})))})}},this._normalizeContact=function(e){if(e.country&&"string"==typeof e.country){var t=e.country.toLowerCase().replace(/[^a-z]+/g,""),n=void 0;return e.countryCode?"string"==typeof e.countryCode&&(n=e.countryCode.toUpperCase()):(n=Jr[t])||s._report("warn.pr.apple_pay.missing_country_code",{country:e.country}),Wr({},e,{countryCode:n})}return e},this._onToken=function(t){return function(e){s._onEvent({type:"paymentresponse",payload:Wr({},e,{complete:ce(s._completePayment(t))})})}},this._completePayment=function(o){return function(e){s._paymentRequestOptions=It(s._paymentRequestOptions,{status:e});var t=qr(s._paymentRequestOptions),n=t.status,r=t.error;s._isShowing&&(r?o.completePayment({status:n,errors:[r]}):o.completePayment(n)),(0===n||1===n&&null==r)&&(s._isShowing=!1,s._onEvent&&s._onEvent({type:"close"}))}},this._shippingContactSelected=function(t){return function(e){s._onEvent({type:"shippingaddresschange",payload:{shippingAddress:zr(s._normalizeContact(e.shippingContact)),updateWith:ce(s._completeShippingContactSelection(t))}})}},this._completeShippingContactSelection=function(i){return function(e){s._paymentRequestOptions=It(s._paymentRequestOptions,e),s._paymentRequestOptions.shippingOptions&&s._paymentRequestOptions.shippingOptions.length&&(s._privateShippingOption=s._paymentRequestOptions.shippingOptions[0]);var t=qr(s._paymentRequestOptions),n=t.status,r=t.shippingMethods,o=t.total,a=t.lineItems;i.completeShippingContactSelection(n,r,o,a)}},this._shippingMethodSelected=function(n){return function(e){var t;s._paymentRequestOptions.shippingOptions&&(t=Gr(e.shippingMethod,s._paymentRequestOptions.shippingOptions),s._privateShippingOption=t,s._onEvent({type:"shippingoptionchange",payload:{shippingOption:t,updateWith:ce(s._completeShippingMethodSelection(n))}}))}},this._completeShippingMethodSelection=function(a){return function(e){s._paymentRequestOptions=It(s._paymentRequestOptions,e);var t=qr(s._paymentRequestOptions),n=t.status,r=t.total,o=t.lineItems;a.completeShippingMethodSelection(n,r,o)}};var t=e.controller,n=e.authentication,r=e.mids,o=e.options,a=e.usesButtonElement,i=e.listenerRegistry;this._controller=t,this._authentication=n,this._mids=r,this._minimumVersion=o.__minApplePayVersion||fr,this._usesButtonElement=a,this._listenerRegistry=i,this._initialPaymentRequest=o,this._isShowing=!1,this._initializeSessionState()}var Qr=(function(e,t,n){return t&&Kr(e.prototype,t),n&&Kr(e,n),e}(Xr,[{key:"_initializeSessionState",value:function(){this._paymentRequestOptions=Wr({},Zn,this._initialPaymentRequest,{status:Qn.success}),this._privateSession=null,this._privateShippingOption=null;var e=this._paymentRequestOptions.shippingOptions;e&&e.length&&(this._privateShippingOption=e[0])}},{key:"_setupSession",value:function(e,t){var n=this;this._listenerRegistry.addEventListener(e,"validatemerchant",ce(this._validateMerchant(e,t))),this._listenerRegistry.addEventListener(e,"paymentauthorized",ce(this._paymentAuthorized(e))),this._listenerRegistry.addEventListener(e,"cancel",ce(function(){n._isShowing=!1,n._onEvent({type:"cancel"}),n._onEvent({type:"close"})})),this._listenerRegistry.addEventListener(e,"shippingcontactselected",ce(this._shippingContactSelected(e))),this._listenerRegistry.addEventListener(e,"shippingmethodselected",ce(this._shippingMethodSelected(e)))}}]),Xr),Zr=null;var eo=function(e){return null!==Zr?ae.a.resolve(Zr):e().then(function(e){return Zr=e})},to=function(){return!(!ze&&!Ge)},no=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var ro=function e(t){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._mids=null,this._frame=null,this._initFrame=function(e){var t=a._controller.createHiddenFrame(ee.c.PAYMENT_REQUEST_GOOGLE_PAY,{authentication:a._authentication,mids:a._mids,origin:a._origin});t.send({action:"stripe-pr-initialize",payload:{data:e}}),a._initFrameEventHandlers(t),a._frame=t},this._initFrameEventHandlers=function(o){o._on("pr-cancel",function(){a._onEvent({type:"cancel"})}),o._on("pr-close",function(){a._backdrop.fadeOut().then(function(){a._backdrop.unmount()}),a._onEvent({type:"close"})}),o._on("pr-error",function(e){a._onEvent({type:"error",payload:{errorMessage:e.errorMessage,errorCode:e.errorCode}})}),o._on("pr-callback",function(e){var t=e.event,n=e.options,r=e.nonce;switch(t){case"paymentresponse":a._handlePaymentResponse(o,n,r);break;case"shippingaddresschange":a._handleShippingAddressChange(o,n,r);break;case"shippingoptionchange":a._handleShippingOptionChange(o,n,r);break;default:throw new Error("Unexpected event name: "+t)}})},this._handlePaymentResponse=function(t,e,n){a._onEvent({type:"paymentresponse",payload:no({},e,{complete:function(e){t.send({action:"stripe-pr-callback-complete",payload:{nonce:n,data:{status:e}}})}})})},this._handleShippingAddressChange=function(t,e,n){a._onEvent({type:"shippingaddresschange",payload:no({},e,{updateWith:function(e){t.send({action:"stripe-pr-callback-complete",payload:{nonce:n,data:e}})}})})},this._handleShippingOptionChange=function(t,e,n){a._onEvent({type:"shippingoptionchange",payload:no({},e,{updateWith:function(e){t.send({action:"stripe-pr-callback-complete",payload:{nonce:n,data:e}})}})})},this.setEventHandler=function(e){a._onEvent=e},this.canMakePayment=function(){if(!to())return ae.a.resolve(!1);if(!a._frame)throw new Error("Frame not initialized.");var e=a._frame;return eo(function(){return e.action.checkCanMakePayment().then(function(e){return!0===e.available})})},this.show=function(){a._frame&&(a._frame.send({action:"stripe-pr-show",payload:{data:{usesButtonElement:a._usesButtonElement()}}}),a._backdrop.mount(),a._backdrop.show(),a._backdrop.fadeIn())},this.update=function(e){a._frame&&a._frame.send({action:"stripe-pr-update",payload:{data:e}})},this.abort=function(){a._frame&&a._frame.send({action:"stripe-pr-abort",payload:{}})},this._controller=t.controller,this._authentication=t.authentication,this._mids=t.mids,this._origin=t.origin,this._usesButtonElement=t.usesButtonElement,this._backdrop=new nt({lockScrolling:!1,lockFocus:!0,lockFocusOn:null,listenerRegistry:t.listenerRegistry}),to()&&this._controller&&(this._controller.action.fetchLocale({locale:"auto"}),this._initFrame(t.options))},oo=function(){if(!window.PaymentRequest)return null;if(/CriOS\/59/.test(navigator.userAgent))return null;if(/.*\(.*; wv\).*Chrome\/(?:53|54)\.\d.*/g.test(navigator.userAgent))return null;if(He)return null;var e=window.PaymentRequest;return e.prototype.canMakePayment||(e.prototype.canMakePayment=function(){return ae.a.resolve(!1)}),e}(),ao=null,io=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};var so=function(){var a=this;this._onEvent=function(){},this.setEventHandler=function(e){a._onEvent=e},this.canMakePayment=function(){return e=a._prFrame,_(a._authentication.apiKey),c.test,null!==ao?ae.a.resolve(ao):oo&&e?e.action.checkCanMakePayment().then(function(e){var t=e.available;return ao=!0===t}):ae.a.resolve(!1);var e},this.update=function(e){var t=a._prFrame;t&&t.send({action:"stripe-pr-update",payload:{data:e}})},this.show=function(){if(!a._prFrame)throw new T.a("Payment Request is not available in this browser.");a._prFrame.send({action:"stripe-pr-show",payload:{data:{usesButtonElement:a._usesButtonElement()}}})},this.abort=function(){a._prFrame&&a._prFrame.send({action:"stripe-pr-abort",payload:{}})},this._setupPrFrame=function(o,e){o.send({action:"stripe-pr-initialize",payload:{data:e}}),o._on("pr-cancel",function(){a._onEvent({type:"cancel"})}),o._on("pr-close",function(){a._onEvent({type:"close"})}),o._on("pr-error",function(e){a._onEvent({type:"error",payload:{errorMessage:e.message||"",errorCode:e.code||""}})}),o._on("pr-callback",function(e){var t=e.event,n=e.nonce,r=e.options;switch(t){case"token":a._onEvent({type:"paymentresponse",payload:io({},r,{complete:function(e){o.send({action:"stripe-pr-callback-complete",payload:{data:{status:e},nonce:n}})}})});break;case"shippingaddresschange":a._onEvent({type:"shippingaddresschange",payload:{shippingAddress:r.shippingAddress,updateWith:function(e){o.send({action:"stripe-pr-callback-complete",payload:{nonce:n,data:e}})}}});break;case"shippingoptionchange":a._onEvent({type:"shippingoptionchange",payload:{shippingOption:r.shippingOption,updateWith:function(e){o.send({action:"stripe-pr-callback-complete",payload:{nonce:n,data:e}})}}});break;default:throw new Error("Unexpected event from PaymentRequest inner: "+t)}})}},co=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),so.call(this);var n,r=t.authentication,o=t.controller,a=t.mids,i=t.origin,s=t.usesButtonElement,c=t.options;this._authentication=r,this._controller=o,this._usesButtonElement=s,oo&&"https:"===window.location.protocol?(this._controller.action.fetchLocale({locale:"auto"}),n=this._controller.createHiddenFrame(ee.c.PAYMENT_REQUEST_BROWSER,{authentication:r,mids:a,origin:i}),this._setupPrFrame(n,c),this._prFrame=n):this._prFrame=null},uo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function lo(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var po=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(fo,le),fo);function fo(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,fo);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(fo.__proto__||Object.getPrototypeOf(fo)).call(this));yo.call(t),t._controller=e.controller,t._authentication=e.authentication,t._mids=e.mids,t._listenerRegistry=e.listenerRegistry,t._report("pr.options",{options:e.rawOptions});var n=Z(sr,e.rawOptions||{},"paymentRequest()"),r=n.value;if(n.warnings.forEach(function(e){return t._warn(e)}),r.__billingDetailsEmailOverride&&r.requestPayerEmail)throw new T.a("When providing `__billingDetailsEmailOverride`, `requestPayerEmail` has to be `false` so that the customer is not prompted for their email in the payment sheet.");return r.wallets?(t._queryStrategy=dr(r.wallets,e.betas),t._isCustomizedQueryStrategy=!0):t._queryStrategy=e.queryStrategyOverride||pr(e.betas),t._report("pr.query_strategy",{queryStrategy:t._queryStrategy}),t._initialOptions=uo({},r,{__skipGooglePayInPaymentRequest:-1!==t._queryStrategy.indexOf("GOOGLE_PAY")}),Zt(e.betas,$t.google_pay_beta_2)&&(t._shouldTimeout=!1),t._initBackingLibraries(t._initialOptions),t}var mo,ho,_o,yo=function(){var f=this;this._shouldTimeout=!0,this._usedByButtonElement=null,this._showCalledByButtonElement=!1,this._isShowing=!1,this._backingLibraries={APPLE_PAY:null,GOOGLE_PAY:null,BROWSER:null},this._activeBackingLibraryName=null,this._activeBackingLibrary=null,this._isCustomizedQueryStrategy=!1,this._canMakePaymentAvailability={APPLE_PAY:null,GOOGLE_PAY:null,BROWSER:null},this._canMakePaymentResolved=!1,this._validateUserOn=function(e,t){"string"==typeof e&&("source"===e&&f._hasRegisteredListener("paymentmethod")||"paymentmethod"===e&&f._hasRegisteredListener("source"))&&(f._report("pr.double_callback_registration"),f._controller.warn("Do not register event listeners for both `source` or `paymentmethod`. Only one of them will succeed."))},this._report=function(e,t){f._controller.report(e,uo({},t,{activeBackingLibrary:f._activeBackingLibraryName,usesButtonElement:f._usedByButtonElement||!1}))},this._warn=function(e){f._controller.warn(e)},this._registerElement=function(){f._usedByButtonElement=!0},this._elementShow=function(){f._showCalledByButtonElement=!0,f.show()},this._initBackingLibraries=function(n){f._queryStrategy.forEach(function(e){var t={controller:f._controller,authentication:f._authentication,mids:f._mids,origin:window.location.origin,options:n,usesButtonElement:function(){return!0===f._usedByButtonElement},listenerRegistry:f._listenerRegistry};switch(e){case"APPLE_PAY":f._backingLibraries.APPLE_PAY=new Qr(t),f._backingLibraries.APPLE_PAY.setEventHandler(f._handleInternalEvent);break;case"GOOGLE_PAY":f._backingLibraries.GOOGLE_PAY=new ro(t),f._backingLibraries.GOOGLE_PAY.setEventHandler(f._handleInternalEvent);break;case"BROWSER":f._backingLibraries.BROWSER=new co(t),f._backingLibraries.BROWSER.setEventHandler(f._handleInternalEvent);break;default:Object(h.a)(e)}})},this._handleInternalEvent=function(e){switch(e.type){case"paymentresponse":f._emitPaymentResponse(e.payload);break;case"error":f._report("error.pr.internal_error",{error:e.payload});break;case"close":f._isShowing=!1;break;default:f._emitExternalEvent(e)}},this._emitExternalEvent=function(i){switch(i.type){case"cancel":f._emit("cancel");break;case"shippingoptionchange":case"shippingaddresschange":var s=i.type,c=i.payload,u=null,l=!1,p=!1,e=function(e){if(p&&l)return f._report("pr.update_with_called_after_timeout",{event:s}),void f._controller.warn("Call to updateWith() was ignored because it has already timed out. Please ensure that updateWith is called within 30 seconds.");if(l)return f._report("pr.update_with_double_call",{event:s}),void f._controller.warn("Call to updateWith() was ignored because it has already been called. Do not call updateWith more than once.");u&&clearTimeout(u),l=!0,f._report("pr.update_with",{event:s,updates:e});var t=Z(ur,e||{},s+" callback"),n=t.value;t.warnings.forEach(function(e){return f._controller.warn(e)});var r=n,o=!1;f._initialOptions.__isCheckout&&"APPLE_PAY"===f._activeBackingLibraryName&&n.shippingOptions&&1===n.shippingOptions.length&&0===n.shippingOptions[0].amount&&(n.shippingOptions,r=lo(n,["shippingOptions"]),o=!0);var a=n.shippingOptions||f._initialOptions.shippingOptions;if(!(o||"shippingaddresschange"!==i.type||n.status!==Qn.success||a&&a.length))throw new T.a("When requesting shipping information, you must specify shippingOptions once a shipping address is selected.\nEither provide shippingOptions in stripe.paymentRequest(...) or listen for the shippingaddresschange event and provide shippingOptions to the updateWith callback there.");c.updateWith(r)};f._hasRegisteredListener(i.type)?(u=setTimeout(function(){p=!0,f._report("pr.update_with_timed_out",{event:s}),f._controller.warn('Timed out waiting for a call to updateWith(). If you listen to "'+i.type+'" events, then you must call event.updateWith in the "'+i.type+'" handler within 30 seconds.'),e({status:"fail"})},29900),f._emit(s,uo({},c,{updateWith:e}))):e({status:"success"});break;case"token":case"source":case"paymentmethod":var t=i.type,r=i.payload,o=null,a=!1,d=!1,n=function(e){if(a&&d)return f._report("pr.complete_called_after_timeout"),void f._controller.warn("Call to complete() was ignored because it has already timed out. Please ensure that complete is called within 30 seconds.");if(d)return f._report("pr.complete_double_call"),void f._controller.warn("Call to complete() was ignored because it has already been called. Do not call complete more than once.");o&&clearTimeout(o),d=!0;var t=Z(lr,e,"status for PaymentRequest completion"),n=t.value;t.warnings.forEach(function(e){return f._controller.warn(e)}),r.complete(n)},o=setTimeout(function(){a=!0,f._report("pr.complete_timed_out"),f._controller.warn('Timed out waiting for a call to complete(). Once you have processed the payment in the "'+i.type+'" handler, you must call event.complete within 30 seconds.'),n("fail")},29900);f._emit(t,uo({},r,{complete:n}));break;default:Object(h.a)(i)}},this._maybeEmitPaymentResponse=function(e){f._isShowing&&f._emitExternalEvent(e)},this._emitPaymentResponse=function(e){f._report("pr.payment_authorized");var t=e.token,n=lo(e,["token"]),r=n.payerEmail,o=n.payerPhone,a=n.complete,i=f._showCalledByButtonElement?ee.b.paymentRequestButton:null;f._hasRegisteredListener("token")&&f._maybeEmitPaymentResponse({type:"token",payload:e}),f._hasRegisteredListener("source")&&f._controller.action.createSourceWithData({elementName:i,type:"card",sourceData:{token:t.id,owner:{email:f._initialOptions.__billingDetailsEmailOverride||r,phone:o}},mids:null}).then(function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?a("invalid_payer_email"):(f._report("fatal.pr.token_to_source_failed",{error:e.error,token:t.id}),a("fail")):f._maybeEmitPaymentResponse({type:"source",payload:uo({},n,{source:e.object})})}),f._hasRegisteredListener("paymentmethod")&&f._controller.action.createPaymentMethodWithData({elementName:i,type:"card",paymentMethodData:{card:{token:t.id},billing_details:{email:f._initialOptions.__billingDetailsEmailOverride||r,phone:o}},mids:null}).then(function(e){"error"===e.type?e.error.code&&"email_invalid"===e.error.code?a("invalid_payer_email"):(f._report("fatal.pr.token_to_payment_method_failed",{error:e.error,token:t.id}),a("fail")):f._maybeEmitPaymentResponse({type:"paymentmethod",payload:uo({},n,{paymentMethod:e.object})})})},this._canMakePaymentForBackingLibrary=function(o){var e=f._backingLibraries[o];if(!e)throw new Error("Unexpectedly calling canMakePayment on uninitialized backing library.");return ae.a.race([new ae.a(function(e){f._shouldTimeout&&setTimeout(e,1e4)}).then(function(){return!1}),e.canMakePayment().then(function(e){return!!e})]).then(function(e){var t,n,r;return f._canMakePaymentAvailability=uo({},f._canMakePaymentAvailability,(r=e,(n=o)in(t={})?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t)),{backingLibraryName:o,available:e}})},this._constructCanMakePaymentResponse=function(){return uo({applePay:!!f._canMakePaymentAvailability.APPLE_PAY},-1!==f._queryStrategy.indexOf("GOOGLE_PAY")?{googlePay:!!f._canMakePaymentAvailability.GOOGLE_PAY}:{})},this.canMakePayment=ce(function(){if(f._report("pr.can_make_payment"),f._canMakePaymentResolved){var e=null!==f._activeBackingLibrary?f._constructCanMakePaymentResponse():null;return f._report("pr.can_make_payment_response",{response:e,cached:!0}),ae.a.resolve(e)}if("https:"!==window.location.protocol)return f._controller.warn("If you are testing the PaymentRequest button (to accept Apple Pay, Google Pay, etc.) you must serve this page over HTTPS as it will not work over HTTP. Please read https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-prerequisites for more details."),f._canMakePaymentResolved=!0,ae.a.resolve(null);if(f._isCustomizedQueryStrategy&&window.self!==window.top)return f._controller.warn("You must use Stripe PaymentRequest in the top level frame if you specify which wallets are available."),f._canMakePaymentResolved=!0,ae.a.resolve(null);var t=f._queryStrategy.map(function(e){return function(){return f._canMakePaymentForBackingLibrary(e)}}),r=new Jt.a;return Vn(t,function(e){var t=e.backingLibraryName,n=e.available;return n&&(f._activeBackingLibraryName=t,f._activeBackingLibrary=f._backingLibraries[t]),n}).then(function(e){var t=new Jt.a;f._canMakePaymentResolved=!0;var n=null;return"SATISFIED"===e.type&&(n=f._constructCanMakePaymentResponse()),f._report("pr.can_make_payment_response",{response:n,cached:!1,duration:r.getElapsedTime(t)}),n})}),this.update=ce(function(e){if(f._isShowing)throw f._report("pr.update_called_while_showing"),new T.a("You cannot update Payment Request options while the payment sheet is showing.");f._report("pr.update",{updates:e});var t=Z(cr,e,"PaymentRequest update()"),n=t.value;t.warnings.forEach(function(e){return f._warn(e)}),f._activeBackingLibrary&&f._activeBackingLibrary.update(n)}),this.show=ce(function(){if(f._usedByButtonElement&&!f._showCalledByButtonElement&&(f._report("pr.show_called_with_button"),f._warn("Do not call show() yourself if you are using the paymentRequestButton Element. The Element handles showing the payment sheet.")),!f._canMakePaymentResolved)throw f._report("pr.show_called_before_can_make_payment"),new T.a("You must first check the Payment Request API's availability using paymentRequest.canMakePayment() before calling show().");if(!f._activeBackingLibrary)throw f._report("pr.show_called_with_can_make_payment_false"),new T.a("Payment Request is not available in this browser.");var e=f._activeBackingLibrary;f._report("pr.show",{listeners:Object.keys(f._callbacks).sort()}),f._isShowing=!0,e.show()}),this.abort=ce(function(){var e;f._activeBackingLibrary&&(e=f._activeBackingLibrary,f._report("pr.abort"),e.abort())}),this.isShowing=function(){return f._isShowing}},bo=po,vo={base:P(B),complete:P(B),empty:P(B),invalid:P(B),paymentRequestButton:P(B)},go={classes:P(Q({base:P(C),complete:P(C),empty:P(C),focus:P(C),invalid:P(C),webkitAutofill:P(C)})),hidePostalCode:P(N),hideIcon:P(N),showIcon:P(N),style:P(Q(vo)),iconStyle:P(I("solid","default")),value:P(O(C,B)),__privateCvcOptional:P(N),__privateValue:P(O(C,B)),__privateEmitIbanValue:P(N),error:P(Q({type:C,code:P(C),decline_code:P(C),param:P(C)})),locale:U("elements()"),fonts:U("elements()"),placeholder:P(C),disabled:P(N),placeholderCountry:P(C),paymentRequest:P((mo=bo,ho="stripe.paymentRequest(...)",function(e,t){return e instanceof mo?y(e):E("a "+ho+" instance",e,t)})),supportedCountries:P(F(C)),accountHolderType:P(I("individual","company")),issuingCard:P(C)},wo=Q(go);function Eo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function So(e,t){return(n=e)!==dn.a.cardNumber&&n!==dn.a.cardExpiry&&n!==dn.a.cardCvc||!t.cl?Io[e]:fn.a.CARD_LIGHT_ELEMENT;var n}function Po(e){var t=Object(Kn.a)(e,null);return!!t&&"rtl"===t.getPropertyValue("direction")}function Oo(){var e=document.createElement("input");return e.className=yn,e.setAttribute("aria-hidden","true"),e.setAttribute("aria-label"," "),e.setAttribute("autocomplete","false"),e.maxLength=1,e.disabled=!0,Object(ie.d)(e,Co),e}function ko(){var e=Oo();return e.className=bn,e.setAttribute("tabindex","-1"),e}function Ao(){document.activeElement&&document.activeElement.blur&&document.activeElement.blur()}function To(e){switch(e.type){case"object":return Ro.push(e.object.id),{issuingCard:e.object};case"error":return{error:e.error};default:return Object(h.a)(e)}}var Io=(Eo(_o={},dn.a.card,fn.a.CARD_ELEMENT),Eo(_o,dn.a.cardNumber,fn.a.CARD_ELEMENT),Eo(_o,dn.a.cardExpiry,fn.a.CARD_ELEMENT),Eo(_o,dn.a.cardCvc,fn.a.CARD_ELEMENT),Eo(_o,dn.a.postalCode,fn.a.CARD_ELEMENT),Eo(_o,dn.a.paymentRequestButton,fn.a.PAYMENT_REQUEST_ELEMENT),Eo(_o,dn.a.iban,fn.a.IBAN_ELEMENT),Eo(_o,dn.a.idealBank,fn.a.IDEAL_BANK_ELEMENT),Eo(_o,dn.a.p24Bank,fn.a.P24_BANK_ELEMENT),Eo(_o,dn.a.auBankAccount,fn.a.AU_BANK_ACCOUNT_ELEMENT),Eo(_o,dn.a.fpxBank,fn.a.FPX_BANK_ELEMENT),Eo(_o,dn.a.issuingCardNumberDisplay,fn.a.ISSUING_CARD_NUMBER_DISPLAY_ELEMENT),Eo(_o,dn.a.issuingCardCvcDisplay,fn.a.ISSUING_CARD_CVC_DISPLAY_ELEMENT),Eo(_o,dn.a.issuingCardExpiryDisplay,fn.a.ISSUING_CARD_EXPIRY_DISPLAY_ELEMENT),Eo(_o,dn.a.epsBank,fn.a.EPS_BANK_ELEMENT),Eo(_o,dn.a.netbankingBank,fn.a.NETBANKING_BANK_ELEMENT),Eo(_o,dn.a.afterpayClearpayMessageModal,fn.a.AFTERPAY_MESSAGE_MODAL_ELEMENT),_o),jo={margin:"0",padding:"0",border:"none",display:"block",background:"transparent",position:"relative",opacity:"1"},Co={border:"none",display:"block",position:"absolute",height:"1px",top:"-1px",left:"0",padding:"0",margin:"0",width:"100%",opacity:"0",background:"transparent","pointer-events":"none","font-size":"16px"},Ro=["test_id"],No=function(e){return-1!==Ro.indexOf(e)},Mo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function xo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Lo(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function Do(e){return parseFloat(e.toFixed(1))}var Bo={base:"StripeElement",focus:"StripeElement--focus",invalid:"StripeElement--invalid",complete:"StripeElement--complete",empty:"StripeElement--empty",webkitAutofill:"StripeElement--webkit-autofill"},Fo="#faffbd";function qo(e){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,qo),this.focus=function(){if(n._isIssuingElement())throw new T.a("Cannot call focus() on an "+n._componentName+" Element.");document.activeElement&&document.activeElement.blur&&document.activeElement.blur(),n._fakeInput.focus()},this._formSubmit=function(){for(var e,t=n._component.parentElement;t&&"FORM"!==t.nodeName;)t=t.parentElement;t&&((e=document.createEvent("Event")).initEvent("submit",!0,!0),t.dispatchEvent(e))};var t=e.options,r=e.component,o=e.listenerRegistry,a=e.elementTimings,i=e.emitEvent,s=e.getParent,c=t.controller,u=t.componentName,l=t.publicOptions;this._componentName=u,this._component=r,this._controller=c,this._listenerRegistry=o,this._emitEvent=i,this._getParent=s;var p=Z(wo,l||{},"create()"),d=p.value;p.warnings.forEach(function(e){return n._controller.warn(e)});var f=d.paymentRequest,m=d.classes,h=d.issuingCard,_="paymentRequestButton"===this._componentName;if(_){if(!f)throw new T.a("You must pass in a stripe.paymentRequest object in order to use this Element.");this._paymentRequest=f,this._paymentRequest._registerElement()}if(this._isIssuingElement()){if(!h)throw new Error("You must pass in an ID to the issuingCard option in order to use this Element.");if(!No(h))throw new Error("Issuing card "+h+" has not been retrieved.")}this._createElement(t,d,a),this._classes=Bo,this._computeCustomClasses(m||{}),this._lastBackgroundColor="",this._focused=!1,this._empty=!_,this._invalid=!1,this._complete=!1,this._autofilled=!1,this._lastSubmittedAt=null}var Uo=(function(e,t,n){return t&&xo(e.prototype,t),n&&xo(e,n),e}(qo,[{key:"update",value:function(e){var t,n,r=this,o=Z(wo,e||{},"element.update()"),a=o.value;o.warnings.forEach(function(e){return r._controller.warn(e)}),a&&(t=a.classes,n=Lo(a,["classes"]),t&&(this._removeClasses(),this._computeCustomClasses(t),this._updateClasses()),this._updateFrameHeight(a),Object.keys(n).length&&(this._frame.update(n),this._secondaryFrame&&this._secondaryFrame.update(n)))}},{key:"blur",value:function(){if(this._isIssuingElement())throw new T.a("Cannot call blur() on an "+this._componentName+" Element.");this._frame.blur(),this._fakeInput.blur()}},{key:"clear",value:function(){this._frame.clear()}},{key:"unmount",value:function(){var e=this._getParent(),t=this._label;e&&(this._listenerRegistry.removeEventListener(e,"click",this.focus),this._removeClasses()),t&&(this._listenerRegistry.removeEventListener(t,"click",this.focus),this._label=null),this._secondaryFrame&&(this._secondaryFrame.unmount(),this._listenerRegistry.removeEventListener(window,"click",this._handleOutsideClick)),this._fakeInput.disabled=!0,this._frame.unmount()}},{key:"mount",value:function(){var e;if(Object(ie.b)(document,this._component)&&(this._controller.report("user_error.shadow_dom_mount",{element:this._componentName}),e=function(){throw new T.a("Elements cannot be mounted in a ShadowRoot. Please mount in the Light DOM.")},"test"===this._controller.keyMode()?e():setTimeout(e,0)),this._paymentRequest){if(!this._paymentRequest._canMakePaymentResolved)throw new T.a("For the paymentRequestButton Element, you must first check availability using paymentRequest.canMakePayment() before mounting the Element.");if(!this._paymentRequest._activeBackingLibraryName)throw new T.a("The paymentRequestButton Element is not available in the current environment.")}this._mountTimestamp=new Jt.a,this._findPossibleLabel(),this._updateClasses()}},{key:"_isIssuingElement",value:function(){return"issuingCardNumberDisplay"===this._componentName||"issuingCardCvcDisplay"===this._componentName||"issuingCardExpiryDisplay"===this._componentName}},{key:"_updateClasses",value:function(){var e=this._getParent();e&&Object(ie.f)(e,[[this._classes.base,!0],[this._classes.empty,this._empty],[this._classes.focus,this._focused],[this._classes.invalid,this._invalid],[this._classes.complete,this._complete],[this._classes.webkitAutofill,this._autofilled]])}},{key:"_removeClasses",value:function(){var e=this._getParent();e&&Object(ie.f)(e,[[this._classes.base,!1],[this._classes.empty,!1],[this._classes.focus,!1],[this._classes.invalid,!1],[this._classes.complete,!1],[this._classes.webkitAutofill,!1]])}},{key:"_findPossibleLabel",value:function(){var e=this._getParent();if(e){var t=e.getAttribute("id"),n=void 0;if(t&&(n=document.querySelector("label[for='"+t+"']")),n)this._listenerRegistry.addEventListener(e,"click",this.focus);else for(n=n||e.parentElement;n&&"LABEL"!==n.nodeName;)n=n.parentElement;n?(this._label=n,this._listenerRegistry.addEventListener(n,"click",this.focus)):this._listenerRegistry.addEventListener(e,"click",this.focus)}}},{key:"_computeCustomClasses",value:function(n){var r={};return Object.keys(n).forEach(function(e){if(!Bo[e])throw new T.a(e+" is not a customizable class name.\nYou can customize: "+Object.keys(Bo).join(", "));var t=n[e]||Bo[e];r[e]=t.replace(/\./g," ")}),this._classes=Mo({},this._classes,r),this}},{key:"_setupEvents",value:function(e){var n,p=this,a=e.stripeJsLoadTimestamp,i=e.stripeCreateTimestamp,s=e.groupCreateTimestamp,c=e.createTimestamp,u=0,r=0;this._frame._on("load",function(e){var t=e.source;u++;var n=p._getParent(),r=Po(n),o=p._paymentRequest?p._paymentRequest._activeBackingLibraryName:null;p._frame.send({action:"stripe-user-mount",payload:{timestamps:{stripeJsLoad:a.getAsPosixTime(),stripeCreate:i.getAsPosixTime(),groupCreate:s.getAsPosixTime(),create:c.getAsPosixTime(),mount:p._mountTimestamp.getAsPosixTime()},loadCount:u,matchFrame:t===p._frame._iframe.contentWindow,rtl:r,paymentRequestButtonType:o}})}),this._secondaryFrame&&(n=this._secondaryFrame)._on("load",function(e){var t=e.source;r++,n.send({action:"stripe-user-mount",payload:{timestamps:{stripeJsLoad:a.getAsPosixTime(),stripeCreate:i.getAsPosixTime(),groupCreate:s.getAsPosixTime(),create:c.getAsPosixTime(),mount:p._mountTimestamp.getAsPosixTime()},loadCount:r,matchFrame:t===n._iframe.contentWindow,rtl:!1,paymentRequestButtonType:null}})}),this._frame._on("redirectfocus",function(e){var t=e.focusDirection,n=Object(Qe.b)(p._component,t);n&&n.focus()}),this._frame._on("focus",function(){p._focused=!0,p._updateClasses()}),this._frame._on("blur",function(){p._focused=!1,p._updateClasses(),p._lastSubmittedAt&&"paymentRequestButton"===p._componentName&&(p._controller.report("payment_request_button.sheet_visible",{latency:p._lastSubmittedAt.getElapsedTime()}),p._lastSubmittedAt=null)}),this._frame._on("submit",function(){var e,t;"paymentRequestButton"===p._componentName?(p._lastSubmittedAt=new Jt.a,t=e=!1,Vt(),p._emitEvent("click",{preventDefault:function(){p._controller.report("payment_request_button.default_prevented"),e&&p._controller.warn("event.preventDefault() was called after the payment sheet was shown. Make sure to call it synchronously when handling the `click` event."),t=!0}}),!t&&p._paymentRequest&&(p._paymentRequest._elementShow(),e=!0)):(p._emitEvent("submit"),p._formSubmit())}),["ready","focus","blur","escape"].forEach(function(e){p._frame._on(e,function(){p._emitEvent(e)})}),this._frame._on("change",function(t){Vt();var n={},e=ln[p._componentName]||[];["error","value","empty","complete"].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(e)).forEach(function(e){return n[e]=t[e]}),p._emitEvent("change",n),p._empty=n.empty,p._invalid=!!n.error,p._complete=n.complete,p._updateClasses()}),this._frame._on("__privateIntegrationError",function(e){var t=e.message;p._emitEvent("__privateIntegrationError",{message:t})}),this._frame._on("dimensions",function(e){var t,n,r,o,a,i,s,c,u,l=p._getParent();!l||(t=Object(Kn.a)(l,null))&&(a=parseFloat(t.getPropertyValue("height")),n=e.height,"border-box"===t.getPropertyValue("box-sizing")&&(r=parseFloat(t.getPropertyValue("padding-top")),o=parseFloat(t.getPropertyValue("padding-bottom")),a=a-parseFloat(t.getPropertyValue("border-top"))-parseFloat(t.getPropertyValue("border-bottom"))-r-o),i=Do(a),s=Do(n),0!==a&&i<s&&p._controller.report("wrapper_height_mismatch",{height:s,outer_height:i}),c=p._component.getBoundingClientRect().height,u=Do(c),0!==c&&0!==n&&u!==s&&(p._frame.updateStyle({height:n+"px"}),p._controller.report("iframe_height_update",{height:s,calculated_height:u})))}),this._frame._on("autofill",function(){var e,t,n=p._getParent();n&&(t=(e=n.style.backgroundColor)===Fo||"rgb(250, 255, 189)"===e,p._lastBackgroundColor=t?p._lastBackgroundColor:e,n.style.backgroundColor=Fo,p._autofilled=!0,p._updateClasses())}),this._frame._on("autofill-cleared",function(){var e=p._getParent();p._autofilled=!1,e&&(e.style.backgroundColor=p._lastBackgroundColor),p._updateClasses()}),this._frame._on("update-outer-style",function(t){Object.keys(t).forEach(function(e){p._component.style.setProperty(e,t[e])})})}},{key:"_handleOutsideClick",value:function(){this._secondaryFrame&&this._secondaryFrame.send({action:"stripe-outside-click",payload:{}})}},{key:"_updateFrameHeight",value:function(e,t){var n,r,o,a,i,s,c,u,l,p,d,f=1<arguments.length&&void 0!==t&&t,m=e.style;"paymentRequestButton"===this._componentName?(r="string"==typeof(n=(m&&m.paymentRequestButton||{}).height)?n:void 0,(f||r)&&(this._frame.updateStyle({height:r||this._lastHeight||"40px"}),this._lastHeight=r||this._lastHeight)):(i=(o=m&&m.base||{}).fontSize,s=o.padding,c="string"!=typeof(a=o.lineHeight)||isNaN(parseFloat(a))?void 0:a,l="string"==typeof s?s:void 0,(u="string"==typeof i?i:void 0)&&!/^\d+(\.\d*)?px$/.test(u)&&this._controller.warn("The fontSize style you specified ("+u+") is not in px. We do not recommend using relative css units, as they will be calculated relative to our iframe's styles rather than your site's."),(f||c||u)&&(p=-1===ee.j.indexOf(this._componentName)?void 0:l||this._lastPadding,d=Wn(c||this._lastHeight,u||this._lastFontSize,p),this._frame.updateStyle({height:d}),this._lastFontSize=u||this._lastFontSize,this._lastHeight=c||this._lastHeight,this._lastPadding=p))}},{key:"_createElement",value:function(e,t,n){var r=this,o=(e.controller,e.publicOptions,e.componentName),a=e.groupId,i=Lo(e,["controller","publicOptions","componentName","groupId"]),s=(t.classes,t.paymentRequest,Lo(t,["classes","paymentRequest"])),c=this._component,u=Oo();Object(ie.d)(c,jo);var l,p,d,f=Po(document.body),m=So(o,this._controller.getFlags()),h=Mo({},i,s,{rtl:f}),_=this._controller.createElementFrame(m,o,a,h);_._on("load",function(){u.disabled=!1}),this._listenerRegistry.addEventListener(u,"focus",function(){_.focus()}),_.appendTo(c),pn[o]&&(l=pn[o].secondary,(p=this._controller.createSecondaryElementFrame(m,l,o,a,h))&&p.on&&p.on("height-change",function(e){p.updateStyle({height:e.height+"px"})}),(this._secondaryFrame=p).appendTo(c),this._listenerRegistry.addEventListener(window,"click",function(){return r._handleOutsideClick()})),c.appendChild(u),qe&&o!==ee.b.paymentRequestButton&&(d=ko(),c.appendChild(d)),this._frame=_,this._fakeInput=u,this._setupEvents(n),this._updateFrameHeight(t,!0)}}]),qo),Ho=Q({amount:M,currency:I("USD","AUD","CAD","GBP","NZD","EUR"),badgeTheme:P(I("black-on-mint","black-on-white","mint-on-black","white-on-black")),introText:P(I("In","in","Or","or","Pay","pay","Pay in","pay in")),isEligible:P(N),isCartEligible:P(N),lockupTheme:P(I("black","white","mint")),logoType:P(I("badge","lockup")),max:P(M),min:P(M),modalLinkStyle:P(I("circled-info-icon","more-info-text","learn-more-text")),modalTheme:P(I("mint","white")),showInterestFree:P(N),showLowerLimit:P(N),showUpperLimit:P(N),showWith:P(N)}),zo=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};var Go=function(o){function r(e){var t=Z(Ho,e||{},"create()"),n=t.value;return t.warnings.forEach(function(e){return s.warn(e)}),n}function a(e,t){return e.apply(void 0,[p].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t)))}function e(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];p?a(r,t):d.push([r,t])}}var i=o.emitEvent,t=o.options,s=t.controller,c=t.locale,n=t.publicOptions,u=new Jt.a,l=r(n),p=void 0,d=[];(function(e){var t=!1;window.Promise||(t=!0,window.Promise=ae.a);var n=e();return t&&window.Promise===ae.a&&delete window.Promise,n})(function(){return m.e(1).then(m.bind(null,29))}).then(function(e){var t=e.default,n=o.component,r=o.listenerRegistry;p=t({component:n,controller:s,listenerRegistry:r,locale:c}),s.report("afterpay_message.loaded",{load_time:u.getElapsedTime(),locale:c,currency:l.currency}),function(){for(;d.length;){var e=d.shift(),t=zo(e,2),n=t[0],r=t[1];a(n,r)}}(),i("ready")},function(e){s.report("afterpay_message.import_error",{error:e})});function f(e){return function(){throw new T.a(e)}}return{mount:e(function(e){e.mount(l)}),unmount:e(function(e){e.unmount()}),update:e(function(e,t){var n=Tt(l,t);l=r(n),e.update(l)}),focus:f("Focus is not supported by afterpayClearpayMessage."),blur:f("Blur is not supported by afterpayClearpayMessage."),clear:f("Clear is not supported by afterpayClearpayMessage.")}};function Yo(e,t,n){if("authentication"!==e)return Object(h.a)(e);var r=Z(Wo,t,n),o=r.value;return o.locale,o.fonts,{value:function(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(o,["locale","fonts"]),warnings:r.warnings}}var Wo=Q({locale:U("elements()"),fonts:U("elements()"),color:P(C)}),Ko=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vo=function(e){var t=e.component,o=e.listenerRegistry,n=e.elementTimings,a=e.getParent,r=e.emitEvent,i=null,s=[],c=function(e){var t=e.options,n=t.controller,r=t.componentName,o=t.groupId,a=t.locale,i=t.fonts,s=t.wait,c=t.publicOptions,u=e.component,l=Ko({locale:a,fonts:i,wait:s,rtl:Po(document.body)},c),p=gn[r],d=n.createElementFrame(p,r,o,l);d.appendTo(u);var f=null;pn[r]&&(f=n.createSecondaryElementFrame(p,pn[r].secondary,r,o,l)).appendTo(u);var m=Oo(),h=null;return qe&&(h=ko()),{frame:d,secondaryFrame:f,hiddenInput:m,hiddenSafariQuirkFixInput:h}}(e),u=c.frame,l=c.secondaryFrame,p=c.hiddenInput,d=c.hiddenSafariQuirkFixInput;Object(ie.d)(t,jo),u.appendTo(t),l&&l.appendTo(t),t.appendChild(p),d&&t.appendChild(d),o.addEventListener(p,"focus",function(){return u.focus()});function f(e){e.send({action:"stripe-user-mount",payload:{timestamps:{stripeJsLoad:n.stripeJsLoadTimestamp.getAsPosixTime(),stripeCreate:n.stripeCreateTimestamp.getAsPosixTime(),groupCreate:n.groupCreateTimestamp.getAsPosixTime(),create:n.createTimestamp.getAsPosixTime(),mount:i?i.getAsPosixTime():0},rtl:Po(a())}})}u._on("load",function(){p.disabled=!1,f(u)}),l&&l._on("load",function(){f(l)}),u._on("ready",function(){r("ready")});return{update:function(e){u.update(e),l&&l.update(e)},focus:function(){Ao(),p.focus()},blur:function(){u.blur(),p.blur()},clear:function(){u.clear()},mount:function(){i=new Jt.a;var e,t,n,r=a();r&&(Object(ie.f)(r,[[vn,!0]]),s.push(function(){Object(ie.f)(r,[[vn,!1]])}),e=function(){Ao(),p.focus()},function(e,t){for(var n=e.parentElement;n;){if(n&&t(n))return n;n=n.parentElement}return null}(r,function(e){return"LABEL"===e.nodeName})||(o.addEventListener(r,"click",e),s.push(function(){o.removeEventListener(r,"click",e)})),t=r.getAttribute("id"),(n=t?document.querySelector("label[for='"+t+"']"):null)&&(o.addEventListener(n,"click",e),s.push(function(){o.removeEventListener(n,"click",e)})))},unmount:function(){for(;s.length;)s.pop()();p.disabled=!0,u.unmount()}}},Jo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function $o(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}var Xo=function(e){var t=e.options,n=$o(e,["options"]),r=t.controller,o=t.componentName,a=t.publicOptions,i=$o(t,["controller","componentName","publicOptions"]),s=function(e){if("authentication"!==e)throw new Error("Unexpected element type for implementation");return e}(o),c=Yo(s,a||{},"elements.create('"+s+"')");c.warnings.forEach(function(e){return r.warn(e)});var u=Vo(Jo({},n,{options:Jo({},i,{controller:r,componentName:s,publicOptions:c.value})})),l=u.update,p=$o(u,["update"]);return Jo({update:function(e){var t=Yo(s,e||{},s+".update()");t.warnings.forEach(function(e){return r.warn(e)}),l(t.value)}},p)},Qo=function(e,t){var n=function(e){if(!an[e])throw new Error("Unexpected Element type: "+e+".");return an[e].implementation}(e);switch(n){case"legacy":return new Uo(t);case"afterpay_message":return Go(t);case"frame":return Xo(t);default:return Object(h.a)(n,"Unexpected implementation type: "+n+".")}},Zo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ea=function(e,t,n){return t&&ta(e.prototype,t),n&&ta(e,n),e};function ta(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var na=(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(ra,le),ea(ra,[{key:"_checkDestroyed",value:function(){if(this._destroyed)throw new T.a("This Element has already been destroyed. Please create a new one.")}},{key:"_isMounted",value:function(){return!!document.body&&document.body.contains(this._component)}},{key:"_unmount",value:function(){var e=this._component.parentElement;e&&e.removeChild(this._component),this._implementation.unmount(),this._parent=null}},{key:"_mountToParent",value:function(e){var t=this._component.parentElement,n=this._isMounted();if(e===t){if(n)return;this.unmount(),this._mountTo(e)}else if(t){if(n)throw new T.a("This Element is already mounted. Use `unmount()` to unmount the Element before re-mounting.");this.unmount(),this._mountTo(e)}else this._mountTo(e)}},{key:"_mountTo",value:function(e){for(this._parent=e;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(this._component),this._implementation.mount()}}]),ra);function ra(e,t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,ra);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(ra.__proto__||Object.getPrototypeOf(ra)).call(this));aa.call(r);var o=e.controller,a=e.componentName;r._controller=o,r._componentName=a,r._destroyed=!1;var i=document.createElement("div");return i.className=cn,r._component=i,r._implementation=Qo(r._componentName,{options:e,component:i,listenerRegistry:t,elementTimings:n,emitEvent:r._emitEvent,getParent:r._getParent}),r}function oa(e,t){e._controller.report("legacy_private_property_used",{prop:t,componentName:e._componentName})}var aa=function(){var r=this;this.mount=ce(function(e){r._checkDestroyed();var t=void 0;if(!e)throw new T.a("Missing argument. Make sure to call mount() with a valid DOM element or selector.");if("string"==typeof e){var n=document.querySelectorAll(e);if(1<n.length&&r._controller.warn("The selector you specified ("+e+") applies to "+n.length+" DOM elements that are currently on the page.\nThe Stripe Element will be mounted to the first one."),!n.length)throw new T.a("The selector you specified ("+e+") applies to no DOM elements that are currently on the page.\nMake sure the element exists on the page before calling mount().");t=n[0]}else{if(!e.appendChild)throw new T.a("Invalid DOM element. Make sure to call mount() with a valid DOM element or selector.");t=e}if("INPUT"===t.nodeName)throw new T.a("Stripe Elements must be mounted in a DOM element that\ncan contain child nodes. `input` elements are not permitted to have child\nnodes. Try using a `div` element instead.");t.children.length&&r._controller.warn("This Element will be mounted to a DOM element that contains child nodes."),r._mountToParent(t)}),this.update=ce(function(e){return r._checkDestroyed(),r._implementation.update(e),r}),this.focus=ce(function(e){return r._checkDestroyed(),e&&e.preventDefault(),r._implementation.focus(),r}),this.blur=ce(function(){return r._checkDestroyed(),r._implementation.blur(),r}),this.clear=ce(function(){return r._checkDestroyed(),r._implementation.clear(),r}),this.unmount=ce(function(){return r._checkDestroyed(),r._unmount(),r}),this.destroy=ce(function(){return r._checkDestroyed(),r.unmount(),r._destroyed=!0,r._emitEvent("destroy"),r}),this._getParent=function(){return r._parent},this._emitEvent=function(e,t){return r._emit(e,Zo({elementType:r._componentName},t))}};["_autofilled","_classes","_complete","_empty","_fakeInput","_focused","_frame","_invalid","_lastBackgroundColor","_lastFontSize","_lastHeight","_lastPadding","_lastSubmittedAt","_listenerRegistry","_paymentRequest"].forEach(function(e){Object.defineProperty(na.prototype,e,{enumerable:!1,get:function(){return oa(this,e),this._implementation[e]}})});["_formSubmit","_isIssuingElement"].forEach(function(e){Object.defineProperty(na.prototype,e,{enumerable:!1,writable:!1,value:function(){return oa(this,e),this._implementation[e]()}})});var ia=na,sa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function ca(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function ua(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function la(e){var t=z(ya,e,"");return"error"===t.type?null:t.value}var pa,da=Q({locale:P(C),fonts:P(F(B)),betas:P(F(j.apply(void 0,ua(Qt))))}),fa=function(){var c=this;this.getElement=ce(function(e){var t,n=(null!=(t=e)&&t.__elementType&&"string"==typeof t.__elementType&&"function"==typeof t?t.__elementType:null)||e;return Un(n,c._betas),Object(w.a)(c._elements,function(e){return e._componentName===n})||null}),this.create=ue(function(t,e){var n=new Jt.a;!function(e,t,n){if(Un(e,n),an[e].unique&&-1!==t.indexOf(e))throw new T.a("Can only create one Element of type "+e+".");var r=an[e].conflict,o=Object(w.e)(t,r);if(o.length){var a=o[0];throw new T.a("Cannot create an Element of type "+e+" after an Element of type "+a+" has already been created.")}}(t,c._elements.map(function(e){return e._componentName}),c._betas);var r=sa({},e,c._commonOptions,{componentName:t,groupId:c._id}),o=(r.paymentRequest,ca(r,["paymentRequest"])),a=(Be||Fe)&&2e3<Object(oe.a)(o).length,i=!!c._pendingFonts||a,s=new ia(sa({publicOptions:e},c._commonOptions,{componentName:t,groupId:c._id,fonts:a?null:c._commonOptions.fonts,controller:c._controller,wait:i}),c._listenerRegistry,sa({},c._timings,{createTimestamp:n}));return c._elements=[].concat(ua(c._elements),[s]),s._on("destroy",function(){c._elements=c._elements.filter(function(e){return e._componentName!==t})}),a&&s._implementation._frame&&s._implementation._frame.send({action:"stripe-user-update",payload:{fonts:c._commonOptions.fonts}}),s})},ma=function e(t,n,r,o){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),fa.call(this);var i,s=new Jt.a,c=Z(da,o||{},"elements()"),u=c.value,l=u.betas,p=void 0===l?[]:l,d=u.fonts,f=void 0===d?[]:d,m=u.locale,h=ca(u,["betas","fonts","locale"]);c.warnings.forEach(function(e){return t.warn(e)}),i=t.warn,Rn().match(/width=device-width/)||i('Elements requires "width=device-width" be set in your page\'s viewport meta tag.\n       For more information: https://stripe.com/docs/js/appendix/viewport_meta_requirements'),t.report("elements",{options:o}),this._elements=[],this._id=re("elements"),this._timings=sa({},r,{groupCreateTimestamp:s}),this._controller=t,this._betas=p,this._listenerRegistry=n;var _=Gn(m,p);this._controller.action.fetchLocale({locale:_||"auto"});var y=f.filter(function(e){return!e.cssSrc||"string"!=typeof e.cssSrc}).map(function(e){return sa({},e,{__resolveFontRelativeTo:window.location.href})}),b=f.map(function(e){return e.cssSrc}).reduce(function(e,t){return"string"==typeof t?[].concat(ua(e),[t]):e},[]).map(function(e){return Object(v.b)(e)?e:Object(v.c)(window.location.href,e)});return this._pendingFonts=b.length,this._commonOptions=sa({},h,{betas:p,locale:_,fonts:y}),b.forEach(function(n){var r;"string"==typeof n&&(r=new Jt.a,zn(n).then(function(e){a._controller.report("font.loaded",{load_time:r.getElapsedTime(),font_count:e.length,css_src:n});var t=e.map(function(e){return sa({},e,{__resolveFontRelativeTo:n})});a._controller.action.updateCSSFonts({fonts:t,groupId:a._id}),a._commonOptions=sa({},a._commonOptions,{fonts:[].concat(ua(a._commonOptions.fonts?a._commonOptions.fonts:[]),ua(t))})}).catch(function(e){a._controller.report("error.font.not_loaded",{load_time:r.getElapsedTime(),message:e&&e.message&&e.message,css_src:n}),a._controller.warn("Failed to load CSS file at "+n+".")}))}),this},ha=function(e,t,n,r,o,a,i){return new bo({controller:e,authentication:t,mids:n,rawOptions:r,betas:o,queryStrategyOverride:a,listenerRegistry:i})},_a={_componentName:C,_implementation:Q({_frame:Q({id:C})})},ya=Q(_a);function ba(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function va(e){return-1===ee.k.indexOf(e)}function ga(e,t){switch(e.type){case"object":return{paymentIntent:e.object};case"error":return{error:Aa({},t?{payment_intent:t}:{},e.error)};default:return Object(h.a)(e)}}function wa(e){switch(e.type){case"error":return{error:e.error};case"object":return{setupIntent:e.object};default:return Object(h.a)(e)}}function Ea(e){return{id:e.id,clientSecret:e.client_secret}}function Sa(e){return"requires_source_action"===e||"requires_action"===e}function Pa(e){return"requires_source_action"===e.status||"requires_action"===e.status?e.next_action:null}var Oa={alipay:"alipay",afterpay_clearpay:"afterpay_clearpay",au_becs_debit:"au_becs_debit",acss_debit:"acss_debit",bacs_debit:"bacs_debit",bancontact:"bancontact",boleto:"boleto",card:"card",eps:"eps",fpx:"fpx",giropay:"giropay",grabpay:"grabpay",ideal:"ideal",konbini:"konbini",oxxo:"oxxo",p24:"p24",paypal:"paypal",sepa_debit:"sepa_debit",sofort:"sofort",three_d_secure:"three_d_secure",upi:"upi",wechat_pay:"wechat_pay",netbanking:"netbanking"},ka=(ba(pa={},ee.b.auBankAccount,Oa.au_becs_debit),ba(pa,ee.b.card,Oa.card),ba(pa,ee.b.cardNumber,Oa.card),ba(pa,ee.b.cardExpiry,Oa.card),ba(pa,ee.b.cardCvc,Oa.card),ba(pa,ee.b.postalCode,Oa.card),ba(pa,ee.b.iban,Oa.sepa_debit),ba(pa,ee.b.idealBank,Oa.ideal),ba(pa,ee.b.fpxBank,Oa.fpx),ba(pa,ee.b.p24Bank,Oa.p24),ba(pa,ee.b.netbankingBank,Oa.netbanking),ba(pa,ee.b.epsBank,Oa.eps),pa),Aa=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ta=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function ja(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function Ca(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function Ra(a){return function(e,t){if("string"!=typeof e)return E("a client_secret string",e,t);var n,r=(n=e.trim().match(/^((seti|pi)_[^_]+)_secret_[^-]+$/))?{id:n[1],clientSecret:n[0]}:null;if(null===r)return E("a client secret of the form ${id}_secret_${secret}",e,t);if(function(e){var t=e.match(/^(seti|pi)_/);if(t)return"seti"===t[1]?ee.g.SETUP_INTENT:ee.g.PAYMENT_INTENT;throw new Error("Unexpected intent id or client secret shape")}(r.id)===a)return y(r,[]);var o=a===ee.g.PAYMENT_INTENT?new T.a(f("a PaymentIntent client secret","a SetupIntent client secret",t)):new T.a(f("a SetupIntent client secret","a PaymentIntent client secret",t));return g(o)}}function Na(e,t){if(null===e)return b("object","null",t);if("object"!==(void 0===e?"undefined":Ia(e)))return b("object",void 0===e?"undefined":Ia(e),t);var n=e.client_secret,r=e.status,o=e.next_action,a=Ra("payment_intent"===e.object?ee.g.PAYMENT_INTENT:ee.g.SETUP_INTENT)(n,S(t,"client_secret"));return"error"===a.type?a:"string"!=typeof r?b("string",void 0===r?"undefined":Ia(r),S(t,"status")):"requires_source_action"!==r&&"requires_action"!==r||"object"===(void 0===o?"undefined":Ia(o))?(e.object,y(e,[])):b("object",void 0===o?"undefined":Ia(o),S(t,"next_action"))}function Ma(d){return function(e,t){if("object"!==(void 0===e?"undefined":Ia(e)))return b("object",void 0===e?"undefined":Ia(e),t);if(null===e)return b("object","null",t);var n=e.type,r=Ca(e,["type"]),o=void 0;if(null===d){if("string"!=typeof n)return b("string",void 0===n?"undefined":Ia(n),S(t,"type"));o=n}else{if(void 0!==n&&n!==d)return"string"!=typeof n?b("string",void 0===n?"undefined":Ia(n),S(t,"type")):b('"'+n+'"','"'+d+'"',S(t,"type"));o=d}var a=r[o],i=(r[o],Ca(r,[o]));if(-1!==["acss_debit","afterpay_clearpay","alipay","bancontact","eps","giropay","grabpay","konbini","oxxo","p24","paypal","wechat_pay"].indexOf(o)&&void 0===a&&(a={}),"object"!==(void 0===a?"undefined":Ia(a)))return b("object or element",Ia(e[o]),S(t,o));if(null===a)return b("object or element","null",S(t,o));var s=la(a);if(s){var c=s._componentName;if(ka[c]===o)return y({type:o,element:s,data:i});var u=[].concat(ja(t.path),[o]).join("."),l=t.label,p=new T.a("Invalid value for "+l+": "+u+" was `"+c+"` Element, which cannot be used to create "+o+" PaymentMethods.");return g(p)}return y({type:o,element:null,data:r})}}function xa(d,f){return function(e,t){if(void 0===e)return y({paymentMethodData:null,paymentMethodOptions:null,source:null,paymentMethod:null,otherParams:{}});if("object"!==(void 0===e?"undefined":Ia(e)))return b("object",void 0===e?"undefined":Ia(e),t);if(null===e)return b("object","null",t);var n=e.source,r=e.source_data,o=e.payment_method_data,a=e.payment_method_options,i=e.payment_method,s=Ca(e,["source","source_data","payment_method_data","payment_method_options","payment_method"]);if(null!=r)throw new T.a(f+": Expected payment_method, or source, not source_data.");if(null!=o)throw new T.a(f+": Expected payment_method, or source, not payment_method_data.");if(null!=n&&null!=i)throw new T.a(f+": Expected either payment_method or source, but not both.");if(null===d&&null!=i&&"string"!=typeof i)throw new T.a(f+": Expected payment_method[type] to be set if payment_method is passed.");if(null!=n){if("string"!=typeof n)return b("string",void 0===n?"undefined":Ia(n),S(t,"source"));if("updatePaymentIntent"===f)throw new T.a(f+": Expected payment_method, not source to be passed.");return y({source:n,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:s})}if(null!=i&&"string"!=typeof i&&"object"!==(void 0===i?"undefined":Ia(i)))return b("string or object",void 0===i?"undefined":Ia(i),S(t,"payment_method"));var c,u=z((c=d,function(e,t){if(null==e)return y(null);if("object"!==(void 0===e?"undefined":Ia(e)))return b("object",void 0===e?"undefined":Ia(e),t);var n=e.card,r=Ca(e,["card"]);if(!n||"object"!==(void 0===n?"undefined":Ia(n)))return y(e);var o=n.cvc,a=Ca(n,["cvc"]);if(null==o)return y(e);var i=la(o),s=i?i._componentName:"";return ee.b.cardCvc!==s?b("`"+ee.b.cardCvc+"` Element",s?"`"+s+"` Element":void 0===o?"undefined":Ia(o),S(t,(c||"card")+".cvc")):y(Ta({},r,{card:Ta({},a,{cvc:i})}))}),a,f,{path:[].concat(ja(t.path),["payment_method_options"])});if("error"===u.type)return u;if("string"==typeof i)return y({source:null,paymentMethodData:null,paymentMethodOptions:u.value,paymentMethod:i,otherParams:s});if("object"!==(void 0===i?"undefined":Ia(i))||null===i)return y({source:null,paymentMethodData:null,paymentMethodOptions:null,paymentMethod:null,otherParams:s});var l=z(Ma(d),i,f,{path:[].concat(ja(t.path),["payment_method"])});if("error"===l.type)return l;var p=l.value;return y({source:null,paymentMethod:null,paymentMethodOptions:u.value,paymentMethodData:p,otherParams:s})}}var La,Da=Ra(ee.g.PAYMENT_INTENT),Ba=Ra(ee.g.SETUP_INTENT),Fa=R(Q({handleActions:R(N,function(){return!0})}),function(){return{handleActions:!0}}),qa=Q({name:I("react-stripe-js","stripe-js","react-stripe-elements"),version:(La=C,function(e,t){return null===e?y(e):La(e,t)}),startTime:P(M)}),Ua="publishable",Ha="secret",za="ephemeral",Ga="restricted",Ya="unknown",Wa=function(e){if(""===e)throw new T.a("Please call Stripe() with your publishable key. You used an empty string.");switch(function(e){switch(e.split("_",1)[0]){case"pk":return Ua;case"sk":return Ha;case"ek":return za;case"rk":return Ga;default:return Ya}}(e)){case Ha:throw new T.a("You should not use your secret key with Stripe.js.\n          Please pass a publishable key instead.");case za:throw new T.a("You should not use an ephemeral key with Stripe.js.\n          Please pass a publishable key instead.");case Ga:throw new T.a("You should not use a restricted key with Stripe.js.\n          Please pass a publishable key instead.")}};function Ka(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Va=["elements","createToken","createPaymentMethod"],Ja=["elements","createSource","createToken","createPaymentMethod"],$a=(function(e,t,n){return t&&Ka(e.prototype,t),n&&Ka(e,n),e}(Xa,[{key:"got",value:function(e){this._didDetect||("elements"===e?this._gets=["elements"]:this._gets.push(e),this._checkForWrapper())}},{key:"called",value:function(t){this._didDetect||(this._gets=this._gets.filter(function(e){return e!==t}))}},{key:"_checkForWrapper",value:function(){Object(w.c)(this._gets,Va)?this._onDetection("react-stripe-js"):Object(w.c)(this._gets,Ja)&&this._onDetection("react-stripe-elements")}}]),Xa);function Xa(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Xa),this._gets=[],this._didDetect=!1,this._onDetection=function(e){n._didDetect=!0,t(e)},window.Stripe&&window.Stripe.__cachedInstances&&this._onDetection("react-stripe-elements")}var Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Za(e){if(!e||"object"!==(void 0===e?"undefined":Qa(e)))return null;var t=e.type;return{type:"string"==typeof t?t:null,data:function(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(e,["type"])}}function ei(e){switch(e.type){case"object":return{source:e.object};case"error":return{error:e.error};default:return Object(h.a)(e)}}function ti(e){switch(e.type){case"object":return{paymentMethod:e.object};case"error":return{error:e.error};default:return Object(h.a)(e)}}function ni(e,t,n,r,o){if("string"==typeof n)return function(e,t,n,r,o){var a=la(r),i=Za(a?o:r),s=i||{type:null,data:{}},c=s.type,u=s.data;if(c&&n!==c)return ae.a.reject(new T.a("The type supplied in payment_method_data is not consistent."));if(a){var l=a._implementation._frame.id,p=a._componentName;return e.action.createPaymentMethodWithElement({frameId:l,elementName:p,type:n,paymentMethodData:u,mids:t}).then(ti)}return i?e.action.createPaymentMethodWithData({elementName:null,type:n,paymentMethodData:u,mids:t}).then(ti):ae.a.reject(new T.a("Please provide either an Element or PaymentMethod creation parameters to createPaymentMethod."))}(e,t,n,r,o);try{var a=Z(Ma(null),n,"createPaymentMethod").value,i=a.element,s=a.type,c=a.data;if(i){var u=i._implementation._frame.id,l=i._componentName;return e.action.createPaymentMethodWithElement({frameId:u,elementName:l,type:s,paymentMethodData:c,mids:t}).then(ti)}return e.action.createPaymentMethodWithData({elementName:null,type:s,paymentMethodData:c,mids:t}).then(ti)}catch(e){return ae.a.reject(e)}}function ri(e){return"https://stripe.com/docs/stripe-js/reference#stripe-"+e.split(/(?=[A-Z])/).join("-").toLowerCase()}function oi(e,t){return Z(Da,e,"stripe."+t+" intent secret").value}function ai(e,t){return Z(Ba,e,"stripe."+t+" intent secret").value}function ii(e,t){return Z(Fa,t,e).value}function si(e,t,n){if("valid"===z(ya,n,t).type)throw new T.a("Do not pass an Element to stripe."+t+"() directly.\nFor more information: "+ri(t));var r=Z(xa(e,t),n,t).value,o=r.source,a=r.paymentMethodData,i=r.paymentMethodOptions,s=r.paymentMethod,c=r.otherParams;if(null!=o&&(null!=a||null!=s))throw new T.a(t+": Expected either source or payment_method, but not both.");if(a){if(a.element)return{mode:{tag:"paymentMethod-from-element",type:e,elementName:a.element._componentName,frameId:a.element._implementation._frame.id,data:a.data,options:i},otherParams:c};if(e)return{mode:{tag:"paymentMethod-from-data",type:e,data:a.data,options:i},otherParams:c}}else{if(s)return{mode:{tag:"paymentMethod",paymentMethod:s,options:i},otherParams:c};if(o)return{mode:{tag:"source",source:o},otherParams:c}}return{mode:{tag:"none"},otherParams:c}}function ci(e,t){var n={skipFingerprint:!1,sandboxFingerprintFrame:!1,sandboxChallengeFrame:!1,useSecureModalWindow:!1};return-1!==e.indexOf("Y")&&(t.report("3ds2.optimization.Y"),n.skipFingerprint=!0),-1!==e.indexOf("k")&&(t.report("3ds2.optimization.k"),n.sandboxFingerprintFrame=!0),-1!==e.indexOf("5")&&(t.report("3ds2.optimization.5"),n.sandboxChallengeFrame=!0),-1!==e.indexOf("R")&&(t.report("3ds2.optimization.R"),n.useSecureModalWindow=!0),n}function ui(e){return{american_express:"amex",visa:"visa",mastercard:"mastercard",discover:"discover"}[e]||"unknown"}function li(e,t,n){if(!e)return null;if("use_stripe_sdk"===e.type){var r=e.use_stripe_sdk;switch(r.type){case"stripe_3ds2_fingerprint":return{type:"3ds2-fingerprint",threeDS2Source:r.three_d_secure_2_source,cardBrand:ui(r.directory_server_name),transactionId:r.server_transaction_id,optimizations:ci(r.three_ds_optimizations,n),methodUrl:r.three_ds_method_url};case"stripe_3ds2_challenge":return{type:"3ds2-challenge",threeDS2Source:r.stripe_js.three_d_secure_2_source,cardBrand:ui(r.stripe_js.directory_server_name),transactionId:r.stripe_js.server_transaction_id,optimizations:ci(r.stripe_js.three_ds_optimizations,n),acsTransactionId:r.stripe_js.acs_transaction_id,acsUrl:r.stripe_js.acs_url,creq:r.stripe_js.creq,securePaymentConfirmation:r.stripe_js.secure_payment_confirmation};case"three_d_secure_redirect":return{type:"3ds1-modal",url:r.stripe_js,source:r.source}}}if("redirect_to_url"===e.type)return{type:"redirect",redirectUrl:e.redirect_to_url.url};if("alipay_handle_redirect"===e.type)return{type:"redirect",redirectUrl:e.alipay_handle_redirect.url};if("boleto_display_details"===e.type)return{type:"boleto-display"};if("display_oxxo_details"===e.type)return{type:"oxxo-display",hostedVoucherUrl:e.display_oxxo_details.hosted_voucher_url};if("konbini_display_details"===e.type)return{type:"konbini-display",hostedVoucherUrl:e.konbini_display_details.hosted_voucher_url};if("oxxo_display_details"===e.type)return{type:"oxxo-display",hostedVoucherUrl:e.oxxo_display_details.hosted_voucher_url};if("authorize_with_url"===e.type){var o=e.authorize_with_url.url;switch(t){case Oa.card:return{type:"3ds1-modal",url:o,source:null};case Oa.ideal:return{type:"redirect",redirectUrl:o}}}return"upi_await_notification"===e.type?{type:"upi_await_notification"}:"wechat_pay_display_qr_code"===e.type?{type:"wechat_pay_display_qr_code"}:null}function pi(e){switch(e.type){case"error":return{error:e.error};case"object":switch(e.object.object){case"payment_intent":return{paymentIntent:e.object};case"setup_intent":return{setupIntent:e.object};default:return Object(h.a)(e.object)}default:return Object(h.a)(e)}}function di(e,t,n,r){return t===ee.g.PAYMENT_INTENT?n.action.retrievePaymentIntent({hosted:!1,intentSecret:e,locale:r,asErrorIfNotSucceeded:!0}).then(pi):n.action.retrieveSetupIntent({hosted:!1,intentSecret:e,locale:r,asErrorIfNotSucceeded:!0}).then(pi)}function fi(e,t,n,r,o){return t===ee.g.PAYMENT_INTENT?n.action.cancelPaymentIntentSource({intentSecret:e,locale:o,sourceId:r}).then(pi):n.action.cancelSetupIntentSource({intentSecret:e,locale:o,sourceId:r}).then(pi)}function mi(e){return(e.error?e.error.payment_intent||e.error.setup_intent:e.paymentIntent||e.setupIntent)||null}function hi(n,l,p,d,f){var e,t,r,o,a,i=Rn(),m=new Jt.a,h=(e=d,t=n.url,r=l.id,o=n.source,a=f,e.createLightboxFrame({type:ee.c.AUTHORIZE_WITH_URL,options:gi({url:t,locale:a,intentId:r},o?{source:o}:{})}));return h.show(),d.report("authorize_with_url.loading",{viewport:i,intentId:l.id}),h._on("load",function(){d.report("authorize_with_url.loaded",{loadDuration:m.getElapsedTime(),intentId:l.id}),h.fadeInBackdrop()}),h._on("challenge_complete",function(){h.fadeOutBackdrop()}),new ae.a(function(u,e){var t=n.source;t&&h._once("cancel",function(){ae.a.all([fi(l,p,d,t,f),h.destroy()]).then(function(e){var t=vi(e,1)[0];return u(t)})}),h._once("authorize_with_url_done",function(){var e,t,n,o,a,i,s,c,r=h.destroy();e=l,t=p,n=d,o=f,a=function(e,t){r.then(function(){d.report("authorize_with_url.done",{shownDuration:m.getElapsedTime(),success:!("error"in e),intentId:l.id,iterations:t}),u(e)})},i=!0,s=3,c=0,function r(){c+=1,di(e,t,n,o).then(function(e){if(i){var t,n=mi(e);if(null!==n)switch(s=3,n.status){case"requires_action":case"requires_source_action":return void setTimeout(r,5e3);case"processing":return void setTimeout(r,1e3);default:a(e,c)}else 0<s?(t=500*Math.pow(2,3-s),setTimeout(r,t),--s):a(e,c)}})}()})})}var _i={source:Q({id:A("src_"),client_secret:A("src_client_secret_")})},yi=Q(_i),bi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},vi=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},gi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wi=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(r=(i=s.next()).done)&&(n.push(i.value),!t||n.length!==t);r=!0);}catch(e){o=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw a}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},Ei=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function Si(t){return new ae.a(function(e){t._on("load",function(){return e(t)})})}function Pi(e,n,t,r,o){return n.optimizations.skipFingerprint?ae.a.resolve({fingerprintAttempted:!1,fingerprintData:null}):""===n.methodUrl?(t.report("3ds2.fingerprint.no_method_url",{hosted:r,intentId:e.id}),ae.a.resolve({fingerprintAttempted:!1,fingerprintData:null})):function(e,t,n,r){var o=e.createHiddenFrame(ee.c.STRIPE_3DS2_FINGERPRINT,{intentId:t,locale:r,hosted:n});e.report("3ds2.fingerprint_frame.loading",{hosted:n,intentId:t});var a=Si(o);return a.then(function(){e.report("3ds2.fingerprint_frame.loaded",{hosted:n,intentId:t})}),a}(t,e.id,r,o).then(function(t){return t.action.perform3DS2Fingerprint({transactionId:n.transactionId,methodUrl:n.methodUrl,shouldSandbox:n.optimizations.sandboxFingerprintFrame}).then(function(e){return t.destroy(),e})})}function Oi(i,a,s,c,u,l){function p(o){return new ae.a(function(r){t.then(function(e){e._once("cancel",function(){e.fadeOutBackdrop(),fi(i,a,c,s.threeDS2Source,u).then(r)}),l||(e.show(),e.fadeInBackdrop());o.type;var t=o.optimizations,n=function(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(o,["type","optimizations"]);e.action.perform3DS2Challenge(Ei({},n,{shouldSandbox:t.sandboxChallengeFrame,useSecureModalWindow:t.useSecureModalWindow})).then(function(){r()})})})}function d(e){return ae.a.all([e?ae.a.resolve(e):di(i,a,c,u),t.then(function(e){return e.destroy()})]).then(function(e){var t=wi(e,1)[0];return c.report("3ds2.done",Ei({intentId:i.id,hosted:l,totalDuration:n.getElapsedTime()},t.error?{error:t.error,success:!1}:{success:!0})),t})}var n=new Jt.a,t=function(e,t,n,r,o){var a=t.createLightboxFrame({type:ee.c.STRIPE_3DS2_CHALLENGE,options:{intentId:e,hosted:r,locale:o}});t.report("3ds2.challenge_frame.loading",{intentId:e,hosted:r}),a._on("challenge_complete",function(){a.fadeOutBackdrop()});var i=Si(a);return i.then(function(){return t.report("3ds2.challenge_frame.loaded",{intentId:e,hosted:r})}),r&&(a.show(),a.action.show3DS2Spinner({cardBrand:n})),i}(i.id,c,s.cardBrand,l,u);switch(s.type){case"3ds2-challenge":return p(s).then(d);case"3ds2-fingerprint":return Pi(i,s,c,l,u).then(function(e){return c.report("3ds2.authenticate",{hosted:l,intentId:i.id}),c.action.authenticate3DS2({threeDS2Source:s.threeDS2Source,outerWindowWidth:window.innerWidth,hosted:l,fingerprintResult:e}).then(function(e){return"error"===e.type?c.report("3ds2.authenticate.error",{error:e.error,hosted:l,intentId:i.id}):c.report("3ds2.authenticate.success",{hosted:l,intentId:i.id}),e})}).then(function(e){if("error"===e.type||null===e.object.ares)return d();var t=e.object,n=t.ares,r=t.creq;if("C"!==n.transStatus||null==r)return c.report("3ds2.frictionless",{hosted:l,intentId:i.id}),d();var o=null;if(e.object.secure_payment_confirmation)try{var a=window.top.origin,o=Ei({},e.object.secure_payment_confirmation,{merchantOrigin:a})}catch(e){c.report("3ds2.secure_payment_confirmation.origin_check_error",{intentId:i.id,source:s.threeDS2Source,error:Ei({name:e.name,message:e.message},e)})}return p({type:"3ds2-challenge",threeDS2Source:s.threeDS2Source,cardBrand:s.cardBrand,transactionId:s.transactionId,acsUrl:n.acsURL,acsTransactionId:n.acsTransID,optimizations:s.optimizations,creq:r,securePaymentConfirmation:o}).then(d)});default:return Object(h.a)(s)}}function ki(e,t){var n=e.createLightboxFrame({type:ee.c.LIGHTBOX_APP,options:t});return n.show(),n._on("nested-frame-loaded",function(){n.fadeInBackdrop(),setTimeout(function(){n.action.openLightboxFrame()},200)}),n}function Ai(e){return e.action.closeLightboxFrame(),e.destroy()}function Ti(r){return new ae.a(function(e,t){var n=setTimeout(function(){e({type:"error",error:{code:"redirect_error",message:"Failed to redirect to "+r},locale:"en"})},6e4);window.addEventListener("pagehide",function(){clearTimeout(n)}),window.top.location.href=r})}function Ii(e,t,n){e.report("redirect_error",{initiator:t,error:n.error})}function ji(e){switch(e.type){case"error":var t=e.error;if("payment_intent_unexpected_state"===t.code&&"object"===Ui(t.payment_intent)&&null!=t.payment_intent&&"string"==typeof t.payment_intent.status&&Sa(t.payment_intent.status)){var n=t.payment_intent;return{type:"object",locale:e.locale,object:n}}return e;case"object":return e;default:return Object(h.a)(e)}}function Ci(e,t,n,r,o){var a,i,s,c,u,l,p,d,f,m,h,_,y,b,v,g,w,E,S,P,O,k=li(Pa(t),n,e),A=Ea(t);if(!k)return ae.a.resolve({paymentIntent:t});switch(k.type){case"3ds1-modal":return hi(k,A,ee.g.PAYMENT_INTENT,e,r);case"3ds2-fingerprint":case"3ds2-challenge":return Oi(A,ee.g.PAYMENT_INTENT,k,e,r,o);case"redirect":return E=t,S=n,P=k.redirectUrl,O=e,Ti(P).then(function(e){return Ii(O,S+" redirect",e),ga(e,E)});case"boleto-display":throw new T.a("Expected option `handleActions` to be `false`. The Boleto private beta does not handle the next actions for you automatically (e.g. display Boleto details). Please refer to the Stripe Boleto integration guide for more info: \n\nhttps://stripe.com/docs/payments/boleto");case"konbini-display":if(void 0===k.hostedVoucherUrl)throw new T.a("Expected option `handleActions` to be `false`. The Konbini pilot does not handle the next actions for you automatically yet (e.g. displaying Konbini payment details). Please refer to the Stripe Konbini integration guide for more info: \n\nhttps://stripe.com/docs/payments/konbini");return _={controller:e,locale:r,url:k.hostedVoucherUrl,intent:t},y=_.controller,b=_.url,v=_.intent,g=_.locale,w=ki(y,{url:b,size:"600x700",locale:g,frameTitle:"konbini.voucher_frame_title",useLightboxHostedCloseButton:!1}),new ae.a(function(e){w._on("request-close",function(){Ai(w).then(function(){e({paymentIntent:v})})})});case"oxxo-display":if(void 0===k.hostedVoucherUrl)throw new T.a("To handle the next actions automatically, set the API version to oxxo_beta=v2. Please refer to the Stripe OXXO integration guide for more info: \n\nhttps://stripe.com/docs/payments/oxxo");return l={controller:e,locale:r,url:k.hostedVoucherUrl,intent:t},p=l.controller,d=l.url,f=l.intent,m=l.locale,h=ki(p,{url:d,size:"600x700",locale:m,frameTitle:"oxxo.voucher_frame_title",useLightboxHostedCloseButton:!1}),new ae.a(function(e){h._on("request-close",function(){Ai(h).then(function(){e({paymentIntent:f})})})});case"upi_await_notification":return a={controller:e,intentSecret:A,intentType:ee.g.PAYMENT_INTENT,locale:r},i=a.controller,s=a.intentSecret,c=a.intentType,u=a.locale,new ae.a(function(r){setTimeout(function n(){di(s,c,i,u).then(function(e){var t=mi(e);null!==t&&("requires_action"!==t.status?r(e):setTimeout(n,1e4))})},5e3)});case"wechat_pay_display_qr_code":throw new T.a("Expected option `handleActions` to be `false`.");default:return ae.a.resolve({paymentIntent:t})}}function Ri(e,t,n,r,o){return Ci(e,t,n,r,o).then(function(e){if(e.setupIntent)throw new Error("Got unexpected SetupIntent response");return e})}function Ni(a,i,s,c){return function(e){var t=ji(e);switch(t.type){case"error":var n=t.error,r=n.payment_intent;return s&&r&&"payment_intent_unexpected_state"===n.code&&("succeeded"===r.status||"requires_capture"===r.status)?ae.a.resolve({paymentIntent:r}):ae.a.resolve(ga(e));case"object":var o=t.object;return Ri(a,o,i,t.locale,c);default:return Object(h.a)(t)}}}function Mi(l,p){return function(e,t,n,r,o){var a=oi(n,l),i=si(p,l,r),s=ii(l,o),c="none"===i.mode.tag,u=e.action.confirmPaymentIntent(Hi({},i,{intentSecret:a,expectedType:p,options:s,mids:t}));return s.handleActions?u.then(Ni(e,p,c,!1)):u.then(ga)}}function xi(e,t,n,r){var o=oi(n,"updatePaymentIntent"),a=function(e){if(!e||!e.payment_method||!e.payment_method.type||"string"!=typeof e.payment_method.type)return null;var t=e.payment_method.type;return Oa[t]||null}(r),i=si(a,"updatePaymentIntent",r);return e.action.updatePaymentIntent(Hi({},i,{intentSecret:o,expectedType:a,mids:t,options:null})).then(ga)}function Li(e,r){var t=oi(e,"handleCardAction");return r.action.retrievePaymentIntent({intentSecret:t,hosted:!1}).then(function(e){var t=ji(e);switch(t.type){case"error":return ae.a.resolve(ga(e));case"object":var n=t.object;if(Sa(n.status)){if("manual"!==n.confirmation_method)throw new T.a("handleCardAction: The PaymentIntent supplied does not require manual server-side confirmation. Please use confirmCardPayment instead to complete the payment.");return Ri(r,n,Oa.card,t.locale,!1)}throw new T.a("handleCardAction: The PaymentIntent supplied is not in the requires_action state.");default:return Object(h.a)(t)}})}function Di(e){var t=e.mode;if(t.data&&t.data.billing_details&&"object"===ps(t.data.billing_details))return t.data.billing_details;throw new T.a("Missing payment_method[billing_details]")}function Bi(e){var t=e.mode,n="none"===t.tag,r="paymentMethod"===t.tag,o="paymentMethod-from-data"===t.tag&&t.data.acss_debit;return!n&&!r&&!o}function Fi(e){var t=e.controller,n=e.intentSecret,r=e.mode,o=e.billingDetails;return t.action.createAcssDebitSession({intentSecret:n,billingDetails:o,mode:r}).then(function(e){if("error"===e.type)return{type:"error",error:e.error};var r=ki(t,{url:e.object.url,size:"400x600",locale:e.locale,frameTitle:"acss.dialog_frame_title",useLightboxHostedCloseButton:!1});return new ae.a(function(n){r._on("request-close",function(){Ai(r).then(function(){return t.action.localizeError(ds)}).then(function(e){n({type:"error",error:e})})}),r._on("session-complete",function(e){var t=e.paymentMethod;Ai(r).then(function(){n({type:"success",paymentMethod:t})})})})})}function qi(a,t,e,n,r){var o="confirmInstantDebitsPilotPayment",i=oi(e,o),s=ii(o,r),c=si(null,o,n),u=a.createLightboxFrame({type:ee.c.INSTANT_DEBITS_APP,options:{intentId:i.id,clientSecret:i.clientSecret,apiKey:a._apiKey,returnOnConfirm:!1===s.handleActions}});return u.show(),u.fadeInBackdrop(),new ae.a(function(r){function o(e){u.fadeOutBackdrop().then(function(){r(e)})}u._once("cancel",function(){u.fadeOutBackdrop(),a.action.localizeError(_s).then(function(e){o({error:e})})}),u._on("instant-debits-fetch-payment-intent",function(){a.action.retrievePaymentIntent({intentSecret:i,hosted:!1}).then(function(e){var t,n;e.object?(t=e.object,u.send({action:"stripe-instant-debits-received-payment-intent",payload:{paymentIntent:t}}),!1===s.handleActions&&setTimeout(function(){u.fadeOutBackdrop(),o(ga(e))},2e3)):(n=e.error,a.action.localizeError(n).then(function(e){r({error:e})}))})}),!1===s.handleActions&&u._on("instant-debits-payment-ready",function(){a.action.retrievePaymentIntent({intentSecret:i,hosted:!1}).then(ga).then(o)}),u._on("instant-debits-attempt-payment",function(e){a.action.confirmPaymentIntent(ms({},c,{mode:{tag:"none"},intentSecret:i,expectedType:null,options:s,mids:t})).then(function(e){e.object?(u.send({action:"stripe-instant-debits-successful-payment-intent",payload:{paymentIntent:e.object}}),setTimeout(function(){o(ga(e))},2e3)):a.action.localizeError(e.error).then(function(e){o({error:e})})})}),u._on("instant-debits-payment-error",function(e){u.fadeOutBackdrop(),a.action.localizeError(e).then(function(e){o({error:e})})}),u._on("instant-debits-flow-error",function(e){a.action.localizeError(hs).then(function(e){o({error:e})})})})}var Ui="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hi=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zi=Mi("confirmAcssDebitPayment",Oa.acss_debit),Gi=Mi("confirmAfterpayClearpayPayment",Oa.afterpay_clearpay),Yi=Mi("confirmAuBecsDebitPayment",Oa.au_becs_debit),Wi=Mi("confirmBacsDebitPayment",Oa.bacs_debit),Ki=Mi("confirmBancontactPayment",Oa.bancontact),Vi=Mi("confirmBoletoPayment",Oa.boleto),Ji=Mi("confirmCardPayment",Oa.card),$i=Mi("confirmEpsPayment",Oa.eps),Xi=Mi("confirmFpxPayment",Oa.fpx),Qi=Mi("confirmGiropayPayment",Oa.giropay),Zi=Mi("confirmGrabPayPayment",Oa.grabpay),es=Mi("confirmIdealPayment",Oa.ideal),ts=Mi("confirmKonbiniPayment",Oa.konbini),ns=Mi("confirmOxxoPayment",Oa.oxxo),rs=Mi("confirmAlipayPayment",Oa.alipay),os=Mi("confirmP24Payment",Oa.p24),as=Mi("confirmPayPalPayment",Oa.paypal),is=Mi("confirmSepaDebitPayment",Oa.sepa_debit),ss=Mi("confirmSofortPayment",Oa.sofort),cs=Mi("confirmUpiPayment",Oa.upi),us=Mi("confirmNetbankingPayment",Oa.netbanking),ls=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ds={type:"validation_error",code:"incomplete_payment_details"},fs=function(e,t){if("object"===(void 0===e?"undefined":bi(e))&&null!==e&&void 0!==e.handleActions)throw new T.a("stripe."+t+" does not support a handleActions option. For more information, see "+ri(t))},ms=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},hs={type:"validation_error",code:"errors.code.unexpected"},_s={type:"validation_error",code:"errors.code.incomplete_payment_details"},ys=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},bs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function vs(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function gs(e,t){if(null==e)return y(null);var n=e.type,r=vs(e,["type"]),o=R(C,function(){return null})(n,S(t,"type"));return"error"===o.type?o:y({type:o.value,data:r})}function ws(e,t,n,r){if(null===e){if(null!==t)return t;var o=r?"source_data":"payment_method_data";throw new T.a(n+": you must additionally specify the type of payment method to create within "+o+".")}if(null===t)return e;if(t!==e)throw new T.a(n+": you specified `type: "+t+"`, but "+n+" will create a "+e+" payment method.");return e}function Es(p){return function(e,t){if("object"!==(void 0===e?"undefined":bs(e))||null===e)return b("object",null===e?"null":void 0===e?"undefined":bs(e),t);var n=e.source,r=e.source_data,o=e.payment_method,a=e.payment_method_data,i=vs(e,["source","source_data","payment_method","payment_method_data"]);if(null!=n&&"string"!=typeof n)return b("string",void 0===n?"undefined":bs(n),S(t,"source"));if(null!=o&&"string"!=typeof o)return b("string",void 0===o?"undefined":bs(o),S(t,"payment_method"));if(null!=r&&"object"!==(void 0===r?"undefined":bs(r)))return b("object",void 0===r?"undefined":bs(r),S(t,"source_data"));if(null!=a&&"object"!==(void 0===a?"undefined":bs(a)))return b("object",void 0===a?"undefined":bs(a),S(t,"payment_method_data"));var s=gs(r,S(t,"source_data"));if("error"===s.type)return s;var c=s.value,u=gs(a,S(t,"payment_method_data"));if("error"===u.type)return u;var l=u.value;return y({sourceData:c,source:null==n?null:n,paymentMethodData:l,paymentMethod:null==o?null:o,otherParams:ys({},p,i)})}}function Ss(o){return function(e,t){if(void 0===e)return y({sourceData:null,paymentMethodData:null,source:null,paymentMethod:null,otherParams:{}});if("object"!==(void 0===e?"undefined":bs(e)))return b("object",void 0===e?"undefined":bs(e),t);if(null===e)return b("object","null",t);if(o){if(!e.payment_intent)return y({sourceData:null,paymentMethodData:null,source:null,paymentMethod:null,otherParams:e});var n=e.payment_intent,r=vs(e,["payment_intent"]);return Es(r)(n,S(t,"payment_intent"))}return e.payment_intent?g(new T.a("The payment_intent parameter has been removed. To fix, move everything nested under the payment_intent parameter to the top-level object.")):Es({})(e,t)}}function Ps(e,t,n,r,o,a){var i=z(ya,o,r);if("error"===i.type)return null;var s=i.value,c=Z(Ss(t),a,r).value,u=c.sourceData,l=c.source,p=c.paymentMethodData,d=c.paymentMethod,f=c.otherParams;if(!e&&u)throw new T.a(r+": Expected payment_method_data, not source_data.");if(null!=l)throw new T.a("When calling "+r+" on an Element, you can't pass in a pre-existing source ID, as a source will be created using the Element.");if(null!=d)throw new T.a("When calling "+r+" on an Element, you can't pass in a pre-existing PaymentMethod ID, as a PaymentMethod will be created using the Element.");var m,h,_=s._componentName,y=s._implementation._frame.id,b=u||p||{type:null,data:{}},v=b.data,g=(m=_,null!=(h=b.type)?h:!va(m)&&ka[m]||null),w=e&&!p,E={elementName:_,frameId:y,type:ws(n,g,r,w),data:v};return w?{mode:ys({tag:"source-from-element"},E),otherParams:f}:{mode:ys({tag:"paymentMethod-from-element",options:null},E),otherParams:f}}function Os(o,a,i,s){return function(e,t){var n=Ps(o,a,i,s,e,t);if(n)return n;var r=function(e,t,n,r,o){var a=Z(Ss(t),o,r).value,i=a.sourceData,s=a.source,c=a.paymentMethodData,u=a.paymentMethod,l=a.otherParams;if(!e&&i)throw new T.a(r+": Expected payment_method, source, or payment_method_data, not source_data.");if(null!==s&&null!==i)throw new T.a(r+": Expected either source or source_data, but not both.");if(null!==u&&null!==c)throw new T.a(r+": Expected either payment_method or payment_method_data, but not both.");if(null!==u&&null!==s)throw new T.a(r+": Expected either payment_method or source, but not both.");if(i||c){var p=i||c||{},d=p.data,f=e&&!c,m=ws(n,p.type,r,f);return f?{mode:{tag:"source-from-data",type:m,data:d},otherParams:l}:{mode:{tag:"paymentMethod-from-data",type:m,data:d,options:null},otherParams:l}}return null!==s?{mode:{tag:"source",source:s},otherParams:l}:null!==u?{mode:{tag:"paymentMethod",paymentMethod:u,options:null},otherParams:l}:{mode:{tag:"none"},otherParams:l}}(o,a,i,s,e);if(r)return r;throw new T.a("Expected: stripe."+s+"(intentSecret, element[, data]) or stripe."+s+"(intentSecret[, data]). Please see the docs for more usage examples https://stripe.com/docs/payments/dynamic-authentication")}}function ks(e,t,n,r,o,a){var i=Z(Da,r,"stripe.confirmPaymentIntent intent secret").value,s=null,c=Os(e,!1,s,"confirmPaymentIntent")(o,a);return t.action.confirmPaymentIntent(Fs({},c,{intentSecret:i,expectedType:s,options:{handleActions:!1},mids:n})).then(ga)}function As(e,t,n,r,o,a,i){var s=Z(Da,o,"stripe.handleCardPayment intent secret").value,c=Oa.card,u=Os(e,r,c,"handleCardPayment")(a,i),l=!a&&!i;return t.action.confirmPaymentIntent(Fs({},u,{intentSecret:s,expectedType:c,options:{handleActions:!0},mids:n})).then(Ni(t,c,l,!1))}function Ts(e,t,n,r,o,a,i){var s=Z(Da,o,"stripe.handleIdealPayment intent secret").value,c=Oa.ideal,u=Os(e,r,c,"handleIdealPayment")(a,i),l=!a&&!i;return t.action.confirmPaymentIntent(Fs({},u,{intentSecret:s,expectedType:c,options:{handleActions:!0},mids:n})).then(Ni(t,c,l,!1))}function Is(e){switch(e.type){case"object":return{returnIntent:e.object};case"error":return{error:e.error};default:return Object(h.a)(e)}}function js(e,t,n,r,o){var a,i,s,c=li(Pa(t),n,e),u=Ea(t);if(!c)return ae.a.resolve({setupIntent:t});switch(c.type){case"3ds1-modal":return hi(c,u,ee.g.SETUP_INTENT,e,r);case"3ds2-fingerprint":case"3ds2-challenge":return Oi(u,ee.g.SETUP_INTENT,c,e,r,o);case"redirect":return a=n,i=c.redirectUrl,s=e,Ti(i).then(function(e){return Ii(s,a+" redirect",e),wa(e)});default:return ae.a.resolve({setupIntent:t})}}function Cs(e,t,n,r,o){return js(e,t,n,r,o).then(function(e){if(e.paymentIntent)throw new Error("Got unexpected PaymentIntent response");return e})}function Rs(o,a,i,s){return function(e){switch(e.type){case"error":var t=e.error,n=t.setup_intent;return i&&n&&"succeeded"===n.status?ae.a.resolve({setupIntent:n}):ae.a.resolve({error:t});case"object":var r=e.object;return Cs(o,r,a,e.locale,s);default:return Object(h.a)(e)}}}function Ns(l,p){return function(e,t,n,r,o){var a=ai(n,l),i=si(p,l,r),s=ii(l,o),c="none"===i.mode.tag,u=e.action.confirmSetupIntent(qs({},i,{intentSecret:a,expectedType:p,options:s,mids:t}));return s.handleActions?u.then(Rs(e,p,c,!1)):u.then(wa)}}function Ms(e,t,n,r,o){var a=Z(Ba,n,"stripe.handleCardSetup intent secret").value,i=Oa.card,s=Os(!1,!1,i,"handleCardSetup")(r,o),c=!r&&!o;return e.action.confirmSetupIntent($s({},s,{intentSecret:a,expectedType:i,options:{handleActions:!0},mids:t})).then(Rs(e,i,c,!1))}function xs(e,t){var n,r,o,a,i,s,c,u=function(e){var t=e.trim().match(/^((vi|vs)_[^_]+)_secret_([^-]+)$/);if(!t)throw new T.a("Could not parse client secret.");return{identityClientSecret:t[0],id:t[1],token:t[3]}}(e),l=u.id,p=u.token,d=(n=p,ee.f+"start/"+n);return o=(r={controller:t,url:d,id:l}).controller,a=r.url,i=r.id,s=r.locale,c=ki(o,{url:a,size:"1100x800",frameTitle:"identity.verification_frame_title",locale:void 0===s?"en-US":s,useLightboxHostedCloseButton:!0,allowCamera:!0,appType:"identity"}),new ae.a(function(e){c._on("request-close",function(){Ai(c).then(function(){e({verificationSession:{id:i}})})})})}function Ls(e,t){if("string"!=typeof e)return E("an Issuing card ID of the form ic_xxx",e,t);var n,r=(n=e.trim().match(/ic_[a-zA-Z0-9_]+$/))?n[0]:null;return null===r?E("an Issuing card ID of the form ic_xxx",e,t):y(r,[])}function Ds(e,t){if("string"!=typeof e)return E("an ephemeral key secret of the form ek_xxx",e,t);var n,r=(n=e.trim().match(/ek_[a-zA-Z0-9_]+$/))?n[0]:null;return null===r?E("an ephemeral key secret of the form ek_xxx",e,t):y(r,[])}function Bs(e,t,n){var r=Z(Ls,e,"stripe."+"retrieveIssuingCard"+" cardId").value,o=Z(Ds,t,"stripe."+"retrieveIssuingCard"+" ephemeral key secret").value;return n.action.retrieveIssuingCard({cardId:r,ephemeralKeySecret:o}).then(To)}var Fs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qs=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Us=Ns("confirmAcssDebitSetup",Oa.acss_debit),Hs=Ns("confirmCardSetup",Oa.card),zs=Ns("confirmSepaDebitSetup",Oa.sepa_debit),Gs=Ns("confirmAuBecsDebitSetup",Oa.au_becs_debit),Ys=Ns("confirmBacsDebitSetup",Oa.bacs_debit),Ws=Ns("confirmIdealSetup",Oa.ideal),Ks=Ns("confirmAlipaySetup",Oa.alipay),Vs=Ns("confirmSofortSetup",Oa.sofort),Js=Ns("confirmBancontactSetup",Oa.bancontact),$s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Xs=[$t.checkout_beta_2,$t.checkout_beta_3,$t.checkout_beta_4],Qs=[$t.checkout_beta_2,$t.checkout_beta_3,$t.checkout_beta_4,$t.checkout_beta_locales,$t.checkout_beta_testcards],Zs=Object.keys({bg:"bg",cs:"cs",da:"da",de:"de",el:"el",en:"en","en-GB":"en-GB",es:"es","es-419":"es-419",et:"et",fi:"fi",fr:"fr","fr-CA":"fr-CA",hu:"hu",id:"id",it:"it",ja:"ja",lt:"lt",lv:"lv",ms:"ms",mt:"mt",nb:"nb",nl:"nl",pl:"pl",pt:"pt","pt-BR":"pt-BR",ro:"ro",ru:"ru",sk:"sk",sl:"sl",sv:"sv",tr:"tr",zh:"zh","zh-HK":"zh-HK","zh-TW":"zh-TW"}),ec=Object.keys({th:"th","pt-PT":"pt-PT"}),tc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function nc(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}function rc(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function oc(e,t){var n=X(tc({},sc,{items:P(O(F(X({type:I("plan"),quantity:x(0),id:C})),F(X({type:I("sku"),quantity:x(0),id:C})))),successUrl:C,cancelUrl:C})),r=Z(n,t,"stripe.redirectToCheckout").value,o=r.sku,a=r.plan,i=r.items,s=nc(r,["sku","plan","items"]),c=function(e,t,n){if(e&&t||(e||t)&&n)throw new T.a("stripe.redirectToCheckout: Expected only one of sku, plan, or items.");if("string"==typeof e)return[{sku:e,quantity:1}];if("string"==typeof t)return[{plan:t,quantity:1}];if(n)return n.map(function(e){return"sku"===e.type?{sku:e.id,quantity:e.quantity}:{plan:e.id,quantity:e.quantity}});throw new T.a("stripe.redirectToCheckout: You must provide either sku, plan, or items.")}(o,a,i);return tc({tag:"no-session",items:c},s)}function ac(e,t,n){var r=X(tc({},sc,{sessionId:P(C),successUrl:P(C),cancelUrl:P(C),mode:P(I("subscription","payment")),items:P(O(F(X({quantity:x(0),plan:C})),F(X({quantity:x(0),sku:C})))),lineItems:P(F(X({quantity:x(0),price:C})))},-1!==e.indexOf("checkout_beta_locales")?{locale:P(I.apply(void 0,["auto"].concat(rc(Zs),rc(ec))))}:{})),o=Z(r,t,"stripe.redirectToCheckout").value;if(o.sessionId){var a=o.sessionId;if(1<Object.keys(o).length)throw new T.a("stripe.redirectToCheckout: Do not provide other parameters when providing sessionId. Specify all parameters on your server when creating the CheckoutSession.");if(!/^cs_/.test(a))throw new T.a("stripe.redirectToCheckout: Invalid value for sessionId. You specified '"+a+"'.");if("live"===n&&/^cs_test_/.test(a))throw new T.a("stripe.redirectToCheckout: the provided sessionId is for a test mode Checkout Session, whereas Stripe.js was initialized with a live mode publishable key.");if("test"===n&&/^cs_live_/.test(a))throw new T.a("stripe.redirectToCheckout: the provided sessionId is for a live mode Checkout Session, whereas Stripe.js was initialized with a test mode publishable key.");return{tag:"session",sessionId:a}}o.sessionId,o.sku,o.plan;var i=o.items,s=o.lineItems,c=o.successUrl,u=o.cancelUrl,l=o.mode,p=nc(o,["sessionId","sku","plan","items","lineItems","successUrl","cancelUrl","mode"]);if(!s&&!i)throw new T.a("stripe.redirectToCheckout: You must provide one of lineItems, items, or sessionId.");if(!c||!u)throw new T.a("stripe.redirectToCheckout: You must provide successUrl and cancelUrl.");return tc({tag:"no-session",items:i,lineItems:s,successUrl:c,cancelUrl:u,mode:l},p)}function ic(e,t,n){var r=ac(e,t,n);if("no-session"!==r.tag)return r;var o=r.successUrl,a=r.cancelUrl;if(!Object(v.b)(o))throw new T.a("stripe.redirectToCheckout: successUrl must start with either http:// or https://.");if(!Object(v.b)(a))throw new T.a("stripe.redirectToCheckout: cancelUrl must start with either http:// or https://.");return r}var sc={sku:P(C),plan:P(C),clientReferenceId:P(C),locale:P(I.apply(void 0,["auto"].concat(rc(Zs)))),customerEmail:P(C),billingAddressCollection:P(I("required","auto")),submitType:P(I("auto","pay","book","donate")),allowIncompleteSubscriptions:P(N),shippingAddressCollection:P(X({allowedCountries:F(C)}))},cc=/cs_(test|live)_.+/,uc=function(e,t,n,r){var o,a;return o=t,"session"===(a=function(t,e,n){var r=Object(w.a)(Xs,function(e){return Zt(t,e)});if(e&&e.lineItems&&r)throw new T.a("Prices cannot be used with "+r);if("string"==typeof e&&cc.test(e))throw new T.a("stripe.redirectToCheckout: Checkout Session IDs must be passed in as an object with a key of `sessionId` and the Session ID as the value.");switch(r){case"checkout_beta_2":return oc(0,e);case"checkout_beta_3":return ac(t,e,n);case"checkout_beta_4":default:return ic(t,e,n)}}(e,n,3<arguments.length&&void 0!==r?r:"unknown")).tag||null==o||a.locale||-1===["auto"].concat(rc(Zs)).indexOf(o)?a:tc({},a,{locale:o})},lc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function pc(t,e){return Ti(e).then(function(e){return Ii(t,"redirectToCheckout",e),{error:e.error}})}function dc(n,t,e,r,o){n.report("redirect_to_checkout.options",{betas:t,options:o,globalLocale:r});var a=uc(t,r,o,n.keyMode());if("session"===a.tag){var i=a.sessionId;return n.action.createPaymentPageWithSession({betas:t,mids:e(),sessionId:i}).then(function(e){if("error"===e.type)return{error:e.error};var t=e.object.url;return pc(n,t)})}a.tag;var s=a.items,c=a.lineItems,u=a.mode,l=a.successUrl,p=a.cancelUrl,d=a.clientReferenceId,f=a.customerEmail,m=a.billingAddressCollection,h=a.submitType,_=a.allowIncompleteSubscriptions,y=a.shippingAddressCollection,b=function(e,t){var n,r={};for(n in e)0<=t.indexOf(n)||Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(a,["tag","items","lineItems","mode","successUrl","cancelUrl","clientReferenceId","customerEmail","billingAddressCollection","submitType","allowIncompleteSubscriptions","shippingAddressCollection"]),v=[];if(c&&s)throw new Error("Only one of items, lineItems can be passed in.");if(c){if(!u)throw new Error("Expected `mode`");v=c.map(function(e){if(e.price)return{type:"price",id:e.price,quantity:e.quantity};throw new Error("Unexpected item shape.")})}else{if(!s)throw new Error("An items field must be passed in.");v=s.map(function(e){if(e.sku)return{type:"sku",id:e.sku,quantity:e.quantity};if(e.plan)return{type:"plan",id:e.plan,quantity:e.quantity};throw new Error("Unexpected item shape.")})}var g=Object(w.a)(Xs,function(e){return Zt(t,e)});return n.action.createPaymentPage(lc({betas:t,mids:e(),items:v,mode:u,success_url:l,cancel_url:p,client_reference_id:d,customer_email:f,billing_address_collection:m,submit_type:h,use_payment_methods:!g,allow_incomplete_subscriptions:_,shipping_address_collection:y&&{allowed_countries:y.allowedCountries}},b)).then(function(e){if("error"===e.type)return{error:e.error};var t=e.object.url;return pc(n,t)})}function fc(e){switch(e.type){case"object":return{token:e.object};case"error":return{error:e.error};default:return Object(h.a)(e)}}function mc(e){return"object"===(void 0===e?"undefined":_c(e))&&null!==e?e:{}}function hc(e){switch(e.type){case"object":return{radarSession:e.object};case"error":return{error:e.error};default:return Object(h.a)(e)}}var _c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},yc=function(e,t,n){return t&&bc(e.prototype,t),n&&bc(e,n),e};function bc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var vc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};function gc(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var wc=new Jt.a,Ec=document?document.readyState:"unknown",Sc=!1;switch(Ec){case"loading":Sc=!0;break;case"interactive":try{var Pc=function(){Sc=!0};setTimeout(function(){document.removeEventListener("DOMContentLoaded",Pc)},0),document.addEventListener("DOMContentLoaded",Pc)}catch(e){}}function Oc(e,t,n,r){var o,a,i,s,c,u,l,p,d,f;Ic&&!r||(Ic=!0,o=r||new Jt.a,"complete"===document.readyState?(f=l=u=c=s=null,window.performance&&(window.performance.timing&&(i=(a=window.performance.timing).fetchStart,s=a.domLoading-i,c=a.domInteractive-i,u=a.domComplete-i,l=Jt.a.fromPosixTime(i).getElapsedTime(wc)),window.performance.getEntriesByType&&(p=window.performance.getEntriesByType("resource"),d="https://js.stripe.com/v3/".replace(/\/$/,""),f=p.reduce(function(e,t){if(0===t.name.indexOf(d)){var n=t.name.match(/\/([^/#?]*)\/?(?:$|[#?])/);if(n&&n[1]){var r=n[1].replace(/-[0-9a-f]{32}\./,".");return"v3"===r&&(r="stripe.js"),vc({},e,(o={},a=r,i={transfer_size:t.transferSize,duration:Math.round(t.duration)},a in o?Object.defineProperty(o,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):o[a]=i,o))}}var o,a,i;return e},{}))),e.report("timings",{element:e.controllerFor(),dom_loading:s,dom_interactive:c,dom_complete:u,since_fetch:l,load_count:1,load_before_dom_content_loaded:Sc,load_ready_state:Ec,first_create_ready_state:t,first_mount_readyState:n,until_first_create:wc.getElapsedTime(e._createTimestamp),until_first_mount:wc.getElapsedTime(e._mountTimestamp),until_first_load:wc.getElapsedTime(o),resource_timings:f})):window.addEventListener("load",function(){try{Oc(e,t,n,o)}catch(e){}}))}function kc(e){return"You have an in-flight "+e+"! Please be sure to disable your form submit button when "+e+" is called."}function Ac(e){return function(){throw new T.a("You cannot call `stripe."+e+"` without supplying a PaymentIntents beta flag when initializing Stripe.js.    You can find more information including code snippets at https://www.stripe.com/docs/payments/payment-intents/quickstart.")}}var Tc,Ic=!1,jc=Q({apiKey:C,stripeAccount:P(C),locale:P(C),apiVersion:P(C),__privateApiUrl:P(C),__checkout:P(Q({mids:Q({muid:C,sid:C})})),__hosted3DS:P(N),canCreateRadarSession:P(N),betas:P(F(j.apply(void 0,gc(Qt))))}),Cc=(yc(Rc,[{key:"_attachCreateRadarSession",value:function(e){var t,n,r=this;e&&(this.createRadarSession=(t=function(){var e,t,n=r._mids();return e=r._controller,t=n,e.action.createRadarSession({mids:t}).then(hc)},function(){try{return t.call(this)}catch(e){return W(e,n||this&&this._controller)}}))}},{key:"_attachPaymentIntentMethods",value:function(e,t){function r(){return o._mids()}var o=this;this.createPaymentMethod=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return ni.apply(void 0,[o._controller,r()].concat(t))}),this._createPaymentMethod=this.createPaymentMethod,this.retrievePaymentIntent=ce(function(e){return t=e,n=o._controller,r=oi(t,"retrievePaymentIntent"),n.action.retrievePaymentIntent({intentSecret:r,hosted:!1}).then(ga);var t,n,r}),this.retrieveSetupIntent=ce(function(e){return t=e,n=o._controller,r=ai(t,"retrieveSetupIntent"),n.action.retrieveSetupIntent({intentSecret:r,hosted:!1}).then(wa);var t,n,r}),this.updatePaymentIntent=Ac("updatePaymentIntent"),(Zt(this._betas,$t.line_items_beta_1)||Zt(this._betas,$t.tax_product_beta_1))&&(this.updatePaymentIntent=ue(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return xi.apply(void 0,[o._controller,r()].concat(t))}));var n=Object(Xe.a)(Li,kc("handleCardAction"));this.handleCardAction=ce(function(e){return n(e,o._controller)});var a=Object(Xe.a)(Ji,kc("confirmCardPayment"));this.confirmCardPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.apply(void 0,[o._controller,r()].concat(t))});var i=Object(Xe.a)(Hs,kc("confirmCardSetup"));this.confirmCardSetup=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.apply(void 0,[o._controller,r()].concat(t))}),this.confirmIdealPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return es.apply(void 0,[o._controller,r()].concat(t))}),this.confirmSepaDebitPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return is.apply(void 0,[o._controller,r()].concat(t))}),this.confirmSepaDebitSetup=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return zs.apply(void 0,[o._controller,r()].concat(t))}),this.confirmFpxPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Xi.apply(void 0,[o._controller,r()].concat(t))}),this.confirmAlipayPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return rs.apply(void 0,[o._controller,r()].concat(t))}),this.confirmAlipaySetup=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ks.apply(void 0,[o._controller,r()].concat(t))}),this.confirmAuBecsDebitPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Yi.apply(void 0,[o._controller,r()].concat(t))}),this.confirmAuBecsDebitSetup=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Gs.apply(void 0,[o._controller,r()].concat(t))}),this.confirmBacsDebitPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Wi.apply(void 0,[o._controller,r()].concat(t))}),this.confirmBacsDebitSetup=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ys.apply(void 0,[o._controller,r()].concat(t))}),this.confirmBancontactPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ki.apply(void 0,[o._controller,r()].concat(t))}),this.confirmEpsPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return $i.apply(void 0,[o._controller,r()].concat(t))}),this.confirmGiropayPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Qi.apply(void 0,[o._controller,r()].concat(t))}),this.confirmOxxoPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return ns.apply(void 0,[o._controller,r()].concat(t))}),this.confirmP24Payment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return os.apply(void 0,[o._controller,r()].concat(t))}),this.confirmSofortPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return ss.apply(void 0,[o._controller,r()].concat(t))}),this.confirmIdealSetup=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ws.apply(void 0,[o._controller,r()].concat(t))}),this.confirmSofortSetup=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Vs.apply(void 0,[o._controller,r()].concat(t))}),this.confirmBancontactSetup=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Js.apply(void 0,[o._controller,r()].concat(t))}),this.confirmGrabPayPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Zi.apply(void 0,[o._controller,r()].concat(t))}),this.confirmAfterpayClearpayPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Gi.apply(void 0,[o._controller,r()].concat(t))}),this.verifyMicrodepositsForPayment=Ac("verifyMicrodepositsForPayment"),this.verifyMicrodepositsForSetup=Ac("verifyMicrodepositsForSetup"),(Zt(this._betas,$t.acss_debit_beta_1)||Zt(this._betas,$t.acss_debit_beta_2))&&(this.verifyMicrodepositsForPayment=ue(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n){var r=oi(t,"verifyMicrodepositsForSetup"),o=Z(B,n,"stripe.verifyMicrodepositsForSetup");return e.action.verifyMicrodepositsForPayment({intentSecret:r,data:o.value}).then(ga)}.apply(void 0,[o._controller].concat(t))}),this.verifyMicrodepositsForSetup=ue(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n){var r=ai(t,"verifyMicrodepositsForSetup"),o=Z(B,n,"stripe.verifyMicrodepositsForSetup");return e.action.verifyMicrodepositsForSetup({intentSecret:r,data:o.value}).then(wa)}.apply(void 0,[o._controller].concat(t))})),this.confirmAcssDebitPayment=Ac("confirmAcssDebitPayment"),this.confirmAcssDebitSetup=Ac("confirmAcssDebitSetup"),Zt(this._betas,$t.acss_debit_beta_1)?(this.confirmAcssDebitPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return zi.apply(void 0,[o._controller,r()].concat(t))}),this.confirmAcssDebitSetup=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Us.apply(void 0,[o._controller,r()].concat(t))})):Zt(this._betas,$t.acss_debit_beta_2)&&(this.confirmAcssDebitPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(t,n,e,r,o){var a="confirmAcssDebitPayment",i=Oa.acss_debit,s=oi(e,a),c=si(i,a,r);return fs(o,a),Bi(c)?Fi({controller:t,intentSecret:s,mode:"payment",billingDetails:Di(c)}).then(function(e){switch(e.type){case"error":return{error:e.error};case"success":return t.action.confirmPaymentIntent({mode:{tag:"paymentMethod",paymentMethod:e.paymentMethod,options:c.mode.options||{}},otherParams:c.otherParams,intentSecret:s,expectedType:i,options:{handleActions:!1},mids:n}).then(ga);default:return Object(h.a)(e.type)}}):t.action.confirmPaymentIntent(ls({},c,{intentSecret:s,expectedType:i,options:{handleActions:!1},mids:n})).then(ga)}.apply(void 0,[o._controller,r()].concat(t))}),this.confirmAcssDebitSetup=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(t,n,e,r,o){var a="confirmAcssDebitSetup",i=Oa.acss_debit,s=ai(e,a),c=si(i,a,r);return fs(o,a),Bi(c)?Fi({controller:t,intentSecret:s,mode:"setup",billingDetails:Di(c)}).then(function(e){switch(e.type){case"error":return{error:e.error};case"success":return t.action.confirmSetupIntent({mode:{tag:"paymentMethod",paymentMethod:e.paymentMethod,options:c.mode.options||{}},otherParams:c.otherParams,intentSecret:s,expectedType:i,options:{handleActions:!1},mids:n}).then(wa);default:return Object(h.a)(e.type)}}):t.action.confirmSetupIntent(ls({},c,{intentSecret:s,expectedType:i,options:{handleActions:!1},mids:n})).then(wa)}.apply(void 0,[o._controller,r()].concat(t))})),Zt(this._betas,$t.return_intents_beta_1)&&(this.confirmReturnIntent=ue(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n){return e.action.confirmReturnIntent({returnIntentId:t,data:n}).then(Is)}.apply(void 0,[o._controller].concat(t))})),this.confirmBoletoPayment=Ac("confirmBoletoPayment"),Zt(this._betas,$t.boleto_pm_beta_1)&&(this.confirmBoletoPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Vi.apply(void 0,[o._controller,r()].concat(t))})),this.confirmKonbiniPayment=Ac("confirmKonbiniPayment"),Zt(this._betas,$t.konbini_pm_beta_1)&&(this.confirmKonbiniPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return ts.apply(void 0,[o._controller,r()].concat(t))})),Zt(this._betas,$t.oxxo_pm_beta_1)&&(this.confirmOxxoPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return ns.apply(void 0,[o._controller,r()].concat(t))})),this.confirmWechatPayPayment=Ac("confirmWechatPayPayment"),Zt(this._betas,$t.wechat_pay_pm_beta_1)&&(this.confirmWechatPayPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r,o){if(o&&!0===o.handleActions)throw new T.a("Expected option `handleActions` to be `false`.");var a=Hi({},r,{payment_method:Hi({},r&&r.payment_method||{}),payment_method_options:Hi({},r&&r.payment_method_options||{},{wechat_pay:Hi({},r&&r.payment_method_options&&r.payment_method_options.wechat_pay||{},{client:"web"})})});return Mi("confirmWechatPayPayment",Oa.wechat_pay)(e,t,n,a,o)}.apply(void 0,[o._controller,r()].concat(t))})),Zt(this._betas,$t.wechat_pay_pm_beta_2)&&(this.confirmWechatPayPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r,o){if(o&&!0===o.handleActions)throw new T.a("Expected option `handleActions` to be `false`.");if(!r||!r.payment_method_options||!r.payment_method_options.wechat_pay||"web"!==r.payment_method_options.wechat_pay.client)throw new T.a("Expected client value `web` in payment_method_options.");var a=Hi({},r,{payment_method:Hi({},r&&r.payment_method||{}),payment_method_options:Hi({},r&&r.payment_method_options||{},{wechat_pay:Hi({},r&&r.payment_method_options&&r.payment_method_options.wechat_pay||{})})});return Mi("confirmWechatPayPayment",Oa.wechat_pay)(e,t,n,a,o)}.apply(void 0,[o._controller,r()].concat(t))})),this.confirmPayPalPayment=Ac("confirmPayPalPayment"),Zt(this._betas,$t.paypal_pm_beta_1)&&(this.confirmPayPalPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return as.apply(void 0,[o._controller,r()].concat(t))})),this.confirmUpiPayment=Ac("confirmUpiPayment"),Zt(this._betas,$t.upi_beta_1)&&(this.confirmUpiPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return cs.apply(void 0,[o._controller,r()].concat(t))})),this.confirmNetbankingPayment=Ac("confirmNetbankingPayment"),Zt(this._betas,$t.netbanking_beta_1)&&(this.confirmNetbankingPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return us.apply(void 0,[o._controller,r()].concat(t))})),this.confirmInstantDebitsPilotPayment=Ac("confirmInstantDebitsPilotPayment"),Zt(this._betas,$t.instant_debits_beta_1)&&(this.confirmInstantDebitsPilotPayment=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return qi.apply(void 0,[o._controller,r()].concat(t))})),t&&(this.handleHosted3DS2Payment=ce(function(e){return t=e,n=o._controller,r=oi(t,"handleHosted3DS2Setup [internal]"),n.action.retrievePaymentIntent({intentSecret:r,hosted:!0}).then(Ni(n,Oa.card,!1,!0));var t,n,r}),this.handleHosted3DS2Setup=ce(function(e){return t=e,n=o._controller,r=ai(t,"handleHosted3DS2Setup [internal]"),n.action.retrieveSetupIntent({intentSecret:r,hosted:!0}).then(Rs(n,Oa.card,!1,!0));var t,n,r}))}},{key:"_attachLegacyPaymentIntentMethods",value:function(){function r(){return o._mids()}var o=this,a=Zt(this._betas,$t.payment_intent_beta_1)||Zt(this._betas,$t.payment_intent_beta_2),e=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return ks.apply(void 0,[!0,o._controller,r()].concat(t))}),t=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return ks.apply(void 0,[!1,o._controller,r()].concat(t))}),i=Object(Xe.a)(As,kc("handleCardPayment")),n=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.apply(void 0,[!0,o._controller,r(),a].concat(t))}),s=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return i.apply(void 0,[!1,o._controller,r(),a].concat(t))}),c=Object(Xe.a)(Ms,kc("handleCardSetup")),u=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.apply(void 0,[o._controller,r()].concat(t))}),l=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r,o){var a=Z(Ba,n,"stripe.confirmSetupIntent intent secret").value,i=null,s=Os(!1,!1,i,"confirmSetupIntent")(r,o);return e.action.confirmSetupIntent($s({},s,{otherParams:$s({},s.otherParams),intentSecret:a,expectedType:i,options:{handleActions:!1},mids:t})).then(wa)}.apply(void 0,[o._controller,r()].concat(t))}),p=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r,o,a){var i=Z(Da,r,"stripe.handleSepaDebitPayment intent secret").value,s=Oa.sepa_debit,c=Os(!1,n,s,"handleSepaDebitPayment")(o,a),u=!o&&!a;return e.action.confirmPaymentIntent(Fs({},c,{intentSecret:i,expectedType:s,options:{handleActions:!0},mids:t})).then(Ni(e,s,u,!1))}.apply(void 0,[o._controller,r(),a].concat(t))}),d=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r,o){var a=Z(Ba,n,"stripe.handleSepaDebitSetup intent secret").value,i=Oa.sepa_debit,s=Os(!1,!1,i,"handleSepaDebitSetup")(r,o),c=!r&&!o;return e.action.confirmSetupIntent($s({},s,{intentSecret:a,expectedType:i,options:{handleActions:!0},mids:t})).then(Rs(e,i,c,!1))}.apply(void 0,[o._controller,r()].concat(t))}),f=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ts.apply(void 0,[!0,o._controller,r(),a].concat(t))}),m=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ts.apply(void 0,[!1,o._controller,r(),a].concat(t))}),h=K(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r,o,a){var i=Z(Da,r,"stripe.handleFpxPayment intent secret").value,s=Oa.fpx,c=Os(!1,n,s,"handleFpxPayment")(o,a),u=!o&&!a;return e.action.confirmPaymentIntent(Fs({},c,{intentSecret:i,expectedType:s,options:{handleActions:!0},mids:t})).then(Ni(e,s,u,!1))}.apply(void 0,[o._controller,r(),a].concat(t))});this.handleCardPayment=s,this.confirmPaymentIntent=t,this.handleCardSetup=u,this.confirmSetupIntent=l,this.fulfillPaymentIntent=Ac("fulfillPaymentIntent"),this.handleSepaDebitPayment=Ac("handleSepaDebitPayment"),this.handleSepaDebitSetup=Ac("handleSepaDebitSetup"),this.handleIdealPayment=Ac("handleIdealPayment"),this.handleFpxPayment=Ac("handleFpxPayment"),Zt(this._betas,$t.payment_intent_beta_1)?this.fulfillPaymentIntent=n:(Zt(this._betas,$t.payment_intent_beta_3)||Zt(this._betas,$t.payment_intent_beta_2))&&(this.handleCardPayment=n),Zt(this._betas,$t.payment_intent_beta_3)&&(this.confirmPaymentIntent=e,this.handleIdealPayment=f,this.handleSepaDebitPayment=p),Zt(this._betas,$t.fpx_bank_beta_1)&&(this.handleFpxPayment=h),Zt(this._betas,$t.ideal_pm_beta_1)&&(this.handleIdealPayment=m),Zt(this._betas,$t.sepa_pm_beta_1)&&(this.handleSepaDebitPayment=p,this.handleSepaDebitSetup=d)}},{key:"_attachPrivateMethodsForCheckout",value:function(e){var a=this;e&&(this.sendInteractionEvent=Vt,this.tryNextAction=ue(function(e,t){var n=Z(Na,e,"Payment Intent").value,r=Object.keys(Oa).map(function(e){return Oa[e]}),o=Z(I.apply(void 0,gc(r)),t,"Source type").value;return("payment_intent"===n.object?Ri:Cs)(a._controller,n,o,"auto",!1)}))}},{key:"_attachCheckoutMethods",value:function(e){function t(){return n._mids()}var n=this,r=e.reduce(function(e,t){var n=Object(w.a)(Qs,function(e){return e===t});return n?[].concat(gc(e),[n]):e},[]);this.redirectToCheckout=function(e){return dc(n._controller,r,t,n._locale,e)}}},{key:"_attachGetters",value:function(){var t=this,a=new $a(function(e){t._registerWrapper({name:e,version:null})});["elements","createToken","createSource","createPaymentMethod"].forEach(function(r){var o,e;t.hasOwnProperty(r)&&(o=t[r],e=function(){a.called(r);for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return o.apply(this,t)},Object.defineProperty(t,r,{enumerable:!0,get:function(){return a.got(r),e}}))})}},{key:"_attachIssuingCardMethods",value:function(){var e,n=this;this.retrieveIssuingCard=(e="retrieveIssuingCard",function(){throw new T.a("You cannot call `stripe."+e+"` without supplying an Issuing beta flag when initializing Stripe.js.")}),Zt(this._betas,$t.issuing_elements_1)&&(this.retrieveIssuingCard=ue(function(e,t){return Bs(e,t,n._controller)}))}},{key:"_attachIdentityMethods",value:function(){var e,t=this;this.verifyIdentity=(e="verifyIdentity",function(){throw new T.a("You cannot call `stripe."+e+"` without supplying an Identity beta flag when initializing Stripe.js.")}),Zt(this._betas,$t.identity_dialog_1)&&(this.verifyIdentity=ce(function(e){return xs(e,t._controller)}))}},{key:"_attachControllerGetter",value:function(t,n,r,o){var a=this,i=[],s=document.readyState,c=void 0;Object.defineProperties(this,{_registerWrapper:{enumerable:!1,configurable:!0,writable:!1,value:function(e){i.push(e)}},_controller:{enumerable:!0,configurable:!0,get:function(){if(c)return c;var e=document.readyState;return c=new Mn(vc({apiKey:a._apiKey,apiVersion:t,__privateApiUrl:n,stripeAccount:r,betas:a._betas,stripeJsId:Rc.stripeJsId,stripeJsLoadTimestamp:wc,stripeCreateTimestamp:o,onFirstLoad:function(){try{Oc(c,s,e)}catch(e){}},listenerRegistry:a._listenerRegistry},a._locale?{locale:a._locale}:{})),Object.defineProperties(a,{_registerWrapper:{value:xc,writable:!1,enumerable:!1,configurable:!0},_controller:{value:c,writable:!0,enumerable:!0,configurable:!0}}),i.forEach(function(e){return a._registerWrapper(e)}),i.splice(0),c}}})}},{key:"_ensureHTTPS",value:function(){var e=window.location.protocol,t=-1!==["https:","file:","ionic:","httpsionic:","chrome-extension:","moz-extension:"].indexOf(e),n=-1!==["localhost","127.0.0.1","0.0.0.0"].indexOf(window.location.hostname),r=this._keyMode===c.live,o="Live Stripe.js integrations must use HTTPS. For more information: https://stripe.com/docs/security/guide#tls";if(!t){if(r&&!n)throw this._controller.report("user_error.non_https_error",{protocol:e}),new T.a(o);!r||n?window.console&&console.warn("You may test your Stripe.js integration over HTTP. However, live Stripe.js integrations must use HTTPS."):window.console&&console.warn(o)}}},{key:"_ensureStripeHosted",value:function(e){if(!e)throw this._controller.report("user_error.self_hosted"),new T.a("Stripe.js must be loaded from js.stripe.com. For more information https://stripe.com/docs/stripe-js/reference#including-stripejs")}},{key:"_mids",value:function(){return Rc._ec?Rc._ec.ids():null}}]),Rc);function Rc(e,t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,Rc),Mc.call(this);var r=new Jt.a,o=Z(jc,e||{},"Stripe()"),a=o.value,i=o.warnings,s=a.apiKey,c=a.stripeAccount,u=a.apiVersion,l=a.locale,p=a.__privateApiUrl,d=a.__checkout,f=a.__hosted3DS,m=a.canCreateRadarSession,h=a.betas;Wa(s),d&&d.mids&&(Rc._ec=Wt({checkoutIds:d.mids})),this._apiKey=s.trim(),this._keyMode=_(this._apiKey),this._betas=h||[],this._locale=Gn(l,this._betas)||null,this._stripeAccount=c||null,this._isCheckout=!!d,this._attachControllerGetter(u,p,c,r),i.forEach(function(e){return n._controller.warn(e)}),tn(),this._ensureHTTPS(),this._ensureStripeHosted(t),this._attachPaymentIntentMethods(this._betas,!!f),this._attachLegacyPaymentIntentMethods(this._betas),this._attachCheckoutMethods(this._betas),this._attachPrivateMethodsForCheckout(this._isCheckout),this._attachCreateRadarSession(m||!1),this._attachGetters(),this._attachIssuingCardMethods(this._betas),this._attachIdentityMethods(this._betas)}Cc.version=3,Cc.stripeJsId=G(),Cc._ec=(Tc=new RegExp(document.location.protocol+"//"+document.location.host),"https://checkout.stripe.com/".match(Tc)?null:Wt());function Nc(e,t){return new Lc(Bc({apiKey:e},t&&"object"===(void 0===t?"undefined":Dc(t))?t:{}),Fc)}var Mc=function(){var l=this;this._listenerRegistry=xt(),this.elements=ce(function(e){return new ma(l._controller,l._listenerRegistry,{stripeJsLoadTimestamp:wc,stripeCreateTimestamp:l._controller._createTimestamp},vc({},l._locale?{locale:l._locale}:{},e,{betas:l._betas}))}),this.createToken=ue(function(e,t){var c,u,n=l._mids();return"cvc_update"===e?function(e,t,n){var r=la(t);if(r&&"cardCvc"===r._componentName){var o=r._implementation._frame.id;return e.action.tokenizeCvcUpdate({frameId:o,mids:n}).then(fc)}throw new T.a("You must provide a `cardCvc` Element to create a `cvc_update` token.")}(l._controller,t,n):(c=l._controller,u=n,function(e,t){var n=la(e);if(n){var r=n._implementation._frame.id,o=n._componentName,a=mc(t);return c.action.tokenizeWithElement({frameId:r,elementName:o,tokenData:a,mids:u}).then(fc)}if("string"!=typeof e)throw new T.a("You must provide a Stripe Element or a valid token type to create a Token.");var i=e,s=mc(t);return c.action.tokenizeWithData({elementName:null,type:i,tokenData:s,mids:u}).then(fc)}(e,t))}),this.createSource=ue(function(e,t){var n=la(e),r=Za(n?t:e),o=r||{type:null,data:{}},a=o.type,i=o.data;if(n){var s=n._implementation._frame.id,c=n._componentName;return!r&&va(c)?ae.a.reject(new T.a("Please provide Source creation parameters to createSource.")):l._controller.action.createSourceWithElement({frameId:s,elementName:c,type:a,sourceData:i,mids:l._mids()}).then(ei)}return r?a?l._controller.action.createSourceWithData({elementName:null,type:a,sourceData:i,mids:l._mids()}).then(ei):ae.a.reject(new T.a("Please provide a source type to createSource.")):ae.a.reject(new T.a("Please provide either an Element or Source creation parameters to createSource."))}),this.retrieveSource=ce(function(e){var t=Z(yi,{source:e},"retrieveSource"),n=t.value;return t.warnings.forEach(function(e){return l._controller.warn(e)}),l._controller.action.retrieveSource(n).then(ei)}),this.paymentRequest=ue(function(e,t){!function(e){if(e===c.unknown)throw new T.a("It looks like you're using an older Stripe key. In order to use this API, you'll need to use a modern API key, which is prefixed with 'pk_live_' or 'pk_test_'.\n    You can roll your publishable key here: https://dashboard.stripe.com/account/apikeys")}(l._keyMode);var n=l._isCheckout&&t?t:null;return ha(l._controller,{apiKey:l._apiKey,accountId:l._stripeAccount},l._mids(),e,l._betas,n,l._listenerRegistry)})},xc=function(e){var t,n,r,o,a=z(qa,e,"WrapperLibrary");"error"!==a.type?(n=(t=a.value).name,r=t.version,o=t.startTime,this._controller.registerWrapper({name:n,version:r,startTime:o})):this._controller.report("register_wrapper.error",{error:a.error.message})},Lc=Cc,Dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bc=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Fc=function(){if(document.currentScript){var e=Object(v.d)(document.currentScript.src);return!e||Object(yt.b)(e.origin)}return!0}();Nc.version=Lc.version,window.Stripe&&2===window.Stripe.version&&!window.Stripe.StripeV3?window.Stripe.StripeV3=Nc:window.Stripe?window.console&&console.warn("It looks like Stripe.js was loaded more than one time. Please only load it once per page."):window.Stripe=Nc;t.default=Nc}]);