@adyen/adyen-web
Version:
[](https://www.npmjs.com/package/@adyen/adyen-web)
1 lines • 621 kB
JavaScript
import e from"@babel/runtime-corejs3/helpers/asyncToGenerator";import t from"@babel/runtime-corejs3/regenerator";import n from"@babel/runtime-corejs3/core-js-stable/object/keys";import r from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";import a from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";import o from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";import i from"@babel/runtime-corejs3/core-js-stable/object/define-properties";import s from"@babel/runtime-corejs3/core-js-stable/object/define-property";import l from"@babel/runtime-corejs3/helpers/typeof";import c from"@babel/runtime-corejs3/helpers/objectWithoutProperties";import u from"@babel/runtime-corejs3/helpers/classCallCheck";import d from"@babel/runtime-corejs3/helpers/createClass";import p from"@babel/runtime-corejs3/helpers/defineProperty";import h from"@babel/runtime-corejs3/core-js-stable/instance/for-each";import f from"@babel/runtime-corejs3/core-js-stable/instance/filter";import m from"@babel/runtime-corejs3/core-js-stable/instance/bind";import y from"@babel/runtime-corejs3/core-js-stable/instance/includes";import v from"@babel/runtime-corejs3/core-js-stable/instance/concat";import g from"@babel/runtime-corejs3/core-js-stable/promise";import b from"@babel/runtime-corejs3/core-js-stable/instance/find";import _ from"@babel/runtime-corejs3/core-js-stable/json/stringify";import k from"@babel/runtime-corejs3/core-js-stable/object/freeze";import C from"@babel/runtime-corejs3/helpers/slicedToArray";import w from"@babel/runtime-corejs3/helpers/toConsumableArray";import N from"@babel/runtime-corejs3/core-js-stable/instance/index-of";import S from"@babel/runtime-corejs3/core-js-stable/instance/reduce";import P from"@babel/runtime-corejs3/core-js-stable/instance/values";import A from"@babel/runtime-corejs3/core-js-stable/instance/map";import x from"@babel/runtime-corejs3/core-js-stable/parse-int";import F from"@babel/runtime-corejs3/core-js-stable/reflect/construct";import R from"@babel/runtime-corejs3/helpers/extends";import I from"@babel/runtime-corejs3/helpers/assertThisInitialized";import E from"@babel/runtime-corejs3/helpers/inherits";import O from"@babel/runtime-corejs3/helpers/possibleConstructorReturn";import B from"@babel/runtime-corejs3/helpers/getPrototypeOf";import{render as M,h as T,options as D,createContext as L,Component as V,Fragment as j,toChildArray as U,cloneElement as q}from"preact";import K from"@babel/runtime-corejs3/core-js-stable/set-timeout";import H from"classnames";import z from"@babel/runtime-corejs3/helpers/wrapNativeSuper";import W from"@babel/runtime-corejs3/core-js-stable/instance/slice";import G from"@babel/runtime-corejs3/helpers/get";import Y from"@babel/runtime-corejs3/core-js-stable/instance/every";import $ from"@babel/runtime-corejs3/core-js-stable/date/now";import Q from"@babel/runtime-corejs3/core-js-stable/instance/trim-start";import Z from"@babel/runtime-corejs3/core-js-stable/array/is-array";import J from"@babel/runtime-corejs3/core-js-stable/object/values";import X from"@babel/runtime-corejs3/core-js-stable/instance/trim";import ee from"@babel/runtime-corejs3/core-js-stable/instance/last-index-of";import te from"@babel/runtime-corejs3/core-js-stable/instance/fill";import ne from"@babel/runtime-corejs3/core-js/global-this";import re from"@babel/runtime-corejs3/core-js-stable/symbol";import ae from"@babel/runtime-corejs3/core-js-stable/symbol/iterator";import oe from"@babel/runtime-corejs3/core-js-stable/object/get-own-property-names";import ie from"@babel/runtime-corejs3/core-js-stable/instance/entries";import se from"@babel/runtime-corejs3/core-js-stable/url-search-params";import le from"@babel/runtime-corejs3/core-js-stable/object/create";import ce from"@babel/runtime-corejs3/core-js-stable/instance/starts-with";import ue from"@babel/runtime-corejs3/core-js-stable/instance/find-index";import de from"@babel/runtime-corejs3/core-js-stable/instance/some";import pe from"@babel/runtime-corejs3/core-js-stable/instance/flat";import he from"@babel/runtime-corejs3/core-js-stable/object/entries";import fe from"@babel/runtime-corejs3/core-js-stable/instance/sort";import me from"@babel/runtime-corejs3/core-js-stable/number/is-nan";import ye from"@babel/runtime-corejs3/core-js-stable/object/assign";import ve from"@babel/runtime-corejs3/core-js-stable/url";import ge from"@babel/runtime-corejs3/core-js-stable/instance/reverse";import be from"@babel/runtime-corejs3/core-js-stable/array/from";import _e from"@babel/runtime-corejs3/core-js/get-iterator-method";import ke from"@babel/runtime-corejs3/core-js-stable/string/from-code-point";import Ce from"@babel/runtime-corejs3/core-js-stable/set-interval";import we from"@babel/runtime-corejs3/core-js-stable/instance/repeat";import Ne from"@babel/runtime-corejs3/core-js-stable/set";var Se={payButton:"Pay","payButton.redirecting":"Redirecting...","payButton.with":"Pay %{value} with %{maskedData}","payButton.saveDetails":"Save details",close:"Close",storeDetails:"Save for my next payment",readMore:"Read more","creditCard.holderName":"Name on card","creditCard.holderName.placeholder":"J. Smith","creditCard.holderName.invalid":"Enter name as shown on card","creditCard.numberField.title":"Card number","creditCard.numberField.placeholder":"1234 5678 9012 3456","creditCard.expiryDateField.title":"Expiry date","creditCard.expiryDateField.placeholder":"MM/YY","creditCard.expiryDateField.month":"Month","creditCard.expiryDateField.month.placeholder":"MM","creditCard.expiryDateField.year.placeholder":"YY","creditCard.expiryDateField.year":"Year","creditCard.cvcField.title":"Security code","creditCard.cvcField.placeholder":"123","creditCard.storeDetailsButton":"Remember for next time","creditCard.cvcField.placeholder.4digits":"4 digits","creditCard.cvcField.placeholder.3digits":"3 digits","creditCard.taxNumber.placeholder":"YYMMDD / 0123456789",installments:"Number of installments",installmentOption:"%{times}x %{partialValue}",installmentOptionMonths:"%{times} months","installments.oneTime":"One time payment","installments.installments":"Installments payment","installments.revolving":"Revolving payment","sepaDirectDebit.ibanField.invalid":"Invalid account number","sepaDirectDebit.nameField.placeholder":"J. Smith","sepa.ownerName":"Holder Name","sepa.ibanNumber":"Account Number (IBAN)","error.title":"Error","error.subtitle.redirect":"Redirect failed","error.subtitle.payment":"Payment failed","error.subtitle.refused":"Payment refused","error.message.unknown":"An unknown error occurred","errorPanel.title":"Existing errors","idealIssuer.selectField.title":"Bank","idealIssuer.selectField.placeholder":"Select your bank","creditCard.success":"Payment Successful",loading:"Loading\u2026",continue:"Continue",continueTo:"Continue to","wechatpay.timetopay":"You have %@ to pay","sr.wechatpay.timetopay":"You have %#minutes%# %#seconds%# to pay","wechatpay.scanqrcode":"Scan QR code",personalDetails:"Personal details",companyDetails:"Company details","companyDetails.name":"Company name","companyDetails.registrationNumber":"Registration number",socialSecurityNumber:"Social security number",firstName:"First name","firstName.invalid":"Enter your first name",infix:"Prefix",lastName:"Last name","lastName.invalid":"Enter your last name",mobileNumber:"Mobile number","mobileNumber.invalid":"Invalid mobile number",city:"City",postalCode:"Postal code","postalCode.optional":"Postal code (optional)",countryCode:"Country Code",telephoneNumber:"Telephone number",dateOfBirth:"Date of birth",shopperEmail:"Email address",gender:"Gender","gender.notselected":"Select your gender",male:"Male",female:"Female",billingAddress:"Billing address",street:"Street",stateOrProvince:"State or province",country:"Country",houseNumberOrName:"House number",separateDeliveryAddress:"Specify a separate delivery address",deliveryAddress:"Delivery Address","deliveryAddress.firstName":"Recipient first name","deliveryAddress.lastName":"Recipient last name",zipCode:"Zip code",apartmentSuite:"Apartment / Suite",provinceOrTerritory:"Province or Territory",cityTown:"City / Town",address:"Address","address.placeholder":"Find your address","address.errors.incomplete":"Enter an address to continue","address.enterManually":"Enter address manually",state:"State","field.title.optional":"(optional)","creditCard.cvcField.title.optional":"Security code (optional)","issuerList.wallet.placeholder":"Select your wallet",privacyPolicy:"Privacy policy","afterPay.agreement":"I agree with the %@ of Riverty",paymentConditions:"payment conditions",openApp:"Open the app","voucher.readInstructions":"Read instructions","voucher.introduction":"Thank you for your purchase, please use the following coupon to complete your payment.","voucher.expirationDate":"Expiration Date","voucher.alternativeReference":"Alternative Reference","dragonpay.voucher.non.bank.selectField.placeholder":"Select your provider","dragonpay.voucher.bank.selectField.placeholder":"Select your bank","voucher.paymentReferenceLabel":"Payment Reference","voucher.surcharge":"Incl. %@ surcharge","voucher.introduction.doku":"Thank you for your purchase, please use the following information to complete your payment.","voucher.shopperName":"Shopper Name","voucher.merchantName":"Merchant","voucher.introduction.econtext":"Thank you for your purchase, please use the following information to complete your payment.","voucher.telephoneNumber":"Phone Number","voucher.shopperReference":"Shopper Reference","voucher.collectionInstitutionNumber":"Collection Institution Number","voucher.econtext.telephoneNumber.invalid":"Telephone number must be 10 or 11 digits long","boletobancario.btnLabel":"Generate Boleto","boleto.sendCopyToEmail":"Send a copy to my email","button.copy":"Copy","button.download":"Download","boleto.socialSecurityNumber":"CPF/CNPJ","boleto.socialSecurityNumber.invalid":"Field is not valid","creditCard.storedCard.description.ariaLabel":"Stored card ends in %@","voucher.entity":"Entity",donateButton:"Donate",notNowButton:"Not now",thanksForYourSupport:"Thanks for your support!","resultMessages.preauthorized":"Details saved",preauthorizeWith:"Preauthorize with",confirmPreauthorization:"Confirm preauthorization",confirmPurchase:"Confirm purchase",applyGiftcard:"Redeem",giftcardBalance:"Gift card balance",deductedBalance:"Deducted balance","creditCard.pin.title":"Pin","creditCard.encryptedPassword.label":"First 2 digits of card password","creditCard.encryptedPassword.placeholder":"12","creditCard.encryptedPassword.invalid":"Invalid password","creditCard.taxNumber":"Cardholder birthdate or Corporate registration number","creditCard.taxNumber.label":"Cardholder birthdate (YYMMDD) or Corporate registration number (10 digits)","creditCard.taxNumber.labelAlt":"Corporate registration number (10 digits)","creditCard.taxNumber.invalid":"Invalid Cardholder birthdate or Corporate registration number","storedPaymentMethod.disable.button":"Remove","storedPaymentMethod.disable.confirmation":"Remove stored payment method","storedPaymentMethod.disable.confirmButton":"Yes, remove","storedPaymentMethod.disable.cancelButton":"Cancel","ach.bankAccount":"Bank account","ach.accountHolderNameField.title":"Account holder name","ach.accountHolderNameField.placeholder":"J. Smith","ach.accountHolderNameField.invalid":"Invalid account holder name","ach.accountNumberField.title":"Account number","ach.accountNumberField.invalid":"Invalid account number","ach.accountLocationField.title":"ABA routing number","ach.accountLocationField.invalid":"Invalid ABA routing number","ach.savedBankAccount":"Saved bank account","select.state":"Select state","select.stateOrProvince":"Select state or province","select.provinceOrTerritory":"Select province or territory","select.country":"Select country","select.noOptionsFound":"No options found","select.filter.placeholder":"Search...","telephoneNumber.invalid":"Invalid telephone number",qrCodeOrApp:"or","paypal.processingPayment":"Processing payment...",generateQRCode:"Generate QR code","await.waitForConfirmation":"Waiting for confirmation","mbway.confirmPayment":"Confirm your payment on the MB WAY app","shopperEmail.invalid":"Invalid email address","dateOfBirth.format":"DD/MM/YYYY","dateOfBirth.invalid":"Enter a valid date of birth that indicates you are at least 18 years old","blik.confirmPayment":"Open your banking app to confirm the payment.","blik.invalid":"Enter 6 numbers","blik.code":"6-digit code","blik.help":"Get the code from your banking app.","swish.pendingMessage":"After you scan, the status can be pending for up to 10 minutes. Attempting to pay again within this time may result in multiple charges.","field.valid":"Field valid","field.invalid":"Field not valid","error.va.gen.01":"Incomplete field","error.va.gen.02":"Field not valid","error.va.sf-cc-num.01":"Enter a valid card number","error.va.sf-cc-num.02":"Enter the card number","error.va.sf-cc-num.03":"Enter a supported card brand","error.va.sf-cc-num.04":"Enter the complete card number","error.va.sf-cc-dat.01":"Enter a valid expiry date","error.va.sf-cc-dat.02":"Enter a valid expiry date","error.va.sf-cc-dat.03":"Credit card about to expire","error.va.sf-cc-dat.04":"Enter the expiry date","error.va.sf-cc-dat.05":"Enter the complete expiry date","error.va.sf-cc-mth.01":"Enter the expiry month","error.va.sf-cc-yr.01":"Enter the expiry year","error.va.sf-cc-yr.02":"Enter the complete expiry year","error.va.sf-cc-cvc.01":"Enter the security code","error.va.sf-cc-cvc.02":"Enter the complete security code","error.va.sf-ach-num.01":"Bank account number field is empty","error.va.sf-ach-num.02":"Bank account number is the wrong length","error.va.sf-ach-loc.01":"Bank routing number field is empty","error.va.sf-ach-loc.02":"Bank routing number is the wrong length","error.va.sf-kcp-pwd.01":"Password field is empty","error.va.sf-kcp-pwd.02":"Password is the wrong length","error.giftcard.no-balance":"This gift card has zero balance","error.giftcard.card-error":"In our records we have no gift card with this number","error.giftcard.currency-error":"Gift cards are only valid in the currency they were issued in","amazonpay.signout":"Sign out from Amazon","amazonpay.changePaymentDetails":"Change payment details","partialPayment.warning":"Select another payment method to pay the remaining","partialPayment.remainingBalance":"Remaining balance will be %{amount}","bankTransfer.beneficiary":"Beneficiary","bankTransfer.iban":"IBAN","bankTransfer.bic":"BIC","bankTransfer.reference":"Reference","bankTransfer.introduction":"Continue to create a new bank transfer payment. You can use the details in the following screen to finalize this payment.","bankTransfer.instructions":"Thank you for your purchase, please use the following information to complete your payment.","bacs.accountHolderName":"Bank account holder name","bacs.accountHolderName.invalid":"Invalid bank account holder name","bacs.accountNumber":"Bank account number","bacs.accountNumber.invalid":"Invalid bank account number","bacs.bankLocationId":"Sort code","bacs.bankLocationId.invalid":"Invalid sort code","bacs.consent.amount":"I agree that the above amount will be deducted from my bank account.","bacs.consent.account":"I confirm the account is in my name and I am the only signatory required to authorise the Direct Debit on this account.",edit:"Edit","bacs.confirm":"Confirm and pay","bacs.result.introduction":"Download your Direct Debit Instruction (DDI / Mandate)","download.pdf":"Download PDF","creditCard.encryptedCardNumber.aria.iframeTitle":"Iframe for card number","creditCard.encryptedCardNumber.aria.label":"Card number","creditCard.encryptedExpiryDate.aria.iframeTitle":"Iframe for expiry date","creditCard.encryptedExpiryDate.aria.label":"Expiry date","creditCard.encryptedExpiryMonth.aria.iframeTitle":"Iframe for expiry month","creditCard.encryptedExpiryMonth.aria.label":"Expiry month","creditCard.encryptedExpiryYear.aria.iframeTitle":"Iframe for expiry year","creditCard.encryptedExpiryYear.aria.label":"Expiry year","creditCard.encryptedSecurityCode.aria.iframeTitle":"Iframe for security code","creditCard.encryptedSecurityCode.aria.label":"Security code","creditCard.encryptedPassword.aria.iframeTitle":"Iframe for password","creditCard.encryptedPassword.aria.label":"First 2 digits of card password","giftcard.encryptedCardNumber.aria.iframeTitle":"Iframe for card number","giftcard.encryptedCardNumber.aria.label":"Card number","giftcard.encryptedSecurityCode.aria.iframeTitle":"Iframe for pin","giftcard.encryptedSecurityCode.aria.label":"Pin",giftcardTransactionLimit:"Max. %{amount} allowed per transaction on this gift card","ach.encryptedBankAccountNumber.aria.iframeTitle":"Iframe for bank account number","ach.encryptedBankAccountNumber.aria.label":"Account number","ach.encryptedBankLocationId.aria.iframeTitle":"Iframe for bank routing number","ach.encryptedBankLocationId.aria.label":"ABA routing number","pix.instructions":"Open the app with the PIX registered key, choose Pay with PIX and scan the QR Code or copy and paste the code","twint.saved":"saved",orPayWith:"or pay with",invalidFormatExpects:"Invalid format. Expected format: %{format}","upi.qrCodeWaitingMessage":"Scan the QR code using your preferred UPI app to complete the payment","upi.vpaWaitingMessage":"Open your UPI app to confirm the payment","upi.modeSelection":"Make a selection on how you would like to use UPI.","onlineBanking.termsAndConditions":"By continuing you agree with the %#terms and conditions%#","onlineBankingPL.termsAndConditions":"By continuing you agree with the %#regulations%# and %#information obligation%# of Przelewy24","ctp.loading.poweredByCtp":"Powered by Click to Pay","ctp.loading.intro":"We are checking to see if you have any saved cards with Click to Pay...","ctp.login.title":"Continue to Click to Pay","ctp.login.subtitle":"Enter the email address that is connected to Click to Pay to continue.","ctp.login.inputLabel":"Email","ctp.logout.notYou":"Not you?","ctp.logout.notYourCards":"Not your cards?","ctp.logout.notYourCard":"Not your card?","ctp.logout.notYourProfile":"Not your profile?","ctp.otp.fieldLabel":"One time code","ctp.otp.resendCode":"Resend code","ctp.otp.codeResent":"Code resent","ctp.otp.title":"Access your Click to Pay cards","ctp.otp.subtitle":"Enter the code %@ sent to %@ to verify it\u2018s you.","ctp.otp.saveCookiesCheckbox.label":"Skip verification next time","ctp.otp.saveCookiesCheckbox.information":"Select to be remembered on your device and browser at participating stores for faster checkout. Not recommended for shared devices.","ctp.otp.saveCookiesCheckbox.shorterInfo":"Select to be remembered on your device and browser","ctp.emptyProfile.message":"No cards registered in this Click to Pay profile","ctp.separatorText":"or use","ctp.cards.title":"Complete payment with Click to Pay","ctp.cards.subtitle":"Select a card to use.","ctp.cards.expiredCard":"Expired","ctp.manualCardEntry":"Manual card entry","ctp.aria.infoModalButton":"What is Click to Pay","ctp.infoPopup.title":"Click to Pay brings the ease of contactless, online","ctp.infoPopup.subtitle":"A fast, secure payment method supported by Mastercard, Visa and other payment cards.","ctp.infoPopup.benefit1":"Click to Pay uses encryption to keep your information safe and secure","ctp.infoPopup.benefit2":"Use it with merchants worldwide","ctp.infoPopup.benefit3":"Set up once for hassle-free payments in the future","ctp.errors.AUTH_INVALID":"Authentication Invalid","ctp.errors.NOT_FOUND":"No account found, enter a valid email or continue using manual card entry","ctp.errors.ID_FORMAT_UNSUPPORTED":"Format not supported","ctp.errors.FRAUD":"The user account was locked or disabled","ctp.errors.CONSUMER_ID_MISSING":"Consumer identity is missing in the request","ctp.errors.ACCT_INACCESSIBLE":"This account is currently not available, e.g it is locked","ctp.errors.CODE_INVALID":"Incorrect verification code","ctp.errors.CODE_EXPIRED":"This code has expired","ctp.errors.RETRIES_EXCEEDED":"The limit for the number of retries for OTP generation was exceeded","ctp.errors.OTP_SEND_FAILED":"The OTP could not be sent to the recipient","ctp.errors.REQUEST_TIMEOUT":"Something went wrong, try again or use the manual card entry","ctp.errors.UNKNOWN_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.SERVICE_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.SERVER_ERROR":"Something went wrong, try again or use the manual card entry","ctp.errors.INVALID_PARAMETER":"Something went wrong, try again or use the manual card entry","ctp.errors.AUTH_ERROR":"Something went wrong, try again or use the manual card entry","paymentMethodsList.aria.label":"Choose a payment method","companyDetails.name.invalid":"Enter the company name","companyDetails.registrationNumber.invalid":"Enter the registration number","consent.checkbox.invalid":"You must agree with the terms & conditions","form.instruction":"All fields are required unless marked otherwise.","trustly.descriptor":"Instant Bank Payment","trustly.description1":"Pay directly from any of your bank accounts, backed by bank-level security","trustly.description2":"No cards, no app download, no registration","ancv.input.label":"Your ANCV identification","ancv.confirmPayment":"Use your ANCV application to confirm the payment.","ancv.form.instruction":"The Cheque-Vacances application is necessary to validate this payment.","ancv.beneficiaryId.invalid":"Enter a valid email address or ANCV ID","payme.openPayMeApp":"Complete your payment in the PayMe app by authorizing the payment in the app and wait for the confirmation.","payme.redirectButtonLabel":"Open PayMe app","payme.scanQrCode":"Complete your payment by QR code","payme.timeToPay":"This QR code is valid for %@","payme.instructions.steps":"Open the PayMe app.%@Scan the QR code to authorize the payment.%@Complete the payment in the app and wait for confirmation.","payme.instructions.footnote":"Please do not close this page before the payment is completed"},Pe=Object.freeze({__proto__:null,default:Se}),Ae="en-US",xe=Se,Fe={ar:function(){return import("./ar.js")},"cs-CZ":function(){return import("./cs-CZ.js")},"da-DK":function(){return import("./da-DK.js")},"de-DE":function(){return import("./de-DE.js")},"el-GR":function(){return import("./el-GR.js")},"en-US":function(){return Promise.resolve().then((function(){return Pe}))},"es-ES":function(){return import("./es-ES.js")},"fi-FI":function(){return import("./fi-FI.js")},"fr-FR":function(){return import("./fr-FR.js")},"hr-HR":function(){return import("./hr-HR.js")},"hu-HU":function(){return import("./hu-HU.js")},"it-IT":function(){return import("./it-IT.js")},"ja-JP":function(){return import("./ja-JP.js")},"ko-KR":function(){return import("./ko-KR.js")},"nl-NL":function(){return import("./nl-NL.js")},"no-NO":function(){return import("./no-NO.js")},"pl-PL":function(){return import("./pl-PL.js")},"pt-BR":function(){return import("./pt-BR.js")},"pt-PT":function(){return import("./pt-PT.js")},"ro-RO":function(){return import("./ro-RO.js")},"ru-RU":function(){return import("./ru-RU.js")},"sk-SK":function(){return import("./sk-SK.js")},"sl-SI":function(){return import("./sl-SI.js")},"sv-SE":function(){return import("./sv-SE.js")},"zh-CN":function(){return import("./zh-CN.js")},"zh-TW":function(){return import("./zh-TW.js")}};function Re(e,t){var o=n(e);if(r){var i=r(e);t&&(i=f(i).call(i,(function(t){return a(e,t).enumerable}))),o.push.apply(o,i)}return o}function Ie(e){for(var t=1;t<arguments.length;t++){var n,r,l=null!=arguments[t]?arguments[t]:{};t%2?h(n=Re(Object(l),!0)).call(n,(function(t){p(e,t,l[t])})):o?i(e,o(l)):h(r=Re(Object(l))).call(r,(function(t){s(e,t,a(l,t))}))}return e}var Ee=function(e){return e.toLowerCase().substring(0,2)};function Oe(e){var t=e.replace("_","-");if(new RegExp("([a-z]{2})([-])([A-Z]{2})").test(t))return t;var n=t.split("-"),r=C(n,2),a=r[0],o=r[1];if(!a||!o)return null;var i=[a.toLowerCase(),o.toUpperCase()].join("-");return 5===i.length?i:null}function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||e.length<1||e.length>5)return Ae;var n=Oe(e);return N(t).call(t,n)>-1?n:function(e,t){return e&&"string"==typeof e&&b(t).call(t,(function(t){return Ee(t)===Ee(e)}))||null}(n||e,t)}var Me=function(e,t){return e.replace(/%{(\w+)}/g,(function(e,n){return t[n]||""}))},Te=function(){var r=e(t.mark((function e(r){var a,o,i,s=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=s.length>1&&void 0!==s[1]?s[1]:{},o=Be(r,n(Fe))||Ae,e.next=4,Fe[o]();case 4:return i=e.sent,e.abrupt("return",Ie(Ie(Ie({},xe),i.default),!!a[r]&&a[r]));case 6:case"end":return e.stop()}}),e)})));return function(e){return r.apply(this,arguments)}}(),De=function(e,t){var n=e.split(/%#(.*?)%#/gm);if(t.length!==Math.floor(n.length/2))throw Error("The number of functions provided does not match the number of elements in the translation string.");return A(n).call(n,(function(e,n){var r=Math.floor(n/2);return n%2==0?e:t[r](e)}))},Le={IDR:1,JPY:1,KRW:1,VND:1,BYR:1,CVE:1,DJF:1,GHC:1,GNF:1,KMF:1,PYG:1,RWF:1,UGX:1,VUV:1,XAF:1,XOF:1,XPF:1,MRO:10,BHD:1e3,IQD:1e3,JOD:1e3,KWD:1e3,OMR:1e3,LYD:1e3,TND:1e3},Ve={RSD:{minimumFractionDigits:2},AFN:{minimumFractionDigits:2},ALL:{minimumFractionDigits:2},IRR:{minimumFractionDigits:2},LAK:{minimumFractionDigits:2},LBP:{minimumFractionDigits:2},MMK:{minimumFractionDigits:2},SOS:{minimumFractionDigits:2},SYP:{minimumFractionDigits:2},YER:{minimumFractionDigits:2},IQD:{minimumFractionDigits:3}};function je(e,t){var o=n(e);if(r){var i=r(e);t&&(i=f(i).call(i,(function(t){return a(e,t).enumerable}))),o.push.apply(o,i)}return o}function Ue(e){for(var t=1;t<arguments.length;t++){var n,r,l=null!=arguments[t]?arguments[t]:{};t%2?h(n=je(Object(l),!0)).call(n,(function(t){p(e,t,l[t])})):o?i(e,o(l)):h(r=je(Object(l))).call(r,(function(t){s(e,t,a(l,t))}))}return e}var qe=function(e,t){var n=function(e){return Le[e]||100}(t);return x(String(e),10)/n};function Ke(e,t){var o=n(e);if(r){var i=r(e);t&&(i=f(i).call(i,(function(t){return a(e,t).enumerable}))),o.push.apply(o,i)}return o}var He,ze=function(){function e(){var t,r,a=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ae,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};u(this,e),p(this,"supportedLocales",void 0),p(this,"locale",void 0),p(this,"languageCode",void 0),p(this,"translations",xe),p(this,"customTranslations",void 0),p(this,"loaded",void 0);var s=n(Fe);this.customTranslations=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return S(e=n(t)).call(e,(function(e,n){var a=Oe(n)||Be(n,r);return a&&(e[a]=t[n]),e}),{})}(i,s);var l=n(this.customTranslations);this.supportedLocales=f(t=v(r=[]).call(r,w(s),w(l))).call(t,(function(e,t,n){return N(n).call(n,e)===t})),this.locale=Oe(o)||Be(o,this.supportedLocales)||Ae;var c=this.locale.split("-"),d=C(c,1)[0];this.languageCode=d,this.loaded=Te(this.locale,this.customTranslations).then((function(e){a.translations=e}))}return d(e,[{key:"get",value:function(e,t){var n=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{values:{},count:0},r="".concat(t,"__plural"),a=function(e){var n;return v(n="".concat(t,"__")).call(n,e)};return Object.prototype.hasOwnProperty.call(e,a(n.count))?Me(e[a(n.count)],P(n)):Object.prototype.hasOwnProperty.call(e,r)&&n.count>1?Me(e[r],P(n)):Object.prototype.hasOwnProperty.call(e,t)?Me(e[t],P(n)):null}(this.translations,e,t);return null!==n?n:e}},{key:"amount",value:function(e,t,n){return function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=e.toString(),o=qe(a,n),i=t.replace("_","-"),s=Ve[n]?Ue(Ue({},r),Ve[n]):r,l=Ue({style:"currency",currency:n,currencyDisplay:"symbol"},s);try{return o.toLocaleString(i,l)}catch(e){return a}}(e,this.locale,t,n)}},{key:"date",value:function(e){var t=function(e){for(var t=1;t<arguments.length;t++){var n,r,l=null!=arguments[t]?arguments[t]:{};t%2?h(n=Ke(Object(l),!0)).call(n,(function(t){p(e,t,l[t])})):o?i(e,o(l)):h(r=Ke(Object(l))).call(r,(function(t){s(e,t,a(l,t))}))}return e}({year:"numeric",month:"2-digit",day:"2-digit"},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{});return new Date(e).toLocaleDateString(this.locale,t)}}]),e}(),We=function(e,t){var n=t.split(".");return S(n).call(n,(function(e,t){return e&&e[t]?e[t]:void 0}),e)},Ge=d((function e(){var t=this;u(this,e),p(this,"events",{}),p(this,"on",(function(e,n){t.events[e]=t.events[e]||[],t.events[e].push(n)})),p(this,"off",(function(e,n){var r;t.events[e]&&(t.events[e]=S(r=t.events[e]).call(r,(function(e,t){return t!==n&&e.push(t),e}),[]))})),p(this,"emit",(function(e,n){var r;t.events[e]&&h(r=t.events[e]).call(r,(function(e){e(n)}))}))}));function Ye(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}var $e="v3/analytics",Qe="log",Ze="error",Je="info",Xe="action",et="submit",tt="selected",nt="rendered",rt="displayed",at="input",ot="download",it="validationError",st="focus",lt="unfocus",ct="configured",ut="instant_payment_button",dt="list",pt="ApiError",ht="web_700",ft=(p(p(p(p(p(p(p(p(p(p(He={},"error.va.sf-cc-num.02","900"),"error.va.sf-cc-num.04","901"),"error.va.sf-cc-num.01","902"),"error.va.sf-cc-num.03","903"),"error.va.sf-cc-dat.04","910"),"error.va.sf-cc-dat.05","911"),"error.va.sf-cc-dat.01","912"),"error.va.sf-cc-dat.02","913"),"error.va.sf-cc-dat.03","914"),"error.va.sf-cc-mth.01","915"),p(p(p(p(p(p(p(p(p(p(He,"error.va.sf-cc-yr.01","917"),"error.va.sf-cc-yr.02","918"),"error.va.sf-cc-cvc.01","920"),"error.va.sf-cc-cvc.02","921"),"creditCard.holderName.invalid","925"),"boleto.socialSecurityNumber.invalid","926"),"error.va.gen.01.country","930"),"error.va.gen.01.street","931"),"error.va.gen.01.house_number_or_name","932"),"error.va.gen.01.postal_code","933"),p(p(p(p(p(p(p(p(p(p(He,"invalidFormatExpects.postal_code","934"),"error.va.gen.01.city","935"),"error.va.gen.01.state_or_province","936"),"error.va.sf-kcp-pwd.01","940"),"error.va.sf-kcp-pwd.02","941"),"creditCard.taxNumber.invalid","942"),"error.va.sf-ach-num.01","945"),"error.va.sf-ach-num.02","946"),"error.va.sf-ach-loc.01","947"),"error.va.sf-ach-loc.02","948")),mt=["firstName","lastName"];function yt(e,t){var o=n(e);if(r){var i=r(e);t&&(i=f(i).call(i,(function(t){return a(e,t).enumerable}))),o.push.apply(o,i)}return o}function vt(e){for(var t=1;t<arguments.length;t++){var n,r,l=null!=arguments[t]?arguments[t]:{};t%2?h(n=yt(Object(l),!0)).call(n,(function(t){p(e,t,l[t])})):o?i(e,o(l)):h(r=yt(Object(l))).call(r,(function(t){s(e,t,a(l,t))}))}return e}var gt=function(){function e(t){var n;u(this,e),p(this,"_id",v(n="".concat(this.constructor.type,"-")).call(n,Ye())),p(this,"props",void 0),p(this,"state",void 0),p(this,"_node",void 0),p(this,"_component",void 0),p(this,"eventEmitter",new Ge),p(this,"_parentInstance",void 0),p(this,"resources",void 0),this.props=this.formatProps(vt(vt({},this.constructor.defaultProps),{},{setStatusAutomatically:!0},t)),this._parentInstance=this.props._parentInstance,this._node=null,this.state={},this.resources=this.props.modules?this.props.modules.resources:void 0}return d(e,[{key:"formatProps",value:function(e){return e}},{key:"formatData",value:function(){return{}}},{key:"setUpAnalytics",value:function(e){return null}},{key:"submitAnalytics",value:function(e){return null}},{key:"setState",value:function(e){this.state=vt(vt({},this.state),e)}},{key:"data",get:function(){var e,t,n=We(this.props,"modules.risk.data"),r=!(null===(e=We(this.props,"modules.analytics.getEnabled"))||void 0===e||!e())?null===(t=We(this.props,"modules.analytics.getCheckoutAttemptId"))||void 0===t?void 0:t():"do-not-track",a=this.state.order||this.props.order,o=this.formatData();if(o.paymentMethod&&r&&(o.paymentMethod.checkoutAttemptId=r),"riverty"!==this.props.type&&o.billingAddress){var i=o.billingAddress;i.firstName,i.lastName;var s=c(i,mt);o.billingAddress=vt({},s)}return vt(vt(vt(vt({},n&&{riskData:{clientData:n}}),a&&{order:{orderData:a.orderData,pspReference:a.pspReference}}),o),{},{clientStateDataIndicator:!0})}},{key:"render",value:function(){throw new Error("Payment method cannot be rendered.")}},{key:"mount",value:function(e){var t=this,n="string"==typeof e?document.querySelector(e):e;if(!n)throw new Error("Component could not mount. Root node was not found.");var r,a=!this._node;(this._node&&this.unmount(),this._node=n,this._component=this.render(),M(this._component,n),a)&&(this.props.modules&&this.props.modules.analytics&&this.setUpAnalytics({containerWidth:n&&n.offsetWidth,component:this.props.isDropin?"dropin":null!==(r=this.constructor.analyticsType)&&void 0!==r?r:this.constructor.type,flavor:this.props.isDropin?"dropin":"components"}).then((function(){t.props.isDropin||t.submitAnalytics({type:nt})})));return this}},{key:"update",value:function(e){return this.props=this.formatProps(vt(vt({},this.props),e)),this.state={},this.unmount().mount(this._node)}},{key:"remount",value:function(e){if(!this._node)throw new Error("Component is not mounted.");var t=e||this.render();return M(t,this._node,null),this}},{key:"unmount",value:function(){return this._node&&M(null,this._node),this}},{key:"remove",value:function(){this.unmount(),this._parentInstance&&this._parentInstance.remove(this)}}]),e}();p(gt,"defaultProps",{});var bt,_t,kt,Ct,wt=function(e){var t=e.inline,n=void 0!==t&&t,r=e.size,a=void 0===r?"large":r;return T("div",{"data-testid":"spinner",className:"adyen-checkout__spinner__wrapper ".concat(n?"adyen-checkout__spinner__wrapper--inline":"")},T("div",{className:"adyen-checkout__spinner adyen-checkout__spinner--".concat(a)}))},Nt=0,St=[],Pt=[],At=D.__b,xt=D.__r,Ft=D.diffed,Rt=D.__c,It=D.unmount;function Et(e,t){D.__h&&D.__h(_t,e,Nt||t),Nt=0;var n=_t.__H||(_t.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Pt}),n.__[e]}function Ot(e){return Nt=1,Bt(Gt,e)}function Bt(e,t,n){var r=Et(bt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Gt(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=_t,!_t.u)){var a=function(e,t,n){if(!r.__c.__H)return!0;var a=r.__c.__H.__.filter((function(e){return e.__c}));if(a.every((function(e){return!e.__N})))return!o||o.call(this,e,t,n);var i=!1;return a.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&r.__c.props===e)&&(!o||o.call(this,e,t,n))};_t.u=!0;var o=_t.shouldComponentUpdate,i=_t.componentWillUpdate;_t.componentWillUpdate=function(e,t,n){if(this.__e){var r=o;o=void 0,a(e,t,n),o=r}i&&i.call(this,e,t,n)},_t.shouldComponentUpdate=a}return r.__N||r.__}function Mt(e,t){var n=Et(bt++,3);!D.__s&&Wt(n.__H,t)&&(n.__=e,n.i=t,_t.__H.__h.push(n))}function Tt(e,t){var n=Et(bt++,4);!D.__s&&Wt(n.__H,t)&&(n.__=e,n.i=t,_t.__h.push(n))}function Dt(e){return Nt=5,Lt((function(){return{current:e}}),[])}function Lt(e,t){var n=Et(bt++,7);return Wt(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function Vt(e,t){return Nt=8,Lt((function(){return e}),t)}function jt(e){var t=_t.context[e.__c],n=Et(bt++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(_t)),t.props.value):e.__}function Ut(){for(var e;e=St.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Ht),e.__H.__h.forEach(zt),e.__H.__h=[]}catch(t){e.__H.__h=[],D.__e(t,e.__v)}}D.__b=function(e){_t=null,At&&At(e)},D.__r=function(e){xt&&xt(e),bt=0;var t=(_t=e.__c).__H;t&&(kt===_t?(t.__h=[],_t.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=Pt,e.__N=e.i=void 0}))):(t.__h.forEach(Ht),t.__h.forEach(zt),t.__h=[])),kt=_t},D.diffed=function(e){Ft&&Ft(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==St.push(t)&&Ct===D.requestAnimationFrame||((Ct=D.requestAnimationFrame)||Kt)(Ut)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==Pt&&(e.__=e.__V),e.i=void 0,e.__V=Pt}))),kt=_t=null},D.__c=function(e,t){t.some((function(e){try{e.__h.forEach(Ht),e.__h=e.__h.filter((function(e){return!e.__||zt(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],D.__e(n,e.__v)}})),Rt&&Rt(e,t)},D.unmount=function(e){It&&It(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach((function(e){try{Ht(e)}catch(e){t=e}})),n.__H=void 0,t&&D.__e(t,n.__v))};var qt="function"==typeof requestAnimationFrame;function Kt(e){var t,n=function(){clearTimeout(r),qt&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);qt&&(t=requestAnimationFrame(n))}function Ht(e){var t=_t,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),_t=t}function zt(e){var t=_t;e.__c=e.__(),_t=t}function Wt(e,t){return!e||e.length!==t.length||t.some((function(t,n){return t!==e[n]}))}function Gt(e,t){return"function"==typeof t?t(e):t}var Yt="https://checkoutshopper-live.adyen.com/checkoutshopper/",$t=["resourceContext","extension"];function Qt(e,t){var o=n(e);if(r){var i=r(e);t&&(i=f(i).call(i,(function(t){return a(e,t).enumerable}))),o.push.apply(o,i)}return o}function Zt(e){for(var t=1;t<arguments.length;t++){var n,r,l=null!=arguments[t]?arguments[t]:{};t%2?h(n=Qt(Object(l),!0)).call(n,(function(t){p(e,t,l[t])})):o?i(e,o(l)):h(r=Qt(Object(l))).call(r,(function(t){s(e,t,a(l,t))}))}return e}var Jt=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Yt;u(this,e),p(this,"resourceContext",void 0),p(this,"returnImage",(function(e){var t,n,r,a,o,i,s=e.name,l=e.resourceContext,c=e.imageFolder,u=void 0===c?"":c,d=e.parentFolder,p=void 0===d?"":d,h=e.extension,f=e.size,m=void 0===f?"":f,y=e.subFolder,g=void 0===y?"":y;return v(t=v(n=v(r=v(a=v(o=v(i="".concat(l,"images/")).call(i,u)).call(o,g)).call(a,p)).call(r,s)).call(n,m,".")).call(t,h)})),p(this,"getImageUrl",(function(e){var n=e.resourceContext,r=void 0===n?Yt:n,a=e.extension,o=void 0===a?"svg":a,i=c(e,$t);return function(e){var n=Zt({extension:o,resourceContext:r,imageFolder:"logos/",parentFolder:"",name:e},i);return t.returnImage(n)}})),this.resourceContext=n}return d(e,[{key:"getImage",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getImageUrl(Zt(Zt({},e),{},{resourceContext:this.resourceContext}))}}]),e}(),Xt=L({i18n:new ze,loadingContext:"",commonProps:{},resources:new Jt});function en(){return jt(Xt)}function tn(e){var t=function(){if("undefined"==typeof Reflect||!F)return!1;if(F.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(F(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var a=B(this).constructor;n=F(r,arguments,a)}else n=r.apply(this,arguments);return O(this,n)}}var nn=function(e){E(n,V);var t=tn(n);function n(){var e,r;u(this,n);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r=t.call.apply(t,v(e=[this]).call(e,o)),p(I(r),"onClick",(function(e){e.preventDefault(),r.props.disabled||r.props.onClick(e,{complete:r.complete})})),p(I(r),"complete",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;r.setState({completed:!0}),K((function(){r.setState({completed:!1})}),e)})),r}return d(n,[{key:"render",value:function(e,t){var n,r,a=e.classNameModifiers,o=void 0===a?[]:a,i=e.disabled,s=e.href,l=e.icon,c=e.inline,u=e.label,d=e.status,p=e.variant,h=t.completed,f=en().i18n,m=l?T("img",{className:"adyen-checkout__button__icon",src:l,alt:"","aria-hidden":"true"}):"",y=v(n=[]).call(n,w(o),w("primary"!==p?[p]:[]),w(c?["inline"]:[]),w(h?["completed"]:[]),w("loading"===d||"redirect"===d?["loading"]:[])),g=H(v(r=["adyen-checkout__button"]).call(r,w(A(y).call(y,(function(e){return"adyen-checkout__button--".concat(e)}))))),b={loading:T(wt,{size:"medium"}),redirect:T("span",{className:"adyen-checkout__button__content"},T(wt,{size:"medium",inline:!0}),f.get("payButton.redirecting")),default:T("span",{className:"adyen-checkout__button__content"},m,T("span",{className:"adyen-checkout__button__text"},u))},_=b[d]||b.default;return s?T("a",{className:g,href:s,disabled:i,target:this.props.target,rel:this.props.rel},_):T("button",{className:g,type:"button",disabled:i,onClick:this.onClick},_,"loading"!==d&&"redirect"!==d&&this.props.children)}}]),n}();p(nn,"defaultProps",{status:"default",variant:"primary",disabled:!1,label:"",inline:!1,target:"_self",onClick:function(){}});var rn=function(e,t){return null!=t&&t.value&&null!=t&&t.currency?e.amount(t.value,t.currency,{currencyDisplay:t.currencyDisplay||"symbol"}):""},an=function(e,t){var n;return v(n="".concat(e.get("payButton")," ")).call(n,rn(e,t))},on=function(e){var t=e.label;return T("span",{className:"checkout-secondary-button__text"},t)},sn=["amount","secondaryAmount","classNameModifiers","label"],ln=function(e){var t,r=e.amount,a=e.secondaryAmount,o=e.classNameModifiers,i=void 0===o?[]:o,s=e.label,l=c(e,sn),u=en().i18n,d=r&&{}.hasOwnProperty.call(r,"value")&&0===r.value,p=d?u.get("confirmPreauthorization"):an(u,r),h=!d&&!s&&r&&a&&n(a).length?function(e,t){var n,r=t&&null!=t&&t.value&&null!=t&&t.currency?e.amount(t.value,t.currency,{currencyDisplay:t.currencyDisplay||"symbol"}):"",a=r.length?"/ ":"";return v(n="".concat(a)).call(n,r)}(u,a):null;return T(nn,R({},l,{disabled:l.disabled||"loading"===l.status,classNameModifiers:v(t=[]).call(t,w(i),["pay"]),label:s||p}),h&&T(on,{label:h}))},cn=["action","resultCode","sessionData","order","sessionResult"];function un(e){var t=function(){if("undefined"==typeof Reflect||!F)return!1;if(F.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(F(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var a=B(this).constructor;n=F(r,arguments,a)}else n=r.apply(this,arguments);return O(this,n)}}var dn=function(e){E(n,e);var t=un(n);function n(e,r,a){var o;return u(this,n),o=t.call(this,r),p(I(o),"cause",void 0),o.name=n.errorTypes[e],o.cause=null==a?void 0:a.cause,o}return d(n)}(z(Error));function pn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return Object.prototype.hasOwnProperty.call(e,t)}function hn(e,t){var o=n(e);if(r){var i=r(e);t&&(i=f(i).call(i,(function(t){return a(e,t).enumerable}))),o.push.apply(o,i)}return o}function fn(e){for(var t=1;t<arguments.length;t++){var n,r,l=null!=arguments[t]?arguments[t]:{};t%2?h(n=hn(Object(l),!0)).call(n,(function(t){p(e,t,l[t])})):o?i(e,o(l)):h(r=hn(Object(l))).call(r,(function(t){s(e,t,a(l,t))}))}return e}function mn(e){var t=function(){if("undefined"==typeof Reflect||!F)return!1;if(F.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(F(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var a=B(this).constructor;n=F(r,arguments,a)}else n=r.apply(this,arguments);return O(this,n)}}p(dn,"errorTypes",{NETWORK_ERROR:"NETWORK_ERROR",CANCEL:"CANCEL",IMPLEMENTATION_ERROR:"IMPLEMENTATION_ERROR",ERROR:"ERROR"});var yn=function(e){E(r,gt);var t=mn(r);function r(e){var n,a,o,i,s,l,c,d,h,f,y;return u(this,r),y=t.call(this,e),p(I(y),"componentRef",void 0),p(I(y),"elementRef",void 0),p(I(y),"handleError",(function(e){y.setElementStatus("ready"),y.props.onError&&y.props.onError(e,y.elementRef)})),p(I(y),"handleAdditionalDetails",(function(e){return y.props.onAdditionalDetails?y.props.onAdditionalDetails(e,y.elementRef):y.props.session&&y.submitAdditionalDetails(e.data),e})),p(I(y),"handleOrder",(function(e){y.updateParent({order:e.order}),y.props.onPaymentCompleted&&y.props.onPaymentCompleted(e,y.elementRef)})),p(I(y),"handleFinalResult",(function(e){if(y.props.setStatusAutomatically){var t=function(e){switch(e.resultCode){case"Authorised":case"Received":case"Pending":return["success"];case"Cancelled":case"Error":case"Refused":return["error"]}}(e),n=C(t,2),r=n[0],a=n[1];r&&y.setElementStatus(r,a)}return y.props.onPaymentCompleted&&y.props.onPaymentCompleted(e,y.elementRef),e})),p(I(y),"setComponentRef",(function(e){y.componentRef=e})),p(I(y),"payButton",(function(e){return T(ln,R({},e,{amount:y.props.amount,secondaryAmount:y.props.secondaryAmount,onClick:y.submit}))})),y.submit=m(n=y.submit).call(n,I(y)),y.setState=m(a=y.setState).call(a,I(y)),y.onValid=m(o=y.onValid).call(o,I(y)),y.onComplete=m(i=y.onComplete).call(i,I(y)),y.onSubmit=m(s=y.onSubmit).call(s,I(y)),y.handleAction=m(l=y.handleAction).call(l,I(y)),y.handleOrder=m(c=y.handleOrder).call(c,I(y)),y.handleResponse=m(d=y.handleResponse).call(d,I(y)),y.setElementStatus=m(h=y.setElementStatus).call(h,I(y)),y.submitAnalytics=m(f=y.submitAnalytics).call(f,I(y)),y.elementRef=e&&e.elementRef||I(y),y}return d(r,[{key:"setState",value:function(e){this.state=fn(fn({},this.state),e),this.onChange()}},{key:"onChange",value:function(){var e=this.isValid,t={data:this.data,errors:this.state.errors,valid:this.state.valid,isValid:e};return this.props.onChange&&this.props.onChange(t,this.elementRef),e&&this.onValid(),t}},{key:"setUpAnalytics",value:function(e){var t,n=null===(t=this.props.session)||void 0===t?void 0:t.id;return this.props.modules.analytics.setUp(fn(fn({},e),n&&{sessionId:n}))}},{key:"submitAnalytics",value:function(e){var t,n=this.constructor.analyticsType;n||(n="scheme"===this.constructor.type||"bcmc"===this.constructor.type?this.constructor.type:this.props.type),null===(t=this.props.modules)||void 0===t||t.analytics.sendAnalytics(n,e)}},{key:"onSubmit",value:function(){var e=this;this.props.isInstantPayment&&this.elementRef.closeActivePaymentMethod();if(this.props.setStatusAutomatically&&this.setElementStatus("loading"),this.props.onSubmit)this.submitAnalytics({type:et}),this.props.onSubmit({data:this.data,isValid:this.isValid},this.elementRef);else if(this._parentInstance.session){var t=this.props.beforeSubmit?new g((function(t,n){return e.props.beforeSubmit(e.data,e.elementRef,{resolve:t,reject:n})})):g.resolve(this.data);t.then((function(t){return e.submitAnalytics({type:et}),e.submitPayment(t)})).catch((function(){e.elementRef.setStatus("ready")}))}else this.handleError(new dn("IMPLEMENTATION_ERROR","Could not submit the payment"))}},{key:"onValid",value:function(){var e={data:this.data};return this.props.onValid&&this.props.onValid(e,this.elementRef),e}},{key:"onComplete",value:function(e){this.props.onComplete&&this.props.onComplete(e,this.elementRef)}},{key:"submit",value:function(){this.isValid?this.onSubmit():this.showValidation()}},{key:"showValidation",value:function(){return this.componentRef&&this.componentRef.showValidation&&this.componentRef.showValidation(),this}},{key:"setElementStatus",value:function(e,t){var n;return null===(n=this.elementRef)||void 0===n||n.setStatus(e,t),this}},{key:"setStatus",value:function(e,t){var n;return null!==(n=this.componentRef)&&void 0!==n&&n.setStatus&&this.componentRef.setStatus(e,t),this}},{key:"submitPayment",value:function(e){var t=this;return this._parentInstance.session.submitPayment(e).then(this.handleResponse).catch((function(e){return t.handleError(e)}))}},{key:"submitAdditionalDetails",value:function(e){return this._parentInstance.session.submitDetails(e).then(this.handleResponse).catch(this.handleError)}},{key:"handleAction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e||!e.type){if(pn(e,"action")&&pn(e,"resultCode"))throw new Error('handleAction::Invalid Action - the passed action object itself has an "action" property and a "resultCode": have you passed in the whole response object by mistake?');throw new Error('handleAction::Invalid Action - the passed action object does not have a "type" property')}var n=this._parentInstance.createFromAction(e,fn(fn(fn({},this.elementRef.props),t),{},{onAdditionalDetails:this.handleAdditionalDetails}));return n?(this.unmount(),n.mount(this._node)):null}},{key:"handleResponse",value:function(e){var t,r=function(e){var t,r=[],a=S(t=n(e)).call(t,(function(t,n){return y(cn).call(cn,n)?t[n]=e[n]:r.push(n),t}),{});return r.length&&console.warn("The following properties should not be passed to the client: ".concat(r.join(", "))),a}(e);r.action?this.elementRef.handleAction(r.action):(null===(t=r.order)||void 0===t||null===(t=t.remainingAmount)||void 0===t?void 0:t.value)>0?this.handleOrder(r):this.elementRef.handleFinalResult(r)}},{key:"updateParent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.elementRef._parentInstance.update(e)}},{key:"isValid",get:function(){return!1}},{key:"icon",get:function(){var e,t=this.props.paymentMethodType||this.type;return null!==(e=this.props.icon)&&void 0!==e?e:this.resources.getImage()(t)}},{key:"displayName",get:function(){return this.props.name||this.constructor.type}},{key:"additionalInfo",get:function(){return null}},{key:"accessibleName",get:function(){return this.displayName}},{key:"type",get:function(){return this.props.type||this.constructor.type}}]),r}();function vn(e){var t=function(){if("undefined"==typeof Reflect||!F)return!1;if(F.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(F(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=B(e);if(t){var a=B(this).constructor;n=F(r,arguments,a)}else n=r.apply(this,arguments);return O(this,n)}}var gn=function(e){E(n,V);var t=vn(n);function n(){var e,r;u(this,n);for(var a=arguments.length,o=new Array(a),i=0;i<a;i++)o[i]=arguments[i];return r=t.call.apply(t,v(e=[this]).call(e,o)),p(I(r),"iframeEl",void 0),r}return d(n,[{key:"iframeOnLoad",value:function(){this.props.callback&&"function"==typeof this.props.callback&&this.props.callback(this.iframeEl.contentWindow)}},{key:"componentDidMount",value:function(){var e;if(this.iframeEl.addEventListener)this.iframeEl.addEventListener("load",m(e=this.iframeOnLoad).call(e,this),!1);else if(this.iframeEl.attachEvent){var t;this.iframeEl.attachEvent("onload",m(t=this.iframeOnLoad).call(t,this))}else{var n;t