{"version":3,"file":"index.cjs","sources":["../../../../node_modules/preact/dist/preact.mjs","../../../../node_modules/preact/hooks/dist/hooks.mjs","../../src/components/internal/SecuredFields/lib/constants.ts","../../src/utils/getProp.ts","../../src/core/Errors/constants.ts","../../src/components/internal/SecuredFields/SFP/SFPUtils.ts","../../src/components/internal/SecuredFields/lib/CSF/AbstractCSF.ts","../../src/utils/commonUtils.ts","../../src/components/internal/SecuredFields/lib/utilities/logger.ts","../../src/components/internal/SecuredFields/lib/CSF/extensions/handleConfig.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/getCardGroupTypes.ts","../../src/components/internal/SecuredFields/lib/CSF/extensions/configureCallbacks.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/callbackUtils.ts","../../src/utils/hasOwnProperty.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/processErrors.ts","../../src/components/internal/SecuredFields/lib/CSF/extensions/handleValidation.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/iframes/postMessageToIframe.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/iframes/getIframeContentWin.ts","../../src/components/internal/SecuredFields/lib/CSF/extensions/handleEncryption.ts","../../src/components/internal/SecuredFields/lib/utilities/dom.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/cardType.ts","../../src/utils/listenerUtils.ts","../../src/components/internal/SecuredFields/lib/utilities/commonUtils.ts","../../src/components/internal/SecuredFields/lib/securedField/AbstractSecuredField.ts","../../src/core/Errors/utils.ts","../../src/components/internal/SecuredFields/lib/utilities/addContextTranslations.ts","../../src/components/internal/SecuredFields/lib/securedField/utils/processAriaConfig.ts","../../src/components/internal/SecuredFields/lib/securedField/SecuredField.ts","../../src/components/internal/SecuredFields/lib/securedField/utils/processPlaceholders.ts","../../src/components/internal/SecuredFields/lib/securedField/utils/createIframe.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/iframes/postMessageValidation.ts","../../src/core/Errors/AdyenCheckoutError.ts","../../src/components/internal/SecuredFields/lib/CSF/extensions/createSecuredFields.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/userAgent.ts","../../src/components/internal/SecuredFields/lib/CSF/extensions/handleIOSTouchEvents.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/tabbing/utils.ts","../../src/components/internal/SecuredFields/lib/CSF/extensions/handleTab.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/tabbing/tabScenarioGiftCard.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/tabbing/tabScenarioKCP.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/tabbing/tabScenarioCreditCard.ts","../../src/components/internal/SecuredFields/lib/CSF/extensions/handleBrandFromBinLookup.ts","../../src/components/internal/SecuredFields/lib/CSF/partials/setFocusOnFrame.ts","../../src/components/internal/SecuredFields/lib/CSF/partials/postMessageToAllIframes.ts","../../src/components/internal/SecuredFields/lib/CSF/partials/processBrand.ts","../../src/components/internal/SecuredFields/lib/CSF/partials/processAutoComplete.ts","../../src/components/internal/SecuredFields/lib/CSF/partials/handleFocus.ts","../../src/components/internal/SecuredFields/lib/CSF/partials/handleIframeConfigFeedback.ts","../../src/components/internal/SecuredFields/lib/CSF/partials/isConfigured.ts","../../src/components/internal/SecuredFields/lib/CSF/partials/validateForm.ts","../../src/components/internal/SecuredFields/lib/CSF/partials/handleBinValue.ts","../../src/components/internal/SecuredFields/lib/CSF/utils/destroySecuredFields.ts","../../src/components/internal/SecuredFields/lib/CSF/CSF.ts","../../src/components/internal/SecuredFields/lib/CSF/initCSF.ts","../../src/components/internal/SecuredFields/utils.ts","../../src/utils/textUtils.ts","../../src/components/internal/SecuredFields/SFP/SecuredFieldsProviderHandlers.ts","../../src/components/internal/SecuredFields/SFP/SecuredFieldsProvider.ts","../../src/components/internal/SecuredFields/SFP/defaultProps.ts","../../src/components/Card/components/CardInput/types.ts","../../src/components/Card/components/CardInput/defaultProps.ts","../../src/components/internal/SocialSecurityNumberBrazil/utils.ts","../../src/components/internal/SocialSecurityNumberBrazil/constants.ts","../../src/components/internal/SocialSecurityNumberBrazil/validate.ts","../../src/utils/validator-utils.ts","../../src/components/Card/components/CardInput/validate.ts","../../src/components/internal/SecuredFields/binLookup/extensions.ts","../../src/components/internal/SecuredFields/binLookup/createCardVariantSwitcher.ts","../../src/utils/Validator/ValidationRuleResult.ts","../../src/utils/Validator/Validator.ts","../../src/utils/useForm/reducer.ts","../../src/utils/useForm/useForm.ts","../../src/components/Card/components/CardInput/layouts.ts","../../src/components/internal/Address/constants.ts","../../src/core/Context/CoreProvider.tsx","../../src/core/Context/useImage.ts","../../src/components/ThreeDS2/constants.ts","../../src/utils/isValidURL.ts","../../src/components/Card/components/Fastlane/utils/validate-configuration.ts","../../src/components/Card/components/CardInput/utils.ts","../../src/components/internal/Address/Specifications.ts","../../../../node_modules/classnames/index.js","../../src/components/internal/Spinner/Spinner.tsx","../../src/components/internal/LoadingWrapper/LoadingWrapper.tsx","../../src/components/Card/components/CardInput/components/CVCHint.tsx","../../src/components/internal/Icon/Icon.tsx","../../src/utils/idGenerator.ts","../../src/components/internal/Icon/constants.ts","../../src/utils/uuid.ts","../../src/components/internal/FormFields/Field/Field.tsx","../../src/components/Card/components/CardInput/components/DataSfSpan.tsx","../../src/components/Card/components/CardInput/components/FieldLabelAlternative.tsx","../../src/components/Card/components/CardInput/components/CVC.tsx","../../src/components/internal/FormFields/InputBase.tsx","../../src/components/internal/FormFields/InputText.tsx","../../src/components/Card/components/CardInput/components/StoredCardFields.tsx","../../src/components/internal/FormFields/Fieldset/Fieldset.tsx","../../src/components/internal/FormFields/RadioGroup/RadioGroup.tsx","../../src/components/internal/Img/Img.tsx","../../src/components/internal/FormFields/Select/components/SelectButton.tsx","../../src/components/internal/FormFields/Select/components/SelectListItem.tsx","../../src/components/internal/FormFields/Select/components/SelectList.tsx","../../src/components/internal/FormFields/Select/constants.ts","../../src/components/internal/FormFields/utils.ts","../../src/components/internal/FormFields/Select/Select.tsx","../../src/components/Card/components/CardInput/components/Installments/Installments.tsx","../../src/language/utils.ts","../../src/components/internal/Link/Link.tsx","../../src/components/internal/DisclaimerMessage/DisclaimerMessage.tsx","../../src/components/Card/components/CardInput/components/StoredCardFieldsWrapper.tsx","../../src/components/Card/components/CardInput/components/BrandIcon.tsx","../../src/components/Card/components/CardInput/components/DualBrandingIcon/DualBrandingIcon.tsx","../../src/components/Card/components/CardInput/components/CardNumber.tsx","../../src/components/Card/components/CardInput/components/ExpirationDate.tsx","../../src/components/Card/components/CardInput/components/AvailableBrands/AvailableBrands.tsx","../../src/components/Card/components/CardInput/components/CardFields.tsx","../../src/components/internal/FormFields/InputTelephone.tsx","../../src/components/Card/components/CardInput/components/KCPAuthentication.tsx","../../src/components/internal/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil.tsx","../../src/components/internal/FormFields/Checkbox/Checkbox.tsx","../../src/components/internal/StoreDetails/StoreDetails.tsx","../../src/components/internal/Address/components/ReadOnlyAddress.tsx","../../src/components/internal/Address/validate.formats.ts","../../src/components/internal/Address/validate.ts","../../src/core/config.ts","../../src/core/Services/http.ts","../../src/core/Services/get-dataset.ts","../../src/components/internal/Address/components/StateField.tsx","../../src/components/internal/Address/components/CountryField.tsx","../../src/components/internal/Address/components/FieldContainer.tsx","../../src/utils/debounce.ts","../../src/components/internal/Address/components/AddressSearch.tsx","../../src/components/internal/Address/Address.tsx","../../src/components/Card/components/CardInput/components/CardHolderName.tsx","../../src/components/internal/FormFields/RadioGroupExtended/RadioButtonIcon.tsx","../../src/components/internal/FormFields/RadioGroupExtended/RadioGroupExtended.tsx","../../src/components/Card/components/CardInput/components/CardFieldsWrapper.tsx","../../src/components/Card/components/CardInput/handlers.ts","../../src/utils/arrayUtils.ts","../../src/components/internal/FormInstruction/FormInstruction.tsx","../../src/core/Errors/SRPanelContext.ts","../../src/core/Errors/useSRPanelContext.ts","../../src/utils/hookUtils.ts","../../src/components/Card/components/CardInput/useSRPanelForCardInputErrors.ts","../../src/components/internal/Toggle/Toggle.tsx","../../src/components/Card/components/Fastlane/utils/mobile-number-formatter.ts","../../src/components/Card/components/Fastlane/USOnlyPhoneInput.tsx","../../src/components/internal/Modal/useModal.ts","../../src/components/internal/Modal/useTrapFocus.ts","../../src/components/internal/Modal/Modal.tsx","../../src/components/internal/Button/Button.tsx","../../src/components/Card/components/Fastlane/InfoModal.tsx","../../src/components/Card/components/Fastlane/InfoButton.tsx","../../src/core/Analytics/constants.ts","../../src/utils/Formatters/formatters.ts","../../src/core/Analytics/AnalyticsEvent.ts","../../src/core/Analytics/utils.ts","../../src/core/Analytics/AnalyticsInfoEvent.ts","../../src/components/Card/components/Fastlane/FastlaneSignup.tsx","../../src/components/Card/components/CardInput/CardInput.tsx","../../src/utils/browserInfo.ts","../../src/components/internal/SecuredFields/binLookup/triggerBinLookUp.ts","../../src/components/internal/ClickToPay/services/sdks/SrciError.ts","../../src/utils/Script.ts","../../src/components/internal/ClickToPay/services/sdks/AbstractSrcInitiator.ts","../../src/components/internal/ClickToPay/services/sdks/VisaSdk.ts","../../src/components/internal/ClickToPay/services/sdks/MastercardSdk.ts","../../src/utils/promise-util.ts","../../src/components/internal/ClickToPay/services/sdks/SrcSdkLoader.ts","../../src/components/internal/ClickToPay/services/sdks/config.ts","../../src/components/internal/ClickToPay/services/sdks/utils.ts","../../src/components/internal/ClickToPay/models/ShopperCard.ts","../../src/components/internal/ClickToPay/services/utils.ts","../../src/components/internal/ClickToPay/errors/TimeoutError.ts","../../src/components/internal/ClickToPay/services/execute-with-timeout.ts","../../src/components/internal/ClickToPay/services/ClickToPayService.ts","../../src/components/internal/ClickToPay/services/create-clicktopay-service.ts","../../src/components/internal/ClickToPay/context/ClickToPayContext.ts","../../src/components/internal/ClickToPay/context/ClickToPayProvider.tsx","../../src/components/internal/ClickToPay/context/useClickToPayContext.ts","../../src/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/validate.ts","../../src/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPResendOtpLink.tsx","../../src/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePasswordInput/CtPOneTimePasswordInput.tsx","../../src/components/internal/ClickToPay/components/CtPBrand/CtPBrand.tsx","../../src/components/internal/ClickToPay/components/CtPInfo/CtPInfoModal/CtPInfoModal.tsx","../../src/components/internal/ClickToPay/components/CtPInfo/CtPInfo.tsx","../../src/components/internal/ClickToPay/components/CtPSection/CtPLogoutLink.tsx","../../src/components/internal/ClickToPay/components/CtPSection/CtPSection.tsx","../../src/components/internal/ClickToPay/components/CtPOneTimePassword/CtPSaveCookiesCheckbox/CtPSaveCookiesCheckbox.tsx","../../src/utils/isScreenSmall.ts","../../src/components/internal/ClickToPay/components/CtPOneTimePassword/CtPOneTimePassword.tsx","../../src/components/internal/ClickToPay/components/CtPCards/CtPSingleCard/CtPSingleCard.tsx","../../src/components/internal/PayButton/utils.ts","../../src/components/internal/PayButton/components/SecondaryButtonLabel.tsx","../../src/components/internal/PayButton/PayButton.tsx","../../src/utils/isMobile.ts","../../src/components/internal/ClickToPay/components/CtPCards/CtPCardsList/CtPCardsList.tsx","../../src/components/internal/IFrame/Iframe.tsx","../../src/components/internal/ClickToPay/components/CtPCards/CtPCards.tsx","../../src/components/internal/ClickToPay/components/CtPLoader/CtPLoader.tsx","../../src/components/internal/ClickToPay/components/CtPLogin/validate.ts","../../src/components/internal/FormFields/InputEmail.tsx","../../src/components/internal/ClickToPay/components/CtPLogin/CtPLoginInput.tsx","../../src/components/internal/ClickToPay/components/CtPLogin/CtPLogin.tsx","../../src/components/internal/ClickToPay/ClickToPayComponent.tsx","../../src/components/internal/ContentSeparator/ContentSeparator.tsx","../../src/components/Card/components/ClickToPayHolder.tsx","../../src/components/Card/components/ClickToPayWrapper.tsx","../../src/core/Errors/SRPanelProvider.tsx","../../src/components/tx-variants.ts","../../src/components/internal/BaseElement/BaseElement.ts","../../src/components/internal/UIElement/utils.ts","../../src/core/Errors/CancelError.ts","../../src/core/Analytics/AnalyticsLogEvent.ts","../../src/core/Analytics/AnalyticsErrorEvent.ts","../../src/components/internal/UIElement/UIElement.tsx","../../src/components/Card/Card.tsx","../../src/components/Card/Bancontact.ts","../../src/components/CustomCard/CustomCardInput/CustomCardInput.tsx","../../src/components/CustomCard/CustomCard.tsx","../../src/components/ThreeDS2/components/Form/ThreeDS2Form.tsx","../../src/utils/get-process-message-handler.ts","../../src/utils/getOrigin.ts","../../src/utils/base64.ts","../../src/components/ThreeDS2/components/utils.ts","../../src/utils/promiseTimeout.ts","../../src/components/ThreeDS2/components/Challenge/DoChallenge3DS2.tsx","../../src/components/ThreeDS2/components/Challenge/PrepareChallenge3DS2.tsx","../../src/components/ThreeDS2/ThreeDS2Challenge.tsx","../../src/components/ThreeDS2/components/DeviceFingerprint/DoFingerprint3DS2.tsx","../../src/components/ThreeDS2/components/DeviceFingerprint/PrepareFingerprint3DS2.tsx","../../src/core/Services/sessions/constants.ts","../../src/components/ThreeDS2/callSubmit3DS2Fingerprint.ts","../../src/components/ThreeDS2/ThreeDS2DeviceFingerprint.tsx","../../src/components/internal/RedirectButton/RedirectButton.tsx","../../src/components/Ach/components/AccountTypeSelector.tsx","../../src/components/Ach/components/validate.ts","../../src/utils/setFocus.ts","../../src/components/Ach/components/AchComponent.tsx","../../src/components/Ach/components/useSRPanelForACHErrors.ts","../../src/components/Ach/Ach.tsx","../../src/components/internal/FormFields/ConsentCheckbox/ConsentCheckbox.tsx","../../src/components/Ach/defaultProps.ts","../../src/utils/regex.ts","../../src/components/internal/FormFields/InputDate/utils.ts","../../src/utils/Validator/defaultRules.ts","../../src/components/BacsDD/components/validate.ts","../../src/utils/getErrorMessage.ts","../../src/components/BacsDD/components/BacsInput.tsx","../../src/utils/clipboard.ts","../../src/components/internal/DetailsTable/DetailsTable.tsx","../../src/components/internal/Voucher/Voucher.tsx","../../src/components/internal/Voucher/utils.ts","../../src/components/BacsDD/components/BacsResult.tsx","../../src/components/BacsDD/BacsDD.tsx","../../src/components/internal/IbanInput/specifications.ts","../../src/components/internal/IbanInput/utils.ts","../../src/components/internal/IbanInput/validate.ts","../../src/components/internal/IbanInput/IbanInput.tsx","../../src/components/Sepa/Sepa.tsx","../../src/components/PreAuthorizedDebitCanada/components/validate.ts","../../src/components/PreAuthorizedDebitCanada/components/SettlementInfo.tsx","../../src/components/PreAuthorizedDebitCanada/components/PreAuthorizedDebitCanadaComponent.tsx","../../src/components/PreAuthorizedDebitCanada/PreAuthorizedDebitCanada.tsx","../../src/components/internal/CompanyDetails/ReadOnlyCompanyDetails.tsx","../../src/components/internal/CompanyDetails/validate.ts","../../src/components/internal/CompanyDetails/utils.ts","../../src/components/internal/CompanyDetails/CompanyDetails.tsx","../../src/components/internal/PersonalDetails/ReadOnlyPersonalDetails.tsx","../../src/components/internal/PersonalDetails/validate.ts","../../src/components/internal/PersonalDetails/utils.ts","../../src/components/internal/FormFields/InputDate/InputDate.tsx","../../src/components/internal/PersonalDetails/PersonalDetails.tsx","../../src/components/internal/Address/utils.ts","../../src/components/internal/OpenInvoice/utils.ts","../../src/components/internal/OpenInvoice/OpenInvoice.tsx","../../src/components/internal/OpenInvoice/useSRPanelForOpenInvoiceErrors.ts","../../src/components/helpers/OpenInvoiceContainer/OpenInvoiceContainer.tsx","../../src/components/Affirm/config.ts","../../src/components/Affirm/Affirm.tsx","../../src/components/internal/ConsentCheckboxLabel/ConsentCheckboxLabel.tsx","../../src/components/AfterPay/config.ts","../../src/utils/getConsentUrl.ts","../../src/components/AfterPay/AfterPay.tsx","../../src/components/AfterPay/AfterPayB2B.tsx","../../src/components/Atome/config.ts","../../src/components/Atome/Atome.tsx","../../src/components/FacilyPay/config.ts","../../src/components/FacilyPay/FacilyPay3x.ts","../../src/components/FacilyPay/FacilyPay4x.ts","../../src/components/FacilyPay/FacilyPay6x.ts","../../src/components/FacilyPay/FacilyPay10x.ts","../../src/components/FacilyPay/FacilyPay12x.ts","../../src/components/RatePay/config.ts","../../src/components/RatePay/RatePay.ts","../../src/components/RatePay/RatePayDirectDebit.ts","../../src/components/AmazonPay/config.ts","../../src/utils/constants/currency-decimals.ts","../../src/utils/constants/currency-minor-units.ts","../../src/utils/amount-util.ts","../../src/components/AmazonPay/utils.ts","../../src/components/AmazonPay/services.ts","../../src/components/AmazonPay/components/AmazonPayButton.tsx","../../src/components/AmazonPay/components/ChangePaymentDetailsButton.tsx","../../src/components/AmazonPay/components/OrderButton.tsx","../../src/components/AmazonPay/components/SignOutButton.tsx","../../src/components/AmazonPay/components/AmazonPayComponent.tsx","../../src/components/AmazonPay/defaultProps.ts","../../src/components/AmazonPay/AmazonPay.tsx","../../src/components/ApplePay/components/ApplePayButton.tsx","../../src/components/ApplePay/services/ApplePayService.ts","../../src/components/ApplePay/utils/payment-request.ts","../../src/components/ApplePay/utils/format-applepay-contact-to-adyen-format.ts","../../src/components/ApplePay/services/ApplePaySdkLoader.ts","../../src/utils/detectInIframe.ts","../../src/components/ApplePay/ApplePay.tsx","../../src/components/ApplePay/utils/map-adyen-brands-to-applepay-brands.ts","../../src/components/ApplePay/utils/resolve-supported-version.ts","../../src/components/ApplePay/defaultProps.ts","../../src/components/CashAppPay/services/types.ts","../../src/components/CashAppPay/components/CashAppComponent.tsx","../../src/components/CashAppPay/services/CashAppService.ts","../../src/components/CashAppPay/services/CashAppSdkLoader.ts","../../src/components/CashAppPay/services/config.ts","../../src/components/CashAppPay/CashAppPay.tsx","../../src/components/CashAppPay/defaultProps.ts","../../src/components/ClickToPay/ClickToPay.tsx","../../src/components/GooglePay/config.ts","../../src/components/GooglePay/requests.ts","../../src/components/GooglePay/utils.ts","../../src/components/GooglePay/GooglePayService.ts","../../src/components/GooglePay/components/GooglePayButton.tsx","../../src/components/GooglePay/defaultProps.ts","../../src/components/GooglePay/GooglePay.tsx","../../src/components/PayPal/config.ts","../../src/components/PayPal/utils/get-paypal-styles.ts","../../src/components/PayPal/components/PaypalButtons.tsx","../../src/components/PayPal/utils/get-paypal-settings.ts","../../src/components/PayPal/utils/get-paypal-locale.ts","../../src/components/PayPal/components/PaypalComponent.tsx","../../src/components/PayPal/utils/get-paypal-url.ts","../../src/components/PayPal/defaultProps.ts","../../src/components/PayPal/constants.ts","../../src/components/PayPal/utils/format-paypal-order-contact-to-adyen-format.ts","../../src/components/PayPal/Paypal.tsx","../../src/components/PayPalFastlane/components/FaslaneCardBrandIcon.tsx","../../src/components/PayPalFastlane/components/FastlaneComponent.tsx","../../src/components/PayPalFastlane/Fastlane.tsx","../../src/components/Boleto/components/BoletoInput/validate.ts","../../src/components/Boleto/components/BoletoInput/utils.ts","../../src/components/internal/SendCopyToEmail/SendCopyToEmail.tsx","../../src/components/internal/SocialSecurityNumberBrazil/BrazilPersonalDetail.tsx","../../src/components/Boleto/components/BoletoInput/BoletoInput.tsx","../../src/components/Boleto/components/BoletoVoucherResult/BoletoVoucherResult.tsx","../../src/components/Boleto/Boleto.tsx","../../src/components/Doku/components/DokuInput/DokuInput.tsx","../../src/components/Doku/components/DokuVoucherResult/DokuVoucherResult.tsx","../../src/components/Doku/Doku.tsx","../../src/components/Oxxo/components/OxxoVoucherResult/OxxoVoucherResult.tsx","../../src/components/Oxxo/Oxxo.tsx","../../src/components/internal/IssuerList/IssuerButtonGroup/IssuerButton.tsx","../../src/components/internal/IssuerList/IssuerButtonGroup/IssuerButtonGroup.tsx","../../src/components/internal/IssuerList/IssuerList.tsx","../../src/utils/get-issuer-image.ts","../../src/components/helpers/IssuerListContainer/IssuerListContainer.tsx","../../src/components/BillDesk/BillDeskOnline.ts","../../src/components/BillDesk/BillDeskWallet.ts","../../src/components/Dotpay/index.ts","../../src/components/EPS/index.ts","../../src/components/MolPayEBanking/MolPayEBankingMY.ts","../../src/components/MolPayEBanking/MolPayEBankingTH.ts","../../src/components/MolPayEBanking/MolPayEBankingVN.ts","../../src/components/OnlineBankingCZ/index.ts","../../src/components/OnlineBankingIN/index.ts","../../src/components/OnlineBankingPL/OnlineBankingPL.tsx","../../src/components/OnlineBankingSK/index.ts","../../src/components/OnlineBankingFI/OnlineBankingFI.tsx","../../src/components/PayByBank/PayByBank.tsx","../../src/components/PayU/PayuCashcard.tsx","../../src/components/PayU/PayuNetBanking.tsx","../../src/components/WalletIN/index.ts","../../src/components/Dragonpay/components/DragonpayInput/DragonpayInput.tsx","../../src/components/Dragonpay/components/DragonpayVoucherResult/DragonpayVoucherResult.tsx","../../src/components/Dragonpay/Dragonpay.tsx","../../src/components/Econtext/validate.ts","../../src/components/Econtext/components/EcontextInput/EcontextInput.tsx","../../src/components/Econtext/components/EcontextVoucherResult/EcontextVoucherResult.tsx","../../src/components/Econtext/Econtext.tsx","../../src/utils/detectInIframeInSameOrigin.ts","../../src/components/Redirect/components/RedirectShopper/RedirectShopper.tsx","../../src/components/Redirect/Redirect.tsx","../../src/components/Giropay/Giropay.tsx","../../src/components/Multibanco/components/MultibancoVoucherResult/MultibancoVoucherResult.tsx","../../src/components/Multibanco/Multibanco.tsx","../../src/components/Twint/Twint.tsx","../../src/components/Vipps/Vipps.ts","../../src/components/Trustly/Trustly.tsx","../../src/components/PayByBankUS/PayByBankUS.tsx","../../src/components/Riverty/Riverty.tsx","../../src/core/Environment/constants.ts","../../src/core/Environment/Environment.ts","../../src/components/PayByBankPix/services/PasskeySdkLoader.ts","../../src/components/PayByBankPix/services/types.ts","../../src/components/PayByBankPix/services/PasskeyService.ts","../../src/components/PayByBankPix/components/Enrollment/components/AwaitLogoContainer.tsx","../../src/core/Services/payment-status.ts","../../src/core/ProcessResponse/process-response.ts","../../src/components/internal/Countdown/utils.ts","../../src/components/internal/Countdown/CountdownA11yReporter.ts","../../src/components/internal/Countdown/useCountdownA11yReporter.ts","../../src/components/internal/Countdown/index.tsx","../../src/components/internal/Await/Await.tsx","../../src/components/PayByBankPix/components/Enrollment/components/PayByBankPixAwait.tsx","../../src/components/PayByBankPix/components/StoredPayment/StoredPayment.tsx","../../src/components/PayByBankPix/components/StoredPayment/getAuthorizationStatus.ts","../../src/components/PayByBankPix/components/Enrollment/useIssuerWithLogo.ts","../../src/components/PayByBankPix/components/Enrollment/components/IssuerListIntroduction.tsx","../../src/components/PayByBankPix/components/Enrollment/Enrollment.tsx","../../src/components/PayByBankPix/components/Enrollment/getEnrollmentStatus.ts","../../src/components/PayByBankPix/PayByBankPix.tsx","../../src/components/PayByBankPix/services/authorizeEnrollment.ts","../../src/components/PayByBankPix/services/authorizePayment.ts","../../src/components/Klarna/constants.ts","../../src/components/Klarna/components/KlarnaWidget/KlarnaWidget.tsx","../../src/components/Klarna/components/KlarnaContainer/KlarnaContainer.tsx","../../src/components/Klarna/KlarnaPayments.tsx","../../src/core/Errors/useA11yReporter.ts","../../src/components/internal/QRLoader/QRLoader.tsx","../../src/utils/useAutoFocus.ts","../../src/components/helpers/QRLoaderContainer/QRLoaderContainer.tsx","../../src/components/BcmcMobile/BcmcMobile.ts","../../src/components/BcmcMobile/config.ts","../../src/components/Pix/PixInput/validate.ts","../../src/components/Pix/PixInput/utils.ts","../../src/components/Pix/PixInput/PixInput.tsx","../../src/components/Pix/Pix.tsx","../../src/components/Swish/Swish.ts","../../src/components/WeChat/WeChat.ts","../../src/components/WeChat/config.ts","../../src/components/PromptPay/PromptPay.ts","../../src/components/PromptPay/config.ts","../../src/components/PayNow/config.ts","../../src/components/internal/Timeline/TimelineWrapper.tsx","../../src/components/internal/Timeline/Timeline.tsx","../../src/utils/useIsMobile.ts","../../src/components/PayNow/components/PayNowIntroduction.tsx","../../src/components/PayNow/components/PayNowInstructions.tsx","../../src/components/PayNow/PayNow.ts","../../src/components/DuitNow/DuitNow.ts","../../src/components/DuitNow/config.ts","../../src/components/PayMe/components/PayMeInstructions.tsx","../../src/components/PayMe/components/PayMeIntroduction.tsx","../../src/components/PayMe/PayMe.ts","../../src/components/Blik/components/BlikInput.tsx","../../src/components/Blik/config.ts","../../src/components/Blik/Blik.tsx","../../src/components/internal/PhoneInput/validate.ts","../../src/components/internal/PhoneInput/PhoneInputFields.tsx","../../src/components/internal/PhoneInput/PhoneInputForm.tsx","../../src/components/MBWay/components/MBWayInput/MBWayInput.tsx","../../src/components/internal/PhoneInput/usePhonePrefixes.ts","../../src/components/MBWay/components/MBWayAwait/config.ts","../../src/components/MBWay/MBWay.tsx","../../src/components/UPI/components/VpaInput/validate.ts","../../src/components/UPI/components/VpaInput/VpaInput.tsx","../../src/components/UPI/components/UPIComponent/constants.ts","../../src/components/internal/SegmentedControl/SegmentedControl.tsx","../../src/components/Dropin/components/PaymentMethod/PaymentMethodIcon.tsx","../../src/components/internal/ExpandButton/ExpandButton.tsx","../../src/components/UPI/components/UPIIntentAppList/UPIIntentAppItem/UPIIntentAppItem.tsx","../../src/components/UPI/components/UPIIntentAppList/UPIIntentAppList.tsx","../../src/components/UPI/components/UPIComponent/UPIComponent.tsx","../../src/components/UPI/components/UPIComponent/useUpiSegmentedControlOptions.ts","../../src/components/UPI/UPI.tsx","../../src/components/ANCV/validate.ts","../../src/components/ANCV/components/ANCVInput.tsx","../../src/components/ANCV/components/ANCVAwait/config.ts","../../src/components/ANCV/ANCV.tsx","../../src/components/PayTo/components/IdentifierSelector.tsx","../../src/core/utils.ts","../../src/components/PayTo/components/PayToPhone.tsx","../../src/components/PayTo/components/validate.ts","../../src/components/PayTo/components/PayToNameFields.tsx","../../src/components/PayTo/components/PayIDInput.tsx","../../src/components/PayTo/components/BSBInput.tsx","../../src/components/PayTo/components/PayToComponent.tsx","../../src/components/PayTo/components/PayToInstructions.tsx","../../src/components/PayTo/components/MandateSummary.tsx","../../src/components/PayTo/PayTo.tsx","../../src/components/internal/Alert/Alert.tsx","../../src/components/Giftcard/components/GiftcardResult.tsx","../../src/components/Giftcard/components/GiftcardNumberField.tsx","../../src/components/Giftcard/components/GiftcardPinField.tsx","../../src/components/Giftcard/components/GiftcardComponent.tsx","../../src/components/Giftcard/components/GiftcardFields.tsx","../../src/components/Giftcard/Giftcard.tsx","../../src/components/MealVoucherFR/components/MealVoucherExpiryField.tsx","../../src/components/MealVoucherFR/components/MealVoucherFields.tsx","../../src/components/MealVoucherFR/MealVoucherFR.tsx","../../src/components/Address/Address.tsx","../../src/components/BankTransfer/components/BankTransferResult/BankTransferResult.tsx","../../src/components/BankTransfer/components/BankTransferInput/BankTransferInput.tsx","../../src/components/BankTransfer/BankTransfer.tsx","../../src/components/Donation/components/CampaignInfo.tsx","../../src/components/Donation/components/CampaignContent.tsx","../../src/components/internal/ButtonGroup/ButtonGroup.tsx","../../src/components/Donation/components/utils.ts","../../src/components/Donation/components/FixedAmounts.tsx","../../src/components/Donation/components/Roundup.tsx","../../src/components/Donation/components/DonationComponent.tsx","../../src/components/Donation/Donation.tsx","../../src/components/Dropin/defaultProps.ts","../../src/components/Dropin/components/PaymentMethod/OrderPaymentMethods.tsx","../../src/components/Dropin/components/PaymentMethod/InstantPaymentMethods.tsx","../../src/components/Dropin/components/PaymentMethod/useBrandLogoConfiguration.ts","../../src/components/Dropin/components/PaymentMethod/PaymentMethodDetails.tsx","../../src/components/Dropin/components/PaymentMethod/DisableOneClickConfirmation.tsx","../../src/components/Dropin/components/PaymentMethod/PaymentMethodBrands/PaymentMethodBrands.tsx","../../src/components/Dropin/components/PaymentMethod/PaymentMethodName.tsx","../../src/components/Dropin/components/PaymentMethod/PaymentMethodItem/PaymentMethodItem.tsx","../../src/components/Dropin/components/PaymentMethod/PaymentMethodsContainer.tsx","../../src/components/Dropin/components/PaymentMethod/PaymentMethodList.tsx","../../src/components/Dropin/components/status/index.ts","../../src/components/Dropin/components/status/Success.tsx","../../src/components/Dropin/components/status/Error.tsx","../../src/components/Dropin/components/DropinComponent.tsx","../../src/core/Services/order-status.ts","../../src/components/Dropin/elements/filters.ts","../../src/components/components-name-map.ts","../../src/components/Dropin/elements/createElements.ts","../../src/components/Dropin/elements/getComponentConfiguration.ts","../../src/components/Dropin/elements/createStoredElements.ts","../../src/components/Dropin/elements/createInstantPaymentElements.ts","../../src/components/Dropin/Dropin.tsx","../../src/components/Dropin/elements/splitPaymentMethods.ts","../../src/components/Dropin/components/utils.ts","../../src/components/PersonalDetails/PersonalDetails.tsx","../../src/components/PayPalFastlane/FastlaneSDK.ts","../../src/components/PayPalFastlane/services/request-fastlane-token.ts","../../src/components/PayPalFastlane/utils/convert-locale.ts","../../src/language/Language.ts","../../src/core/RiskModule/constants.ts","../../src/core/RiskModule/components/DeviceFingerprint/GetDeviceFingerprint.tsx","../../src/core/RiskModule/components/DeviceFingerprint/DeviceFingerprint.tsx","../../src/core/RiskModule/components/DeviceFingerprint/utils.ts","../../src/core/RiskModule/RiskModule.tsx","../../src/core/ProcessResponse/PaymentMethods/filters.ts","../../src/core/ProcessResponse/PaymentMethods/utils.ts","../../src/core/ProcessResponse/PaymentMethods/PaymentMethods.ts","../../src/core/ProcessResponse/PaymentAction/actionTypes.ts","../../src/utils/Storage.ts","../../src/core/Services/analytics/collect-id.ts","../../src/core/Analytics/EventsQueue.ts","../../src/core/Analytics/Analytics.ts","../../src/core/Services/sessions/make-payment.ts","../../src/core/Services/sessions/submit-details.ts","../../src/core/Services/sessions/setup-session.ts","../../src/core/Services/sessions/check-balance.ts","../../src/core/CheckoutSession/utils.ts","../../src/core/CheckoutSession/CheckoutSession.ts","../../src/core/Services/sessions/create-order.ts","../../src/core/Services/sessions/cancel-order.ts","../../src/core/Context/Resources.ts","../../src/core/Errors/SRMessages.tsx","../../src/core/Errors/SRPanel.tsx","../../src/core/core.registry.ts","../../src/core/core.defaultProps.ts","../../src/core/core.ts","../../src/core/Services/get-translations.ts","../../src/language/constants.ts","../../src/core/ProcessResponse/PaymentAction/PaymentAction.ts","../../src/core/AdyenCheckout.ts","../../src/components/PayPalFastlane/initializeFastlane.ts"],"sourcesContent":["var n,l,u,t,i,o,r,f,e,c,s,a,h={},p=[],v=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function w(n){var l=n.parentNode;l&&l.removeChild(n)}function _(l,u,t){var i,o,r,f={};for(r in u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return g(l,f,i,o,null)}function g(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(f),f}function m(){return{current:null}}function k(n){return n.children}function b(n,l){this.props=n,this.context=l}function x(n,l){if(null==l)return n.__?x(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?x(n):null}function C(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!P.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(P)}function P(){var n,u,t,o,r,e,c,s;for(i.sort(f);n=i.shift();)n.__d&&(u=i.length,o=void 0,e=(r=(t=n).__v).__e,c=[],s=[],t.__P&&((o=d({},r)).__v=r.__v+1,l.vnode&&l.vnode(o),O(t.__P,o,r,t.__n,t.__P.namespaceURI,32&r.__u?[e]:null,c,null==e?x(r):e,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,j(c,o,s),o.__e!=e&&C(o)),i.length>u&&i.sort(f));P.__r=0}function S(n,l,u,t,i,o,r,f,e,c,s){var a,v,y,d,w,_=t&&t.__k||p,g=l.length;for(u.__d=e,$(u,l,_),e=u.__d,a=0;a<g;a++)null!=(y=u.__k[a])&&\"boolean\"!=typeof y&&\"function\"!=typeof y&&(v=-1===y.__i?h:_[y.__i]||h,y.__i=a,O(n,y,v,i,o,r,f,e,c,s),d=y.__e,y.ref&&v.ref!=y.ref&&(v.ref&&N(v.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),65536&y.__u||v.__k===y.__k?(e&&\"string\"==typeof y.type&&!n.contains(e)&&(e=x(v)),e=I(y,e,n)):\"function\"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=w}function $(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)r=t+a,null!=(i=n.__k[t]=null==(i=l[t])||\"boolean\"==typeof i||\"function\"==typeof i?null:\"string\"==typeof i||\"number\"==typeof i||\"bigint\"==typeof i||i.constructor==String?g(null,i,null,null,null):y(i)?g(k,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?g(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=L(i,u,r,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,\"function\"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f==r-1?a=f-r:f==r+1?a++:f>r?s>e-r?a+=f-r:a--:f<r&&a++,f!==t+a&&(i.__u|=65536))):(o=u[r])&&null==o.key&&o.__e&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V(o,o,!1),u[r]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V(o,o))}function I(n,l,u){var t,i;if(\"function\"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=I(t[i],l,u));return l}n.__e!=l&&(u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function H(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(y(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function L(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++}}return-1}function T(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||v.test(l)?u:u+\"px\"}function A(n,l,u,t,i){var o;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||T(n.style,l,\"\");if(u)for(l in u)t&&u[l]===t[l]||T(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,\"$1\")),l=l.toLowerCase()in n||\"onFocusOut\"===l||\"onFocusIn\"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=e,n.addEventListener(l,o?s:c,o)):n.removeEventListener(l,o?s:c,o);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!==l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=e++;else if(u.t<t.u)return;return t(l.event?l.event(u):u)}}}function O(n,u,t,i,o,r,f,e,c,s){var a,h,p,v,w,_,g,m,x,C,M,P,$,I,H,L,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof T)try{if(m=u.props,x=\"prototype\"in T&&T.prototype.render,C=(a=T.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?g=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(m,M):(u.__c=h=new b(m,M),h.constructor=T,h.render=q),C&&C.sub(h),h.props=m,h.state||(h.state={}),h.context=M,h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d({},h.__s)),d(h.__s,T.getDerivedStateFromProps(m,h.__s))),v=h.props,w=h.state,h.__v=u,p)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(x&&null==T.getDerivedStateFromProps&&m!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,M)||u.__v===t.__v)){for(u.__v!==t.__v&&(h.props=m,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u)}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,M),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,w,_)})}if(h.context=M,h.props=m,h.__P=n,h.__e=!1,$=l.__r,I=0,x){for(h.state=h.__s,h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,w)),S(n,y(L=null!=a&&a.type===k&&null==a.key?a.props.children:a)?L:[L],u,t,i,o,r,f,e,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&f.push(h),g&&(h.__E=h.__=null)}catch(n){u.__v=null,c||null!=r?(u.__e=e,u.__u|=c?160:32,r[r.indexOf(e)]=null):(u.__e=t.__e,u.__k=t.__k),l.__e(n,u,t)}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z(t.__e,u,t,i,o,r,f,c,s);(a=l.diffed)&&a(u)}function j(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function z(l,u,t,i,o,r,f,e,c){var s,a,p,v,d,_,g,m=t.props,k=u.props,b=u.type;if(\"svg\"===b?o=\"http://www.w3.org/2000/svg\":\"math\"===b?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=r)for(s=0;s<r.length;s++)if((d=r[s])&&\"setAttribute\"in d==!!b&&(b?d.localName===b:3===d.nodeType)){l=d,r[s]=null;break}if(null==l){if(null===b)return document.createTextNode(k);l=document.createElementNS(o,b,k.is&&k),r=null,e=!1}if(null===b)m===k||e&&l.data===k||(l.data=k);else{if(r=r&&n.call(l.childNodes),m=t.props||h,!e&&null!=r)for(m={},s=0;s<l.attributes.length;s++)m[(d=l.attributes[s]).name]=d.value;for(s in m)if(d=m[s],\"children\"==s);else if(\"dangerouslySetInnerHTML\"==s)p=d;else if(\"key\"!==s&&!(s in k)){if(\"value\"==s&&\"defaultValue\"in k||\"checked\"==s&&\"defaultChecked\"in k)continue;A(l,s,null,d,o)}for(s in k)d=k[s],\"children\"==s?v=d:\"dangerouslySetInnerHTML\"==s?a=d:\"value\"==s?_=d:\"checked\"==s?g=d:\"key\"===s||e&&\"function\"!=typeof d||m[s]===d||A(l,s,d,m[s],o);if(a)e||p&&(a.__html===p.__html||a.__html===l.innerHTML)||(l.innerHTML=a.__html),u.__k=[];else if(p&&(l.innerHTML=\"\"),S(l,y(v)?v:[v],u,t,i,\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":o,r,f,r?r[0]:t.__k&&x(t,0),e,c),null!=r)for(s=r.length;s--;)null!=r[s]&&w(r[s]);e||(s=\"value\",void 0!==_&&(_!==l[s]||\"progress\"===b&&!_||\"option\"===b&&_!==m[s])&&A(l,s,_,m[s],o),s=\"checked\",void 0!==g&&g!==l[s]&&A(l,s,g,m[s],o))}return l}function N(n,u,t){try{\"function\"==typeof n?n(u):n.current=u}catch(n){l.__e(n,t)}}function V(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&V(i[o],u,t||\"function\"!=typeof n.type);t||null==n.__e||w(n.__e),n.__c=n.__=n.__e=n.__d=void 0}function q(n,l,u){return this.constructor(n,u)}function B(u,t,i){var o,r,f,e;l.__&&l.__(u,t),r=(o=\"function\"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],O(t,u=(!o&&i||t).__k=_(k,null,[u]),r||h,h,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),j(f,u,e)}function D(n,l){B(n,l,D)}function E(l,u,t){var i,o,r,f,e=d({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),g(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l=\"__cC\"+a++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=[],(t={})[l]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,M(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=p.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),\"function\"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},b.prototype.render=k,i=[],r=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},P.__r=0,e=0,c=F(!1),s=F(!0),a=0;export{b as Component,k as Fragment,E as cloneElement,G as createContext,_ as createElement,m as createRef,_ as h,D as hydrate,t as isValidElement,l as options,B as render,H as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=n,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function d(n,t){c.__h&&c.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({}),u.__[n]}function h(n){return o=1,p(D,n)}function p(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return!!n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function y(n,u){var i=d(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__H.__h.push(i))}function _(n,u){var i=d(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function T(n,r){var u=d(t++,7);return C(u.__H,r)&&(u.__=n(),u.__H=r,u.__h=n),u.__}function q(n,t){return o=8,T(function(){return n},t)}function x(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function P(n,t){c.useDebugValue&&c.useDebugValue(t?t(n):n)}function b(n){var u=d(t++,10),i=h();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function g(){var n=d(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[]}catch(t){n.__H.__h=[],c.__e(t,n.__v)}}c.__b=function(n){r=null,e&&e(n)},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t)},c.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),u=r=null},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return!n.__||B(n)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],c.__e(r,n.__v)}}),l&&l(n,t)},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n)}catch(n){t=n}}),r.__H=void 0,t&&c.__e(t,r.__v))};var k=\"function\"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r))}function z(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function B(n){var t=r;n.__c=n.__(),r=t}function C(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return\"function\"==typeof t?t(n):t}export{q as useCallback,x as useContext,P as useDebugValue,y as useEffect,b as useErrorBoundary,g as useId,F as useImperativeHandle,_ as useLayoutEffect,T as useMemo,p as useReducer,A as useRef,h as useState};\n//# sourceMappingURL=hooks.module.js.map\n","import { CVCPolicyType, DatePolicyType } from './types';\n\nexport const ENCRYPTED = 'encrypted';\n\nexport const ENCRYPTED_CARD_NUMBER = 'encryptedCardNumber';\nexport const ENCRYPTED_EXPIRY_DATE = 'encryptedExpiryDate';\nexport const ENCRYPTED_EXPIRY_MONTH = 'encryptedExpiryMonth';\nexport const ENCRYPTED_EXPIRY_YEAR = 'encryptedExpiryYear';\nexport const ENCRYPTED_SECURITY_CODE = 'encryptedSecurityCode';\nexport const ENCRYPTED_PWD_FIELD = 'encryptedPassword';\nexport const ENCRYPTED_PIN_FIELD = 'encryptedPin';\n\nexport const ENCRYPTED_SECURITY_CODE_3_DIGITS = 'encryptedSecurityCode3digits';\nexport const ENCRYPTED_SECURITY_CODE_4_DIGITS = 'encryptedSecurityCode4digits';\n\nexport const GIFT_CARD = 'giftcard';\n\nexport const SF_VERSION = '5.5.3';\n\nexport const DEFAULT_CARD_GROUP_TYPES = ['amex', 'mc', 'visa'];\n\nexport const NON_CREDIT_CARD_TYPE_SECURED_FIELDS = [GIFT_CARD]; // Maybe, sometime in the future will include 'sepa' & 'sepadirectdebit'\n\n// Credit card (CardInput) related securedFields (based on the data-cse attribute)\nexport const CREDIT_CARD_SF_FIELDS = [\n    ENCRYPTED_CARD_NUMBER,\n    ENCRYPTED_EXPIRY_DATE,\n    ENCRYPTED_EXPIRY_MONTH,\n    ENCRYPTED_EXPIRY_YEAR,\n    ENCRYPTED_SECURITY_CODE,\n    ENCRYPTED_PWD_FIELD\n    // ENCRYPTED_PIN_FIELD,// probably redundant - it was an alt. name for KCP's encryptedPassword. But maybe has a role to play if we ever encrypt ibans.\n];\n\n/** A list of all the data-cse attributes that relate to securedFields (as found in card, giftcard) */\nexport const ALL_SECURED_FIELDS = CREDIT_CARD_SF_FIELDS;\n\n// Card components created as: checkout.create({BRAND}) e.g. checkout.create('bcmc')\n// - which are dedicated to a single, core, brand e.g. 'bcmc' BUT which can in effect handle multiple brands e.g. \"bcmc\", \"maestro\", \"visa\"\nexport const DEDICATED_CARD_COMPONENTS = ['bcmc'];\n\nexport const REQUIRED = 'required';\nexport const OPTIONAL = 'optional';\nexport const HIDDEN = 'hidden';\n\nexport const CVC_POLICY_REQUIRED: CVCPolicyType = REQUIRED;\nexport const CVC_POLICY_OPTIONAL: CVCPolicyType = OPTIONAL;\nexport const CVC_POLICY_HIDDEN: CVCPolicyType = HIDDEN;\n\nexport const DATE_POLICY_REQUIRED: DatePolicyType = REQUIRED;\nexport const DATE_POLICY_OPTIONAL: DatePolicyType = OPTIONAL;\nexport const DATE_POLICY_HIDDEN: DatePolicyType = HIDDEN;\n\nexport const DATA_ENCRYPTED_FIELD_ATTR = 'data-cse';\nexport const DATA_INFO = 'data-info';\nexport const DATA_UID = 'data-uid';\n\nexport const BRAND_ICON_UI_EXCLUSION_LIST = ['accel', 'pulse', 'star', 'nyce'];\n\nexport const BRAND_READABLE_NAME_MAP = {\n    visa: 'VISA',\n    mc: 'MasterCard',\n    amex: 'American Express',\n    discover: 'Discover',\n    cup: 'China Union Pay',\n    jcb: 'JCB',\n    diners: 'Diners Club',\n    maestro: 'Maestro',\n    bcmc: 'Bancontact card',\n    bijcard: 'de Bijenkorf Card'\n};\n\nexport const SF_FIELDS_MAP = {\n    [ENCRYPTED_CARD_NUMBER]: 'cardNumber', // ph\n    [ENCRYPTED_EXPIRY_DATE]: 'expiryDate', // ph\n    [ENCRYPTED_SECURITY_CODE]: 'securityCode',\n    [ENCRYPTED_EXPIRY_MONTH]: 'expiryMonth', // ph\n    [ENCRYPTED_EXPIRY_YEAR]: 'expiryYear', // ph\n    //\n    [ENCRYPTED_PWD_FIELD]: 'password',\n    //\n    [ENCRYPTED_SECURITY_CODE_3_DIGITS]: 'securityCodeThreeDigits', // ph\n    [ENCRYPTED_SECURITY_CODE_4_DIGITS]: 'securityCodeFourDigits' // ph\n};\n\n/** time within which we expect to receive a \"configured\" message from a securedField iframe, once it has registered as having loaded */\nexport const SF_CONFIG_TIMEOUT = 6000;\n","/**\n * returns the indicated property of an object, if it exists.\n *\n * @param object - The object to query\n * @param path - The property name or path to the property\n * @returns The value at `obj[p]`.\n\n * @example\n * ```\n *   getProp({x: 100}, 'x'); //=> 100\n *   getProp({}, 'x'); //=> undefined\n * ```\n */\nconst getProp = (object: any, path: string): any => {\n    const splitPath = path.split('.');\n    const reducer = (xs, x) => (xs && xs[x] ? xs[x] : undefined);\n\n    return splitPath.reduce(reducer, object);\n};\n\nexport default getProp;\n","import {\n    ENCRYPTED_CARD_NUMBER,\n    ENCRYPTED_EXPIRY_DATE,\n    ENCRYPTED_EXPIRY_MONTH,\n    ENCRYPTED_EXPIRY_YEAR,\n    ENCRYPTED_PWD_FIELD,\n    ENCRYPTED_SECURITY_CODE\n} from '../../components/internal/SecuredFields/lib/constants';\n\nexport const ARIA_ERROR_SUFFIX = '-ariaError';\nexport const ARIA_CONTEXT_SUFFIX = '-ariaContext';\n\nexport const ERROR_ACTION_FOCUS_FIELD = 'focusField';\nexport const ERROR_ACTION_BLUR_SCENARIO = 'notValidating:blurScenario';\nexport const ERROR_FIELD_REQUIRED = 'field.error.required';\nexport const ERROR_FIELD_INVALID = 'field.error.invalid';\n\nexport const ERROR_INVALID_FORMAT_EXPECTS = 'invalid.format.expects';\nexport const CREDITCARD_HOLDER_NAME_INVALID = 'creditCard.holderName.invalid';\nexport const CREDITCARD_TAX_NUMBER_INVALID = 'creditCard.taxNumber.invalid';\nexport const BOLETO_SOCIAL_SECURITY_NUMBER_INVALID = 'boleto.socialSecurityNumber.invalid';\n\nexport enum ErrorCodePrefixes {\n    CC_NUM = 'cc.num',\n    CC_DAT = 'cc.dat',\n    CC_MTH = 'cc.mth',\n    CC_YR = 'cc.yr',\n    CC_CVC = 'cc.cvc',\n    KCP_PWD = 'kcp.pwd'\n}\n\n/**\n * For SecuredFields\n * Human readable error strings mapped to the codes, used as keys, in the translations files\n */\nexport enum SF_ErrorCodes {\n    ERROR_MSG_INCOMPLETE_FIELD = 'err.gen.9100',\n    ERROR_MSG_INVALID_FIELD = 'err.gen.9101',\n\n    ERROR_MSG_LUHN_CHECK_FAILED = `${ErrorCodePrefixes.CC_NUM}.902`,\n    ERROR_MSG_EMPTY_PAN = `${ErrorCodePrefixes.CC_NUM}.900`,\n    ERROR_MSG_UNSUPPORTED_CARD_ENTERED = `${ErrorCodePrefixes.CC_NUM}.903`,\n    ERROR_MSG_INCORRECTLY_FILLED_PAN = `${ErrorCodePrefixes.CC_NUM}.901`, // 'Enter the complete card number'\n\n    ERROR_MSG_CARD_TOO_OLD = `${ErrorCodePrefixes.CC_DAT}.912`,\n    ERROR_MSG_CARD_TOO_FAR_IN_FUTURE = `${ErrorCodePrefixes.CC_DAT}.913`,\n    ERROR_MSG_CARD_EXPIRES_TOO_SOON = `${ErrorCodePrefixes.CC_DAT}.914`,\n    ERROR_MSG_EMPTY_DATE = `${ErrorCodePrefixes.CC_DAT}.910`,\n    ERROR_MSG_INCORRECTLY_FILLED__DATE = `${ErrorCodePrefixes.CC_DAT}.911`,\n\n    ERROR_MSG_EMPTY_YEAR = `${ErrorCodePrefixes.CC_YR}.917`,\n    ERROR_MSG_INCORRECTLY_FILLED_YEAR = `${ErrorCodePrefixes.CC_YR}.918`,\n\n    // ERROR_MSG_INCORRECTLY_FILLED_MONTH= `cc.mth.916`,\n    ERROR_MSG_EMPTY_MONTH = `${ErrorCodePrefixes.CC_MTH}.915`,\n\n    ERROR_MSG_EMPTY_CVC = `${ErrorCodePrefixes.CC_CVC}.920`,\n    ERROR_MSG_INCORRECTLY_FILLED_CVC = `${ErrorCodePrefixes.CC_CVC}.921`,\n\n    ERROR_MSG_EMPTY_KCP_PWD = `${ErrorCodePrefixes.KCP_PWD}.940`,\n    ERROR_MSG_INCORRECTLY_FILLED_KCP_PWD = `${ErrorCodePrefixes.KCP_PWD}.941`\n}\n\nexport const EMPTY_FIELD_ERROR_MESSAGES = {\n    [ENCRYPTED_CARD_NUMBER]: SF_ErrorCodes.ERROR_MSG_EMPTY_PAN,\n    [ENCRYPTED_EXPIRY_DATE]: SF_ErrorCodes.ERROR_MSG_EMPTY_DATE,\n    [ENCRYPTED_EXPIRY_MONTH]: SF_ErrorCodes.ERROR_MSG_EMPTY_MONTH,\n    [ENCRYPTED_EXPIRY_YEAR]: SF_ErrorCodes.ERROR_MSG_EMPTY_YEAR,\n    [ENCRYPTED_SECURITY_CODE]: SF_ErrorCodes.ERROR_MSG_EMPTY_CVC,\n    [ENCRYPTED_PWD_FIELD]: SF_ErrorCodes.ERROR_MSG_EMPTY_KCP_PWD\n};\n","// ROUTINES USED IN SecuredFieldsProvider.componentDidMount TO DETECT & MAP FIELD NAMES ///////////\nimport {\n    CVC_POLICY_HIDDEN,\n    CVC_POLICY_OPTIONAL,\n    DATE_POLICY_HIDDEN,\n    DATE_POLICY_OPTIONAL,\n    ENCRYPTED_EXPIRY_DATE,\n    ENCRYPTED_EXPIRY_MONTH,\n    ENCRYPTED_EXPIRY_YEAR,\n    ENCRYPTED_SECURITY_CODE\n} from '../lib/constants';\nimport getProp from '../../../../utils/getProp';\nimport { EMPTY_FIELD_ERROR_MESSAGES } from '../../../../core/Errors/constants';\n\n/**\n * Make an array of encrypted field names based on the value of the 'data-cse' attribute of elements in the rootNode\n */\nexport const getFields = rootNode => {\n    if (rootNode) {\n        return Array.prototype.slice.call(rootNode.querySelectorAll('[data-cse*=\"encrypted\"]')).map(f => f.getAttribute('data-cse'));\n    }\n    return [];\n};\n\n/**\n * If, visually, we're dealing with a single date field (expiryDate) we still need separate entries\n * for expiryMonth & expiryYear - since that is how the values will be delivered from securedFields\n */\nexport const validFieldsReducer = (acc, cur) => {\n    if (cur === ENCRYPTED_EXPIRY_DATE) {\n        acc[ENCRYPTED_EXPIRY_MONTH] = false;\n        acc[ENCRYPTED_EXPIRY_YEAR] = false;\n    } else {\n        acc[cur] = false;\n    }\n\n    return acc;\n};\n// -- end ROUTINES USED IN SecuredFieldsProvider.componentDidMount --------------------------------\n\n// ROUTINES USED IN SecuredFieldsProvider.showValidation TO GENERATE ERRORS ///////////\n/**\n *  If, visually, we're dealing with a single date field (expiryDate) remap the separate entries we have\n *  for the valid states of expiryMonth & expiryYear back to the single key we use to an store an error\n *  i.e `\"encryptedExpiryMonth\" & \"encryptedExpiryYear\" => \"encryptedExpiryDate\"`\n */\nconst mapDateFields = (field, numDateFields) => {\n    const isDateField = field === ENCRYPTED_EXPIRY_MONTH || field === ENCRYPTED_EXPIRY_YEAR;\n    return numDateFields === 1 && isDateField ? ENCRYPTED_EXPIRY_DATE : field;\n};\n\n/**\n * Skip generating an error for an optional field, unless it is already in error\n */\nconst skipOptionalFields = (field, state, fieldNames) => {\n    // console.log('\\n### utils::skipOptionalField3:: examining field=', field);\n    const { isFieldOfType, fieldIsValid } = fieldNames.reduce(\n        (acc, fieldName) => {\n            if (!acc.isFieldOfType) {\n                // console.log('### utils:: fieldName:: ', fieldName, 'match=', field === fieldName);\n                acc.isFieldOfType = field === fieldName;\n                acc.fieldIsValid = !state.errors[fieldName];\n            }\n            return acc;\n        },\n        { isFieldOfType: false, fieldIsValid: false }\n    );\n\n    const policyType = field === ENCRYPTED_SECURITY_CODE ? 'cvcPolicy' : 'expiryDatePolicy';\n\n    const policyOptional = policyType === 'cvcPolicy' ? CVC_POLICY_OPTIONAL : DATE_POLICY_OPTIONAL;\n    const policyHidden = policyType === 'cvcPolicy' ? CVC_POLICY_HIDDEN : DATE_POLICY_HIDDEN;\n\n    // if policy != required\n    return (state[policyType] === policyOptional || state[policyType] === policyHidden) && fieldIsValid && isFieldOfType ? null : field;\n};\n\nexport const getErrorReducer = (numDateFields, state) => (acc, field) => {\n    // We're only interested in the non-valid fields from the state.valid object...\n    let val =\n        state.valid[field] !== true\n            ? mapDateFields(field, numDateFields) // Map the keys we use for the valid state to the key(s) we use for the error state\n            : null;\n\n    // Skip error generation for optional/hidden CVC & Date unless the fields are already in error\n    val = skipOptionalFields(val, state, [ENCRYPTED_SECURITY_CODE, ENCRYPTED_EXPIRY_DATE, ENCRYPTED_EXPIRY_MONTH, ENCRYPTED_EXPIRY_YEAR]);\n\n    // console.log('### utils:::: ############# val=', val);\n\n    if (val && !acc.includes(val)) acc.push(val);\n\n    return acc;\n};\n\n/**\n * Create an object suitable for sending to our handleOnError function\n */\nexport const getErrorObject = (fieldType, rootNode, state) => {\n    // Get existing error OR field is empty in which case get field specific msg OR use default\n    const error = getProp(state, `errors.${fieldType}`) || EMPTY_FIELD_ERROR_MESSAGES[fieldType];\n    return {\n        rootNode,\n        fieldType,\n        error,\n        type: 'card'\n    };\n};\n// -- end ROUTINES USED IN SecuredFieldsProvider.showValidation -----------------------\n","import { CSFSetupObject, CSFConfigObject, CSFCallbacksConfig, CSFStateObject } from './types';\nimport { SFFeedbackObj, SendBrandObject, SendExpiryDateObject, CVCPolicyType, DatePolicyType, SFFieldType } from '../types';\nimport { createSecuredFields } from './extensions/createSecuredFields';\nimport processBrand from './partials/processBrand';\nimport handleBrandFromBinLookup from './extensions/handleBrandFromBinLookup';\n\nabstract class AbstractCSF {\n    // Set in CSF\n    protected callbacks: CSFCallbacksConfig;\n    protected config: CSFConfigObject;\n    protected props: CSFSetupObject;\n    protected state: CSFStateObject;\n    protected validateForm: () => void;\n    protected handleBrandFromBinLookup: typeof handleBrandFromBinLookup;\n    protected callbacksHandler: (callbacksObj: object) => void;\n    protected configHandler: (props: CSFSetupObject) => void;\n    protected createCardSecuredFields: (securedFields: HTMLElement[], cvcPolicy: CVCPolicyType, expiryDatePolicy: DatePolicyType) => Promise<any>;\n    protected createNonCardSecuredFields: (securedFields: HTMLElement[]) => Promise<any>;\n    protected createSecuredFields: typeof createSecuredFields;\n    protected destroySecuredFields: () => void;\n    protected handleIOSTouchEvents: () => void;\n    protected destroyTouchendListener: () => void;\n    protected destroyTouchstartListener: () => void;\n    protected handleBinValue: (pFeedbackObj: SFFeedbackObj) => void;\n    protected handleEncryption: (pFeedbackObj: SFFeedbackObj) => void;\n    protected handleFocus: (pFeedbackObj: SFFeedbackObj) => void;\n    protected handleIframeConfigFeedback: (pFeedbackObj) => boolean;\n    protected handleValidation: (pFeedbackObj: SFFeedbackObj) => void;\n    protected handleSFShiftTab: (fieldType: string) => void;\n    protected handleShiftTab: (fieldType: string) => void;\n    protected isConfigured: () => void;\n    protected postMessageToAllIframes: (pDataObj: object) => void;\n    protected processAutoComplete: (pFeedbackObj: SFFeedbackObj) => void;\n    protected processBrand: typeof processBrand;\n    protected sendBrandToCardSF: (brandObj: SendBrandObject) => void;\n    protected sendExpiryDatePolicyToSF: (dateObj: SendExpiryDateObject) => void;\n    protected setFocusOnFrame: (pFieldType: SFFieldType, doLog?: boolean) => void;\n    protected setupSecuredField: (pItem: HTMLElement) => void;\n    protected touchendListener: (e: Event) => void;\n    protected touchstartListener: () => void;\n    protected hasGenuineTouchEvents: boolean;\n    // Set in createSecuredFields\n    protected encryptedAttrName: string;\n    protected hasRedundantCVCField: boolean;\n    protected isSingleBrandedCard: boolean;\n    protected securityCode: string;\n    // --\n    protected constructor(setupObj: CSFSetupObject) {\n        this.props = setupObj;\n        this.state = {} as any as CSFStateObject;\n\n        // Initialise storage objects\n        this.config = {} as any as CSFConfigObject; // {} as ConfigObject fails in linting\n        this.callbacks = {} as any as CSFCallbacksConfig;\n    }\n}\nexport default AbstractCSF;\n","/**\n * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\n * of values.\n * @internal\n */\nconst objToString = Object.prototype.toString;\n\n/**\n * Checks if `prop` is classified as an `Array` primitive or object.\n * @internal\n * @param prop - The value to check.\n * @returns Returns `true` if `prop` is correctly classified, else `false`.\n * @example\n * ```\n * isArray([1, 2, 3]);\n * // => true\n *\n * isArray(1);\n * // => false\n * ```\n */\nexport function isArray(prop) {\n    return typeof prop === 'object' && prop !== null && Object.prototype.toString.call(prop) === '[object Array]';\n}\n\n/**\n * The function existy is meant to define the existence of something.\n * Using the loose inequality operator (!=), it is possible to distinguish between null, undefined, and everything else.\n * @internal\n * @param x -\n * @returns\n */\nexport function existy(x) {\n    return x != null;\n}\n\n/**\n * Used to determine if something should be considered a synonym for true\n * NOTE: The number zero is considered “truthy” by design as is '' & `{}`.\n * If you wish to retain the behavior where 0 is a synonym for false, then do not use truthy where you might expect 0\n * So - returns true if something is not false, undefined or null\n * @internal\n * @param x -\n * @returns\n */\nexport function truthy(x) {\n    return x !== false && existy(x);\n}\n\n/**\n * Checks if `value` is object-like.\n * (FROM lodash.3.10.1)\n * @internal\n * @param value - The value to check.\n * @returns Returns `true` if `value` is object-like, else `false`.\n */\nfunction isObjectLike(value) {\n    return !!value && typeof value === 'object';\n}\n\n/**\n * @internal\n * Checks if `value` is classified as a `Number` primitive or object.\n * NOTE: `Infinity`, `-Infinity`, and `NaN` are classified as numbers\n * (FROM lodash.3.10.1)\n * @param value - The value to check.\n * @returns Returns `true` if `value` is correctly classified, else `false`.\n * @example\n * ```\n * isNumber(8.4);\n * // => true\n *\n * isNumber(NaN);\n * // => true\n *\n * isNumber('8.4');\n * // => false\n * ```\n */\nfunction isNumber(value) {\n    const numberTag = '[object Number]';\n    return typeof value === 'number' || (isObjectLike(value) && objToString.call(value) === numberTag);\n}\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n * (FROM lodash.3.10.1)\n * @internal\n * @param value - The value to check.\n * @returns Returns `true` if `value` is correctly classified, else `false`.\n * @example\n * ```\n * isString('abc');\n * // => true\n *\n * isString(1);\n * // => false\n * ```\n */\nfunction isString(value) {\n    const stringTag = '[object String]';\n    return typeof value === 'string' || (isObjectLike(value) && objToString.call(value) === stringTag);\n}\n\n/**\n * Returns true if x is:\n * null, undefined, false, 0, NaN, empty object or array, empty string\n * @param x -\n * @example\n * ```\n * falsy(0) // => true\n * falsy('') // => true\n * falsy({}) // => true\n * falsy([]) // => true\n * falsy(false) // => true\n * falsy(NaN) // => true\n * falsy(null) // => true\n * falsy(undefined) // => true\n *\n * falsy(1) // => false\n * falsy('d') // => false\n * falsy({type:\"kin\"}) // => false\n * falsy([6]) // => false\n * falsy(true) // => false\n * ```\n */\nexport function falsy(x) {\n    // Is null, undefined or false\n    if (!truthy(x)) {\n        return true;\n    }\n\n    // = 0 || NaN\n    if (isNumber(x)) {\n        if (x === 0 || Number.isNaN(x)) {\n            return true;\n        }\n    }\n\n    // empty array or string\n    if ((isArray(x) || isString(x)) && x.length === 0) {\n        return true;\n    }\n\n    // empty object\n    if (isObjectLike(x) && Object.keys(x).length === 0) {\n        return true;\n    }\n\n    return false;\n}\n\n/**\n * Inverse of falsy - returns true if x is NOT null, undefined, false, 0, NaN, empty object or array, empty string\n * @param x -\n */\nexport function notFalsy(x) {\n    return !falsy(x);\n}\n\n/**\n * 'Destructures' properties from object - returns a new object only containing those properties that were asked for (including if those properties\n * have values that are falsy: null, undefined, false, '').\n *\n * @param args - property names to select: can be either 'regular' arguments (comma separated list) or an array\n * @returns - an object with a function 'from' that accepts a single argument - the object from which to choose properties.\n * This function returns a new object - a copy of the original but only including the desired properties\n *\n * @example const strippedObj = pick('cardType', 'securityCode').from(cardObject);\n * @example const strippedObj = pick(['cardType', 'securityCode']).from(cardObject);\n */\nexport function pick(...args) {\n    const myArgs = isArray(args[0]) ? args[0] : args;\n    return {\n        from: obj => {\n            return myArgs.map(k => (k in obj ? { [k]: obj[k] } : {})).reduce((res, o) => ({ ...res, ...o }), {});\n        }\n    };\n}\n\n/**\n *'Destructures' properties from object, returning a new object containing all the original objects properties except those that were specifically rejected\n *\n * @param args - property names to reject: can be either 'regular' arguments (comma separated list) or an array\n * @returns - an object with a function 'from' that accepts a single argument - the object from which to reject properties.\n * This function returns a new object - a copy of the original but excluding the selected properties\n *\n * @example const strippedObj = reject('permittedLengths', 'pattern', 'startingRules').from(cardObject);\n * @example const strippedObj = reject(['permittedLengths', 'pattern', 'startingRules']).from(cardObject);\n */\nexport function reject(...args) {\n    const myArgs = isArray(args[0]) ? args[0] : args;\n    return {\n        from: obj => {\n            const vkeys = Object.keys(obj).filter(k => !myArgs.includes(k));\n            return pick(...vkeys).from(obj);\n        }\n    };\n}\n","/**\n * @internal\n * Utility class for logging messages/errors\n * Usage:\n * logger.log('Log message, always visible');\n *\n * For debug only messages:\n * window._b$dl && logger.log('Log message only visible on dev env');\n *\n * Or just use a conditional:\n * ```\n * if (window._b$dl) {\n *     logger.log('Log message only visible on dev env');\n * }\n * ```\n */\n\n/**\n * @internal\n * Logs errors\n * NOTE: changed to 'let' from 'const' for the purpose of running unit tests\n */\n// eslint-disable-next-line prefer-const\nexport let error = typeof window !== 'undefined' && window.console && window.console.error && window.console.error.bind(window.console);\n\n/**\n * @internal\n * Logs info\n */\nexport const info = typeof window !== 'undefined' && window.console && window.console.info && window.console.info.bind(window.console);\n\n/**\n * @internal\n * Logs\n * NOTE: changed to 'let' from 'const' for the purpose of running unit tests\n */\n\nexport let log = typeof window !== 'undefined' && window.console && window.console.log && window.console.log.bind(window.console); // eslint-disable-line\n\n/**\n * @internal\n * Logs warnings\n * NOTE: changed to 'let' from 'const' for the purpose of running unit tests\n */\n\nexport let warn = typeof window !== 'undefined' && window.console && window.console.warn && window.console.warn.bind(window.console); // eslint-disable-line\n","import { getCardGroupTypes } from '../utils/getCardGroupTypes';\nimport { NON_CREDIT_CARD_TYPE_SECURED_FIELDS, SF_VERSION } from '../../constants';\nimport * as logger from '../../utilities/logger';\nimport { CSFSetupObject } from '../types';\n\n/**\n * Parses this.props to set 'config' type vars on this (CSFComp)\n * - properties that just need to be set once, at startup, and then don't change\n *\n * See interface CSFConfigObject in types.ts\n */\nexport function handleConfig(props: CSFSetupObject): void {\n    // --\n    this.config.cardGroupTypes = getCardGroupTypes(props.cardGroupTypes);\n\n    if (process.env.NODE_ENV === 'development' && window._b$dl) {\n        logger.log('### StoreCls::init:: this.config.cardGroupTypes=', this.config.cardGroupTypes);\n    }\n\n    const loadingContext: string = props.loadingContext;\n\n    if (!loadingContext) {\n        logger.warn('WARNING Config :: no loadingContext has been specified!');\n        return;\n    }\n\n    // Ensure passed loadingContext has trailing slash\n    const lastChar = str => str.charAt(str.length - 1);\n    this.config.loadingContext = lastChar(loadingContext) === '/' ? loadingContext : `${loadingContext}/`;\n\n    // Is this for the regular creditCard or for another use-case for securedFields e.g. 'ach' or 'giftcard'\n    this.config.isCreditCardType = NON_CREDIT_CARD_TYPE_SECURED_FIELDS.includes(props.type) === false;\n\n    // Configuration object for individual txVariants - contains styling object values for securedFields inputs\n    this.config.iframeUIConfig = props.iframeUIConfig ?? {};\n\n    // By default CSF is allowed to automatically shift focus from the date to CVC fields - user of CSF must explicitly 'opt-out' to prevent this happening\n    this.config.autoFocus = !(props.autoFocus === false || props.autoFocus === 'false');\n\n    // By default CSF will NOT perform a console.warn when receiving postMessages with origin or numKey mismatches - user of CSF must explicitly 'opt-in' to get this\n    this.config.showWarnings = props.showWarnings === true || props.showWarnings === 'true';\n\n    // By default CSF will strip the trailing separator character from valid credit card numbers - user of CSF must explicitly 'opt-out' to prevent this happening\n    this.config.trimTrailingSeparator = !(props.trimTrailingSeparator === false || props.trimTrailingSeparator === 'false');\n\n    // By default CSF is allowed to add a fix for iOS to force the keypad to retract - user of CSF must explicitly 'opt-out' to prevent this happening\n    this.config.keypadFix = !(props.keypadFix === false || props.keypadFix === 'false');\n\n    // To set the type on the iframe input fields to 'tel' c.f. the default 'text' (with inputmode='numeric')\n    this.config.legacyInputMode = props.legacyInputMode || null;\n\n    // To configure the minimum expiry date to a merchant defined value - this means the card has to be valid until at least this date\n    this.config.minimumExpiryDate = props.minimumExpiryDate || null;\n\n    this.config.sfLogAtStart = window._b$dl === true;\n\n    const sfBundleType: string = this.config.isCreditCardType ? 'card' : props.type;\n\n    // Add a hash of the origin to ensure urls are different across domains\n    const d = btoa(window.location.origin);\n\n    /**\n     * Unless we are forcing the use of the compat version via card config\n     * - detect Edge vn \\<= 18 & IE11 - who don't support TextEncoder; and use this as an indicator to load a different, compatible, version of SF\n     */\n    const needsJWECompatVersion = props.forceCompat ? true : !(typeof window.TextEncoder === 'function');\n\n    const bundleType = `${sfBundleType}${needsJWECompatVersion ? 'Compat' : ''}`; // e.g. 'card' or 'cardCompat'\n\n    this.config.iframeSrc = `${this.config.loadingContext}securedfields/${props.clientKey}/${SF_VERSION}/securedFields.html?type=${bundleType}&d=${d}`;\n\n    // TODO###### FOR QUICK LOCAL TESTING of sf\n    if (process.env.NODE_ENV === 'development' && process.env.__SF_ENV__ !== 'build') {\n        this.config.iframeSrc = `${process.env.__SF_ENV__}securedFields.${SF_VERSION}.html?type=${sfBundleType}`;\n    }\n    // TODO######\n}\n","import { isArray } from '../../../../../../utils/commonUtils';\nimport { DEFAULT_CARD_GROUP_TYPES } from '../../constants';\n\nexport const getCardGroupTypes = (cardGroupTypes?): string[] =>\n    isArray(cardGroupTypes) && cardGroupTypes.length ? cardGroupTypes : DEFAULT_CARD_GROUP_TYPES;\n","import { CSFCallbacksConfig } from '../types';\n\nconst noop = () => {};\n\nexport function configureCallbacks(callbacksObj: CSFCallbacksConfig = {} as any as CSFCallbacksConfig): void {\n    // --\n    this.callbacks.onLoad = callbacksObj.onLoad ? callbacksObj.onLoad : noop;\n\n    this.callbacks.onConfigSuccess = callbacksObj.onConfigSuccess ? callbacksObj.onConfigSuccess : noop;\n\n    this.callbacks.onFieldValid = callbacksObj.onFieldValid ? callbacksObj.onFieldValid : noop;\n\n    this.callbacks.onAllValid = callbacksObj.onAllValid ? callbacksObj.onAllValid : noop;\n\n    this.callbacks.onBrand = callbacksObj.onBrand ? callbacksObj.onBrand : noop;\n\n    this.callbacks.onError = callbacksObj.onError ? callbacksObj.onError : noop;\n\n    this.callbacks.onFocus = callbacksObj.onFocus ? callbacksObj.onFocus : noop;\n\n    this.callbacks.onBinValue = callbacksObj.onBinValue ? callbacksObj.onBinValue : noop;\n\n    this.callbacks.onAutoComplete = callbacksObj.onAutoComplete ? callbacksObj.onAutoComplete : noop;\n\n    this.callbacks.onAdditionalSFConfig = callbacksObj.onAdditionalSFConfig ? callbacksObj.onAdditionalSFConfig : noop;\n\n    this.callbacks.onAdditionalSFRemoved = callbacksObj.onAdditionalSFRemoved ? callbacksObj.onAdditionalSFRemoved : noop;\n\n    this.callbacks.onTouchstartIOS = callbacksObj.onTouchstartIOS ? callbacksObj.onTouchstartIOS : noop;\n\n    this.callbacks.onKeyPressed = callbacksObj.onKeyPressed ? callbacksObj.onKeyPressed : noop;\n}\n","import { ENCRYPTED_EXPIRY_DATE } from '../../constants';\nimport { CardFieldValidData, EncryptionObj } from '../../types';\n\ninterface CallbackObjectProps {\n    fieldType: string;\n    encryptedFieldName: string;\n    uuid: string;\n    isValid: boolean;\n    txVariant: string;\n    rootNode: HTMLElement;\n}\n\nconst makeCallbackObj = ({ fieldType, encryptedFieldName, uuid, isValid, txVariant, rootNode }: CallbackObjectProps): CardFieldValidData => ({\n    fieldType, // encryptedCardNumber, encryptedSecurityCode, encryptedExpiryDate\n    encryptedFieldName, // encryptedCardNumber, encryptedSecurityCode, encryptedExpiryMonth, encryptedExpiryYear\n    uid: uuid, // card-encrypted-encryptedCardNumber, card-encrypted-encryptedSecurityCode, card-encrypted-month, card-encrypted-year, card-encrypted-encryptedExpiryMonth, card-encrypted-encryptedExpiryYear\n    valid: isValid,\n    type: txVariant,\n    rootNode // A ref to the 'form' element holding the securedFields\n});\n\nexport const makeCallbackObjectsValidation = ({ fieldType, txVariant, rootNode }): CardFieldValidData[] => {\n    // - create callback objects to report the changed valid state of the field\n    const isExpiryDateField: boolean = fieldType === ENCRYPTED_EXPIRY_DATE;\n\n    const callbackObjectsArr: CardFieldValidData[] = [];\n\n    const sepExpiryDateNames: string[] = ['encryptedExpiryMonth', 'encryptedExpiryYear'];\n\n    let i: number;\n    let uuid: string;\n    let encryptedType: string;\n    let encryptedFieldName: string;\n\n    // For expiryDate field we need to remove 2 DOM elements & create 2 objects (relating to month & year)\n    // - for everything else we just need to remove 1 element & create 1 callback object\n    const totalFields: number = isExpiryDateField ? 2 : 1;\n\n    for (i = 0; i < totalFields; i += 1) {\n        encryptedType = isExpiryDateField ? sepExpiryDateNames[i] : fieldType; // encryptedCardNumber, encryptedSecurityCode, encryptedExpiryMonth, encryptedExpiryYear\n\n        uuid = `${txVariant}-encrypted-${encryptedType}`; // card-encrypted-encryptedCardNumber, card-encrypted-encryptedSecurityCode, card-encrypted-encryptedExpiryMonth, card-encrypted-encryptedExpiryYear\n\n        encryptedFieldName = isExpiryDateField ? encryptedType : fieldType; // encryptedCardNumber, encryptedSecurityCode, encryptedExpiryMonth, encryptedExpiryYear\n\n        // Create objects to broadcast valid state\n        // const callbackObj: CardFieldValidData = makeCallbackObj(pFieldType, encryptedFieldName, uuid, false, pTxVariant, pRootNode, null);\n        const callbackObj: CardFieldValidData = makeCallbackObj({\n            fieldType,\n            encryptedFieldName,\n            uuid,\n            isValid: false,\n            txVariant,\n            rootNode\n        } as CallbackObjectProps);\n\n        callbackObjectsArr.push(callbackObj);\n    }\n\n    return callbackObjectsArr;\n};\n\nexport const makeCallbackObjectsEncryption = ({ fieldType, txVariant, rootNode, encryptedObjArr }): CardFieldValidData[] => {\n    let i: number;\n    let uuid: string;\n    let encryptedObj: EncryptionObj;\n    let encryptedFieldName: string;\n    let encryptedBlob: string;\n\n    const callbackObjectsArr: CardFieldValidData[] = [];\n\n    for (i = 0; i < encryptedObjArr.length; i += 1) {\n        encryptedObj = encryptedObjArr[i];\n        encryptedFieldName = encryptedObj.encryptedFieldName;\n        uuid = `${txVariant}-encrypted-${encryptedFieldName}`;\n        encryptedBlob = encryptedObj.blob;\n\n        // Create objects to broadcast valid state\n        // const callbackObj: CardFieldValidData = makeCallbackObj(fieldType, encryptedFieldName, uuid, true, txVariant, rootNode, code);\n        const callbackObj: CardFieldValidData = makeCallbackObj({\n            fieldType,\n            encryptedFieldName,\n            uuid,\n            isValid: true,\n            txVariant,\n            rootNode\n        } as CallbackObjectProps);\n        callbackObj.blob = encryptedBlob;\n\n        callbackObjectsArr.push(callbackObj);\n    }\n\n    return callbackObjectsArr;\n};\n","export function hasOwnProperty(obj = {}, prop) {\n    return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n","import { CardErrorData, SFFeedbackObj } from '../../types';\nimport SecuredField from '../../securedField/SecuredField';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\n\ntype RtnType_callbackFn = (obj: CardErrorData) => void;\n\nexport const processErrors = (\n    pFeedbackObj: SFFeedbackObj,\n    securedField: SecuredField,\n    type: string,\n    rootNode: HTMLElement,\n    callbackFn: RtnType_callbackFn\n): CardErrorData => {\n    if (!hasOwnProperty(pFeedbackObj, 'error')) return null;\n\n    const fieldType: string = pFeedbackObj.fieldType;\n\n    const field: SecuredField = securedField;\n\n    // Initialise error callback object\n    const dataObj: CardErrorData = { rootNode, fieldType, error: null, type: null };\n\n    const isError: boolean = pFeedbackObj.error !== '';\n\n    // Error is empty string && field is not already in error: do nothing - don't need to propagate this non-error if the field wasn't already in error\n    // This situation arises when we encrypt a field and trigger an \"error clearing\" event i.e. deleting a character\n    // It also arises when an unsupportedCard (re. binLookup) is entered and the shopper continues to interact with the field (adding or deleting digits)\n    if (!isError && !field.hasError) {\n        return null;\n    }\n\n    // Add props to error callback object\n    dataObj.error = isError ? pFeedbackObj.error : '';\n    dataObj.type = type;\n\n    // Set error state & type on securedField instance\n    field.hasError = isError;\n    field.errorType = dataObj.error;\n\n    callbackFn(dataObj);\n\n    return dataObj;\n};\n","import { makeCallbackObjectsValidation } from '../utils/callbackUtils';\nimport { processErrors } from '../utils/processErrors';\nimport { existy } from '../../../../../../utils/commonUtils';\nimport { ENCRYPTED_SECURITY_CODE, ENCRYPTED_CARD_NUMBER } from '../../constants';\nimport { SFFeedbackObj, CardFieldValidData } from '../../types';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\n\nexport function handleValidation(pFeedbackObj: SFFeedbackObj): void {\n    // --\n    let callbackObjectsArr: CardFieldValidData[];\n    const fieldType: string = pFeedbackObj.fieldType;\n    const isGenericCard: boolean = this.state.type === 'card';\n\n    /**\n     * CHECK IF CVC IS OPTIONAL\n     */\n    // Brand information (from setting the CC number) now contains information about\n    // whether cvc is optional for that brand e.g. maestro\n    // If it is optional, and we're dealing with the generic card type,\n    // (re)set the property that indicates this (in the CVC SecuredField instance)\n    if (\n        isGenericCard &&\n        hasOwnProperty(pFeedbackObj, 'cvcPolicy') &&\n        existy(pFeedbackObj.cvcPolicy) &&\n        hasOwnProperty(this.state.securedFields, ENCRYPTED_SECURITY_CODE)\n    ) {\n        this.state.securedFields[ENCRYPTED_SECURITY_CODE].cvcPolicy = pFeedbackObj.cvcPolicy;\n    }\n\n    /**\n     * PROCESS & BROADCAST ERRORS (OR LACK OF)\n     */\n    processErrors(pFeedbackObj, this.state.securedFields[fieldType], this.state.type, this.props.rootNode, this.callbacks.onError);\n\n    /**\n     * REMOVE ANY EXISTING ENCRYPTED ELEMENT & CHECK VALIDITY OF THE FORM AS A WHOLE\n     */\n    // If the field was previously encrypted...\n    if (this.state.securedFields[fieldType].isEncrypted) {\n        // callbackObjectsArr will be an array containing 1 or 2 objects that need to be broadcast\n        callbackObjectsArr = makeCallbackObjectsValidation({ fieldType, txVariant: this.state.type, rootNode: this.props.rootNode });\n\n        // Add the endDigits to the object we send to the onFieldValid callback\n        // NOTE: in this case (validation) this will be an empty string\n        if (fieldType === ENCRYPTED_CARD_NUMBER) {\n            callbackObjectsArr[0].endDigits = '';\n        }\n\n        for (let i = 0, len = callbackObjectsArr.length; i < len; i += 1) {\n            // ...BROADCAST VALID STATE OF INDIVIDUAL INPUTS\n            this.callbacks.onFieldValid(callbackObjectsArr[i]);\n        }\n\n        // Remove the field's encrypted state\n        this.state.securedFields[fieldType].isEncrypted = false;\n    }\n\n    /**\n     * STORE & BROADCAST VALID STATE OF THE FORM AS A WHOLE\n     */\n    this.validateForm();\n\n    /**\n     * PROCESS & BROADCAST CARD BRANDS\n     */\n    if (hasOwnProperty(pFeedbackObj, 'brand')) {\n        this.processBrand(pFeedbackObj);\n    }\n}\n","const postMessageToIframe = (pDataObj: object, pIframeObj: Window, pLoadingContext: string): void => {\n    // Check that an iframe object exists for this fieldType... in some cases the iframe might not exist\n    // e.g. bcmc which has no cvc field so e.g. a call to setFocus on the cvc field is not possible\n    if (pIframeObj) {\n        const dataObjStr: string = JSON.stringify(pDataObj);\n        pIframeObj.postMessage(dataObjStr, pLoadingContext);\n    }\n};\n\nexport default postMessageToIframe;\n","import { CSFStateObject } from '../../types';\n\n/**\n * Retrieves the iframe, stored by field type, & returns it's contentWindow\n */\nexport default function getIframeContentWin(csfState: CSFStateObject, fieldType: string): Window {\n    return csfState.securedFields[fieldType]?.iframeContentWindow || null;\n}\n","import { makeCallbackObjectsEncryption } from '../utils/callbackUtils';\nimport {\n    ENCRYPTED_EXPIRY_MONTH,\n    ENCRYPTED_EXPIRY_YEAR,\n    ENCRYPTED_SECURITY_CODE,\n    ENCRYPTED_CARD_NUMBER,\n    ENCRYPTED_EXPIRY_DATE\n} from '../../constants';\nimport { processErrors } from '../utils/processErrors';\nimport { truthy } from '../../../../../../utils/commonUtils';\nimport { SFFeedbackObj, CardFieldValidData, EncryptionObj } from '../../types';\nimport postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\n\nexport function handleEncryption(pFeedbackObj: SFFeedbackObj): void {\n    // EXTRACT VARS\n    const fieldType: string = pFeedbackObj.fieldType;\n\n    // SET FOCUS ON OTHER INPUT - If user has just typed a correct expiryDate - set focus on the cvc field OR typed a correct expiryMonth - focus on year field\n    if (this.config.autoFocus) {\n        // pFeedbackObj.type === 'year' when the encryption is happening on an expiryDate field c.f. a separate year field (when it equals ENCRYPTED_EXPIRY_YEAR)\n        if (pFeedbackObj.type === 'year' || fieldType === ENCRYPTED_EXPIRY_YEAR) {\n            this.setFocusOnFrame(ENCRYPTED_SECURITY_CODE);\n        }\n        if (fieldType === ENCRYPTED_EXPIRY_MONTH) {\n            this.setFocusOnFrame(ENCRYPTED_EXPIRY_YEAR);\n        }\n    }\n    //--\n\n    let i: number;\n    let len: number;\n\n    const encryptedObjArr: EncryptionObj[] = pFeedbackObj[fieldType];\n\n    // Set boolean saying this securedField is in an encryptedState\n    this.state.securedFields[fieldType].isEncrypted = true;\n\n    // REMOVE ANY ERRORS ON FIELD e.g. was a full number that failed the luhnCheck, then we corrected the number and now it passes\n    processErrors(\n        { error: '', fieldType } as any as SFFeedbackObj,\n        this.state.securedFields[fieldType],\n        this.state.type,\n        this.props.rootNode,\n        this.callbacks.onError\n    );\n\n    // MAKE ENCRYPTION OBJECTS FOR EACH OF THE INDIVIDUAL INPUTS\n    // N.B. when considering \"individual inputs\" we are concerned with the 4 fields that the checkoutAPI expects to receive for a credit card payment:\n    // encryptedCardNumber, encryptedSecurityCode, encryptedExpiryMonth, encryptedExpiryYear\n    const callbackObjectsArr: CardFieldValidData[] = makeCallbackObjectsEncryption({\n        fieldType,\n        txVariant: this.state.type,\n        rootNode: this.props.rootNode,\n        encryptedObjArr\n    });\n\n    // For standalone month field\n    if (fieldType === ENCRYPTED_EXPIRY_MONTH) {\n        if (hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_YEAR)) {\n            const dataObj: object = {\n                txVariant: this.state.type,\n                code: pFeedbackObj.code,\n                blob: encryptedObjArr[0].blob,\n                fieldType: ENCRYPTED_EXPIRY_YEAR,\n                numKey: this.state.securedFields[ENCRYPTED_EXPIRY_YEAR].numKey\n            };\n            postMessageToIframe(dataObj, getIframeContentWin(this.state, ENCRYPTED_EXPIRY_YEAR), this.config.loadingContext);\n        }\n    }\n\n    // For number field - add the endDigits to the encryption object\n    if (fieldType === ENCRYPTED_CARD_NUMBER && truthy(pFeedbackObj.endDigits)) {\n        callbackObjectsArr[0].endDigits = pFeedbackObj.endDigits;\n    }\n\n    // For number field - add the 8 digit issuerBin to the encryption object\n    if (fieldType === ENCRYPTED_CARD_NUMBER && truthy(pFeedbackObj.issuerBin)) {\n        callbackObjectsArr[0].issuerBin = +pFeedbackObj.issuerBin;\n    }\n\n    // Add expiryDate to \"encryptedExpiryYear\" field. It will only be present if the correct config has been sent to SF\n    if (fieldType === ENCRYPTED_EXPIRY_DATE && truthy(pFeedbackObj.expiryDate)) {\n        callbackObjectsArr[1].expiryDate = pFeedbackObj.expiryDate;\n    }\n\n    // BROADCAST VALID STATE OF INDIVIDUAL INPUTS - passing the encryption objects\n    for (i = 0, len = callbackObjectsArr.length; i < len; i += 1) {\n        this.callbacks.onFieldValid(callbackObjectsArr[i]);\n    }\n    //--------------------------------------------\n\n    // STORE & BROADCAST VALID STATE OF THE FORM AS A WHOLE ///////\n    this.validateForm();\n}\n","const select = (root, selector) => {\n    let array = [];\n\n    if (root) {\n        // Convert NodeList to array\n        if (typeof root.querySelectorAll === 'function') {\n            array = [].slice.call(root.querySelectorAll(selector));\n        }\n    }\n\n    return array;\n};\n\nconst selectOne = (root, selector) => {\n    if (!root) {\n        return undefined;\n    }\n\n    return root.querySelector(selector);\n};\n\nconst getAttribute = (node, attribute) => {\n    if (!node) {\n        return undefined;\n    }\n    return node.getAttribute(attribute);\n};\n\n/**\n * @internal\n * Removes all children elements of the given node.\n *\n * @param node -\n */\nconst removeAllChildren = node => {\n    while (node.firstChild) {\n        node.removeChild(node.firstChild);\n    }\n};\n\nexport { getAttribute, select, selectOne, removeAllChildren };\n","import { CardObject } from '../../types';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\n\nlet shortestPermittedCardLength;\n\ninterface CardType {\n    __NO_BRAND?: string;\n    cards?: CardObject[];\n}\n\nconst CardType: CardType = {};\nCardType.__NO_BRAND = 'noBrand';\n\nCardType.cards = [];\n\nCardType.cards.push({\n    cardType: 'mc',\n    startingRules: [51, 52, 53, 54, 55, 22, 23, 24, 25, 26, 27],\n    permittedLengths: [16],\n    pattern: /^(5[1-5][0-9]{0,14}|2[2-7][0-9]{0,14})$/,\n    securityCode: 'CVC'\n});\n\nCardType.cards.push({ cardType: 'visadankort', startingRules: [4571], permittedLengths: [16], pattern: /^(4571)[0-9]{0,12}$/ });\n\nCardType.cards.push({\n    cardType: 'visa',\n    startingRules: [4],\n    permittedLengths: [13, 16, 19],\n    pattern: /^4[0-9]{0,18}$/,\n    securityCode: 'CVV'\n});\n\nCardType.cards.push({ cardType: 'amex', startingRules: [34, 37], permittedLengths: [15], pattern: /^3[47][0-9]{0,13}$/, securityCode: 'CID' });\n\nCardType.cards.push({ cardType: 'diners', startingRules: [36], permittedLengths: [14, 15, 16, 17, 18, 19], pattern: /^(36)[0-9]{0,12}$/ });\n\nCardType.cards.push({ cardType: 'maestrouk', startingRules: [6759], permittedLengths: [16, 18, 19], pattern: /^(6759)[0-9]{0,15}$/ });\n\nCardType.cards.push({ cardType: 'solo', startingRules: [6767], permittedLengths: [16, 18, 19], pattern: /^(6767)[0-9]{0,15}$/ });\n\nCardType.cards.push({\n    cardType: 'laser',\n    startingRules: [6304, 6706, 677117, 677120],\n    permittedLengths: [16, 17, 18, 19],\n    pattern: /^(6304|6706|6709|6771)[0-9]{0,15}$/,\n    cvcPolicy: 'optional'\n});\n\nCardType.cards.push({\n    cardType: 'discover',\n    startingRules: [6011, 644, 645, 646, 647, 648, 649, 65],\n    permittedLengths: [16, 17, 18, 19],\n    pattern: /^(6011[0-9]{0,12}|(644|645|646|647|648|649)[0-9]{0,13}|65[0-9]{0,14})$/\n});\n\nCardType.cards.push({\n    cardType: 'jcb',\n    startingRules: [3528, 3529, 353, 354, 355, 356, 357, 358],\n    permittedLengths: [16, 19],\n    pattern: /^(352[8,9]{1}[0-9]{0,15}|35[4-8]{1}[0-9]{0,16})$/,\n    securityCode: 'CAV'\n});\n\nCardType.cards.push({\n    cardType: 'bcmc',\n    startingRules: [6703, 479658, 606005],\n    permittedLengths: [16, 17, 18, 19],\n    pattern: /^((6703)[0-9]{0,15}|(479658|606005)[0-9]{0,13})$/,\n    cvcPolicy: 'hidden'\n});\n\nCardType.cards.push({ cardType: 'bijcard', startingRules: [5100081], permittedLengths: [16], pattern: /^(5100081)[0-9]{0,9}$/ });\n\nCardType.cards.push({ cardType: 'dankort', startingRules: [5019], permittedLengths: [16], pattern: /^(5019)[0-9]{0,12}$/ });\n\nCardType.cards.push({ cardType: 'hipercard', startingRules: [606282], permittedLengths: [16], pattern: /^(606282)[0-9]{0,10}$/ });\n\n// Moved above maestro (from position below uatp) to stop maestro being recognised over cup\nCardType.cards.push({ cardType: 'cup', startingRules: [62, 81], permittedLengths: [14, 15, 16, 17, 18, 19], pattern: /^(62|81)[0-9]{0,17}$/ }); // orig & android v1 + modified to include our test cards (81...)\n\nCardType.cards.push({\n    cardType: 'maestro',\n    startingRules: [50, 56, 57, 58, 6],\n    permittedLengths: [16, 17, 18, 19],\n    pattern: /^(5[0|6-8][0-9]{0,17}|6[0-9]{0,18})$/,\n    cvcPolicy: 'optional'\n});\n\nCardType.cards.push({\n    cardType: 'elo',\n    // prettier-ignore\n    startingRules: [506699, 50670, 50671, 50672, 50673, 50674, 50675, 50676, 506770, 506771, 506772, 506773, 506774, 506775, 506776, 506777, 506778, 401178, 438935, 451416, 457631, 457632, 504175, 627780, 636297, 636368],\n    permittedLengths: [16],\n    // prettier-ignore\n    pattern:\n        /^((((506699)|(506770)|(506771)|(506772)|(506773)|(506774)|(506775)|(506776)|(506777)|(506778)|(401178)|(438935)|(451416)|(457631)|(457632)|(504175)|(627780)|(636368)|(636297))[0-9]{0,10})|((50676)|(50675)|(50674)|(50673)|(50672)|(50671)|(50670))[0-9]{0,11})$/\n});\n\nCardType.cards.push({ cardType: 'uatp', startingRules: [1], permittedLengths: [15], pattern: /^1[0-9]{0,14}$/, cvcPolicy: 'optional' });\n\nCardType.cards.push({\n    cardType: 'cartebancaire',\n    startingRules: [4, 5, 6],\n    permittedLengths: [16],\n    pattern: /^[4-6][0-9]{0,15}$/\n});\n\nCardType.cards.push({ cardType: 'visaalphabankbonus', startingRules: [450903], permittedLengths: [16], pattern: /^(450903)[0-9]{0,10}$/ });\n\nCardType.cards.push({ cardType: 'mcalphabankbonus', startingRules: [510099], permittedLengths: [16], pattern: /^(510099)[0-9]{0,10}$/ });\n\nCardType.cards.push({\n    cardType: 'hiper',\n    startingRules: [637095, 637568, 637599, 637609, 637612],\n    permittedLengths: [16],\n    pattern: /^(637095|637568|637599|637609|637612)[0-9]{0,10}$/\n});\n\nCardType.cards.push({ cardType: 'oasis', startingRules: [982616], permittedLengths: [16], pattern: /^(982616)[0-9]{0,10}$/, cvcPolicy: 'optional' });\n\nCardType.cards.push({\n    cardType: 'karenmillen',\n    startingRules: [98261465],\n    permittedLengths: [16],\n    pattern: /^(98261465)[0-9]{0,8}$/,\n    cvcPolicy: 'optional'\n});\n\nCardType.cards.push({\n    cardType: 'warehouse',\n    startingRules: [982633],\n    permittedLengths: [16],\n    pattern: /^(982633)[0-9]{0,10}$/,\n    cvcPolicy: 'optional'\n});\n\nCardType.cards.push({ cardType: 'mir', startingRules: [220], permittedLengths: [16, 17, 18, 19], pattern: /^(220)[0-9]{0,16}$/ });\n\nCardType.cards.push({ cardType: 'codensa', startingRules: [590712], permittedLengths: [16], pattern: /^(590712)[0-9]{0,10}$/ });\n\nCardType.cards.push({\n    cardType: 'naranja',\n    startingRules: [377798, 377799, 402917, 402918, 527571, 527572, 589562],\n    permittedLengths: [16, 17, 18, 19],\n    pattern: /^(37|40|5[28])([279])\\d*$/\n});\n\n// TODO: 589657 clashes with naranja, rest ok\nCardType.cards.push({\n    cardType: 'cabal',\n    startingRules: [589657, 600691, 603522, 6042, 6043, 636908],\n    permittedLengths: [16, 17, 18, 19],\n    pattern: /^(58|6[03])([03469])\\d*$/\n});\n\nCardType.cards.push({\n    cardType: 'shopping',\n    startingRules: [2799, 589407, 603488],\n    permittedLengths: [16, 17, 18, 19],\n    pattern: /^(27|58|60)([39])\\d*$/\n});\n\nCardType.cards.push({ cardType: 'argencard', startingRules: [501], permittedLengths: [16, 17, 18, 19], pattern: /^(50)(1)\\d*$/ }); // NOTE: starting rule changed, from 501105, to not clash with dankort. Plus it now matches its regEx!\n\nCardType.cards.push({ cardType: 'troy', startingRules: [9792], permittedLengths: [16], pattern: /^(97)(9)\\d*$/ });\n\n// TODO: clashes with cabal\nCardType.cards.push({ cardType: 'forbrugsforeningen', startingRules: [600722], permittedLengths: [16], pattern: /^(60)(0)\\d*$/ });\n\nCardType.cards.push({\n    cardType: 'vpay',\n    startingRules: [401, 408, 413, 434, 435, 437, 439, 441, 442, 443, 444, 446, 447, 455, 458, 460, 461, 463, 466, 471, 479, 482, 483, 487],\n    permittedLengths: [13, 14, 15, 16, 17, 18, 19],\n    pattern: /^(40[1,8]|413|43[4,5]|44[1,2,3,4,6,7]|45[5,8]|46[0,1,3,6]|47[1,9]|48[2,3,7])[0-9]{0,16}$/ // ^(4[0-1|3-8][0-9]{1,17})$\n});\n\nCardType.cards.push({\n    cardType: 'rupay',\n    startingRules: [508528],\n    permittedLengths: [16],\n    // prettier-ignore\n    pattern:\n        /^(100003|508(2|[5-9])|60(69|[7-8])|652(1[5-9]|[2-5][0-9]|8[5-9])|65300[3-4]|8172([0-1]|[3-5]|7|9)|817(3[3-8]|40[6-9]|410)|35380([0-2]|[5-6]|9))[0-9]{0,12}$/\n});\n\nCardType.cards.push({\n    cardType: 'ticket',\n    expiryDatePolicy: 'hidden'\n});\n\nconst detectCard = (pCardNumber, pAvailableCards?) => {\n    let matchedCards;\n    let i;\n    let len;\n\n    if (pAvailableCards) {\n        // Filter CardType.cards down to those that are found in pAvailableCards\n        matchedCards = CardType.cards\n            .filter(card => pAvailableCards.includes(card.cardType))\n            // Further filter them to those with a regEx pattern that matches pCardNumber\n            .filter(card => hasOwnProperty(card, 'pattern') && pCardNumber.match(card.pattern));\n\n        // If we have matched cards: if there's only one - return it; else return the one with the longest startingRule\n        if (matchedCards.length) {\n            if (matchedCards.length === 1) {\n                return matchedCards[0];\n            }\n\n            // Find longest rule for each matched card & store it as a property on the card\n            for (i = 0, len = matchedCards.length; i < len; i += 1) {\n                if (!matchedCards[i].longestRule) {\n                    const longestRule = matchedCards[i].startingRules.reduce((a, b) => (a > b ? a : b));\n                    // What we actually store is how many chars are in the rule\n                    matchedCards[i].longestRule = String(longestRule).length;\n                }\n            }\n\n            // Based on each matched cards longest rule - find the card with the longest one!\n            return matchedCards.reduce((a, b) => (a.longestRule >= b.longestRule ? a : b));\n        }\n\n        return { cardType: CardType.__NO_BRAND };\n    }\n\n    return { cardType: CardType.__NO_BRAND };\n};\n\nconst detectCardLength = (pCard, pUnformattedVal) => {\n    let maxLength;\n    let shortenedNewValue;\n    let lengthDiff = 0;\n    let reachedValidLength = false;\n    let unformattedVal = pUnformattedVal;\n\n    // Find the longest of the permitted card number lengths for this card brand\n    const maxPermittedLength = pCard.cardType !== CardType.__NO_BRAND ? pCard.permittedLengths[pCard.permittedLengths.length - 1] : 0;\n\n    // If the input value is longer than it's max permitted length then shorten it to that length\n    if (maxPermittedLength && unformattedVal > maxPermittedLength) {\n        lengthDiff = unformattedVal.length - maxPermittedLength;\n\n        if (lengthDiff > 0) {\n            unformattedVal = unformattedVal.substring(0, unformattedVal.length - lengthDiff);\n            shortenedNewValue = unformattedVal;\n        }\n    }\n\n    // If cardNumber has reached one of the cardBrand's 'permitted lengths' - mark it as 'valid'\n    pCard.permittedLengths.forEach(pItem => {\n        if (unformattedVal.length === pItem) {\n            reachedValidLength = true;\n        }\n    });\n\n    // If cardNumber is as long as the cardBrand's maximum permitted length then set the maxLength var\n    if (unformattedVal.length === maxPermittedLength) {\n        // Set maxlength to max + the right amount of spaces (one for every 4 digits, but not on the last block)\n        const div = Math.floor(unformattedVal.length / 4);\n        const mod = unformattedVal.length % 4;\n        const numSpaces = mod > 0 ? div : div - 1;\n\n        maxLength = maxPermittedLength + numSpaces;\n\n        if (pCard.cardType.toLowerCase() === 'amex') {\n            maxLength = maxPermittedLength + 2; // = 17 = 15 digits with space after 4th & 10th\n        }\n    }\n\n    return {\n        shortenedNewValue,\n        maxLength,\n        reachedValidLength\n    };\n};\n\nconst getShortestPermittedCardLength = () => {\n    if (!shortestPermittedCardLength) {\n        let permittedLengthsArray = [];\n\n        CardType.cards.forEach(pItem => {\n            permittedLengthsArray = permittedLengthsArray.concat(pItem.permittedLengths ?? []);\n        });\n\n        shortestPermittedCardLength = Math.min.apply(null, permittedLengthsArray);\n    }\n\n    return shortestPermittedCardLength;\n};\n\nconst getCardByBrand = pBrand => {\n    const cardType = CardType.cards.filter(card => card.cardType === pBrand);\n\n    return cardType[0];\n};\n\nconst isGenericCardType = type => {\n    if (!type) throw new Error('Error: isGenericCardType: type param has not been specified');\n    return type === 'card' || type === 'scheme';\n};\n\nexport default {\n    detectCard,\n    detectCardLength,\n    getShortestPermittedCardLength,\n    getCardByBrand,\n    isGenericCardType,\n    __NO_BRAND: CardType.__NO_BRAND,\n    allCards: CardType.cards\n};\n","export const on = (node: Window | HTMLElement | Document, event, callback, useCapture: boolean = false) => {\n    if (node && typeof node.addEventListener === 'function') {\n        node.addEventListener(event, callback, useCapture);\n        return true;\n    }\n    return false;\n};\n\nexport const off = (node: Window | HTMLElement | Document, event, callback, useCapture: boolean = false) => {\n    if (node && typeof node.removeEventListener === 'function') {\n        node.removeEventListener(event, callback, useCapture);\n        return true;\n    }\n    return false;\n};\n","/**\n * Generate random number using window.crypto if available - otherwise fall back toMath.random\n *\n * @returns Number\n */\nexport function generateRandomNumber() {\n    if (!window.crypto) {\n        return (Math.random() * 0x100000000) | 0;\n    }\n\n    const ranNum = new Uint32Array(1);\n    window.crypto.getRandomValues(ranNum);\n    return ranNum[0];\n}\n\n/**\n * Recursively compare 2 objects\n */\nexport function objectsDeepEqual(x, y) {\n    const xType = typeof x;\n    const yType = typeof y;\n    if (x && y && xType === 'object' && xType === yType) {\n        if (Object.keys(x).length !== Object.keys(y).length) {\n            return false;\n        }\n        return Object.keys(x).every(key => objectsDeepEqual(x[key], y[key]));\n    }\n    return x === y;\n}\n\n/**\n * This function allows us to partially apply any number of variables to functions that take any number of parameters.\n * @returns \\{function(): *\\}\n */\nexport function partial(...args) {\n    // Store the args array\n    const myArgs = args;\n\n    // Grab the function (the first argument). myArgs now contains the remaining arguments\n    const fn = myArgs.shift();\n\n    // Return a function that calls fn with myArgs + whatever else is passed when this returned function is called\n    function partialFn(...args2) {\n        return fn.apply(this, myArgs.concat(args2));\n    }\n    return partialFn;\n}\n","import {\n    CVCPolicyType,\n    DatePolicyType,\n    RtnType_callbackFn,\n    RtnType_noParamVoidFn,\n    RtnType_postMessageListener,\n    SecuredFieldCommonProps\n} from '../types';\n\nabstract class AbstractSecuredField {\n    public sfConfig: SecuredFieldCommonProps; // could be protected but needs to be public for tests to run\n    protected loadingContext: string;\n    protected holderEl: HTMLElement;\n    protected iframeRef: HTMLElement;\n    public loadToConfigTimeout: number;\n    // From getters/setters with the same name\n    protected _isValid: boolean;\n    protected _iframeContentWindow: Window;\n    protected _numKey: number;\n    protected _isEncrypted: boolean;\n    protected _hasError: boolean;\n    protected _errorType: string;\n    protected _cvcPolicy: CVCPolicyType;\n    protected _expiryDatePolicy: DatePolicyType;\n    protected _iframeOnLoadListener: RtnType_noParamVoidFn;\n    protected _postMessageListener: RtnType_postMessageListener;\n    // Callback fns assigned via public functions\n    protected onIframeLoadedCallback: RtnType_noParamVoidFn;\n    protected onConfigCallback: RtnType_callbackFn;\n    protected onEncryptionCallback: RtnType_callbackFn;\n    protected onValidationCallback: RtnType_callbackFn;\n    protected onFocusCallback: RtnType_callbackFn;\n    protected onBinValueCallback: RtnType_callbackFn;\n    protected onTouchstartCallback: RtnType_callbackFn;\n    protected onShiftTabCallback: RtnType_callbackFn;\n    protected onAutoCompleteCallback: RtnType_callbackFn;\n    protected onKeyPressedCallback: RtnType_callbackFn;\n\n    protected constructor() {\n        this.sfConfig = {} as any as SecuredFieldCommonProps;\n    }\n}\n\nexport default AbstractSecuredField;\n","import { ERROR_ACTION_BLUR_SCENARIO, ERROR_ACTION_FOCUS_FIELD, ErrorCodePrefixes, SF_ErrorCodes } from './constants';\nimport { SFError } from '../../components/Card/components/CardInput/types';\nimport { SortErrorsObj, SortedErrorObject, GenericError, SetSRMessagesReturnObject } from './types';\nimport { ValidationRuleResult } from '../../utils/Validator/ValidationRuleResult';\nimport { ErrorMessageObject } from '../../utils/Validator/types';\nimport {\n    ENCRYPTED_CARD_NUMBER,\n    ENCRYPTED_EXPIRY_DATE,\n    ENCRYPTED_EXPIRY_MONTH,\n    ENCRYPTED_EXPIRY_YEAR,\n    ENCRYPTED_PWD_FIELD,\n    ENCRYPTED_SECURITY_CODE\n} from '../../components/internal/SecuredFields/lib/constants';\nimport { AriaConfigObject } from '../../components/internal/SecuredFields/lib/types';\nimport type Language from '../../language';\n\n/**\n * Extract and translate all the errorCodes related to a specific securedField\n * @param i18n\n * @param errorCodeIdentifier - the identifier for which type of errorCodes we need to collect e.g. 'cc-num'\n */\nexport const getTranslatedErrors = (i18n: Language, errorCodeIdentifier: string): Record<SF_ErrorCodes, string> => {\n    const transObj = Object.values(SF_ErrorCodes).reduce((acc, value) => {\n        // Limit to errors related to specific sf\n        if (value.includes(errorCodeIdentifier)) {\n            acc[value] = i18n.get(value);\n        }\n        return acc;\n    }, {}) as Record<SF_ErrorCodes, string>;\n\n    return transObj;\n};\n\n/**\n * Adds a new error property to an object.\n * This error property is an object containing the translated errors, stored by code, that relate to the securedFields\n * @param originalObject - object we want to duplicate and enhance\n * @param i18n - an i18n object to use to get translations\n * @returns a duplicate of the original object with a new property: \"error\" whose value is a object containing the translated errors\n */\nexport const addErrorTranslationsToObject = (originalObj: AriaConfigObject, i18n: Language, fieldType: string): AriaConfigObject => {\n    const nuObj: AriaConfigObject = { ...originalObj };\n\n    const errorCodeIdentifier = fieldTypeToErrorCodeIdentifier(fieldType);\n    nuObj.error = getTranslatedErrors(i18n, errorCodeIdentifier);\n\n    return nuObj;\n};\n\nexport const getErrorMessageFromCode = (errorCode: string, codeMap: Record<string, string>): string => {\n    let errMsg = errorCode;\n    for (const [key, value] of Object.entries(codeMap)) {\n        if (value === errorCode) {\n            errMsg = key;\n            break;\n        }\n    }\n    return errMsg?.toLowerCase().replace(/[_.\\s]/g, '-');\n};\n\n/**\n * errorCodeIdentifiers must match the prefixes to the numbers in ERROR_CODES (Errors/constants.ts)\n * (Which in turn must match the keys in the translations files)\n */\nconst fieldTypeToErrorCodeIdentifier = (fieldType: string): string => {\n    let errorCodeIdentifier;\n    switch (fieldType) {\n        case ENCRYPTED_CARD_NUMBER:\n            errorCodeIdentifier = ErrorCodePrefixes.CC_NUM;\n            break;\n        case ENCRYPTED_EXPIRY_DATE:\n            errorCodeIdentifier = ErrorCodePrefixes.CC_DAT;\n            break;\n        case ENCRYPTED_EXPIRY_MONTH:\n            errorCodeIdentifier = ErrorCodePrefixes.CC_MTH;\n            break;\n        case ENCRYPTED_EXPIRY_YEAR:\n            errorCodeIdentifier = ErrorCodePrefixes.CC_YR;\n            break;\n        case ENCRYPTED_SECURITY_CODE:\n            errorCodeIdentifier = ErrorCodePrefixes.CC_CVC;\n            break;\n        case ENCRYPTED_PWD_FIELD:\n            errorCodeIdentifier = ErrorCodePrefixes.KCP_PWD;\n            break;\n        default:\n    }\n    return errorCodeIdentifier;\n};\n\n/**\n * sortErrorsByLayout - takes a list of errors and a layout, and returns a sorted array of error objects with translated error messages\n *\n * @param errors - an object containing errors, referenced by field type\n * @param layout - a string[] controlling how the output error objects will be ordered. Required when it is known that the way the error object is populated can vary e.g. Card comp, &/or anything with a country selector\n * @param i18n - our internal Language mechanism\n * @param countrySpecificLabels - some errors are region specific, e.g. in the US \"postal code\" = \"zip code\", so map the fieldType value accordingly (if it is being added to the errorMessage string)\n * @param fieldTypeMappingFn - a component specific lookup function that will tell us both if we need to prepend the field type to the SR panel message, and, if so, will retrieve the correct translation for the field type\n */\nexport const sortErrorsByLayout = ({ errors, i18n, layout, countrySpecificLabels, fieldTypeMappingFn }: SortErrorsObj): SortedErrorObject[] => {\n    const SR_INDICATOR_PREFIX = process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'test' ? '' : '-sr'; // Useful for testing whether SR is reading out aria-live errors (sr) or aria-describedby ones\n\n    // Create array of error objects, sorted by layout\n    const sortedErrors: SortedErrorObject[] = Object.entries(errors).reduce((acc, [key, value]) => {\n        if (value) {\n            const errObj: ValidationRuleResult | SFError | GenericError = errors[key];\n\n            const TREAT_AS_SF_ERROR = 'errorI18n' in errObj && `rootNode` in errObj; // look for expected props, unique to an SFError\n\n            // Some ValidationRuleResults can be passed an object in the 'errorMessage' prop (to give country specific errors)\n            const ERROR_MSG_IS_OBJECT = typeof errObj.errorMessage === 'object';\n\n            /**\n             * Get error codes - these are used if we need to distinguish between showValidation & onBlur errors\n             * - For a ValidationRuleResult or GenericError the error \"code\" is contained in the errorMessage prop.\n             * - For an SFError the error \"code\" is contained in the error prop.\n             */\n            let errorCode: string;\n            if (TREAT_AS_SF_ERROR) {\n                errorCode = errObj.error;\n            } else {\n                /** Special handling for Address~postalCode (where the errorMessage is an object) */\n                if (ERROR_MSG_IS_OBJECT) {\n                    /** is ValidationRuleResult w. country specific error */\n                    errorCode = (errObj.errorMessage as ErrorMessageObject).translationKey;\n                } else {\n                    /** is ValidationRuleResult || GenericError || an as yet incorrectly formed error */\n                    errorCode = errObj.errorMessage as string;\n                }\n            }\n\n            /**\n             * Get corresponding error msg - a translated string we can place into the SRPanel\n             * NOTE: the error object for a secured field already contains the error in a translated form (errorI18n).\n             * For other fields we still need to translate it, so we use the errObj.errorMessage prop as a translation key\n             */\n            let errorMsg: string;\n            if (TREAT_AS_SF_ERROR && 'errorI18n' in errObj) {\n                errorMsg = errObj.errorI18n + SR_INDICATOR_PREFIX;\n            } else {\n                /**\n                 * For some fields, for a11y reasons (when the translated error msg doesn't contain a reference to the field it refers to), we need to\n                 * add the field type into the translated error message.\n                 *\n                 * This happens with generic errors\n                 *  e.g. \"field.error.required\": \"Enter the %{label}\"\n                 *   or \"invalid.format.expects\": \"%{label} Invalid format. Expected format: %{format}\"\n                 */\n                const mappedLabel = fieldTypeMappingFn ? fieldTypeMappingFn(key, i18n, countrySpecificLabels) : ''; // Retrieve the translated field name, if required\n\n                /** Special handling for Address~postalCode where the errorMessage object contains the details of the country specific format that should have been used for the postcode */\n                if (ERROR_MSG_IS_OBJECT) {\n                    /**  is ValidationRuleResult  w. country specific error */\n                    const translationKey = (errObj.errorMessage as ErrorMessageObject).translationKey;\n                    const countrySpecificFormat = (errObj.errorMessage as ErrorMessageObject).translationObject.values.format;\n\n                    errorMsg = `${i18n.get(translationKey, { values: { label: mappedLabel, format: countrySpecificFormat } })}${SR_INDICATOR_PREFIX}`;\n                } else {\n                    /** is ValidationRuleResult || GenericError || an as yet incorrectly formed error */\n                    errorMsg = i18n.get(errObj.errorMessage as string, { values: { label: mappedLabel } }) + SR_INDICATOR_PREFIX;\n                }\n            }\n\n            acc.push({ field: key, errorMessage: errorMsg, errorCode });\n\n            if (layout) acc.sort((a, b) => layout.indexOf(a.field) - layout.indexOf(b.field));\n        }\n        return acc;\n    }, []);\n\n    return sortedErrors;\n};\n\n/**\n * Implemented as a partial, with an object containing the first 6 arguments; then the final argument, errors, is passed to the partial\n *\n * NOTE: using this generic error setting fny is only suitable when errors for the SRPanel are *only* generated by showValidation().\n * When errors are also generated onBlur, as the user leaves the input, the SR message generation becomes more complex - see CardInput as an example\n */\nexport const setSRMessagesFromErrors = (\n    { i18n, fieldTypeMappingFn, SRPanelRef },\n    { errors, isValidating, layout, countrySpecificLabels }\n): SetSRMessagesReturnObject => {\n    const currentErrorsSortedByLayout = sortErrorsByLayout({\n        errors,\n        i18n,\n        fieldTypeMappingFn,\n        countrySpecificLabels,\n        layout\n    });\n\n    const doLog = false;\n\n    if (doLog) console.log('### setSRMessagesFromErrors::currentErrorsSortedByLayout:: ', currentErrorsSortedByLayout);\n\n    if (currentErrorsSortedByLayout.length) {\n        /** If validating i.e. \"on submit\" type event - then display all errors in the SR panel */\n        if (isValidating) {\n            const errorMsgArr: string[] = currentErrorsSortedByLayout.map(errObj => errObj.errorMessage);\n            if (doLog) console.log('### setSRMessagesFromErrors:: #1 multiple errors:: (validating) errorMsgArr=', errorMsgArr);\n            SRPanelRef.setMessages(errorMsgArr);\n\n            const fieldListArr: string[] = currentErrorsSortedByLayout.map(errObj => errObj.field);\n            return { currentErrorsSortedByLayout, action: ERROR_ACTION_FOCUS_FIELD, fieldToFocus: fieldListArr[0] };\n        } else {\n            // prettier-ignore\n            if (doLog) console.log('### setSRMessagesFromErrors:: #3 on blur scenario:: not validating but there might be an error, either to set or to clear');\n            SRPanelRef?.setMessages(null);\n\n            return { currentErrorsSortedByLayout, action: ERROR_ACTION_BLUR_SCENARIO }; // on blur scenario: not validating but there might be an error, either to set or to clear\n        }\n    } else {\n        if (doLog) console.log('### setSRMessagesFromErrors::componentDidUpdate:: #4 clearing errors:: NO currentErrorsSortedByLayout');\n        SRPanelRef?.setMessages(null); // no errors - so clear SR panel\n        return { currentErrorsSortedByLayout, action: 'none' };\n    }\n};\n\nexport const enhanceErrorObjectKeys = (errorObj, keyPrefix) => {\n    if (!errorObj) return null;\n    const enhancedObj = Object.entries(errorObj).reduce((acc, [key, value]) => {\n        if (value) {\n            const newKey = `${keyPrefix}${key}`;\n            acc[newKey] = value;\n        }\n        return acc;\n    }, {});\n\n    return enhancedObj;\n};\n","import { ENCRYPTED_SECURITY_CODE, ENCRYPTED_SECURITY_CODE_3_DIGITS, ENCRYPTED_SECURITY_CODE_4_DIGITS, GIFT_CARD, SF_FIELDS_MAP } from '../constants';\nimport { AriaConfigObject } from '../types';\nimport type Language from '../../../../../language';\n\n/**\n * Based on txVariant & fieldType, add a field specific contextualTexts object to the passed object\n */\nexport default (originalObj: AriaConfigObject, i18n: Language, txVariant: string, fieldType: string): AriaConfigObject => {\n    const nuObj: AriaConfigObject = { ...originalObj };\n\n    const contextualTexts = {};\n\n    switch (txVariant) {\n        case 'ach':\n            // TODO - when we know the required texts\n            break;\n        case GIFT_CARD:\n            // TODO - when we know the required texts\n            break;\n        default:\n            // Use field type to only add the texts specific to the creditCard securedField\n            switch (fieldType) {\n                case ENCRYPTED_SECURITY_CODE:\n                    contextualTexts[ENCRYPTED_SECURITY_CODE_3_DIGITS] = i18n.get('creditCard.securityCode.contextualText.3digits');\n                    contextualTexts[ENCRYPTED_SECURITY_CODE_4_DIGITS] = i18n.get('creditCard.securityCode.contextualText.4digits');\n                    break;\n\n                default: {\n                    const translationKey = `creditCard.${SF_FIELDS_MAP[fieldType]}.contextualText`;\n                    const translation = i18n.get(translationKey);\n                    if (translation !== translationKey) {\n                        contextualTexts[fieldType] = translation;\n                    }\n                }\n            }\n    }\n\n    if (Object.keys(contextualTexts).length) {\n        nuObj.contextualTexts = contextualTexts;\n    }\n\n    return nuObj;\n};\n","import { addErrorTranslationsToObject } from '../../../../../../core/Errors/utils';\nimport addContextTranslationsToObject from '../../utilities/addContextTranslations';\nimport Language from '../../../../../../language/Language';\nimport { SF_FIELDS_MAP } from '../../constants';\nimport { AriaConfig, AriaConfigObject } from '../../types';\n\n/**\n * Creates an ariaConfig object with 'iframeTitle' and 'label' properties, whose values are retrieved from the translations object.\n * (These values either come from the translation file or have been overwritten by the merchant in a translations config object.)\n * We then add an error object containing the possible errors for any securedField read from the translation file and stored under error-codes\n */\nexport function processAriaConfig(txVariant: string, fieldType: string, i18n: Language, showContextuaElement): AriaConfig {\n    // txVariant can be the scheme name (VISA, Mastercard...) so we put all of them under creditCard\n    const type = ['ach', 'giftcard'].includes(txVariant) ? txVariant : 'creditCard';\n\n    // Get translation for iframeTitle\n    const iframeTitle: string = i18n.get(`${type}.${fieldType}.aria.iframeTitle`);\n\n    // Get translation for aria label using *same* key that is used to label the element - important a11y consideration for (securedField) iframe\n    const label: string = i18n.get(`${type}.${SF_FIELDS_MAP[fieldType]}.label`);\n\n    // Get lang property\n    const lang = i18n.locale;\n\n    // Create a new object with the iframeTitle & label values from translation file\n    const ariaFieldConfigObj: AriaConfigObject = { iframeTitle, label };\n\n    // Add error translations object\n    let enhancedAriaFieldConfigObj: AriaConfigObject = addErrorTranslationsToObject(ariaFieldConfigObj, i18n, fieldType);\n\n    // If allowed, add the translated contextual texts\n    if (showContextuaElement) {\n        enhancedAriaFieldConfigObj = addContextTranslationsToObject(enhancedAriaFieldConfigObj, i18n, txVariant, fieldType);\n    }\n\n    // Create a new aria config object keeping the old entries and adding a new one for this field\n    // N.B. need to do this deconstruction of the original aria config object to break existing refs & avoid getting an \"accumulated\" object\n    return {\n        ...(lang && { lang }),\n        [fieldType]: enhancedAriaFieldConfigObj\n    } as AriaConfig;\n}\n","import * as logger from '../utilities/logger';\nimport createIframe from './utils/createIframe';\nimport { removeAllChildren, selectOne } from '../utilities/dom';\nimport { off, on } from '../../../../../utils/listenerUtils';\nimport postMessageToIframe from '../CSF/utils/iframes/postMessageToIframe';\nimport { isChromeVoxPostMsg, isWebpackPostMsg, originCheckPassed } from '../CSF/utils/iframes/postMessageValidation';\nimport {\n    CVC_POLICY_HIDDEN,\n    CVC_POLICY_OPTIONAL,\n    DATE_POLICY_HIDDEN,\n    DATE_POLICY_OPTIONAL,\n    ENCRYPTED_EXPIRY_DATE,\n    ENCRYPTED_EXPIRY_MONTH,\n    ENCRYPTED_EXPIRY_YEAR,\n    ENCRYPTED_SECURITY_CODE\n} from '../constants';\nimport { generateRandomNumber } from '../utilities/commonUtils';\nimport { CVCPolicyType, DatePolicyType, RtnType_callbackFn, RtnType_noParamVoidFn, RtnType_postMessageListener, SFFeedbackObj } from '../types';\nimport AbstractSecuredField from './AbstractSecuredField';\nimport { AriaConfig, IframeConfigObject, SecuredFieldSetupObject, SecuredFieldCommonProps } from '../types';\nimport { reject } from '../../../../../utils/commonUtils';\nimport { processAriaConfig } from './utils/processAriaConfig';\nimport { processPlaceholders } from './utils/processPlaceholders';\nimport Language from '../../../../../language/Language';\nimport { hasOwnProperty } from '../../../../../utils/hasOwnProperty';\nimport { Placeholders } from '../../SFP/types';\nimport './SecuredField.scss';\n\nconst logPostMsg = false;\nconst doLog = false;\n\nclass SecuredField extends AbstractSecuredField {\n    constructor(pSetupObj: SecuredFieldSetupObject, i18n: Language) {\n        super();\n\n        /**\n         * List of props to exclude from being set on this.sfConfig.\n         * These props are only required for internal purposes. They do not get sent to the iframe\n         */\n        const deltaPropsArr: string[] = ['loadingContext', 'holderEl', 'iframeSrc', 'showContextualElement', 'placeholders'];\n\n        /**\n         * List of props from setup object that will be set on this.sfConfig\n         * These props will all end up being sent to the iframe\n         */\n        const configVarsFromSetUpObj = reject(deltaPropsArr).from(pSetupObj);\n\n        // Copy passed setup object values to this.sfConfig\n        this.sfConfig = {\n            // ...this.sfConfig, // Do we need to do this? Pretty sure we don't\n            ...configVarsFromSetUpObj,\n            // Break references on iframeUIConfig object so we can overwrite its properties in each securedField instance\n            iframeUIConfig: { ...configVarsFromSetUpObj.iframeUIConfig }\n        } as SecuredFieldCommonProps;\n\n        /**\n         * Extract values only needed for init\n         */\n        const { iframeSrc, placeholders, showContextualElement } = pSetupObj;\n\n        /**\n         * Store those passed setup object values that are needed in multiple functions\n         */\n        this.loadingContext = pSetupObj.loadingContext;\n        this.holderEl = pSetupObj.holderEl;\n\n        /**\n         * Initiate other values on 'this' through setters\n         */\n        this.isValid = false;\n        this.iframeContentWindow = null;\n        this.numKey = generateRandomNumber();\n        this.isEncrypted = false;\n        this.hasError = false;\n        this.errorType = '';\n        this.cvcPolicy = pSetupObj.cvcPolicy;\n        this.expiryDatePolicy = pSetupObj.expiryDatePolicy;\n\n        if (process.env.NODE_ENV === 'development' && doLog) {\n            logger.log(\n                '### SecuredField::constructor:: this.sfConfig.fieldType=',\n                this.sfConfig.fieldType,\n                'isValid=',\n                this._isValid,\n                'numKey=',\n                this.numKey\n            );\n            logger.log('\\n');\n        }\n\n        return this.init(i18n, iframeSrc, placeholders, showContextualElement);\n    }\n\n    init(i18n: Language, iframeSrc: string, placeholders: Placeholders, showContextualElement: boolean): SecuredField {\n        /**\n         * Ensure all fields have a related ariaConfig object containing, at minimum, an iframeTitle property and a (translated) errors object\n         */\n        const processedAriaConfig: AriaConfig = processAriaConfig(this.sfConfig.txVariant, this.sfConfig.fieldType, i18n, showContextualElement);\n        // Set result back onto config object\n        this.sfConfig.iframeUIConfig.ariaConfig = processedAriaConfig;\n\n        // Set result back onto config object\n        this.sfConfig.iframeUIConfig.placeholders = processPlaceholders(this.sfConfig.txVariant, this.sfConfig.fieldType, placeholders);\n\n        /**\n         * Configure, create & reference iframe and add load listener\n         */\n        const iframeConfig = {\n            src: iframeSrc,\n            title: processedAriaConfig[this.sfConfig.fieldType].iframeTitle,\n            policy: 'origin'\n        };\n\n        const iframeEl: HTMLIFrameElement = createIframe(iframeConfig);\n\n        // Place the iframe into the holder\n        this.holderEl.appendChild(iframeEl);\n\n        // Now examine the holder to get an actual DOM node\n        const iframe: HTMLIFrameElement = selectOne(this.holderEl, '.js-iframe');\n\n        if (iframe) {\n            this.iframeContentWindow = iframe.contentWindow;\n\n            // Create reference to bound fn (see getters/setters for binding)\n            this.iframeOnLoadListener = this.iframeOnLoadListenerFn;\n\n            on(iframe, 'load', this.iframeOnLoadListener, false);\n        }\n\n        this.iframeRef = iframe;\n\n        return this;\n    }\n\n    iframeOnLoadListenerFn(): void {\n        // Create reference to bound fn (see getters/setters for binding)\n        this.postMessageListener = this.postMessageListenerFn;\n\n        // Add general listener for 'message' EVENT - the event that 'powers' postMessage\n        on(window, 'message', this.postMessageListener, false);\n\n        // Create and send config object to iframe\n        const configObj: IframeConfigObject = {\n            ...this.sfConfig,\n            numKey: this.numKey\n        };\n\n        if (window._b$dl) console.log('### SecuredField:::: onIframeLoaded:: created configObj=', configObj);\n\n        postMessageToIframe(configObj, this.iframeContentWindow, this.loadingContext);\n        //--\n\n        // Callback to say iframe loaded\n        this.onIframeLoadedCallback();\n    }\n\n    postMessageListenerFn(event: MessageEvent): void {\n        // Check message is from expected domain\n        if (!originCheckPassed(event, this.loadingContext, this.sfConfig.showWarnings)) {\n            return;\n        }\n\n        // TODO - for debugging purposes this would always be useful to see\n        //        logger.log('\\n',this.sfConfig.fieldType,'### CSF SecuredField::postMessageListener:: event.data=',event.data);\n\n        if (process.env.NODE_ENV === 'development' && logPostMsg) {\n            logger.log(\n                '\\n###CSF SecuredField::postMessageListener:: DOMAIN & ORIGIN MATCH, NO WEBPACK WEIRDNESS fieldType=',\n                this.sfConfig.fieldType,\n                'txVariant=',\n                this.sfConfig.txVariant,\n                'this.numKey=',\n                this.numKey\n            );\n        }\n\n        // PARSE DATA OBJECT (thus testing if it is a JSON string) - OR TRY & WORK OUT WHY THE PARSING FAILED\n        let feedbackObj: SFFeedbackObj;\n\n        try {\n            feedbackObj = JSON.parse(event.data);\n        } catch (e) {\n            // Was the message generated by webpack?\n            if (isWebpackPostMsg(event)) {\n                if (this.sfConfig.showWarnings) logger.log('### SecuredField::postMessageListenerFn:: PARSE FAIL - WEBPACK');\n                return;\n            }\n\n            // Was the message generated by ChromeVox?\n            if (isChromeVoxPostMsg(event)) {\n                if (this.sfConfig.showWarnings) logger.log('### SecuredField::postMessageListenerFn:: PARSE FAIL - CHROMEVOX');\n                return;\n            }\n\n            if (this.sfConfig.showWarnings)\n                logger.log('### SecuredField::postMessageListenerFn:: PARSE FAIL - UNKNOWN REASON: event.data=', event.data);\n            return;\n        }\n\n        // CHECK FOR EXPECTED PROPS\n        const hasMainProps: boolean = hasOwnProperty(feedbackObj, 'action') && hasOwnProperty(feedbackObj, 'numKey');\n\n        if (!hasMainProps) {\n            if (this.sfConfig.showWarnings) logger.warn('WARNING SecuredField :: postMessage listener for iframe :: data mismatch!');\n            return;\n        }\n\n        if (process.env.NODE_ENV === 'development' && logPostMsg) {\n            logger.log('### SecuredField::postMessageListener:: feedbackObj.numKey=', feedbackObj.numKey);\n        }\n\n        if (this.numKey !== feedbackObj.numKey) {\n            if (this.sfConfig.showWarnings) {\n                logger.warn(\n                    'WARNING SecuredField :: postMessage listener for iframe :: data mismatch! (Probably a message from an unrelated securedField)'\n                );\n            }\n            return;\n        }\n\n        // VALIDATION CHECKS PASSED - DECIDE ON COURSE OF ACTION\n        if (process.env.NODE_ENV === 'development' && logPostMsg) {\n            logger.log(\n                '### SecuredField::postMessageListener:: numkeys match PROCEED WITH POST MESSAGE PROCESSING fieldType=',\n                this.sfConfig.fieldType,\n                'txVariant=',\n                this.sfConfig.txVariant\n            );\n        }\n\n        switch (feedbackObj.action) {\n            case 'encryption':\n                this.isValid = true;\n                this.onEncryptionCallback(feedbackObj);\n                break;\n\n            case 'config':\n                if (window._b$dl)\n                    console.log('### SecuredField::postMessageListenerFn:: configured - calling onConfigCallback', feedbackObj.fieldType);\n                this.onConfigCallback(feedbackObj);\n                break;\n\n            case 'focus':\n                this.onFocusCallback(feedbackObj);\n                break;\n\n            case 'binValue':\n                this.onBinValueCallback(feedbackObj);\n                break;\n\n            // iOS ONLY - RE. iOS BUGS AROUND BLUR AND FOCUS EVENTS\n            case 'touch':\n                this.onTouchstartCallback(feedbackObj);\n                break;\n\n            // Only happens for Firefox & IE <= 11\n            case 'shifttab':\n                this.onShiftTabCallback(feedbackObj);\n                break;\n\n            case 'autoComplete':\n                this.onAutoCompleteCallback(feedbackObj);\n                break;\n\n            case 'enterKeyPressed':\n                this.onKeyPressedCallback(feedbackObj);\n                break;\n\n            /**\n             * Validate, because action =\n             *\n             *  'brand'\n             *  'delete'\n             *  'luhnCheck'\n             *              //'incomplete field' (an error that follows from a focus (blur) event)\n             *  'incorrectly filled field' (an error that follows from a focus (blur) event) // NEW\n             *  'numberKeyPressed' (or date-, month-, year-, cvc-, pin-, or iban- KeyPressed)\n             *    - since we have no \"error\" action \"...KeyPressed\" is the action type on most error events (other than \"incomplete field\" or \"luhnCheck\")\n             *    and often these error events representing the clearing of an existing error\n             */\n            default:\n                // If we're validation handling (& not encryption handling) field must be invalid\n                this.isValid = false;\n                this.onValidationCallback(feedbackObj);\n        }\n    }\n\n    destroy(): void {\n        off(window, 'message', this.postMessageListener, false);\n        off(this.iframeRef, 'load', this.iframeOnLoadListener, false);\n        this.iframeContentWindow = null;\n        removeAllChildren(this.holderEl);\n    }\n\n    /**\n     * Returns whether the securedField is hidden OR whether it is optional and not in error\n     */\n    isOptionalOrHidden(): boolean {\n        if (\n            this.sfConfig.fieldType === ENCRYPTED_EXPIRY_DATE ||\n            this.sfConfig.fieldType === ENCRYPTED_EXPIRY_MONTH ||\n            this.sfConfig.fieldType === ENCRYPTED_EXPIRY_YEAR\n        ) {\n            switch (this.expiryDatePolicy) {\n                case DATE_POLICY_HIDDEN:\n                    return true;\n                case DATE_POLICY_OPTIONAL:\n                    return !this.hasError;\n                default:\n                    return false;\n            }\n        }\n\n        if (this.sfConfig.fieldType === ENCRYPTED_SECURITY_CODE) {\n            switch (this.cvcPolicy) {\n                case CVC_POLICY_HIDDEN:\n                    return true;\n                case CVC_POLICY_OPTIONAL:\n                    return !this.hasError;\n                default:\n                    return false;\n            }\n        }\n\n        // Any other type of securedField is not optional & can't be hidden\n        return false;\n    }\n\n    // /////// ALLOCATE CALLBACKS /////////\n    onIframeLoaded(callbackFn: RtnType_noParamVoidFn): SecuredField {\n        this.onIframeLoadedCallback = callbackFn;\n        return this;\n    }\n\n    onEncryption(callbackFn: RtnType_callbackFn): SecuredField {\n        this.onEncryptionCallback = callbackFn;\n        return this;\n    }\n\n    onValidation(callbackFn: RtnType_callbackFn): SecuredField {\n        this.onValidationCallback = callbackFn;\n        return this;\n    }\n\n    onConfig(callbackFn: RtnType_callbackFn): SecuredField {\n        this.onConfigCallback = callbackFn;\n        return this;\n    }\n\n    onFocus(callbackFn: RtnType_callbackFn): SecuredField {\n        this.onFocusCallback = callbackFn;\n        return this;\n    }\n\n    onBinValue(callbackFn: RtnType_callbackFn): SecuredField {\n        this.onBinValueCallback = callbackFn;\n        return this;\n    }\n\n    onTouchstart(callbackFn: RtnType_callbackFn): SecuredField {\n        this.onTouchstartCallback = callbackFn;\n        return this;\n    }\n\n    onShiftTab(callbackFn: RtnType_callbackFn): SecuredField {\n        this.onShiftTabCallback = callbackFn;\n        return this;\n    }\n\n    onAutoComplete(callbackFn: RtnType_callbackFn): SecuredField {\n        this.onAutoCompleteCallback = callbackFn;\n        return this;\n    }\n\n    onKeyPressed(callbackFn: RtnType_callbackFn): SecuredField {\n        this.onKeyPressedCallback = callbackFn;\n        return this;\n    }\n    //------------------------------------\n\n    // ///////////// GETTERS/SETTERS //////////////\n\n    get errorType(): string {\n        return this._errorType;\n    }\n    set errorType(value: string) {\n        this._errorType = value;\n    }\n\n    get hasError(): boolean {\n        return this._hasError;\n    }\n    set hasError(value: boolean) {\n        this._hasError = value;\n    }\n\n    get isValid(): boolean {\n        if (this.sfConfig.fieldType === ENCRYPTED_SECURITY_CODE) {\n            switch (this.cvcPolicy) {\n                case CVC_POLICY_HIDDEN:\n                    // If cvc is hidden then the field is always valid\n                    return true;\n                case CVC_POLICY_OPTIONAL:\n                    // If cvc is optional then the field is always valid UNLESS it has an error\n                    return !this.hasError;\n                default:\n                    return this._isValid;\n            }\n        }\n\n        if (\n            this.sfConfig.fieldType === ENCRYPTED_EXPIRY_DATE ||\n            this.sfConfig.fieldType === ENCRYPTED_EXPIRY_MONTH ||\n            this.sfConfig.fieldType === ENCRYPTED_EXPIRY_YEAR\n        ) {\n            switch (this.expiryDatePolicy) {\n                case DATE_POLICY_HIDDEN:\n                    // If date is hidden then the field is always valid\n                    return true;\n                case DATE_POLICY_OPTIONAL:\n                    // If date is optional then the field is always valid UNLESS it has an error\n                    return !this.hasError;\n                default:\n                    return this._isValid;\n            }\n        }\n\n        return this._isValid;\n    }\n    set isValid(value: boolean) {\n        this._isValid = value;\n    }\n\n    get cvcPolicy(): CVCPolicyType {\n        return this._cvcPolicy;\n    }\n\n    set cvcPolicy(value: CVCPolicyType) {\n        // Only set if this is a CVC field\n        if (this.sfConfig.fieldType !== ENCRYPTED_SECURITY_CODE) return;\n\n        // Only set if value has changed\n        if (value === this.cvcPolicy) return;\n\n        if (process.env.NODE_ENV === 'development' && doLog) logger.log(this.sfConfig.fieldType, '### SecuredField::cvcPolicy:: value=', value);\n\n        this._cvcPolicy = value;\n\n        // If the field has changed status (required <--> not required) AND it's error state was due to an isValidated call\n        // NOTE: fixes issue in Components where you first validate and then start typing a maestro number\n        // - w/o this and the fix in CSF the maestro PM will never register as valid\n        if (this.hasError && this.errorType === 'isValidated') {\n            this.hasError = false;\n        }\n    }\n\n    get expiryDatePolicy(): DatePolicyType {\n        return this._expiryDatePolicy;\n    }\n\n    set expiryDatePolicy(value: DatePolicyType) {\n        // Only set if this is a date field type of securedField\n        if (\n            this.sfConfig.fieldType !== ENCRYPTED_EXPIRY_DATE &&\n            this.sfConfig.fieldType !== ENCRYPTED_EXPIRY_MONTH &&\n            this.sfConfig.fieldType !== ENCRYPTED_EXPIRY_YEAR\n        )\n            return;\n\n        // Only set if value has changed\n        if (value === this.expiryDatePolicy) return;\n\n        if (process.env.NODE_ENV === 'development' && doLog) logger.log(this.sfConfig.fieldType, '### SecuredField:expiryDatePolicy:: value=', value);\n\n        this._expiryDatePolicy = value;\n\n        // If the field has changed status (required <--> not required) AND it's error state was due to an isValidated call\n        if (this.hasError && this.errorType === 'isValidated') {\n            this.hasError = false;\n        }\n    }\n\n    get iframeContentWindow(): Window {\n        return this._iframeContentWindow;\n    }\n    set iframeContentWindow(value: Window) {\n        this._iframeContentWindow = value;\n    }\n\n    get isEncrypted(): boolean {\n        return this._isEncrypted;\n    }\n    set isEncrypted(value: boolean) {\n        this._isEncrypted = value;\n    }\n\n    get numKey(): number {\n        return this._numKey;\n    }\n    set numKey(value: number) {\n        this._numKey = value;\n    }\n\n    // Internal use - way to create listener refs that we can add/remove\n    get iframeOnLoadListener(): RtnType_noParamVoidFn {\n        return this._iframeOnLoadListener;\n    }\n    set iframeOnLoadListener(value: RtnType_noParamVoidFn) {\n        this._iframeOnLoadListener = value.bind(this);\n    }\n\n    get postMessageListener(): RtnType_postMessageListener {\n        return this._postMessageListener;\n    }\n    set postMessageListener(value: RtnType_postMessageListener) {\n        this._postMessageListener = value.bind(this);\n    }\n}\n\nexport default SecuredField;\n","import { SFPlaceholdersObject } from '../../types';\nimport { Placeholders } from '../../../SFP/types';\nimport {\n    ENCRYPTED_SECURITY_CODE,\n    ENCRYPTED_SECURITY_CODE_3_DIGITS,\n    ENCRYPTED_SECURITY_CODE_4_DIGITS,\n    GIFT_CARD,\n    SF_FIELDS_MAP\n} from '../../constants';\nimport { Placeholders as GiftcardPlaceholders } from '../../../../../Giftcard/components/types';\nimport { CardPlaceholders } from '../../../../../Card/types';\n\n/**\n * Create placeholders with a value from merchant's configuration\n *\n * Based on txVariant & fieldType, maps the entries in the passed placeholders object to create a field specific placeholder object\n */\nexport function processPlaceholders(txVariant: string, fieldType: string, placeholders: Placeholders): SFPlaceholdersObject {\n    switch (txVariant) {\n        case GIFT_CARD:\n            return { [fieldType]: (placeholders as GiftcardPlaceholders)[SF_FIELDS_MAP[fieldType]] ?? '' };\n\n        default:\n            switch (fieldType) {\n                case ENCRYPTED_SECURITY_CODE:\n                    return {\n                        [ENCRYPTED_SECURITY_CODE_3_DIGITS]: (placeholders as CardPlaceholders).securityCodeThreeDigits ?? '',\n                        [ENCRYPTED_SECURITY_CODE_4_DIGITS]: (placeholders as CardPlaceholders).securityCodeFourDigits ?? ''\n                    };\n\n                default:\n                    return { [fieldType]: (placeholders as CardPlaceholders)[SF_FIELDS_MAP[fieldType]] ?? '' };\n            }\n    }\n}\n","export default function createIframe({ src, title = 'iframe element', policy = 'origin' }) {\n    const iframeEl = document.createElement('iframe');\n    iframeEl.setAttribute('src', src);\n    iframeEl.classList.add('js-iframe');\n    // For a11y some merchants want to be able to remove the title element on the iframe - seeing the info it carries as extraneous for the screenreader\n    if (title === '' || title.trim().length === 0 || title === 'none') {\n        iframeEl.setAttribute('role', 'presentation');\n    } else {\n        iframeEl.setAttribute('title', title);\n    }\n\n    iframeEl.setAttribute('allowtransparency', 'true');\n    iframeEl.setAttribute('referrerpolicy', policy); // Necessary for ClientKey to work\n    // Commenting out stops the \"The devicemotion events are blocked by feature policy\" warning in Chrome >=66 that some merchant experienced\n    // Commenting in stops the same warnings in development (??)\n    if (process.env.NODE_ENV === 'development') {\n        iframeEl.setAttribute('allow', 'accelerometer; gyroscope');\n    }\n\n    const noIframeElContent = document.createTextNode('<p>Your browser does not support iframes.</p>');\n    iframeEl.appendChild(noIframeElContent);\n\n    return iframeEl;\n}\n","import * as logger from '../../../utilities/logger';\n\nexport const originCheckPassed = (event: MessageEvent, pLoadingContext: string, pShowWarnings: boolean): boolean => {\n    const origin = event.origin; // || event.originalEvent.origin;\n\n    const isCheckoutUrl: number = pLoadingContext.indexOf('/checkoutshopper/');\n    let adyenDomain: string = isCheckoutUrl > -1 ? pLoadingContext.substring(0, isCheckoutUrl) : pLoadingContext;\n\n    // Strip trailing /\n    const lastCharIndex: number = adyenDomain.length - 1;\n    if (adyenDomain.charAt(lastCharIndex) === '/') {\n        adyenDomain = adyenDomain.substring(0, lastCharIndex);\n    }\n\n    if (origin !== adyenDomain) {\n        if (pShowWarnings) {\n            logger.warn(\n                'WARNING postMessageValidation: postMessage listener for iframe::origin mismatch!\\n Received message with origin:',\n                origin,\n                'but the only allowed origin for messages to CSF is',\n                adyenDomain,\n                '### event.data=',\n                event.data\n            );\n        }\n        return false;\n    }\n\n    return true;\n};\n\n// Catch webpack postMessages responses\nexport const isWebpackPostMsg = (event: MessageEvent): boolean =>\n    event.data && event.data.type && typeof event.data.type === 'string' && event.data.type.indexOf('webpack') > -1;\n\n// Catch ChromeVox postMessages responses\nexport const isChromeVoxPostMsg = (event: MessageEvent): boolean => event.data && typeof event.data === 'string' && event.data.indexOf('cvox') > -1;\n","interface CheckoutErrorOptions {\n    cause?: any;\n    code?: string;\n}\n\nexport const NETWORK_ERROR = 'NETWORK_ERROR';\nexport const CANCEL = 'CANCEL';\nexport const IMPLEMENTATION_ERROR = 'IMPLEMENTATION_ERROR';\nexport const API_ERROR = 'API_ERROR';\nexport const ERROR = 'ERROR';\nexport const SCRIPT_ERROR = 'SCRIPT_ERROR';\nexport const SDK_ERROR = 'SDK_ERROR';\n\nclass AdyenCheckoutError extends Error {\n    protected static errorTypes = {\n        /** Network error. */\n        NETWORK_ERROR,\n\n        /** Shopper canceled the current transaction. */\n        CANCEL,\n\n        /** Implementation error. The method or parameter are incorrect or are not supported. */\n        IMPLEMENTATION_ERROR,\n\n        /** API error. The API has not returned the expected data  */\n        API_ERROR,\n\n        /** Generic error. */\n        ERROR,\n\n        /** Script error. The browser failed to load 3rd party script */\n        SCRIPT_ERROR,\n\n        /** Something has gone wrong internally */\n        SDK_ERROR\n    };\n\n    public cause: unknown;\n    public options: CheckoutErrorOptions;\n\n    constructor(type: keyof typeof AdyenCheckoutError.errorTypes, message?: string, options?: CheckoutErrorOptions) {\n        super(message);\n\n        this.name = AdyenCheckoutError.errorTypes[type];\n        this.options = options || {};\n        this.cause = this.options.cause;\n    }\n}\n\nexport default AdyenCheckoutError;\n","import { select, getAttribute } from '../../utilities/dom';\nimport {\n    ENCRYPTED_EXPIRY_YEAR,\n    DATE_POLICY_REQUIRED,\n    CVC_POLICY_REQUIRED,\n    DATA_ENCRYPTED_FIELD_ATTR,\n    DATA_INFO,\n    DATA_UID,\n    SF_CONFIG_TIMEOUT,\n    ALL_SECURED_FIELDS,\n    ENCRYPTED_EXPIRY_MONTH\n} from '../../constants';\nimport { existy } from '../../../../../../utils/commonUtils';\nimport cardType from '../utils/cardType';\nimport { SecuredFieldSetupObject } from '../../types';\nimport SecuredField from '../../securedField/SecuredField';\nimport { CardObject, CardBrandData, SFFeedbackObj, CardLoadData, CVCPolicyType, DatePolicyType } from '../../types';\nimport AdyenCheckoutError from '../../../../../../core/Errors/AdyenCheckoutError';\nimport type { SFKeyPressObj } from '../../types';\n\n/**\n * Bound to the instance of CSF\n * Handles specific functionality related to configuring & creating SecuredFields\n */\nexport function createSecuredFields(): number {\n    this.encryptedAttrName = DATA_ENCRYPTED_FIELD_ATTR;\n\n    // Detect DOM elements that qualify as securedField holders & filter them for valid types\n    const securedFields: HTMLElement[] = select(this.props.rootNode, `[${this.encryptedAttrName}]`).filter(field => {\n        const fieldType: string = getAttribute(field, this.encryptedAttrName);\n\n        if (fieldType === ENCRYPTED_EXPIRY_MONTH) {\n            // TODO send analytics about separate date fields\n        }\n\n        const isValidType = ALL_SECURED_FIELDS.includes(fieldType);\n        if (!isValidType) {\n            console.warn(\n                `WARNING: '${fieldType}' is not a valid type for the '${this.encryptedAttrName}' attribute. A SecuredField will not be created for this element.`\n            );\n        }\n        return isValidType;\n    });\n\n    /**\n     * cvcPolicy - 'required' | 'optional' | 'hidden'\n     * - Always 'required' for GiftCards\n     * - Usually 'required' for single branded Credit Cards but with exceptions e.g. maestro ('optional'), bcmc ('hidden').\n     * - Always 'required' for generic Credit Cards at start up - in this case, subsequent, supporting information about whether cvc stops being required\n     * comes from the SF in the brand information (as the shopper inputs the cc number)\n     */\n    const cvcPolicy: CVCPolicyType = CVC_POLICY_REQUIRED;\n\n    /** Usually 'required' for single branded Credit Cards but with exceptions e.g. ticket ('hidden', *technically* a meal voucher) */\n    const expiryDatePolicy: DatePolicyType = DATE_POLICY_REQUIRED;\n\n    // CHECK IF THIS SECURED FIELD IS NOT OF A CREDIT CARD TYPE\n    if (!this.config.isCreditCardType) {\n        this.createNonCardSecuredFields(securedFields);\n        return securedFields.length;\n    }\n\n    // CONTINUE AS CREDIT-CARD TYPE...\n    this.isSingleBrandedCard = false;\n\n    this.securityCode = '';\n\n    this.createCardSecuredFields(securedFields, cvcPolicy, expiryDatePolicy);\n\n    // Return the number of iframes we're going to create\n    return securedFields.length;\n}\n\n/**\n * i.e. giftcard and ach fields\n *\n * Create a new SecuredField for each detected holding element\n */\nexport async function createNonCardSecuredFields(securedFields: HTMLElement[]): Promise<any> {\n    for (let i = 0; i < securedFields.length; i++) {\n        const securedField = securedFields[i];\n        await this.setupSecuredField(securedField).catch(e => {\n            if (window._b$dl) console.log('Secured fields setup failure. e=', e);\n        });\n    }\n}\n\nexport async function createCardSecuredFields(\n    securedFields: HTMLElement[],\n    cvcPolicy: CVCPolicyType,\n    expiryDatePolicy: DatePolicyType\n): Promise<any> {\n    // Declared card type from the initialisation of CSF\n    let type: string = this.state.type;\n\n    // Maybe it's a single branded card defined by setting type: 'card' & a single item in cardGroupTypes\n    // In which case update the type var both locally AND in State\n    if (type === 'card' && this.config.cardGroupTypes.length === 1) {\n        type = this.config.cardGroupTypes[0];\n        this.state.type = type;\n    }\n\n    // So, is it a single branded card?\n    this.isSingleBrandedCard = type !== 'card';\n\n    // If single branded card field...\n    if (this.isSingleBrandedCard) {\n        // Check that type exists\n        const card: CardObject = cardType.getCardByBrand(type);\n\n        // It's possible we don't recognise the card type -\n        // scenario: frontend initially recognises card as e.g. Visa - but then backend tokenises it as a sub-brand which we currently don't recognise\n        if (!existy(card)) {\n            this.state.type = 'unrecognised-single-brand'; // Will let CVC field accept 4 digits in the input\n        } else {\n            // Assess whether cvc field is required based on the card type & whether the cvc field should even be visible\n            cvcPolicy = card.cvcPolicy || CVC_POLICY_REQUIRED;\n            expiryDatePolicy = card.expiryDatePolicy || DATE_POLICY_REQUIRED;\n\n            this.securityCode = card.securityCode;\n        }\n    }\n\n    /**\n     * Create a new SecuredField for each detected holding element\n     *\n     * - we do this in sequence, waiting until one has configured before creating the next.\n     * We do it this way to avoid the 'bug' whereby if something interrupts the loading of an iframe the listener we have for its load event\n     * never fires; which means the iframe never configures.\n     * (NB - you can recreate this 'bug' by creating the securedFields in a synchronous loop:\n     *      securedFields.forEach(this.setupSecuredField.bind(this));\n     *  and putting a breakpoint on the line where we declare the setupSecuredField function)\n     *\n     *  Also note we tried the Array.map/Promise.all way of asynchronously looping through an array - but it didn't fix the issue,\n     *  - so we fall back to a good old for-loop\n     */\n    for (let i = 0; i < securedFields.length; i++) {\n        const securedField = securedFields[i];\n        if (window._b$dl) console.log('\\nAbout to set up securedField:', securedField);\n        await this.setupSecuredField(securedField, cvcPolicy, expiryDatePolicy).catch(e => {\n            if (window._b$dl) console.log('Secured fields setup failure. e=', e);\n        });\n        if (window._b$dl) console.log('Finished setting up securedField:', securedField);\n    }\n    if (window._b$dl) console.log('Finished setting up all securedFields');\n\n    /**\n     * Now the securedFields have all been created and configured...\n     *\n     * For a single branded card we call to onBrand callback once.\n     * This allows the UI to set the correct logo if they haven't already,\n     * and we also pass the cvcPolicy & expiryDatePolicy so the UI can hide the iframe holders if necessary\n     */\n    if (this.isSingleBrandedCard) {\n        const callbackObj: CardBrandData = {\n            type: this.state.type,\n            rootNode: this.props.rootNode,\n            brand: type,\n            cvcPolicy,\n            expiryDatePolicy,\n            cvcText: this.securityCode\n        };\n\n        // Allow a tick for the securedField to finish rendering\n        setTimeout(() => {\n            this.callbacks.onBrand(callbackObj);\n        }, 0);\n    }\n}\n\n// Run for each detected holder of a securedField...\nexport function setupSecuredField(pItem: HTMLElement, cvcPolicy?: CVCPolicyType, expiryDatePolicy?: DatePolicyType): Promise<any> {\n    return new Promise((resolve, reject) => {\n        /**\n         *  possible values:\n         *  encryptedCardNumber\n         *  encryptedExpiryDate\n         *  encryptedExpiryMonth\n         *  encryptedExpiryYear\n         *  encryptedSecurityCode\n         *  encryptedPassword\n         *  encryptedPin???\n         *  encryptedBankAccountNumber\n         *  encryptedBankLocationId\n         *  encryptedIBAN\n         */\n        const fieldType: string = getAttribute(pItem, this.encryptedAttrName);\n\n        if (fieldType === ENCRYPTED_EXPIRY_YEAR) {\n            this.state.hasSeparateDateFields = true;\n        }\n\n        const extraFieldData: string = getAttribute(pItem, DATA_INFO);\n        const uid = getAttribute(pItem, DATA_UID);\n\n        // CREATE SecuredField passing config object\n        const sfInitObj: SecuredFieldSetupObject = {\n            fieldType,\n            extraFieldData,\n            uid,\n            cvcPolicy,\n            holderEl: pItem,\n            expiryDatePolicy,\n            txVariant: this.state.type,\n            // from this.config (calculated)\n            cardGroupTypes: this.config.cardGroupTypes,\n            iframeUIConfig: this.config.iframeUIConfig,\n            sfLogAtStart: this.config.sfLogAtStart,\n            trimTrailingSeparator: this.config.trimTrailingSeparator,\n            isCreditCardType: this.config.isCreditCardType,\n            iframeSrc: this.config.iframeSrc,\n            loadingContext: this.config.loadingContext,\n            showWarnings: this.config.showWarnings,\n            legacyInputMode: this.config.legacyInputMode,\n            minimumExpiryDate: this.config.minimumExpiryDate,\n            // from this.props (passed straight thru)\n            maskSecurityCode: this.props.maskSecurityCode,\n            exposeExpiryDate: this.props.exposeExpiryDate,\n            disableIOSArrowKeys: this.props.shouldDisableIOSArrowKeys,\n            implementationType: this.props.implementationType,\n            showContextualElement: this.props.showContextualElement,\n            placeholders: this.props.placeholders\n        };\n\n        const sf: SecuredField = new SecuredField(sfInitObj, this.props.i18n)\n            .onIframeLoaded((): void => {\n                // Count\n                this.state.iframeCount += 1;\n\n                if (window._b$dl) console.log('### createSecuredFields::onIframeLoaded:: this.state.iframeCount=', this.state.iframeCount);\n\n                // One of our existing securedFields has just loaded new content!\n                if (this.state.iframeCount > this.state.numIframes) {\n                    this.destroySecuredFields();\n                    // TODO send analytics about this error\n                    throw new AdyenCheckoutError(\n                        'ERROR',\n                        `One or more securedFields has just loaded new content. This should never happen. securedFields have been removed.\n                        iframe load count=${this.state.iframeCount}. Expected count:${this.state.numIframes}`\n                    );\n                }\n\n                /** Create timeout within which time we expect the securedField to configure */\n                // @ts-ignore - timeout 'type' *is* a number\n                sf.loadToConfigTimeout = setTimeout(() => {\n                    reject({ type: sfInitObj.fieldType, failReason: 'sf took too long to config' });\n                }, SF_CONFIG_TIMEOUT);\n\n                // If all iframes are loaded - call onLoad callback\n                if (this.state.iframeCount === this.state.originalNumIframes) {\n                    const callbackObj: CardLoadData = { iframesLoaded: true };\n                    this.callbacks.onLoad(callbackObj);\n                }\n            })\n            .onConfig((pFeedbackObj: SFFeedbackObj): void => {\n                this.handleIframeConfigFeedback(pFeedbackObj);\n\n                // Clear timeout since the securedField has configured\n                clearTimeout(sf.loadToConfigTimeout);\n                sf.loadToConfigTimeout = null;\n\n                resolve(pFeedbackObj);\n            })\n            .onFocus((pFeedbackObj: SFFeedbackObj): void => {\n                this.handleFocus(pFeedbackObj);\n            })\n            .onBinValue((pFeedbackObj: SFFeedbackObj): void => {\n                this.handleBinValue(pFeedbackObj);\n            })\n            .onTouchstart((pFeedbackObj: SFFeedbackObj): void => {\n                // re. Disabling arrow keys in iOS - need to disable all other fields in the form\n                if (this.props.shouldDisableIOSArrowKeys) {\n                    /**\n                     * re. this.hasGenuineTouchEvents...\n                     *  There seems to be an issue with Responsive Design mode in Safari that means it allows setting focus on cross-origin iframes,\n                     *  without enabling the touch events that allow the \"disableIOSArrowKeys\" workaround to fully function.\n                     *  This results in a click on an securedFields *label* leading to, for example, the holderName field being disabled, but w/o access\n                     *  to the touch events that would let it re-enable itself.\n                     *\n                     *  So we prevent the \"disableIOSArrowKeys\" workaround unless we genuinely have touch events available.\n                     */\n                    if (this.hasGenuineTouchEvents || pFeedbackObj.hasGenuineTouchEvents) {\n                        this.callbacks.onTouchstartIOS({ fieldType: pFeedbackObj.fieldType });\n                    }\n                }\n\n                // Only perform this step if we genuinely have touch events available\n                if (pFeedbackObj.hasGenuineTouchEvents || this.hasGenuineTouchEvents) {\n                    // iOS ONLY - RE. iOS BUGS AROUND BLUR AND FOCUS EVENTS\n                    // - pass information about which field has just been clicked (gained focus) to the other iframes\n                    this.postMessageToAllIframes({ fieldType: pFeedbackObj.fieldType, fieldClick: true });\n                }\n            })\n            .onShiftTab((pFeedbackObj: SFFeedbackObj): void => {\n                // Only happens for Firefox & IE <= 11\n                this.handleSFShiftTab(pFeedbackObj.fieldType);\n            })\n            .onEncryption((pFeedbackObj: SFFeedbackObj): void => {\n                this.handleEncryption(pFeedbackObj);\n            })\n            .onValidation((pFeedbackObj: SFFeedbackObj): void => {\n                this.handleValidation(pFeedbackObj);\n            })\n            .onAutoComplete((pFeedbackObj: SFFeedbackObj): void => {\n                this.processAutoComplete(pFeedbackObj);\n            })\n            .onKeyPressed((pFeedbackObj: SFFeedbackObj): void => {\n                const { numKey, ...rest } = pFeedbackObj;\n                this.callbacks.onKeyPressed(rest as SFKeyPressObj);\n            });\n\n        // Store reference to securedField in this.state (under fieldType)\n        this.state.securedFields[fieldType] = sf;\n    });\n}\n","function isIE() {\n    const ua = navigator.userAgent;\n\n    const msie = ua.indexOf('MSIE ');\n    if (msie > 0) {\n        // IE 10 or older => return version number\n        return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);\n    }\n\n    const trident = ua.indexOf('Trident/');\n    if (trident > 0) {\n        // IE 11 => return version number\n        const rv = ua.indexOf('rv:');\n        return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10);\n    }\n\n    const edge = ua.indexOf('Edge/');\n    if (edge > 0) {\n        // Edge (IE 12+) => return version number\n        return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n    }\n\n    // other browser\n    return false;\n}\n\n// NOTE: change from const to let for the purposes of testing (the values get set in some tests)\n/* eslint-disable */\nlet __IS_ANDROID = typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent);\nlet __IS_IE = typeof navigator !== 'undefined' && isIE();\nlet __IS_IOS = typeof navigator !== 'undefined' && /iphone|ipod|ipad/i.test(navigator.userAgent);\nlet __IS_FIREFOX = typeof navigator !== 'undefined' && /(firefox)/i.test(navigator.userAgent);\nlet __IS_SAFARI = typeof navigator !== 'undefined' && /(safari)/i.test(navigator.userAgent) && !/(chrome)/i.test(navigator.userAgent);\n/* eslint-enable */\n\nexport default {\n    __IS_ANDROID,\n    __IS_IE,\n    __IS_IOS,\n    __IS_FIREFOX,\n    __IS_SAFARI\n};\n","import { selectOne } from '../../utilities/dom';\nimport ua from '../utils/userAgent';\nimport { on, off } from '../../../../../../utils/listenerUtils';\n\nconst getCaretPos = (pNode: HTMLInputElement | HTMLTextAreaElement): number => {\n    if ('selectionStart' in pNode) {\n        return pNode.selectionStart;\n    }\n    return 0;\n};\n\n/**\n * Detect if touched element is an input or textArea.\n * - If it is do some quirky shit to set focus and caret position on this element\n * - Else do some quirky shit to make the iOS keyboard retract\n *\n * Always then remove this listener and set var saying we have done so (read in CSF...handleFocus)\n * Tell all securedFields some other element now has focus so they can blur themselves\n *\n * @param e -\n */\nfunction touchendListener(e: Event): void {\n    const targetEl: EventTarget = e.target;\n\n    // If other element is Input or TextArea\n    if (targetEl instanceof HTMLInputElement || (HTMLTextAreaElement && targetEl instanceof HTMLTextAreaElement)) {\n        // Force caret to show - 'requires' resetting field's value\n        const val: string = targetEl.value;\n\n        let caretPos: number = getCaretPos(targetEl);\n\n        let adjFlag = false;\n\n        // For some annoying, iOS Safari, reason if caretPos is at the end of the string then it won't show up\n        // - so first decrease it; then set it again, asynchronously\n        if (caretPos === val.length) {\n            caretPos -= 1;\n            adjFlag = true;\n        }\n\n        targetEl.value = val;\n\n        /**\n         * If the input element is of an unexpected type (perhaps the merchant is using a custom button that is an input element, type=\"button\", or,\n         * it is something presented in the 3DS2 flow - both, TBC) then this next line will not work.\n         * However, the input element still has a setSelectionRange property of type \"function\", but trying to call it will throw an error...\n         * so, try, to see if setSelectionRange can be called\n         */\n        try {\n            if (targetEl.setSelectionRange) {\n                targetEl.focus();\n                targetEl.setSelectionRange(caretPos, caretPos);\n\n                // Quirky! (see comment about iOS Safari, above)\n                if (adjFlag) {\n                    caretPos += 1;\n                    setTimeout(() => {\n                        targetEl.setSelectionRange(caretPos, caretPos);\n                    }, 0);\n                }\n            }\n            /* eslint-disable-next-line */\n        } catch (e) {}\n    } else {\n        /**\n         * Workaround for iOS/Safari bug where keypad doesn't retract when SF paymentMethod is no longer active\n         */\n        const hasKeypadFix: boolean = this.config.keypadFix; // to avoid linting no-lonely-if\n        if (hasKeypadFix) {\n            // Create an input we can add focus to.\n            // Otherwise 2nd & sub times the caret gets left in the SF even though it has lost focus and cannot be typed into\n            const rootNode: HTMLElement = this.props.rootNode;\n            const nuInput: HTMLInputElement = document.createElement('input');\n            nuInput.style.width = '1px';\n            nuInput.style.height = '1px';\n            nuInput.style.opacity = '0';\n            nuInput.style.fontSize = '18px'; // prevents zoom\n            rootNode.appendChild(nuInput);\n            nuInput.focus(); // Takes caret from SF\n            rootNode.removeChild(nuInput); // Without this numpad will be replaced with text pad\n        }\n    }\n\n    // Remove listener - it gets reset by next call to handleAdditionalFields from handleFocus\n    this.destroyTouchendListener();\n\n    // Store the fact we have unset the listener\n    this.state.registerFieldForIos = false;\n\n    // Clear focus on secured field inputs now this checkout element has gained focus\n    this.postMessageToAllIframes({ fieldType: 'webInternalElement', fieldClick: true });\n}\n\n/**\n * re. Disabling arrow keys in iOS - need to enable all fields in the form and tell SFs to disable\n *\n * NOTE: Only called when iOS detected & this.props.shouldDisableIOSArrowKeys = true\n */\nfunction touchstartListener(e: Event): void {\n    this.hasGenuineTouchEvents = true;\n    const targetEl: EventTarget = e.target;\n    // If other element is Input or Span (i.e. label text) TODO apply to other types of el?\n    if (targetEl instanceof HTMLInputElement || targetEl instanceof HTMLSpanElement) {\n        this.postMessageToAllIframes({ fieldType: 'webInternalElement', checkoutTouchEvent: true });\n\n        const name = targetEl.getAttribute('name') ?? targetEl.getAttribute('data-id'); // if targetEl is a label's span it will only have a data-id\n        this.callbacks.onTouchstartIOS?.({ fieldType: 'webInternalElement', name });\n    }\n}\n\n/**\n * This works with the touchend handler to allow us to catch (click) events on non-securedFields elements\n * (re. http://gravitydept.com/blog/js-click-event-bubbling-on-ios - events don't bubble unless the click takes place on a link or input)\n *\n * We can use this event to:\n * 1. Set focus on these other elements, and\n * 2. Tell SecuredFields that this has happened so they can blur themselves\n * (see note in adyen-secured-fields...inputBase.js - \"Blur event never fires on input field\")\n *\n * NOTE: Only called when iOS detected\n */\nfunction handleTouchend(): void {\n    const bodyEl: HTMLBodyElement = selectOne(document, 'body');\n    bodyEl.style.cursor = 'pointer';\n\n    on(bodyEl, 'touchend', this.touchendListener);\n\n    // Store the fact we have set the listener\n    this.state.registerFieldForIos = true;\n}\n\nfunction destroyTouchendListener(): boolean {\n    if (!ua.__IS_IOS) return false; // For when fn is called as result of destroy being called on main csf instance\n\n    const bodyEl: HTMLBodyElement = selectOne(document, 'body');\n    bodyEl.style.cursor = 'auto';\n    off(bodyEl, 'touchend', this.touchendListener);\n    return true;\n}\n\nfunction destroyTouchstartListener(): boolean {\n    if (!ua.__IS_IOS) return false; // For when fn is called as result of destroy being called on main csf instance\n\n    off(document, 'touchstart', this.touchstartListener);\n    return true;\n}\n\nexport default {\n    touchendListener,\n    touchstartListener,\n    handleTouchend,\n    destroyTouchendListener,\n    destroyTouchstartListener\n};\n","import { selectOne, select } from '../../../utilities/dom';\n\nconst getPreviousTabbableEl = (matchEl, getPrevious = true) => {\n    const selStr =\n        '*[data-cse], a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), ' +\n        'button:not([disabled]), object, embed, *[tabindex], *[contenteditable]';\n    const allPotentialTabEls = Array.prototype.slice.call(select(document, selStr));\n    const actualTabEls = [];\n\n    allPotentialTabEls.forEach(potentialTabEl => {\n        const tabIndex = potentialTabEl.getAttribute('tabindex');\n        const isValidTabEl = !tabIndex || parseInt(tabIndex, 10) >= 0; // If tabindex hasn't been set, or is set and is >= 0\n        const bounds = potentialTabEl.getBoundingClientRect();\n        const hasDimensions = bounds.width > 0 && bounds.height > 0;\n\n        if (isValidTabEl && hasDimensions) {\n            actualTabEls.push(potentialTabEl);\n        }\n    });\n\n    // Loop through an array until it finds an element based on a test fn, and then return the elements index\n    const getIndexThruTest = (arr, testFn) => {\n        for (let n = 0; n < arr.length; n += 1) {\n            if (testFn(arr[n])) {\n                return n;\n            }\n        }\n        return -1;\n    };\n\n    // Test function\n    const isElOrContainsEl = tabEl => tabEl === matchEl || matchEl.contains(tabEl);\n\n    // Loop through the actualTabEls array until it finds the matchEl, returning its index\n    const matchElIndex = getIndexThruTest(actualTabEls, isElOrContainsEl);\n\n    // Are we actually getting the previous element OR the next?\n    const indexModifier = getPrevious ? -1 : 1;\n\n    return actualTabEls[matchElIndex + indexModifier];\n};\n\nexport const getPreviousTabbableNonSFElement = (passedFieldType, rootNode, getPrevious?) => {\n    // --\n    const sfEl = selectOne(rootNode, `[data-cse=${passedFieldType}]`);\n    return getPreviousTabbableEl(sfEl, getPrevious);\n};\n\nexport const focusExternalField = (pAdditionalField: HTMLElement): void => {\n    if (pAdditionalField) {\n        pAdditionalField.focus();\n\n        // Quirky! - Needed to work in the Components scenario\n        pAdditionalField.blur();\n        pAdditionalField.focus();\n    }\n};\n","import ua from '../utils/userAgent';\nimport * as logger from '../../utilities/logger';\nimport { shiftTabCreditCard } from '../utils/tabbing/tabScenarioCreditCard';\nimport { shiftTabGiftCard } from '../utils/tabbing/tabScenarioGiftCard';\nimport { shiftTabKCP } from '../utils/tabbing/tabScenarioKCP';\nimport { SFFieldType, ShiftTabObject } from '../../types';\nimport { focusExternalField } from '../utils/tabbing/utils';\n\nconst logTab = false;\n\nfunction handleShiftTab(fieldType: SFFieldType): void {\n    if (logTab) logger.log('### handleTab::handleShiftTab:: fieldType', fieldType);\n\n    let shiftTabObj: ShiftTabObject;\n\n    switch (this.state.type) {\n        // GIFT CARD scenario: SecurityCode preceded by CardNumber\n        case 'giftcard':\n            shiftTabObj = shiftTabGiftCard(fieldType, this.props.rootNode);\n            break;\n\n        // Credit Card scenarios\n        default:\n            // KCP scenario: Regular credit card but with additional fields\n            // - an encrypted pin/password field preceded by a form field of a non-SF type (d.o.b/taxRefNum)\n            if (this.state.isKCP) {\n                shiftTabObj = shiftTabKCP(fieldType, this.props.rootNode, this.state.hasSeparateDateFields);\n            } else {\n                // Regular Credit Card\n                shiftTabObj = shiftTabCreditCard(fieldType, this.props.rootNode, this.state.hasSeparateDateFields, this.state.numIframes);\n            }\n            break;\n    }\n\n    const fieldToFocus: string = shiftTabObj.fieldToFocus;\n    const additionalField: HTMLElement = shiftTabObj.additionalField;\n\n    if (fieldToFocus) {\n        this.setFocusOnFrame(fieldToFocus, logTab);\n    } else if (additionalField) {\n        focusExternalField(additionalField);\n    }\n}\n\nconst eligibleForTabFix = (): boolean => ua.__IS_FIREFOX || (ua.__IS_IE && ua.__IS_IE <= 11);\n\nfunction handleSFShiftTab(fieldType: SFFieldType): void {\n    if (eligibleForTabFix()) {\n        this.handleShiftTab(fieldType);\n    }\n}\n\nexport default {\n    handleShiftTab,\n    handleSFShiftTab\n};\n","import { ENCRYPTED_CARD_NUMBER, ENCRYPTED_SECURITY_CODE } from '../../../constants';\nimport { getPreviousTabbableNonSFElement } from './utils';\nimport { SFFieldType, ShiftTabObject } from '../../../types';\n\n// GIFT CARD scenario: SecurityCode preceded by CardNumber\nexport function shiftTabGiftCard(fieldType: SFFieldType, rootNode: HTMLElement): ShiftTabObject {\n    let additionalField: HTMLElement;\n    let fieldToFocus: SFFieldType;\n\n    switch (fieldType) {\n        case ENCRYPTED_CARD_NUMBER:\n            additionalField = getPreviousTabbableNonSFElement(ENCRYPTED_CARD_NUMBER, rootNode);\n\n            break;\n\n        case ENCRYPTED_SECURITY_CODE:\n            fieldToFocus = ENCRYPTED_CARD_NUMBER;\n            break;\n\n        default:\n            break;\n    }\n\n    return {\n        fieldToFocus,\n        additionalField\n    };\n}\n","import {\n    ENCRYPTED_CARD_NUMBER,\n    ENCRYPTED_SECURITY_CODE,\n    ENCRYPTED_EXPIRY_DATE,\n    ENCRYPTED_EXPIRY_MONTH,\n    ENCRYPTED_EXPIRY_YEAR,\n    ENCRYPTED_PWD_FIELD\n} from '../../../constants';\nimport { getPreviousTabbableNonSFElement } from './utils';\nimport { SFFieldType, ShiftTabObject } from '../../../types';\n\n// KCP scenario: Regular credit card but with additional fields -\n// an encrypted pin/password field preceded by a form field of a non-SF type (d.o.b/taxRefNum)\nexport function shiftTabKCP(fieldType: SFFieldType, rootNode: HTMLElement, hasSeparateDateFields: boolean): ShiftTabObject {\n    let additionalField: HTMLElement;\n    let fieldToFocus: SFFieldType;\n\n    switch (fieldType) {\n        case ENCRYPTED_CARD_NUMBER:\n            additionalField = getPreviousTabbableNonSFElement(ENCRYPTED_CARD_NUMBER, rootNode);\n            break;\n\n        case ENCRYPTED_EXPIRY_DATE:\n            fieldToFocus = ENCRYPTED_CARD_NUMBER;\n            break;\n\n        case ENCRYPTED_EXPIRY_MONTH:\n            fieldToFocus = ENCRYPTED_CARD_NUMBER;\n            break;\n\n        case ENCRYPTED_EXPIRY_YEAR:\n            fieldToFocus = ENCRYPTED_EXPIRY_MONTH;\n            break;\n\n        case ENCRYPTED_SECURITY_CODE:\n            fieldToFocus = !hasSeparateDateFields ? ENCRYPTED_EXPIRY_DATE : ENCRYPTED_EXPIRY_YEAR;\n            break;\n\n        case ENCRYPTED_PWD_FIELD:\n            additionalField = getPreviousTabbableNonSFElement(fieldType, rootNode);\n            break;\n\n        default:\n            break;\n    }\n\n    return {\n        fieldToFocus,\n        additionalField\n    };\n}\n","import {\n    ENCRYPTED_CARD_NUMBER,\n    ENCRYPTED_SECURITY_CODE,\n    ENCRYPTED_EXPIRY_DATE,\n    ENCRYPTED_EXPIRY_MONTH,\n    ENCRYPTED_EXPIRY_YEAR\n} from '../../../constants';\nimport { getPreviousTabbableNonSFElement } from './utils';\nimport { SFFieldType, ShiftTabObject } from '../../../types';\n\n// Regular Credit Card scenario\nexport function shiftTabCreditCard(\n    fieldType: SFFieldType,\n    rootNode: HTMLElement,\n    hasSeparateDateFields: boolean,\n    numIframes: number\n): ShiftTabObject {\n    let additionalField: HTMLElement;\n    let fieldToFocus: SFFieldType;\n\n    switch (fieldType) {\n        case ENCRYPTED_CARD_NUMBER:\n            additionalField = getPreviousTabbableNonSFElement(ENCRYPTED_CARD_NUMBER, rootNode);\n            break;\n\n        case ENCRYPTED_EXPIRY_DATE:\n            fieldToFocus = ENCRYPTED_CARD_NUMBER;\n            break;\n\n        case ENCRYPTED_EXPIRY_MONTH:\n            fieldToFocus = ENCRYPTED_CARD_NUMBER;\n            break;\n\n        case ENCRYPTED_EXPIRY_YEAR:\n            fieldToFocus = ENCRYPTED_EXPIRY_MONTH;\n            break;\n\n        case ENCRYPTED_SECURITY_CODE:\n            // Shifting focus away from securedFields\n            if (numIframes === 1) {\n                additionalField = getPreviousTabbableNonSFElement(ENCRYPTED_SECURITY_CODE, rootNode);\n            } else {\n                // Focus stays within securedFields\n                fieldToFocus = !hasSeparateDateFields ? ENCRYPTED_EXPIRY_DATE : ENCRYPTED_EXPIRY_YEAR;\n            }\n            break;\n\n        default:\n            break;\n    }\n\n    return {\n        fieldToFocus,\n        additionalField\n    };\n}\n","import {\n    ENCRYPTED_SECURITY_CODE,\n    ENCRYPTED_CARD_NUMBER,\n    DATE_POLICY_REQUIRED,\n    DATE_POLICY_HIDDEN,\n    ENCRYPTED_EXPIRY_DATE,\n    ENCRYPTED_EXPIRY_MONTH,\n    ENCRYPTED_EXPIRY_YEAR\n} from '../../constants';\nimport postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport { SFFeedbackObj, SendBrandObject, SendExpiryDateObject } from '../../types';\nimport { BinLookupResponse, BrandObject } from '../../../../../Card/types';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\nimport { SingleBrandResetObject } from '../../../SFP/types';\n\nexport function sendBrandToCardSF(brandObj: SendBrandObject): void {\n    if (hasOwnProperty(this.state.securedFields, ENCRYPTED_CARD_NUMBER)) {\n        const dataObj: object = {\n            txVariant: this.state.type,\n            ...brandObj,\n            fieldType: ENCRYPTED_CARD_NUMBER,\n            numKey: this.state.securedFields[ENCRYPTED_CARD_NUMBER].numKey\n        };\n        postMessageToIframe(dataObj, getIframeContentWin(this.state, ENCRYPTED_CARD_NUMBER), this.config.loadingContext);\n    }\n}\n\nexport function sendExpiryDatePolicyToSF(expiryDateObj: SendExpiryDateObject): void {\n    const separateDateFields =\n        hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_MONTH) && hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_YEAR);\n\n    const dateIframesArr = separateDateFields ? [ENCRYPTED_EXPIRY_MONTH, ENCRYPTED_EXPIRY_YEAR] : [ENCRYPTED_EXPIRY_DATE];\n\n    dateIframesArr.forEach((key: string) => {\n        const dataObj: object = {\n            txVariant: this.state.type,\n            ...expiryDateObj,\n            fieldType: key,\n            numKey: this.state.securedFields[key].numKey\n        };\n        postMessageToIframe(dataObj, getIframeContentWin(this.state, key), this.config.loadingContext);\n    });\n}\n\nexport default function handleBrandFromBinLookup(binLookupResponse: BinLookupResponse, resetObj: SingleBrandResetObject): void {\n    const isGenericCard: boolean = this.state.type === 'card';\n\n    /**\n     * The number of digits in number field has dropped below threshold for BIN lookup (or the bin wasn't found in the DB)\n     * - so tell SF to reset & republish the brand it detects\n     */\n    if (!binLookupResponse || !Object.keys(binLookupResponse).length) {\n        if (isGenericCard) {\n            // This will be sent to CardNumber SF which will trigger the brand to be re-evaluated and broadcast\n            // (which will reset cvcPolicy & expiryDatePolicy in state, here in Checkout)\n            this.sendBrandToCardSF({ brand: 'reset' });\n            // Also pass the reset expiryDatePolicy to the date related SFs so they can reset visibility & aria-required attrs\n            this.sendExpiryDatePolicyToSF({ expiryDatePolicy: DATE_POLICY_REQUIRED });\n        } else {\n            /**\n             * For \"dedicated\" card components, i.e a card component created as: checkout.create('bcmc') but which can accept multiple brands,\n             * there will be no to-and-fro with the securedField iframe to reset brand.\n             * The presence of a resetObj indicates we are in this \"dedicated\"\" scenario, so we need to use the information contained within this object\n             * to internally reset the brand\n             */\n            if (resetObj) {\n                this.processBrand({ ...resetObj, fieldType: ENCRYPTED_CARD_NUMBER } as SFFeedbackObj);\n            }\n        }\n\n        // Reset expiryDatePolicy - which never comes from SF // TODO find out under which circumstances this clause is still required\n        if (this.state.type === 'card' && hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_DATE)) {\n            this.state.securedFields[ENCRYPTED_EXPIRY_DATE].expiryDatePolicy = DATE_POLICY_REQUIRED;\n        }\n\n        return;\n    }\n\n    const binBrandObj: BrandObject = binLookupResponse.supportedBrands[0];\n\n    const passedBrand: string = binBrandObj.brand;\n\n    // Look first for expiryDatePolicy string otherwise use showExpiryDate boolean\n    const expiryDatePolicy = binBrandObj.expiryDatePolicy ?? (binBrandObj.showExpiryDate === true ? DATE_POLICY_REQUIRED : DATE_POLICY_HIDDEN);\n\n    const brandObj: object = {\n        brand: passedBrand,\n        cvcPolicy: binBrandObj.cvcPolicy,\n        expiryDatePolicy,\n        cvcText: 'Security code',\n        showSocialSecurityNumber: binBrandObj.showSocialSecurityNumber ?? false,\n        fieldType: ENCRYPTED_CARD_NUMBER\n    };\n\n    // Take advantage of function used to handle brand messages from SF in order to process this new brand information\n    this.processBrand(brandObj as SFFeedbackObj);\n\n    if (isGenericCard) {\n        // Pass brand to CardNumber SF\n        const cardObj: SendBrandObject = {\n            brand: passedBrand,\n            enableLuhnCheck: binLookupResponse.supportedBrands[0].enableLuhnCheck !== false,\n            // Only pass the panLength if a) we have one & b) we're not in a switching-between-dual-brands scenario\n            // (because it causes unnecessary callbacks from SF which uses panLength to trigger moving focus to the expiryDate field)\n            ...(binBrandObj?.panLength && !binLookupResponse.isDualBrandSelection && { panLength: binBrandObj?.panLength })\n        };\n        this.sendBrandToCardSF(cardObj);\n\n        // Inform the date related securedFields\n        // - if expiryDatePolicy is 'optional' or 'hidden' they need to set the aria-required attribute / hide themselves\n        this.sendExpiryDatePolicyToSF({ expiryDatePolicy });\n    }\n\n    /**\n     * CHECK IF BRAND CHANGE MEANS FORM IS NOW VALID e.g maestro/bcmc (which don't require cvc) OR bcmc/visa (one of which doesn't require cvc, one of which does)\n     */\n\n    /**\n     * First set the cvcPolicy value on the relevant SecuredFields instance (which will reflect in the cvc field being considered valid,\n     *  as long as it is not in error)...\n     */\n    if (hasOwnProperty(this.state.securedFields, ENCRYPTED_SECURITY_CODE)) {\n        this.state.securedFields[ENCRYPTED_SECURITY_CODE].cvcPolicy = binBrandObj.cvcPolicy;\n    }\n\n    /**\n     * ...then set the expiryDatePolicy...\n     */\n    if (hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_DATE)) {\n        this.state.securedFields[ENCRYPTED_EXPIRY_DATE].expiryDatePolicy = expiryDatePolicy;\n    } else if (hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_MONTH) && hasOwnProperty(this.state.securedFields, ENCRYPTED_EXPIRY_YEAR)) {\n        this.state.securedFields[ENCRYPTED_EXPIRY_MONTH].expiryDatePolicy = expiryDatePolicy;\n        this.state.securedFields[ENCRYPTED_EXPIRY_YEAR].expiryDatePolicy = expiryDatePolicy;\n    }\n\n    /**\n     * ...and now re-check if form i.e all the SecuredFields, are valid\n     */\n    this.validateForm();\n}\n","import postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\nimport { SFFieldType } from '../../types';\nimport { CSFThisObject } from '../types';\n\n/**\n * @param csfState - comes from initial, partial, implementation\n * @param csfConfig - comes from initial, partial, implementation\n *\n * @param pFieldType -\n * @param doLog -\n */\nexport function setFocusOnFrame({ csfState, csfConfig }: CSFThisObject, pFieldType: SFFieldType, doLog?: boolean): void {\n    // Check destroySecuredFields hasn't been called (thus clearing the state's securedFields object)\n    if (!hasOwnProperty(csfState.securedFields, pFieldType)) return;\n\n    if (process.env.NODE_ENV === 'development' && doLog) console.log('\\n### setFocusOnFrame:: (SHIFT_TAB) place focus on:', pFieldType);\n\n    const focusData = {\n        txVariant: csfState.type,\n        fieldType: pFieldType,\n        focus: true,\n        numKey: csfState.securedFields[pFieldType].numKey\n    };\n\n    postMessageToIframe(focusData, getIframeContentWin(csfState, pFieldType), csfConfig.loadingContext);\n}\n","import postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\nimport { CSFThisObject } from '../types';\nimport { SFFieldType } from '../../types';\n\n/**\n * UTIL TO BROADCAST TO ALL IFRAMES AT ONCE\n * Adds correct txVariant, fieldType and numKey for each iframe\n *\n * @param csfState - comes from initial, partial, implementation\n * @param csfConfig  - comes from initial, partial, implementation\n *\n * @param pDataObj -\n */\nexport function postMessageToAllIframes({ csfState, csfConfig }: CSFThisObject, pDataObj: object): boolean {\n    const objKeys: string[] = Object.keys(pDataObj || {});\n    if (!objKeys.length) {\n        // pDataObj is an object with the 'special' key(s) that represent the reason for making this postMessage\n        // without it/them there is no reason to postMessage\n        return false;\n    }\n\n    const securedFieldKeys: string[] = Object.keys(csfState.securedFields);\n    securedFieldKeys.forEach((pFieldType: SFFieldType) => {\n        const dataObj: object = {\n            txVariant: csfState.type,\n            fieldType: pFieldType,\n            numKey: csfState.securedFields[pFieldType].numKey\n        };\n\n        // Copy across 'special' properties from passed data object\n        objKeys.forEach(pKey => {\n            dataObj[pKey] = pDataObj[pKey];\n        });\n\n        postMessageToIframe(dataObj, getIframeContentWin(csfState, pFieldType), csfConfig.loadingContext);\n    });\n    return true;\n}\n","import { ENCRYPTED_CARD_NUMBER, ENCRYPTED_SECURITY_CODE } from '../../constants';\nimport postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport { objectsDeepEqual } from '../../utilities/commonUtils';\nimport { BrandStorageObject, CardBrandData, SFFeedbackObj, SFFieldType } from '../../types';\nimport { pick } from '../../../../../../utils/commonUtils';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\nimport { CSFThisObject } from '../types';\n\nconst checkForBrandChange = (pBrand: BrandStorageObject, storedBrand: BrandStorageObject): boolean => {\n    // if the objects aren't the same - then return true = brandChange has happened\n    return !objectsDeepEqual(pBrand, storedBrand);\n};\n\n/**\n * - If generic card type AND passed brand doesn't equal stored brand - send the new brand to the cvc input\n *    (so it can reassess what length it should be and if any value it contains is now valid)\n *\n * - Create object for onBrand callback aka SFPHandlers.handleOnBrand\n *\n * @param csfState - comes from initial, partial, implementation\n * @param csfConfig - comes from initial, partial, implementation\n * @param csfProps - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n *\n * @param pFeedbackObj -\n */\nexport default function processBrand({ csfState, csfConfig, csfProps, csfCallbacks }: CSFThisObject, pFeedbackObj: SFFeedbackObj): boolean {\n    const fieldType: SFFieldType = pFeedbackObj.fieldType;\n\n    if (fieldType === ENCRYPTED_CARD_NUMBER) {\n        // Check for new brand...\n        const newBrandObj: BrandStorageObject = {\n            brand: pFeedbackObj.brand,\n            cvcPolicy: pFeedbackObj.cvcPolicy,\n            expiryDatePolicy: pFeedbackObj.expiryDatePolicy,\n            showSocialSecurityNumber: pFeedbackObj.showSocialSecurityNumber\n        };\n        const newBrand: boolean = checkForBrandChange(newBrandObj, csfState.brand);\n\n        if (!newBrand) {\n            return null;\n        }\n\n        // Now BCMC can dual brand with Visa it must also be treated as a generic card so we can show/hide the CVC field\n        const treatAsGenericCard: boolean = csfState.type === 'card' || csfState.type === 'bcmc';\n\n        // ...if also a generic card - tell cvc field...\n        if (treatAsGenericCard && newBrand) {\n            // Store on state so for subsequent brand messages we can compare the new and the old\n            csfState.brand = newBrandObj;\n\n            // Perform postMessage to send brand to CVC field - this also needs to happen for BCMC, single branded cards,\n            // because it needs to know the cvcPolicy (to set the aria-required attribute & to show the iframe)\n            if (hasOwnProperty(csfState.securedFields, ENCRYPTED_SECURITY_CODE)) {\n                const dataObj: object = {\n                    txVariant: csfState.type,\n                    brand: newBrandObj.brand,\n                    fieldType: ENCRYPTED_SECURITY_CODE,\n                    cvcPolicy: pFeedbackObj.cvcPolicy,\n                    numKey: csfState.securedFields[ENCRYPTED_SECURITY_CODE].numKey\n                };\n                postMessageToIframe(dataObj, getIframeContentWin(csfState, ENCRYPTED_SECURITY_CODE), csfConfig.loadingContext);\n            }\n        }\n\n        // Create object with brand related properties\n        const brandInfoObj = treatAsGenericCard\n            ? pick(['brand', 'cvcPolicy', 'cvcText', 'expiryDatePolicy', 'showSocialSecurityNumber']).from(pFeedbackObj)\n            : null;\n\n        if (brandInfoObj && brandInfoObj.brand) {\n            const callbackObj: CardBrandData = brandInfoObj as CardBrandData;\n            callbackObj.type = csfState.type;\n            callbackObj.rootNode = csfProps.rootNode as HTMLElement;\n\n            // ...and call SFPHandlers.handleOnBrand\n            csfCallbacks.onBrand(callbackObj);\n        }\n\n        return true;\n    }\n\n    return false;\n}\n","import postMessageToIframe from '../utils/iframes/postMessageToIframe';\nimport { ENCRYPTED_EXPIRY_DATE, ENCRYPTED_EXPIRY_MONTH, ENCRYPTED_EXPIRY_YEAR } from '../../constants';\nimport { SFFeedbackObj, CardAutoCompleteData } from '../../types';\nimport { hasOwnProperty } from '../../../../../../utils/hasOwnProperty';\nimport getIframeContentWin from '../utils/iframes/getIframeContentWin';\nimport { CSFThisObject } from '../types';\n\n/**\n *\n * @param csfState - comes from initial, partial, implementation\n * @param csfConfig - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n *\n * @param pFeedbackObj -\n */\nexport function processAutoComplete({ csfState, csfConfig, csfCallbacks }: CSFThisObject, pFeedbackObj: SFFeedbackObj): boolean {\n    /**\n     * NOTE: It seems Chrome has started autofilling across cross-origin iframes. Have tested as far back as v104 but have no resources to test further back\n     * So, in theory for Chrome \\>= v104 we don't need to do any of this, including having special listeners in the securedFields\n     */\n\n    // Specifically for cc-name (but no reason not to propagate all AC objects to the merchant)\n    if (pFeedbackObj.name === 'cc-name') {\n        const feedbackObj: SFFeedbackObj = { ...pFeedbackObj };\n        delete feedbackObj.numKey;\n        const ACFeedbackObj: CardAutoCompleteData = feedbackObj as CardAutoCompleteData;\n        csfCallbacks.onAutoComplete(ACFeedbackObj);\n        return true;\n    }\n\n    // Send date info to relevant secured fields (needed for Safari whose Security model won't allow direct population of fields in 3rd party iframes)\n    if (pFeedbackObj.name === 'cc-exp') {\n        const splittableDateVal = pFeedbackObj.value.replace(/[^0-9]/gi, '/'); // Replace any non-digits with a fwd-slash so we can always split it\n\n        const dateValArr: string[] = splittableDateVal.split('/');\n\n        if (dateValArr.length !== 2) {\n            // To avoid bug in some versions of Safari where date doesn't come through as expected\n            return false;\n        }\n\n        if (dateValArr[0].length === 1) dateValArr[0] = `0${dateValArr[0]}`; // pad, if required\n\n        const acMonthVal: string = dateValArr[0];\n\n        // Extra checks that passed year is a valid value\n        const year = dateValArr[1];\n        const isValidYear = (year?.length === 4 || year?.length === 2) && !isNaN(parseInt(year));\n        if (!isValidYear) {\n            return false;\n        }\n\n        const acYearVal: string = year.slice(-2); // take last 2 digits of year\n        const acDateVal = `${acMonthVal}/${acYearVal}`;\n\n        if (hasOwnProperty(csfState.securedFields, ENCRYPTED_EXPIRY_DATE)) {\n            const dataObj: object = {\n                txVariant: csfState.type,\n                fieldType: ENCRYPTED_EXPIRY_DATE,\n                autoComplete: acDateVal,\n                numKey: csfState.securedFields[ENCRYPTED_EXPIRY_DATE].numKey\n            };\n            postMessageToIframe(dataObj, getIframeContentWin(csfState, ENCRYPTED_EXPIRY_DATE), csfConfig.loadingContext);\n            return true;\n        }\n\n        if (hasOwnProperty(csfState.securedFields, ENCRYPTED_EXPIRY_MONTH)) {\n            const dataObj: object = {\n                txVariant: csfState.type,\n                fieldType: ENCRYPTED_EXPIRY_MONTH,\n                autoComplete: acMonthVal,\n                numKey: csfState.securedFields[ENCRYPTED_EXPIRY_MONTH].numKey\n            };\n            postMessageToIframe(dataObj, getIframeContentWin(csfState, ENCRYPTED_EXPIRY_MONTH), csfConfig.loadingContext);\n        }\n\n        if (hasOwnProperty(csfState.securedFields, ENCRYPTED_EXPIRY_YEAR)) {\n            // Dirty! - Need to wait til next page draw if setting month and year at the same time, otherwise only year gets set\n            setTimeout(() => {\n                const dataObj: object = {\n                    txVariant: csfState.type,\n                    fieldType: ENCRYPTED_EXPIRY_YEAR,\n                    autoComplete: acYearVal,\n                    numKey: csfState.securedFields[ENCRYPTED_EXPIRY_YEAR].numKey\n                };\n                postMessageToIframe(dataObj, getIframeContentWin(csfState, ENCRYPTED_EXPIRY_YEAR), csfConfig.loadingContext);\n            }, 0);\n        }\n        return true;\n    }\n\n    return false;\n}\n","import { SFFeedbackObj, CardFocusData } from '../../types';\nimport ua from '../utils/userAgent';\nimport { CSFThisObject } from '../types';\n\n/**\n * Call focus callback and store which field currently has focus\n *\n * @param csfState - comes from initial, partial, implementation\n * @param csfProps - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n *\n * @param pFeedbackObj -\n */\nexport function handleFocus({ csfState, csfProps, csfCallbacks }: CSFThisObject, handleIOSTouchEvents, pFeedbackObj: SFFeedbackObj): void {\n    const feedbackObj: SFFeedbackObj = { ...pFeedbackObj };\n\n    delete feedbackObj.numKey;\n\n    feedbackObj.rootNode = csfProps.rootNode as HTMLElement;\n    feedbackObj.type = csfState.type;\n\n    // Store which field has focus\n    const focusString: string = feedbackObj.fieldType;\n\n    // FOCUS EVENT - store who has focus, if it differs to the current value\n    if (feedbackObj.focus) {\n        if (csfState.currentFocusObject !== focusString) {\n            csfState.currentFocusObject = focusString;\n\n            // If iOS detected AND we don't have a (touchend) listener\n            if (ua.__IS_IOS && !csfState.registerFieldForIos) {\n                handleIOSTouchEvents();\n            }\n        }\n    } else {\n        // BLUR EVENT - remove stored focus\n        const focusObjectMatches: boolean = csfState.currentFocusObject === focusString;\n        if (focusObjectMatches) {\n            csfState.currentFocusObject = null;\n        }\n    }\n\n    // Call callback (SecuredFieldsProviderHandlers > onFocus)\n    const callbackObj: CardFocusData = feedbackObj as CardFocusData;\n    callbackObj.currentFocusObject = csfState.currentFocusObject;\n    csfCallbacks.onFocus(callbackObj);\n}\n","// Count how many iframes have successfully been configured and, if its all of them, call callback function\n\nimport { CardAdditionalSFData } from '../../types';\nimport { CSFThisObject } from '../types';\n\n// First, object, param comes from partial implementation\n/**\n * @param csfState - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n * @param isConfigured - comes from initial, partial, implementation\n *\n * @param pFeedbackObj -\n */\nexport function handleIframeConfigFeedback({ csfState, csfCallbacks }: CSFThisObject, isConfigured, pFeedbackObj): boolean {\n    csfState.iframeConfigCount += 1;\n\n    if (window._b$dl)\n        console.log('### handleIframeConfigFeedback::csfState.iframeConfigCount:: ', csfState.iframeConfigCount, 'who=', pFeedbackObj.fieldType);\n\n    if (!csfState.isConfigured) {\n        if (csfState.iframeConfigCount === csfState.originalNumIframes) {\n            if (process.env.NODE_ENV === 'development' && window._b$dl) {\n                console.log('\\n### handleIframeConfigFeedback::handleIframeConfigFeedback:: ALL IFRAMES CONFIG DO CALLBACK type=', csfState.type);\n            }\n\n            // Announce we're configured to the rest of the system\n            isConfigured();\n\n            return true;\n        }\n    } else {\n        const callbackObj: CardAdditionalSFData = { additionalIframeConfigured: true, fieldType: pFeedbackObj.fieldType, type: csfState.type };\n        csfCallbacks.onAdditionalSFConfig(callbackObj);\n    }\n\n    return false;\n}\n","import cardType from '../utils/cardType';\nimport { CardObject, CardConfigSuccessData } from '../../types';\nimport * as logger from '../../utilities/logger';\nimport { CVC_POLICY_REQUIRED } from '../../constants';\nimport { CSFThisObject } from '../types';\n\n/**\n * @param csfState - comes from initial, partial, implementation\n * @param csfConfig - comes from initial, partial, implementation\n * @param csfProps - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n * @param validateForm - comes from initial, partial, implementation\n */\nexport function isConfigured({ csfState, csfConfig, csfProps, csfCallbacks }: CSFThisObject, validateForm): boolean {\n    csfState.isConfigured = true;\n\n    const callbackObj: CardConfigSuccessData = { iframesConfigured: true, type: csfState.type, rootNode: csfProps.rootNode as HTMLElement };\n\n    csfCallbacks.onConfigSuccess(callbackObj);\n\n    // If a recurring card\n    if (csfState.numIframes === 1 && csfConfig.isCreditCardType) {\n        if (csfState.type === 'card') {\n            logger.error(\n                \"ERROR: Payment method with a single secured field - but 'brands' has not been set to an array containing the specific card brand\"\n            );\n            return false;\n        }\n\n        // Get card object from txVariant\n        const card: CardObject = cardType.getCardByBrand(csfState.type);\n\n        // It's possible we don't recognise the card type -\n        // scenario: frontend initially recognises card as e.g. Visa - but then backend tokenises it as a sub-brand which we currently don't recognise\n        if (card) {\n            // Assess whether cvc field is required\n            const cvcPolicy = card.cvcPolicy ?? CVC_POLICY_REQUIRED;\n\n            // If cvc is optional - the form can be considered valid\n            if (cvcPolicy !== CVC_POLICY_REQUIRED) {\n                validateForm();\n            }\n        }\n    }\n    return true;\n}\n","import { CardAllValidData, SecuredFields } from '../../types';\nimport { CSFThisObject } from '../types';\n\nconst checkFormIsValid = (pSecuredFields: SecuredFields): boolean => {\n    const securedFieldKeys: string[] = Object.keys(pSecuredFields);\n\n    for (let i = 0, len = securedFieldKeys.length; i < len; i += 1) {\n        const key: string = securedFieldKeys[i];\n\n        if (!pSecuredFields[key].isValid) {\n            return false;\n        }\n    }\n    return true;\n};\n\n/**\n * @param csfState - comes from initial, partial, implementation\n * @param csfProps - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n */\nexport default function validateForm({ csfState, csfProps, csfCallbacks }: CSFThisObject): void {\n    const isValid: boolean = checkFormIsValid(csfState.securedFields);\n\n    const validityHasChanged: boolean = isValid !== csfState.allValid;\n\n    csfState.allValid = isValid;\n\n    // Only call onAllValid callback if value has changed OR is true\n    if (!isValid && !validityHasChanged) return;\n\n    const callbackObj: CardAllValidData = { allValid: isValid, type: csfState.type, rootNode: csfProps.rootNode as HTMLElement };\n\n    // BROADCAST VALID STATE OF THE FORM AS A WHOLE\n    csfCallbacks.onAllValid(callbackObj);\n}\n","import { SFFeedbackObj, CardBinValueData } from '../../types';\nimport { CSFThisObject } from '../types';\n\ninterface DestructuredFeedbackObj {\n    binValue?: string;\n    encryptedBin?: string;\n    uuid?: string;\n}\n\n/**\n * @param csfState - comes from initial, partial, implementation\n * @param csfCallbacks - comes from initial, partial, implementation\n *\n * @param pFeedbackObj -\n */\nexport function handleBinValue({ csfState, csfCallbacks }: CSFThisObject, pFeedbackObj: SFFeedbackObj): void {\n    const { binValue, encryptedBin, uuid }: DestructuredFeedbackObj = pFeedbackObj;\n\n    const callbacksObj: CardBinValueData = { binValue, type: csfState.type };\n\n    if (encryptedBin) {\n        callbacksObj.encryptedBin = encryptedBin;\n        callbacksObj.uuid = uuid;\n    }\n\n    csfCallbacks.onBinValue(callbacksObj);\n}\n","import SecuredField from '../../securedField/SecuredField';\n\nexport function destroySecuredFields(): void {\n    // Tell all securedFields iframes: they will remove all event listeners including keyboard events\n    this.postMessageToAllIframes({ destroy: true });\n\n    // Get ref to all the keys under which SecuredField instances are stores\n    const securedFieldKeys: string[] = Object.keys(this.state.securedFields);\n\n    // Tell each SecuredField instance to:\n    // stop listening to message events, remove iframe window refs, remove iframes\n    // Then remove ref to SecuredField instance\n    securedFieldKeys.forEach(pFieldType => {\n        const sf: SecuredField = this.state.securedFields[pFieldType];\n        if (sf) sf.destroy(); // Comment out if you want to test the 'destroy' effects in the actual SF\n        this.state.securedFields[pFieldType] = null;\n    });\n    // --\n\n    // Stop listening to touchend event on body (iOS only)\n    this.destroyTouchendListener();\n    // Stop listening to touchstart event on document (iOS only)\n    this.destroyTouchstartListener();\n\n    // Clear SecuredField storage object\n    this.state.securedFields = {};\n}\n","import AbstractCSF from './AbstractCSF';\nimport { CSFReturnObject, CSFSetupObject, CSFStateObject, CSFThisObject } from './types';\nimport { StylesObject, CardAdditionalSFData, SFFieldType } from '../types';\nimport { BinLookupResponse } from '../../../../Card/types';\nimport { handleConfig } from './extensions/handleConfig';\nimport { configureCallbacks } from './extensions/configureCallbacks';\nimport { handleValidation } from './extensions/handleValidation';\nimport { handleEncryption } from './extensions/handleEncryption';\nimport { createSecuredFields, createNonCardSecuredFields, createCardSecuredFields, setupSecuredField } from './extensions/createSecuredFields';\nimport handleIOSTouchEvents from './extensions/handleIOSTouchEvents';\nimport handleTab from './extensions/handleTab';\nimport handleBrandFromBinLookup, { sendBrandToCardSF, sendExpiryDatePolicyToSF } from './extensions/handleBrandFromBinLookup';\nimport { setFocusOnFrame } from './partials/setFocusOnFrame';\nimport { postMessageToAllIframes } from './partials/postMessageToAllIframes';\nimport processBrand from './partials/processBrand';\nimport { processAutoComplete } from './partials/processAutoComplete';\nimport { handleFocus } from './partials/handleFocus';\nimport { handleIframeConfigFeedback } from './partials/handleIframeConfigFeedback';\nimport { isConfigured } from './partials/isConfigured';\nimport validateForm from './partials/validateForm';\nimport { handleBinValue } from './partials/handleBinValue';\nimport { destroySecuredFields } from './utils/destroySecuredFields';\nimport postMessageToIframe from './utils/iframes/postMessageToIframe';\nimport getIframeContentWin from './utils/iframes/getIframeContentWin';\nimport * as logger from '../utilities/logger';\nimport { selectOne } from '../utilities/dom';\nimport { on } from '../../../../../utils/listenerUtils';\nimport { partial } from '../utilities/commonUtils';\nimport { hasOwnProperty } from '../../../../../utils/hasOwnProperty';\nimport ua from './utils/userAgent';\nimport { SingleBrandResetObject } from '../../SFP/types';\n\nconst notConfiguredWarning = (str = 'You cannot use secured fields') => {\n    logger.warn(`${str} - they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.`);\n};\n\nclass CSF extends AbstractCSF {\n    // --\n    constructor(setupObj: CSFSetupObject) {\n        /**\n         * Initialises:\n         *  - this.props = setupObj: CSFSetupObject\n         *\n         * and empty objects for:\n         *  - this.config: CSFConfigObject (populated in handleConfig.ts)\n         *  - this.callbacks: CSFCallbacksConfig (populated in configureCallbacks.ts\n         *  - this.state: CSFStateObject (populated below)\n         */\n        super(setupObj);\n\n        this.state = {\n            /**\n             *  For generic card will always be 'card'.\n             *  For non-generic card will be hardcoded to a particular txVariant e.g. 'mc' or 'visa'\n             *  For other types of SecuredField will be the passed type e.g. 'ach' or 'giftcard'\n             */\n            type: this.props.type,\n            /**\n             *  For generic card will change as shopper types\n             *  For non-generic card will be fixed\n             */\n            brand: this.props.type !== 'card' ? { brand: this.props.type, cvcPolicy: 'required' } : { brand: null, cvcPolicy: 'required' },\n            allValid: undefined,\n            numIframes: 0,\n            originalNumIframes: 0,\n            iframeCount: 0,\n            iframeConfigCount: 0,\n            isConfigured: false,\n            hasSeparateDateFields: false,\n            currentFocusObject: null,\n            registerFieldForIos: false,\n            securedFields: {},\n            isKCP: false\n        } as CSFStateObject;\n\n        // Create object of references to properties on 'this', that can be used to set up the partials\n        const thisObj: CSFThisObject = { csfState: this.state, csfConfig: this.config, csfProps: this.props, csfCallbacks: this.callbacks };\n\n        // Setup 'this' references\n        this.configHandler = handleConfig;\n\n        this.callbacksHandler = configureCallbacks;\n\n        this.validateForm = partial(validateForm, thisObj);\n\n        this.isConfigured = partial(isConfigured, thisObj, this.validateForm);\n        this.handleIframeConfigFeedback = partial(handleIframeConfigFeedback, thisObj, this.isConfigured);\n\n        this.processBrand = partial(processBrand, thisObj);\n\n        this.handleValidation = handleValidation;\n        this.handleEncryption = handleEncryption;\n\n        this.createSecuredFields = createSecuredFields;\n        this.createNonCardSecuredFields = createNonCardSecuredFields;\n        this.createCardSecuredFields = createCardSecuredFields;\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        this.setupSecuredField = setupSecuredField;\n\n        this.postMessageToAllIframes = partial(postMessageToAllIframes, thisObj);\n\n        this.handleIOSTouchEvents = handleIOSTouchEvents.handleTouchend.bind(this);\n        this.touchendListener = handleIOSTouchEvents.touchendListener.bind(this);\n        this.destroyTouchendListener = handleIOSTouchEvents.destroyTouchendListener.bind(this);\n        this.touchstartListener = handleIOSTouchEvents.touchstartListener.bind(this);\n        this.destroyTouchstartListener = handleIOSTouchEvents.destroyTouchstartListener.bind(this);\n\n        this.setFocusOnFrame = partial(setFocusOnFrame, thisObj);\n        this.handleFocus = partial(handleFocus, thisObj, this.handleIOSTouchEvents);\n\n        this.handleSFShiftTab = handleTab.handleSFShiftTab;\n        this.handleShiftTab = handleTab.handleShiftTab;\n\n        this.destroySecuredFields = destroySecuredFields;\n\n        this.processAutoComplete = partial(processAutoComplete, thisObj);\n\n        this.handleBinValue = partial(handleBinValue, thisObj);\n\n        this.handleBrandFromBinLookup = handleBrandFromBinLookup;\n        this.sendBrandToCardSF = sendBrandToCardSF;\n        this.sendExpiryDatePolicyToSF = sendExpiryDatePolicyToSF;\n\n        // Populate config & callbacks objects & create securedFields\n        this.init();\n    }\n\n    private init(): void {\n        this.configHandler(this.props);\n        this.callbacksHandler(this.props.callbacks);\n\n        /**\n         * Create all the securedFields\n         */\n        const numIframes: number = this.createSecuredFields();\n\n        this.state.numIframes = this.state.originalNumIframes = numIframes;\n\n        this.state.isKCP = !!this.props.isKCP;\n\n        /**\n         * Add touchstart listener\n         * re. Disabling arrow keys in iOS\n         */\n        if (ua.__IS_IOS && this.props.shouldDisableIOSArrowKeys) {\n            this.hasGenuineTouchEvents = false;\n            on(document, 'touchstart', this.touchstartListener);\n        }\n    }\n\n    // Expose functions that can be called on the CSF instance\n    public createReturnObject(): CSFReturnObject {\n        // --\n        const returnObj: CSFReturnObject = {\n            // --\n            updateStyles: (pStyleObject: StylesObject): void => {\n                if (this.state.isConfigured) {\n                    this.postMessageToAllIframes({ styleObject: pStyleObject });\n                } else {\n                    logger.warn(\n                        'You cannot update the secured fields styling ' +\n                            \"- they are not yet configured. Use the 'onConfigSuccess' callback to know when this has happened.\"\n                    );\n                }\n            },\n            setFocusOnFrame: (pFieldType: SFFieldType): void => {\n                if (this.state.isConfigured) {\n                    this.setFocusOnFrame(pFieldType);\n                    // Comment in a quick way to test destroying secured fields (also see comment in destroySecuredFields)\n                    // this.destroySecuredFields();\n                } else {\n                    notConfiguredWarning('You cannot set focus on any secured field');\n                }\n            },\n            // For component based implementation - if showValidation function is called on the component use this\n            // function as a way to notify the CSF that a field is in error\n            isValidated: (pFieldType: SFFieldType, code: string): void => {\n                if (this.state.isConfigured) {\n                    if (hasOwnProperty(this.state.securedFields, pFieldType)) {\n                        this.state.securedFields[pFieldType].hasError = true;\n\n                        // If there's not already an errorType, set one\n                        // NOTE: fixes issue in Components where you first validate and then start typing a maestro number\n                        // - w/o this and the corresponding fix in the SecuredField class the maestro PM will never register as valid\n                        if (this.state.securedFields[pFieldType].errorType === '') {\n                            this.state.securedFields[pFieldType].errorType = 'isValidated';\n                        }\n\n                        // Inform iframe\n                        const dataObj: object = {\n                            txVariant: this.state.type,\n                            fieldType: pFieldType,\n                            externalValidation: true,\n                            code,\n                            numKey: this.state.securedFields[pFieldType].numKey\n                        };\n                        postMessageToIframe(dataObj, getIframeContentWin(this.state, pFieldType), this.config.loadingContext);\n                    }\n                } else {\n                    notConfiguredWarning('You cannot set validated on any secured field');\n                }\n            },\n            hasUnsupportedCard: (pFieldType: SFFieldType, code: string): void => {\n                if (this.state.isConfigured) {\n                    if (hasOwnProperty(this.state.securedFields, pFieldType)) {\n                        //\n                        this.state.securedFields[pFieldType].hasError = !!code;\n                        this.state.securedFields[pFieldType].errorType = code;\n\n                        // Inform iframe\n                        const dataObj: object = {\n                            txVariant: this.state.type,\n                            fieldType: pFieldType,\n                            unsupportedCard: !!code,\n                            code,\n                            numKey: this.state.securedFields[pFieldType].numKey\n                        };\n                        postMessageToIframe(dataObj, getIframeContentWin(this.state, pFieldType), this.config.loadingContext);\n                    }\n                } else {\n                    notConfiguredWarning('You cannot set hasUnsupportedCard on any secured field');\n                }\n            },\n            destroy: (): void => {\n                if (this.state.isConfigured) {\n                    this.destroySecuredFields();\n                } else {\n                    notConfiguredWarning('You cannot destroy secured fields');\n                }\n            },\n            brandsFromBinLookup: (binLookupResponse: BinLookupResponse, resetObj: SingleBrandResetObject): void => {\n                if (!this.config.isCreditCardType) return null;\n\n                if (this.state.isConfigured) {\n                    this.handleBrandFromBinLookup(binLookupResponse, resetObj);\n                } else {\n                    notConfiguredWarning('You cannot set pass brands to secured fields');\n                }\n            },\n            addSecuredField: (pFieldType: SFFieldType): void => {\n                const securedField: HTMLElement = selectOne(this.props.rootNode, `[data-cse=\"${pFieldType}\"]`);\n                if (securedField) {\n                    this.state.numIframes += 1;\n                    this.setupSecuredField(securedField);\n                }\n            },\n            removeSecuredField: (pFieldType: SFFieldType): void => {\n                if (this.state.securedFields[pFieldType]) {\n                    this.state.securedFields[pFieldType].destroy();\n                    delete this.state.securedFields[pFieldType];\n                    this.state.numIframes -= 1;\n                    this.state.iframeCount -= 1;\n\n                    const callbackObj: CardAdditionalSFData = { additionalIframeRemoved: true, fieldType: pFieldType, type: this.state.type };\n                    this.callbacks.onAdditionalSFRemoved(callbackObj);\n                }\n            },\n            setKCPStatus: (isKCP: boolean): void => {\n                this.state.isKCP = isKCP;\n            },\n            sfIsOptionalOrHidden: (fieldType: string): boolean => {\n                return this.state.securedFields[fieldType].isOptionalOrHidden();\n            }\n        };\n\n        return returnObj;\n    }\n}\n\nexport default CSF;\n","import CSF from './CSF';\nimport cardType from './utils/cardType';\nimport * as logger from '../utilities/logger';\nimport { falsy } from '../../../../../utils/commonUtils';\nimport { CSFReturnObject, CSFSetupObject } from './types';\nimport { hasOwnProperty } from '../../../../../utils/hasOwnProperty';\nimport { selectOne } from '../utilities/dom';\n\nconst initCSF = (pSetupObj: CSFSetupObject): CSFReturnObject => {\n    if (!pSetupObj) {\n        throw new Error('No securedFields configuration object defined');\n    }\n\n    const setupObj: CSFSetupObject = { ...pSetupObj };\n\n    try {\n        // Map the generic types (i.e. 'card', 'scheme') to 'card'\n        const isGenericCardType: boolean = cardType.isGenericCardType(setupObj.type);\n        setupObj.type = isGenericCardType ? 'card' : setupObj.type;\n    } catch (e) {\n        // If type has not been specified - ensure there is a default\n        setupObj.type = 'card';\n    }\n\n    // //////// 1. Check passed config object has minimum expected properties //////////\n    if (!hasOwnProperty(setupObj, 'rootNode')) {\n        return logger.error('ERROR: SecuredFields configuration object is missing a \"rootNode\" property');\n    }\n\n    if (falsy(setupObj.clientKey)) {\n        return logger.warn('WARNING: AdyenCheckout configuration object is missing a \"clientKey\" property.');\n    }\n\n    //----------------------------------------------------------------------------\n\n    // //////// 2. Find and store reference to the root DOM element //////////\n    const rootNode: HTMLElement = findRootNode(setupObj.rootNode);\n\n    if (!rootNode) {\n        return logger.error(`ERROR: SecuredFields cannot find a valid rootNode element for ${setupObj.type}`);\n    }\n\n    setupObj.rootNode = rootNode; // Overwrite with actual node (in case we were sent a string)\n\n    // //////// 3. Add warning if in development mode and a custom http domain is detected\n    const origin = window.location.origin;\n\n    if (\n        (process.env.NODE_ENV === 'development' || process.env.NODE_ENV === 'test') &&\n        origin.indexOf('http') > -1 &&\n        origin.indexOf('localhost') === -1 &&\n        origin.indexOf('127.0.0.1') === -1\n    ) {\n        console.warn(\n            'WARNING: you are are running from an insecure context:',\n            origin,\n            '\\nCrypto.subtle cannot function in this environment.\\nThe only secure contexts under http contain \"localhost\" or \"127.0.0.1\" in their url.' +\n                '\\nSee https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts'\n        );\n    }\n\n    const myCSF: CSF = new CSF(setupObj);\n    return myCSF.createReturnObject();\n};\n\nconst findRootNode = pRootNode => {\n    let rootNode;\n\n    // Expect to be sent the actual html node...\n    if (typeof pRootNode === 'object') {\n        rootNode = pRootNode;\n    }\n\n    if (typeof pRootNode === 'string') {\n        // ... but if only sent a string - find it ourselves\n        rootNode = selectOne(document, pRootNode);\n\n        if (!rootNode) {\n            return null;\n        }\n    }\n\n    return rootNode;\n};\n\nexport default initCSF;\n","import { Resources } from '../../../core/Context/Resources';\nimport { camelCaseToSnakeCase } from '../../../utils/textUtils';\nimport { ALL_SECURED_FIELDS, ENCRYPTED } from './lib/constants';\n\n/**\n * Used by SecuredFieldsProviderHandlers\n */\nexport const getCardImageUrl = (brand, resources: Resources) => {\n    const type = brand === 'card' ? 'nocard' : brand || 'nocard';\n\n    const imageOptions = {\n        type,\n        extension: 'svg'\n    };\n\n    return resources.getImage(imageOptions)(type);\n};\n\n/**\n * Used by Card.tsx & SecuredFields.tsx\n * @param fieldType -\n */\nexport const fieldTypeToSnakeCase = (fieldType: string) => {\n    let str = camelCaseToSnakeCase(fieldType);\n    // SFs need their fieldType mapped to what the endpoint expects\n    if (ALL_SECURED_FIELDS.includes(fieldType)) {\n        str = str.substring(ENCRYPTED.length + 1); // strip 'encrypted_' off the string\n    }\n    return str;\n};\n","export const camelCaseToSnakeCase = camelCaseString => {\n    return camelCaseString.replace(/([a-z])([A-Z])/g, '$1_$2').toLowerCase();\n};\n\nexport const capitalizeFirstLetter = (str: string): string => {\n    return str.charAt(0).toUpperCase() + str.slice(1);\n};\n","import { getCardImageUrl } from '../utils';\nimport {\n    ENCRYPTED_SECURITY_CODE,\n    ENCRYPTED_CARD_NUMBER,\n    CVC_POLICY_REQUIRED,\n    DATE_POLICY_REQUIRED,\n    ENCRYPTED_EXPIRY_DATE,\n    OPTIONAL,\n    HIDDEN,\n    ENCRYPTED_EXPIRY_MONTH,\n    ENCRYPTED_EXPIRY_YEAR\n} from '../lib/constants';\nimport {\n    CardErrorData,\n    CardFocusData,\n    CardBrandData,\n    CardAllValidData,\n    CardFieldValidData,\n    CardAutoCompleteData,\n    CardConfigSuccessData,\n    CardLoadData,\n    SFKeyPressObj\n} from '../lib/types';\nimport { existy } from '../../../../utils/commonUtils';\nimport AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';\n\n/**\n * Emits the onLoad event\n * Here we can assume all securedFields iframes have fired their 'load' event\n */\nfunction handleOnLoad(cbObj: CardLoadData): void {\n    // Clear 'loading' timeout\n    clearTimeout(this.csfLoadFailTimeout);\n    this.csfLoadFailTimeout = null;\n\n    // Propagate onLoad event\n    this.props.onLoad(cbObj);\n\n    /**\n     * Having seen that the securedFields iframes have loaded some kind of content (we don't know what, yet)\n     * - setTimeout since we expect to get a successful configuration message \"within a reasonable time\"\n     *\n     * Now we catch clientKey & environment mismatch in core.ts - this timeout being called indicates that the securedFields have not all configured\n     * - so we need to clear the loading spinner to see if the securedFields are reporting anything\n     */\n    this.csfConfigFailTimeout = setTimeout(() => {\n        if (this.state.status !== 'ready') {\n            // Hide the spinner\n            this.setState({ status: 'csfConfigFailure' });\n            // Report the error\n            this.props.onError(new AdyenCheckoutError('ERROR', 'secured fields have failed to configure'));\n        }\n    }, this.csfConfigFailTimeoutMS);\n}\n\n/**\n * Emits the onConfigSuccess (ready) event\n * Here we can assume CSF is loaded, configured and ready to be used\n */\nfunction handleOnConfigSuccess(cbObj: CardConfigSuccessData): void {\n    // Clear 'config' timeout\n    clearTimeout(this.csfConfigFailTimeout);\n    this.csfConfigFailTimeout = null;\n\n    this.setState({ status: 'ready' }, () => {\n        // Propagate onConfigSuccess event\n        this.props.onConfigSuccess(cbObj);\n    });\n}\n\n/**\n * Emits the onAllValid event\n */\nfunction handleOnAllValid(status: CardAllValidData): boolean {\n    // Form cannot be valid whilst there is an unsupported card\n    if (this.state.detectedUnsupportedBrands) {\n        return false;\n    }\n\n    this.setState({ isSfpValid: status.allValid }, () => {\n        // New - fixes maestro-with-error-on-optional-cvc-field bug\n        this.props.onChange(this.state, { event: 'handleOnAllValid' });\n        // Propagate onAllValid event\n        this.props.onAllValid(status);\n    });\n\n    return true;\n}\n\n/**\n * Saves a field value from CSF in the CardInput state\n * Emits the onFieldValid event\n */\nfunction handleOnFieldValid(fieldObj: CardFieldValidData): boolean {\n    // A card number field cannot be valid whilst there is an unsupported card\n    if (this.state.detectedUnsupportedBrands && fieldObj.fieldType === ENCRYPTED_CARD_NUMBER) {\n        return false;\n    }\n\n    const setValidFieldState = prevState => ({\n        data: { ...prevState.data, [fieldObj.encryptedFieldName]: fieldObj.blob },\n        valid: { ...prevState.valid, [fieldObj.encryptedFieldName]: fieldObj.valid },\n        /**\n         * For a field that has just received valid:true (field has just been completed & encrypted) - mark the error state for this field as false\n         * For a field that has just received valid:false (field was encrypted, now is not)\n         *  - field is either in a state of being incomplete but without errors (digit deleted) - so mark the error state for this field as false\n         *  or has switched from valid/encrypted state to being in error (digit edited to one that puts the field in error) - so keep any error that\n         *  might just have been set\n         */\n        errors: { ...prevState.errors, [fieldObj.fieldType]: prevState.errors[fieldObj.fieldType] ?? false }\n    });\n\n    this.setState(setValidFieldState, () => {\n        this.props.onChange(this.state, { event: 'handleOnFieldValid', fieldType: fieldObj.fieldType });\n\n        // Propagate onFieldValid event\n        this.props.onFieldValid(fieldObj);\n    });\n\n    return true;\n}\n\nfunction fieldIsInError(fieldType: string, policy: string, numCharsObj: object, errorsObj) {\n    return (policy === OPTIONAL || policy === HIDDEN) && numCharsObj[fieldType] === 0 ? false : errorsObj[fieldType];\n}\n\n/**\n * Saves the card brand in state\n * Emits the onBrand event\n */\nfunction handleOnBrand(cardInfo: CardBrandData): void {\n    this.setState(\n        prevState => {\n            /**\n             * If we change brand to one where the cvc or date field(s) are not required & are empty - then these fields cannot be in error\n             * (scenario: have validated empty form, then choose brand w. optional/hidden cvc or date)...\n             * ...else propagate the existing error.\n             */\n            const cvcFieldInError = fieldIsInError(ENCRYPTED_SECURITY_CODE, cardInfo.cvcPolicy, this.numCharsInField, prevState.errors);\n\n            const dateFieldInError =\n                this.numDateFields === 1\n                    ? fieldIsInError(ENCRYPTED_EXPIRY_DATE, cardInfo.expiryDatePolicy, this.numCharsInField, prevState.errors)\n                    : null;\n\n            // For custom card comp\n            const monthFieldInError =\n                this.numDateFields === 2\n                    ? fieldIsInError(ENCRYPTED_EXPIRY_MONTH, cardInfo.expiryDatePolicy, this.numCharsInField, prevState.errors)\n                    : null;\n\n            const yearFieldInError =\n                this.numDateFields === 2\n                    ? fieldIsInError(ENCRYPTED_EXPIRY_YEAR, cardInfo.expiryDatePolicy, this.numCharsInField, prevState.errors)\n                    : null;\n            // --\n            /** end */\n\n            return {\n                brand: cardInfo.brand,\n                cvcPolicy: cardInfo.cvcPolicy ?? CVC_POLICY_REQUIRED,\n                showSocialSecurityNumber: cardInfo.showSocialSecurityNumber,\n                errors: {\n                    ...prevState.errors,\n                    ...(existy(cvcFieldInError) && { [ENCRYPTED_SECURITY_CODE]: cvcFieldInError }),\n                    ...(existy(dateFieldInError) && { [ENCRYPTED_EXPIRY_DATE]: dateFieldInError }),\n                    ...(existy(monthFieldInError) && { [ENCRYPTED_EXPIRY_MONTH]: monthFieldInError }),\n                    ...(existy(yearFieldInError) && { [ENCRYPTED_EXPIRY_YEAR]: yearFieldInError })\n                },\n                expiryDatePolicy: cardInfo.expiryDatePolicy ?? DATE_POLICY_REQUIRED\n            };\n        },\n        () => {\n            this.props.onChange(this.state, { event: 'handleOnBrand' });\n\n            // Enhance data object with the url for the brand image, first checking if the merchant has configured their own one for this brand\n            const brandImageUrl = this.props.brandsConfiguration[cardInfo.brand]?.icon ?? getCardImageUrl(cardInfo.brand, this.props.resources);\n            this.props.onBrand({ ...cardInfo, brandImageUrl });\n        }\n    );\n}\n\n/**\n * Handles validation errors\n */\nfunction handleOnError(cbObj: CardErrorData, hasUnsupportedCard: boolean = null): boolean {\n    const errorCode = cbObj.error;\n\n    this.setState(\n        prevState => ({\n            errors: { ...prevState.errors, [cbObj.fieldType]: errorCode || false },\n            // If dealing with an unsupported card ensure these card number related fields are reset re. pasting a full, unsupported card straight in\n            ...(hasUnsupportedCard && { data: { ...prevState.data, [ENCRYPTED_CARD_NUMBER]: undefined } }),\n            ...(hasUnsupportedCard && { valid: { ...prevState.valid, [ENCRYPTED_CARD_NUMBER]: false } }),\n            ...(hasUnsupportedCard && { isSfpValid: false })\n        }),\n        () => {\n            this.props.onChange(this.state, { event: 'handleOnError', fieldType: cbObj.fieldType });\n        }\n    );\n\n    return true;\n}\n\nfunction handleFocus(cbObj: CardFocusData): void {\n    this.numCharsInField[cbObj.fieldType] = cbObj.numChars;\n\n    this.props.onFocus(cbObj);\n}\n\nfunction handleOnTouchstartIOS(cbObj): void {\n    // disableIOSArrowKeys is either null or a function (in which case we should call it)\n    this.props.disableIOSArrowKeys?.(cbObj);\n}\n\n// Only called for holder name (from CSF>partials>processAutoComplete)\nfunction handleOnAutoComplete(cbObj: CardAutoCompleteData): void {\n    this.setState({ autoCompleteName: cbObj.value }, () => {\n        this.props.onChange(this.state, { event: 'handleOnAutoComplete', fieldType: cbObj.fieldType });\n        this.setState({ autoCompleteName: null }); // Nullify ref after sending it (lets shopper edit holder name)\n    });\n    this.props.onAutoComplete(cbObj);\n}\n\nfunction handleKeyPressed(obj: SFKeyPressObj): void {\n    if (obj.action === 'enterKeyPressed') {\n        const kb = new KeyboardEvent('keypress', {\n            bubbles: true,\n            cancelable: true,\n            key: 'Enter',\n            code: 'Enter'\n        });\n        this.props.handleKeyPress?.(kb);\n    }\n}\n\n/**\n * Handles cases where no secured fields are necessary (one click payments without CVC)\n * Automatically resolves with a valid state\n */\nfunction handleOnNoDataRequired(): void {\n    this.setState({ status: 'ready' }, () => this.props.onChange({ isSfpValid: true }));\n}\n\nexport default {\n    handleFocus,\n    handleOnAllValid,\n    handleOnAutoComplete,\n    handleOnFieldValid,\n    handleOnLoad,\n    handleOnConfigSuccess,\n    handleOnBrand,\n    handleOnError,\n    handleOnNoDataRequired,\n    handleOnTouchstartIOS,\n    handleKeyPressed\n};\n","import { Component } from 'preact';\nimport { getErrorObject, getFields, getErrorReducer, validFieldsReducer } from './SFPUtils';\nimport initCSF from '../lib/CSF';\nimport handlers from './SecuredFieldsProviderHandlers';\nimport defaultProps from './defaultProps';\nimport { SFPProps, SFPState, SingleBrandResetObject } from './types';\nimport {\n    StylesObject,\n    CardErrorData,\n    CardFocusData,\n    CardBrandData,\n    CardAllValidData,\n    CardFieldValidData,\n    CardAutoCompleteData,\n    CardConfigSuccessData,\n    CardLoadData,\n    SFKeyPressObj\n} from '../lib/types';\nimport { CSFReturnObject, CSFSetupObject } from '../lib/CSF/types';\nimport { CVC_POLICY_REQUIRED, DATE_POLICY_REQUIRED, DEDICATED_CARD_COMPONENTS, ENCRYPTED_CARD_NUMBER, ENCRYPTED_PWD_FIELD } from '../lib/constants';\nimport { BinLookupResponse } from '../../../Card/types';\nimport AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';\nimport { SFStateErrorObj } from '../../../Card/components/CardInput/types';\nimport { getErrorMessageFromCode } from '../../../../core/Errors/utils';\nimport { SF_ErrorCodes } from '../../../../core/Errors/constants';\n\n/**\n * SecuredFieldsProvider:\n * Initialises & handles the client-side part of SecuredFields\n */\nclass SecuredFieldsProvider extends Component<SFPProps, SFPState> {\n    private csfLoadFailTimeout: number;\n    private csfLoadFailTimeoutMS: number;\n    private csfConfigFailTimeout: number;\n    private csfConfigFailTimeoutMS: number;\n    private numCharsInField: object;\n    private rootNode;\n    private numDateFields: number;\n    private csf: CSFReturnObject;\n    private handleOnLoad: (obj: CardLoadData) => void;\n    private handleOnConfigSuccess: (obj: CardConfigSuccessData) => void;\n    private handleOnFieldValid: (obj: CardFieldValidData) => void;\n    private handleOnAllValid: (obj: CardAllValidData) => void;\n    private handleOnBrand: (obj: CardBrandData) => void;\n    private handleFocus: (obj: CardFocusData) => void;\n    private handleOnError: (obj: CardErrorData, hasUnsupportedCard?: boolean) => void;\n    private handleOnAutoComplete: (obj: CardAutoCompleteData) => void;\n    private handleOnNoDataRequired: () => void;\n    private handleOnTouchstartIOS: (obj) => void;\n    private handleKeyPressed: (obj: SFKeyPressObj) => void;\n    public state: SFPState;\n    public props;\n    private issuingCountryCode;\n\n    constructor(props: SFPProps) {\n        super(props);\n\n        const stateObj: SFPState = {\n            status: 'loading',\n            brand: props.type,\n            errors: {},\n            valid: {},\n            data: {},\n            cvcPolicy: CVC_POLICY_REQUIRED,\n            expiryDatePolicy: DATE_POLICY_REQUIRED,\n            isSfpValid: false,\n            hasKoreanFields: props.hasKoreanFields\n        };\n        this.state = stateObj;\n\n        this.csfLoadFailTimeout = null;\n        this.csfLoadFailTimeoutMS = 30000;\n\n        this.csfConfigFailTimeout = null;\n        this.csfConfigFailTimeoutMS = 15000;\n\n        this.numCharsInField = {};\n\n        // Handlers\n        this.handleOnLoad = handlers.handleOnLoad.bind(this);\n        this.handleOnConfigSuccess = handlers.handleOnConfigSuccess.bind(this);\n        this.handleOnFieldValid = handlers.handleOnFieldValid.bind(this);\n        this.handleOnAllValid = handlers.handleOnAllValid.bind(this);\n        this.handleOnBrand = handlers.handleOnBrand.bind(this);\n        this.handleFocus = handlers.handleFocus.bind(this);\n        this.handleOnError = handlers.handleOnError.bind(this);\n        this.handleOnNoDataRequired = handlers.handleOnNoDataRequired.bind(this);\n        this.handleOnAutoComplete = handlers.handleOnAutoComplete.bind(this);\n        this.handleOnTouchstartIOS = handlers.handleOnTouchstartIOS.bind(this); // Only called when iOS detected\n        this.handleKeyPressed = handlers.handleKeyPressed.bind(this);\n\n        this.processBinLookupResponse = this.processBinLookupResponse.bind(this);\n\n        // Bindings for functions exposed to users of this component: SecuredFields & CardInput\n        this.setFocusOn = this.setFocusOn.bind(this);\n        this.updateStyles = this.updateStyles.bind(this);\n        this.handleUnsupportedCard = this.handleUnsupportedCard.bind(this);\n        this.showValidation = this.showValidation.bind(this);\n        this.destroy = this.destroy.bind(this);\n    }\n\n    public static defaultProps = defaultProps;\n\n    public componentDidMount(): void {\n        // When SFP instantiated through SecuredFieldsInput c.f. CardInput\n        if (this.props.rootNode) {\n            this.setRootNode(this.props.rootNode);\n        }\n\n        // Find encryptedFields and map them to the values we use to store valid states\n        const fields = getFields(this.rootNode);\n        const valid = fields.reduce(validFieldsReducer, {});\n\n        this.setState({ valid });\n\n        // Populate numCharsInField object\n        fields.forEach(field => {\n            this.numCharsInField[field] = 0;\n        });\n\n        // Store how many dateFields we are dealing with visually\n        this.numDateFields = fields.filter(f => f.match(/Expiry/)).length;\n\n        if (fields.length) {\n            this.destroy(); // TODO test if this solves the React double render problem.\n            this.initializeCSF(this.rootNode);\n        } else {\n            this.handleOnNoDataRequired();\n        }\n    }\n\n    public componentDidUpdate() {\n        this.checkForKCPFields();\n        // Pass all the state data up - Used right now for loading status\n        this.props.onStateUpdate?.(this.state);\n    }\n\n    public componentWillUnmount(): void {\n        this.csf = null;\n        clearTimeout(this.csfLoadFailTimeout);\n        clearTimeout(this.csfConfigFailTimeout);\n    }\n\n    private initializeCSF(root: HTMLElement): void {\n        let loadingContext = this.props.loadingContext;\n\n        // For loading securedFields from local server during development\n        if (process.env.NODE_ENV === 'development' && process.env.__SF_ENV__ !== 'build') {\n            loadingContext = process.env.__SF_ENV__;\n        }\n\n        const csfSetupObj: CSFSetupObject = {\n            rootNode: root,\n            type: this.props.type,\n            clientKey: this.props.clientKey,\n            cardGroupTypes: this.props.brands,\n            autoFocus: this.props.autoFocus,\n            trimTrailingSeparator: this.props.trimTrailingSeparator,\n            loadingContext,\n            keypadFix: this.props.keypadFix,\n            showWarnings: this.props.showWarnings,\n            iframeUIConfig: {\n                sfStyles: this.props.styles\n            },\n            i18n: this.props.i18n,\n            callbacks: {\n                onLoad: this.handleOnLoad,\n                onConfigSuccess: this.handleOnConfigSuccess,\n                onFieldValid: this.handleOnFieldValid,\n                onAllValid: this.handleOnAllValid,\n                onBrand: this.handleOnBrand,\n                onError: this.handleOnError,\n                onFocus: this.handleFocus,\n                onBinValue: this.props.onBinValue,\n                onAutoComplete: this.handleOnAutoComplete,\n                onAdditionalSFConfig: this.props.onAdditionalSFConfig,\n                onAdditionalSFRemoved: this.props.onAdditionalSFRemoved,\n                onTouchstartIOS: this.handleOnTouchstartIOS,\n                onKeyPressed: this.handleKeyPressed\n            },\n            isKCP: this.state.hasKoreanFields,\n            legacyInputMode: this.props.legacyInputMode,\n            minimumExpiryDate: this.props.minimumExpiryDate,\n            implementationType: this.props.implementationType || 'components', // to distinguish between 'regular' and 'custom' card component\n            forceCompat: this.props.forceCompat,\n            maskSecurityCode: this.props.maskSecurityCode,\n            exposeExpiryDate: this.props.exposeExpiryDate,\n            shouldDisableIOSArrowKeys: !!this.props.disableIOSArrowKeys, // convert whether function has been defined into a boolean\n            placeholders: this.props.placeholders ?? {},\n            showContextualElement: this.props.showContextualElement\n        };\n\n        this.csf = initCSF(csfSetupObj);\n\n        /**\n         * Expect to at least have had the handleOnLoad callback called within this time\n         * - if this hasn't happened then something has happened to interrupt the loading of the securedFields\n         * So we need to clear the loading spinner to see if the securedFields are reporting anything\n         */\n        // @ts-ignore - timout 'type' is a number\n        this.csfLoadFailTimeout = setTimeout(() => {\n            if (this.state.status !== 'ready') {\n                // Hide the spinner\n                this.setState({ status: 'csfLoadFailure' });\n                // Report the error\n                this.props.onError(new AdyenCheckoutError('ERROR', 'secured field iframes have failed to load'));\n            }\n        }, this.csfLoadFailTimeoutMS);\n    }\n\n    private checkForKCPFields() {\n        let needsKoreanFields = false;\n        if (this.props.koreanAuthenticationRequired) {\n            needsKoreanFields = this.issuingCountryCode ? this.issuingCountryCode === 'kr' : this.props.countryCode === 'kr';\n        }\n\n        // Was korean, now isn't - hide password field\n        if (this.state.hasKoreanFields && !needsKoreanFields) {\n            // Clear any stored data\n            const setRemovedFieldState = prevState => ({\n                data: { ...prevState.data, [ENCRYPTED_PWD_FIELD]: undefined },\n                valid: { ...prevState.valid, [ENCRYPTED_PWD_FIELD]: false },\n                errors: { ...prevState.errors, [ENCRYPTED_PWD_FIELD]: false },\n                hasKoreanFields: false\n            });\n\n            this.setState(setRemovedFieldState, () => {\n                this.props.onChange(this.state);\n            });\n\n            this.csf.removeSecuredField(ENCRYPTED_PWD_FIELD);\n            this.csf.setKCPStatus(false);\n        }\n\n        // Wasn't korean, now is - show password field\n        if (!this.state.hasKoreanFields && needsKoreanFields) {\n            const setAddedFieldState = prevState => ({\n                valid: { ...prevState.valid, [ENCRYPTED_PWD_FIELD]: false },\n                hasKoreanFields: true,\n                isSfpValid: false\n            });\n\n            this.setState(setAddedFieldState, () => {\n                this.props.onChange(this.state);\n            });\n\n            this.csf.addSecuredField(ENCRYPTED_PWD_FIELD);\n            this.csf.setKCPStatus(true);\n        }\n    }\n\n    public getChildContext(): object {\n        return { i18n: this.props.i18n };\n    }\n\n    public handleUnsupportedCard(errObj: CardErrorData): boolean {\n        const hasUnsupportedCard = !!errObj.error;\n\n        // Store the brand(s) we detected and which we don't support\n        if (hasUnsupportedCard) {\n            this.setState({ detectedUnsupportedBrands: errObj.detectedBrands });\n        }\n\n        errObj.rootNode = this.rootNode; // Needed for CustomCard\n        this.handleOnError(errObj, hasUnsupportedCard);\n        // Inform CSF that the number field has an unsupportedCard error (or that it has been cleared)\n        if (this.csf) {\n            this.csf.hasUnsupportedCard(ENCRYPTED_CARD_NUMBER, errObj.error);\n        }\n        return hasUnsupportedCard;\n    }\n\n    public setFocusOn(frame: string): void {\n        if (this.csf) this.csf.setFocusOnFrame(frame);\n    }\n\n    public updateStyles(stylesObj: StylesObject): void {\n        if (this.csf) this.csf.updateStyles(stylesObj);\n    }\n\n    public sfIsOptionalOrHidden(fieldType: string): boolean {\n        return this.csf.sfIsOptionalOrHidden(fieldType);\n    }\n\n    public destroy(): void {\n        if (this.csf) this.csf.destroy();\n    }\n\n    public showValidation(): void {\n        const { numDateFields, state }: SecuredFieldsProvider = this;\n\n        Object.keys(state.valid)\n            .reduce(getErrorReducer(numDateFields, state), [])\n            .forEach(field => {\n                // For each detected error pass an error object to the handler (calls error callback & sets state)\n                const errorObj: CardErrorData = getErrorObject(field, this.rootNode, state);\n                this.handleOnError(errorObj, !!state.detectedUnsupportedBrands);\n                // Inform the secured-fields instance of which fields have been found to have errors\n                if (this.csf && this.csf.isValidated) {\n                    this.csf.isValidated(field, errorObj.error);\n                }\n            });\n    }\n\n    /**\n     * Map SF errors to ValidationRuleResult-like objects, for CardInput component\n     */\n    public mapErrorsToValidationRuleResult(): SFStateErrorObj {\n        const fieldNames: string[] = Object.keys(this.state.errors);\n\n        const sfStateErrorsObj = fieldNames.reduce((acc, fieldName) => {\n            const errorCode = this.state.errors[fieldName];\n            if (errorCode) {\n                acc[fieldName] = {\n                    isValid: false,\n                    errorMessage: getErrorMessageFromCode(errorCode, SF_ErrorCodes), // this is the human-readable, untranslated, explanation of the error that will exist on the error object in card.state.errors\n                    // For v5 the object found in state.errors should also contain the additional properties that used to be sent to the onError callback\n                    // namely: translation, errorCode, a ref to rootNode &, in the case of failed binLookup, an array of the detectedBrands\n                    errorI18n: this.props.i18n.get(errorCode),\n                    error: errorCode,\n                    rootNode: this.rootNode,\n                    ...(this.state.detectedUnsupportedBrands && { detectedBrands: this.state.detectedUnsupportedBrands })\n                };\n            } else {\n                acc[fieldName] = null;\n            }\n            return acc;\n        }, {});\n        return sfStateErrorsObj;\n    }\n\n    public processBinLookupResponse(binLookupResponse: BinLookupResponse, resetObject: SingleBrandResetObject): void {\n        // If we were dealing with an unsupported card & now we have a valid /binLookup response (or a response triggering a reset of the UI),\n        // - reset state to clear the error & the stored unsupportedBrands and, in the case of a valid /binLookup response, inform CSF (via handleUnsupportedCard)\n        // (Scenario: from an unsupportedCard state the shopper has pasted another number long enough to trigger a /binLookup)\n        if (this.state.detectedUnsupportedBrands) {\n            this.setState(prevState => ({\n                errors: { ...prevState.errors, [ENCRYPTED_CARD_NUMBER]: false },\n                detectedUnsupportedBrands: null\n            }));\n\n            // If we have some sort of binLookupResponse object then this isn't the reset caused by digits dropping below a threshold\n            // - so call handleUnsupportedCard to clear the error\n            if (this.csf && binLookupResponse) {\n                const errObj: CardErrorData = {\n                    type: 'card',\n                    fieldType: 'encryptedCardNumber',\n                    error: ''\n                };\n                this.handleUnsupportedCard(errObj);\n            }\n        }\n\n        this.issuingCountryCode = binLookupResponse?.issuingCountryCode?.toLowerCase();\n\n        const hasBrandedResetObj = resetObject?.brand;\n\n        /**\n         * Are we dealing with a \"dedicated\" card scenario i.e a card component created as: checkout.create('bcmc') but which can accept multiple brands\n         * - in which case we will need to reset brand and pass on the resetObj to CSF\n         */\n        const mustResetDedicatedBrand = hasBrandedResetObj && DEDICATED_CARD_COMPONENTS.includes(resetObject.brand);\n\n        if (mustResetDedicatedBrand) {\n            // resetObject.brand will be the value of the brand whose logo we want to reshow in the UI\n            this.setState(resetObject, () => {\n                this.props.onChange(this.state);\n            });\n        }\n\n        /**\n         * Scenarios:\n         *\n         * - RESET (binLookupResponse === null): The number of digits in number field has dropped below threshold for BIN lookup\n         * - RESULT (binLookupResponse.supportedBrands.length === 1): binLookup has found a result so inform CSF\n         *\n         * In the RESET scenario, for \"dedicated\" card components we also need to pass on the resetObject since this contains information about\n         * the brand that CSF needs to reset to, internally.\n         */\n        if (this.csf) this.csf.brandsFromBinLookup(binLookupResponse, mustResetDedicatedBrand ? resetObject : null);\n    }\n\n    private setRootNode = (input: HTMLElement): void => {\n        this.rootNode = input;\n    };\n\n    public render(props, state) {\n        return props.render({ setRootNode: this.setRootNode, setFocusOn: this.setFocusOn }, state);\n    }\n}\n\nexport default SecuredFieldsProvider;\n","export default {\n    type: 'card',\n\n    // Settings\n    keypadFix: true,\n    rootNode: null,\n    loadingContext: null,\n    brands: [],\n    showWarnings: false,\n    autoFocus: true,\n    trimTrailingSeparator: true,\n\n    // Events\n    onChange: () => {},\n    onLoad: () => {},\n    onConfigSuccess: () => {},\n    onAllValid: () => {},\n    onFieldValid: () => {},\n    onBrand: () => {},\n    onError: () => {},\n    onBinValue: () => {},\n    onFocus: () => {},\n    onAutoComplete: () => {},\n    handleKeyPress: () => {},\n\n    // Customization\n    styles: {}\n};\n","import Language from '../../../../language/Language';\nimport type {\n    BinLookupResponse,\n    BrandConfiguration,\n    CardBrandsConfiguration,\n    CardBackendConfiguration,\n    DualBrandSelectElement,\n    CardPlaceholders\n} from '../../types';\nimport { InstallmentOptions } from './components/types';\nimport { ValidationResult } from '../../../internal/PersonalDetails/types';\nimport {\n    CardAllValidData,\n    CardAutoCompleteData,\n    CardBinValueData,\n    CardBrandData,\n    CardConfigSuccessData,\n    CardFieldValidData,\n    CardLoadData,\n    CVCPolicyType,\n    DatePolicyType\n} from '../../../internal/SecuredFields/lib/types';\nimport Specifications from '../../../internal/Address/Specifications';\nimport { AddressSchema } from '../../../internal/Address/types';\nimport { CardErrorData, StylesObject } from '../../../internal/SecuredFields/lib/types';\nimport { Resources } from '../../../../core/Context/Resources';\nimport { SRPanel } from '../../../../core/Errors/SRPanel';\nimport RiskElement from '../../../../core/RiskModule';\nimport { DisclaimerMsgObject } from '../../../internal/DisclaimerMessage/DisclaimerMessage';\nimport { OnAddressLookupType, OnAddressSelectedType } from '../../../internal/Address/components/AddressSearch';\nimport { ComponentMethodsRef } from '../../../internal/UIElement/types';\nimport { AddressData, PaymentAmount } from '../../../../types/global-types';\nimport { AnalyticsModule } from '../../../../types/global-types';\nimport type { FastlaneSignupConfiguration } from '../../../PayPalFastlane/types';\nimport { AnalyticsEvent } from '../../../../core/Analytics/AnalyticsEvent';\n\nexport interface CardInputValidState {\n    holderName?: boolean;\n    billingAddress?: boolean;\n    socialSecurityNumber?: boolean;\n    encryptedCardNumber?: boolean;\n    encryptedExpiryMonth?: boolean;\n    encryptedExpiryYear?: boolean;\n    encryptedSecurityCode?: boolean;\n    taxNumber?: boolean;\n    encryptedPassword?: boolean;\n}\n\nexport interface CardInputErrorState {\n    holderName?: ValidationResult;\n    billingAddress?: ValidationResult;\n    socialSecurityNumber?: ValidationResult;\n    encryptedCardNumber?: boolean;\n    encryptedExpiryDate?: boolean;\n    encryptedSecurityCode?: boolean;\n    taxNumber?: ValidationResult;\n    encryptedPassword?: boolean;\n}\n\nexport interface CardInputDataState {\n    holderName?: string;\n    billingAddress?: AddressData;\n    socialSecurityNumber?: string;\n    taxNumber?: string;\n}\n\n/**\n * Should be the subset of the props sent to CardInput that are *actually* used by CardInput\n * - either in the comp itself or are passed on to its children\n */\nexport interface CardInputProps {\n    amount?: PaymentAmount;\n    isPayButtonPrimaryVariant?: boolean;\n    autoFocus?: boolean;\n    billingAddressAllowedCountries?: string[];\n    billingAddressRequired?: boolean;\n    billingAddressRequiredFields?: string[];\n    billingAddressMode?: AddressModeOptions;\n    brand?: string;\n    brands?: string[];\n    brandsConfiguration?: CardBrandsConfiguration;\n    brandsIcons: Array<BrandConfiguration>;\n    clientKey: string;\n    configuration?: CardBackendConfiguration;\n    countryCode?: string;\n    cvcPolicy?: CVCPolicyType;\n    data?: CardInputDataState;\n    disableIOSArrowKeys?: boolean;\n    enableStoreDetails?: boolean;\n    expiryMonth?: string;\n    expiryYear?: string;\n    fastlaneConfiguration?: FastlaneSignupConfiguration;\n    forceCompat?: boolean;\n    fundingSource?: 'debit' | 'credit';\n    hasCVC?: boolean;\n    hasHolderName?: boolean;\n    holderName?: string;\n    holderNameRequired?: boolean;\n    i18n?: Language;\n    implementationType?: string;\n    installmentOptions?: InstallmentOptions;\n    keypadFix?: boolean;\n    lastFour?: string;\n    loadingContext: string;\n    legacyInputMode?: boolean;\n    minimumExpiryDate?: string;\n    modules?: {\n        srPanel: SRPanel;\n        analytics: AnalyticsModule;\n        risk: RiskElement;\n        resources: Resources;\n    };\n    onAdditionalSFConfig?: () => {};\n    onAdditionalSFRemoved?: () => {};\n    onAllValid?: (o: CardAllValidData) => {};\n    onAutoComplete?: (o: CardAutoCompleteData) => {};\n    onBinValue?: (o: CardBinValueData) => {};\n    onBlur?: (e) => {};\n    onBrand?: (o: CardBrandData) => {};\n    onConfigSuccess?: (O: CardConfigSuccessData) => {};\n    onChange?: (state) => {};\n    onError?: () => {};\n    onFieldValid?: (o: CardFieldValidData) => {};\n    onFocus?: (e) => {};\n    onLoad?: (o: CardLoadData) => {};\n    onSubmitAnalytics?: (event: AnalyticsEvent) => void;\n    handleKeyPress?: (obj: KeyboardEvent) => void;\n    onAddressLookup?: OnAddressLookupType;\n    onAddressSelected?: OnAddressSelectedType;\n    addressSearchDebounceMs?: number;\n    payButton?: (obj) => {};\n    placeholders?: CardPlaceholders;\n    positionHolderNameOnTop?: boolean;\n    resources: Resources;\n    setComponentRef?: (ref) => void;\n    showBrandIcon?: boolean;\n    showInstallmentAmounts?: boolean;\n    showPayButton: boolean;\n    showStoreDetailsCheckbox?: boolean;\n    showWarnings?: boolean;\n    showContextualElement?: boolean;\n    specifications?: Specifications;\n    storedPaymentMethodId?: string;\n    styles?: StylesObject;\n    trimTrailingSeparator?: boolean;\n    type?: string;\n    maskSecurityCode?: boolean;\n    exposeExpiryDate?: boolean;\n    disclaimerMessage?: DisclaimerMsgObject;\n}\n\nexport interface CardInputState {\n    dualBrandSelectElements: DualBrandSelectElement[];\n    selectedBrandValue: string;\n    billingAddress: object;\n    brand?: string;\n    data?: object;\n    errors?: object;\n    focusedElement: string;\n    cvcPolicy: CVCPolicyType;\n    expiryDatePolicy: DatePolicyType;\n    isValid: boolean;\n    status: string;\n    valid?: object;\n    issuingCountryCode: string;\n    showSocialSecurityNumber?: boolean;\n}\n\n// An interface for the members exposed by CardInput to its parent Card/UIElement\nexport interface CardInputRef extends ComponentMethodsRef {\n    sfp?: any;\n    setFocusOn?: (who) => void;\n    processBinLookupResponse?: (binLookupResponse: BinLookupResponse, isReset: boolean) => void;\n    updateStyles?: (stylesObj: StylesObject) => void;\n    handleUnsupportedCard?: (errObj: CardErrorData) => boolean;\n}\n\nexport interface FieldError {\n    errorMessage?: string;\n    errorI18n?: string;\n}\n\nexport interface SFError {\n    isValid?: boolean;\n    errorMessage?: string;\n    errorI18n?: string;\n    error: string;\n    rootNode: HTMLElement;\n    detectedBrands?: string[];\n}\n\nexport interface SFStateErrorObj {\n    [key: string]: SFError;\n}\n\nexport interface LayoutObj {\n    props: CardInputProps;\n    showKCP: boolean;\n    showBrazilianSSN: boolean;\n    countrySpecificSchemas: AddressSchema;\n    billingAddressRequiredFields?: string[];\n}\n\nexport enum AddressModeOptions {\n    full = 'full',\n    partial = 'partial',\n    none = 'none'\n}\n","import { SocialSecurityMode } from '../../types';\nimport { AddressModeOptions } from './types';\n\nexport default {\n    type: 'scheme',\n\n    setComponentRef: () => {},\n\n    // Settings\n    autoFocus: true,\n    billingAddressAllowedCountries: [],\n    billingAddressMode: AddressModeOptions.full,\n    billingAddressRequired: false,\n    billingAddressRequiredFields: ['street', 'houseNumberOrName', 'postalCode', 'city', 'stateOrProvince', 'country'],\n\n    configuration: { koreanAuthenticationRequired: false, socialSecurityNumberMode: 'auto' as SocialSecurityMode },\n    data: {\n        billingAddress: {}\n    },\n    disableIOSArrowKeys: false,\n    enableStoreDetails: false,\n    exposeExpiryDate: false,\n    forceCompat: false,\n    hasHolderName: false,\n    holderNameRequired: false,\n    hasCVC: true,\n    hideCVC: false,\n    installmentOptions: {},\n    keypadFix: true,\n    legacyInputMode: false,\n    maskSecurityCode: false,\n    minimumExpiryDate: null,\n    name: null, // Affects Dropin only, the name displayed in the PMList item\n    placeholders: {},\n    positionHolderNameOnTop: false,\n    showBrandIcon: true,\n    showInstallmentAmounts: null,\n    styles: {},\n\n    isPayButtonPrimaryVariant: true,\n    showContextualElement: true,\n\n    // Events\n    onLoad: (): any => {},\n    onConfigSuccess: (): any => {},\n    onAllValid: (): any => {},\n    onFieldValid: (): any => {},\n    onBrand: (): any => {},\n    onError: (): any => {},\n    onBinValue: (): any => {},\n    onBlur: (): any => {},\n    onFocus: (): any => {},\n    onChange: (): any => {}\n};\n","import { CPF_LENGTH } from './constants';\n\nexport function maskCPF(value) {\n    return value\n        .replace(/\\W/gi, '')\n        .replace(/(\\d{3})(?!$)/g, '$1.')\n        .replace(/(.{11}).(\\d{1,2})$/g, '$1-$2');\n}\n\nexport function maskCNPJ(value) {\n    return value.replace(\n        /^(\\d{2})(\\d{3})(\\d{3})?(\\d{4})?(\\d{1,2})?$/g,\n        (match, g1, g2, g3, g4 = '', g5 = '') => `${g1}.${g2}.${g3}/${g4}${g5.length ? `-${g5}` : ''}`\n    );\n}\n\nexport function cleanCPFCNPJ(value) {\n    return value.replace(/[^0-9]/g, '').trim();\n}\n\nexport function formatCPFCNPJ(value = '') {\n    if (typeof value !== 'string') return '';\n    const cleanValue = cleanCPFCNPJ(value);\n    const formattedValue = cleanValue.length > CPF_LENGTH ? maskCNPJ(cleanValue) : maskCPF(cleanValue);\n    return formattedValue;\n}\n","export const CPF_LENGTH = 11;\n","export default function (ssn) {\n    return /(^\\d{3}\\.\\d{3}\\.\\d{3}-\\d{2}$)|(^\\d{2}\\.\\d{3}\\.\\d{3}\\/\\d{4}-\\d{2}$)/.test(ssn);\n}\n","import { CountryFormatRules } from './Validator/types';\n\nconst MAX_LENGTH = 30;\n\nexport const getMaxLengthByFieldAndCountry = (\n    formattingRules: CountryFormatRules,\n    field: string,\n    country: string,\n    ignoreIfFormatterExists: boolean\n): number | null => {\n    // In ignoreIfFormatterExists is true we expect the formatter function to also act to limit length\n    if (ignoreIfFormatterExists && formattingRules[country]?.[field]?.formatterFn) {\n        return null;\n    }\n    const maxLength = formattingRules[country]?.[field]?.maxlength;\n    return maxLength ? maxLength : MAX_LENGTH;\n};\n\n// Not null or undefined or only spaces\nexport const isEmpty = input => !!(input == null || /^[\\s]*$/.test(input));\n\nexport const isString = input => typeof input === 'string' || input instanceof String;\nexport const hasText = input => isString(input) && !isEmpty(input);\n\nexport const SPECIAL_CHARS = '?\\\\+_=!@#$%^&*(){}~<>\\\\[\\\\]\\\\\\\\'; // N.B. difficulty escaping \\ (takes 3 backslashes!)\n\n// Generates a regEx ideal for use in a String.replace call for use in a formatter\n// e.g. getFormattingRegEx('^\\\\d', 'g') will generate: /[^\\d]/g which is a regEx to match anything that is not a digit\nexport const getFormattingRegEx = (specChars: string, flags = 'g') => new RegExp(`[${specChars}]`, flags);\n\n// Creates a regEx ideal for use in a RegExp.test call for use in a validator\nexport const getValidatingRegEx = (specChars: string, exclude: boolean) => new RegExp(`^[${exclude ? '^' : ''}${specChars}]+$`);\n\nexport const CHARACTER_PATTERNS: { [key: string]: RegExp } = {\n    digitsHyphen: /^[\\d-]+$/,\n    noHtml: /^[^<>&]+$/,\n    alphaNum: /^\\d[a-zA-Z0-9]{6,11}$/,\n    noSpecialChars: getValidatingRegEx(SPECIAL_CHARS, true)\n};\n\nexport const exactLength = (input: string, length: number) => {\n    if (isEmpty(input)) {\n        return true;\n    }\n    return input.length === length;\n};\n\nexport const validateForSpecialChars = name => {\n    const hasNoLength = !name.length;\n    // RegEx .test, if run against empty string, will return false\n    return CHARACTER_PATTERNS.noSpecialChars.test(name) || hasNoLength;\n};\n\n// Trim start and never allow more than 1 space on the end\nexport const trimValWithOneSpace = (val: string) => val.trimStart().replace(/\\s+/g, ' ');\n","import { ValidatorRules } from '../../../../utils/Validator/types';\nimport { formatCPFCNPJ } from '../../../internal/SocialSecurityNumberBrazil/utils';\nimport validateSSN from '../../../internal/SocialSecurityNumberBrazil/validate';\nimport { isEmpty } from '../../../../utils/validator-utils';\nimport {\n    BOLETO_SOCIAL_SECURITY_NUMBER_INVALID,\n    CREDITCARD_HOLDER_NAME_INVALID,\n    CREDITCARD_TAX_NUMBER_INVALID\n} from '../../../../core/Errors/constants';\n\nexport const cardInputFormatters = {\n    socialSecurityNumber: formatCPFCNPJ\n};\n\nexport const cardInputValidationRules: ValidatorRules = {\n    socialSecurityNumber: [\n        {\n            modes: ['blur'],\n            validate: value => {\n                if (isEmpty(value)) return null;\n                return validateSSN(value);\n            },\n            errorMessage: BOLETO_SOCIAL_SECURITY_NUMBER_INVALID\n        }\n    ],\n    taxNumber: [\n        {\n            modes: ['blur'],\n            validate: value => (isEmpty(value) ? null : value?.length === 6 || value?.length === 10),\n            errorMessage: CREDITCARD_TAX_NUMBER_INVALID\n        }\n    ],\n    holderName: [\n        {\n            // Will fire at startup and when triggerValidation is called and also applies as text is input\n            modes: ['blur'],\n            validate: value => (isEmpty(value) ? null : true), // true, if there are chars other than spaces\n            errorMessage: CREDITCARD_HOLDER_NAME_INVALID\n        }\n    ],\n    default: [\n        {\n            modes: ['blur'],\n            // ensuring we don't try to run this against objects e.g. billingAddress\n            validate: value => !!value && typeof value === 'string' && value.trim().length > 0\n        }\n    ]\n};\n\nexport const getRuleByNameAndMode = (name, mode) => {\n    const ruleArr = cardInputValidationRules[name] as any[];\n    const rule = ruleArr.reduce((acc, elem) => {\n        if (!acc.length) {\n            if (elem.modes.includes(mode)) {\n                acc.push(elem.validate);\n            }\n        }\n        return acc;\n    }, []);\n    return rule[0];\n};\n","import { SingleBrandResetObject } from '../SFP/types';\nimport { BrandObject } from '../../../Card/types';\nimport createCardVariantSwitcher from './createCardVariantSwitcher';\nimport { BRAND_ICON_UI_EXCLUSION_LIST } from '../lib/constants';\n\n// Externally testable utils\nexport const containsExcludedBrand = (brandsArr: BrandObject[], excludedBrands: string[]): boolean => {\n    return brandsArr.reduce((acc, brandObj) => acc || excludedBrands.includes(brandObj.brand), false);\n};\n\nexport const cloneBrandsArr = (brandsArr: BrandObject[]): BrandObject[] => brandsArr.map(item => ({ ...item }));\n\nexport const removeExcludedBrand = (brandsArr: BrandObject[], mainBrand1 = 'mc', mainBrand2 = 'visa'): BrandObject[] => {\n    const clonedBrands: BrandObject[] = cloneBrandsArr(brandsArr);\n\n    if (clonedBrands[0].brand !== mainBrand1 && clonedBrands[0].brand !== mainBrand2) clonedBrands.reverse();\n    clonedBrands.length = 1;\n    return clonedBrands;\n};\n// --\n\nexport default function extensions(props, refs, states, hasPanLengthRef: Partial<{ current }> = {}) {\n    // Destructure props, refs and state hooks\n    const { type, cvcPolicy } = props;\n    const { sfp } = refs;\n    const { dualBrandSelectElements, setDualBrandSelectElements, setSelectedBrandValue, issuingCountryCode, setIssuingCountryCode } = states;\n\n    return {\n        /**\n         * Handle the binLookup response object generated in triggerBinLookup and process it in relation to the CardInput and it's sub-components.\n         * e.g. we might need to add/remove additional markup (a selector for brands), and inform SFP of the issuingCountryCode & detected brand(s).\n         *\n         * @param binLookupResponse -\n         * @param isReset -\n         */\n        processBinLookup: (binLookupResponse, isReset) => {\n            const issuingCode = binLookupResponse?.issuingCountryCode ? binLookupResponse.issuingCountryCode.toLowerCase() : null;\n            setIssuingCountryCode(issuingCode);\n\n            // Reset UI\n            if (!binLookupResponse || !Object.keys(binLookupResponse).length) {\n                setDualBrandSelectElements([]);\n                setSelectedBrandValue('');\n\n                // If /binLookup has 'reset' then for a generic card the internal regex will kick in to show the right brand icon - so set to null\n                // However for a single-branded card we need to pass the \"base\" type so the brand logo is reset - so set to type\n                const brandToReset = isReset && type !== 'card' ? type : null;\n\n                sfp.current.processBinLookupResponse(binLookupResponse, {\n                    brand: brandToReset,\n                    cvcPolicy: cvcPolicy // undefined except for Bancontact\n                } as SingleBrandResetObject);\n\n                // Reset storage var\n                hasPanLengthRef.current = 0;\n                return;\n            }\n\n            // RESULT: binLookup has found a result so proceed accordingly\n            if (binLookupResponse.supportedBrands?.length) {\n                const hasExcludedBrand: boolean = containsExcludedBrand(binLookupResponse.supportedBrands, BRAND_ICON_UI_EXCLUSION_LIST);\n\n                const supportedBrands: BrandObject[] = hasExcludedBrand\n                    ? removeExcludedBrand(binLookupResponse.supportedBrands)\n                    : cloneBrandsArr(binLookupResponse.supportedBrands);\n\n                // 1) Multiple options found - add to the UI & inform SFP\n                if (supportedBrands.length > 1) {\n                    // --\n                    const switcherObj = createCardVariantSwitcher(supportedBrands);\n\n                    // Set properties on state to trigger the dual branding icons in the UI\n                    setDualBrandSelectElements(switcherObj.dualBrandSelectElements);\n                    setSelectedBrandValue(switcherObj.selectedBrandValue); // initially this value from switcherObj will be ''\n\n                    // Pass an object through to SFP\n                    sfp.current.processBinLookupResponse({\n                        issuingCountryCode: binLookupResponse.issuingCountryCode,\n                        supportedBrands: [switcherObj.leadBrand]\n                    });\n\n                    // Store the fact the binLookup obj has a panLength prop\n                    if (switcherObj.leadBrand.panLength > 0) {\n                        hasPanLengthRef.current = switcherObj.leadBrand.panLength;\n                    }\n\n                    // 2) Single option found (binValueObject.supportedBrands.length === 1)\n                } else {\n                    // Reset UI\n                    setDualBrandSelectElements([]);\n                    setSelectedBrandValue('');\n\n                    // Set (single) value from binLookup so it will be added to the 'brand' property in the paymentMethod object\n                    // EXCEPT - if we are dealing with a brand that we exclude from the UI\n                    if (!hasExcludedBrand) setSelectedBrandValue(supportedBrands[0].brand);\n\n                    // Pass object through to SFP\n                    sfp.current.processBinLookupResponse({\n                        issuingCountryCode: binLookupResponse.issuingCountryCode,\n                        supportedBrands\n                    });\n\n                    // Store the fact the binLookup obj has a panLength prop\n                    if (supportedBrands[0].panLength > 0) {\n                        hasPanLengthRef.current = supportedBrands[0].panLength;\n                    }\n                }\n            }\n        },\n        /**\n         * Handler for clicks on the icons added in response to the /binLookup call\n         * Inform SFP of the brand changes when these selections are made\n         */\n        handleDualBrandSelection: (e: Event | string): void => {\n            let value: Event | string = e;\n            if (e instanceof Event) {\n                const target = e.target as HTMLLIElement;\n                value = target.getAttribute('data-value') || target.getAttribute('value');\n            }\n\n            // Check if we have a value and whether that value corresponds to a brandObject we can propagate\n            // If either are false then abandon the process\n            let brandObjArr: BrandObject[] = [];\n            if (value) {\n                // Find the brandObject with the matching brand value and place into an array\n                brandObjArr = dualBrandSelectElements.reduce((acc, item) => {\n                    if (item.brandObject.brand === value) {\n                        acc.push(item.brandObject);\n                    }\n                    return acc;\n                }, []);\n\n                if (!brandObjArr.length) {\n                    return; // no brand object associated with value was found\n                }\n            } else {\n                return; // no value passed\n            }\n\n            setSelectedBrandValue(value);\n\n            // Pass brand object into SecuredFields\n            sfp.current.processBinLookupResponse({\n                issuingCountryCode,\n                supportedBrands: brandObjArr,\n                isDualBrandSelection: true\n            });\n        }\n    };\n}\n","import { BrandObject, DualBrandSelectElement } from '../../../Card/types';\n\n/**\n * Creates an object used for setting state - that will trigger the rendering of a select element to allow a choice between 2 different card variants\n * @param brandObjArr - array containing 2 card brands objects\n */\nexport default function createCardVariantSwitcher(brandObjArr: BrandObject[]) {\n    const [leadBrand, subBrand] = brandObjArr;\n\n    return {\n        dualBrandSelectElements: [\n            { id: leadBrand.brand, brandObject: leadBrand },\n            { id: subBrand.brand, brandObject: subBrand }\n        ] as DualBrandSelectElement[],\n        selectedBrandValue: leadBrand.brand, // set to leadBrand.brand if an initial selection is to be made; else set to empty string\n        leadBrand\n    };\n}\n","import { ErrorMessageObject, ValidatorRule, ValidatorMode } from './types';\n\n/**\n * Holds the result of a validation\n */\nexport class ValidationRuleResult {\n    private readonly shouldValidate: boolean;\n    public isValid: boolean;\n    public errorMessage: string | ErrorMessageObject;\n\n    constructor(rule: ValidatorRule, value: string, mode: ValidatorMode, context) {\n        this.shouldValidate = rule.modes.includes(mode);\n        this.isValid = rule.validate(value, context);\n        this.errorMessage = rule.errorMessage;\n    }\n\n    /**\n     * Whether the validation is considered an error.\n     * A field is only considered to be an error if the validation rule applies to the current mode i.e. 'blur' or 'input'.\n     * Also, if a validation function returns a null value e.g. when the field is empty, then the field will not be considered to be in error\n     * unless the whole form is being validated\n     */\n    hasError(isValidatingForm = false): boolean {\n        return isValidatingForm ? !this.isValid && this.shouldValidate : this.isValid != null && !this.isValid && this.shouldValidate;\n    }\n}\n","import { ValidatorRules, ValidatorRule, FieldContext, FieldData } from './types';\nimport { ValidationRuleResult } from './ValidationRuleResult';\n\nclass ValidationResult {\n    private validationResults: ValidationRuleResult[];\n\n    constructor(results: ValidationRuleResult[]) {\n        this.validationResults = results;\n    }\n\n    /** Checks if all validation rules have passed */\n    get isValid(): boolean {\n        return this.validationResults.reduce((acc, result) => acc && result.isValid, true);\n    }\n\n    /** Checks if any validation rule returned an error */\n    hasError(isValidatingForm = false): boolean {\n        return Boolean(this.getError(isValidatingForm));\n    }\n\n    /** Returns the first validation result that returned an error */\n    getError(isValidatingForm = false) {\n        return this.validationResults.find(result => result.hasError(isValidatingForm));\n    }\n\n    /** Returns all validation results that returned an error */\n    getAllErrors() {\n        return this.validationResults.filter(result => result.hasError());\n    }\n}\n\nclass Validator {\n    public rules: ValidatorRules = {\n        default: {\n            validate: () => true,\n            modes: ['blur', 'input']\n        }\n    };\n\n    constructor(rules) {\n        this.setRules(rules);\n    }\n\n    setRules(newRules) {\n        this.rules = {\n            ...this.rules,\n            ...newRules\n        };\n    }\n\n    /**\n     * Get all validation rules for a field\n     */\n    private getRulesFor(field: string): ValidatorRule[] {\n        let fieldRules: ValidatorRule | ValidatorRule[] = this.rules[field] ?? this.rules['default'];\n\n        if (!Array.isArray(fieldRules)) {\n            fieldRules = [fieldRules];\n        }\n\n        return fieldRules;\n    }\n\n    /**\n     * Validates a field\n     */\n    validate({ key, value, mode = 'blur' }: FieldData, context?: FieldContext) {\n        const fieldRules = this.getRulesFor(key);\n        // create an ValidationRuleResult, we run the actual validation inside of it\n        // validate is called in the constructor of ValidationRuleResult\n        // line rule.validate(value, context);\n        //\n        const validationRulesResult = fieldRules.map(rule => new ValidationRuleResult(rule, value, mode, context));\n\n        return new ValidationResult(validationRulesResult);\n    }\n}\n\nexport default Validator;\n","const omitKeys = (obj, omit) =>\n    Object.keys(obj)\n        .filter(k => !omit.includes(k))\n        .reduce((a, c) => {\n            a[c] = obj[c];\n            return a;\n        }, {});\n\nconst addKeys = (obj, add, initialValue, defaultData, pendingData) =>\n    add.reduce((a, c) => ({ ...a, [c]: a[c] ?? pendingData?.[c] ?? defaultData?.[c] ?? initialValue }), obj);\n\n/**\n * Processes default data and sets as default in state\n */\nexport function init({ schema, defaultData, processField, fieldProblems }) {\n    const getProcessedState = fieldKey => {\n        if (typeof defaultData[fieldKey] === 'undefined')\n            return { valid: false, errors: null, data: null, fieldProblems: fieldProblems?.[fieldKey] ?? null };\n\n        const [formattedValue, validationResult] = processField(\n            { key: fieldKey, value: defaultData[fieldKey], mode: 'blur' },\n            { state: { data: defaultData } }\n        );\n\n        return {\n            valid: (validationResult.isValid && !fieldProblems?.[fieldKey]) || false,\n            errors: validationResult.hasError() ? validationResult.getError() : null,\n            data: formattedValue,\n            fieldProblems: fieldProblems?.[fieldKey] ?? null\n        };\n    };\n\n    const formData = schema.reduce(\n        (acc: any, fieldKey) => {\n            const { valid, errors, data, fieldProblems } = getProcessedState(fieldKey);\n\n            return {\n                valid: { ...acc.valid, [fieldKey]: valid },\n                errors: { ...acc.errors, [fieldKey]: errors },\n                data: { ...acc.data, [fieldKey]: data },\n                fieldProblems: { ...acc.fieldProblems, [fieldKey]: fieldProblems }\n            };\n        },\n        { data: {}, valid: {}, errors: {}, fieldProblems: {} }\n    );\n\n    return {\n        schema,\n        data: formData.data,\n        valid: formData.valid,\n        errors: formData.errors,\n        fieldProblems: formData.fieldProblems\n    };\n}\n\nexport function getReducer(processField) {\n    return function reducer(state, { type, key, value, mode, schema, defaultData, formValue, selectedSchema, fieldProblems, data }) {\n        const validationSchema: string[] = selectedSchema || state.schema;\n\n        switch (type) {\n            case 'setData': {\n                return { ...state, data: { ...state['data'], [key]: value } };\n            }\n            case 'mergeData': {\n                return { ...state, data: { ...state['data'], ...data } };\n            }\n            case 'setValid': {\n                return { ...state, valid: { ...state['valid'], [key]: value } };\n            }\n            case 'setErrors': {\n                return { ...state, errors: { ...state['errors'], [key]: value } };\n            }\n            case 'setFieldProblems': {\n                return (\n                    state?.schema?.reduce(\n                        (acc, key) => ({\n                            ...acc,\n                            fieldProblems: { ...state['fieldProblems'], [key]: fieldProblems?.[key] ?? null },\n                            valid: { ...state['valid'], [key]: state['valid']?.[key] && !fieldProblems[key] }\n                        }),\n                        state\n                    ) ?? state\n                );\n            }\n            case 'updateField': {\n                const [formattedValue, validation] = processField({ key, value, mode }, { state });\n                const oldValue = state.data[key];\n                const fieldProblems = { ...state.fieldProblems };\n                if (oldValue !== formattedValue) {\n                    fieldProblems[key] = null;\n                }\n                return {\n                    ...state,\n                    data: { ...state['data'], [key]: formattedValue },\n                    errors: { ...state['errors'], [key]: validation.hasError() ? validation.getError() : null },\n                    valid: { ...state['valid'], [key]: (validation.isValid && !fieldProblems[key]) || false },\n                    fieldProblems\n                };\n            }\n            case 'mergeForm': {\n                // To provide a uniform result from forms even if there are multiple levels of nested forms are present\n                const mergedState = {\n                    ...state,\n                    data: { ...state['data'], ...formValue['data'] },\n                    errors: { ...state['errors'], ...formValue['errors'] },\n                    valid: { ...state['valid'], ...formValue['valid'] },\n                    fieldProblems: { ...state['fieldProblems'], ...formValue['fieldProblems'] }\n                };\n                if (mergedState['valid']) {\n                    mergedState.isValid = Object.values(mergedState.valid).every(isValid => isValid);\n                }\n                return mergedState;\n            }\n            case 'setSchema': {\n                const defaultState = init({ schema, defaultData, processField, fieldProblems });\n                const removedSchemaFields = state.schema.filter(x => !schema.includes(x));\n                const newSchemaFields = schema.filter(x => !state.schema.includes(x));\n\n                // if we remove a key from the schema we also lost the latest value of the field\n                // to prevent this we have to store the value in a local state so we can recover it when the key is re-added to the schema\n                const local = {\n                    data: omitKeys(state.data, newSchemaFields),\n                    errors: omitKeys(state.errors, newSchemaFields),\n                    valid: omitKeys(state.valid, newSchemaFields)\n                };\n\n                // reindex data and validation according to the new schema\n                const data = addKeys(omitKeys(state.data, removedSchemaFields), newSchemaFields, null, defaultState.data, state.local?.data);\n                const valid = addKeys(omitKeys(state.valid, removedSchemaFields), newSchemaFields, false, defaultState.valid, state.local?.valid);\n                const errors = addKeys(omitKeys(state.errors, removedSchemaFields), newSchemaFields, null, defaultState.errors, state.local?.errors);\n\n                return { ...state, schema, data, valid, errors, local };\n            }\n            case 'validateForm': {\n                const formValidation = validationSchema.reduce(\n                    (acc, cur) => {\n                        const [, validation] = processField({ key: cur, value: state.data[cur], mode: 'blur' }, { state });\n                        return {\n                            valid: { ...acc['valid'], [cur]: (validation.isValid && !state.fieldProblems[cur]) || false },\n                            errors: { ...acc['errors'], [cur]: validation.hasError(true) ? validation.getError(true) : null }\n                        };\n                    },\n                    { valid: state.valid, errors: state.errors }\n                );\n\n                return { ...state, valid: formValidation.valid, errors: formValidation.errors };\n            }\n            default:\n                throw new Error('Undefined useForm action');\n        }\n    };\n}\n","import { useCallback, useEffect, useMemo, useReducer } from 'preact/hooks';\nimport Validator from '../Validator';\nimport { getReducer, init } from './reducer';\nimport { Form, FormState, FormProps, Formatter } from './types';\n\nfunction isFormatterObject(formatter: Formatter | Function): formatter is Formatter {\n    return formatter && 'formatterFn' in formatter;\n}\n\nfunction useForm<FormSchema>(props: FormProps): Form<FormSchema> {\n    const { rules = {}, formatters = {}, defaultData = {}, fieldProblems = {}, schema = [] } = props;\n\n    const validator = useMemo(() => new Validator(rules), [rules]);\n\n    /** Formats and validates a field */\n    const processField = ({ key, value, mode }, fieldContext) => {\n        // Find a formatting function either stored under 'key' or a level deeper under a 'formatter' property\n        const formatter = formatters?.[key];\n        const formatterFn = isFormatterObject(formatter) ? formatter.formatterFn : formatter;\n        const formattedValue = formatterFn && typeof formatterFn === 'function' ? formatterFn(value ?? '', fieldContext) : value;\n\n        const validationResult = validator.validate({ key, value: formattedValue, mode }, fieldContext);\n        return [formattedValue, validationResult];\n    };\n\n    const [state, dispatch] = useReducer<FormState<FormSchema>, any, any>(\n        getReducer(processField),\n        { defaultData, schema: schema ?? [], processField, fieldProblems },\n        init\n    );\n    const isValid = useMemo(() => state.schema.reduce((acc, val) => acc && state.valid[val], true), [state.schema, state.valid]);\n\n    const getTargetValue = (key, e) => {\n        if (!e.target) return e;\n\n        if (e.target.type === 'checkbox') {\n            return !state.data[key];\n        }\n        return e.target.value;\n    };\n\n    /** Formats, validates, and stores a new value for a form field */\n    const handleChangeFor = (key, mode) => {\n        return e => {\n            const value = getTargetValue(key, e);\n            dispatch({ type: 'updateField', key, value, mode });\n        };\n    };\n\n    /** Validates every field in the form OR just those in selectedSchema */\n    const triggerValidation = useCallback((selectedSchema = null) => {\n        dispatch({ type: 'validateForm', selectedSchema });\n    }, []);\n\n    const setErrors = useCallback((key, value) => dispatch({ type: 'setErrors', key, value }), []);\n    const setValid = useCallback((key, value) => dispatch({ type: 'setValid', key, value }), []);\n    const setData = useCallback((key, value) => dispatch({ type: 'setData', key, value }), []);\n    const mergeData = useCallback(data => dispatch({ type: 'mergeData', data }), []);\n    const setSchema = useCallback(schema => dispatch({ type: 'setSchema', schema, defaultData }), [state.schema]);\n    const mergeForm = useCallback(formValue => dispatch({ type: 'mergeForm', formValue }), []);\n    const setFieldProblems = useCallback(fieldProblems => dispatch({ type: 'setFieldProblems', fieldProblems }), [state.schema]);\n\n    // Set reducer fields problems if fieldProblems prop changes\n    useEffect(() => {\n        setFieldProblems(fieldProblems ?? {});\n    }, [JSON.stringify(fieldProblems)]);\n\n    return {\n        handleChangeFor,\n        triggerValidation,\n        setSchema,\n        setData,\n        mergeData,\n        setValid,\n        setErrors,\n        isValid,\n        mergeForm,\n        setFieldProblems,\n        schema: state.schema,\n        valid: state.valid,\n        errors: state.errors,\n        data: state.data,\n        fieldProblems: state.fieldProblems\n    };\n}\n\nexport default useForm;\n","import {\n    ENCRYPTED_CARD_NUMBER,\n    ENCRYPTED_EXPIRY_DATE,\n    ENCRYPTED_SECURITY_CODE,\n    ENCRYPTED_PWD_FIELD\n} from '../../../internal/SecuredFields/lib/constants';\n\nconst TAX_NUMBER = 'taxNumber';\nconst HOLDER_NAME = 'holderName';\nconst SSN_FIELD = 'socialSecurityNumber';\n\nexport const CREDIT_CARD = [ENCRYPTED_CARD_NUMBER, ENCRYPTED_EXPIRY_DATE, ENCRYPTED_SECURITY_CODE];\n\nexport const CREDIT_CARD_NAME_TOP = [HOLDER_NAME, ENCRYPTED_CARD_NUMBER, ENCRYPTED_EXPIRY_DATE, ENCRYPTED_SECURITY_CODE];\n\nexport const CREDIT_CARD_NAME_BOTTOM = [ENCRYPTED_CARD_NUMBER, ENCRYPTED_EXPIRY_DATE, ENCRYPTED_SECURITY_CODE, HOLDER_NAME];\n\nconst KCP_FIELDS = [TAX_NUMBER, ENCRYPTED_PWD_FIELD];\nexport const KCP_CARD = CREDIT_CARD.concat(KCP_FIELDS);\nexport const KCP_CARD_NAME_TOP = CREDIT_CARD_NAME_TOP.concat(KCP_FIELDS);\nexport const KCP_CARD_NAME_BOTTOM = CREDIT_CARD_NAME_BOTTOM.concat(KCP_FIELDS);\n\nexport const SSN_CARD = CREDIT_CARD.concat([SSN_FIELD]);\nexport const SSN_CARD_NAME_TOP = CREDIT_CARD_NAME_TOP.concat([SSN_FIELD]);\nexport const SSN_CARD_NAME_BOTTOM = CREDIT_CARD_NAME_BOTTOM.concat([SSN_FIELD]);\n","import { AddressSpecifications } from './types';\n\nexport const FALLBACK_VALUE = 'N/A';\nexport const ADDRESS_SCHEMA = ['street', 'houseNumberOrName', 'postalCode', 'city', 'stateOrProvince', 'country'] as const;\nexport const [STREET, HOUSE_NUMBER_OR_NAME, POSTAL_CODE, CITY, STATE_OR_PROVINCE, COUNTRY] = ADDRESS_SCHEMA;\n// prettier-ignore\nexport const ADDRESS_SPECIFICATIONS: AddressSpecifications = {\n    AU: {\n        hasDataset: true,\n        labels: {\n            [HOUSE_NUMBER_OR_NAME]: 'apartmentSuite',\n            [STATE_OR_PROVINCE]: 'state',\n            [STREET]: 'address'\n        },\n        optionalFields: [HOUSE_NUMBER_OR_NAME],\n        placeholders: {\n            [STATE_OR_PROVINCE]: 'select.state'\n        },\n        schema: [COUNTRY, STREET, HOUSE_NUMBER_OR_NAME, CITY, [[STATE_OR_PROVINCE, 50], [POSTAL_CODE, 50]]]\n    },\n    BR: {\n        hasDataset: true,\n        labels: {\n            [STATE_OR_PROVINCE]: 'state'\n        },\n        placeholders: {\n            [STATE_OR_PROVINCE]: 'select.state'\n        },\n    },\n    CA: {\n        hasDataset: true,\n        labels: {\n            [HOUSE_NUMBER_OR_NAME]: 'apartmentSuite',\n            [STATE_OR_PROVINCE]: 'provinceOrTerritory',\n            [STREET]: 'address'\n        },\n        optionalFields: [HOUSE_NUMBER_OR_NAME],\n        schema: [COUNTRY, STREET, HOUSE_NUMBER_OR_NAME, [[CITY, 70], [POSTAL_CODE, 30]], STATE_OR_PROVINCE]\n    },\n    GB: {\n        labels: {\n            [CITY]: 'cityTown'\n        },\n        schema: [COUNTRY, [[HOUSE_NUMBER_OR_NAME, 30], [STREET, 70]], [[CITY, 70], [POSTAL_CODE, 30]], STATE_OR_PROVINCE]\n    },\n    US: {\n        hasDataset: true,\n        labels: {\n            [POSTAL_CODE]: 'zipCode',\n            [HOUSE_NUMBER_OR_NAME]: 'apartmentSuite',\n            [STATE_OR_PROVINCE]: 'state',\n            [STREET]: 'address'\n        },\n        optionalFields: [HOUSE_NUMBER_OR_NAME],\n        placeholders: {\n            [STATE_OR_PROVINCE]: 'select.state'\n        },\n        schema: [COUNTRY, STREET, HOUSE_NUMBER_OR_NAME, CITY, [[STATE_OR_PROVINCE, 50], [POSTAL_CODE, 50]]]\n    },\n    default: {\n        optionalFields: [],\n        placeholders: {\n            [STATE_OR_PROVINCE]: 'select.provinceOrTerritory'\n        },\n        schema: [COUNTRY, [[STREET, 70], [HOUSE_NUMBER_OR_NAME, 30]], [[POSTAL_CODE, 30], [CITY, 70]], STATE_OR_PROVINCE],\n    }\n};\n\nexport const PARTIAL_ADDRESS_SCHEMA: AddressSpecifications = {\n    default: {\n        labels: {\n            [POSTAL_CODE]: 'zipCode'\n        },\n        schema: [POSTAL_CODE]\n    }\n};\n\nexport const COUNTRIES_WITH_CUSTOM_SPECIFICATION = Object.keys(ADDRESS_SPECIFICATIONS);\n","import { h, toChildArray, createContext } from 'preact';\nimport { useContext, useEffect } from 'preact/hooks';\nimport { Resources } from './Resources';\nimport Language from '../../language';\nimport type { ComponentChildren } from 'preact';\n\ninterface CoreProviderProps {\n    loadingContext: string;\n    i18n: Language;\n    resources: Resources;\n    children: ComponentChildren;\n}\n\ntype ContextValue = {\n    i18n: Language;\n    loadingContext: string;\n    resources: Resources;\n};\n\nconst CoreContext = createContext<ContextValue | undefined>(undefined);\n\nconst CoreProvider = ({ i18n, loadingContext, resources, children }: CoreProviderProps) => {\n    useEffect(() => {\n        if (!i18n || !loadingContext || !resources) {\n            console.warn(\n                `CoreProvider - WARNING core provider is missing:${i18n ? '' : 'i18n'} ${loadingContext ? '' : 'loadingContext'} ${resources ? '' : 'resources'}`\n            );\n        }\n    }, [i18n, loadingContext, resources]);\n\n    return (\n        <CoreContext.Provider\n            value={{\n                i18n,\n                loadingContext,\n                resources\n            }}\n        >\n            {toChildArray(children)}\n        </CoreContext.Provider>\n    );\n};\n\nconst useCoreContext = (): ContextValue => {\n    const context = useContext(CoreContext);\n\n    if (context === undefined) {\n        throw new Error('\"useCoreContext\" must be used within a CoreProvider');\n    }\n\n    return context;\n};\n\nexport { CoreProvider, useCoreContext };\n","import { useCoreContext } from './CoreProvider';\nimport { useCallback } from 'preact/hooks';\nimport { GetImageFnType, ImageOptions } from './Resources';\n\nexport type UseImageHookType = (props: ImageOptions) => GetImageFnType;\nfunction useImage(): (props?: ImageOptions) => GetImageFnType {\n    const { resources } = useCoreContext();\n    return useCallback((props?: ImageOptions) => resources?.getImage(props), []);\n}\n\nexport default useImage;\n","import { ThreeDS2FlowObject } from './types';\n\nexport const THREEDS2_FINGERPRINT = 'threeDS2Fingerprint';\nexport const THREEDS2_FINGERPRINT_ERROR = '3DS2Fingerprint_Error';\nexport const THREEDS2_FINGERPRINT_SUBMIT = 'callSubmit3DS2Fingerprint_Response';\nexport const THREEDS2_CHALLENGE = 'threeDS2Challenge';\nexport const THREEDS2_CHALLENGE_ERROR = '3DS2Challenge_Error';\n\nexport const THREEDS2_ERROR = 'threeDS2Error';\nexport const THREEDS2_FULL = 'threeDS2';\nexport const THREEDS2_NUM = '3DS2';\n\nexport const MISSING_TOKEN_IN_ACTION_MSG = 'Missing \"token\" property from threeDS2 action';\n\nexport const DEFAULT_CHALLENGE_WINDOW_SIZE = '02';\n\nexport const THREEDS_METHOD_TIMEOUT = 10000;\nexport const CHALLENGE_TIMEOUT = 600000;\n\nexport const TIMEOUT = 'timeout';\n\nexport const CHALLENGE_TIMEOUT_REJECT_OBJECT: ThreeDS2FlowObject = {\n    result: {\n        transStatus: 'U'\n    },\n    type: 'challengeResult',\n    errorCode: TIMEOUT\n};\n\nexport const FAILED_METHOD_STATUS_RESOLVE_OBJECT: ThreeDS2FlowObject = {\n    result: {\n        threeDSCompInd: 'N'\n    },\n    type: 'fingerPrintResult'\n};\n\nexport const FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT: ThreeDS2FlowObject = {\n    result: {\n        threeDSCompInd: 'N'\n    },\n    type: 'fingerPrintResult',\n    errorCode: TIMEOUT\n};\n\n// Re. EMV 3-D Specification: EMVCo_3DS_Spec_210_1017.pdf\nexport const CHALLENGE_WINDOW_SIZES = {\n    '01': ['250px', '400px'],\n    '02': ['390px', '400px'],\n    '03': ['500px', '600px'],\n    '04': ['600px', '400px'],\n    '05': ['100%', '100%']\n};\n","export const isValidHttpUrl = (string, allowHttp = false) => {\n    let url;\n    try {\n        url = new URL(string);\n    } catch (_) {\n        return false;\n    }\n    return allowHttp ? url.protocol === 'http:' || url.protocol === 'https:' : url.protocol === 'https:';\n};\n","import { isValidHttpUrl } from '../../../../../utils/isValidURL';\nimport type { FastlaneSignupConfiguration } from '../../../../PayPalFastlane/types';\n\ntype ConfigurationKey = keyof FastlaneSignupConfiguration;\n\nconst VALID_KEYS: ConfigurationKey[] = [\n    'showConsent',\n    'defaultToggleState',\n    'termsAndConditionsLink',\n    'privacyPolicyLink',\n    'termsAndConditionsVersion',\n    'fastlaneSessionId'\n];\n\n/**\n * Verifies that Fastlane configuration for Card component is valid\n * - If the consent can be shown, then validate that all required fields are valid\n * - If the consent should not be shown, then validate the showConsent is valid boolean\n *\n * @param config\n */\nconst isConfigurationValid = (config: FastlaneSignupConfiguration): boolean => {\n    if (!config) {\n        return false;\n    }\n\n    Object.keys(config).forEach(\n        (key: keyof FastlaneSignupConfiguration) =>\n            !VALID_KEYS.includes(key) && console.warn(`Fastlane: '${key}' is not valid Fastlane config property`)\n    );\n\n    const { showConsent, defaultToggleState, termsAndConditionsLink, privacyPolicyLink, termsAndConditionsVersion } = config;\n\n    let isValid: boolean = false;\n\n    if (showConsent) {\n        isValid =\n            isValidHttpUrl(privacyPolicyLink) &&\n            isValidHttpUrl(termsAndConditionsLink) &&\n            typeof showConsent === 'boolean' &&\n            typeof defaultToggleState === 'boolean' &&\n            !!termsAndConditionsVersion;\n    } else {\n        isValid = typeof showConsent === 'boolean';\n    }\n\n    if (!isValid) {\n        console.warn('Fastlane: Component configuration is not valid. Fastlane will not be displayed');\n    }\n\n    return isValid;\n};\n\nexport { isConfigurationValid };\n","import Language from '../../../../language/Language';\nimport { AddressModeOptions, CardInputProps, LayoutObj } from './types';\nimport {\n    CREDIT_CARD,\n    CREDIT_CARD_NAME_BOTTOM,\n    CREDIT_CARD_NAME_TOP,\n    KCP_CARD,\n    KCP_CARD_NAME_BOTTOM,\n    KCP_CARD_NAME_TOP,\n    SSN_CARD,\n    SSN_CARD_NAME_BOTTOM,\n    SSN_CARD_NAME_TOP\n} from './layouts';\nimport { AddressSpecifications, StringObject } from '../../../internal/Address/types';\nimport { PARTIAL_ADDRESS_SCHEMA } from '../../../internal/Address/constants';\nimport { InstallmentsObj } from './components/Installments/Installments';\nimport { SFPProps } from '../../../internal/SecuredFields/SFP/types';\nimport { BRAND_READABLE_NAME_MAP, DEFAULT_CARD_GROUP_TYPES } from '../../../internal/SecuredFields/lib/constants';\nimport useImage, { UseImageHookType } from '../../../../core/Context/useImage';\nimport { SF_ErrorCodes } from '../../../../core/Errors/constants';\nimport { CardBrandsConfiguration, CardConfiguration, DualBrandSelectElement } from '../../types';\nimport { CardConfigData } from '../../../../core/Analytics/types';\nimport { DEFAULT_CHALLENGE_WINDOW_SIZE } from '../../../ThreeDS2/constants';\nimport CardInputDefaultProps from './defaultProps';\nimport { isConfigurationValid as isFastlaneComponentConfigValid } from '../Fastlane/utils/validate-configuration';\nimport { notFalsy } from '../../../../utils/commonUtils';\n\nexport const getCardImageUrl = (brand: string, getImage: UseImageHookType): string => {\n    const imageOptions = {\n        type: brand === 'card' ? 'nocard' : brand || 'nocard',\n        extension: 'svg'\n    };\n\n    return getImage(imageOptions)(brand);\n};\n\n/**\n * Verifies that installment object is valid to send to the Backend.\n * Valid means that it has 'revolving' plan set, or the number of installments is bigger than one\n */\nexport const hasValidInstallmentsObject = (installments?: InstallmentsObj) => {\n    return installments?.plan === 'revolving' || installments?.value > 1;\n};\n\nexport const getLayout = ({\n    props,\n    showKCP,\n    showBrazilianSSN,\n    countrySpecificSchemas = null,\n    billingAddressRequiredFields = null\n}: LayoutObj): string[] => {\n    let layout = CREDIT_CARD;\n    const hasRequiredHolderName = props.hasHolderName && props.holderNameRequired;\n\n    if (hasRequiredHolderName) {\n        layout = props.positionHolderNameOnTop ? CREDIT_CARD_NAME_TOP : CREDIT_CARD_NAME_BOTTOM;\n    }\n\n    if (showKCP) {\n        layout = KCP_CARD;\n        if (hasRequiredHolderName) {\n            layout = props.positionHolderNameOnTop ? KCP_CARD_NAME_TOP : KCP_CARD_NAME_BOTTOM;\n        }\n    }\n\n    if (showBrazilianSSN) {\n        layout = SSN_CARD;\n        if (hasRequiredHolderName) {\n            layout = props.positionHolderNameOnTop ? SSN_CARD_NAME_TOP : SSN_CARD_NAME_BOTTOM;\n        }\n    }\n\n    // w. Billing address\n    if (countrySpecificSchemas) {\n        // Flatten array and remove any numbers that describe how fields should be aligned\n        const countrySpecificSchemasFlat: string[] = countrySpecificSchemas['flat'](2).filter(item => typeof item !== 'number') as string[];\n\n        let countryBasedAddressLayout = countrySpecificSchemasFlat;\n\n        if (billingAddressRequiredFields) {\n            // Get intersection of the 2 arrays\n            countryBasedAddressLayout = countrySpecificSchemasFlat.filter(x => billingAddressRequiredFields.includes(x));\n        }\n\n        layout = CREDIT_CARD.concat(countryBasedAddressLayout);\n        if (hasRequiredHolderName) {\n            layout = props.positionHolderNameOnTop\n                ? CREDIT_CARD_NAME_TOP.concat(countryBasedAddressLayout)\n                : CREDIT_CARD_NAME_BOTTOM.concat(countryBasedAddressLayout);\n        }\n        // TODO we are not yet creating a layout for AVS + SSN field (w. or w/o holderName) - is AVS + SSN a real world scenario?\n    }\n    return layout;\n};\n\n/**\n * Lookup service to map local (CardInput) field refs to a key, possibly region specific, by which to retrieve the translation\n */\nexport const mapFieldKey = (key: string, i18n: Language, countrySpecificLabels: StringObject): string => {\n    // console.log('### utils::mapFieldKey:: key', key);\n    switch (key) {\n        case 'socialSecurityNumber':\n            return i18n.get(`boleto.${key}`);\n        // Address related - if we have a country specific key for the field - use that to get the translation\n        case 'street':\n        case 'houseNumberOrName':\n        case 'postalCode':\n        case 'stateOrProvince':\n        case 'city':\n        case 'country':\n            return countrySpecificLabels?.[key] ? i18n.get(countrySpecificLabels?.[key]) : i18n.get(key);\n        // We know that the translated error messages do contain a reference to the field they refer to, so we won't need to map them (currently applies mostly to SecuredFields related errors)\n        default:\n            return null;\n    }\n};\n\nexport const extractPropsForCardFields = (props: CardInputProps) => {\n    return {\n        // Extract props for CardFieldsWrapper & StoredCardFieldsWrapper(just needs amount, hasCVC, installmentOptions)\n        amount: props.amount,\n        billingAddressRequired: props.billingAddressRequired,\n        billingAddressRequiredFields: props.billingAddressRequiredFields,\n        billingAddressAllowedCountries: props.billingAddressAllowedCountries,\n        brandsConfiguration: props.brandsConfiguration,\n        showStoreDetailsCheckbox: props.showStoreDetailsCheckbox,\n        hasCVC: props.hasCVC,\n        hasHolderName: props.hasHolderName,\n        holderNameRequired: props.holderNameRequired,\n        installmentOptions: props.installmentOptions,\n        placeholders: props.placeholders,\n        positionHolderNameOnTop: props.positionHolderNameOnTop,\n        // Extract props for CardFields > CardNumber\n        showBrandIcon: props.showBrandIcon,\n        showContextualElement: props.showContextualElement,\n        // Extract props for StoredCardFields\n        lastFour: props.lastFour,\n        expiryMonth: props.expiryMonth,\n        expiryYear: props.expiryYear,\n        disclaimerMessage: props.disclaimerMessage\n    };\n};\n\nexport const extractPropsForSFP = (props: CardInputProps) => {\n    return {\n        autoFocus: props.autoFocus,\n        brands: props.brands,\n        brandsConfiguration: props.brandsConfiguration,\n        clientKey: props.clientKey,\n        countryCode: props.countryCode,\n        forceCompat: props.forceCompat,\n        i18n: props.i18n,\n        implementationType: props.implementationType,\n        keypadFix: props.keypadFix,\n        legacyInputMode: props.legacyInputMode,\n        loadingContext: props.loadingContext,\n        maskSecurityCode: props.maskSecurityCode,\n        exposeExpiryDate: props.exposeExpiryDate,\n        minimumExpiryDate: props.minimumExpiryDate,\n        onAdditionalSFConfig: props.onAdditionalSFConfig,\n        onAdditionalSFRemoved: props.onAdditionalSFRemoved,\n        onAllValid: props.onAllValid,\n        onAutoComplete: props.onAutoComplete,\n        onBinValue: props.onBinValue,\n        onConfigSuccess: props.onConfigSuccess,\n        handleKeyPress: props.handleKeyPress,\n        onError: props.onError,\n        onFieldValid: props.onFieldValid,\n        onLoad: props.onLoad,\n        placeholders: props.placeholders,\n        resources: props.resources,\n        showContextualElement: props.showContextualElement,\n        showWarnings: props.showWarnings,\n        trimTrailingSeparator: props.trimTrailingSeparator\n    } as SFPProps; // Can't set as return type on fn or it will complain about missing, mandatory, props\n};\n\nexport const handlePartialAddressMode = (addressMode: AddressModeOptions): AddressSpecifications | null => {\n    return addressMode == AddressModeOptions.partial ? PARTIAL_ADDRESS_SCHEMA : null;\n};\n\n// Almost all errors are blur based, but some SF ones are not i.e. when an unsupported card is entered or the expiry date is out of range\nexport function lookupBlurBasedErrors(errorCode) {\n    // If it's NOT one of these, then it's a blur based error\n    return ![\n        SF_ErrorCodes.ERROR_MSG_UNSUPPORTED_CARD_ENTERED,\n        SF_ErrorCodes.ERROR_MSG_CARD_TOO_OLD,\n        SF_ErrorCodes.ERROR_MSG_CARD_TOO_FAR_IN_FUTURE,\n        SF_ErrorCodes.ERROR_MSG_CARD_EXPIRES_TOO_SOON\n    ].includes(errorCode);\n}\n\nexport function getFullBrandName(brand) {\n    return BRAND_READABLE_NAME_MAP[brand] ?? brand;\n}\n\nexport const getCardConfigData = (cardProps: CardConfiguration): CardConfigData => {\n    const MAX_LENGTH = 128;\n\n    // Extract props from cardProps - mostly setting a default value, if prop not found\n    const {\n        autoFocus,\n        billingAddressAllowedCountries,\n        billingAddressMode,\n        billingAddressRequired,\n        billingAddressRequiredFields,\n        brands = DEFAULT_CARD_GROUP_TYPES,\n        brandsConfiguration,\n        challengeWindowSize = DEFAULT_CHALLENGE_WINDOW_SIZE,\n        configuration,\n        countryCode,\n        data,\n        disclaimerMessage,\n        disableIOSArrowKeys,\n        doBinLookup,\n        enableStoreDetails,\n        exposeExpiryDate,\n        fastlaneConfiguration,\n        forceCompat,\n        hasHolderName,\n        hideCVC,\n        holderNameRequired,\n        installmentOptions,\n        keypadFix,\n        legacyInputMode,\n        maskSecurityCode,\n        minimumExpiryDate,\n        name, // = 'none',\n        placeholders,\n        positionHolderNameOnTop,\n        showBrandIcon,\n        showInstallmentAmounts,\n        showPayButton = false, // hard coded default\n        styles,\n        onAllValid,\n        onBinLookup,\n        onBinValue,\n        onBlur,\n        onBrand,\n        onConfigSuccess,\n        onEnterKeyPressed,\n        onFieldValid,\n        onFocus,\n        onLoad\n    } = cardProps;\n\n    const dataString = JSON.stringify(CardInputDefaultProps.data);\n\n    const srPanelEnabled = cardProps.modules?.srPanel?.enabled;\n    const srPanelMoveFocus = cardProps.modules?.srPanel?.moveFocus;\n\n    const riskEnabled = cardProps.modules?.risk?.enabled;\n\n    const isFastlaneConfigValid = isFastlaneComponentConfigValid(fastlaneConfiguration);\n\n    const billingAddressModeValue = cardProps.onAddressLookup ? 'lookup' : billingAddressMode;\n\n    let showKCPType: 'none' | 'auto' | 'atStart' = 'none';\n    if (configuration?.koreanAuthenticationRequired === true) {\n        showKCPType = countryCode?.toLowerCase() === 'kr' ? 'atStart' : 'auto';\n    }\n\n    const configData: CardConfigData = {\n        autoFocus,\n        ...(billingAddressAllowedCountries?.length > 0 && {\n            billingAddressAllowedCountries: billingAddressAllowedCountries.toString().substring(0, MAX_LENGTH)\n        }),\n        billingAddressMode: billingAddressModeValue,\n        billingAddressRequired,\n        billingAddressRequiredFields: billingAddressRequiredFields?.toString()?.substring(0, MAX_LENGTH),\n        // Probably just for development - in real life we wouldn't expect the number of supported brands to push the endpoint limit on 128 chars\n        brands: brands?.toString()?.substring(0, MAX_LENGTH),\n        challengeWindowSize,\n        disableIOSArrowKeys,\n        doBinLookup,\n        enableStoreDetails,\n        exposeExpiryDate,\n        forceCompat,\n        hasBrandsConfiguration: notFalsy(brandsConfiguration),\n        hasData: data && JSON.stringify(cardProps.data) !== dataString,\n        hasDisclaimerMessage: !!disclaimerMessage,\n        hasHolderName,\n        hasInstallmentOptions: notFalsy(installmentOptions),\n        hasPlaceholders: notFalsy(placeholders), // has merchant defined placeholders\n        hasStylesConfigured: notFalsy(styles),\n        hideCVC,\n        holderNameRequired,\n        keypadFix,\n        legacyInputMode,\n        maskSecurityCode,\n        minimumExpiryDate: !!minimumExpiryDate, // Potentially, in the future, we can send the actual string value\n        name,\n        positionHolderNameOnTop,\n        riskEnabled,\n        showBrandIcon,\n        showInstallmentAmounts: !!showInstallmentAmounts,\n        showKCPType,\n        showPayButton,\n        socialSecurityNumberMode: configuration?.socialSecurityNumberMode,\n        srPanelEnabled,\n        srPanelMoveFocus,\n        /** callbacks */\n        // We need to detect if the merchant themselves has defined these, not if we've set them as a default\n        hasOnAllValid: onAllValid !== CardInputDefaultProps.onAllValid,\n        hasOnBinValue: onBinValue !== CardInputDefaultProps.onBinValue,\n        hasOnBlur: onBlur !== CardInputDefaultProps.onBlur,\n        hasOnBrand: onBrand !== CardInputDefaultProps.onBrand,\n        hasOnConfigSuccess: onConfigSuccess !== CardInputDefaultProps.onConfigSuccess,\n        hasOnFieldValid: onFieldValid !== CardInputDefaultProps.onFieldValid,\n        hasOnFocus: onFocus !== CardInputDefaultProps.onFocus,\n        hasOnLoad: onLoad !== CardInputDefaultProps.onLoad,\n        // Card level props\n        hasOnBinLookup: !!onBinLookup,\n        hasOnEnterKeyPressed: !!onEnterKeyPressed,\n        /**\n         * Fastlane\n         */\n        ...(isFastlaneConfigValid && {\n            hasFastlaneConfigured: true,\n            isFastlaneConsentDefaultOn: fastlaneConfiguration.defaultToggleState\n        })\n    };\n\n    return configData;\n};\n\nexport const mapDualBrandButtons = (dualBrandSelectElements: DualBrandSelectElement[], brandsConfiguration: CardBrandsConfiguration): any => {\n    return dualBrandSelectElements.map(item => {\n        const brand = item.id;\n        const getImage = useImage();\n        const imageName = brand === 'card' ? 'nocard' : brand;\n        const imageURL = brandsConfiguration[brand]?.icon ?? getCardImageUrl(imageName, getImage);\n\n        // TODO - check below if we have to still generate altName through the mapping function or whether it just\n        //  corresponds to item.brandObject.localeBrand\n        return {\n            id: item.id,\n            name: item.brandObject.localeBrand || item.brandObject.brand,\n            imageURL,\n            altName: getFullBrandName(brand)\n        };\n    });\n};\n","import { AddressSchema, AddressSpecifications, StringObject } from './types';\nimport { ADDRESS_SPECIFICATIONS } from './constants';\nimport { AddressField } from '../../../types/global-types';\n\nconst SCHEMA_MAX_DEPTH = 2;\n\nclass Specifications {\n    private specifications: AddressSpecifications;\n\n    constructor(specifications?) {\n        this.specifications = { ...ADDRESS_SPECIFICATIONS, ...specifications };\n    }\n\n    /**\n     * Checks if a certain country has a dataset.\n     * @param country - The selected country\n     * @returns Boolean\n     */\n    countryHasDataset(country: string): boolean {\n        return !!this.specifications?.[country]?.hasDataset;\n    }\n\n    /**\n     * Checks if a certain country has the passed field in their optional fields array.\n     * @param country - The selected country\n     * @param fieldName - The field to be checked\n     * @returns Boolean\n     */\n    countryHasOptionalField(country: string, fieldName: string): boolean {\n        return !!this.specifications?.[country]?.optionalFields?.includes(fieldName as any);\n    }\n\n    /**\n     * Returns the address schema of the selected country or the default address schema.\n     * @param country - The selected country\n     * @returns AddressSchema\n     */\n    getAddressSchemaForCountry(country: string): AddressSchema {\n        return this.specifications?.[country]?.schema || this.specifications.default.schema;\n    }\n\n    /**\n     * Returns the address labels of the selected country or the default address labels.\n     * @param country - The selected country\n     * @returns StringObject\n     */\n    getAddressLabelsForCountry(country: string): StringObject {\n        return this.specifications?.[country]?.labels || this.specifications.default.labels;\n    }\n\n    /**\n     * Returns the optional fields of the selected country or the default optional fields.\n     * @param country - The selected country\n     * @returns Optional fields array\n     */\n    getOptionalFieldsForCountry(country: string): string[] {\n        return this.specifications?.[country]?.optionalFields || this.specifications.default?.optionalFields || [];\n    }\n\n    /**\n     * Returns the key for a field of the passed country or the default key for that field.\n     * @param fieldName - The field to be searched\n     * @param country - The selected country\n     */\n    getKeyForField(fieldName: string, country: string): string {\n        return this.specifications?.[country]?.labels?.[fieldName] || this.specifications?.default?.labels?.[fieldName] || fieldName;\n    }\n\n    /**\n     * Returns the placeholder key for a field of the passed country or the default key for that field.\n     * @param fieldName - The field to be searched\n     * @param country - The selected country\n     */\n    getPlaceholderKeyForField(fieldName: string, country: string): string {\n        return this.specifications?.[country]?.placeholders?.[fieldName] || this.specifications?.default?.placeholders?.[fieldName];\n    }\n\n    /**\n     * Returns an array with the address schema of the selected country or the default address schema\n     * Flat version of getAddressSchemaForCountry\n     * @param country - The selected country\n     * @returns Array\n     */\n    getAddressSchemaForCountryFlat(country: string): AddressField[] {\n        return this.getAddressSchemaForCountry(country)\n            .flat(SCHEMA_MAX_DEPTH)\n            .filter((element): element is AddressField => typeof element === 'string');\n    }\n}\n\nexport default Specifications;\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import { h } from 'preact';\nimport './Spinner.scss';\n\ninterface SpinnerProps {\n    /**\n     * Whether the spinner should be rendered inline\n     */\n    inline?: boolean;\n\n    /**\n     * size of the spinner (small/medium/large)\n     */\n    size?: string;\n}\n\n/**\n * Default Loading Spinner\n * @param props -\n */\nconst Spinner = ({ inline = false, size = 'large' }: SpinnerProps) => (\n    <div data-testid=\"spinner\" className={`adyen-checkout__spinner__wrapper ${inline ? 'adyen-checkout__spinner__wrapper--inline' : ''}`}>\n        <div className={`adyen-checkout__spinner adyen-checkout__spinner--${size}`} />\n    </div>\n);\n\nexport default Spinner;\n","import { ComponentChildren, h } from 'preact';\nimport classNames from 'classnames';\nimport Spinner from '../../internal/Spinner';\nimport './LoadingWrapper.scss';\n\ninterface LoadingWrapperProps {\n    status?: string;\n    children?: ComponentChildren;\n}\n\nconst LoadingWrapper = ({ children, status }: LoadingWrapperProps) => {\n    const wrapperClass = classNames('adyen-checkout__loading-input__form', 'loading-input__form', {\n        'loading-input__form--loading': status === 'loading'\n    });\n\n    const spinnerClass = classNames({\n        'loading-input__spinner': true,\n        'loading-input__spinner--active': status === 'loading'\n    });\n\n    return (\n        <div style={{ position: 'relative' }}>\n            <div className={spinnerClass}>\n                <Spinner />\n            </div>\n            <div className={wrapperClass}>{children}</div>\n        </div>\n    );\n};\n\nexport default LoadingWrapper;\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport { CVCHintProps } from './types';\n\nexport default function CVCHint({ frontCVC = false, fieldLabel, onClick }: CVCHintProps) {\n    const hintClassnames = classNames({\n        'adyen-checkout__card__cvc__hint__wrapper': true,\n        'adyen-checkout__field__cvc--front-hint': !!frontCVC,\n        'adyen-checkout__field__cvc--back-hint': !frontCVC\n    });\n\n    return (\n        // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n        <span className={hintClassnames} onClick={onClick}>\n            <svg\n                className={'adyen-checkout__card__cvc__hint adyen-checkout__card__cvc__hint--front'}\n                width=\"27\"\n                height=\"18\"\n                viewBox=\"0 0 27 18\"\n                fill=\"none\"\n                xmlns=\"http://www.w3.org/2000/svg\"\n                aria-hidden={!frontCVC}\n                role={'img'}\n            >\n                <title id={'adyen-checkout__cvc__front-hint-img'}>{fieldLabel}</title>\n                <path\n                    d=\"M0 3C0 1.34315 1.34315 0 3 0H24C25.6569 0 27 1.34315 27 3V15C27 16.6569 25.6569 18 24 18H3C1.34315 18 0 16.6569 0 15V3Z\"\n                    fill=\"#E6E9EB\"\n                />\n                <rect x=\"4\" y=\"12\" width=\"19\" height=\"2\" fill=\"#B9C4C9\" />\n                <rect x=\"4\" y=\"4\" width=\"4\" height=\"4\" rx=\"1\" fill=\"white\" />\n                <rect className={'adyen-checkout__card__cvc__hint__location'} x=\"16.5\" y=\"4.5\" width=\"7\" height=\"5\" rx=\"2.5\" stroke=\"#C12424\" />\n            </svg>\n\n            <svg\n                className={'adyen-checkout__card__cvc__hint adyen-checkout__card__cvc__hint--back'}\n                width=\"27\"\n                height=\"18\"\n                viewBox=\"0 0 27 18\"\n                fill=\"none\"\n                xmlns=\"http://www.w3.org/2000/svg\"\n                aria-hidden={!!frontCVC}\n                role={'img'}\n            >\n                <title id={'adyen-checkout__cvc__back-hint-img'}>{fieldLabel}</title>\n                <path\n                    d=\"M27 4.00001V3.37501C27 2.4799 26.6444 1.62146 26.0115 0.988518C25.3786 0.355581 24.5201 0 23.625 0H3.375C2.47989 0 1.62145 0.355581 0.988514 0.988518C0.355579 1.62146 0 2.4799 0 3.37501V4.00001H27Z\"\n                    fill=\"#E6E9EB\"\n                />\n                <path\n                    d=\"M0 6.99994V14.6666C0 15.5507 0.355579 16.3985 0.988514 17.0237C1.62145 17.6488 2.47989 18 3.375 18H23.625C24.5201 18 25.3786 17.6488 26.0115 17.0237C26.6444 16.3985 27 15.5507 27 14.6666V6.99994H0Z\"\n                    fill=\"#E6E9EB\"\n                />\n                <rect y=\"4.00012\" width=\"27\" height=\"3.00001\" fill=\"#687282\" />\n                <path\n                    d=\"M4 11C4 10.4477 4.44772 10 5 10H21C22.1046 10 23 10.8954 23 12C23 13.1046 22.1046 14 21 14H5C4.44771 14 4 13.5523 4 13V11Z\"\n                    fill=\"white\"\n                />\n                <rect className={'adyen-checkout__card__cvc__hint__location'} x=\"16.5\" y=\"9.5\" width=\"7\" height=\"5\" rx=\"2.5\" stroke=\"#C12424\" />\n            </svg>\n        </span>\n    );\n}\n","import { h } from 'preact';\nimport cx from 'classnames';\nimport useImage from '../../../core/Context/useImage';\n\ninterface IconProps {\n    type: string;\n    className?: string;\n    alt?: string;\n    height?: number;\n    width?: number;\n}\n\nconst Icon = ({ type, className = '', alt = '', height, width }: IconProps) => {\n    const getImage = useImage();\n    const iconUrl = getImage({ imageFolder: 'components/' })?.(type);\n\n    return <img className={cx('adyen-checkout__icon', className)} alt={alt} src={iconUrl} height={height} width={width} />;\n};\n\nexport default Icon;\n","let idCounter = Date.now();\n\nexport const getUniqueId = (prefix = 'field') => {\n    idCounter += 1;\n    return `${prefix}-${idCounter}`;\n};\n","export const PREFIX = 'bento_';\n","/* eslint-disable */\nexport default function uuidv4(): string {\n    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {\n        let r = (Math.random() * 16) | 0,\n            v = c == 'x' ? r : (r & 0x3) | 0x8;\n        return v.toString(16);\n    });\n}\n/* eslint-enable */\n","import classNames from 'classnames';\nimport { cloneElement, ComponentChild, Fragment, FunctionalComponent, h, toChildArray, VNode } from 'preact';\nimport Spinner from '../../Spinner';\nimport Icon from '../../Icon';\nimport { ARIA_CONTEXT_SUFFIX, ARIA_ERROR_SUFFIX } from '../../../../core/Errors/constants';\nimport { useCallback, useMemo, useRef, useState } from 'preact/hooks';\nimport { getUniqueId } from '../../../../utils/idGenerator';\nimport { FieldProps } from './types';\nimport './Field.scss';\nimport { PREFIX } from '../../Icon/constants';\nimport uuid from '../../../../utils/uuid';\n\nconst Field: FunctionalComponent<FieldProps> = props => {\n    const {\n        children,\n        className,\n        classNameModifiers,\n        dir,\n        disabled,\n        readOnly,\n        errorMessage,\n        helper,\n        inputWrapperModifiers,\n        isLoading,\n        isValid,\n        label,\n        labelEndAdornment,\n        name,\n        onBlur,\n        onFieldBlur,\n        onFocus,\n        // onFocusField is a securedField related function that allows a label click to set focus on a securedField (equates to CardInput setFocusOn)\n        // TODO should rename it to make its purpose clear => setFocusOnSecuredField\n        onFocusField,\n        showValidIcon,\n        useLabelElement,\n        showErrorElement,\n        showContextualElement,\n        staticValue,\n        contextualText,\n        // Redeclare prop names to avoid internal clashes\n        filled: propsFilled,\n        focused: propsFocused,\n        i18n,\n        contextVisibleToScreenReader,\n        renderAlternativeToLabel,\n        onInputContainerClick\n    } = props;\n\n    // Controls whether any error element has an aria-hidden=\"true\" attr (which means it is the error for a securedField)\n    // or whether it has an id attr that can be pointed to by an aria-describedby attr on an input element\n    const contextVisibleToSR = contextVisibleToScreenReader ?? true;\n    const showError = showErrorElement && typeof errorMessage === 'string' && errorMessage.length > 0;\n    const showContext = showContextualElement && !showError && contextualText?.length > 0;\n\n    const uniqueId = useRef(getUniqueId(`adyen-checkout-${name}`));\n    const staticValueId = useMemo(() => (staticValue ? `input-static-value-${uuid()}` : null), [staticValue]);\n\n    const [focused, setFocused] = useState(false);\n    const [filled, setFilled] = useState(false);\n\n    // The means by which focussed/filled is set for securedFields\n    if (propsFocused != null) setFocused(!!propsFocused);\n    if (propsFilled != null) setFilled(!!propsFilled);\n\n    // The means by which focussed/filled is set for other fields - this function is passed down to them and triggered\n    const onFocusHandler = useCallback(\n        (event: h.JSX.TargetedEvent<HTMLInputElement>) => {\n            setFocused(true);\n            onFocus?.(event);\n        },\n        [onFocus]\n    );\n\n    const onBlurHandler = useCallback(\n        (event: h.JSX.TargetedEvent<HTMLInputElement>) => {\n            setFocused(false);\n            onBlur?.(event);\n            // When we also need to fire a specific function when a field blurs // TODO - what is the use case?\n            onFieldBlur?.(event);\n        },\n        [onBlur, onFieldBlur]\n    );\n\n    const renderLabelOrAlternativeContents = useCallback(() => {\n        return (\n            <Fragment>\n                {typeof label === 'string' && (\n                    <span\n                        className={classNames({\n                            'adyen-checkout__label__text': true,\n                            'adyen-checkout__label__text--error': errorMessage\n                        })}\n                        data-id={name}\n                    >\n                        {label}\n                    </span>\n                )}\n\n                {/*TODO - in what scenario is label a function? */}\n                {/*@ts-ignore - function is callable*/}\n                {typeof label === 'function' && label()}\n\n                {labelEndAdornment && <span className=\"adyen-checkout__label-adornment--end\">{labelEndAdornment}</span>}\n\n                {helper && <span className={'adyen-checkout__helper-text'}>{helper}</span>}\n            </Fragment>\n        );\n    }, [label, errorMessage, labelEndAdornment, helper]);\n\n    const renderInputRelatedElements = useCallback(() => {\n        const errorElem = (\n            <span\n                className={classNames({ 'adyen-checkout-contextual-text--error': true, 'adyen-checkout-contextual-text--hidden': !showError })}\n                {...(contextVisibleToSR && { id: `${uniqueId.current}${ARIA_ERROR_SUFFIX}` })}\n                aria-hidden={contextVisibleToSR ? null : 'true'}\n            >\n                {errorMessage}\n            </span>\n        );\n        const contextualElem = (\n            <span\n                className={classNames({ 'adyen-checkout-contextual-text': true, 'adyen-checkout-contextual-text--hidden': !showContext })}\n                {...(contextVisibleToSR && { id: `${uniqueId.current}${ARIA_CONTEXT_SUFFIX}` })}\n                aria-hidden={contextVisibleToSR ? null : 'true'}\n            >\n                {contextualText}\n            </span>\n        );\n\n        return (\n            <Fragment>\n                {/* The <div> element has a child <input> element that allows keyboard interaction */}\n                {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}\n                <div\n                    className={classNames([\n                        'adyen-checkout__input-wrapper',\n                        ...inputWrapperModifiers.map(m => `adyen-checkout__input-wrapper--${m}`)\n                    ])}\n                    dir={dir}\n                    onClick={onInputContainerClick}\n                >\n                    {staticValue && (\n                        <span id={staticValueId} className=\"adyen-checkout__field-static-value\">\n                            {staticValue}\n                        </span>\n                    )}\n\n                    {toChildArray(children).map((child: ComponentChild): ComponentChild => {\n                        const propsFromFieldComponent = {\n                            isValid,\n                            onFocusHandler,\n                            onBlurHandler,\n                            isInvalid: !!errorMessage,\n                            'aria-owns': staticValueId,\n                            ...(name && { uniqueId: uniqueId.current }),\n                            showErrorElement: showErrorElement\n                        };\n\n                        return cloneElement(child as VNode, propsFromFieldComponent);\n                    })}\n\n                    {isLoading && (\n                        <span className=\"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--loading\">\n                            <Spinner size=\"small\" />\n                        </span>\n                    )}\n\n                    {isValid && showValidIcon !== false && (\n                        <span className=\"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--valid\">\n                            <Icon type={`${PREFIX}checkmark`} alt={i18n?.get('field.valid')} />\n                        </span>\n                    )}\n\n                    {errorMessage && (\n                        <span className=\"adyen-checkout-input__inline-validation adyen-checkout-input__inline-validation--invalid\">\n                            <Icon type={`${PREFIX}field_error`} alt={i18n?.get('error.title')} />\n                        </span>\n                    )}\n                </div>\n                {errorElem}\n                {contextualElem}\n            </Fragment>\n        );\n    }, [children, errorMessage, contextualText, isLoading, isValid, onFocusHandler, onBlurHandler]);\n\n    /**\n     * Use cases:\n     * - Not all form controls want/need a label e.g. many checkboxes describe what they are in their own markup and don't need the wrapping Field to also generate a labelling element\n     * - securedFields *can't* have a label (screen-reader's can make the association, over different browser contexts, between the label and the input)\n     */\n    const LabelOrAlternative = useCallback(\n        ({ onFocusField, focused, filled, disabled, name, uniqueId, useLabelElement, isSecuredField, children, renderAlternativeToLabel }) => {\n            const defaultWrapperProps = {\n                onClick: onFocusField,\n                className: classNames({\n                    'adyen-checkout__label': true,\n                    'adyen-checkout__label--focused': focused,\n                    'adyen-checkout__label--filled': filled,\n                    'adyen-checkout__label--disabled': disabled\n                })\n            };\n\n            return useLabelElement ? (\n                // if we are NOT dealing with the label for a securedField... we can give it a `for` attribute\n                <label {...defaultWrapperProps} {...(!isSecuredField && name && { htmlFor: uniqueId })}>\n                    {children}\n                </label>\n            ) : (\n                renderAlternativeToLabel(defaultWrapperProps, children, uniqueId) // defaults to null\n\n                // Example usage:\n                // const alternativeLabelContent = (defaultWrapperProps, children, uniqueId) => {\n                //     return (\n                //         <div {...defaultWrapperProps} role={'label'} htmlFor={uniqueId}>\n                //             {children}\n                //         </div>\n                //     );\n                // };\n                // <Field name={'myField'} useLabelElement={false} renderAlternativeToLabel={alternativeLabelContent}>\n            );\n        },\n        []\n    );\n\n    /**\n     * RENDER\n     */\n    return (\n        <div\n            className={classNames(\n                'adyen-checkout__field',\n                className,\n                classNameModifiers.map(m => `adyen-checkout__field--${m}`),\n                {\n                    'adyen-checkout__field--error': errorMessage,\n                    'adyen-checkout__field--valid': isValid,\n                    'adyen-checkout__field--inactive': readOnly || disabled\n                }\n            )}\n        >\n            <LabelOrAlternative\n                onFocusField={onFocusField}\n                name={name}\n                disabled={disabled}\n                filled={filled}\n                focused={focused}\n                useLabelElement={useLabelElement}\n                uniqueId={uniqueId.current}\n                isSecuredField={!contextVisibleToSR}\n                renderAlternativeToLabel={renderAlternativeToLabel}\n            >\n                {renderLabelOrAlternativeContents()}\n            </LabelOrAlternative>\n            {renderInputRelatedElements()}\n        </div>\n    );\n};\n\nField.defaultProps = {\n    className: '',\n    classNameModifiers: [],\n    inputWrapperModifiers: [],\n    useLabelElement: true,\n    showErrorElement: true,\n    showContextualElement: true,\n    renderAlternativeToLabel: () => null\n};\n\nexport default Field;\n","import { h } from 'preact';\nimport { DATA_ENCRYPTED_FIELD_ATTR, DATA_INFO, DATA_UID } from '../../../../internal/SecuredFields/lib/constants';\nimport { SfSpanProps } from './types';\n\n/**\n * Extract the relevant props and write them as attributes to the span that will contain the securedFields iframe\n * Specifically exists to make the uniqueId created by the Field comp accessible to the SFP via a data-uid attr\n */\nexport default function DataSfSpan(props: SfSpanProps) {\n    const opts = {\n        [DATA_ENCRYPTED_FIELD_ATTR]: props.encryptedFieldType,\n        [DATA_INFO]: props['data-info'],\n        [DATA_UID]: props.uniqueId,\n        className: props.className\n    };\n    return <span {...opts}>{props.children}</span>;\n}\n","import { h } from 'preact';\n\nexport const alternativeLabelContent = (defaultWrapperProps, children) => {\n    return (\n        <div {...defaultWrapperProps} aria-hidden={'true'}>\n            {children}\n        </div>\n    );\n};\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport CVCHint from './CVCHint';\nimport Field from '../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { CVCProps } from './types';\nimport {\n    CVC_POLICY_HIDDEN,\n    CVC_POLICY_OPTIONAL,\n    CVC_POLICY_REQUIRED,\n    ENCRYPTED_SECURITY_CODE\n} from '../../../../internal/SecuredFields/lib/constants';\nimport DataSfSpan from './DataSfSpan';\nimport { alternativeLabelContent } from './FieldLabelAlternative';\n\nexport default function CVC(props: CVCProps) {\n    const {\n        label,\n        onFocusField = () => {},\n        error = '',\n        className = '',\n        classNameModifiers = [],\n        focused,\n        filled,\n        isValid,\n        frontCVC = false,\n        cvcPolicy = CVC_POLICY_REQUIRED,\n        showContextualElement,\n        contextualText\n    } = props;\n    const { i18n } = useCoreContext();\n\n    const fieldClassnames = classNames(className, {\n        'adyen-checkout__field__cvc': true,\n        'adyen-checkout__card__cvc__input--hidden': cvcPolicy === CVC_POLICY_HIDDEN,\n        'adyen-checkout__field__cvc--optional': cvcPolicy === CVC_POLICY_OPTIONAL\n    });\n\n    const cvcClassnames = classNames({\n        'adyen-checkout__input': true,\n        'adyen-checkout__input--small': true,\n        'adyen-checkout__card__cvc__input': true,\n        'adyen-checkout__input--error': error,\n        'adyen-checkout__input--focus': focused,\n        'adyen-checkout__input--valid': isValid\n    });\n\n    const fieldLabel = cvcPolicy !== CVC_POLICY_OPTIONAL ? label : i18n.get('creditCard.securityCode.label.optional');\n\n    const handleIconClick = () => {\n        onFocusField(ENCRYPTED_SECURITY_CODE);\n    };\n\n    const imageDescription = `${fieldLabel} ${contextualText}`;\n\n    return (\n        <Field\n            label={fieldLabel}\n            focused={focused}\n            filled={filled}\n            classNameModifiers={[...classNameModifiers, 'securityCode']}\n            onFocusField={() => onFocusField(ENCRYPTED_SECURITY_CODE)}\n            className={fieldClassnames}\n            errorMessage={error}\n            isValid={isValid}\n            dir={'ltr'}\n            name={ENCRYPTED_SECURITY_CODE}\n            i18n={i18n}\n            contextVisibleToScreenReader={false}\n            useLabelElement={false}\n            renderAlternativeToLabel={alternativeLabelContent}\n            showContextualElement={showContextualElement}\n            contextualText={contextualText}\n        >\n            <DataSfSpan encryptedFieldType={ENCRYPTED_SECURITY_CODE} className={cvcClassnames} />\n\n            <CVCHint frontCVC={frontCVC} fieldLabel={imageDescription} onClick={handleIconClick} />\n        </Field>\n    );\n}\n","import { h, RefCallback } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport classNames from 'classnames';\nimport { ARIA_CONTEXT_SUFFIX, ARIA_ERROR_SUFFIX } from '../../../core/Errors/constants';\nimport Language from '../../../language';\nimport './FormFields.scss';\n\nexport interface InputBaseProps extends h.JSX.HTMLAttributes {\n    classNameModifiers?: string[];\n    isInvalid?: boolean;\n    isValid?: boolean;\n    readonly?: boolean;\n    uniqueId?: string;\n    disabled?: boolean;\n    className?: string;\n    placeholder?: string;\n    value?: string;\n    name?: string;\n    checked?: boolean;\n    setRef?: RefCallback<HTMLInputElement>;\n    trimOnBlur?: boolean;\n    i18n?: Language;\n    label?: string;\n    onBlurHandler?: h.JSX.GenericEventHandler<HTMLInputElement>;\n    onFocusHandler?: h.JSX.GenericEventHandler<HTMLInputElement>;\n    maxlength?: number | null;\n    addContextualElement?: boolean;\n    type?: string;\n}\n\nexport default function InputBase({ setRef, ...props }: InputBaseProps) {\n    const { autoCorrect, classNameModifiers, isInvalid, isValid, readonly = null, spellCheck, type, uniqueId, disabled } = props;\n    const className = props.className;\n\n    /**\n     * To avoid confusion with misplaced/misdirected onChange handlers - InputBase only accepts onInput, onBlur & onFocus handlers.\n     * The first 2 being the means by which we expect useForm--handleChangeFor validation functionality to be applied.\n     */\n    if (Object.prototype.hasOwnProperty.call(props, 'onChange')) {\n        console.error('Error: Form fields that rely on InputBase may not have an onChange property');\n    }\n\n    const handleInput = useCallback(\n        (event: h.JSX.TargetedInputEvent<HTMLInputElement>) => {\n            props.onInput(event);\n        },\n        [props.onInput]\n    );\n\n    /**\n     *  Event is fired when a key that produces a character value is pressed down.\n     *  ENTER keypress also triggers this event.\n     *\n     *  TODO: 'keypress' event is deprecated\n     *  https://developer.mozilla.org/en-US/docs/Web/API/Element/keypress_event\n     */\n    const handleKeyPress = useCallback(\n        (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => {\n            if (props?.onKeyPress) props.onKeyPress(event);\n        },\n        [props?.onKeyPress]\n    );\n\n    /**\n     * Event is fired when certain keys are pressed (keys that do not output characters):\n     * Backspace, Arrow keys, Shift, Ctrl, Command, Option, Esc\n     *\n     * Exception: ENTER keypress triggers 'onKeyPress' AND 'onKeyUp'\n     */\n    const handleKeyUp = useCallback(\n        (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => {\n            if (props?.onKeyUp) props.onKeyUp(event);\n        },\n        [props?.onKeyUp]\n    );\n\n    const handleBlur = useCallback(\n        (event: h.JSX.TargetedFocusEvent<HTMLInputElement>) => {\n            props?.onBlurHandler?.(event); // From Field component\n\n            if (props.trimOnBlur) {\n                (event.target as HTMLInputElement).value = (event.target as HTMLInputElement).value.trim(); // needed to trim trailing spaces in field (leading spaces can be done via formatting)\n            }\n\n            props?.onBlur?.(event);\n        },\n        [props.onBlur, props.onBlurHandler]\n    );\n\n    const handleFocus = useCallback(\n        (event: h.JSX.TargetedEvent<HTMLInputElement>) => {\n            props?.onFocusHandler?.(event); // From Field component\n        },\n        [props.onFocusHandler]\n    );\n\n    const inputClassNames = classNames(\n        'adyen-checkout__input',\n        [`adyen-checkout__input--${type}`],\n        className,\n        {\n            'adyen-checkout__input--invalid': isInvalid,\n            'adyen-checkout__input--valid': isValid\n        },\n        classNameModifiers.map(m => `adyen-checkout__input--${m}`)\n    );\n\n    // Don't spread classNameModifiers etc to input element (it ends up as an attribute on the element itself)\n    const { classNameModifiers: cnm, uniqueId: uid, isInvalid: iiv, isValid: iv, addContextualElement: ace, ...newProps } = props;\n\n    return (\n        <input\n            id={uniqueId}\n            {...newProps}\n            aria-required={newProps.required}\n            type={type}\n            className={inputClassNames}\n            readOnly={readonly}\n            spellCheck={spellCheck}\n            autoCorrect={autoCorrect}\n            aria-describedby={`${uniqueId}${isInvalid ? ARIA_ERROR_SUFFIX : ARIA_CONTEXT_SUFFIX}`}\n            aria-invalid={isInvalid}\n            onInput={handleInput}\n            onBlur={handleBlur}\n            onFocus={handleFocus}\n            onKeyUp={handleKeyUp}\n            onKeyPress={handleKeyPress}\n            disabled={disabled}\n            ref={setRef}\n        />\n    );\n}\n\nInputBase.defaultProps = {\n    type: 'text',\n    classNameModifiers: []\n};\n","import { h } from 'preact';\nimport InputBase, { InputBaseProps } from './InputBase';\n\nexport default function InputText(props: InputBaseProps) {\n    /* Type of input base is always text, which is combined with using inputmode to change mobile keyboards.\n     * This gives the most consistent and performant mobile input experience.\n     */\n    return <InputBase classNameModifiers={['large']} {...props} aria-required={props.required} type=\"text\" />;\n}\n","import { h } from 'preact';\nimport CVC from './CVC';\nimport Field from '../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { StoredCardFieldsProps } from './types';\nimport { ENCRYPTED_SECURITY_CODE } from '../../../../internal/SecuredFields/lib/constants';\nimport InputText from '../../../../internal/FormFields/InputText';\n\nexport default function StoredCardFields({\n    brand,\n    hasCVC,\n    onFocusField,\n    errors,\n    valid,\n    cvcPolicy,\n    focusedElement,\n    lastFour,\n    expiryMonth,\n    expiryYear,\n    showContextualElement\n}: StoredCardFieldsProps) {\n    const { i18n } = useCoreContext();\n    const storedCardDescription = i18n.get('creditCard.storedCard.description.ariaLabel').replace('%@', lastFour);\n    const storedCardDescriptionSuffix = expiryMonth && expiryYear ? ` ${i18n.get('creditCard.expiryDate.label')} ${expiryMonth}/${expiryYear}` : '';\n    const ariaLabel = `${storedCardDescription}${storedCardDescriptionSuffix}`;\n    const isAmex = brand === 'amex';\n    const cvcContextualText = isAmex\n        ? i18n.get('creditCard.securityCode.contextualText.4digits')\n        : i18n.get('creditCard.securityCode.contextualText.3digits');\n\n    const getError = (errors, fieldType) => {\n        return errors[fieldType] ? i18n.get(errors[fieldType]) : null;\n    };\n\n    return (\n        <div className=\"adyen-checkout__card__form adyen-checkout__card__form--oneClick\" aria-label={ariaLabel}>\n            <div className=\"adyen-checkout__card__exp-cvc adyen-checkout__field-wrapper\">\n                {expiryMonth && expiryYear && (\n                    <Field\n                        label={i18n.get('creditCard.expiryDate.label')}\n                        className=\"adyen-checkout__field--50\"\n                        classNameModifiers={['storedCard']}\n                        name={'expiryDateField'}\n                        disabled\n                    >\n                        <InputText\n                            name={'expiryDateField'}\n                            className={'adyen-checkout__input adyen-checkout__input--disabled adyen-checkout__card__exp-date__input--oneclick'}\n                            value={`${expiryMonth} / ${expiryYear}`}\n                            disabled={true}\n                            dir={'ltr'}\n                        />\n                    </Field>\n                )}\n\n                {hasCVC && (\n                    <CVC\n                        cvcPolicy={cvcPolicy}\n                        error={getError(errors, ENCRYPTED_SECURITY_CODE)}\n                        focused={focusedElement === 'encryptedSecurityCode'}\n                        filled={!!valid.encryptedSecurityCode || !!errors.encryptedSecurityCode}\n                        isValid={!!valid.encryptedSecurityCode}\n                        label={i18n.get('creditCard.securityCode.label')}\n                        onFocusField={onFocusField}\n                        {...(expiryMonth && expiryYear && { className: 'adyen-checkout__field--50' })}\n                        classNameModifiers={['storedCard']}\n                        frontCVC={isAmex}\n                        showContextualElement={showContextualElement}\n                        contextualText={cvcContextualText}\n                    />\n                )}\n            </div>\n        </div>\n    );\n}\n","import { h, ComponentChildren } from 'preact';\nimport cx from 'classnames';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport './Fieldset.scss';\nimport { getUniqueId } from '../../../../utils/idGenerator';\n\ninterface FieldsetProps {\n    children: ComponentChildren;\n    classNameModifiers?: string[];\n    label?: string;\n    description?: string;\n    readonly?: boolean;\n}\n\nexport default function Fieldset({ children, classNameModifiers = [], label, readonly = false, description }: FieldsetProps) {\n    const { i18n } = useCoreContext();\n\n    const describedById = getUniqueId('payid-input-description');\n\n    return (\n        <fieldset\n            className={cx([\n                'adyen-checkout__fieldset',\n                ...classNameModifiers.map(m => `adyen-checkout__fieldset--${m}`),\n                { 'adyen-checkout__fieldset--readonly': readonly }\n            ])}\n            aria-describedby={description ? describedById : null}\n        >\n            {label && <legend className=\"adyen-checkout__fieldset__title\">{i18n.get(label)}</legend>}\n            {description && (\n                <p id={describedById} className=\"adyen-checkout__fieldset__description\">\n                    {i18n.get(description)}\n                </p>\n            )}\n            <div className=\"adyen-checkout__fieldset__fields\">{children}</div>\n        </fieldset>\n    );\n}\n","import { h } from 'preact';\nimport cx from 'classnames';\nimport './RadioGroup.scss';\nimport { RadioGroupProps } from './types';\nimport { getUniqueId } from '../../../../utils/idGenerator';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\n\nexport default function RadioGroup(props: RadioGroupProps) {\n    const { items, name, onChange, value, isInvalid, uniqueId, ariaLabel, style = 'classic' } = props;\n\n    const { i18n } = useCoreContext();\n    const uniqueIdBase = uniqueId?.replace(/[0-9]/g, '').substring(0, uniqueId.lastIndexOf('-'));\n\n    return (\n        <div\n            className={cx(['adyen-checkout__radio_group', `adyen-checkout__radio_group--${style}`])}\n            role={'radiogroup'}\n            {...(ariaLabel && { ['aria-label']: ariaLabel })}\n        >\n            {items.map(item => {\n                const uniqueId = getUniqueId(uniqueIdBase);\n                return (\n                    <div key={item.id} className=\"adyen-checkout__radio_group__input-wrapper\">\n                        <input\n                            id={uniqueId}\n                            type=\"radio\"\n                            checked={value === item.id}\n                            className=\"adyen-checkout__radio_group__input\"\n                            name={name}\n                            onChange={onChange}\n                            onClick={onChange}\n                            value={item.id}\n                        />\n                        <label\n                            className={cx([\n                                'adyen-checkout__label__text',\n                                'adyen-checkout__radio_group__label',\n                                props.className,\n                                { 'adyen-checkout__radio_group__label--invalid': isInvalid }\n                            ])}\n                            htmlFor={uniqueId}\n                        >\n                            {i18n.get(item.name)}\n                        </label>\n                    </div>\n                );\n            })}\n        </div>\n    );\n}\n\nRadioGroup.defaultProps = {\n    onChange: () => {},\n    items: []\n};\n","import { JSX } from 'preact';\nimport { useRef, useState, useEffect } from 'preact/hooks';\nimport cx from 'classnames';\nimport './Img.scss';\nimport { h } from 'preact';\nimport { ImgProps } from './types';\n\nexport default function Img(props: ImgProps) {\n    const { backgroundUrl = '', className = '', classNameModifiers = [], src = '', alt = '', showOnError = false } = props;\n    const [loaded, setLoaded] = useState(false);\n    const imageRef = useRef(null);\n\n    const handleLoad = () => {\n        setLoaded(true);\n    };\n\n    const handleError = () => {\n        setLoaded(showOnError);\n    };\n\n    const classNames = cx(\n        [className],\n        'adyen-checkout__image',\n        { 'adyen-checkout__image--loaded': loaded },\n        ...classNameModifiers.map(modifier => `adyen-checkout__image--${modifier}`)\n    );\n\n    useEffect(() => {\n        const image = backgroundUrl ? new Image() : imageRef.current;\n        image.src = backgroundUrl || src;\n        image.onload = handleLoad;\n        setLoaded(!!image.complete);\n    }, []);\n\n    if (backgroundUrl) {\n        return <div data-testid=\"background\" style={{ backgroundUrl } as JSX.CSSProperties} {...props} className={classNames} />;\n    }\n\n    return <img {...props} alt={alt} ref={imageRef} className={classNames} onError={handleError} />;\n}\n","import { h, Fragment } from 'preact';\nimport cx from 'classnames';\nimport { SelectButtonProps } from '../types';\nimport Img from '../../../Img';\nimport { useMemo } from 'preact/hooks';\nimport classnames from 'classnames';\n\nfunction SelectButtonElement({ filterable, toggleButtonRef, ...props }) {\n    if (filterable) {\n        // Even if passed, we can't add an id to this div since it is not allowed to associate a div with a label element\n        const { id, ...strippedProps } = props;\n        return <div {...strippedProps} ref={toggleButtonRef} />;\n    }\n\n    return <button id={props.id} aria-describedby={props.ariaDescribedBy} type={'button'} {...props} ref={toggleButtonRef} />;\n}\n\nfunction SelectButton(props: Readonly<SelectButtonProps>) {\n    const { active, selected, inputText, readonly, showList, required } = props;\n\n    const isShowingPlaceholder = useMemo(() => {\n        const displayText = selected.selectedOptionName || selected.name;\n        const isValidValue = typeof displayText === 'string' && displayText.trim() !== '';\n        return isValidValue !== true;\n    }, [selected, props.placeholder]);\n\n    // display fallback order\n    const displayText = selected.selectedOptionName || selected.name || props.placeholder || '';\n    // displayInputText only used for the text input for the filter\n    // display the \"typed\" filter text when showing the dropdown,\n    // hide it and show the \"selected\" value when collapsed\n    const displayInputText = showList ? inputText : displayText;\n\n    const setFocus = (e: Event) => {\n        e.preventDefault();\n        if (document.activeElement === props.filterInputRef.current) {\n            if (!props.showList) {\n                props.toggleList(e);\n            }\n        } else if (props.filterInputRef.current) props.filterInputRef.current.focus();\n    };\n\n    // 1. If readonly we ignore the click action\n    // 2. If filterable we want to show the list and focus on the input\n    // 3. Otherwise we just toggle the list\n    const onClickHandler = readonly ? null : props.filterable ? setFocus : props.toggleList;\n\n    const onFocusHandler = readonly ? null : props.onFocus;\n\n    // check COWEB-1301 [Investigate] Drop-in Accessibility - ADA Compliance questions\n    const currentSelectedItemId = active.id ? `listItem-${active.id}` : '';\n\n    return (\n        <SelectButtonElement\n            className={cx({\n                'adyen-checkout__dropdown__button': true,\n                'adyen-checkout__dropdown__button--readonly': readonly,\n                'adyen-checkout__dropdown__button--active': showList,\n                'adyen-checkout__dropdown__button--invalid': props.isInvalid,\n                'adyen-checkout__dropdown__button--valid': props.isValid,\n                'adyen-checkout__dropdown__button--disabled': selected.disabled\n            })}\n            disabled={props.disabled}\n            filterable={props.filterable}\n            onClick={onClickHandler}\n            onKeyDown={!readonly ? props.onButtonKeyDown : null}\n            toggleButtonRef={props.toggleButtonRef}\n            // Only for some dropdowns e.g. the one found in installments when it is just in the form of a single dropdown, do we want to add an id that links to a label's for attr\n            // If we allow an id to be added to the buttons in CtPCardsList, for example, unit tests start failing because it seems a button with an id no longer has a name property that can be used\n            // as a qualifier in findByRole\n            {...(props.allowIdOnButton && props.id && { id: props.id })}\n        >\n            {!props.filterable ? (\n                <Fragment>\n                    {selected.icon && <Img className=\"adyen-checkout__dropdown__button__icon\" src={selected.icon} alt={selected.name} />}\n                    <span\n                        className={classnames('adyen-checkout__dropdown__button__text', {\n                            'adyen-checkout__dropdown__button__text-placeholder': isShowingPlaceholder\n                        })}\n                    >\n                        {displayText}\n                    </span>\n                    {selected.secondaryText && <span className=\"adyen-checkout__dropdown__button__secondary-text\">{selected.secondaryText}</span>}\n                </Fragment>\n            ) : (\n                <Fragment>\n                    {!showList && selected.icon && <Img className=\"adyen-checkout__dropdown__button__icon\" src={selected.icon} alt={selected.name} />}\n                    <input\n                        value={displayInputText}\n                        aria-autocomplete=\"list\"\n                        aria-controls={props.selectListId}\n                        aria-expanded={showList}\n                        aria-owns={props.selectListId}\n                        autoComplete=\"off\"\n                        className=\"adyen-checkout__filter-input\"\n                        onInput={props.onInput}\n                        onFocus={onFocusHandler}\n                        ref={props.filterInputRef}\n                        role=\"combobox\"\n                        aria-activedescendant={currentSelectedItemId}\n                        type=\"text\"\n                        readOnly={props.readonly}\n                        id={props.id}\n                        aria-describedby={props.ariaDescribedBy}\n                        required={required}\n                    />\n                    {!showList && selected.secondaryText && (\n                        <span className=\"adyen-checkout__dropdown__button__secondary-text\">{selected.secondaryText}</span>\n                    )}\n                </Fragment>\n            )}\n        </SelectButtonElement>\n    );\n}\n\nexport default SelectButton;\n","import { h } from 'preact';\nimport cx from 'classnames';\nimport { SelectItemProps } from '../types';\nimport Img from '../../../Img';\nimport Icon from '../../../Icon';\nimport { PREFIX } from '../../../Icon/constants';\n\nconst SelectListItem = ({ item, active, selected, ...props }: SelectItemProps) => {\n    return (\n        /* eslint-disable jsx-a11y/click-events-have-key-events  */\n        <li\n            aria-disabled={!!item.disabled}\n            aria-selected={selected}\n            className={cx([\n                'adyen-checkout__dropdown__element',\n                {\n                    'adyen-checkout__dropdown__element--active': active,\n                    'adyen-checkout__dropdown__element--disabled': !!item.disabled\n                }\n            ])}\n            // A change in Preact v10.11.1 means that all falsy values are assessed and set on data attributes.\n            // In the case of data-disabled we only ever want it set if item.disabled is actually true, since the presence of the data-disabled attr,\n            // regardless of its value, will disable the select list item\n            data-disabled={item.disabled === true ? true : null}\n            data-value={item.id}\n            onClick={props.onSelect}\n            onMouseEnter={props.onHover}\n            /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role */\n            role=\"option\"\n            //tabIndex={-1}\n            id={`listItem-${item.id}`}\n        >\n            {item.icon && <Img className=\"adyen-checkout__dropdown__element__icon\" alt={item.name} src={item.icon} />}\n            <span className=\"adyen-checkout__dropdown__element__text\">{item.name}</span>\n            {item.secondaryText && <span className=\"adyen-checkout__dropdown__element__secondary-text\">{item.secondaryText}</span>}\n            {selected && <Icon type={`${PREFIX}checkmark`} height={14} width={14} />}\n        </li>\n    );\n};\n\nexport default SelectListItem;\n","import { h } from 'preact';\nimport cx from 'classnames';\nimport SelectListItem from './SelectListItem';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { SelectListProps } from '../types';\n\nfunction SelectList({ selected, active, filteredItems, showList, ...props }: SelectListProps) {\n    const { i18n } = useCoreContext();\n\n    return (\n        /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */\n        <ul\n            className={cx({\n                'adyen-checkout__dropdown__list': true,\n                'adyen-checkout__dropdown__list--active': showList\n            })}\n            id={props.selectListId}\n            ref={props.selectListRef}\n            role=\"listbox\"\n        >\n            {filteredItems.length ? (\n                filteredItems.map(item => (\n                    <SelectListItem\n                        active={item.id === active.id}\n                        item={item}\n                        key={item.id}\n                        onSelect={props.onSelect}\n                        onHover={props.onHover}\n                        selected={item.id === selected.id}\n                    />\n                ))\n            ) : (\n                <div className=\"adyen-checkout__dropdown__element adyen-checkout__dropdown__element--no-options\">\n                    {i18n.get('select.noOptionsFound')}\n                </div>\n            )}\n        </ul>\n    );\n}\n\nexport default SelectList;\n","export const keys = {\n    arrowDown: 'ArrowDown',\n    arrowUp: 'ArrowUp',\n    enter: 'Enter',\n    escape: 'Escape',\n    space: ' ',\n    tab: 'Tab'\n};\n","const convertFullToHalf = str => str.replace(/[！-～]/g, r => String.fromCharCode(r.charCodeAt(0) - 0xfee0));\n\n/**\n * This function scrolls and element to view and simulates the default behaviour of .focus() by a given browser\n * This function is inspired, yet simplified of the code found here https://gist.github.com/hsablonniere/2581101\n * @param element - element to focus\n */\nconst simulateFocusScroll = (element: HTMLElement) => {\n    const parent = element.parentNode as HTMLElement;\n    const parentComputedStyle = window.getComputedStyle(parent, null);\n    const parentBorderTopWidth = parseInt(parentComputedStyle.getPropertyValue('border-top-width'));\n    const overTop = element.offsetTop - parent.offsetTop < parent.scrollTop;\n    const overBottom = element.offsetTop - parent.offsetTop + element.clientHeight - parentBorderTopWidth > parent.scrollTop + parent.clientHeight;\n\n    if (overTop || overBottom) {\n        parent.scrollTop = element.offsetTop - parent.offsetTop - parent.clientHeight / 2 - parentBorderTopWidth + element.clientHeight / 2;\n    }\n};\n\nexport { convertFullToHalf, simulateFocusScroll };\n","import { h } from 'preact';\nimport { useEffect, useMemo, useRef, useState } from 'preact/hooks';\nimport cx from 'classnames';\nimport SelectButton from './components/SelectButton';\nimport SelectList from './components/SelectList';\nimport uuid from '../../../../utils/uuid';\nimport { keys } from './constants';\nimport { SelectItem, SelectProps } from './types';\nimport './Select.scss';\nimport { ARIA_CONTEXT_SUFFIX, ARIA_ERROR_SUFFIX } from '../../../../core/Errors/constants';\nimport { simulateFocusScroll } from '../utils';\n\nfunction Select({\n    items = [],\n    className = '',\n    classNameModifiers = [],\n    filterable = true,\n    readonly = false,\n    onChange = () => {},\n    onInput,\n    selectedValue,\n    name,\n    isInvalid,\n    isValid,\n    placeholder,\n    uniqueId,\n    disabled,\n    disableTextFilter,\n    clearOnSelect,\n    blurOnClose,\n    onListToggle,\n    allowIdOnButton = false,\n    required\n}: SelectProps) {\n    const filterInputRef = useRef(null);\n    const selectContainerRef = useRef(null);\n    const toggleButtonRef = useRef(null);\n    const selectListRef = useRef(null);\n    const [textFilter, setTextFilter] = useState<string>(null);\n    const [showList, setShowList] = useState<boolean>(false);\n    const selectListId: string = useMemo(() => `select-${uuid()}`, []);\n\n    const active: SelectItem = items.find(i => i.id === selectedValue) || ({} as SelectItem);\n\n    const [inputText, setInputText] = useState<string>();\n\n    const [activeOption, setActiveOption] = useState<SelectItem>(active);\n\n    const selectedOption = active;\n\n    const filteredItems = disableTextFilter ? items : items.filter(item => !textFilter || item.name.toLowerCase().includes(textFilter.toLowerCase()));\n\n    const suffix = isInvalid ? ARIA_ERROR_SUFFIX : ARIA_CONTEXT_SUFFIX;\n    const ariaDescribedBy = uniqueId ? `${uniqueId}${suffix}` : null;\n\n    const setNextActive = () => {\n        if (!filteredItems || filteredItems.length < 1) return;\n        const possibleNextIndex = filteredItems.findIndex(listItem => listItem === activeOption) + 1;\n        const nextIndex = possibleNextIndex < filteredItems.length ? possibleNextIndex : 0;\n        const nextItem = filteredItems[nextIndex];\n        scrollToItem(nextItem);\n        setActiveOption(nextItem);\n    };\n\n    const setPreviousActive = () => {\n        if (!filteredItems || filteredItems.length < 1) return;\n        const possibleNextIndex = filteredItems.findIndex(listItem => listItem === activeOption) - 1;\n        const nextIndex = possibleNextIndex < 0 ? filteredItems.length - 1 : possibleNextIndex;\n        const nextItem = filteredItems[nextIndex];\n        scrollToItem(nextItem);\n        setActiveOption(nextItem);\n    };\n\n    const scrollToItem = (item: SelectItem) => {\n        if (!item) return;\n        const nextElement = document.getElementById(`listItem-${item.id}`);\n        simulateFocusScroll(nextElement);\n    };\n\n    /**\n     * Closes the selectList, empties the text filter and focuses the button element\n     */\n    const closeList = () => {\n        //blurs the field when the list is closed, makes for a better UX for most users, needs more testing\n        blurOnClose && filterInputRef.current.blur();\n        setShowList(false);\n    };\n\n    const openList = () => {\n        setShowList(true);\n    };\n\n    const extractItemFromEvent = (e: Event): SelectItem => {\n        const value = (e.currentTarget as HTMLInputElement).getAttribute('data-value');\n        return filteredItems.find(listItem => listItem.id == value);\n    };\n\n    /**\n     * Closes the select list and fires an onChange\n     * @param e - Event\n     */\n    const handleSelect = (e: Event) => {\n        e.preventDefault();\n\n        // We use a local variable here since writing and if statement is cleaner then a long ternary\n        let valueToEmit;\n\n        if (e.currentTarget instanceof HTMLElement && e.currentTarget.getAttribute('role') === 'option') {\n            // This is the main scenario when clicking and item in the list\n            // Item comes from the event\n            valueToEmit = extractItemFromEvent(e);\n        } else if (activeOption.id && filteredItems.some(item => item.id === activeOption.id)) {\n            // This is the scenario where a user is using the keyboard to navigate\n            // In the case item comes from the visually select item\n            valueToEmit = activeOption;\n        } else {\n            // This is the scenario the user didn't select anything\n            if (textFilter) {\n                // if we filtering for something then select the first option\n                valueToEmit = filteredItems[0];\n            } else {\n                // This will happen when we want to keep an already chosen option\n                // If no active option we should just emit again with the value that was already selected\n                valueToEmit = { id: selectedValue };\n            }\n        }\n\n        if (valueToEmit && !valueToEmit.disabled) {\n            onChange({ target: { value: valueToEmit.id, name: name } });\n\n            if (clearOnSelect) setInputText(null);\n\n            closeList();\n        }\n    };\n\n    /**\n     * Handles hovering and directions\n     * @param e - Event\n     */\n    const handleHover = (e: Event) => {\n        e.preventDefault();\n        const item = extractItemFromEvent(e);\n        setActiveOption(item);\n    };\n\n    /**\n     * Handle keyDown events on the selectList button\n     * Responsible for opening and closing the list\n     * @param e - KeyboardEvent\n     */\n    const handleButtonKeyDown = (e: KeyboardEvent) => {\n        if (e.key === keys.enter && filterable && showList && textFilter) {\n            handleSelect(e);\n        } else if (e.key === keys.escape) {\n            // When user has focused Select button but not yet moved into Select list - close list and keep focus on the Select Button re. a11y guidelines\n            // https://w3c.github.io/aria-practices/examples/disclosure/disclosure-navigation.html\n            closeList();\n        } else if ([keys.arrowUp, keys.arrowDown, keys.enter].includes(e.key) || (e.key === keys.space && (!filterable || !showList))) {\n            e.preventDefault();\n            if (!showList) {\n                openList();\n            } else {\n                handleNavigationKeys(e);\n            }\n        } else if (e.shiftKey && e.key === keys.tab) {\n            // Shift-Tab out of Select - close list re. a11y guidelines (above)\n            closeList();\n        } else if (e.key === keys.tab) {\n            closeList();\n        }\n    };\n\n    /**\n     * Handles movement with navigation keys and enter\n     * Navigates through the list, or select an element, or focus the filter input, or close the menu.\n     * @param e - KeyDownEvent\n     */\n    const handleNavigationKeys = (e: KeyboardEvent) => {\n        switch (e.key) {\n            case keys.space:\n            case keys.enter:\n                handleSelect(e);\n                break;\n            case keys.arrowDown:\n                e.preventDefault();\n                setNextActive();\n                break;\n            case keys.arrowUp:\n                e.preventDefault();\n                setPreviousActive();\n                break;\n            default:\n        }\n    };\n\n    /**\n     * Updates the state with the current text filter value\n     * @param e - KeyboardEvent\n     */\n    const handleTextFilter = (e: KeyboardEvent) => {\n        const value: string = (e.target as HTMLInputElement).value;\n        setInputText(value);\n        setTextFilter(value);\n        if (onInput) {\n            onInput(value);\n        }\n    };\n\n    /**\n     * Toggles the selectList and focuses in either the filter input or in the selectList button\n     * @param e - Event\n     */\n    const toggleList = (e: Event) => {\n        e.preventDefault();\n        if (!showList) {\n            setInputText(null);\n            openList();\n        } else {\n            setInputText(selectedOption.name);\n            closeList();\n        }\n    };\n\n    useEffect(() => {\n        if (showList) {\n            setInputText(null);\n        } else {\n            setTextFilter(null);\n        }\n    }, [showList]);\n\n    /**\n     * Focus on the input if filterable\n     */\n    useEffect(() => {\n        if (showList && filterable && filterInputRef.current) {\n            filterInputRef.current.focus();\n        }\n        onListToggle?.(showList);\n    }, [showList]);\n\n    useEffect(() => {\n        /**\n         * Close the select list when clicking outside the list\n         * @param e - MouseEvent\n         */\n        function handleClickOutside(e: MouseEvent) {\n            // use composedPath so it can also check when inside a web component\n            // if composedPath is not available fallback to e.target\n            const clickIsOutside = e.composedPath\n                ? !e.composedPath().includes(selectContainerRef.current)\n                : !selectContainerRef.current.contains(e.target);\n            if (clickIsOutside) {\n                closeList();\n            }\n        }\n\n        document.addEventListener('click', handleClickOutside, false);\n\n        return () => {\n            document.removeEventListener('click', handleClickOutside, false);\n        };\n    }, [selectContainerRef]);\n\n    return (\n        <div\n            className={cx(['adyen-checkout__dropdown', className, ...classNameModifiers.map(m => `adyen-checkout__dropdown--${m}`)])}\n            ref={selectContainerRef}\n        >\n            <SelectButton\n                inputText={inputText}\n                id={uniqueId ?? null}\n                active={activeOption}\n                selected={selectedOption}\n                filterInputRef={filterInputRef}\n                filterable={filterable}\n                isInvalid={isInvalid}\n                isValid={isValid}\n                onButtonKeyDown={handleButtonKeyDown}\n                onFocus={openList}\n                onInput={handleTextFilter}\n                placeholder={placeholder}\n                readonly={readonly}\n                selectListId={selectListId}\n                showList={showList}\n                toggleButtonRef={toggleButtonRef}\n                toggleList={toggleList}\n                disabled={disabled}\n                ariaDescribedBy={ariaDescribedBy}\n                allowIdOnButton={allowIdOnButton}\n                required={required}\n            />\n            <SelectList\n                active={activeOption}\n                filteredItems={filteredItems}\n                onHover={handleHover}\n                onSelect={handleSelect}\n                selected={selectedOption}\n                selectListId={selectListId}\n                selectListRef={selectListRef}\n                showList={showList}\n            />\n        </div>\n    );\n}\n\nSelect.defaultProps = {\n    className: '',\n    classNameModifiers: [],\n    filterable: true,\n    items: [],\n    readonly: false,\n    onChange: () => {}\n};\n\nexport default Select;\n","import { h } from 'preact';\nimport { useState, useEffect } from 'preact/hooks';\nimport Field from '../../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport { InstallmentsItem, InstallmentsProps } from '../types';\nimport Fieldset from '../../../../../internal/FormFields/Fieldset/Fieldset';\nimport RadioGroup from '../../../../../internal/FormFields/RadioGroup';\nimport Select from '../../../../../internal/FormFields/Select';\nimport { alternativeLabelContent } from '../FieldLabelAlternative';\nimport './Installments.scss';\n\nexport interface InstallmentsObj {\n    value: number;\n    plan?: 'revolving';\n}\n\n/**\n * Installments generic dropdown\n */\nfunction Installments(props: InstallmentsProps) {\n    const { i18n } = useCoreContext();\n    const { amount, brand, onChange, type } = props;\n    const installmentOptions = props.installmentOptions[brand] || props.installmentOptions.card;\n    const readOnly = installmentOptions?.values?.length === 1;\n    const [installmentAmount, setInstallmentAmount] = useState(installmentOptions?.preselectedValue || installmentOptions?.values[0]);\n    const [radioBtnValue, setRadioBtnValue] = useState('onetime');\n\n    // hasRadioButtonUI determines if we have 3 radio buttons in the UI ('onetime', 'installments' and 'revolving')\n    const hasRadioButtonUI = installmentOptions?.plans?.includes('revolving');\n    const getPartialAmount = (divider: number): string => i18n.amount(amount.value / divider, amount.currency);\n\n    const onSelectInstallment = e => {\n        const selectedInstallments = e.target.value;\n        setInstallmentAmount(Number(selectedInstallments));\n    };\n\n    const onRadioSelect = e => {\n        const selectedBtn = e.currentTarget.getAttribute('value');\n        setRadioBtnValue(selectedBtn);\n    };\n\n    const installmentItemsMapper = (value: number): InstallmentsItem => {\n        let translationKey;\n        let translationObj;\n\n        if (type === 'amount') {\n            translationKey = 'installmentOption';\n            translationObj = { count: value, values: { times: value, partialValue: getPartialAmount(value) } };\n        } else {\n            translationKey = `installmentOptionMonths`;\n            translationObj = { count: value, values: { times: value } };\n        }\n\n        return {\n            id: value,\n            name: amount.value ? i18n.get(translationKey, translationObj) : `${value}`\n        };\n    };\n\n    useEffect(() => {\n        if (installmentOptions?.values?.includes(installmentAmount)) {\n            return;\n        }\n\n        setInstallmentAmount(installmentOptions?.preselectedValue ?? installmentOptions?.values[0]);\n    }, [brand]);\n\n    useEffect(() => {\n        const stateObj: InstallmentsObj = {\n            value: installmentAmount, // No radio button interface or \"installments\" radio button selected\n            ...(hasRadioButtonUI && radioBtnValue === 'revolving' && { plan: radioBtnValue, value: 1 }),\n            ...(hasRadioButtonUI && radioBtnValue === 'onetime' && { value: 1 })\n        };\n\n        onChange(installmentOptions ? stateObj : { value: null });\n    }, [installmentAmount, installmentOptions, radioBtnValue]);\n\n    if (!installmentOptions) return null;\n    if (amount.value === 0) return null;\n\n    // Alternate interface for installments with the possibility of a \"revolving\" plan\n    if (hasRadioButtonUI) {\n        return (\n            <div className=\"adyen-checkout__installments\">\n                <Field\n                    label={i18n.get('installments')}\n                    classNameModifiers={['installments']}\n                    name={'installmentsPseudoLabel'}\n                    useLabelElement={false}\n                    showContextualElement={false}\n                    renderAlternativeToLabel={alternativeLabelContent}\n                >\n                    <Fieldset classNameModifiers={['revolving-plan']} label={''}>\n                        <RadioGroup\n                            items={[\n                                { id: 'onetime', name: 'installments.oneTime' },\n                                { id: 'installments', name: 'installments.installments' },\n                                { id: 'revolving', name: 'installments.revolving' }\n                            ]}\n                            onChange={onRadioSelect}\n                            value={radioBtnValue}\n                            ariaLabel={i18n.get('installments')}\n                        />\n\n                        <Field\n                            className={radioBtnValue !== 'installments' ? 'revolving-plan-installments__disabled' : 'revolving-plan-installments'}\n                            classNameModifiers={['revolving-plan-installments']}\n                            name={''}\n                            useLabelElement={false}\n                            showContextualElement={false}\n                        >\n                            <Select\n                                filterable={false}\n                                items={installmentOptions.values.map(installmentItemsMapper)}\n                                selectedValue={installmentAmount}\n                                onChange={onSelectInstallment}\n                                name={'installments'}\n                                disabled={radioBtnValue !== 'installments'}\n                            />\n                        </Field>\n                    </Fieldset>\n                </Field>\n            </div>\n        );\n    }\n\n    return (\n        <div className=\"adyen-checkout__installments\">\n            <Field label={i18n.get('installments')} classNameModifiers={['installments']} name={'installments'} showContextualElement={false}>\n                <Select\n                    filterable={false}\n                    items={installmentOptions.values.map(installmentItemsMapper)}\n                    selectedValue={installmentAmount}\n                    onChange={onSelectInstallment}\n                    name={'installments'}\n                    readonly={readOnly}\n                    allowIdOnButton={true}\n                />\n            </Field>\n        </div>\n    );\n}\n\nInstallments.defaultProps = {\n    brand: '',\n    amount: {},\n    onChange: () => {}\n};\n\nexport default Installments;\n","import { h } from 'preact';\nimport { CustomTranslations } from './types';\nimport AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';\n\n/**\n * Returns a locale with the proper format\n *\n * @example\n * formatLocale('En_us'); -> en-US\n * formatLocale('ar') -> ar\n */\nexport function formatLocale(localeParam: string): string {\n    const locale = localeParam.replace('_', '-');\n    const format = new RegExp('([a-z]{2})([-])([A-Z]{2})');\n\n    // If it's already formatted, return the locale\n    if (format.test(locale)) {\n        return locale;\n    }\n\n    // If no country code is defined (Ex: 'ar') , then returns 'ar'\n    const [languageCode, countryCode] = locale.split('-');\n    if (languageCode.length !== 2) {\n        throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', `Locale '${localeParam}' does not match the expected format`);\n    }\n    if (!countryCode) {\n        return languageCode.toLowerCase();\n    }\n\n    // Ensure correct format and join the strings back together\n    const fullLocale = [languageCode.toLowerCase(), countryCode.toUpperCase()].join('-');\n    if (format.test(fullLocale)) {\n        return fullLocale;\n    } else {\n        throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', `Locale '${localeParam}' does not match the expected format`);\n    }\n}\n\n/**\n * Makes sure that if custom translation is defined using not properly formatted locale keys, then it gets formatted correctly\n * Ex: Custom translation defined as { en_US: { ... }} will be adjusted to { 'en-US': { ... }}\n */\nexport function formatCustomTranslations(customTranslations: CustomTranslations = {}): CustomTranslations {\n    return Object.keys(customTranslations).reduce((memo, customTranslationLocaleKey) => {\n        const locale = formatLocale(customTranslationLocaleKey);\n        memo[locale] = customTranslations[customTranslationLocaleKey];\n        return memo;\n    }, {});\n}\n\nconst replaceTranslationValues = (translation, values) => {\n    return translation.replace(/%{(\\w+)}/g, (_, k) => values[k] || '');\n};\n\n/**\n * Returns a translation string by key\n * @param translations -\n * @param key -\n * @param options -\n *\n * @internal\n */\nexport const getTranslation = (translations: object, key: string, options: { [key: string]: any } = { values: {}, count: 0 }): string => {\n    const keyPlural = `${key}__plural`;\n    const keyForCount = count => `${key}__${count}`;\n\n    if (Object.prototype.hasOwnProperty.call(translations, keyForCount(options.count))) {\n        // Find key__count translation key\n        return replaceTranslationValues(translations[keyForCount(options.count)], options.values);\n    } else if (Object.prototype.hasOwnProperty.call(translations, keyPlural) && options.count > 1) {\n        // Find key__plural translation key, if count greater than 1 (e.g. myTranslation__plural)\n        return replaceTranslationValues(translations[keyPlural], options.values);\n    } else if (Object.prototype.hasOwnProperty.call(translations, key)) {\n        // Find key translation key (e.g. myTranslation)\n        return replaceTranslationValues(translations[key], options.values);\n    }\n\n    return null;\n};\n\n/**\n * Injects JSX elements in a middle of a translation and returns a JSX array\n * The input string should use %# as the token to know where to insert the component\n * @param translation - Translation string\n * @param renderFunctions - An array function that renders JSX elements\n */\nexport const interpolateElement = (translation: string, renderFunctions: Array<(translation: string) => h.JSX.Element | string>) => {\n    // splits by regex group, it guarantees that it only splits with 2 tokens (%#)\n    const matches = translation.split(/%#(.*?)%#/gm);\n\n    if (renderFunctions.length !== Math.floor(matches.length / 2)) {\n        throw Error('The number of functions provided does not match the number of elements in the translation string.');\n    }\n\n    // the map will create an array of JSX / string elements, this syntax in accepted in JSX/react to render elements\n    return matches.map((term, index) => {\n        // math to get the index of the renderFunction that should be used\n        // since we split on tokens, that means the index of the render function is half of the index of the string\n        const indexInFunctionArray = Math.floor(index / 2);\n        return index % 2 === 0 ? term : renderFunctions[indexInFunctionArray](term);\n    });\n};\n","import { h } from 'preact';\nimport type { ComponentChildren } from 'preact';\n\nimport './Link.scss';\n\n/**\n * Disclaimer: we don't follow Bento's design for Links. Checkout has its own colors\n */\n\ninterface LinkProps {\n    to: string;\n    children?: ComponentChildren;\n}\n\nconst Link = ({ to, children }: LinkProps) => {\n    return (\n        <a className=\"adyen-checkout-link\" href={to} target=\"_blank\" rel=\"noopener noreferrer\">\n            {children}\n        </a>\n    );\n};\n\nexport default Link;\n","import { Fragment, h } from 'preact';\nimport { isValidHttpUrl } from '../../../utils/isValidURL';\nimport './DisclaimerMessage.scss';\nimport { interpolateElement } from '../../../language/utils';\nimport Link from '../Link';\n\nexport interface DisclaimerMsgObject {\n    message: string;\n    linkText: string;\n    link: string;\n}\n\ninterface InternalDisclaimerMsgObject {\n    message: string;\n    urls?: Array<string>;\n}\n\n/**\n *  props: {\n *    message: 'By continuing you agree with the %#terms and conditions%#',\n *    urls: ['https://www.adyen.com']\n *  }\n *  String inside the '%#' token pair will be rendered as an anchor element.\n */\n\nexport default function DisclaimerMessage({ message, urls = [] }: InternalDisclaimerMsgObject) {\n    return (\n        <span className=\"adyen-checkout-disclaimer__label\">\n            <LabelOnlyDisclaimerMessage message={message} urls={urls} />\n        </span>\n    );\n}\n\nexport function LabelOnlyDisclaimerMessage({ message, urls }: InternalDisclaimerMsgObject) {\n    const messageIsStr = typeof message === 'string';\n    const validUrls = urls.every(url => typeof url === 'string' && isValidHttpUrl(url));\n    if (!messageIsStr || !validUrls) return null;\n\n    return (\n        <Fragment>\n            {interpolateElement(\n                message,\n                urls.map(\n                    // for each URL in the URLs array, return a createLink function\n                    url =>\n                        function createLink(translation) {\n                            return <Link to={url}>{translation}</Link>;\n                        }\n                )\n            )}\n        </Fragment>\n    );\n}\n","import { h } from 'preact';\nimport LoadingWrapper from '../../../../internal/LoadingWrapper';\nimport StoredCardFields from './StoredCardFields';\nimport Installments from './Installments';\nimport DisclaimerMessage from '../../../../internal/DisclaimerMessage';\n\nexport const StoredCardFieldsWrapper = ({\n    // base (shared)\n    // n/a\n    // vars created in CardInput:\n    sfpState,\n    setFocusOn,\n    cvcPolicy,\n    focusedElement,\n    hasInstallments,\n    handleInstallments,\n    showAmountsInInstallments,\n    showContextualElement,\n    // props passed through from CardInput:\n    amount,\n    hasCVC,\n    installmentOptions,\n    lastFour,\n    expiryMonth,\n    expiryYear,\n    // Card\n    disclaimerMessage\n}) => {\n    return (\n        <LoadingWrapper status={sfpState.status}>\n            <StoredCardFields\n                errors={sfpState.errors}\n                brand={sfpState.brand}\n                hasCVC={hasCVC}\n                cvcPolicy={cvcPolicy}\n                onFocusField={setFocusOn}\n                focusedElement={focusedElement}\n                valid={sfpState.valid}\n                lastFour={lastFour}\n                expiryMonth={expiryMonth}\n                expiryYear={expiryYear}\n                showContextualElement={showContextualElement}\n            />\n\n            {hasInstallments && (\n                <Installments\n                    amount={amount}\n                    brand={sfpState.brand}\n                    installmentOptions={installmentOptions}\n                    onChange={handleInstallments}\n                    type={showAmountsInInstallments ? 'amount' : 'months'}\n                />\n            )}\n\n            {disclaimerMessage && (\n                <DisclaimerMessage\n                    message={disclaimerMessage.message.replace('%{linkText}', `%#${disclaimerMessage.linkText}%#`)}\n                    urls={[disclaimerMessage.link]}\n                />\n            )}\n        </LoadingWrapper>\n    );\n};\n","import { h } from 'preact';\nimport { getCardImageUrl, getFullBrandName } from '../utils';\nimport { BrandIconProps } from './types';\nimport useImage from '../../../../../core/Context/useImage';\nimport { useState } from 'preact/hooks';\nimport classNames from 'classnames';\n\nexport default function BrandIcon({ brand, brandsConfiguration = {}, onClick }: BrandIconProps) {\n    const getImage = useImage();\n    const imageName = brand === 'card' ? 'nocard' : brand;\n    const imageUrl = brandsConfiguration[brand]?.icon ?? getCardImageUrl(imageName, getImage);\n\n    const [hasLoaded, setHasLoaded] = useState(false);\n\n    const handleError = () => {\n        setHasLoaded(false);\n    };\n\n    const handleLoad = () => {\n        setHasLoaded(true);\n    };\n\n    const fieldClassnames = classNames({\n        'adyen-checkout-card-input__icon': true,\n        'adyen-checkout__card__cardNumber__brandIcon': true,\n        'adyen-checkout-card-input__icon--hidden': !hasLoaded\n    });\n\n    return (\n        // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions\n        <img className={fieldClassnames} onLoad={handleLoad} onError={handleError} alt={getFullBrandName(brand)} src={imageUrl} onClick={onClick} />\n    );\n}\n","import { h } from 'preact';\nimport { getCardImageUrl, getFullBrandName } from '../../utils';\nimport { DualBrandingIconProps } from '../types';\nimport './DualBrandingIcon.scss';\nimport useImage from '../../../../../../core/Context/useImage';\n\nconst DualBrandingIcon = ({ brand, onClick, dataValue, brandsConfiguration = {} }: DualBrandingIconProps) => {\n    const getImage = useImage();\n    const imageName = brand === 'card' ? 'nocard' : brand;\n    const imageUrl = brandsConfiguration[brand]?.icon ?? getCardImageUrl(imageName, getImage);\n    const handleError = e => {\n        e.target.style.cssText = 'display: none';\n    };\n\n    return (\n        // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions\n        <img\n            className={`adyen-checkout-card-input__icon adyen-checkout__card__cardNumber__brandIcon`}\n            onError={handleError}\n            alt={getFullBrandName(brand)}\n            src={imageUrl}\n            onClick={onClick}\n            data-value={dataValue}\n        />\n    );\n};\n\nexport default DualBrandingIcon;\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport BrandIcon from './BrandIcon';\nimport DualBrandingIcon from './DualBrandingIcon/DualBrandingIcon';\nimport Field from '../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { CardNumberProps } from './types';\nimport DataSfSpan from './DataSfSpan';\nimport { ENCRYPTED_CARD_NUMBER } from '../../../../internal/SecuredFields/lib/constants';\nimport { alternativeLabelContent } from './FieldLabelAlternative';\n\nexport default function CardNumber(props: CardNumberProps) {\n    const { i18n } = useCoreContext();\n    const { error = '', isValid = false, onFocusField = () => {}, dualBrandingElements } = props;\n\n    const handleIconClick = () => {\n        onFocusField(ENCRYPTED_CARD_NUMBER);\n    };\n\n    return (\n        <Field\n            label={props.label}\n            focused={props.focused}\n            filled={props.filled}\n            classNameModifiers={['cardNumber']}\n            onFocusField={() => onFocusField(ENCRYPTED_CARD_NUMBER)}\n            errorMessage={error}\n            isValid={isValid}\n            dir={'ltr'}\n            name={ENCRYPTED_CARD_NUMBER}\n            showValidIcon={false}\n            i18n={i18n}\n            contextVisibleToScreenReader={false} // securedFields have their own, internal, aria-describedby element\n            useLabelElement={false}\n            renderAlternativeToLabel={alternativeLabelContent}\n        >\n            <DataSfSpan\n                encryptedFieldType={ENCRYPTED_CARD_NUMBER}\n                className={classNames({\n                    'adyen-checkout__input': true,\n                    'adyen-checkout__input--large': true,\n                    'adyen-checkout__card__cardNumber__input': true,\n                    'adyen-checkout__input--error': error,\n                    'adyen-checkout__input--focus': props.focused,\n                    'adyen-checkout__input--valid': isValid,\n                    'adyen-checkout__card__cardNumber__input--noBrand': !props.showBrandIcon\n                })}\n            ></DataSfSpan>\n\n            {props.showBrandIcon && !dualBrandingElements && (\n                <BrandIcon brandsConfiguration={props.brandsConfiguration} brand={props.brand} onClick={handleIconClick} />\n            )}\n\n            {dualBrandingElements && !error && (\n                <div className={classNames(['adyen-checkout__card__dual-branding__icons'])}>\n                    {dualBrandingElements.map(element => (\n                        <DualBrandingIcon\n                            key={element.id}\n                            brand={element.id}\n                            brandsConfiguration={props.brandsConfiguration}\n                            dataValue={element.id}\n                            onClick={handleIconClick}\n                        />\n                    ))}\n                </div>\n            )}\n        </Field>\n    );\n}\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport Field from '../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { ExpirationDateProps } from './types';\nimport DataSfSpan from './DataSfSpan';\n\nimport {\n    DATE_POLICY_HIDDEN,\n    DATE_POLICY_OPTIONAL,\n    DATE_POLICY_REQUIRED,\n    ENCRYPTED_EXPIRY_DATE\n} from '../../../../internal/SecuredFields/lib/constants';\nimport useImage from '../../../../../core/Context/useImage';\nimport { alternativeLabelContent } from './FieldLabelAlternative';\n\nexport default function ExpirationDate(props: ExpirationDateProps) {\n    const {\n        label,\n        focused,\n        filled,\n        onFocusField,\n        className = '',\n        error = '',\n        isValid = false,\n        expiryDatePolicy = DATE_POLICY_REQUIRED,\n        showContextualElement,\n        contextualText\n    } = props;\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    const fieldClassnames = classNames(className, {\n        'adyen-checkout__field__exp-date': true,\n        'adyen-checkout__card__exp-date__input--hidden': expiryDatePolicy === DATE_POLICY_HIDDEN,\n        'adyen-checkout__field__exp-date--optional': expiryDatePolicy === DATE_POLICY_OPTIONAL\n    });\n\n    const fieldLabel = expiryDatePolicy !== DATE_POLICY_OPTIONAL ? label : `${label} ${i18n.get('field.title.optional')}`;\n\n    const handleIconClick = () => {\n        onFocusField(ENCRYPTED_EXPIRY_DATE);\n    };\n\n    const imageDescription = `${fieldLabel} ${contextualText}`;\n\n    return (\n        <Field\n            label={fieldLabel}\n            classNameModifiers={['expiryDate']}\n            className={fieldClassnames}\n            focused={focused}\n            filled={filled}\n            onFocusField={() => onFocusField(ENCRYPTED_EXPIRY_DATE)}\n            errorMessage={error}\n            isValid={isValid}\n            dir={'ltr'}\n            name={'encryptedExpiryDate'}\n            i18n={i18n}\n            contextVisibleToScreenReader={false}\n            useLabelElement={false}\n            renderAlternativeToLabel={alternativeLabelContent}\n            showContextualElement={showContextualElement}\n            contextualText={contextualText}\n        >\n            <DataSfSpan\n                encryptedFieldType={ENCRYPTED_EXPIRY_DATE}\n                className={classNames('adyen-checkout__input', 'adyen-checkout__input--small', 'adyen-checkout__card__exp-date__input', {\n                    'adyen-checkout__input--error': error,\n                    'adyen-checkout__input--focus': focused,\n                    'adyen-checkout__input--valid': isValid\n                })}\n            />\n            <span\n                className={classNames('adyen-checkout__field__exp-date_hint_wrapper', {\n                    'adyen-checkout__field__exp-date_hint_wrapper--hidden': error || isValid\n                })}\n            >\n                {/*eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions*/}\n                <img\n                    src={getImage({ imageFolder: 'components/' })('expiry_date_hint')}\n                    className=\"adyen-checkout__field__exp-date_hint\"\n                    alt={imageDescription}\n                    onClick={handleIconClick}\n                />\n            </span>\n        </Field>\n    );\n}\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport Img from '../../../../../internal/Img';\nimport './AvailableBrands.scss';\nimport { BrandConfiguration } from '../../../../types';\nimport { getFullBrandName } from '../../utils';\n\ntype AvailableBrands = Array<BrandConfiguration>;\n\ninterface PaymentMethodBrandsProps {\n    brands: AvailableBrands;\n    activeBrand: string;\n}\n\nconst AvailableBrands = ({ brands, activeBrand }: PaymentMethodBrandsProps) => {\n    if (!brands?.length) {\n        return null;\n    }\n\n    const isValidBrand = activeBrand !== 'card';\n    return (\n        <span\n            className={classNames('adyen-checkout__card__brands', {\n                'adyen-checkout__card__brands--hidden': isValidBrand\n            })}\n        >\n            {brands.map(({ name, icon }) => (\n                <span key={name} className=\"adyen-checkout__card__brands__brand-wrapper\">\n                    <Img src={icon} alt={getFullBrandName(name)} />\n                </span>\n            ))}\n        </span>\n    );\n};\n\nexport default AvailableBrands;\n","import { h } from 'preact';\nimport CardNumber from './CardNumber';\nimport CVC from './CVC';\nimport ExpirationDate from './ExpirationDate';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { CardFieldsProps } from './types';\nimport classNames from 'classnames';\nimport {\n    BRAND_ICON_UI_EXCLUSION_LIST,\n    DATE_POLICY_HIDDEN,\n    ENCRYPTED_CARD_NUMBER,\n    ENCRYPTED_EXPIRY_DATE,\n    ENCRYPTED_SECURITY_CODE\n} from '../../../../internal/SecuredFields/lib/constants';\nimport AvailableBrands from './AvailableBrands';\n\nexport default function CardFields({\n    brand,\n    brandsIcons,\n    brandsConfiguration,\n    dualBrandingElements,\n    errors,\n    focusedElement,\n    hasCVC,\n    cvcPolicy,\n    expiryDatePolicy,\n    onFocusField,\n    showBrandIcon,\n    valid,\n    showContextualElement\n}: CardFieldsProps) {\n    const { i18n } = useCoreContext();\n\n    const getError = (errors, fieldType) => {\n        return errors[fieldType] ? i18n.get(errors[fieldType]) : null;\n    };\n\n    // A set of brands filtered to exclude those that can never appear in the UI\n    const allowedBrands = brandsIcons?.filter(brandsIcons => !BRAND_ICON_UI_EXCLUSION_LIST?.includes(brandsIcons.name));\n    const isAmex = brand === 'amex';\n    const cvcContextualText = isAmex\n        ? i18n.get('creditCard.securityCode.contextualText.4digits')\n        : i18n.get('creditCard.securityCode.contextualText.3digits');\n\n    return (\n        <div className=\"adyen-checkout__card__form\">\n            <CardNumber\n                brand={brand}\n                brandsConfiguration={brandsConfiguration}\n                error={getError(errors, ENCRYPTED_CARD_NUMBER)}\n                focused={focusedElement === ENCRYPTED_CARD_NUMBER}\n                isValid={!!valid.encryptedCardNumber}\n                label={i18n.get('creditCard.cardNumber.label')}\n                onFocusField={onFocusField}\n                filled={!!errors.encryptedCardNumber || !!valid.encryptedCardNumber}\n                showBrandIcon={showBrandIcon}\n                dualBrandingElements={dualBrandingElements}\n            />\n\n            <AvailableBrands activeBrand={brand} brands={allowedBrands} />\n\n            <div\n                className={classNames('adyen-checkout__card__exp-cvc adyen-checkout__field-wrapper', {\n                    'adyen-checkout__card__exp-cvc__exp-date__input--hidden': expiryDatePolicy === DATE_POLICY_HIDDEN\n                })}\n            >\n                <ExpirationDate\n                    error={getError(errors, ENCRYPTED_EXPIRY_DATE)}\n                    focused={focusedElement === ENCRYPTED_EXPIRY_DATE}\n                    isValid={!!valid.encryptedExpiryMonth && !!valid.encryptedExpiryYear}\n                    filled={!!errors.encryptedExpiryDate || !!valid.encryptedExpiryYear}\n                    label={i18n.get('creditCard.expiryDate.label')}\n                    onFocusField={onFocusField}\n                    className={'adyen-checkout__field--50'}\n                    expiryDatePolicy={expiryDatePolicy}\n                    showContextualElement={showContextualElement}\n                    contextualText={i18n.get('creditCard.expiryDate.contextualText')}\n                />\n\n                {hasCVC && (\n                    <CVC\n                        error={getError(errors, ENCRYPTED_SECURITY_CODE)}\n                        focused={focusedElement === ENCRYPTED_SECURITY_CODE}\n                        cvcPolicy={cvcPolicy}\n                        isValid={!!valid.encryptedSecurityCode}\n                        filled={!!errors.encryptedSecurityCode || !!valid.encryptedSecurityCode}\n                        label={i18n.get('creditCard.securityCode.label')}\n                        onFocusField={onFocusField}\n                        className={'adyen-checkout__field--50'}\n                        frontCVC={isAmex}\n                        showContextualElement={showContextualElement}\n                        contextualText={cvcContextualText}\n                    />\n                )}\n            </div>\n        </div>\n    );\n}\n","import { h } from 'preact';\nimport InputBase from './InputBase';\n\nexport default function InputTelephone(props) {\n    return <InputBase {...props} type=\"tel\" />;\n}\n","import { h } from 'preact';\nimport { useMemo } from 'preact/hooks';\nimport classNames from 'classnames';\nimport Field from '../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { KCPProps } from './types';\nimport DataSfSpan from './DataSfSpan';\nimport InputTelephone from '../../../../internal/FormFields/InputTelephone';\nimport { alternativeLabelContent } from './FieldLabelAlternative';\nimport { CREDITCARD_TAX_NUMBER_INVALID } from '../../../../../core/Errors/constants';\n\nexport default function KCPAuthentication(props: KCPProps) {\n    const { i18n } = useCoreContext();\n\n    const taxNumberLabel = useMemo((): string => {\n        if (props.value?.length > 6) return i18n.get('creditCard.taxNumber.labelAlt');\n\n        return i18n.get('creditCard.taxNumber.label');\n    }, [props.value]);\n\n    return (\n        <div className=\"adyen-checkout__card__kcp-authentication\">\n            <Field\n                label={taxNumberLabel}\n                filled={props.filled}\n                classNameModifiers={['kcp-taxNumber']}\n                errorMessage={props.error && i18n.get(CREDITCARD_TAX_NUMBER_INVALID)}\n                isValid={props.isValid}\n                dir={'ltr'}\n                name={'kcpTaxNumberOrDOB'}\n                onFocus={e => props.onFieldFocusAnalytics('taxNumber', e)}\n                onBlur={e => props.onFieldBlurAnalytics('taxNumber', e)}\n            >\n                <InputTelephone\n                    name={'kcpTaxNumberOrDOB'}\n                    className=\"adyen-checkout__card__kcp-taxNumber__input adyen-checkout__input\"\n                    maxLength={10}\n                    minLength={6}\n                    autoComplete={'false'}\n                    value={props.value}\n                    required={true}\n                    onBlur={props.onBlur}\n                    onInput={props.onInput}\n                    disabled={props.disabled}\n                    placeholder={props.placeholder}\n                />\n            </Field>\n\n            <Field\n                label={i18n.get('creditCard.password.label')}\n                focused={props.focusedElement === 'encryptedPassword'}\n                filled={props.filled}\n                classNameModifiers={['50', 'koreanAuthentication-encryptedPassword']}\n                onFocusField={() => props.onFocusField('encryptedPassword')}\n                errorMessage={props.encryptedPasswordState.errors && i18n.get(String(props.encryptedPasswordState.errors))}\n                isValid={props.encryptedPasswordState.valid}\n                dir={'ltr'}\n                name={'encryptedPassword'}\n                useLabelElement={false}\n                renderAlternativeToLabel={alternativeLabelContent}\n            >\n                <DataSfSpan\n                    encryptedFieldType=\"encryptedPassword\"\n                    className={classNames({\n                        'adyen-checkout__input': true,\n                        'adyen-checkout__input--large': true,\n                        'adyen-checkout__input--error': props.encryptedPasswordState.errors,\n                        'adyen-checkout__input--valid': props.encryptedPasswordState.valid,\n                        'adyen-checkout__input--focus': props.focusedElement === 'encryptedPassword'\n                    })}\n                />\n            </Field>\n        </div>\n    );\n}\n","import { h } from 'preact';\nimport Field from '../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport InputText from '../FormFields/InputText';\n\nconst SocialSecurityNumberBrazil = ({\n    onBlur,\n    onInput,\n    valid = false,\n    error = null,\n    data = '',\n    required = false,\n    disabled = false,\n    onFieldFocusAnalytics = null,\n    onFieldBlurAnalytics = null\n}) => {\n    const { i18n } = useCoreContext();\n\n    return (\n        <Field\n            label={`${i18n.get('boleto.socialSecurityNumber')}`}\n            classNameModifiers={['socialSecurityNumber']}\n            errorMessage={error && error.errorMessage ? i18n.get(error.errorMessage) : !!error}\n            isValid={Boolean(valid)}\n            name={'socialSecurityNumber'}\n            onFocus={e => onFieldFocusAnalytics?.('socialSecurityNumber', e)}\n            onBlur={e => onFieldBlurAnalytics?.('socialSecurityNumber', e)}\n        >\n            <InputText\n                name={'socialSecurityNumber'}\n                autocorrect={'off'}\n                spellcheck={false}\n                value={data}\n                maxLength={18}\n                onInput={onInput}\n                onBlur={onBlur}\n                required={required}\n                disabled={disabled}\n            />\n        </Field>\n    );\n};\n\nexport default SocialSecurityNumberBrazil;\n","import { ComponentChild, h } from 'preact';\nimport cx from 'classnames';\nimport './Checkbox.scss';\nimport { ARIA_CONTEXT_SUFFIX, ARIA_ERROR_SUFFIX } from '../../../../core/Errors/constants';\n\ninterface CheckboxProps {\n    checked?: boolean;\n    classNameModifiers?: string[];\n    label?: string | ComponentChild;\n    name?: string;\n    isInvalid?: boolean;\n    onChange?;\n    onInput?;\n    className?: string;\n    value?: string;\n    uniqueId?: string;\n    showErrorElement?: boolean;\n    showContextualElement?: boolean;\n    disabled?: boolean;\n}\n\nexport default function Checkbox({ classNameModifiers = [], label, isInvalid, onChange, disabled = false, ...props }: CheckboxProps) {\n    // Strip some values from props. We need to reference them but don't want to set them as attributes.\n    const { uniqueId: uid, showErrorElement, showContextualElement, ...newProps } = props;\n\n    return (\n        <label className=\"adyen-checkout__checkbox\" htmlFor={uid}>\n            <input\n                id={uid}\n                {...newProps}\n                {...(showErrorElement && { 'aria-describedby': `${uid}${ARIA_ERROR_SUFFIX}` })}\n                {...(showContextualElement && { 'aria-describedby': `${uid}${ARIA_CONTEXT_SUFFIX}` })}\n                className={cx([\n                    'adyen-checkout__checkbox__input',\n                    [props.className],\n                    { 'adyen-checkout__checkbox__input--invalid': isInvalid },\n                    classNameModifiers.map(m => `adyen-checkout__input--${m}`)\n                ])}\n                type=\"checkbox\"\n                disabled={disabled}\n                onChange={onChange}\n            />\n            <span className=\"adyen-checkout__checkbox__label\">{label}</span>\n        </label>\n    );\n}\n\nCheckbox.defaultProps = {\n    onChange: () => {}\n};\n","import { useState, useEffect } from 'preact/hooks';\nimport { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Checkbox from '../FormFields/Checkbox';\nimport cx from 'classnames';\n\nimport './StoreDetails.scss';\n\ninterface StoreDetailsProps {\n    storeDetails?: boolean;\n    onChange: (value: boolean) => void;\n    disabled?: boolean;\n    className?: string;\n}\n\n/**\n * \"Store details\" generic checkbox\n */\nfunction StoreDetails({ storeDetails = false, disabled = false, className = '', ...props }: StoreDetailsProps) {\n    const { i18n } = useCoreContext();\n    const [value, setValue] = useState(storeDetails);\n\n    const onChange = e => {\n        setValue(e.target.checked);\n    };\n\n    useEffect(() => {\n        props.onChange(value);\n    }, [value]);\n\n    return (\n        <div className={cx('adyen-checkout__store-details', className)}>\n            <Checkbox onChange={onChange} disabled={disabled} label={i18n.get('storeDetails')} name={'storeDetails'} />\n        </div>\n    );\n}\n\nexport default StoreDetails;\n","import { Fragment, h } from 'preact';\nimport Fieldset from '../../FormFields/Fieldset';\nimport { ReadOnlyAddressProps } from '../types';\nimport { FALLBACK_VALUE } from '../constants';\n\nconst ReadOnlyAddress = ({ data, label }: ReadOnlyAddressProps) => {\n    const { street, houseNumberOrName, city, postalCode, stateOrProvince, country } = data;\n\n    return (\n        <Fieldset classNameModifiers={[label]} label={label} readonly>\n            <Fragment>\n                {!!street && street}\n                {houseNumberOrName && `, ${houseNumberOrName},`}\n                <br />\n                {postalCode && `${postalCode}`}\n                {city && `, ${city}`}\n                {stateOrProvince && stateOrProvince !== FALLBACK_VALUE && `, ${stateOrProvince}`}\n                {country && `, ${country} `}\n            </Fragment>\n        </Fieldset>\n    );\n};\n\nexport default ReadOnlyAddress;\n","import { CountryFormatRules, FormatRules } from '../../../utils/Validator/types';\nimport { Formatter } from '../../../utils/useForm/types';\nimport { getFormattingRegEx, SPECIAL_CHARS, trimValWithOneSpace } from '../../../utils/validator-utils';\n\nconst createFormatByDigits = (digits: number): Formatter => {\n    const format = new Array(digits).fill('9').join('');\n    return {\n        // Formatter - excludes non digits and limits to maxlength\n        formatterFn: val => val.replace(getFormattingRegEx('^\\\\d', 'g'), '').substring(0, digits),\n        format,\n        maxlength: digits\n    };\n};\n\nconst specialCharsRegEx = getFormattingRegEx(SPECIAL_CHARS);\nconst formattingFn = val => trimValWithOneSpace(val).replace(specialCharsRegEx, '');\n\nexport const addressFormatters: FormatRules = {\n    postalCode: {\n        formatterFn: (val, context) => {\n            const country = context.state.data.country;\n\n            // Country specific formatting rule\n            const specificRule = countrySpecificFormatters[country]?.postalCode.formatterFn;\n            if (specificRule) {\n                return specificRule(val);\n            }\n\n            // Default formatting rule: allow anything\n            return val;\n        }\n    },\n    street: {\n        formatterFn: formattingFn\n    },\n    houseNumberOrName: {\n        formatterFn: formattingFn\n    },\n    city: {\n        formatterFn: formattingFn\n    }\n};\n\n// TODO make proper formatter fns for those entries that don't just have a straightforward, x number of digits, no spaces, format\n//  check against our internal documentation on address postal code\n//  which, for example, says BR isn't just 8 digits (it can be spilt by a hyphen) & CZ can also be 5 digits, no spaces\nexport const countrySpecificFormatters: CountryFormatRules = {\n    AT: {\n        postalCode: createFormatByDigits(4)\n    },\n    AU: {\n        postalCode: createFormatByDigits(4)\n    },\n    BE: {\n        postalCode: createFormatByDigits(4)\n    },\n    BG: {\n        postalCode: createFormatByDigits(4)\n    },\n    BR: {\n        postalCode: {\n            // Formatter - excludes non digits, but allows hyphens, and limits to a maxlength that varies depending on whether a hyphen is present or not\n            formatterFn: val => {\n                const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n                const maxlength = nuVal.indexOf('-') > -1 ? 9 : 8;\n                return nuVal.substring(0, maxlength);\n            },\n            format: '12345678 or 12345-678',\n            maxlength: 9\n        }\n    },\n    CA: {\n        postalCode: {\n            format: 'A9A 9A9 or A9A9A9',\n            maxlength: 7\n        }\n    },\n    CH: {\n        postalCode: createFormatByDigits(4)\n    },\n    CY: {\n        postalCode: createFormatByDigits(4)\n    },\n    CZ: {\n        postalCode: {\n            format: '999 99',\n            maxlength: 6\n        }\n    },\n    DE: {\n        postalCode: createFormatByDigits(5)\n    },\n    DK: {\n        postalCode: {\n            format: '9999',\n            maxlength: 7\n        }\n    },\n    EE: {\n        postalCode: createFormatByDigits(5)\n    },\n    ES: {\n        postalCode: createFormatByDigits(5)\n    },\n    FI: {\n        postalCode: createFormatByDigits(5)\n    },\n    FR: {\n        postalCode: createFormatByDigits(5)\n    },\n    GB: {\n        postalCode: {\n            // Disallow special chars & set to maxlength\n            formatterFn: val => val.replace(getFormattingRegEx(SPECIAL_CHARS), '').substring(0, 8),\n            format: 'AA99 9AA or A99 9AA or A9 9AA',\n            maxlength: 8\n        }\n    },\n    GR: {\n        postalCode: {\n            format: '999 99',\n            maxlength: 6\n        }\n    },\n    HR: {\n        postalCode: {\n            format: '[1-5]9999',\n            maxlength: 5\n        }\n    },\n    HU: {\n        postalCode: createFormatByDigits(4)\n    },\n    IE: {\n        postalCode: {\n            format: 'A99 A999',\n            maxlength: 8\n        }\n    },\n    IS: {\n        postalCode: createFormatByDigits(3)\n    },\n    IT: {\n        postalCode: createFormatByDigits(5)\n    },\n    LI: {\n        postalCode: createFormatByDigits(4)\n    },\n    LT: {\n        postalCode: {\n            format: '9999 or 99999 or LT-99999',\n            maxlength: 8\n        }\n    },\n    LU: {\n        postalCode: createFormatByDigits(4)\n    },\n    LV: {\n        postalCode: {\n            format: '9999 or LV-9999',\n            maxlength: 7\n        }\n    },\n    MC: {\n        postalCode: {\n            format: '980NN',\n            maxlength: 5\n        }\n    },\n    MT: {\n        postalCode: {\n            format: 'AA99 or AAA99 or AA9999 or AAA9999',\n            maxlength: 8\n        }\n    },\n    MY: {\n        postalCode: createFormatByDigits(5)\n    },\n    NL: {\n        postalCode: {\n            format: '9999AA',\n            maxlength: 7\n        }\n    },\n    NZ: {\n        postalCode: createFormatByDigits(4)\n    },\n    NO: {\n        postalCode: createFormatByDigits(4)\n    },\n    PL: {\n        postalCode: {\n            // Formatter - excludes non digits, but allows hyphens, and limits to a maxlength that varies depending on whether a hyphen is present or not\n            formatterFn: val => {\n                const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n                const maxlength = nuVal.indexOf('-') > -1 ? 6 : 5;\n                return nuVal.substring(0, maxlength);\n            },\n            format: '99999 or 99-999',\n            maxlength: 6\n        }\n    },\n    PT: {\n        postalCode: {\n            formatterFn: val => {\n                const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n                return nuVal.substring(0, 8);\n            },\n            format: '9999-999',\n            maxlength: 8\n        }\n    },\n    RO: {\n        postalCode: createFormatByDigits(6)\n    },\n    SI: {\n        postalCode: {\n            format: '9999 or SI-9999',\n            maxlength: 7\n        }\n    },\n    SE: {\n        postalCode: createFormatByDigits(5)\n    },\n    SG: {\n        postalCode: createFormatByDigits(6)\n    },\n    SK: {\n        postalCode: {\n            format: '99999 or SK-99999',\n            maxlength: 8\n        }\n    },\n    JP: {\n        postalCode: {\n            format: '999-9999',\n            maxlength: 8\n        }\n    },\n    US: {\n        postalCode: {\n            formatterFn: val => {\n                const nuVal = val.replace(getFormattingRegEx('^\\\\d-', 'g'), '');\n                const maxlength = nuVal.indexOf('-') > -1 ? 10 : 5;\n                return nuVal.substring(0, maxlength);\n            },\n            format: '99999 or 99999-9999'\n        }\n    }\n};\n","import { ValidatorRules, ValidatorRule } from '../../../utils/Validator/types';\nimport { countrySpecificFormatters } from './validate.formats';\nimport { ERROR_FIELD_REQUIRED, ERROR_INVALID_FORMAT_EXPECTS } from '../../../core/Errors/constants';\nimport { isEmpty } from '../../../utils/validator-utils';\n\nconst createPatternByDigits = (digits: number) => {\n    return {\n        pattern: new RegExp(`\\\\d{${digits}}`)\n    };\n};\n\nexport const validatePostalCode = (val: string, countryCode: string, validatorRules: ValidatorRules) => {\n    if (countryCode) {\n        // If there is no value, we display the 'required' error message\n        if (isEmpty(val)) return null;\n\n        // Dynamically create errorMessage\n        (validatorRules.postalCode as ValidatorRule).errorMessage = {\n            translationKey: ERROR_INVALID_FORMAT_EXPECTS,\n            translationObject: {\n                values: {\n                    format: countrySpecificFormatters[countryCode]?.postalCode.format || null\n                }\n            }\n        };\n\n        const pattern = postalCodePatterns[countryCode]?.pattern;\n        return pattern ? pattern.test(val) : !!val; // No pattern? Accept any, filled, value.\n    }\n    // Default rule\n    return isEmpty(val) ? null : true;\n};\n\nconst postalCodePatterns = {\n    AT: createPatternByDigits(4),\n    AU: createPatternByDigits(4),\n    BE: { pattern: /(?:(?:[1-9])(?:\\d{3}))/ },\n    BG: createPatternByDigits(4),\n    BR: { pattern: /^\\d{5}-?\\d{3}$/ },\n    CA: { pattern: /(?:[ABCEGHJ-NPRSTVXY]\\d[A-Z][ -]?\\d[A-Z]\\d)/ },\n    CH: { pattern: /[1-9]\\d{3}/ },\n    CY: createPatternByDigits(4),\n    CZ: { pattern: /\\d{3}\\s?\\d{2}/ },\n    DE: createPatternByDigits(5),\n    DK: createPatternByDigits(4),\n    EE: createPatternByDigits(5),\n    ES: { pattern: /(?:0[1-9]|[1-4]\\d|5[0-2])\\d{3}/ },\n    FI: createPatternByDigits(5),\n    FR: createPatternByDigits(5),\n    GB: { pattern: /^([A-Za-z][A-Ha-hK-Yk-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$/ },\n    GE: createPatternByDigits(4),\n    GR: { pattern: /^\\d{3}\\s{0,1}\\d{2}$/ },\n    HR: { pattern: /^([1-5])[0-9]{4}$/ },\n    HU: createPatternByDigits(4),\n    IE: { pattern: /(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}/ },\n    IS: createPatternByDigits(3),\n    IT: createPatternByDigits(5),\n    LI: createPatternByDigits(4),\n    LT: { pattern: /^(LT-\\d{5}|\\d{4,5})$/ },\n    LU: createPatternByDigits(4),\n    LV: { pattern: /^(LV-)[0-9]{4}$/ },\n    MC: { pattern: /^980\\d{2}$/ },\n    MT: { pattern: /^[A-Za-z]{3}\\d{4}$/ },\n    MY: createPatternByDigits(5),\n    NL: { pattern: /(?:NL-)?(?:[1-9]\\d{3} ?(?:[A-EGHJ-NPRTVWXZ][A-EGHJ-NPRSTVWXZ]|S[BCEGHJ-NPRTVWXZ]))/ },\n    NO: createPatternByDigits(4),\n    PL: { pattern: /^\\d{2}[-]{0,1}\\d{3}$/ },\n    PT: { pattern: /^([1-9]\\d{3})([- ]?(\\d{3})? *)$/ },\n    RO: createPatternByDigits(6),\n    SI: createPatternByDigits(4),\n    SE: createPatternByDigits(5),\n    SG: createPatternByDigits(6),\n    SK: createPatternByDigits(5),\n    US: createPatternByDigits(5)\n};\n\n/**\n * Validates only postalCode property. As the partial address form does not have the country selector, the country value\n * must be informed beforehand and can't be picked up from the form context\n *\n * @param country - Country that will be used to validate postal code\n */\nexport const getPartialAddressValidationRules = (country: string): ValidatorRules => {\n    const validationRules: ValidatorRules = {\n        postalCode: {\n            modes: ['blur'],\n            validate: val => {\n                return validatePostalCode(val, country, validationRules);\n            },\n            errorMessage: ERROR_FIELD_REQUIRED\n        }\n    };\n    return validationRules;\n};\n\nexport const getAddressValidationRules = (specifications): ValidatorRules => {\n    const addressValidationRules: ValidatorRules = {\n        postalCode: {\n            modes: ['blur'],\n            validate: (val, context) => {\n                const country = context.state.data.country;\n                return validatePostalCode(val, country, addressValidationRules);\n            },\n            errorMessage: ERROR_FIELD_REQUIRED\n        },\n        houseNumberOrName: {\n            validate: (value, context) => {\n                const selectedCountry = context.state?.data?.country;\n                const isOptional = selectedCountry && specifications.countryHasOptionalField(selectedCountry, 'houseNumberOrName');\n                return isOptional || (isEmpty(value) ? null : true);\n            },\n            modes: ['blur'],\n            errorMessage: ERROR_FIELD_REQUIRED\n        },\n        default: {\n            validate: value => (isEmpty(value) ? null : true), // true, if there are chars other than spaces\n            modes: ['blur'],\n            errorMessage: ERROR_FIELD_REQUIRED\n        }\n    };\n    return addressValidationRules;\n};\n","/**\n * FALLBACK_CONTEXT\n */\nexport const FALLBACK_CONTEXT = 'https://checkoutshopper-live.adyen.com/checkoutshopper/';\n\nexport const GENERIC_OPTIONS = [\n    'amount',\n    'secondaryAmount',\n    'countryCode',\n    'environment',\n    '_environmentUrls',\n    'loadingContext',\n    'i18n',\n    'modules',\n    'order',\n    'session',\n    'clientKey',\n    'showPayButton',\n    'redirectFromTopWhenInIframe',\n\n    // Events\n    'onPaymentCompleted',\n    'onPaymentFailed',\n    'beforeRedirect',\n    'beforeSubmit',\n    'onSubmit',\n    'onActionHandled',\n    'onAdditionalDetails',\n    'onChange',\n    'onEnterKeyPressed',\n    'onError',\n    'onBalanceCheck',\n    'onOrderCancel',\n    'onOrderRequest',\n    'onOrderUpdated',\n    'onPaymentMethodsRequest'\n];\n\nexport const DEFAULT_HTTP_TIMEOUT = 60000;\n\nexport default {\n    FALLBACK_CONTEXT,\n    GENERIC_OPTIONS,\n    DEFAULT_HTTP_TIMEOUT\n};\n","import { DEFAULT_HTTP_TIMEOUT, FALLBACK_CONTEXT } from '../config';\nimport AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nexport interface HttpOptions {\n    accept?: string;\n    contentType?: string;\n    headers?;\n    loadingContext?: string;\n    method?: string;\n    path: string;\n    timeout?: number;\n    errorLevel?: ErrorLevel;\n    errorMessage?: string;\n    errorCode?: string;\n}\n\ninterface FetchErrorOptions {\n    message?: string;\n    level?: ErrorLevel;\n    cause?: unknown;\n    code?: string;\n}\n\ntype ErrorLevel = 'silent' | 'info' | 'warn' | 'error' | 'fatal';\n\ntype AdyenApiErrorResponse = {\n    errorCode: string;\n    message: string;\n    errorType: string;\n    status: number;\n};\n\nfunction isAdyenApiErrorResponse(data: any): data is AdyenApiErrorResponse {\n    return data && data.errorCode && data.errorType && data.message && data.status;\n}\n\nexport function http<T>(options: HttpOptions, data?: any): Promise<T> {\n    const {\n        headers = [],\n        errorLevel = 'warn',\n        errorCode,\n        loadingContext = FALLBACK_CONTEXT,\n        method = 'GET',\n        path,\n        timeout = DEFAULT_HTTP_TIMEOUT\n    } = options;\n\n    const request: RequestInit = {\n        method,\n        mode: 'cors',\n        cache: 'default',\n        credentials: 'same-origin',\n        headers: {\n            Accept: 'application/json, text/plain, */*',\n            'Content-Type': method === 'POST' ? 'application/json' : 'text/plain',\n            ...headers\n        },\n        redirect: 'follow',\n        referrerPolicy: 'no-referrer-when-downgrade',\n        ...(AbortSignal?.timeout && { signal: AbortSignal?.timeout(timeout) }),\n        ...(data && { body: JSON.stringify(data) })\n    };\n\n    const url = `${loadingContext}${path}`;\n\n    return (\n        fetch(url, request)\n            .then(async response => {\n                const data = await response.json();\n\n                if (response.ok) {\n                    return data;\n                }\n\n                if (isAdyenApiErrorResponse(data)) {\n                    handleFetchError({ message: data.message, level: errorLevel, cause: data, code: errorCode });\n                    return;\n                }\n\n                const errorMessage = options.errorMessage || `Service at ${url} is not available`;\n                handleFetchError({ message: errorMessage, level: errorLevel, cause: data, code: errorCode });\n                return;\n            })\n            /**\n             * Catch block handles Network error, CORS error, or exception throw by the `handleFetchError`\n             * inside the `then` block\n             */\n            .catch((error: unknown) => {\n                /**\n                 * If error is instance of AdyenCheckoutError, which means that it was already\n                 * handled by the `handleFetchError` on the `then` block, then we just throw it.\n                 * There is no need to create it again\n                 */\n                if (error instanceof AdyenCheckoutError) {\n                    throw error;\n                }\n\n                // eslint-disable-next-line @typescript-eslint/no-base-to-string,@typescript-eslint/restrict-template-expressions\n                const errorMessage = options.errorMessage || `Call to ${url} failed. Error= ${error}`;\n                handleFetchError({ message: errorMessage, level: errorLevel, cause: error, code: errorCode });\n            })\n    );\n}\n\nfunction handleFetchError({ message, level, cause, code }: FetchErrorOptions): void {\n    switch (level) {\n        case 'silent': {\n            break;\n        }\n        case 'info':\n        case 'warn':\n        case 'error': {\n            console[level](message);\n            break;\n        }\n        default:\n            throw new AdyenCheckoutError('NETWORK_ERROR', message, { cause, code });\n    }\n}\n\nexport function httpGet<T = any>(options: HttpOptions, data?: any): Promise<T> {\n    return http<T>({ ...options, method: 'GET' }, data);\n}\n\nexport function httpPost<T = any>(options: HttpOptions, data?: any): Promise<T> {\n    return http<T>({ ...options, method: 'POST' }, data);\n}\n","import { httpGet } from './http';\n\nexport default function getDataset(name: string, loadingContext, locale?) {\n    const options = {\n        loadingContext,\n        errorLevel: 'warn' as const,\n        errorMessage: `Dataset ${name} is not available`,\n        path: locale ? `datasets/${name}/${locale}.json` : `datasets/${name}.json`\n    };\n\n    return httpGet(options);\n}\n","import { h } from 'preact';\nimport { useState, useLayoutEffect } from 'preact/hooks';\nimport Field from '../../FormFields/Field';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport getDataset from '../../../../core/Services/get-dataset';\nimport { StateFieldItem, StateFieldProps } from '../types';\nimport Select from '../../FormFields/Select';\n\nexport default function StateField(props: StateFieldProps) {\n    const { classNameModifiers, label, onDropdownChange, readOnly, selectedCountry, specifications, value, required } = props;\n    const { i18n, loadingContext } = useCoreContext();\n    const [states, setStates] = useState<StateFieldItem[]>([]);\n    const [loaded, setLoaded] = useState<boolean>(false);\n\n    useLayoutEffect(() => {\n        if (!selectedCountry || !specifications.countryHasDataset(selectedCountry)) {\n            setStates([]);\n            setLoaded(true);\n            return;\n        }\n\n        getDataset(`states/${selectedCountry}`, loadingContext, i18n.locale)\n            .then(response => {\n                const newStates = response && response.length ? response : [];\n                setStates(newStates);\n                setLoaded(true);\n            })\n            .catch(() => {\n                setStates([]);\n                setLoaded(true);\n            });\n    }, [selectedCountry]);\n\n    if (!loaded || !states.length) return null;\n\n    return (\n        <Field\n            label={label}\n            classNameModifiers={classNameModifiers}\n            errorMessage={props.errorMessage}\n            isValid={!!value}\n            showValidIcon={false}\n            name={'stateOrProvince'}\n            i18n={i18n}\n            readOnly={readOnly && !!value}\n        >\n            <Select\n                name={'stateOrProvince'}\n                onChange={onDropdownChange}\n                selectedValue={value}\n                items={states}\n                required={required}\n                readonly={readOnly && !!value}\n            />\n        </Field>\n    );\n}\n","import { h } from 'preact';\nimport { useLayoutEffect, useState } from 'preact/hooks';\nimport Field from '../../FormFields/Field';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport getDataset from '../../../../core/Services/get-dataset';\nimport { CountryFieldProps, CountryFieldItem } from '../types';\nimport Select from '../../FormFields/Select';\n\nconst formatCountries = (countries: Array<CountryFieldItem>, allowedCountries: string[]) => {\n    const applyFilter = (country: CountryFieldItem) => allowedCountries.includes(country.id);\n    const applyMapper = (country: CountryFieldItem) => {\n        return {\n            ...country,\n            name: country.name,\n            selectedOptionName: country.name\n        };\n    };\n    return allowedCountries.length ? countries.filter(applyFilter).map(applyMapper) : countries.map(applyMapper);\n};\n\nexport default function CountryField(props: CountryFieldProps) {\n    const { allowedCountries = [], classNameModifiers = [], errorMessage, onDropdownChange, value, required } = props;\n    const { i18n, loadingContext } = useCoreContext();\n    const [countries, setCountries] = useState<CountryFieldItem[]>([]);\n    const [loaded, setLoaded] = useState<boolean>(false);\n    const [readOnly, setReadOnly] = useState(props.readOnly);\n\n    useLayoutEffect(() => {\n        getDataset('countries', loadingContext, i18n.locale)\n            .then(response => {\n                const newCountries = formatCountries(response, allowedCountries);\n                setCountries(newCountries || []);\n                setReadOnly(newCountries.length === 1 || readOnly);\n                setLoaded(true);\n            })\n            .catch(error => {\n                console.error(error);\n                setCountries([]);\n                setLoaded(true);\n            });\n    }, []);\n\n    if (!loaded) return null;\n\n    return (\n        <Field\n            name={'country'}\n            label={i18n.get('country')}\n            errorMessage={errorMessage}\n            classNameModifiers={classNameModifiers}\n            isValid={!!value}\n            showValidIcon={false}\n            i18n={i18n}\n            readOnly={readOnly && !!value}\n        >\n            <Select\n                onChange={onDropdownChange}\n                name={'country'}\n                selectedValue={value}\n                items={countries}\n                readonly={readOnly && !!value}\n                required={required}\n            />\n        </Field>\n    );\n}\n","import { h } from 'preact';\nimport Field from '../../FormFields/Field';\nimport StateField from './StateField';\nimport CountryField from './CountryField';\nimport { AddressStateError, FieldContainerProps } from '../types';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport Language from '../../../../language/Language';\nimport InputText from '../../FormFields/InputText';\n\nfunction getErrorMessage(errors: AddressStateError, fieldName: string, i18n: Language, label: string): string | boolean {\n    if (typeof errors[fieldName]?.errorMessage === 'object') {\n        const { translationKey, translationObject } = errors[fieldName].errorMessage;\n        return i18n.get(translationKey, translationObject);\n    }\n    // Default error msg: Enter the [label name]\n    const errorMsg = i18n.get(errors[fieldName]?.errorMessage, { values: { label: label.toLowerCase() } });\n    return errorMsg || !!errors[fieldName];\n}\n\n/**\n * USAGE: Specifically defined as a util to provide a wrapper for fields created within the Address component\n *\n * NOT TO BE USED: if you just want to add a Country or State dropdown outside of an Address component\n * - then you should implement <CountryField> or <StateField> directly\n */\nfunction FieldContainer(props: FieldContainerProps) {\n    const { i18n } = useCoreContext();\n    const { classNameModifiers = [], data, errors, valid, fieldName, onInput, onBlur, trimOnBlur, maxLength, disabled } = props;\n\n    const value: string = data[fieldName];\n    const selectedCountry: string = data.country;\n    const isOptional: boolean = props.specifications.countryHasOptionalField(selectedCountry, fieldName);\n    const labelKey: string = props.specifications.getKeyForField(fieldName, selectedCountry);\n    const optionalLabel = isOptional ? ` ${i18n.get('field.title.optional')}` : '';\n    const label = `${i18n.get(labelKey)}${optionalLabel}`;\n    const errorMessage = getErrorMessage(errors, fieldName, i18n, label);\n\n    switch (fieldName) {\n        case 'country':\n            return (\n                <CountryField\n                    allowedCountries={props.allowedCountries}\n                    classNameModifiers={classNameModifiers}\n                    label={label}\n                    errorMessage={errorMessage}\n                    onDropdownChange={props.onDropdownChange}\n                    value={value}\n                    required={!isOptional}\n                />\n            );\n        case 'stateOrProvince':\n            return (\n                <StateField\n                    classNameModifiers={classNameModifiers}\n                    label={label}\n                    errorMessage={errorMessage}\n                    onDropdownChange={props.onDropdownChange}\n                    selectedCountry={selectedCountry}\n                    specifications={props.specifications}\n                    value={value}\n                    required={!isOptional}\n                />\n            );\n        default:\n            return (\n                <Field\n                    label={label}\n                    classNameModifiers={classNameModifiers}\n                    errorMessage={errorMessage}\n                    isValid={valid[fieldName]}\n                    name={fieldName}\n                    i18n={i18n}\n                    onFocus={e => props.onFieldFocusAnalytics(fieldName, e)}\n                    onBlur={e => props.onFieldBlurAnalytics(fieldName, e)}\n                >\n                    <InputText\n                        name={fieldName}\n                        classNameModifiers={classNameModifiers}\n                        value={value}\n                        onInput={onInput}\n                        onBlur={onBlur}\n                        maxlength={maxLength}\n                        trimOnBlur={trimOnBlur}\n                        disabled={disabled}\n                        required={!isOptional}\n                    />\n                </Field>\n            );\n    }\n}\n\nexport default FieldContainer;\n","export const DEFAULT_DEBOUNCE_TIME_MS = 300;\n\nexport const debounce = (fn: Function, ms = DEFAULT_DEBOUNCE_TIME_MS) => {\n    let timeoutId: ReturnType<typeof setTimeout>;\n    return function (this: any, ...args: any[]) {\n        clearTimeout(timeoutId);\n        timeoutId = setTimeout(() => fn.apply(this, args), ms);\n    };\n};\n","import Field from '../../FormFields/Field';\nimport { h } from 'preact';\nimport { AddressLookupItem } from '../types';\nimport { useCallback, useEffect, useState, useMemo } from 'preact/hooks';\nimport './AddressSearch.scss';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { debounce } from '../../../../utils/debounce';\nimport Select from '../../FormFields/Select';\nimport { AddressData } from '../../../../types';\n\nexport type OnAddressLookupType = (\n    value: string,\n    actions: {\n        resolve: (value: Array<AddressLookupItem>) => void;\n        reject: (reason?: any) => void;\n    }\n) => Promise<void>;\n\nexport type OnAddressSelectedType = (\n    value: string,\n    actions: {\n        resolve: (value: AddressLookupItem) => void;\n        reject: (reason?: any) => void;\n    }\n) => Promise<void>;\n\ninterface AddressSearchProps {\n    onAddressLookup?: OnAddressLookupType;\n    onAddressSelected?: OnAddressSelectedType;\n    onSelect: (addressItem: AddressData) => void;\n    onManualAddress: any;\n    externalErrorMessage: string;\n    hideManualButton: boolean;\n    showContextualElement?: boolean;\n    contextualText?: string;\n    placeholder?: string;\n    addressSearchDebounceMs?: number;\n}\n\ninterface RejectionReason {\n    errorMessage: string;\n}\n\nexport default function AddressSearch({\n    onAddressLookup,\n    onAddressSelected,\n    onSelect,\n    onManualAddress,\n    externalErrorMessage,\n    hideManualButton,\n    showContextualElement,\n    contextualText,\n    placeholder,\n    addressSearchDebounceMs\n}: Readonly<AddressSearchProps>) {\n    const [formattedData, setFormattedData] = useState([]);\n    const [originalData, setOriginalData] = useState([]);\n\n    const [errorMessage, setErrorMessage] = useState('');\n\n    const { i18n } = useCoreContext();\n    const mapDataToSelect = data => data.map(({ id, name }) => ({ id, name }));\n\n    const handlePromiseReject = useCallback((reason: RejectionReason) => {\n        if (reason?.errorMessage) {\n            setErrorMessage(reason.errorMessage);\n        }\n    }, []);\n\n    const onTextInput = useCallback(\n        (inputValue: string) => {\n            new Promise<Array<AddressLookupItem>>((resolve, reject) => {\n                void onAddressLookup(inputValue, { resolve, reject });\n            })\n                .then(searchArray => {\n                    setOriginalData(searchArray);\n                    setFormattedData(mapDataToSelect(searchArray));\n                    setErrorMessage('');\n                })\n                .catch(reason => handlePromiseReject(reason));\n        },\n        [onAddressLookup]\n    );\n\n    // update error message when there's a new one\n    useEffect(() => {\n        setErrorMessage(externalErrorMessage);\n    }, [externalErrorMessage]);\n\n    const onSelectItem = event => {\n        if (!event.target.value) {\n            setErrorMessage(i18n.get('address.errors.incomplete'));\n            return;\n        }\n        const value = originalData.find(item => item.id === event.target.value);\n\n        // 1. in case we don't get a function just select item\n        if (typeof onAddressSelected !== 'function') {\n            onSelect(value);\n            setFormattedData([]);\n            return;\n        }\n\n        // 2. in case callback is provided, create and call onAddressSelected\n        new Promise<AddressLookupItem>((resolve, reject) => {\n            void onAddressSelected(value, { resolve, reject });\n        })\n            .then(fullData => {\n                onSelect(fullData);\n                setFormattedData([]);\n            })\n            .catch(reason => handlePromiseReject(reason));\n    };\n\n    const debounceInputHandler = useMemo(() => debounce(onTextInput, addressSearchDebounceMs), []);\n\n    return (\n        <div className={'adyen-checkout__address-search adyen-checkout__field-group'}>\n            <Field\n                label={i18n.get('address')}\n                classNameModifiers={['address-search']}\n                errorMessage={errorMessage}\n                name={'address-search'}\n                showContextualElement={showContextualElement}\n                contextualText={contextualText}\n            >\n                <Select\n                    name={'address-search'}\n                    className={'adyen-checkout__address-search__dropdown'}\n                    placeholder={placeholder}\n                    onInput={debounceInputHandler}\n                    items={formattedData}\n                    onChange={onSelectItem}\n                    disableTextFilter={true}\n                    blurOnClose={true}\n                />\n            </Field>\n            {!hideManualButton && (\n                <span className=\"adyen-checkout__address-search__manual-add\">\n                    <button\n                        type=\"button\"\n                        className=\"adyen-checkout__button adyen-checkout__button--inline adyen-checkout__button--link adyen-checkout__address-search__manual-add__button\"\n                        onClick={onManualAddress}\n                    >\n                        {'+ ' + i18n.get('address.enterManually')}\n                    </button>\n                </span>\n            )}\n        </div>\n    );\n}\n","import { Fragment, h } from 'preact';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'preact/hooks';\nimport Fieldset from '../FormFields/Fieldset';\nimport ReadOnlyAddress from './components/ReadOnlyAddress';\nimport { getAddressValidationRules } from './validate';\nimport { addressFormatters, countrySpecificFormatters } from './validate.formats';\nimport { AddressProps } from './types';\nimport { AddressData } from '../../../types/global-types';\nimport FieldContainer from './components/FieldContainer';\nimport useForm from '../../../utils/useForm';\nimport Specifications from './Specifications';\nimport { ADDRESS_SCHEMA, FALLBACK_VALUE } from './constants';\nimport { getMaxLengthByFieldAndCountry } from '../../../utils/validator-utils';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport AddressSearch from './components/AddressSearch';\nimport { ComponentMethodsRef } from '../UIElement/types';\n\nexport default function Address(props: AddressProps) {\n    const { i18n } = useCoreContext();\n\n    const { label = '', requiredFields, visibility, iOSFocusedField = null, showContextualElement } = props;\n\n    /** An object by which to expose 'public' members to the parent UIElement */\n    const addressRef = useRef<ComponentMethodsRef>({});\n    // Just call once\n    if (!Object.keys(addressRef.current).length) {\n        props.setComponentRef?.(addressRef.current);\n    }\n\n    const specifications = useMemo(() => new Specifications(props.specifications), [props.specifications]);\n\n    const requiredFieldsSchema = specifications.getAddressSchemaForCountryFlat(props.countryCode).filter(field => requiredFields.includes(field));\n\n    const [hasSelectedAddress, setHasSelectedAddress] = useState(false);\n\n    const [useManualAddress, setUseManualAddress] = useState(false);\n\n    const [searchErrorMessage, setSearchErrorMessage] = useState('');\n\n    const showAddressSearch = !!props.onAddressLookup;\n\n    const [ignoreCountryChange, setIgnoreCountryChange] = useState(false);\n\n    const showAddressFields = props.onAddressLookup ? hasSelectedAddress || useManualAddress : true;\n\n    const { data, errors, valid, isValid, handleChangeFor, triggerValidation, setData, mergeData } = useForm<AddressData>({\n        schema: requiredFieldsSchema,\n        defaultData: props.data,\n        // Ensure any passed validation rules are merged with the default ones\n        rules: { ...getAddressValidationRules(specifications), ...props.validationRules },\n        formatters: addressFormatters\n    });\n\n    const setSearchData = useCallback(\n        (selectedAddress: AddressData) => {\n            const propsKeysToProcess = ADDRESS_SCHEMA;\n            const newStateData = propsKeysToProcess.reduce((acc: AddressData, propKey) => {\n                // Make sure the data provided by the merchant is always strings\n                const providedValue = selectedAddress[propKey];\n                if (providedValue !== null && providedValue !== undefined) {\n                    // Cast everything to string\n                    acc[propKey] = String(providedValue);\n                }\n                return acc;\n            }, {});\n            mergeData(newStateData);\n            setIgnoreCountryChange(true);\n            triggerValidation();\n            setHasSelectedAddress(true);\n        },\n        [setHasSelectedAddress, triggerValidation, setData]\n    );\n\n    const onManualAddress = useCallback(() => {\n        setUseManualAddress(true);\n    }, []);\n\n    // Expose method expected by (parent) Address.tsx\n    addressRef.current.showValidation = () => {\n        triggerValidation();\n        if (showAddressSearch && !showAddressFields && !isValid) {\n            setSearchErrorMessage(i18n.get('address.errors.incomplete'));\n        } else {\n            setSearchErrorMessage('');\n        }\n    };\n\n    /**\n     * For iOS: iOSFocusedField is the name of the element calling for other elements to be disabled\n     * - so if it is set (meaning we are in iOS *and* an input has been focussed) only enable the field that corresponds to this element\n     */\n    const enabledFields: string[] = requiredFieldsSchema.filter(item => {\n        return !iOSFocusedField ? true : item === iOSFocusedField;\n    });\n\n    /**\n     * Effect that:\n     * - Resets validation for all fields by triggering handleChangeFor(fieldName, 'input')\n     * - Applies validation on postalCode field in case it has any value\n     */\n    useEffect((): void => {\n        // if the country was set via setSearchData we don't want to trigger this\n        if (ignoreCountryChange) {\n            setIgnoreCountryChange(false);\n            return;\n        }\n\n        const stateOrProvince = specifications.countryHasDataset(data.country) ? '' : FALLBACK_VALUE;\n        const newData = { ...data, stateOrProvince };\n\n        requiredFields.forEach(fieldName => {\n            handleChangeFor(fieldName, 'input')(newData[fieldName] ?? '');\n        });\n\n        if (newData.postalCode) {\n            handleChangeFor('postalCode', 'blur')(data.postalCode);\n        }\n    }, [data.country]);\n\n    /**\n     * Set the value of 'stateOrProvince' during the initial render if\n     * property is provided during the creation of the payment method\n     */\n    useEffect((): void => {\n        const stateFieldIsRequired = requiredFields.includes('stateOrProvince');\n        const countryHasStatesDataset = data.country && specifications.countryHasDataset(data.country);\n        const addressShouldHaveState = stateFieldIsRequired && countryHasStatesDataset;\n        const stateOrProvince = data.stateOrProvince || (addressShouldHaveState ? '' : FALLBACK_VALUE);\n\n        handleChangeFor('stateOrProvince', 'input')(stateOrProvince);\n    }, []);\n\n    useEffect((): void => {\n        const optionalFields = specifications.getOptionalFieldsForCountry(data.country);\n        const processedData = ADDRESS_SCHEMA.reduce((acc, cur) => {\n            const isOptional = optionalFields.includes(cur);\n            const isRequired = requiredFields.includes(cur);\n            const newValue = data[cur];\n            const initialValue = props.data[cur];\n            // recover default data values which are not requiredFields, or prefill with 'N/A'\n            const fallbackValue = !isRequired && !newValue && !!initialValue ? initialValue : FALLBACK_VALUE;\n            const value = (isOptional && !newValue) || !isRequired ? fallbackValue : newValue;\n            if (value?.length) acc[cur] = value;\n            return acc;\n        }, {});\n\n        props.onChange({ data: processedData, valid, errors, isValid });\n    }, [data, valid, errors, isValid]);\n\n    if (visibility === 'hidden') return null;\n    if (visibility === 'readOnly') return <ReadOnlyAddress data={data} label={label} />;\n\n    const getComponent = (fieldName: string, { classNameModifiers = [] }) => {\n        if (!requiredFields.includes(fieldName)) return null;\n\n        return (\n            <FieldContainer\n                key={fieldName}\n                allowedCountries={props.allowedCountries}\n                classNameModifiers={[...classNameModifiers, fieldName]}\n                data={data}\n                errors={errors}\n                valid={valid}\n                fieldName={fieldName}\n                onInput={handleChangeFor(fieldName, 'input')}\n                onBlur={handleChangeFor(fieldName, 'blur')}\n                onDropdownChange={handleChangeFor(fieldName, 'blur')}\n                specifications={specifications}\n                maxLength={getMaxLengthByFieldAndCountry(countrySpecificFormatters, fieldName, data.country, true)}\n                trimOnBlur={true}\n                disabled={!enabledFields.includes(fieldName)}\n                onFieldFocusAnalytics={props.onFieldFocusAnalytics}\n                onFieldBlurAnalytics={props.onFieldBlurAnalytics}\n            />\n        );\n    };\n\n    const getWrapper = group => (\n        <div className=\"adyen-checkout__field-group\">\n            {group.map(([field, size]) => getComponent(field, { classNameModifiers: [`col-${size}`] }))}\n        </div>\n    );\n\n    const addressSchema = specifications.getAddressSchemaForCountry(data.country);\n\n    return (\n        <Fragment>\n            <Fieldset classNameModifiers={[label || 'address']} label={label}>\n                {showAddressSearch && (\n                    <AddressSearch\n                        onAddressLookup={props.onAddressLookup}\n                        onAddressSelected={props.onAddressSelected}\n                        onSelect={setSearchData}\n                        onManualAddress={onManualAddress}\n                        externalErrorMessage={searchErrorMessage}\n                        hideManualButton={showAddressFields}\n                        showContextualElement={showContextualElement}\n                        contextualText={i18n.get('address.search.contextualText')}\n                        addressSearchDebounceMs={props.addressSearchDebounceMs}\n                    />\n                )}\n                {showAddressFields && (\n                    <Fragment>{addressSchema.map(field => (field instanceof Array ? getWrapper(field) : getComponent(field, {})))}</Fragment>\n                )}\n            </Fieldset>\n        </Fragment>\n    );\n}\n\nAddress.defaultProps = {\n    countryCode: null,\n    validationRules: null,\n    data: {},\n    onChange: () => {},\n    visibility: 'editable',\n    requiredFields: ADDRESS_SCHEMA,\n    specifications: {},\n    onFieldFocusAnalytics: () => {},\n    onFieldBlurAnalytics: () => {}\n};\n","import { h } from 'preact';\nimport Field from '../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { CardHolderNameProps } from './types';\nimport InputText from '../../../../internal/FormFields/InputText';\nimport { CREDITCARD_HOLDER_NAME_INVALID } from '../../../../../core/Errors/constants';\n\nexport default function CardHolderName({\n    onBlur,\n    onInput,\n    placeholder,\n    value,\n    required,\n    error = false,\n    isValid,\n    disabled,\n    onFieldFocusAnalytics,\n    onFieldBlurAnalytics\n}: CardHolderNameProps) {\n    const { i18n } = useCoreContext();\n\n    return (\n        <Field\n            label={i18n.get('creditCard.holderName')}\n            className={'adyen-checkout__card__holderName'}\n            errorMessage={error && i18n.get(CREDITCARD_HOLDER_NAME_INVALID)}\n            isValid={!!isValid}\n            name={'holderName'}\n            i18n={i18n}\n            onFocus={e => onFieldFocusAnalytics('holderName', e)}\n            onBlur={e => onFieldBlurAnalytics('holderName', e)}\n        >\n            <InputText\n                name={'holderName'}\n                className=\"adyen-checkout__card__holderName__input adyen-checkout__input\"\n                placeholder={placeholder}\n                autocomplete={'cc-name'}\n                {...{ value, required, onBlur, onInput, disabled }}\n            />\n        </Field>\n    );\n}\n","import { h } from 'preact';\nimport { useState } from 'preact/hooks';\nimport classNames from 'classnames';\nimport { RadioButtonIconProps } from './types';\nimport './RadioButtonIcon.scss';\n\nconst RadioButtonIcon = ({ dataValue, imageURL, altName, showRadioIcon }: RadioButtonIconProps) => {\n    const [hasLoaded, setHasLoaded] = useState(false);\n\n    const handleError = () => {\n        setHasLoaded(false);\n    };\n\n    const handleLoad = () => {\n        setHasLoaded(true);\n    };\n\n    const fieldClassnames = classNames({\n        'adyen-checkout__input-icon': true,\n        'adyen-checkout__input-icon--hidden': !hasLoaded,\n        'adyen-checkout__input-icon--no-radio-icon': !showRadioIcon\n    });\n\n    return <img className={fieldClassnames} onError={handleError} onLoad={handleLoad} alt={altName} src={imageURL} data-value={dataValue} />;\n};\n\nexport default RadioButtonIcon;\n","import { h } from 'preact';\nimport cx from 'classnames';\nimport { RadioGroupExtendedProps } from './types';\nimport { getUniqueId } from '../../../../utils/idGenerator';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport RadioButtonIcon from './RadioButtonIcon';\nimport Icon from '../../Icon';\nimport { PREFIX } from '../../Icon/constants';\nimport './RadioGroupExtended.scss';\nimport '../RadioGroup/RadioGroup.scss';\n\nexport default function RadioGroupExtended(props: RadioGroupExtendedProps) {\n    const { items, name, onChange, value, isInvalid, uniqueId, ariaLabel, showRadioIcon = false, showSelectedTick = false, style = 'button' } = props;\n\n    const { i18n } = useCoreContext();\n    const uniqueIdBase = uniqueId?.replace(/[0-9]/g, '').substring(0, uniqueId.lastIndexOf('-'));\n\n    let invalidClassName = '';\n    if (isInvalid) {\n        invalidClassName = showRadioIcon ? 'adyen-checkout__radio_group__label--invalid' : 'adyen-checkout__radio_group__label--no-radio--invalid';\n    }\n\n    const fieldClassnames = cx([\n        'adyen-checkout__label__text',\n        showRadioIcon ? 'adyen-checkout__radio_group__label' : 'adyen-checkout__radio_group__label--no-radio',\n        props.className,\n        invalidClassName\n    ]);\n\n    return (\n        <div\n            className={cx(['adyen-checkout__radio_group', `adyen-checkout__radio_group--${style}`])}\n            role={'radiogroup'}\n            {...(ariaLabel && { ['aria-label']: ariaLabel })}\n        >\n            {items.map(item => {\n                const uniqueId = getUniqueId(uniqueIdBase);\n\n                return (\n                    <div key={item.id} className=\"adyen-checkout__radio_group__input-wrapper adyen-checkout__field--50\">\n                        <input\n                            id={uniqueId}\n                            type={'radio'}\n                            checked={value === item.id}\n                            className=\"adyen-checkout__radio_group__input\"\n                            name={name}\n                            onChange={onChange}\n                            value={item.id}\n                        />\n                        {/*eslint-disable-next-line jsx-a11y/label-has-associated-control*/}\n                        <label className={fieldClassnames} htmlFor={uniqueId}>\n                            <div className={'adyen-checkout__radio_group-extended__label-wrapper'}>\n                                <RadioButtonIcon\n                                    key={item.id}\n                                    imageURL={item.imageURL}\n                                    altName={item.altName}\n                                    dataValue={item.id}\n                                    showRadioIcon={showRadioIcon}\n                                />\n                                <span className={'adyen-checkout__radio_group-extended__label'}>{i18n.get(item.name)}</span>\n                                {showSelectedTick && (\n                                    <span\n                                        className={cx({\n                                            'adyen-checkout-input__inline-validation': true,\n                                            'adyen-checkout-input__inline-validation--valid': value === item.id\n                                        })}\n                                    >\n                                        <Icon type={`${PREFIX}checkmark`} alt={i18n?.get('field.valid')} />\n                                    </span>\n                                )}\n                            </div>\n                        </label>\n                    </div>\n                );\n            })}\n        </div>\n    );\n}\n\nRadioGroupExtended.defaultProps = {\n    onChange: () => {},\n    items: []\n};\n","import { h } from 'preact';\nimport LoadingWrapper from '../../../../internal/LoadingWrapper';\nimport CardFields from './CardFields';\nimport KCPAuthentication from './KCPAuthentication';\nimport SocialSecurityNumberBrazil from '../../../../internal/SocialSecurityNumberBrazil/SocialSecurityNumberBrazil';\nimport StoreDetails from '../../../../internal/StoreDetails';\nimport Address from '../../../../internal/Address';\nimport CardHolderName from './CardHolderName';\nimport Installments from './Installments';\nimport DisclaimerMessage from '../../../../internal/DisclaimerMessage';\nimport RadioGroupExtended from '../../../../internal/FormFields/RadioGroupExtended';\nimport { mapDualBrandButtons } from '../utils';\nimport Fieldset from '../../../../internal/FormFields/Fieldset';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\n\nexport const CardFieldsWrapper = ({\n    // vars created in CardInput:\n    // base (shared)\n    data,\n    valid,\n    errors,\n    handleChangeFor,\n    sfpState,\n    setFocusOn,\n    cvcPolicy,\n    focusedElement,\n    hasInstallments,\n    handleInstallments,\n    showAmountsInInstallments,\n    // Card\n    brandsIcons,\n    formData,\n    formErrors,\n    formValid,\n    expiryDatePolicy,\n    dualBrandSelectElements,\n    extensions,\n    selectedBrandValue,\n    // KCP\n    showKCP,\n    // SSN\n    showBrazilianSSN,\n    socialSecurityNumber,\n    // Store details\n    handleOnStoreDetails,\n    // Address\n    billingAddress,\n    handleAddress,\n    setAddressRef,\n    partialAddressSchema,\n    onAddressLookup,\n    onAddressSelected,\n    addressSearchDebounceMs,\n    // For this comp (props passed through from CardInput)\n    amount,\n    billingAddressRequired,\n    billingAddressRequiredFields,\n    billingAddressAllowedCountries,\n    billingAddressValidationRules = null,\n    brandsConfiguration,\n    showStoreDetailsCheckbox,\n    hasCVC,\n    hasHolderName,\n    holderNameRequired,\n    installmentOptions,\n    placeholders,\n    positionHolderNameOnTop,\n    // For CardFields > CardNumber\n    showBrandIcon,\n    showContextualElement,\n    //\n    iOSFocusedField,\n    disclaimerMessage,\n    //\n    onFieldFocusAnalytics,\n    onFieldBlurAnalytics\n}) => {\n    const { i18n } = useCoreContext();\n\n    const cardHolderField = (\n        <CardHolderName\n            required={holderNameRequired}\n            placeholder={placeholders.holderName}\n            value={formData.holderName}\n            error={!!formErrors.holderName && holderNameRequired}\n            isValid={!!formValid.holderName}\n            onBlur={handleChangeFor('holderName', 'blur')}\n            onInput={handleChangeFor('holderName', 'input')}\n            disabled={iOSFocusedField && iOSFocusedField !== 'holderName'}\n            onFieldFocusAnalytics={onFieldFocusAnalytics}\n            onFieldBlurAnalytics={onFieldBlurAnalytics}\n        />\n    );\n\n    return (\n        <LoadingWrapper status={sfpState.status}>\n            {hasHolderName && positionHolderNameOnTop && cardHolderField}\n\n            <CardFields\n                showBrandIcon={showBrandIcon}\n                showContextualElement={showContextualElement}\n                brand={sfpState.brand}\n                brandsIcons={brandsIcons}\n                brandsConfiguration={brandsConfiguration}\n                focusedElement={focusedElement}\n                onFocusField={setFocusOn}\n                hasCVC={hasCVC}\n                cvcPolicy={cvcPolicy}\n                expiryDatePolicy={expiryDatePolicy}\n                errors={sfpState.errors}\n                valid={sfpState.valid}\n                dualBrandingElements={dualBrandSelectElements.length > 0 && dualBrandSelectElements}\n            />\n\n            {hasHolderName && !positionHolderNameOnTop && cardHolderField}\n\n            {dualBrandSelectElements.length > 0 && dualBrandSelectElements && (\n                <Fieldset classNameModifiers={['dual-brand-switcher']} label={i18n.get('creditCard.dualBrand.title')}>\n                    <p className={'adyen-checkout-form-instruction'}>{i18n.get('creditCard.dualBrand.description')}</p>\n                    <RadioGroupExtended\n                        name={'dualBrandSwitcher'}\n                        value={selectedBrandValue} // Set which button is in a selected (checked) state\n                        items={mapDualBrandButtons(dualBrandSelectElements, brandsConfiguration)}\n                        onChange={extensions.handleDualBrandSelection}\n                        required={true}\n                        showSelectedTick={true}\n                    />\n                </Fieldset>\n            )}\n\n            {showKCP && (\n                <KCPAuthentication\n                    onFocusField={setFocusOn}\n                    focusedElement={focusedElement}\n                    encryptedPasswordState={{\n                        data: sfpState.encryptedPassword,\n                        valid: sfpState.valid ? sfpState.valid.encryptedPassword : false,\n                        errors: sfpState.errors ? sfpState.errors.encryptedPassword : false\n                    }}\n                    value={data.taxNumber}\n                    error={!!errors.taxNumber}\n                    isValid={!!valid.taxNumber}\n                    onBlur={handleChangeFor('taxNumber', 'blur')}\n                    onInput={handleChangeFor('taxNumber', 'input')}\n                    disabled={iOSFocusedField && iOSFocusedField !== 'kcpTaxNumberOrDOB'}\n                    placeholder={placeholders.taxNumber}\n                    onFieldFocusAnalytics={onFieldFocusAnalytics}\n                    onFieldBlurAnalytics={onFieldBlurAnalytics}\n                />\n            )}\n\n            {showBrazilianSSN && (\n                <div className=\"adyen-checkout__card__socialSecurityNumber\">\n                    <SocialSecurityNumberBrazil\n                        onBlur={handleChangeFor('socialSecurityNumber', 'blur')}\n                        onInput={handleChangeFor('socialSecurityNumber', 'input')}\n                        error={errors?.socialSecurityNumber}\n                        valid={valid?.socialSecurityNumber}\n                        data={socialSecurityNumber}\n                        required={true}\n                        disabled={iOSFocusedField && iOSFocusedField !== 'socialSecurityNumber'}\n                        onFieldFocusAnalytics={onFieldFocusAnalytics}\n                        onFieldBlurAnalytics={onFieldBlurAnalytics}\n                    />\n                </div>\n            )}\n\n            {showStoreDetailsCheckbox && <StoreDetails onChange={handleOnStoreDetails} />}\n\n            {hasInstallments && (\n                <Installments\n                    amount={amount}\n                    brand={sfpState.brand}\n                    installmentOptions={installmentOptions}\n                    onChange={handleInstallments}\n                    type={showAmountsInInstallments ? 'amount' : 'months'}\n                />\n            )}\n\n            {billingAddressRequired && (\n                <Address\n                    label=\"billingAddress\"\n                    data={billingAddress}\n                    onChange={handleAddress}\n                    allowedCountries={billingAddressAllowedCountries}\n                    requiredFields={billingAddressRequiredFields}\n                    setComponentRef={setAddressRef}\n                    validationRules={billingAddressValidationRules}\n                    specifications={partialAddressSchema}\n                    iOSFocusedField={iOSFocusedField}\n                    onAddressLookup={onAddressLookup}\n                    showContextualElement={showContextualElement}\n                    onAddressSelected={onAddressSelected}\n                    addressSearchDebounceMs={addressSearchDebounceMs}\n                    onFieldFocusAnalytics={onFieldFocusAnalytics}\n                    onFieldBlurAnalytics={onFieldBlurAnalytics}\n                />\n            )}\n\n            {disclaimerMessage && (\n                <DisclaimerMessage\n                    message={disclaimerMessage.message.replace('%{linkText}', `%#${disclaimerMessage.linkText}%#`)}\n                    urls={[disclaimerMessage.link]}\n                />\n            )}\n        </LoadingWrapper>\n    );\n};\n","import { ENCRYPTED_CARD_NUMBER, CREDIT_CARD_SF_FIELDS } from '../../../internal/SecuredFields/lib/constants';\nimport { selectOne } from '../../../internal/SecuredFields/lib/utilities/dom';\nimport { CardFocusData } from '../../../internal/SecuredFields/lib/types';\n\n/**\n * Helper for CardInput - gets a field name and sets focus on it\n */\nexport const setFocusOnFirstField = (isValidating, sfp, fieldToFocus) => {\n    if (isValidating) {\n        // If not a cardInput related securedField - find field and set focus on it\n        if (!CREDIT_CARD_SF_FIELDS.includes(fieldToFocus)) {\n            setFocusOnNonSF(fieldToFocus, sfp);\n        } else {\n            // Is a securedField - so it has its own focus procedures\n            sfp.current.setFocusOn(fieldToFocus);\n        }\n    }\n};\n\nexport const getAddressHandler = (setFormData, setFormValid, setFormErrors) => {\n    // Return Handler fn:\n    return address => {\n        setFormData('billingAddress', address.data);\n        setFormValid('billingAddress', address.isValid);\n        setFormErrors('billingAddress', address.errors);\n    };\n};\n\nexport const getFocusHandler = (setFocusedElement, onFocus, onBlur) => {\n    // Return Handler fn:\n    return (e: CardFocusData) => {\n        setFocusedElement(e.currentFocusObject);\n        e.focus === true ? onFocus(e.fieldType, e) : onBlur(e.fieldType, e);\n    };\n};\n\nexport const getAutoJumpHandler = (isAutoJumping, sfp, layout) => {\n    return () => {\n        if (!isAutoJumping.current) {\n            isAutoJumping.current = true;\n\n            // CardInput can call this more than once in quick succession\n            // e.g. if field was in error (error + fieldValid) or other SFs are optional (fieldValid + allValid) etc\n            // - so make async to avoid double setFocus call\n            void Promise.resolve().then(() => {\n                const panIndex = layout.findIndex(elem => elem === ENCRYPTED_CARD_NUMBER);\n                const subsequentFields = layout.slice(panIndex + 1);\n\n                /**\n                 * Investigate subsequent fields to see if they can/should accept focus\n                 */\n                for (const field of subsequentFields) {\n                    // Is the next field a credit card related securedField?\n                    if (CREDIT_CARD_SF_FIELDS.includes(field)) {\n                        const isOptionalOrHidden = sfp.current.sfIsOptionalOrHidden(field);\n                        if (!isOptionalOrHidden) {\n                            sfp.current.setFocusOn(field);\n                            break;\n                        }\n                    } else {\n                        // If it isn't an SF - shift focus to it (we're currently not concerned with whether the field is optional)\n\n                        setFocusOnNonSF(field, sfp);\n                        break;\n                    }\n                }\n\n                isAutoJumping.current = false;\n            });\n        }\n    };\n};\n\nconst setFocusOnNonSF = (field, sfp) => {\n    let nameVal: string = field;\n\n    // We have an exception with the kcp taxNumber where the name of the field ('kcpTaxNumberOrDOB') doesn't match\n    // the value by which the field is referred to internally ('taxNumber')\n    if (nameVal === 'taxNumber') nameVal = 'kcpTaxNumberOrDOB';\n\n    if (nameVal === 'country' || nameVal === 'stateOrProvince') {\n        // Set focus on dropdown\n        const field: HTMLElement = selectOne(sfp.current.rootNode, `.adyen-checkout__field--${nameVal} .adyen-checkout__filter-input`);\n        field?.focus();\n    } else {\n        // Set focus on input\n        const field: HTMLElement = selectOne(sfp.current.rootNode, `[name=\"${nameVal}\"]`);\n        field?.focus();\n    }\n};\n","// Pass 2 arrays of similar objects - and compare for differences\nexport function getArrayDifferences<A, S extends string>(currentArray: A[], previousArray: A[], comparisonKey?: S): A[] {\n    let difference;\n\n    const compKey = comparisonKey || 'id';\n\n    // If nothing to compare - take the new item...\n    if (currentArray.length === 1 && !previousArray) {\n        difference = currentArray;\n    }\n    // .. else, find the difference: what's in the new array that wasn't in the old array?\n    if (currentArray.length > previousArray?.length) {\n        difference = currentArray.filter(({ [compKey]: id1 }) => !previousArray.some(({ [compKey]: id2 }) => id2 === id1));\n    }\n    return difference;\n}\n","import { h } from 'preact';\nimport './FormInstruction.scss';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\n\nconst FormInstruction = () => {\n    const { i18n } = useCoreContext();\n    return <p className=\"adyen-checkout-form-instruction\">{i18n.get('form.instruction')}</p>;\n};\n\nexport default FormInstruction;\n","import { createContext } from 'preact';\nimport { SRPanel } from './SRPanel';\nimport { SetSRMessagesReturnFn } from './SRPanelProvider';\nimport { FieldTypeMappingFn } from './types';\n\ninterface SetSRMessagesFromObjectsFnProps {\n    fieldTypeMappingFn?: FieldTypeMappingFn;\n}\n\ntype SetSRMessagesFromObjectsFn = (props: SetSRMessagesFromObjectsFnProps) => SetSRMessagesReturnFn;\n\nexport interface ISRPanelContext {\n    srPanel: SRPanel;\n    setSRMessagesFromObjects: SetSRMessagesFromObjectsFn;\n    setSRMessagesFromStrings: (strs) => void;\n    clearSRPanel: () => void;\n    shouldMoveFocusSR: boolean;\n}\n\n// Will be needed once PersonalDetails & Address have ability to administer their own SRPanel\n// export const mockSRContext: ISRPanelContext = {\n//     srPanel: null,\n//     setSRMessagesFromObjects: null,\n//     setSRMessagesFromStrings: null,\n//     clearSRPanel: null,\n//     shouldMoveFocusSR: null\n// };\n\nexport const SRPanelContext = createContext<ISRPanelContext>({\n    srPanel: null,\n    setSRMessagesFromObjects: null,\n    setSRMessagesFromStrings: null,\n    clearSRPanel: null,\n    shouldMoveFocusSR: null\n});\n","import { useContext } from 'preact/hooks';\nimport { ISRPanelContext, SRPanelContext } from './SRPanelContext';\n\nfunction useSRPanelContext(): ISRPanelContext {\n    return useContext(SRPanelContext);\n}\n\nexport default useSRPanelContext;\n","import { useRef, useEffect } from 'preact/hooks';\n\nexport function usePrevious<T>(value: T): T {\n    const ref: any = useRef<T>();\n\n    // Store current value in ref\n    useEffect(() => {\n        ref.current = value;\n    }, [value]); // Only re-run if value changes\n\n    // Return previous value\n    return ref.current;\n}\n","import { useEffect, useState } from 'preact/hooks';\nimport useSRPanelContext from '../../../../core/Errors/useSRPanelContext';\nimport { SetSRMessagesReturnFn } from '../../../../core/Errors/SRPanelProvider';\nimport { handlePartialAddressMode, lookupBlurBasedErrors, mapFieldKey } from './utils';\nimport { usePrevious } from '../../../../utils/hookUtils';\nimport { SetSRMessagesReturnObject, SortedErrorObject } from '../../../../core/Errors/types';\nimport { ERROR_ACTION_BLUR_SCENARIO, ERROR_ACTION_FOCUS_FIELD } from '../../../../core/Errors/constants';\nimport { setFocusOnFirstField } from './handlers';\nimport { getArrayDifferences } from '../../../../utils/arrayUtils';\n\nconst useSRPanelForCardInputErrors = ({ errors, props, isValidating, retrieveLayout, specifications, billingAddress, sfp }) => {\n    // Extract fns from context\n    const { setSRMessagesFromObjects, setSRMessagesFromStrings, clearSRPanel, shouldMoveFocusSR } = useSRPanelContext();\n\n    // Generate a setSRMessages function - implemented as a partial, since the initial set of arguments don't change.\n    const setSRMessages: SetSRMessagesReturnFn = setSRMessagesFromObjects?.({\n        fieldTypeMappingFn: mapFieldKey\n    });\n\n    const partialAddressSchema = handlePartialAddressMode(props.billingAddressMode);\n\n    const [sortedErrorList, setSortedErrorList] = useState<SortedErrorObject[]>(null);\n\n    // Get the previous list of errors\n    const previousSortedErrors = usePrevious(sortedErrorList);\n\n    const sfStateErrorsObj = sfp.current?.mapErrorsToValidationRuleResult();\n    const mergedErrors = { ...errors, ...sfStateErrorsObj };\n\n    useEffect(() => {\n        try {\n            // Extract and then flatten billingAddress errors into a new object with *all* the field errors at top level\n            const { billingAddress: extractedAddressErrors, ...errorsWithoutAddress } = mergedErrors;\n\n            const errorsForPanel = { ...errorsWithoutAddress, ...extractedAddressErrors };\n\n            // Pass dynamic props (errors, layout etc) to SRPanel via partial\n            const srPanelResp: SetSRMessagesReturnObject = setSRMessages?.({\n                errors: errorsForPanel,\n                isValidating: isValidating.current,\n                layout: retrieveLayout(),\n                // If we don't have country specific address labels, we might have a label related to a partialAddressSchema (i.e. zipCode)\n                countrySpecificLabels: specifications.getAddressLabelsForCountry(billingAddress?.country) ?? partialAddressSchema?.default?.labels\n            });\n\n            // Store the array of sorted error objects separately so that we can use it to make comparisons between the old and new arrays\n            const currentErrorsSortedByLayout = srPanelResp?.currentErrorsSortedByLayout;\n            setSortedErrorList(currentErrorsSortedByLayout);\n\n            /**\n             * Need extra actions after setting SRPanel messages in order to focus field (if required) and because we have some errors that are fired onBlur\n             */\n            switch (srPanelResp?.action) {\n                // A call to focus the first field in error will always follow the call to validate the whole form\n                case ERROR_ACTION_FOCUS_FIELD:\n                    if (shouldMoveFocusSR) setFocusOnFirstField(isValidating.current, sfp, srPanelResp?.fieldToFocus);\n                    // Remove 'showValidation' mode - allowing time for collation of all the fields in error whilst it is 'showValidation' mode (some errors come in a second render pass)\n                    setTimeout(() => {\n                        isValidating.current = false;\n                    }, 300);\n                    break;\n\n                /**\n                 * Relates to errors triggered by a field blurring (some pm forms have this, some don't) - check if there is an error to either set or to clear\n                 */\n                case ERROR_ACTION_BLUR_SCENARIO: {\n                    const difference = getArrayDifferences<SortedErrorObject, string>(currentErrorsSortedByLayout, previousSortedErrors, 'field');\n\n                    const latestErrorMsg = difference?.[0];\n\n                    if (latestErrorMsg) {\n                        // Use the error code to look up whether error is actually a blur based one (most are but some SF ones aren't)\n                        const isBlurBasedError = lookupBlurBasedErrors(latestErrorMsg.errorCode);\n\n                        /**\n                         *  ONLY ADD BLUR BASED ERRORS TO THE ERROR PANEL - doing this step prevents the non-blur based errors from being read out twice\n                         *  (once from the aria-live, error panel & once from the aria-describedby element)\n                         */\n                        const latestSRError = isBlurBasedError ? latestErrorMsg.errorMessage : null;\n                        // console.log('### CardInput2::componentDidUpdate:: #2 (not validating) single error:: latestSRError', latestSRError);\n                        setSRMessagesFromStrings(latestSRError);\n                    } else {\n                        // called when previousSortedErrors.length >= currentErrorsSortedByLayout.length\n                        // console.log('### CardInput2::componentDidUpdate:: #3(not validating) clearing errors:: NO latestErrorMsg');\n                        clearSRPanel();\n                    }\n                    break;\n                }\n                default:\n                    break;\n            }\n        } catch (_) {\n            // We don't handle the error related to the sr panel, let it fail silently.\n        }\n    }, [errors]);\n\n    return { sortedErrorList, previousSortedErrors, clearSRPanel };\n};\n\nexport default useSRPanelForCardInputErrors;\n","import { h } from 'preact';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport cx from 'classnames';\nimport uuid from '../../../utils/uuid';\nimport './Toggle.scss';\n\ninterface ToggleProps {\n    label?: string | h.JSX.Element;\n    labelPosition?: 'before' | 'after';\n    ariaLabel?: string;\n    description?: string;\n    checked: boolean;\n    disabled?: boolean;\n    readonly?: boolean;\n    onChange?(checked: boolean): void;\n}\n\nconst Toggle = ({ label, labelPosition = 'after', ariaLabel, description, checked, disabled = false, readonly = false, onChange }: ToggleProps) => {\n    const descriptionId = useMemo(() => (description ? `toggle-description-${uuid()}` : null), [description]);\n    const computedAriaLabel = useMemo(() => {\n        if (ariaLabel) return ariaLabel;\n        if (typeof label === 'string') return label;\n        return null;\n    }, [ariaLabel, label]);\n\n    const conditionalClasses = cx({\n        'adyen-checkout-toggle--label-first': labelPosition === 'before',\n        'adyen-checkout-toggle--disabled': disabled,\n        'adyen-checkout-toggle--readonly': readonly\n    });\n\n    const onInputChange = useCallback(\n        (event: Event) => {\n            onChange((event.target as HTMLInputElement).checked);\n        },\n        [onChange]\n    );\n\n    return (\n        <label className={`adyen-checkout-toggle ${conditionalClasses}`}>\n            <input\n                disabled={disabled}\n                checked={checked}\n                onChange={onInputChange}\n                aria-label={computedAriaLabel}\n                aria-readonly={readonly}\n                aria-describedby={descriptionId}\n                role=\"switch\"\n                type=\"checkbox\"\n                className=\"adyen-checkout-toggle__input\"\n            />\n\n            <span aria-hidden={true} className=\"adyen-checkout-toggle__track\">\n                <span className=\"adyen-checkout-toggle__handle\">\n                    {checked && (\n                        <svg role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\">\n                            <path\n                                fill=\"#00112C\"\n                                d=\"M12.0608 6.00011L11.0001 4.93945L7.00011 8.93945L5.00011 6.93945L3.93945 8.00011L7.00011 11.0608L12.0608 6.00011Z\"\n                            ></path>\n                        </svg>\n                    )}\n                </span>\n            </span>\n\n            {label && (\n                <span className=\"adyen-checkout-toggle__label-container\">\n                    <span className=\"adyen-checkout-toggle__label-text\" data-testid=\"inner-label\">\n                        {label}\n                    </span>\n                    {description && (\n                        <span data-testid=\"description\" className=\"adyen-checkout-toggle__description\" id={descriptionId}>\n                            {description}\n                        </span>\n                    )}\n                </span>\n            )}\n        </label>\n    );\n};\n\nexport default Toggle;\n","function mobileNumberFormatter(value: string): string {\n    if (!value) {\n        return '';\n    }\n\n    let input = value;\n    // Allow only numbers\n    input = input.replace(/\\D/g, '');\n\n    // Add spaces at the appropriate positions\n    if (input.length > 3 && input.length <= 6) {\n        input = input.slice(0, 3) + ' ' + input.slice(3);\n    } else if (input.length > 6) {\n        input = input.slice(0, 3) + ' ' + input.slice(3, 6) + ' ' + input.slice(6, 10);\n    }\n    return input;\n}\n\nexport default mobileNumberFormatter;\n","import { h } from 'preact';\nimport { useCallback, useEffect, useRef } from 'preact/hooks';\nimport Field from '../../../internal/FormFields/Field';\nimport useForm from '../../../../utils/useForm';\nimport InputTelephone from '../../../internal/FormFields/InputTelephone';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport mobileNumberFormatter from './utils/mobile-number-formatter';\n\ninterface USOnlyPhoneInputStateData {\n    mobileNumber?: string;\n}\n\ninterface USOnlyPhoneInputProps {\n    onChange(mobileNumber: string): void;\n    initialValue?: string;\n}\n\nconst USOnlyPhoneInput = ({ initialValue, onChange }: USOnlyPhoneInputProps) => {\n    const { i18n } = useCoreContext();\n    const formSchema = ['mobileNumber'];\n    const { handleChangeFor, data } = useForm<USOnlyPhoneInputStateData>({\n        schema: formSchema,\n        defaultData: {\n            mobileNumber: initialValue\n        },\n        formatters: {\n            mobileNumber: mobileNumberFormatter\n        }\n    });\n    const inputRef = useRef<HTMLInputElement>(null);\n\n    const focusInput = useCallback(() => {\n        inputRef.current?.focus();\n    }, [inputRef.current]);\n\n    useEffect(() => {\n        onChange(data.mobileNumber?.replaceAll(' ', ''));\n    }, [data.mobileNumber, onChange]);\n\n    return (\n        <Field name=\"mobile-number\" label={i18n.get('card.fastlane.mobileInputLabel')} staticValue=\"+1\" onInputContainerClick={focusInput}>\n            <InputTelephone\n                name={'mobile-number'}\n                autocorrect={'off'}\n                spellcheck={false}\n                maxlength={12}\n                value={data.mobileNumber}\n                onInput={handleChangeFor('mobileNumber', 'input')}\n                onBlur={handleChangeFor('mobileNumber', 'blur')}\n                setRef={inputRef}\n            />\n        </Field>\n    );\n};\n\nexport default USOnlyPhoneInput;\n","import { useTrapFocus } from './useTrapFocus';\nimport { useCallback, useEffect } from 'preact/hooks';\n\ntype UseModalProps = {\n    modalElement?: HTMLElement;\n    isOpen: boolean;\n    isDismissible: boolean;\n    focusFirst: HTMLElement;\n    focusAfterClose: HTMLElement;\n    onClose(): void;\n};\n\ntype UseModalHook = {\n    /**\n     * Function that focus on the 'focusAfterClose' element, and then closes the modal\n     */\n    closeModal(): void;\n    handleClickOutside(event: MouseEvent): void;\n};\n\nconst KEYCODE_ESC = 27;\n\nconst useModal = ({ modalElement, isOpen, isDismissible, focusFirst, focusAfterClose, onClose }: UseModalProps): UseModalHook => {\n    useTrapFocus({ rootElement: modalElement, shouldTrap: isOpen, focusFirst });\n\n    const closeModal = useCallback(() => {\n        focusAfterClose.focus();\n        onClose();\n    }, [onClose, focusAfterClose]);\n\n    const handleClickOutside = useCallback(\n        (event: MouseEvent) => {\n            if (isDismissible && event.target instanceof HTMLElement && !modalElement.contains(event.target)) {\n                closeModal();\n            }\n        },\n        [closeModal, isDismissible, modalElement]\n    );\n\n    useEffect(() => {\n        if (!isOpen || !modalElement) return;\n        const closeOnPressingEscape = (event: KeyboardEvent): void => {\n            const isEscapePressed = event.key === 'Escape' || event.key === 'Esc' || event.keyCode === KEYCODE_ESC;\n            if (isEscapePressed) {\n                closeModal();\n            }\n        };\n\n        modalElement.addEventListener('keydown', closeOnPressingEscape);\n        return () => modalElement.removeEventListener('keydown', closeOnPressingEscape);\n    }, [isOpen, modalElement, closeModal]);\n\n    return { closeModal, handleClickOutside };\n};\n\nexport { useModal };\n","import { useEffect, useState } from 'preact/hooks';\n\ntype UseTrapFocusProps = {\n    rootElement?: HTMLElement;\n    /**\n     * Element that must be focused when the hook is executed. If no element is passed, the first focusable child\n     * element of the root element will be focused\n     */\n    focusFirst?: HTMLElement;\n    /**\n     * Can be used to conditionally disable the trap mechanism\n     */\n    shouldTrap?: boolean;\n};\n\nconst KEYCODE_TAB = 9;\nconst FOCUSABLE_ELEMENTS =\n    'a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type=\"text\"]:not([disabled]), input[type=\"radio\"]:not([disabled]), input[type=\"checkbox\"]:not([disabled]), select:not([disabled])';\n\n/**\n * Hook used to trap the focus within the specific element and its child nodes.\n */\nconst useTrapFocus = ({ rootElement, focusFirst, shouldTrap = true }: UseTrapFocusProps): void => {\n    const [firstFocusableEl, setFirstFocusableEl] = useState<HTMLElement>(focusFirst);\n\n    useEffect(() => {\n        if (!shouldTrap) return;\n        firstFocusableEl?.focus();\n    }, [firstFocusableEl, shouldTrap]);\n\n    useEffect(() => {\n        if (!shouldTrap) return;\n\n        const focusableEl: NodeListOf<HTMLElement> = rootElement.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS);\n\n        const firstFocusableEl: HTMLElement = focusableEl[0];\n        const lastFocusableEl: HTMLElement = focusableEl[focusableEl.length - 1];\n\n        setFirstFocusableEl(focusFirst || firstFocusableEl);\n\n        const trapFocus = (event: KeyboardEvent): void => {\n            const isTabPressed = event.key === 'Tab' || event.keyCode === KEYCODE_TAB;\n\n            if (!isTabPressed) return;\n\n            if (event.shiftKey && document.activeElement === firstFocusableEl) {\n                lastFocusableEl.focus();\n                event.preventDefault();\n                return;\n            }\n            if (document.activeElement === lastFocusableEl) {\n                firstFocusableEl.focus();\n                event.preventDefault();\n                return;\n            }\n        };\n\n        rootElement.addEventListener('keydown', trapFocus);\n\n        return () => {\n            setFirstFocusableEl(null);\n            rootElement.removeEventListener('keydown', trapFocus);\n        };\n    }, [rootElement, focusFirst, shouldTrap]);\n};\n\nexport { useTrapFocus };\n","import { ComponentChildren, h } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport cx from 'classnames';\nimport './Modal.scss';\nimport { useModal } from './useModal';\n\ntype ModalRenderFnProps = {\n    /**\n     * Function used to properly trigger the Modal close mechanism. It takes into account the element that the Modal needs\n     * to set focus when it is dismissed.\n     */\n    onCloseModal(): void;\n};\n\ntype ModalProps = {\n    children: ({ onCloseModal }: ModalRenderFnProps) => ComponentChildren;\n    classNameModifiers?: string[];\n    onClose(): void;\n    isOpen: boolean;\n    isDismissible?: boolean;\n    labelledBy: string;\n    describedBy: string;\n    /**\n     * Reference to the element that should be focused when the modal is opened\n     */\n    focusFirst: HTMLElement;\n    /**\n     * Reference to the element that should be focused when the modal is closed\n     */\n    focusAfterClose: HTMLElement;\n};\n\nconst Modal = ({\n    children,\n    classNameModifiers = [],\n    isOpen,\n    onClose,\n    isDismissible = true,\n    labelledBy,\n    describedBy,\n    focusFirst,\n    focusAfterClose,\n    ...props\n}: ModalProps) => {\n    const modalContainerRef = useRef<HTMLDivElement>();\n    const { closeModal, handleClickOutside } = useModal({\n        modalElement: modalContainerRef.current,\n        isOpen,\n        isDismissible,\n        focusFirst,\n        focusAfterClose,\n        onClose\n    });\n\n    /**\n     * It shouldn't propagate ENTER key event to the parent component. This effect suppress the event propagation\n     * (e.g. ENTER key press might trigger the payment flow for Card)\n     */\n    useEffect(() => {\n        if (!modalContainerRef.current) return;\n\n        const suppressKeyPress = (event: KeyboardEvent) => {\n            if (event.key === 'Enter' || event.code === 'Enter') event.stopPropagation();\n        };\n\n        modalContainerRef.current.addEventListener('keypress', suppressKeyPress, { capture: true });\n        return () => {\n            modalContainerRef.current.removeEventListener('keypress', suppressKeyPress);\n        };\n    }, [modalContainerRef.current]);\n\n    return (\n        // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions\n        <div\n            className={cx(\n                'adyen-checkout__modal-wrapper',\n                classNameModifiers.map(m => `adyen-checkout__modal-wrapper--${m}`),\n                { 'adyen-checkout__modal-wrapper--open': isOpen }\n            )}\n            role=\"dialog\"\n            aria-labelledby={labelledBy}\n            aria-describedby={describedBy}\n            aria-modal=\"true\"\n            aria-hidden={!isOpen}\n            onClick={handleClickOutside}\n            {...props}\n        >\n            <div className=\"adyen-checkout__modal\" ref={modalContainerRef}>\n                {children({ onCloseModal: closeModal })}\n            </div>\n        </div>\n    );\n};\n\nexport { Modal };\n","import { Component, h } from 'preact';\nimport classNames from 'classnames';\nimport Spinner from '../Spinner';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './Button.scss';\nimport { ButtonProps, ButtonState } from './types';\n\nclass Button extends Component<ButtonProps, ButtonState> {\n    public static defaultProps = {\n        status: 'default',\n        variant: 'primary',\n        disabled: false,\n        label: '',\n        inline: false,\n        target: '_self',\n        onClick: () => {}\n    };\n\n    public onClick = e => {\n        e.preventDefault();\n\n        if (!this.props.disabled) {\n            this.props.onClick(e, { complete: this.complete });\n        }\n    };\n\n    public complete = (delay = 1000) => {\n        this.setState({ completed: true });\n        setTimeout(() => {\n            this.setState({ completed: false });\n        }, delay);\n    };\n\n    public onKeyDown = (event: KeyboardEvent) => {\n        this.props.onKeyDown?.(event);\n    };\n\n    render() {\n        const { classNameModifiers = [], disabled, href, icon, inline, label, ariaLabel, status, variant, buttonRef }: ButtonProps = this.props;\n        const { completed } = this.state;\n        const { i18n } = useCoreContext();\n\n        const buttonIcon = icon ? <img className=\"adyen-checkout__button__icon\" src={icon} alt=\"\" aria-hidden=\"true\" /> : '';\n\n        const modifiers = [\n            ...classNameModifiers,\n            ...(variant !== 'primary' ? [variant] : []),\n            ...(inline ? ['inline'] : []),\n            ...(completed ? ['completed'] : []),\n            ...(status === 'loading' || status === 'redirect' ? ['loading'] : [])\n        ];\n\n        const buttonClasses = classNames(['adyen-checkout__button', ...modifiers.map(m => `adyen-checkout__button--${m}`)]);\n\n        const buttonStates = {\n            loading: (\n                <span className=\"adyen-checkout__button__content\">\n                    <Spinner size=\"medium\" inline />\n                    <span className={'adyen-checkout__button__text--sr-only'}>{i18n.get('loading')}</span>\n                </span>\n            ),\n            redirect: (\n                <span className=\"adyen-checkout__button__content\">\n                    <Spinner size=\"medium\" inline />\n                    {i18n.get('payButton.redirecting')}\n                </span>\n            ),\n            default: (\n                <span className=\"adyen-checkout__button__content\">\n                    {buttonIcon}\n                    <span className=\"adyen-checkout__button__text\">{label}</span>\n                </span>\n            )\n        };\n\n        const buttonText = buttonStates[status] || buttonStates.default;\n\n        if (href) {\n            return (\n                <a className={buttonClasses} href={href} disabled={disabled} target={this.props.target} rel={this.props.rel}>\n                    {buttonText}\n                </a>\n            );\n        }\n\n        return (\n            <button\n                ref={buttonRef}\n                className={buttonClasses}\n                type=\"button\"\n                disabled={disabled}\n                onClick={this.onClick}\n                onKeyDown={this.onKeyDown}\n                aria-label={ariaLabel}\n            >\n                {buttonText}\n                {status !== 'loading' && status !== 'redirect' && this.props.children}\n            </button>\n        );\n    }\n}\n\nexport default Button;\n","import { h } from 'preact';\nimport { useRef } from 'preact/hooks';\nimport useImage from '../../../../core/Context/useImage';\nimport { Modal } from '../../../internal/Modal';\nimport Img from '../../../internal/Img';\nimport Button from '../../../internal/Button';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport uuid from '../../../../utils/uuid';\n\nimport './InfoModal.scss';\n\ninterface InfoModalProps {\n    isOpen: boolean;\n    focusAfterClose: HTMLElement;\n    onClose(): void;\n}\n\nconst FASTLANE_BENEFITS = [\n    {\n        headerKey: 'card.fastlane.modal.benefit1.header',\n        labelById: `adyen-fastlane-modal-label-${uuid()}`,\n        descriptionTextKey: 'card.fastlane.modal.benefit1.text',\n        describedById: `adyen-fastlane-modal-describedBy-${uuid()}`,\n        image: 'fastlane_autofill',\n        altImage: ''\n    },\n    {\n        headerKey: 'card.fastlane.modal.benefit2.header',\n        labelById: `adyen-fastlane-modal-label-${uuid()}`,\n        descriptionTextKey: 'card.fastlane.modal.benefit2.text',\n        describedById: `adyen-fastlane-modal-describedBy-${uuid()}`,\n        image: 'fastlane_protection',\n        altImage: ''\n    },\n    {\n        headerKey: 'card.fastlane.modal.benefit3.header',\n        labelById: `adyen-fastlane-modal-label-${uuid()}`,\n        descriptionTextKey: 'card.fastlane.modal.benefit3.text',\n        describedById: `adyen-fastlane-modal-describedBy-${uuid()}`,\n        image: 'fastlane_ubiquity',\n        altImage: ''\n    }\n];\n\nconst InfoModal = ({ isOpen, onClose, focusAfterClose }: InfoModalProps) => {\n    const { i18n } = useCoreContext();\n    const focusFirstElement = useRef<HTMLParagraphElement>();\n    const getImage = useImage();\n\n    const labelledBy = FASTLANE_BENEFITS.map(benefit => benefit.labelById).join(' ');\n    const describedBy = FASTLANE_BENEFITS.map(benefit => benefit.describedById).join(' ');\n\n    return (\n        <Modal\n            onClose={onClose}\n            isOpen={isOpen}\n            labelledBy={labelledBy}\n            describedBy={describedBy}\n            focusFirst={focusFirstElement.current}\n            focusAfterClose={focusAfterClose}\n        >\n            {({ onCloseModal }) => (\n                <div className=\"adyen-checkout-card-fastlane__modal\">\n                    <div className=\"adyen-checkout-card-fastlane__modal-button-container\">\n                        <Button\n                            onClick={onCloseModal}\n                            inline\n                            variant=\"link\"\n                            ariaLabel={i18n.get('card.fastlane.a11y.closeDialog')}\n                            label={\n                                <Img height=\"10\" width=\"10\" src={getImage({ imageFolder: 'components/' })('cross_black')} ariaHidden={true} alt=\"\" />\n                            }\n                        />\n                    </div>\n\n                    {FASTLANE_BENEFITS.map(benefit => (\n                        <div key={benefit.labelById} className=\"adyen-checkout-card-fastlane__modal-section\">\n                            <Img\n                                className=\"adyen-checkout-card-fastlane__modal-section-image\"\n                                src={getImage({ imageFolder: 'components/' })(benefit.image)}\n                                alt={benefit.altImage}\n                            />\n                            <h1 id={benefit.labelById} className=\"adyen-checkout-card-fastlane__modal-section-header\">\n                                {i18n.get(benefit.headerKey)}\n                            </h1>\n                            <div id={benefit.describedById} className=\"adyen-checkout-card-fastlane__modal-section-text\">\n                                {i18n.get(benefit.descriptionTextKey)}\n                            </div>\n                        </div>\n                    ))}\n\n                    <Img\n                        className=\"adyen-checkout-card-fastlane__modal-brand\"\n                        src={getImage({ imageFolder: 'components/' })(`paypal_fastlane_black`)}\n                        alt={i18n.get('card.fastlane.a11y.logo')}\n                    />\n                </div>\n            )}\n        </Modal>\n    );\n};\n\nexport { InfoModal };\n","import { Fragment, h } from 'preact';\nimport { useCallback, useRef, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport useImage from '../../../../core/Context/useImage';\nimport { InfoModal } from './InfoModal';\nimport Img from '../../../internal/Img';\nimport Button from '../../../internal/Button';\n\nconst InfoButton = () => {\n    const [isInfoModalOpen, setIsInfoModalOpen] = useState<boolean>(false);\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const buttonRef = useRef();\n\n    const handleOnClose = useCallback(() => {\n        setIsInfoModalOpen(false);\n    }, []);\n\n    const handleOnIconClick = useCallback(() => {\n        setIsInfoModalOpen(true);\n    }, []);\n\n    return (\n        <Fragment>\n            <Button\n                buttonRef={buttonRef}\n                onClick={handleOnIconClick}\n                classNameModifiers={['fastlane-info-modal']}\n                variant=\"link\"\n                ariaLabel={i18n.get('card.fastlane.a11y.openDialog')}\n                label={<Img height=\"14\" width=\"14\" src={getImage({ imageFolder: 'components/' })('fastlane_info')} alt=\"\" ariaHidden={true} />}\n            />\n\n            <InfoModal isOpen={isInfoModalOpen} onClose={handleOnClose} focusAfterClose={buttonRef.current} />\n        </Fragment>\n    );\n};\n\nexport { InfoButton };\n","import {\n    BOLETO_SOCIAL_SECURITY_NUMBER_INVALID,\n    CREDITCARD_HOLDER_NAME_INVALID,\n    CREDITCARD_TAX_NUMBER_INVALID,\n    ERROR_FIELD_REQUIRED,\n    ERROR_INVALID_FORMAT_EXPECTS\n} from '../Errors/constants';\n\nexport const ANALYTICS_PATH = 'v3/analytics';\n\nexport const ANALYTICS_INFO_TIMER_INTERVAL = process.env.NODE_ENV === 'development' ? 5000 : 10000;\n\nexport const ANALYTICS_SEARCH_DEBOUNCE_TIME = 3000;\n\nexport const ANALYTICS_EVENT = {\n    log: 'log',\n    error: 'error',\n    info: 'info'\n};\n\nexport const ANALYTICS_ERROR_TYPE = {\n    network: 'Network',\n    implementation: 'ImplementationError',\n    internal: 'Internal',\n    apiError: 'ApiError',\n    sdkError: 'SdkError',\n    thirdParty: 'ThirdParty',\n    generic: 'Generic',\n    redirect: 'Redirect',\n    threeDS2: 'ThreeDS2'\n};\n\nexport const ANALYTICS_ERROR_CODE = {\n    redirect: '600'\n};\n\n/**\n * Info Events\n */\nexport enum InfoEventTypes {\n    clicked = 'clicked',\n    rendered = 'rendered'\n}\n\nexport const ANALYTICS_ACTION_STR = 'action';\nexport const ANALYTICS_SUBMIT_STR = 'submit';\nexport const ANALYTICS_SELECTED_STR = 'selected';\nexport const ANALYTICS_RENDERED_STR = 'rendered';\nexport const ANALYTICS_DISPLAYED_STR = 'displayed';\nexport const ANALYTICS_INPUT_STR = 'input';\n\nexport const ANALYTICS_DOWNLOAD_STR = 'download';\n\nexport const ANALYTICS_VALIDATION_ERROR_STR = 'validationError';\n\nexport const ANALYTICS_FOCUS_STR = 'focus';\nexport const ANALYTICS_UNFOCUS_STR = 'unfocus';\n\nexport const ANALYTICS_CONFIGURED_STR = 'configured';\n\nexport const ANALYTICS_QR_CODE_DOWNLOAD = 'qr_download_button';\n\nexport const ANALYTICS_INSTANT_PAYMENT_BUTTON = 'instant_payment_button';\nexport const ANALYTICS_FEATURED_ISSUER = 'featured_issuer';\nexport const ANALYTICS_LIST = 'list';\nexport const ANALYTICS_LIST_SEARCH = 'list_search';\n\nexport enum Analytics3DS2Errors {\n    ACTION_IS_MISSING_PAYMENT_DATA = '700', // Missing 'paymentData' property from threeDS2 action\n    ACTION_IS_MISSING_TOKEN = '701', // Missing 'token' property from threeDS2 action\n    TOKEN_IS_MISSING_THREEDSMETHODURL = '702', // Decoded token is missing a valid threeDSMethodURL property\n\n    /**\n     * Decoded token is missing one or more of the following properties:\n     *  fingerprint: (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)\n     *  challenge: (acsTransID | messageVersion | threeDSServerTransID)\n     */\n    TOKEN_IS_MISSING_OTHER_PROPS = '703',\n\n    TOKEN_DECODE_OR_PARSING_FAILED = '704', // token decoding or parsing has failed. ('not base64', 'malformed URI sequence' or 'Could not JSON parse token')\n    THREEDS2_TIMEOUT = '705', // 3DS2 process has timed out\n\n    TOKEN_IS_MISSING_ACSURL = '800', // Decoded token is missing a valid acsURL property\n    NO_TRANSSTATUS = '801', // Challenge has resulted in an error (no transStatus could be retrieved by the backend)\n    NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED = '802', // callSubmit3DS2Fingerprint has received a response indicating either a \"frictionless\" flow, or a \"refused\" response, but without a details object\n    NO_COMPONENT_FOR_ACTION = '803', // callSubmit3DS2Fingerprint cannot find a component to handle the action response\n    NO_ACTION_FOR_CHALLENGE = '804', // callSubmit3DS2Fingerprint has received a response indicating a \"challenge\" but without an action object\n    CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP = '805' // The challenge process has happened, an object has been returned, parsed & accepted as legit, but the result prop on that object is either missing or doesn't have a transStatus prop\n}\n\nexport enum Analytics3DS2Events {\n    FINGERPRINT_DATA_SENT = 'fingerprintDataSentWeb',\n    FINGERPRINT_IFRAME_LOADED = 'fingerprintIframeLoaded',\n    FINGERPRINT_COMPLETED = 'fingerprintCompleted',\n    CHALLENGE_DATA_SENT = 'challengeDataSentWeb',\n    CHALLENGE_IFRAME_LOADED = 'challengeIframeLoaded',\n    CHALLENGE_COMPLETED = 'challengeCompleted'\n}\n\n/**\n * Function to map errorCodes based on translation keys to the codes expected by the analytics endpoint\n */\nexport const errorCodeMapping: Record<string, string> = {\n    [CREDITCARD_HOLDER_NAME_INVALID]: '925',\n    [CREDITCARD_TAX_NUMBER_INVALID]: '942',\n    //\n    [BOLETO_SOCIAL_SECURITY_NUMBER_INVALID]: '926',\n    //\n    [`${ERROR_FIELD_REQUIRED}.country`]: '930',\n    [`${ERROR_FIELD_REQUIRED}.street`]: '931',\n    [`${ERROR_FIELD_REQUIRED}.house_number_or_name`]: '932',\n    [`${ERROR_FIELD_REQUIRED}.postal_code`]: '933',\n    [`${ERROR_FIELD_REQUIRED}.city`]: '935',\n    [`${ERROR_FIELD_REQUIRED}.state_or_province`]: '936',\n    //\n    [`${ERROR_INVALID_FORMAT_EXPECTS}.postal_code`]: '934'\n    //\n};\n\nexport const ANALYTICS_EXPRESS_PAGES_ARRAY = ['cart', 'minicart', 'pdp', 'checkout'];\n\nexport const ALLOWED_ANALYTICS_DATA = ['applicationInfo', 'checkoutAttemptId'];\n\nexport const NO_CHECKOUT_ATTEMPT_ID = 'fetch-checkoutAttemptId-failed';\n\nexport const ANALYTIC_LEVEL = {\n    all: 'all',\n    initial: 'initial'\n};\n","import { FormatterFn } from './types';\n\n// Removes all non-digits\nexport const digitsOnlyFormatter: FormatterFn = (value: string) => {\n    return value.replace(/[^0-9]/g, '');\n};\n\nexport const capitalizeFirstLetter = (str: string): string => {\n    return str.charAt(0).toUpperCase() + str.slice(1);\n};\n","import uuid from '../../utils/uuid';\nimport { getUTCTimestamp } from './utils';\n\nexport abstract class AnalyticsEvent {\n    public timestamp: string;\n    public id: string;\n    public component: string;\n\n    public abstract getEventCategory(): string;\n\n    constructor() {\n        this.id = uuid();\n        this.timestamp = String(getUTCTimestamp());\n    }\n}\n","import { AnalyticsData } from './types';\nimport { errorCodeMapping, ALLOWED_ANALYTICS_DATA } from './constants';\nimport { digitsOnlyFormatter } from '../../utils/Formatters/formatters';\nimport { ERROR_FIELD_REQUIRED, ERROR_INVALID_FORMAT_EXPECTS } from '../Errors/constants';\n\nexport const getUTCTimestamp = () => Date.now();\n\nexport const mapErrorCodesForAnalytics = (errorCode: string, target: string) => {\n    // Some of the more generic error codes required combination with target to retrieve a specific code\n    if (errorCode === ERROR_FIELD_REQUIRED || errorCode === ERROR_INVALID_FORMAT_EXPECTS) {\n        return errorCodeMapping[`${errorCode}.${target}`] ?? errorCode;\n    }\n\n    let errCode = errorCodeMapping[errorCode] ?? errorCode;\n\n    // If errCode isn't now a number - then we just need to remove any non-digits\n    // since the correct error code is already contained within the string e.g. securedField related errors\n    if (isNaN(Number(errCode))) {\n        errCode = digitsOnlyFormatter(errCode);\n    }\n\n    return errCode;\n};\n\nexport const processAnalyticsData = (analyticsData: AnalyticsData): AnalyticsData => {\n    return Object.keys(analyticsData).reduce((acc, prop) => {\n        if (ALLOWED_ANALYTICS_DATA.includes(prop)) acc[prop] = analyticsData[prop];\n        return acc;\n    }, {});\n};\n","import { AnalyticsEvent } from './AnalyticsEvent';\nimport { ANALYTICS_EVENT, ANALYTICS_VALIDATION_ERROR_STR } from './constants';\nimport { mapErrorCodesForAnalytics } from './utils';\n\ntype AnalyticsInfoEventObject = {\n    type: string;\n    target?: string;\n    issuer?: string;\n    isExpress?: boolean;\n    expressPage?: string;\n    isStoredPaymentMethod?: boolean;\n    brand?: string;\n    validationErrorCode?: string;\n    validationErrorMessage?: string;\n    configData?: Record<string, string | boolean>;\n    component?: string;\n};\n\nexport class AnalyticsInfoEvent extends AnalyticsEvent {\n    public type: string;\n    public target: string;\n    public issuer?: string;\n    public isExpress?: boolean;\n    public expressPage?: string;\n    public isStoredPaymentMethod?: boolean;\n    public brand?: string;\n    public validationErrorCode?: string;\n    public validationErrorMessage?: string;\n    public configData?: Record<string, string | boolean>;\n\n    constructor(analyticsObject: AnalyticsInfoEventObject) {\n        super();\n\n        this.component = analyticsObject.component;\n\n        this.type = analyticsObject.type;\n        this.target = analyticsObject.target;\n        this.issuer = analyticsObject.issuer;\n        this.isExpress = analyticsObject.isExpress;\n        this.isStoredPaymentMethod = analyticsObject.isStoredPaymentMethod;\n        this.isExpress = analyticsObject.isExpress;\n        this.expressPage = analyticsObject.expressPage;\n        this.brand = analyticsObject.brand;\n        this.validationErrorCode = analyticsObject.validationErrorCode;\n        this.validationErrorMessage = analyticsObject.validationErrorMessage;\n        this.configData = analyticsObject.configData;\n\n        // Some of the more generic validation error codes required combination with target to retrieve a specific code\n        if (this.type === ANALYTICS_VALIDATION_ERROR_STR) {\n            this.validationErrorCode = mapErrorCodesForAnalytics(this.validationErrorCode, this.target);\n        }\n\n        return this;\n    }\n\n    public getEventCategory(): string {\n        return ANALYTICS_EVENT.info;\n    }\n}\n","import { Fragment, h } from 'preact';\nimport { useCallback, useEffect, useMemo, useState } from 'preact/hooks';\nimport cx from 'classnames';\nimport Toggle from '../../../internal/Toggle';\nimport Img from '../../../internal/Img';\nimport useImage from '../../../../core/Context/useImage';\nimport USOnlyPhoneInput from './USOnlyPhoneInput';\nimport { InfoButton } from './InfoButton';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { LabelOnlyDisclaimerMessage } from '../../../internal/DisclaimerMessage/DisclaimerMessage';\nimport { isConfigurationValid } from './utils/validate-configuration';\nimport mobileNumberFormatter from './utils/mobile-number-formatter';\nimport { InfoEventTypes } from '../../../../core/Analytics/constants';\nimport type { FastlaneSignupConfiguration } from '../../../PayPalFastlane/types';\n\nimport './FastlaneSignup.scss';\nimport { AnalyticsInfoEvent } from '../../../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsEvent } from '../../../../core/Analytics/AnalyticsEvent';\n\ntype FastlaneSignupProps = FastlaneSignupConfiguration & {\n    currentDetectedBrand: string;\n    onChange(state: any): void;\n    onSubmitAnalytics(event: AnalyticsEvent): void;\n};\n\nconst SUPPORTED_BRANDS = ['mc', 'visa'];\n\nconst FastlaneSignup = ({\n    showConsent,\n    defaultToggleState,\n    termsAndConditionsLink,\n    privacyPolicyLink,\n    termsAndConditionsVersion,\n    fastlaneSessionId,\n    currentDetectedBrand,\n    telephoneNumber: telephoneNumberFromProps,\n    onChange,\n    onSubmitAnalytics\n}: FastlaneSignupProps) => {\n    const shouldDisplaySignup = useMemo(() => showConsent && SUPPORTED_BRANDS.includes(currentDetectedBrand), [showConsent, currentDetectedBrand]);\n    const [hasConsentFormBeenShown, setHasConsentFormBeenShown] = useState<boolean>(shouldDisplaySignup);\n    const [isChecked, setIsChecked] = useState<boolean>(defaultToggleState);\n    const getImage = useImage();\n    const [telephoneNumber, setTelephoneNumber] = useState<string>('');\n    const { i18n } = useCoreContext();\n    const isFastlaneConfigurationValid = useMemo(() => {\n        return isConfigurationValid({\n            showConsent,\n            defaultToggleState,\n            termsAndConditionsLink,\n            privacyPolicyLink,\n            termsAndConditionsVersion,\n            fastlaneSessionId\n        });\n    }, [showConsent, defaultToggleState, termsAndConditionsLink, privacyPolicyLink, termsAndConditionsVersion, fastlaneSessionId]);\n\n    const handleToggleChange = useCallback(() => {\n        const newValue = !isChecked;\n        setIsChecked(newValue);\n\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventTypes.clicked,\n            target: 'fastlane_signup_consent_toggle',\n            configData: {\n                isToggleOn: newValue\n            }\n        });\n        onSubmitAnalytics(event);\n    }, [isChecked, onSubmitAnalytics]);\n\n    /**\n     * If the configuration is valid, the Component propagates fastlaneData to the Card component state\n     *\n     * 'telephoneNumber' is optional since the shopper can check out without passing it\n     * 'termsAndConditionsVersion' is optional since the signup flow may not be available for the shopper, although we still add fastlaneData to the /payments request for analytics purposes\n     */\n    useEffect(() => {\n        if (!isFastlaneConfigurationValid) {\n            return;\n        }\n\n        onChange({\n            fastlaneData: {\n                consentShown: hasConsentFormBeenShown,\n                fastlaneSessionId: fastlaneSessionId,\n                consentGiven: shouldDisplaySignup ? isChecked : false,\n                ...(termsAndConditionsVersion && { consentVersion: termsAndConditionsVersion }),\n                ...(telephoneNumber && { telephoneNumber })\n            }\n        });\n    }, [\n        shouldDisplaySignup,\n        hasConsentFormBeenShown,\n        termsAndConditionsVersion,\n        isChecked,\n        fastlaneSessionId,\n        telephoneNumber,\n        onChange,\n        isFastlaneConfigurationValid\n    ]);\n\n    /**\n     * If the sign-up has been displayed at least once, we set hasConsentFormBeenShown: true\n     */\n    useEffect(() => {\n        if (shouldDisplaySignup) {\n            setHasConsentFormBeenShown(true);\n        }\n    }, [shouldDisplaySignup]);\n\n    useEffect(() => {\n        if (!isFastlaneConfigurationValid) {\n            return;\n        }\n\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventTypes.rendered,\n            configData: {\n                isFastlaneSignupRendered: shouldDisplaySignup\n            }\n        });\n\n        onSubmitAnalytics(event);\n    }, [shouldDisplaySignup, isFastlaneConfigurationValid, onSubmitAnalytics]);\n\n    if (!shouldDisplaySignup || !isFastlaneConfigurationValid) {\n        return null;\n    }\n\n    return (\n        <div className=\"adyen-checkout-card__fastlane\" data-testid=\"fastlane-signup-component\">\n            <div\n                className={cx('adyen-checkout-card__fastlane-consent-toggle', {\n                    'adyen-checkout-card__fastlane-consent-toggle--active': isChecked\n                })}\n            >\n                <Toggle\n                    checked={isChecked}\n                    onChange={handleToggleChange}\n                    ariaLabel={i18n.get('card.fastlane.consentToggle')}\n                    label={<span>{i18n.get('card.fastlane.consentToggle')}</span>}\n                />\n                <InfoButton />\n            </div>\n\n            {isChecked && (\n                <Fragment>\n                    <USOnlyPhoneInput initialValue={mobileNumberFormatter(telephoneNumberFromProps)} onChange={setTelephoneNumber} />\n                    <div className=\"adyen-checkout-card__fastlane-consent-text\">\n                        <LabelOnlyDisclaimerMessage\n                            message={i18n.get('card.fastlane.consentText')}\n                            urls={[termsAndConditionsLink, privacyPolicyLink]}\n                        />\n                    </div>\n                    <Img\n                        className=\"adyen-checkout-card__fastlane-brand\"\n                        src={getImage({ imageFolder: 'components/' })(`paypal_fastlane_black`)}\n                        alt={i18n.get('card.fastlane.a11y.logo')}\n                    />\n                </Fragment>\n            )}\n        </div>\n    );\n};\n\nexport default FastlaneSignup;\n","import { h, Fragment } from 'preact';\nimport { useState, useEffect, useRef, useMemo, useCallback } from 'preact/hooks';\nimport SecuredFieldsProvider from '../../../internal/SecuredFields/SFP/SecuredFieldsProvider';\nimport { OnChangeEventDetails, SFPState } from '../../../internal/SecuredFields/SFP/types';\nimport defaultProps from './defaultProps';\nimport './CardInput.scss';\nimport { AddressModeOptions, CardInputDataState, CardInputErrorState, CardInputProps, CardInputRef, CardInputValidState } from './types';\nimport { CVC_POLICY_REQUIRED, DATE_POLICY_REQUIRED, ENCRYPTED_CARD_NUMBER } from '../../../internal/SecuredFields/lib/constants';\nimport { BinLookupResponse } from '../../types';\nimport { cardInputFormatters, cardInputValidationRules, getRuleByNameAndMode } from './validate';\nimport CIExtensions from '../../../internal/SecuredFields/binLookup/extensions';\nimport useForm from '../../../../utils/useForm';\nimport { SortedErrorObject } from '../../../../core/Errors/types';\nimport { handlePartialAddressMode, extractPropsForCardFields, extractPropsForSFP, getLayout } from './utils';\nimport Specifications from '../../../internal/Address/Specifications';\nimport { StoredCardFieldsWrapper } from './components/StoredCardFieldsWrapper';\nimport { CardFieldsWrapper } from './components/CardFieldsWrapper';\nimport { getAddressHandler, getAutoJumpHandler, getFocusHandler } from './handlers';\nimport { InstallmentsObj } from './components/Installments/Installments';\nimport { TouchStartEventObj } from './components/types';\nimport classNames from 'classnames';\nimport { getPartialAddressValidationRules } from '../../../internal/Address/validate';\nimport useImage from '../../../../core/Context/useImage';\nimport { getArrayDifferences } from '../../../../utils/arrayUtils';\nimport FormInstruction from '../../../internal/FormInstruction';\nimport { AddressData } from '../../../../types/global-types';\nimport { CardBrandData, CardFocusData } from '../../../internal/SecuredFields/lib/types';\nimport { PREFIX } from '../../../internal/Icon/constants';\nimport useSRPanelForCardInputErrors from './useSRPanelForCardInputErrors';\nimport FastlaneSignup from '../Fastlane/FastlaneSignup';\nimport { ANALYTICS_VALIDATION_ERROR_STR, ANALYTICS_DISPLAYED_STR, ANALYTICS_SELECTED_STR } from '../../../../core/Analytics/constants';\nimport { fieldTypeToSnakeCase } from '../../../internal/SecuredFields/utils';\nimport { getErrorMessageFromCode } from '../../../../core/Errors/utils';\nimport { SF_ErrorCodes } from '../../../../core/Errors/constants';\nimport { usePrevious } from '../../../../utils/hookUtils';\nimport { AnalyticsInfoEvent } from '../../../../core/Analytics/AnalyticsInfoEvent';\n\nconst DUAL_BRAND_BUTTON = 'dual_brand_button';\n\nconst CardInput = (props: CardInputProps) => {\n    const sfp = useRef(null);\n    const isValidating = useRef(false);\n    const getImage = useImage();\n\n    const billingAddressRef = useRef(null);\n    const setAddressRef = ref => {\n        billingAddressRef.current = ref;\n    };\n\n    const cardInputRef = useRef<CardInputRef>({});\n    // Just call once to create the object by which we expose the members expected by the parent Card comp\n    if (!Object.keys(cardInputRef.current).length) {\n        props.setComponentRef(cardInputRef.current);\n    }\n\n    const hasPanLengthRef = useRef(0);\n    const isAutoJumping = useRef(false);\n\n    const specifications = useMemo(() => new Specifications(props.specifications), [props.specifications]);\n\n    // Store ref to sfp (useful for 'deep' debugging)\n    cardInputRef.current.sfp = sfp;\n\n    /**\n     * STATE HOOKS\n     */\n    const [status, setStatus] = useState('ready');\n\n    const [errors, setErrors] = useState<CardInputErrorState>({});\n    const [valid, setValid] = useState<CardInputValidState>({\n        ...(props.holderNameRequired && { holderName: false })\n    });\n    const [data, setData] = useState<CardInputDataState>({\n        ...(props.hasHolderName && { holderName: props.data.holderName ?? '' })\n    });\n\n    const [focusedElement, setFocusedElement] = useState('');\n    const [isSfpValid, setIsSfpValid] = useState(false);\n    const [expiryDatePolicy, setExpiryDatePolicy] = useState(DATE_POLICY_REQUIRED);\n    const [cvcPolicy, setCvcPolicy] = useState(CVC_POLICY_REQUIRED);\n    const [issuingCountryCode, setIssuingCountryCode] = useState<string>(null);\n\n    const [dualBrandSelectElements, setDualBrandSelectElements] = useState([]);\n    const [selectedBrandValue, setSelectedBrandValue] = useState(props.storedPaymentMethodId ? props.brand : ''); // If this is a storedCard comp initialise state with the storedCard's brand\n\n    const showBillingAddress = props.billingAddressMode !== AddressModeOptions.none && props.billingAddressRequired;\n\n    const partialAddressSchema = handlePartialAddressMode(props.billingAddressMode);\n    // Keeps the value of the country set initially by the merchant, before the Address Component mutates it\n    const partialAddressCountry = useRef<string>(partialAddressSchema && props.data?.billingAddress?.country);\n\n    const [storePaymentMethod, setStorePaymentMethod] = useState(false);\n    const [billingAddress, setBillingAddress] = useState<AddressData>(showBillingAddress ? props.data.billingAddress : null);\n    const [showSocialSecurityNumber, setShowSocialSecurityNumber] = useState(false);\n    const [socialSecurityNumber, setSocialSecurityNumber] = useState('');\n    const [installments, setInstallments] = useState<InstallmentsObj>({ value: null });\n\n    // re. Disable arrows for iOS: The name of the element calling for other elements to be disabled\n    // - either a securedField type (like 'encryptedCardNumber') when call is coming from SF\n    // or else the name of an internal, Adyen-web, element (like 'holderName')\n    const [iOSFocusedField, setIOSFocusedField] = useState(null);\n\n    /**\n     * This stores the brand as detected by the internal regEx.\n     * It eventually gets overwritten by the brand as detected by the /binLookup, but will revert back to the regEx detection\n     * if the PAN length drops below the /binLookup digit threshold.\n     * Default value, 'card', indicates no brand detected\n     */\n    const [internallyDetectedBrand, setInternallyDetectedBrand] = useState('card');\n\n    /**\n     * Used tho show and hide the pay button and instructions text\n     * Should mimic the same logic as CardInput loading wrapper\n     */\n    const [showCardUIElements, setShowCardUIElements] = useState(false);\n\n    /**\n     * LOCAL VARS\n     */\n    const {\n        handleChangeFor,\n        triggerValidation,\n        data: formData,\n        valid: formValid,\n        errors: formErrors,\n        setSchema,\n        setData: setFormData,\n        setValid: setFormValid,\n        setErrors: setFormErrors\n    } = useForm<CardInputDataState>({\n        schema: [],\n        defaultData: props.data,\n        formatters: cardInputFormatters,\n        rules: cardInputValidationRules\n    });\n\n    const hasInstallments = !!Object.keys(props.installmentOptions).length && props.fundingSource !== 'debit';\n    const showAmountsInInstallments = props.showInstallmentAmounts ?? true;\n\n    const cardCountryCode: string = issuingCountryCode ?? props.countryCode;\n    const isKorea = cardCountryCode === 'kr'; // If issuingCountryCode or the merchant defined countryCode is set to 'kr'\n    const showKCP = props.configuration.koreanAuthenticationRequired && isKorea;\n\n    const showBrazilianSSN: boolean =\n        (showSocialSecurityNumber && props.configuration.socialSecurityNumberMode === 'auto') ||\n        props.configuration.socialSecurityNumberMode === 'show';\n\n    /**\n     * HANDLERS\n     */\n    // Handlers for focus & blur on all fields. Can be renamed to onFieldFocus once the onFocusField is renamed in Field.tsx\n    const onFieldFocusAnalytics = (who: string, e: Event | CardFocusData) => {\n        props.onFocus({ fieldType: who, event: e });\n    };\n    const onFieldBlurAnalytics = (who: string, e: Event | CardFocusData) => {\n        props.onBlur({ fieldType: who, event: e });\n    };\n\n    const onBrand = useCallback((obj: CardBrandData) => {\n        setInternallyDetectedBrand(obj.brand);\n        props.onBrand(obj);\n    }, []);\n\n    // Make SecuredFields aware of the focus & blur handlers\n    const handleFocus = getFocusHandler(setFocusedElement, onFieldFocusAnalytics, onFieldBlurAnalytics);\n\n    const retrieveLayout = (): string[] => {\n        return getLayout({\n            props,\n            showKCP,\n            showBrazilianSSN,\n            ...(props.billingAddressRequired && {\n                countrySpecificSchemas: specifications.getAddressSchemaForCountry(billingAddress?.country),\n                billingAddressRequiredFields: props.billingAddressRequiredFields\n            })\n        });\n    };\n\n    /**\n     * re. Disabling arrow keys in iOS:\n     * Only by disabling all fields in the Card PM except for the active securedField input can we force the iOS soft keyboard arrow keys to disable\n     *\n     * NOTE: only called if ua.__IS_IOS = true && this.config.disableIOSArrowKeys = true (as referenced in CSF)\n     *\n     * @param obj - has fieldType prop saying whether this function is being called in response to an securedFields click ('encryptedCardNumber' etc)\n     * - in which case we should disable all non-SF fields\n     * or,\n     * due to an internal action ('webInternalElement') - in which case we can enable all non-SF fields\n     */\n    const handleTouchstartIOS = useCallback((obj: TouchStartEventObj) => {\n        const elementType = obj.fieldType !== 'webInternalElement' ? obj.fieldType : obj.name;\n        setIOSFocusedField(elementType);\n    }, []);\n\n    const handleAddress = getAddressHandler(setFormData, setFormValid, setFormErrors);\n\n    const doPanAutoJump = getAutoJumpHandler(isAutoJumping, sfp, retrieveLayout());\n\n    const handleSecuredFieldsChange = (sfState: SFPState, eventDetails?: OnChangeEventDetails): void => {\n        /**\n         * Handling auto complete value for holderName (but only if the component is using a holderName field)\n         */\n        if (sfState.autoCompleteName) {\n            if (!props.hasHolderName) return;\n            const holderNameValidationFn = getRuleByNameAndMode('holderName', 'blur');\n            const acHolderName = holderNameValidationFn(sfState.autoCompleteName) ? sfState.autoCompleteName : null;\n            if (acHolderName) {\n                setFormData('holderName', acHolderName);\n                setFormValid('holderName', true); // only if holderName is valid does this fny get called - so we know it's valid and w/o error\n                setFormErrors('holderName', null);\n            }\n            return;\n        }\n\n        /**\n         * Decide if we can shift focus to the expiryDate field.\n         *\n         * We can if... the config prop, autoFocus, is true AND we have a panLength value from binLookup\n         * AND we are responding to a handleOnFieldValid message about the PAN that says it is valid\n         */\n        if (\n            props.autoFocus &&\n            hasPanLengthRef.current > 0 &&\n            eventDetails?.event === 'handleOnFieldValid' &&\n            eventDetails?.fieldType === ENCRYPTED_CARD_NUMBER &&\n            sfState.valid.encryptedCardNumber\n        ) {\n            doPanAutoJump();\n        }\n\n        /**\n         * Process SFP state\n         */\n        setData({ ...data, ...sfState.data });\n        setErrors({ ...errors, ...sfState.errors });\n        setValid({ ...valid, ...sfState.valid });\n\n        setIsSfpValid(sfState.isSfpValid);\n\n        // Values relating to /binLookup response\n        setCvcPolicy(sfState.cvcPolicy);\n        setShowSocialSecurityNumber(sfState.showSocialSecurityNumber);\n        setExpiryDatePolicy(sfState.expiryDatePolicy);\n    };\n\n    /**\n     * Listen to the full SecureFieldsProvider state and handle actions\n     * Used right now to mimic the loading status changes, this can only be done this way\n     * Trying to do it via onConfiguSuccess or onChange has side effects\n     */\n    const handleSFPStateUpdate = useCallback(\n        sfpState => {\n            mimicLoadingStatusChange(sfpState);\n        },\n        [showCardUIElements, setShowCardUIElements]\n    );\n\n    /**\n     * This function implements the same logic that LoadingProvider uses to show and hide elements\n     * We want to mimic this behavior so we can hide and show the pay button or the instructions text\n     * Deciding to do it this way since we garante there's no DOM changes to merchants\n     * We can break this in the next major version (v7)\n     */\n    const mimicLoadingStatusChange = sfpState => {\n        if (!sfpState.status) return;\n        if (sfpState.status == 'loading') {\n            setShowCardUIElements(false);\n        } else {\n            setShowCardUIElements(true);\n        }\n    };\n\n    // Farm the handlers for binLookup related functionality out to another 'extensions' file\n    const extensions = useMemo(\n        () =>\n            CIExtensions(\n                props,\n                { sfp },\n                {\n                    dualBrandSelectElements,\n                    setDualBrandSelectElements,\n                    setSelectedBrandValue,\n                    issuingCountryCode,\n                    setIssuingCountryCode\n                },\n                hasPanLengthRef\n            ),\n        [dualBrandSelectElements, issuingCountryCode]\n    );\n\n    /**\n     * EXPOSE METHODS expected by Card.tsx\n     */\n    cardInputRef.current.showValidation = () => {\n        // set flag\n        isValidating.current = true;\n\n        /**\n         * Clear errors prior to validating so that the screenreader will read them *all* again, and in the right order\n         * - only using aria-atomic on the error panel will read them in the wrong order\n         */\n        clearSRPanel?.(); // TODO - recheck if this is still true\n\n        // Validate SecuredFields\n        sfp.current.showValidation();\n\n        // Validate holderName & SSN & KCP (taxNumber) but *not* billingAddress\n        triggerValidation(['holderName', 'socialSecurityNumber', 'taxNumber']);\n\n        // Validate Address\n        if (billingAddressRef?.current) billingAddressRef.current.showValidation();\n    };\n\n    cardInputRef.current.processBinLookupResponse = (binLookupResponse: BinLookupResponse, isReset: boolean) => {\n        extensions.processBinLookup(binLookupResponse, isReset);\n    };\n\n    cardInputRef.current.setStatus = setStatus;\n\n    /**\n     * EFFECT HOOKS\n     */\n    useEffect(() => {\n        // componentDidMount - expose more methods expected by Card.tsx\n        cardInputRef.current.setFocusOn = sfp.current.setFocusOn;\n        cardInputRef.current.updateStyles = sfp.current.updateStyles;\n        cardInputRef.current.handleUnsupportedCard = sfp.current.handleUnsupportedCard;\n\n        // componentWillUnmount\n        return () => {\n            sfp.current.destroy();\n        };\n    }, []);\n\n    /**\n     * Handle form schema updates\n     */\n    useEffect(() => {\n        const newSchema = [\n            ...(props.hasHolderName ? ['holderName'] : []),\n            ...(showBrazilianSSN ? ['socialSecurityNumber'] : []),\n            ...(showKCP ? ['taxNumber'] : []),\n            ...(showBillingAddress ? ['billingAddress'] : [])\n        ];\n        setSchema(newSchema);\n    }, [props.hasHolderName, showBrazilianSSN, showKCP]);\n\n    /**\n     * Handle updates from useForm\n     */\n    useEffect(() => {\n        setData({ ...data, holderName: formData.holderName ?? '', taxNumber: formData.taxNumber });\n\n        setSocialSecurityNumber(formData.socialSecurityNumber);\n\n        if (showBillingAddress) setBillingAddress({ ...formData.billingAddress });\n\n        setValid({\n            ...valid,\n            holderName: props.holderNameRequired ? formValid.holderName : true,\n            // Setting value to false if it's falsy keeps in line with existing, expected behaviour\n            // - but there is an argument to allow 'undefined' as a value to indicate the non-presence of the field\n            socialSecurityNumber: formValid.socialSecurityNumber ? formValid.socialSecurityNumber : false,\n            taxNumber: formValid.taxNumber ? formValid.taxNumber : false,\n            billingAddress: formValid.billingAddress ? formValid.billingAddress : false\n        });\n\n        // Check if billingAddress errors object has any properties that aren't null or undefined\n        const addressHasErrors = formErrors.billingAddress\n            ? Object.entries(formErrors.billingAddress).reduce((acc, [, error]) => acc || error != null, false)\n            : false;\n\n        // Errors\n        setErrors({\n            ...errors,\n            holderName: props.holderNameRequired && !!formErrors.holderName ? formErrors.holderName : null,\n            socialSecurityNumber: showBrazilianSSN && !!formErrors.socialSecurityNumber ? formErrors.socialSecurityNumber : null,\n            taxNumber: showKCP && !!formErrors.taxNumber ? formErrors.taxNumber : null,\n            billingAddress: showBillingAddress && addressHasErrors ? formErrors.billingAddress : null\n        });\n    }, [formData, formValid, formErrors]);\n\n    // Use the custom hook to set (or clear) errors in the SRPanel\n    const {\n        sortedErrorList: currentErrorsSortedByLayout,\n        previousSortedErrors,\n        clearSRPanel\n    } = useSRPanelForCardInputErrors({\n        errors,\n        props,\n        isValidating,\n        retrieveLayout,\n        specifications,\n        billingAddress,\n        sfp\n    });\n\n    // Analytics: ValidationErrors\n    useEffect(() => {\n        if (currentErrorsSortedByLayout) {\n            const newErrors = getArrayDifferences<SortedErrorObject, string>(currentErrorsSortedByLayout, previousSortedErrors, 'field');\n\n            newErrors?.forEach(errorItem => {\n                const event = new AnalyticsInfoEvent({\n                    type: ANALYTICS_VALIDATION_ERROR_STR,\n                    target: fieldTypeToSnakeCase(errorItem.field),\n                    validationErrorCode: errorItem.errorCode,\n                    validationErrorMessage: getErrorMessageFromCode(errorItem.errorCode, SF_ErrorCodes)\n                });\n                props.onSubmitAnalytics(event);\n            });\n        }\n    }, [currentErrorsSortedByLayout]);\n\n    /**\n     * Main 'componentDidUpdate' handler\n     */\n    useEffect(() => {\n        const holderNameValid: boolean = valid.holderName;\n\n        const sfpValid: boolean = isSfpValid;\n        const addressValid: boolean = showBillingAddress ? valid.billingAddress : true;\n\n        const koreanAuthentication: boolean = showKCP ? !!valid.taxNumber && !!valid.encryptedPassword : true;\n\n        const socialSecurityNumberValid: boolean = showBrazilianSSN ? !!valid.socialSecurityNumber : true;\n\n        const isValid: boolean = sfpValid && holderNameValid && addressValid && koreanAuthentication && socialSecurityNumberValid;\n\n        const sfStateErrorsObj = sfp.current.mapErrorsToValidationRuleResult();\n        const mergedErrors = { ...errors, ...sfStateErrorsObj }; // maps sfErrors AND solves race condition problems for sfp from showValidation\n\n        props.onChange({\n            data,\n            valid,\n            errors: mergedErrors,\n            isValid,\n            billingAddress,\n            selectedBrandValue,\n            storePaymentMethod,\n            socialSecurityNumber,\n            installments\n        });\n    }, [data, valid, errors, selectedBrandValue, storePaymentMethod, installments]);\n\n    /**\n     * \"Update\" handler related to dual brand buttons being initially displayed\n     */\n    useEffect(() => {\n        if (dualBrandSelectElements.length > 0 && dualBrandSelectElements) {\n            const dualBrandsArr = dualBrandSelectElements.map(item => item.id);\n            const brand = dualBrandsArr[0]; // initially selected brand\n            const dualBrands = dualBrandsArr.toString();\n\n            const event = new AnalyticsInfoEvent({\n                type: ANALYTICS_DISPLAYED_STR,\n                target: DUAL_BRAND_BUTTON,\n                brand,\n                configData: { dualBrands }\n            });\n\n            props.onSubmitAnalytics(event);\n        }\n    }, [dualBrandSelectElements]);\n\n    const previousSelectedBrandValue = usePrevious(selectedBrandValue);\n\n    /**\n     * \"Update\" handler related to a dual brand button being selected\n     */\n    useEffect(() => {\n        if (previousSelectedBrandValue?.length && selectedBrandValue?.length) {\n            const event = new AnalyticsInfoEvent({ type: ANALYTICS_SELECTED_STR, target: DUAL_BRAND_BUTTON, brand: selectedBrandValue });\n\n            props.onSubmitAnalytics(event);\n        }\n    }, [selectedBrandValue]);\n\n    /**\n     * RENDER\n     */\n    const FieldToRender = props.storedPaymentMethodId ? StoredCardFieldsWrapper : CardFieldsWrapper;\n\n    return (\n        <Fragment>\n            <SecuredFieldsProvider\n                ref={sfp}\n                {...extractPropsForSFP(props)}\n                styles={{ ...props.styles }}\n                koreanAuthenticationRequired={props.configuration.koreanAuthenticationRequired}\n                hasKoreanFields={!!(props.configuration.koreanAuthenticationRequired && props.countryCode === 'kr')}\n                onChange={handleSecuredFieldsChange}\n                onBrand={onBrand}\n                onFocus={handleFocus}\n                onStateUpdate={handleSFPStateUpdate}\n                type={props.brand}\n                disableIOSArrowKeys={props.disableIOSArrowKeys ? handleTouchstartIOS : null}\n                render={({ setRootNode, setFocusOn }, sfpState) => (\n                    <div\n                        ref={setRootNode}\n                        className={classNames({\n                            'adyen-checkout__card-input': true,\n                            'adyen-checkout-card-input__wrapper': true,\n                            [`adyen-checkout__card-input--${props.fundingSource ?? 'credit'}`]: true,\n                            'adyen-checkout__card-input--loading': status === 'loading'\n                        })}\n                        role={'form'}\n                    >\n                        {showCardUIElements && <FormInstruction />}\n\n                        <FieldToRender\n                            // Extract exact props that we need to pass down\n                            {...extractPropsForCardFields(props)}\n                            // Pass on vars created in CardInput:\n                            // Base (shared w. StoredCard)\n                            data={data}\n                            valid={valid}\n                            errors={errors}\n                            handleChangeFor={handleChangeFor}\n                            focusedElement={focusedElement}\n                            setFocusOn={setFocusOn}\n                            sfpState={sfpState}\n                            cvcPolicy={cvcPolicy}\n                            hasInstallments={hasInstallments}\n                            showAmountsInInstallments={showAmountsInInstallments}\n                            handleInstallments={setInstallments}\n                            // For Card\n                            brandsIcons={props.brandsIcons}\n                            formData={formData}\n                            formErrors={formErrors}\n                            formValid={formValid}\n                            expiryDatePolicy={expiryDatePolicy}\n                            dualBrandSelectElements={dualBrandSelectElements}\n                            extensions={extensions}\n                            selectedBrandValue={selectedBrandValue}\n                            // For KCP\n                            showKCP={showKCP}\n                            // For SSN\n                            showBrazilianSSN={showBrazilianSSN}\n                            socialSecurityNumber={socialSecurityNumber}\n                            // For Store details\n                            handleOnStoreDetails={setStorePaymentMethod}\n                            // For Address\n                            setAddressRef={setAddressRef}\n                            billingAddress={billingAddress}\n                            billingAddressValidationRules={partialAddressSchema && getPartialAddressValidationRules(partialAddressCountry.current)}\n                            partialAddressSchema={partialAddressSchema}\n                            handleAddress={handleAddress}\n                            onAddressLookup={props.onAddressLookup}\n                            onAddressSelected={props.onAddressSelected}\n                            addressSearchDebounceMs={props.addressSearchDebounceMs}\n                            //\n                            iOSFocusedField={iOSFocusedField}\n                            //\n                            onFieldFocusAnalytics={onFieldFocusAnalytics}\n                            onFieldBlurAnalytics={onFieldBlurAnalytics}\n                        />\n                    </div>\n                )}\n            />\n\n            {props.fastlaneConfiguration && (\n                <FastlaneSignup\n                    {...props.fastlaneConfiguration}\n                    currentDetectedBrand={internallyDetectedBrand}\n                    onChange={props.onChange}\n                    onSubmitAnalytics={props.onSubmitAnalytics}\n                />\n            )}\n\n            {showCardUIElements &&\n                props.showPayButton &&\n                props.payButton({\n                    status,\n                    variant: props.isPayButtonPrimaryVariant ? 'primary' : 'secondary',\n                    icon: getImage({ imageFolder: 'components/' })(`${PREFIX}lock`)\n                })}\n        </Fragment>\n    );\n};\n\nCardInput.defaultProps = defaultProps;\n\nexport default CardInput;\n","import getProp from './getProp';\nimport { BrowserInfo } from '../types/global-types';\n\n/**\n * Collects available frontend browser info and store it in the properties dictated by the EMVCo spec\n * (3DS_Spec_protocolAndCoreFny_v2-1_Oct2017.pdf)\n *\n * @example\n * ```js\n * const browserInfo = collectBrowserInfo();\n * ```\n *\n * @returns An object containing the retrieved browser properties\n */\nexport default function collectBrowserInfo(): BrowserInfo {\n    const colorDepth = getProp(window, 'screen.colorDepth') || '';\n    const javaEnabled = false;\n    const screenHeight = getProp(window, 'screen.height') || ''; // TODO: Shall we set this to null instead?\n    const screenWidth = getProp(window, 'screen.width') || ''; // TODO: Shall we set this to null instead?\n    const userAgent = getProp(window, 'navigator.userAgent') || '';\n\n    const language = getProp(window, 'navigator.language') || 'en';\n    const d = new Date();\n    const timeZoneOffset = d.getTimezoneOffset();\n\n    return {\n        acceptHeader: '*/*',\n        colorDepth,\n        language,\n        javaEnabled,\n        screenHeight,\n        screenWidth,\n        userAgent,\n        timeZoneOffset\n    };\n}\n","import { httpPost } from '../../../../core/Services/http';\nimport { CardBinLookupData, CardBinValueData, CardErrorData } from '../lib/types';\nimport { DEFAULT_CARD_GROUP_TYPES } from '../lib/constants';\nimport { SF_ErrorCodes } from '../../../../core/Errors/constants';\nimport { BinLookupResponse, BinLookupResponseRaw } from '../../../Card/types';\n\nif (process.env.NODE_ENV === 'development') {\n    window.mockBinCount = 0; // Set to 0 to turn off mocking, 1 to turn it on\n}\n\nexport default parent => {\n    let currentRequestId = null;\n\n    return (callbackObj: CardBinValueData) => {\n        // Allow way for merchant to disallow binLookup by specifically setting the prop to false\n        if (parent.props.doBinLookup === false) {\n            if (parent.props.onBinValue) parent.props.onBinValue(callbackObj);\n            return;\n        }\n\n        // Do binLookup when encryptedBin property is present (and only if the merchant is using a clientKey)\n        if (callbackObj.encryptedBin && parent.props.clientKey) {\n            // Store id of request we're about to make\n            currentRequestId = callbackObj.uuid;\n\n            void httpPost(\n                {\n                    loadingContext: parent.props.loadingContext,\n                    path: `v3/bin/binLookup?token=${parent.props.clientKey}`\n                },\n                {\n                    type: parent.props.brand,\n                    supportedBrands: parent.props.brands || DEFAULT_CARD_GROUP_TYPES,\n                    encryptedBin: callbackObj.encryptedBin,\n                    requestId: callbackObj.uuid // Pass id of request\n                }\n            ).then((data: BinLookupResponseRaw) => {\n                // If response is the one we were waiting for...\n                if (data?.requestId === currentRequestId) {\n                    if (process.env.NODE_ENV === 'development') {\n                        // TODO mocking\n                        if (window.mockBinCount >= 1) {\n                            switch (window.mockBinCount) {\n                                case 1:\n                                    console.log('\\n### triggerBinLookUp::mock first response:: ');\n                                    data.brands = [\n                                        {\n                                            brand: 'mc',\n                                            cvcPolicy: 'optional',\n                                            enableLuhnCheck: true,\n                                            // showExpiryDate: true, // deprecated in /binLookup v3\n                                            expiryDatePolicy: 'optional',\n                                            // panLength: 16,\n                                            supported: true\n                                        }\n                                    ];\n                                    // data.issuingCountryCode = 'KR'; // needed to mock korean_local_card\n                                    // increment to alter second response\n                                    window.mockBinCount++;\n\n                                    break;\n                                case 2:\n                                    console.log('\\n### triggerBinLookUp::mock second response:: ');\n                                    // data.brands = null;\n                                    data.brands = [\n                                        {\n                                            brand: 'maestro',\n                                            cvcPolicy: 'required',\n                                            enableLuhnCheck: true,\n                                            showExpiryDate: true,\n                                            supported: true,\n                                            showSocialSecurityNumber: false\n                                            // panLength: 16\n                                        }\n                                    ];\n                                    break;\n                                default:\n                            }\n                        }\n                        // TODO end\n                    }\n\n                    if (data.brands?.length) {\n                        const mappedResponse = data.brands.reduce(\n                            (acc, item) => {\n                                // All brand strings end up in the detectedBrands array\n                                acc.detectedBrands.push(item.brand);\n                                // Also add the paymentMethodVariants (more granular description of the txvariant)\n                                acc.paymentMethodVariants.push(item.paymentMethodVariant);\n\n                                // Add supported brand objects to the supportedBrands array\n                                if (item.supported === true) {\n                                    acc.supportedBrands.push(item);\n                                    return acc;\n                                }\n\n                                return acc;\n                            },\n                            { supportedBrands: [], detectedBrands: [], paymentMethodVariants: [] }\n                        );\n\n                        /**\n                         * supportedBrands = merchant supports this brand(s); we have detected the card number to be of this brand(s); carry on!\n                         */\n                        if (mappedResponse.supportedBrands.length) {\n                            // ...call processBinLookupResponse with, a simplified, response object if it contains at least one supported brand\n                            parent.processBinLookupResponse({\n                                issuingCountryCode: data.issuingCountryCode,\n                                supportedBrands: mappedResponse.supportedBrands,\n                                ...(data.showSocialSecurityNumber ? { showSocialSecurityNumber: data.showSocialSecurityNumber } : {})\n                            } as BinLookupResponse);\n\n                            // Inform merchant of the result\n                            parent.onBinLookup({\n                                type: callbackObj.type,\n                                detectedBrands: mappedResponse.detectedBrands,\n                                // supportedBrands contains the subset of this.props.brands that matches the card number that the shopper has typed\n                                supportedBrands: mappedResponse.supportedBrands.map(item => item.brand),\n                                paymentMethodVariants: mappedResponse.paymentMethodVariants,\n                                supportedBrandsRaw: mappedResponse.supportedBrands, // full supportedBrands data (for customCard comp)\n                                brands: parent.props.brands || DEFAULT_CARD_GROUP_TYPES,\n                                issuingCountryCode: data.issuingCountryCode\n                            } as CardBinLookupData);\n\n                            return;\n                        }\n\n                        /**\n                         * detectedBrands = no brands the merchant supports were found; what we did detect the shopper to be entering was this brand;\n                         * error!\n                         */\n                        if (mappedResponse.detectedBrands.length) {\n                            const errObj: CardErrorData = {\n                                type: 'card',\n                                fieldType: 'encryptedCardNumber',\n                                error: SF_ErrorCodes.ERROR_MSG_UNSUPPORTED_CARD_ENTERED,\n                                detectedBrands: mappedResponse.detectedBrands\n                            };\n                            parent.handleUnsupportedCard(errObj);\n\n                            // Inform merchant of the result\n                            parent.onBinLookup({\n                                type: callbackObj.type,\n                                detectedBrands: mappedResponse.detectedBrands,\n                                supportedBrands: null,\n                                paymentMethodVariants: mappedResponse.paymentMethodVariants,\n                                brands: parent.props.brands || DEFAULT_CARD_GROUP_TYPES\n                            } as CardBinLookupData);\n\n                            return;\n                        }\n                    } else {\n                        /**\n                         *  BIN not in DB (a failed lookup will just contain a requestId)\n                         */\n                        parent.onBinLookup({\n                            type: callbackObj.type,\n                            detectedBrands: null,\n                            supportedBrands: null,\n                            paymentMethodVariants: null,\n                            brands: parent.props.brands || DEFAULT_CARD_GROUP_TYPES\n                        } as CardBinLookupData);\n\n                        // Reset the UI and let the native, regex branding happen (for the generic card)\n                        // For a single-branded card we need to pass a boolean to prompt resetting the brand logo to the 'base' type\n                        parent.processBinLookupResponse({}, true);\n                    }\n                } else {\n                    if (!data?.requestId) {\n                        // Some other kind of error on the backend\n                        parent.props.onError(data || { errorType: 'binLookup', message: 'unknownError' });\n                    }\n                    // Else - response with wrong requestId\n                }\n            });\n        } else if (currentRequestId) {\n            /**\n             * If onBinValue callback is called AND we have been doing binLookup BUT passed object doesn't have an encryptedBin property\n             * - then THE NUMBER OF DIGITS IN NUMBER FIELD HAS DROPPED BELOW THRESHOLD for BIN lookup - so reset the UI\n             */\n            parent.processBinLookupResponse(null, true);\n\n            currentRequestId = null; // Ignore any pending responses\n\n            // Reset any errors\n            const errObj: CardErrorData = {\n                type: 'card',\n                fieldType: 'encryptedCardNumber',\n                error: ''\n            };\n            parent.handleUnsupportedCard(errObj);\n\n            // CustomCard needs this to reset the UI\n            parent.onBinLookup({\n                isReset: true\n            } as CardBinLookupData);\n        }\n\n        if (parent.props.onBinValue) parent.props.onBinValue(callbackObj);\n    };\n};\n","import { ClickToPayScheme } from '../../types';\n\nexport type MastercardError = {\n    message: string;\n    reason: string;\n};\n\nexport type VisaError = {\n    error: {\n        message: string;\n        reason: string;\n    };\n};\n\nclass SrciError extends Error {\n    public reason: string;\n    public message: string;\n    public source: string;\n    public scheme: ClickToPayScheme;\n    public errorFromCardSchemeSdk: unknown;\n\n    constructor(schemeError: VisaError | MastercardError, source: string, scheme: ClickToPayScheme) {\n        super();\n\n        const message = 'error' in schemeError ? schemeError?.error?.message : schemeError?.message;\n        const reason = 'error' in schemeError ? schemeError?.error?.reason : schemeError?.reason;\n\n        this.message = message;\n        this.reason = reason;\n        this.source = source;\n        this.scheme = scheme;\n        this.errorFromCardSchemeSdk = schemeError;\n    }\n\n    toString() {\n        return `Reason: ${this.reason} / Source: ${this.source} / Scheme: ${this.scheme} / Message: ${this.message}`;\n    }\n}\n\nexport default SrciError;\n","import AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';\n\ninterface IScript {\n    load(): Promise<any>;\n    remove(): HTMLScriptElement;\n}\n\n/**\n * Creates a script element from a certain source in the passed node selector.\n * If no selector is passed it will add the script element in the body.\n *\n * @example\n * ```\n * const script = new Script('https://example.com/script.js', '.container');\n * script.load().then(doSomething);\n *\n * // To clean up just call the remove method\n * script.remove();\n * ```\n */\nclass Script implements IScript {\n    private readonly src: string;\n    private readonly node: string;\n    private readonly attributes: Partial<HTMLScriptElement>;\n    private readonly dataAttributes: Record<string, string | undefined>;\n\n    private isScriptLoadCalled = false;\n    private script: HTMLScriptElement;\n\n    constructor(src, node = 'body', attributes: Partial<HTMLScriptElement> = {}, dataAttributes: Record<string, string | undefined> = {}) {\n        this.src = src;\n        this.node = node;\n        this.attributes = attributes;\n        this.dataAttributes = dataAttributes;\n    }\n\n    public load = (): Promise<void> => {\n        if (this.isScriptLoadCalled) {\n            if (process.env.NODE_ENV === 'development') console.warn(`[Warning] script.load called more than once for ${this.src}`);\n            return;\n        }\n\n        return new Promise((resolve, reject) => {\n            const handleOnLoad = () => {\n                this.script.setAttribute('data-script-loaded', 'true');\n                resolve();\n            };\n\n            const handleOnError = (errorEvent: ErrorEvent) => {\n                this.remove();\n                reject(\n                    new AdyenCheckoutError('SCRIPT_ERROR', `Unable to load script ${this.src}. Message: ${errorEvent.message}`, {\n                        cause: errorEvent.error\n                    })\n                );\n            };\n\n            this.isScriptLoadCalled = true;\n\n            const scriptContainer: Element = document.querySelector(this.node);\n            this.script = scriptContainer.querySelector(`script[src=\"${this.src}\"]`);\n\n            // Script element exists in the browser and is already loaded\n            if (this.script && this.script.getAttribute('data-script-loaded')) {\n                resolve();\n                return;\n            } else if (this.script) {\n                // Script element exists in the browser, but it is not loaded yet\n                // Use-case:  Multiple PayPal standalone components being loaded in different parts of the screen.\n                this.script.addEventListener('load', handleOnLoad);\n                this.script.addEventListener('error', handleOnError);\n                return;\n            }\n\n            // Script element doesn't exist in the browser, so we create it and append to the DOM tree\n            this.script = document.createElement('script');\n            Object.assign(this.script, this.attributes);\n            Object.assign(this.script.dataset, this.dataAttributes);\n\n            this.script.src = this.src;\n            this.script.async = true;\n\n            this.script.addEventListener('load', handleOnLoad);\n            this.script.addEventListener('error', handleOnError);\n\n            scriptContainer.appendChild(this.script);\n        });\n    };\n\n    public remove = (): HTMLScriptElement => {\n        return this.script.parentNode && this.script.parentNode.removeChild(this.script);\n    };\n}\n\nexport default Script;\n","import {\n    CustomSdkConfiguration,\n    SrcCheckoutParams,\n    SrciCheckoutResponse,\n    SrciCompleteIdentityValidationResponse,\n    SrcIdentityLookupParams,\n    SrciIdentityLookupResponse,\n    SrciInitiateIdentityValidationResponse,\n    SrciIsRecognizedResponse,\n    SrcInitParams,\n    SrcProfile\n} from './types';\nimport SrciError, { MastercardError, VisaError } from './SrciError';\nimport { ClickToPayScheme } from '../../types';\nimport Script from '../../../../../utils/Script';\n\nexport interface ISrcInitiator {\n    schemeName: ClickToPayScheme;\n    // Loading 3rd party library\n    loadSdkScript(): Promise<void>;\n    removeSdkScript(): void;\n    // SRCi specification methods\n    init(params: SrcInitParams, srciTransactionId: string): Promise<void>;\n    isRecognized(): Promise<SrciIsRecognizedResponse>;\n    identityLookup(params: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse>;\n    initiateIdentityValidation(): Promise<SrciInitiateIdentityValidationResponse>;\n    completeIdentityValidation(validationData: string): Promise<SrciCompleteIdentityValidationResponse>;\n    getSrcProfile(idTokens: string[]): Promise<SrcProfile>;\n    checkout(params: SrcCheckoutParams): Promise<SrciCheckoutResponse>;\n    unbindAppInstance(): Promise<void>;\n}\n\nexport default abstract class AbstractSrcInitiator implements ISrcInitiator {\n    public schemeSdk: any;\n    public abstract readonly schemeName: ClickToPayScheme;\n\n    protected readonly customSdkConfiguration: CustomSdkConfiguration;\n\n    private readonly sdkUrl: string;\n    private scriptElement: Script | null = null;\n\n    protected constructor(sdkUrl: string, customSdkConfiguration: CustomSdkConfiguration) {\n        if (!sdkUrl) throw Error('AbstractSrcInitiator: Invalid SDK URL');\n\n        this.sdkUrl = sdkUrl;\n        this.customSdkConfiguration = customSdkConfiguration;\n    }\n\n    public async loadSdkScript(): Promise<void> {\n        if (!this.isSdkIsAvailableOnWindow()) {\n            this.scriptElement = new Script(this.sdkUrl);\n            await this.scriptElement.load();\n        }\n        this.assignSdkReference();\n    }\n\n    public removeSdkScript(): void {\n        this.scriptElement.remove();\n    }\n\n    /**\n     * Verifies if SDK is already loaded on the window object.\n     * Example: Merchant can preload the SDK to speed up the loading time\n     */\n    protected abstract isSdkIsAvailableOnWindow(): boolean;\n\n    /**\n     * Assign SchemeSDK object to 'schemeSdk' property.\n     * Each scheme creates its own object reference on 'window' using different naming,\n     * therefore this method should be implemented by the subclass to assign the property\n     * accordingly\n     */\n    protected abstract assignSdkReference(): void;\n\n    /**\n     * Initializes the app with common state. The init method must be called before any other methods.\n     */\n    public abstract init(params: SrcInitParams, srciTransactionId: string): Promise<void>;\n\n    /**\n     * This method performs checkout using the specified card. If successful, the\n     * response contains summary checkout information.\n     */\n    public async checkout(params: SrcCheckoutParams): Promise<SrciCheckoutResponse> {\n        try {\n            const checkoutResponse = await this.schemeSdk.checkout(params);\n            return checkoutResponse;\n        } catch (error) {\n            const srciError = new SrciError(error as VisaError | MastercardError, 'checkout', this.schemeName);\n            throw srciError;\n        }\n    }\n\n    /**\n     * This method disassociates the Consumer application / Consumer Device from the Consumer’s SRC Profile.\n     */\n    public async unbindAppInstance(): Promise<void> {\n        try {\n            await this.schemeSdk.unbindAppInstance();\n        } catch (error) {\n            const srciError = new SrciError(error as VisaError | MastercardError, 'unbindAppInstance', this.schemeName);\n            throw srciError;\n        }\n    }\n\n    /**\n     * Determines whether the consumer is recognized, e.g. by detecting the presence of a local cookie in\n     * the browser environment.\n     */\n    public async isRecognized(): Promise<SrciIsRecognizedResponse> {\n        try {\n            const isRecognizedResponse = await this.schemeSdk.isRecognized();\n            return isRecognizedResponse;\n        } catch (error) {\n            const srciError = new SrciError(error as VisaError | MastercardError, 'isRecognized', this.schemeName);\n            throw srciError;\n        }\n    }\n\n    /**\n     * Sends a validation code to the specified consumer.\n     * This method sends a one-time password (OTP) to the consumer to start validation\n     */\n    public async initiateIdentityValidation(): Promise<SrciInitiateIdentityValidationResponse> {\n        try {\n            const identityValidationResponse = await this.schemeSdk.initiateIdentityValidation();\n            return identityValidationResponse;\n        } catch (error) {\n            const srciError = new SrciError(error as VisaError | MastercardError, 'initiateIdentityValidation', this.schemeName);\n            throw srciError;\n        }\n    }\n\n    /**\n     * Obtains the masked card and other account profile data associated with the userId.\n     */\n    public async getSrcProfile(idTokens: string[]): Promise<SrcProfile> {\n        try {\n            const getSrcProfileResponse = await this.schemeSdk.getSrcProfile({ idTokens });\n            return getSrcProfileResponse;\n        } catch (error) {\n            const srciError = new SrciError(error as VisaError | MastercardError, 'getSrcProfile', this.schemeName);\n            throw srciError;\n        }\n    }\n\n    /**\n     * Obtains the user account associated with the consumer’s identity (an email address or phone\n     * number).\n     */\n    public abstract identityLookup(params: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse>;\n\n    /**\n     * This method completes the identity validation by receiving the one-time password (OTP) sent to the\n     * consumer to start validation.\n     */\n    public abstract completeIdentityValidation(otp: string): Promise<SrciCompleteIdentityValidationResponse>;\n}\n","import { getVisaSetttings, VISA_SDK_PROD, VISA_SDK_TEST } from './config';\nimport AbstractSrcInitiator from './AbstractSrcInitiator';\nimport SrciError, { MastercardError, VisaError } from './SrciError';\nimport type {\n    CustomSdkConfiguration,\n    SrciCompleteIdentityValidationResponse,\n    SrcIdentityLookupParams,\n    SrciIdentityLookupResponse,\n    SrcInitParams\n} from './types';\n\nconst IdentityTypeMap = {\n    email: 'EMAIL',\n    telephoneNumber: 'MOBILE_NUMBER'\n};\n\nclass VisaSdk extends AbstractSrcInitiator {\n    public readonly schemeName = 'visa';\n\n    constructor(environment: string, customSdkConfig: CustomSdkConfiguration) {\n        super(environment.toLowerCase().includes('live') ? VISA_SDK_PROD : VISA_SDK_TEST, customSdkConfig);\n    }\n\n    protected isSdkIsAvailableOnWindow(): boolean {\n        // @ts-ignore vAdapters is created by the VISA sdk\n        if (window.vAdapters?.VisaSRCI) return true;\n        return false;\n    }\n\n    protected assignSdkReference(): void {\n        // @ts-ignore vAdapters is created by the VISA sdk\n        this.schemeSdk = new window.vAdapters.VisaSRCI();\n    }\n\n    public async init(params: SrcInitParams, srciTransactionId: string): Promise<void> {\n        try {\n            const sdkProps = {\n                ...params,\n                ...getVisaSetttings(this.customSdkConfiguration),\n                srciTransactionId\n            };\n\n            await this.schemeSdk.init(sdkProps);\n        } catch (err) {\n            const srciError = new SrciError(err as VisaError | MastercardError, 'init', this.schemeName);\n            throw srciError;\n        }\n    }\n\n    public async identityLookup({ identityValue, type }: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse> {\n        try {\n            const consumerIdentity = {\n                identityValue,\n                type: IdentityTypeMap[type]\n            };\n\n            const response = await this.schemeSdk.identityLookup(consumerIdentity);\n            return response;\n        } catch (err) {\n            const srciError = new SrciError(err as VisaError | MastercardError, 'identityLookup', this.schemeName);\n            throw srciError;\n        }\n    }\n\n    public async completeIdentityValidation(otp: string): Promise<SrciCompleteIdentityValidationResponse> {\n        try {\n            const response = await this.schemeSdk.completeIdentityValidation(otp);\n            return response;\n        } catch (err: unknown) {\n            const srciError = new SrciError(err as VisaError | MastercardError, 'completeIdentityValidation', this.schemeName);\n            throw srciError;\n        }\n    }\n}\n\nexport default VisaSdk;\n","import { getMastercardSettings, MC_SDK_PROD, MC_SDK_TEST } from './config';\nimport AbstractSrcInitiator from './AbstractSrcInitiator';\nimport SrciError, { MastercardError, VisaError } from './SrciError';\nimport {\n    CustomSdkConfiguration,\n    SrciCompleteIdentityValidationResponse,\n    SrcIdentityLookupParams,\n    SrciIdentityLookupResponse,\n    SrcInitParams\n} from './types';\n\nconst IdentityTypeMap = {\n    email: 'EMAIL_ADDRESS',\n    telephoneNumber: 'MOBILE_PHONE_NUMBER'\n};\n\nclass MastercardSdk extends AbstractSrcInitiator {\n    public readonly schemeName = 'mc';\n\n    constructor(environment: string, customSdkConfig: CustomSdkConfiguration) {\n        super(environment.toLowerCase().includes('live') ? MC_SDK_PROD : MC_SDK_TEST, customSdkConfig);\n    }\n\n    protected isSdkIsAvailableOnWindow(): boolean {\n        // @ts-ignore SRCSDK_MASTERCARD is created by the MC sdk\n        if (window.SRCSDK_MASTERCARD) return true;\n        return false;\n    }\n\n    protected assignSdkReference(): void {\n        // @ts-ignore SRCSDK_MASTERCARD is created by the MC sdk\n        this.schemeSdk = window.SRCSDK_MASTERCARD;\n    }\n\n    public async init(params: SrcInitParams, srciTransactionId: string): Promise<void> {\n        try {\n            const sdkProps = {\n                ...params,\n                ...getMastercardSettings(this.customSdkConfiguration),\n                srciTransactionId\n            };\n            await this.schemeSdk.init(sdkProps);\n        } catch (err) {\n            const srciError = new SrciError(err as VisaError | MastercardError, 'init', this.schemeName);\n            throw srciError;\n        }\n    }\n\n    public async identityLookup({ identityValue, type }: SrcIdentityLookupParams): Promise<SrciIdentityLookupResponse> {\n        try {\n            const consumerIdentity = {\n                identityValue,\n                identityType: IdentityTypeMap[type]\n            };\n\n            const response = await this.schemeSdk.identityLookup({ consumerIdentity });\n            return response;\n        } catch (err) {\n            const srciError = new SrciError(err as VisaError | MastercardError, 'identityLookup', this.schemeName);\n            throw srciError;\n        }\n    }\n\n    public async completeIdentityValidation(otp: string): Promise<SrciCompleteIdentityValidationResponse> {\n        try {\n            const response = await this.schemeSdk.completeIdentityValidation({ validationData: otp });\n            return response;\n        } catch (err) {\n            const srciError = new SrciError(err as VisaError | MastercardError, 'completeIdentityValidation', this.schemeName);\n            throw srciError;\n        }\n    }\n}\n\nexport default MastercardSdk;\n","/**\n * Type guard used on Promise.allSettled to define is Promise is fulfilled\n */\nconst isFulfilled = <T>(p: PromiseSettledResult<T>): p is PromiseFulfilledResult<T> => p.status === 'fulfilled';\n\n/**\n * Type guard used on Promise.allSettled to define is Promise is rejected\n */\nconst isRejected = <T>(p: PromiseSettledResult<T>): p is PromiseRejectedResult => p.status === 'rejected';\n\nexport { isFulfilled, isRejected };\n","import { ISrcInitiator } from './AbstractSrcInitiator';\nimport VisaSdk from './VisaSdk';\nimport MastercardSdk from './MastercardSdk';\nimport { CustomSdkConfiguration } from './types';\nimport AdyenCheckoutError from '../../../../../core/Errors/AdyenCheckoutError';\nimport { isFulfilled, isRejected } from '../../../../../utils/promise-util';\n\nconst sdkMap: Record<string, typeof VisaSdk | typeof MastercardSdk | null> = {\n    visa: VisaSdk,\n    mc: MastercardSdk,\n    default: null\n};\n\nconst getSchemeSdk = (scheme: string, environment: string, customConfig: CustomSdkConfiguration): ISrcInitiator | null => {\n    const SchemeSdkClass = sdkMap[scheme] || sdkMap.default;\n    return SchemeSdkClass ? new SchemeSdkClass(environment, customConfig) : null;\n};\n\nexport interface ISrcSdkLoader {\n    load(environment: string): Promise<ISrcInitiator[]>;\n    schemes: string[];\n}\n\nclass SrcSdkLoader implements ISrcSdkLoader {\n    public readonly schemes: string[];\n    private readonly customSdkConfiguration: CustomSdkConfiguration;\n\n    constructor(schemes: string[], { dpaLocale = 'en_US', dpaPresentationName = '' }) {\n        this.schemes = schemes;\n        this.customSdkConfiguration = { dpaLocale, dpaPresentationName };\n    }\n\n    public async load(environment: string): Promise<ISrcInitiator[]> {\n        if (!this.schemes || this.schemes.length === 0) {\n            throw new AdyenCheckoutError('ERROR', 'ClickToPay -> SrcSdkLoader: There are no schemes set to be loaded');\n        }\n\n        return new Promise((resolve, reject) => {\n            const sdks: ISrcInitiator[] = this.schemes.map(scheme => getSchemeSdk(scheme, environment, this.customSdkConfiguration));\n            const loadScriptPromises = sdks.map(sdk => sdk.loadSdkScript());\n\n            void Promise.allSettled(loadScriptPromises).then(loadScriptResponses => {\n                if (loadScriptResponses.every(isRejected)) {\n                    reject(\n                        new AdyenCheckoutError('ERROR', `ClickToPay -> SrcSdkLoader # Unable to load network schemes: ${this.schemes.toString()}`)\n                    );\n                }\n\n                const sdksLoaded = sdks.filter((sdk, index) => isFulfilled(loadScriptResponses[index]));\n\n                resolve(sdksLoaded);\n            });\n        });\n    }\n}\n\nexport default SrcSdkLoader;\n","import { CustomSdkConfiguration } from './types';\n\nconst VISA_SDK_TEST = 'https://sandbox-assets.secure.checkout.visa.com/checkout-widget/resources/js/src-i-adapter/visa-sdk.js?v2';\nconst VISA_SDK_PROD = 'https://assets.secure.checkout.visa.com/checkout-widget/resources/js/src-i-adapter/visa-sdk.js?v2';\n\nconst MC_SDK_TEST = 'https://sandbox.src.mastercard.com/sdk/srcsdk.mastercard.js';\nconst MC_SDK_PROD = 'https://src.mastercard.com/sdk/srcsdk.mastercard.js';\n\nconst getVisaSetttings = ({ dpaLocale = 'en_US', dpaPresentationName = '' }: CustomSdkConfiguration) => ({\n    dpaTransactionOptions: {\n        dpaLocale: dpaLocale,\n        payloadTypeIndicator: 'NON_PAYMENT',\n        customInputData: {\n            checkoutOrchestrator: 'merchant'\n        }\n    },\n    dpaData: {\n        dpaPresentationName\n    }\n});\n\nconst getMastercardSettings = ({ dpaLocale = 'en_US', dpaPresentationName = '' }: CustomSdkConfiguration) => ({\n    dpaTransactionOptions: {\n        dpaLocale: dpaLocale,\n        paymentOptions: {\n            dynamicDataType: 'CARD_APPLICATION_CRYPTOGRAM_SHORT_FORM'\n        },\n        consumerNameRequested: true,\n        customInputData: {\n            'com.mastercard.dcfExperience': 'PAYMENT_SETTINGS'\n        },\n        confirmPayment: false\n    },\n    dpaData: {\n        dpaPresentationName\n    }\n});\n\nexport { VISA_SDK_TEST, VISA_SDK_PROD, MC_SDK_TEST, MC_SDK_PROD, getVisaSetttings, getMastercardSettings };\n","const SchemeNames = {\n    mc: 'Mastercard',\n    visa: 'Visa'\n};\n\nexport { SchemeNames };\n","import { DigitalCardStatus, SrcCard } from '../services/sdks/types';\nimport { SchemeNames } from '../services/sdks/utils';\nimport { ClickToPayScheme } from '../types';\n\nclass ShopperCard {\n    public dateOfCardLastUsed?: string;\n    public dateOfCardCreated: string;\n    public panLastFour: string;\n    public srcDigitalCardId: string;\n    public scheme: ClickToPayScheme;\n    public artUri: string;\n    public srcCorrelationId: string;\n    public tokenId?: string;\n    public isExpired: boolean;\n\n    private readonly panExpirationMonth: string;\n    private readonly panExpirationYear: string;\n    private readonly descriptorName?: string;\n    private readonly status?: DigitalCardStatus = null;\n\n    constructor(maskedCard: SrcCard, scheme: ClickToPayScheme, srcCorrelationId: string) {\n        this.dateOfCardLastUsed = maskedCard.dateOfCardLastUsed;\n        this.dateOfCardCreated = maskedCard.dateOfCardCreated;\n        this.panLastFour = maskedCard.panLastFour;\n        this.srcDigitalCardId = maskedCard.srcDigitalCardId;\n        this.descriptorName = maskedCard.digitalCardData.descriptorName;\n        this.tokenId = maskedCard.tokenId;\n        this.scheme = scheme;\n        this.artUri = maskedCard.digitalCardData.artUri;\n        this.srcCorrelationId = srcCorrelationId;\n        this.panExpirationMonth = maskedCard.panExpirationMonth;\n        this.panExpirationYear = maskedCard.panExpirationYear;\n        this.status = maskedCard.digitalCardData.status;\n\n        this.isExpired = this.confirmCardIsExpired();\n    }\n\n    get title() {\n        return this.scheme === 'visa' ? SchemeNames[this.scheme] : this.descriptorName || SchemeNames[this.scheme];\n    }\n\n    get isDcfPopupEmbedded(): boolean {\n        return this.scheme === 'mc';\n    }\n\n    private confirmCardIsExpired(): boolean {\n        if (this.status !== 'ACTIVE') return true;\n        if (!this.panExpirationYear && !this.panExpirationMonth) return false;\n\n        const [currentMonth, currentYear] = [new Date().getMonth() + 1, new Date().getFullYear()];\n        if (Number(this.panExpirationYear) > currentYear) return false;\n        if (Number(this.panExpirationYear) === currentYear && Number(this.panExpirationMonth) >= currentMonth) return false;\n\n        return true;\n    }\n}\n\nexport default ShopperCard;\n","import { CardTypes, ClickToPayCheckoutPayload, SrcProfileWithScheme } from './types';\nimport { SrciCheckoutResponse } from './sdks/types';\nimport ShopperCard from '../models/ShopperCard';\nimport SrciError from './sdks/SrciError';\n\nexport const CTP_IFRAME_NAME = 'ctpIframe';\n\n/**\n * Creates the payload for the /payments call\n */\nfunction createCheckoutPayloadBasedOnScheme(\n    card: ShopperCard,\n    srciCheckoutResponse: SrciCheckoutResponse,\n    environment: string\n): ClickToPayCheckoutPayload {\n    const { scheme, tokenId, srcDigitalCardId, srcCorrelationId } = card;\n\n    switch (scheme) {\n        case 'visa':\n            /**\n             * For test environment, we are using hardcoded tokenId\n             */\n            return tokenId\n                ? {\n                      srcScheme: scheme,\n                      srcCorrelationId,\n                      srcTokenReference: environment.toLowerCase().includes('live') ? tokenId : '987654321'\n                  }\n                : { srcScheme: scheme, srcCheckoutPayload: srciCheckoutResponse.checkoutResponse, srcCorrelationId };\n        case 'mc':\n        default:\n            return { srcScheme: scheme, srcDigitalCardId, srcCorrelationId };\n    }\n}\n\nfunction createShopperMaskedCardsData(memo: ShopperCard[], srcProfile: SrcProfileWithScheme): ShopperCard[] {\n    const { profiles, srcCorrelationId } = srcProfile;\n\n    const cards: ShopperCard[] = profiles.reduce((memo: ShopperCard[], profile) => {\n        const profileCards: ShopperCard[] = profile.maskedCards.map(maskedCard => new ShopperCard(maskedCard, srcProfile.scheme, srcCorrelationId));\n        return [...memo, ...profileCards];\n    }, []);\n\n    return [...memo, ...cards];\n}\n\nfunction sortCardByLastTimeUsed(card1: ShopperCard, card2: ShopperCard) {\n    return new Date(card2.dateOfCardLastUsed).getTime() - new Date(card1.dateOfCardLastUsed).getTime();\n}\n\nfunction sortCardByLastTimeCreated(card1: ShopperCard, card2: ShopperCard) {\n    return new Date(card2.dateOfCardCreated).getTime() - new Date(card1.dateOfCardCreated).getTime();\n}\n\nfunction splitAvailableAndExpiredCards(memo: CardTypes, card: ShopperCard): CardTypes {\n    if (card.isExpired) memo.expiredCards.push(card);\n    else memo.availableCards.push(card);\n    return memo;\n}\n\nfunction splitUnusedAndUsedCards(memo: { unusedCards: ShopperCard[]; usedCards: ShopperCard[] }, card: ShopperCard) {\n    if (card.dateOfCardLastUsed) memo.usedCards.push(card);\n    else memo.unusedCards.push(card);\n    return memo;\n}\n\n/**\n * Creates the Shopper card list. The available cards are placed before the expired cards\n */\nfunction createShopperCardsList(srcProfiles: SrcProfileWithScheme[]): ShopperCard[] {\n    const cards: ShopperCard[] = srcProfiles.reduce(createShopperMaskedCardsData, []);\n    const { availableCards, expiredCards } = cards.reduce(splitAvailableAndExpiredCards, { availableCards: [], expiredCards: [] });\n    const { unusedCards, usedCards } = availableCards.reduce(splitUnusedAndUsedCards, { unusedCards: [], usedCards: [] });\n\n    return [...usedCards.sort(sortCardByLastTimeUsed), ...unusedCards.sort(sortCardByLastTimeCreated), ...expiredCards.sort(sortCardByLastTimeUsed)];\n}\n\nfunction isSrciError(error: unknown): error is SrciError {\n    if ((error as SrciError).reason) return true;\n    return false;\n}\n\nexport { createShopperCardsList, createCheckoutPayloadBasedOnScheme, isSrciError };\n","interface TimeoutErrorProps {\n    source: string;\n    scheme: string;\n    isTimeoutTriggeredBySchemeSdk: boolean;\n}\n\nclass TimeoutError extends Error {\n    public scheme: string;\n    public source: string;\n    public isTimeoutTriggeredBySchemeSdk: boolean;\n\n    /** Currently populated only by Visa SDK if available */\n    public correlationId?: string;\n\n    constructor(options: TimeoutErrorProps) {\n        super(`ClickToPayService - Timeout during ${options.source}() of the scheme '${options.scheme}'`);\n\n        this.name = 'TimeoutError';\n        this.source = options.source;\n        this.scheme = options.scheme;\n        this.isTimeoutTriggeredBySchemeSdk = options.isTimeoutTriggeredBySchemeSdk;\n    }\n\n    public setCorrelationId(correlationId: string): void {\n        this.correlationId = correlationId;\n    }\n\n    public toString() {\n        return this.message;\n    }\n}\n\nexport default TimeoutError;\n","import TimeoutError from '../errors/TimeoutError';\n\nfunction executeWithTimeout<T>(asyncFn: () => Promise<T>, timer: number, error: TimeoutError): Promise<T> {\n    let timeout = null;\n    const wait = (seconds: number) =>\n        new Promise<T>((_, reject) => {\n            timeout = setTimeout(() => reject(error), seconds);\n        });\n    return Promise.race<T>([asyncFn(), wait(timer)])\n        .then(value => {\n            clearTimeout(timeout);\n            return value;\n        })\n        .catch(error => {\n            clearTimeout(timeout);\n            throw error;\n        });\n}\nexport { executeWithTimeout };\n","import { ISrcInitiator } from './sdks/AbstractSrcInitiator';\nimport {\n    CallbackStateSubscriber,\n    IClickToPayService,\n    IdentityLookupParams,\n    ClickToPayCheckoutPayload,\n    SrcProfileWithScheme,\n    SchemesConfiguration,\n    IdentityValidationData\n} from './types';\nimport { ISrcSdkLoader } from './sdks/SrcSdkLoader';\nimport { createCheckoutPayloadBasedOnScheme, createShopperCardsList, CTP_IFRAME_NAME } from './utils';\nimport { SrciIdentityLookupResponse, SrciIsRecognizedResponse, SrcProfile } from './sdks/types';\nimport SrciError from './sdks/SrciError';\nimport { SchemeNames } from './sdks/utils';\nimport ShopperCard from '../models/ShopperCard';\nimport uuidv4 from '../../../../utils/uuid';\nimport AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';\nimport { isFulfilled, isRejected } from '../../../../utils/promise-util';\nimport TimeoutError from '../errors/TimeoutError';\nimport { executeWithTimeout } from './execute-with-timeout';\n\nexport enum CtpState {\n    Idle = 'Idle',\n    Loading = 'Loading',\n    ShopperIdentified = 'ShopperIdentified',\n    OneTimePassword = 'OneTimePassword',\n    Ready = 'Ready',\n    Login = 'Login',\n    NotAvailable = 'NotAvailable'\n}\n\nclass ClickToPayService implements IClickToPayService {\n    private readonly sdkLoader: ISrcSdkLoader;\n    private readonly schemesConfig: SchemesConfiguration;\n    private readonly shopperIdentity?: IdentityLookupParams;\n    private readonly environment: string;\n\n    private readonly onTimeout?: (error: TimeoutError) => void;\n\n    /**\n     * Mandatory unique ID passed to all the networks (Click to Pay systems), used to track user journey\n     */\n    private readonly srciTransactionId: string = uuidv4();\n\n    private sdks: ISrcInitiator[];\n    private validationSchemeSdk: ISrcInitiator = null;\n    private stateSubscriber: CallbackStateSubscriber;\n\n    public state: CtpState = CtpState.Idle;\n    public shopperCards: ShopperCard[] = null;\n    public identityValidationData: IdentityValidationData = null;\n\n    /**\n     * Indicates if the shopper opted for saving cookies during the transaction\n     */\n    public storeCookies = false;\n\n    constructor(\n        schemesConfig: SchemesConfiguration,\n        sdkLoader: ISrcSdkLoader,\n        environment: string,\n        shopperIdentity?: IdentityLookupParams,\n        onTimeout?: (error: TimeoutError) => void\n    ) {\n        this.sdkLoader = sdkLoader;\n        this.schemesConfig = schemesConfig;\n        this.shopperIdentity = shopperIdentity;\n        this.environment = environment;\n        this.onTimeout = onTimeout;\n    }\n\n    public get shopperAccountFound(): boolean {\n        return [CtpState.Ready, CtpState.ShopperIdentified].includes(this.state);\n    }\n\n    public get schemes(): string[] {\n        return this.sdkLoader.schemes;\n    }\n\n    public updateStoreCookiesConsent(shouldStore: boolean) {\n        this.storeCookies = shouldStore;\n    }\n\n    public async initialize(): Promise<void> {\n        this.setState(CtpState.Loading);\n\n        try {\n            this.sdks = await this.sdkLoader.load(this.environment);\n            await this.initiateSdks();\n\n            const { recognized = false, idTokens = null } = await this.verifyIfShopperIsRecognized();\n\n            if (recognized) {\n                await this.getShopperProfile(idTokens);\n                this.setState(CtpState.Ready);\n                return;\n            }\n\n            if (!this.shopperIdentity) {\n                this.setState(CtpState.NotAvailable);\n                return;\n            }\n\n            const { isEnrolled } = await this.verifyIfShopperIsEnrolled(this.shopperIdentity);\n            if (isEnrolled) {\n                this.setState(CtpState.ShopperIdentified);\n                return;\n            }\n\n            this.setState(CtpState.NotAvailable);\n        } catch (error) {\n            if ((error instanceof SrciError && error?.reason === 'REQUEST_TIMEOUT') || error instanceof TimeoutError) {\n                this.handleTimeout(error);\n            } else if (error instanceof SrciError) {\n                console.warn(`Error at ClickToPayService # init: ${error.toString()}`);\n            } else {\n                console.warn(error);\n            }\n\n            this.setState(CtpState.NotAvailable);\n        }\n    }\n\n    /**\n     * Set the callback for notifying when the CtPState changes\n     */\n    public subscribeOnStateChange(callback: CallbackStateSubscriber): void {\n        this.stateSubscriber = callback;\n    }\n\n    /**\n     * Initiates Consumer Identity validation with one Click to Pay System.\n     * The Click to Pay System sends a one-time-password (OTP) to the registered email address or mobile number.\n     **/\n    public async startIdentityValidation(): Promise<void> {\n        if (!this.validationSchemeSdk) {\n            throw Error('startIdentityValidation: No ValidationSDK set for the validation process');\n        }\n        try {\n            const { maskedValidationChannel } = await this.validationSchemeSdk.initiateIdentityValidation();\n\n            this.identityValidationData = {\n                maskedShopperContact: maskedValidationChannel.replace(/\\*/g, '•'),\n                selectedNetwork: SchemeNames[this.validationSchemeSdk.schemeName]\n            };\n\n            this.setState(CtpState.OneTimePassword);\n        } catch (error: unknown) {\n            // If there is an error when 'startIdentityValidation' (Ex: account is blocked), we reset the scheme chosen to perform this step\n            this.validationSchemeSdk = null;\n            throw error;\n        }\n    }\n\n    /**\n     * Completes the  validation of the Shopper by evaluating the supplied OTP.\n     */\n    public async finishIdentityValidation(otpCode: string): Promise<void> {\n        if (!this.validationSchemeSdk) {\n            throw Error('finishIdentityValidation: No ValidationSDK set for the validation process');\n        }\n\n        const validationToken = await this.validationSchemeSdk.completeIdentityValidation(otpCode);\n        await this.getShopperProfile([validationToken.idToken]);\n        this.setState(CtpState.Ready);\n        this.validationSchemeSdk = null;\n    }\n\n    /**\n     * This method performs checkout using the selected card\n     */\n    public async checkout(card: ShopperCard): Promise<ClickToPayCheckoutPayload> {\n        if (!card) {\n            throw Error('ClickToPayService # checkout: Missing card data');\n        }\n\n        const checkoutSdk = this.sdks.find(sdk => sdk.schemeName === card.scheme);\n\n        const checkoutResponse = await checkoutSdk.checkout({\n            srcDigitalCardId: card.srcDigitalCardId,\n            srcCorrelationId: card.srcCorrelationId,\n            ...(card.isDcfPopupEmbedded && { windowRef: window.frames[CTP_IFRAME_NAME] }),\n            ...(this.storeCookies && { complianceSettings: { complianceResources: [{ complianceType: 'REMEMBER_ME', uri: '' }] } })\n        });\n\n        if (checkoutResponse.dcfActionCode !== 'COMPLETE') {\n            throw new AdyenCheckoutError(\n                'ERROR',\n                `Checkout through Scheme DCF did not complete. DCF Action code received: ${checkoutResponse.dcfActionCode}`\n            );\n        }\n\n        return createCheckoutPayloadBasedOnScheme(card, checkoutResponse, this.environment);\n    }\n\n    /**\n     * Call the 'unbindAppInstance()' method of each SRC SDK in order to remove the shopper cookies.\n     * Besides, it deletes all information stored about the shopper.\n     */\n    public async logout(): Promise<void> {\n        if (!this.sdks) {\n            throw new AdyenCheckoutError('ERROR', 'ClickToPayService is not initialized');\n        }\n\n        try {\n            const logoutPromises = this.sdks.map(sdk => sdk.unbindAppInstance());\n            await Promise.all(logoutPromises);\n        } catch (error) {\n            if (error instanceof SrciError) console.warn(`Error at ClickToPayService # logout: ${error.toString()}`);\n            else console.warn(error);\n        }\n\n        this.shopperCards = null;\n        this.identityValidationData = null;\n        this.validationSchemeSdk = null;\n\n        this.setState(CtpState.Login);\n    }\n\n    /**\n     * Call the 'identityLookup()' method of each SRC SDK in order to verify if the shopper has an account.\n     *\n     * Based on the responses from the Click to Pay Systems, we should do the validation process using the SDK that\n     * that responds faster with 'consumerPresent=true'\n     */\n    public verifyIfShopperIsEnrolled(shopperIdentity: IdentityLookupParams): Promise<{ isEnrolled: boolean }> {\n        const { shopperEmail } = shopperIdentity;\n\n        return new Promise((resolve, reject) => {\n            const lookupPromises = this.sdks.map(sdk => {\n                const identityLookupPromise = executeWithTimeout<SrciIdentityLookupResponse>(\n                    () => sdk.identityLookup({ identityValue: shopperEmail, type: 'email' }),\n                    5000,\n                    new TimeoutError({\n                        source: 'identityLookup',\n                        scheme: sdk.schemeName,\n                        isTimeoutTriggeredBySchemeSdk: false\n                    })\n                );\n\n                return identityLookupPromise\n                    .then(response => {\n                        if (response.consumerPresent && !this.validationSchemeSdk) {\n                            this.setSdkForPerformingShopperIdentityValidation(sdk);\n                            resolve({ isEnrolled: true });\n                        }\n                    })\n                    .catch(error => {\n                        reject(error);\n                    });\n            });\n\n            void Promise.allSettled(lookupPromises).then(() => {\n                resolve({ isEnrolled: false });\n            });\n        });\n    }\n\n    private setState(state: CtpState): void {\n        this.state = state;\n        this.stateSubscriber?.(this.state);\n    }\n\n    private setSdkForPerformingShopperIdentityValidation(sdk: ISrcInitiator) {\n        this.validationSchemeSdk = sdk;\n    }\n\n    private handleTimeout(error: SrciError | TimeoutError) {\n        // If the timeout error was thrown directly by the scheme SDK, we convert it to TimeoutError\n        // If the timeout error was thrown by our internal timeout mechanism, we don't do anything\n        const timeoutError =\n            error instanceof SrciError\n                ? new TimeoutError({ source: error.source, scheme: error.scheme, isTimeoutTriggeredBySchemeSdk: true })\n                : error;\n\n        if (timeoutError.scheme === 'visa') {\n            timeoutError.setCorrelationId(window.VISA_SDK?.correlationId);\n\n            // Visa srciDpaId must be passed when there is no correlation ID available\n            if (window.VISA_SDK?.correlationId) window.VISA_SDK?.buildClientProfile?.();\n            else window.VISA_SDK?.buildClientProfile?.(this.schemesConfig.visa.srciDpaId);\n        }\n        this.onTimeout?.(timeoutError);\n    }\n\n    /**\n     * Based on the given 'idToken', this method goes through each SRCi SDK and fetches the shopper\n     * profile with his cards.\n     */\n    private async getShopperProfile(idTokens: string[]): Promise<void> {\n        return new Promise((resolve, reject) => {\n            const srcProfilesPromises = this.sdks.map(sdk => sdk.getSrcProfile(idTokens));\n\n            void Promise.allSettled(srcProfilesPromises).then(srcProfilesResponses => {\n                if (srcProfilesResponses.every(isRejected)) {\n                    reject(srcProfilesResponses[0].reason);\n                }\n\n                const createProfileWithScheme = (promiseResult: PromiseSettledResult<SrcProfile>, index) =>\n                    isFulfilled(promiseResult) && { ...promiseResult.value, scheme: this.sdks[index].schemeName };\n\n                const profilesWithScheme: SrcProfileWithScheme[] = srcProfilesResponses.map(createProfileWithScheme).filter(profile => !!profile);\n\n                this.shopperCards = createShopperCardsList(profilesWithScheme);\n                resolve();\n            });\n        });\n    }\n\n    /**\n     * Calls the 'isRecognized()' method of each SRC SDK in order to verify if the shopper is\n     * recognized on the device. The shopper is recognized if he/she has the Cookies stored\n     * on their browser\n     */\n    private verifyIfShopperIsRecognized(): Promise<SrciIsRecognizedResponse> {\n        return new Promise((resolve, reject) => {\n            const promises = this.sdks.map(sdk => {\n                const isRecognizedPromise = executeWithTimeout<SrciIsRecognizedResponse>(\n                    () => sdk.isRecognized(),\n                    5000,\n                    new TimeoutError({\n                        source: 'isRecognized',\n                        scheme: sdk.schemeName,\n                        isTimeoutTriggeredBySchemeSdk: false\n                    })\n                );\n\n                return isRecognizedPromise\n                    .then(response => {\n                        if (response.recognized) resolve(response);\n                    })\n                    .catch(error => {\n                        reject(error);\n                    });\n            });\n\n            // If the 'resolve' didn't happen until this point, then shopper is not recognized\n            void Promise.allSettled(promises).then(() => {\n                resolve({ recognized: false });\n            });\n        });\n    }\n\n    private initiateSdks(): Promise<void[]> {\n        const initPromises = this.sdks.map(sdk => {\n            const cfg = this.schemesConfig[sdk.schemeName];\n\n            return executeWithTimeout<void>(\n                () => sdk.init(cfg, this.srciTransactionId),\n                5000,\n                new TimeoutError({\n                    source: 'init',\n                    scheme: sdk.schemeName,\n                    isTimeoutTriggeredBySchemeSdk: false\n                })\n            );\n        });\n\n        return Promise.all(initPromises);\n    }\n}\n\nexport default ClickToPayService;\n","import SrcSdkLoader from './sdks/SrcSdkLoader';\nimport ClickToPayService from './ClickToPayService';\nimport { IClickToPayService, IdentityLookupParams } from './types';\nimport { SrcInitParams } from './sdks/types';\nimport { CardBackendConfiguration } from '../../../Card/types';\nimport { ClickToPayProps, ClickToPayScheme } from '../types';\n\n/**\n * Creates the Click to Pay service in case the required configuration is provided\n */\nexport default function createClickToPayService(\n    configuration: CardBackendConfiguration,\n    clickToPayConfiguration: ClickToPayProps | undefined,\n    environment: string\n): IClickToPayService | null {\n    const schemesConfig = createSchemesInitConfiguration(configuration);\n\n    if (!schemesConfig) {\n        return null;\n    }\n\n    const shopperIdentity = createShopperIdentityObject(clickToPayConfiguration?.shopperEmail, clickToPayConfiguration?.telephoneNumber);\n\n    const schemeNames = Object.keys(schemesConfig);\n    const srcSdkLoader = new SrcSdkLoader(schemeNames, {\n        dpaLocale: clickToPayConfiguration?.locale,\n        dpaPresentationName: clickToPayConfiguration?.merchantDisplayName\n    });\n    return new ClickToPayService(schemesConfig, srcSdkLoader, environment, shopperIdentity, clickToPayConfiguration?.onTimeout);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nconst createShopperIdentityObject = (shopperEmail: string, telephoneNumber: string): IdentityLookupParams | null => {\n    const identityLookup = {\n        ...(shopperEmail && { shopperEmail })\n        // ...(telephoneNumber && { telephoneNumber }) telephoneNumber not supported yet\n    };\n\n    return Object.keys(identityLookup).length > 0 ? identityLookup : null;\n};\n\n/**\n * Parses 'configuration' object that comes from the Card payment method config, and try to create the Click to Pay\n * initialization object in case the values are provided.\n */\nconst createSchemesInitConfiguration = (configuration: CardBackendConfiguration): Record<ClickToPayScheme, SrcInitParams> => {\n    if (!configuration) {\n        return null;\n    }\n\n    const { visaSrciDpaId, visaSrcInitiatorId, mcDpaId, mcSrcClientId } = configuration;\n\n    const schemesConfig: Record<ClickToPayScheme, SrcInitParams> = {\n        ...(mcDpaId && mcSrcClientId && { mc: { srciDpaId: mcDpaId, srcInitiatorId: mcSrcClientId } }),\n        ...(visaSrciDpaId &&\n            visaSrcInitiatorId && {\n                visa: {\n                    srciDpaId: visaSrciDpaId,\n                    srcInitiatorId: visaSrcInitiatorId\n                }\n            })\n    };\n    return Object.keys(schemesConfig).length === 0 ? null : schemesConfig;\n};\n","import { createContext } from 'preact';\nimport { CtpState } from '../services/ClickToPayService';\nimport { ClickToPayCheckoutPayload, IClickToPayService } from '../services/types';\nimport ShopperCard from '../models/ShopperCard';\nimport { ClickToPayProps } from '../types';\nimport { PaymentAmount } from '../../../../types/global-types';\nimport AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';\nimport { UIElementStatus } from '../../UIElement/types';\n\nexport interface IClickToPayContext\n    extends Pick<IClickToPayService, 'checkout' | 'startIdentityValidation' | 'finishIdentityValidation' | 'verifyIfShopperIsEnrolled'> {\n    isStandaloneComponent: boolean;\n    isCtpPrimaryPaymentMethod: boolean;\n    isStoringCookies: boolean;\n    setIsCtpPrimaryPaymentMethod(isPrimary: boolean): void;\n    logoutShopper(): Promise<void>;\n    updateStoreCookiesConsent(shouldStore: boolean): void;\n    ctpState: CtpState;\n    cards: ShopperCard[];\n    schemes: string[];\n    otpMaskedContact: string;\n    otpNetwork: string;\n    amount: PaymentAmount;\n    configuration: ClickToPayProps;\n    status: UIElementStatus;\n    onSubmit(payload: ClickToPayCheckoutPayload): void;\n    onSetStatus(status: UIElementStatus): void;\n    onError(error: AdyenCheckoutError): void;\n    onReady(): void;\n}\n\nconst ClickToPayContext = createContext<IClickToPayContext>({\n    status: null,\n    onSubmit: null,\n    onSetStatus: null,\n    onError: null,\n    onReady: null,\n    amount: null,\n    configuration: null,\n    isStandaloneComponent: null,\n    isCtpPrimaryPaymentMethod: null,\n    isStoringCookies: false,\n    setIsCtpPrimaryPaymentMethod: null,\n    logoutShopper: null,\n    updateStoreCookiesConsent: null,\n    ctpState: null,\n    cards: [],\n    schemes: [],\n    otpMaskedContact: null,\n    otpNetwork: null,\n    checkout: null,\n    verifyIfShopperIsEnrolled: null,\n    startIdentityValidation: null,\n    finishIdentityValidation: null\n});\n\nexport { ClickToPayContext };\n","import { h } from 'preact';\nimport { CtpState } from '../services/ClickToPayService';\nimport { ClickToPayContext } from './ClickToPayContext';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport { ClickToPayCheckoutPayload, IClickToPayService, IdentityLookupParams } from '../services/types';\nimport ShopperCard from '../models/ShopperCard';\nimport { ClickToPayProps } from '../types';\nimport AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';\nimport { PaymentAmount } from '../../../../types/global-types';\nimport { UIElementStatus } from '../../UIElement/types';\n\ntype ClickToPayProviderRef = {\n    setStatus?(status: UIElementStatus): void;\n};\n\nexport type ClickToPayProviderProps = {\n    isStandaloneComponent: boolean;\n    clickToPayService: IClickToPayService | null;\n    configuration: ClickToPayProps;\n    amount: PaymentAmount;\n    children: any;\n    setClickToPayRef(ref): void;\n    onSubmit(payload: ClickToPayCheckoutPayload): void;\n    onSetStatus(status: UIElementStatus): void;\n    onError(error: AdyenCheckoutError): void;\n};\n\nconst ClickToPayProvider = ({\n    isStandaloneComponent = false,\n    clickToPayService,\n    amount,\n    configuration,\n    children,\n    setClickToPayRef,\n    onSubmit,\n    onSetStatus,\n    onError\n}: ClickToPayProviderProps) => {\n    const [ctpService] = useState<IClickToPayService | null>(clickToPayService);\n    const [ctpState, setCtpState] = useState<CtpState>(clickToPayService?.state || CtpState.NotAvailable);\n    const [isCtpPrimaryPaymentMethod, setIsCtpPrimaryPaymentMethod] = useState<boolean>(true);\n    const [status, setStatus] = useState<UIElementStatus>('ready');\n    const clickToPayRef = useRef<ClickToPayProviderRef>({});\n    const isOnReadyInvoked = useRef<boolean>(false);\n\n    useEffect(() => {\n        setClickToPayRef(clickToPayRef.current);\n        clickToPayRef.current.setStatus = setStatus;\n    }, []);\n\n    useEffect(() => {\n        ctpService?.subscribeOnStateChange(status => setCtpState(status));\n    }, [ctpService]);\n\n    const onReady = useCallback(() => {\n        if (isOnReadyInvoked.current) {\n            return;\n        }\n        configuration.onReady?.();\n        isOnReadyInvoked.current = true;\n    }, [configuration?.onReady]);\n\n    const finishIdentityValidation = useCallback(\n        async (otpValue: string) => {\n            await ctpService?.finishIdentityValidation(otpValue);\n        },\n        [ctpService]\n    );\n\n    const startIdentityValidation = useCallback(async () => {\n        const data = await ctpService?.startIdentityValidation();\n        return data;\n    }, [ctpService]);\n\n    const checkout = useCallback(\n        async (card: ShopperCard) => {\n            return await ctpService?.checkout(card);\n        },\n        [ctpService]\n    );\n\n    const verifyIfShopperIsEnrolled = useCallback(\n        async (shopperIdentity: IdentityLookupParams) => {\n            return await ctpService?.verifyIfShopperIsEnrolled(shopperIdentity);\n        },\n        [ctpService]\n    );\n\n    const logoutShopper = useCallback(async () => {\n        await ctpService?.logout();\n    }, [ctpService]);\n\n    const updateStoreCookiesConsent = useCallback(\n        (shouldStore: boolean) => {\n            ctpService.updateStoreCookiesConsent(shouldStore);\n        },\n        [ctpService]\n    );\n\n    return (\n        <ClickToPayContext.Provider\n            value={{\n                status,\n                onSubmit,\n                onError,\n                onSetStatus,\n                amount,\n                configuration,\n                isStoringCookies: ctpService?.storeCookies,\n                isStandaloneComponent,\n                isCtpPrimaryPaymentMethod,\n                setIsCtpPrimaryPaymentMethod,\n                ctpState,\n                verifyIfShopperIsEnrolled,\n                cards: ctpService?.shopperCards,\n                schemes: ctpService?.schemes,\n                otpMaskedContact: ctpService?.identityValidationData?.maskedShopperContact,\n                otpNetwork: ctpService?.identityValidationData?.selectedNetwork,\n                checkout,\n                logoutShopper,\n                startIdentityValidation,\n                finishIdentityValidation,\n                updateStoreCookiesConsent,\n                onReady\n            }}\n        >\n            {children}\n        </ClickToPayContext.Provider>\n    );\n};\n\nexport default ClickToPayProvider;\n","import { useContext } from 'preact/hooks';\nimport { ClickToPayContext, IClickToPayContext } from './ClickToPayContext';\n\nfunction useClickToPayContext(): IClickToPayContext {\n    return useContext(ClickToPayContext);\n}\n\nexport default useClickToPayContext;\n","import { ValidatorRules } from '../../../../../../utils/Validator/types';\n\nexport const otpValidationRules: ValidatorRules = {\n    otp: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: '',\n        modes: ['blur']\n    },\n    default: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: '',\n        modes: ['blur']\n    }\n};\n","import { h } from 'preact';\nimport { useCallback, useEffect, useState } from 'preact/hooks';\nimport useClickToPayContext from '../../../context/useClickToPayContext';\nimport classnames from 'classnames';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport Icon from '../../../../Icon';\nimport { isSrciError } from '../../../services/utils';\nimport { PREFIX } from '../../../../Icon/constants';\nimport Button from '../../../../Button';\n\nconst CONFIRMATION_SHOWING_TIME = 2000;\n\ninterface CtPResendOtpLinkProps {\n    onError(errorCode: string): void;\n    onResendCode(): void;\n    disabled: boolean;\n}\n\nconst CtPResendOtpLink = ({ onError, onResendCode, disabled }: CtPResendOtpLinkProps): h.JSX.Element => {\n    const [counter, setCounter] = useState<number>(null);\n    const [showConfirmation, setShowConfirmation] = useState<boolean>(false);\n    const { i18n } = useCoreContext();\n    const { startIdentityValidation } = useClickToPayContext();\n\n    useEffect(() => {\n        let timeout = null;\n        if (counter > 0) {\n            timeout = setTimeout(() => setCounter(counter - 1), 1000);\n        }\n        return () => clearTimeout(timeout);\n    }, [counter]);\n\n    useEffect(() => {\n        let timeout = null;\n\n        if (showConfirmation) {\n            timeout = setTimeout(() => {\n                setShowConfirmation(false);\n                setCounter(60);\n            }, CONFIRMATION_SHOWING_TIME);\n        }\n        return () => clearTimeout(timeout);\n    }, [showConfirmation]);\n\n    const handleResendCodeClick = useCallback(\n        async event => {\n            event.preventDefault();\n\n            try {\n                onResendCode();\n                setShowConfirmation(true);\n                await startIdentityValidation();\n            } catch (error: unknown) {\n                setCounter(0);\n                setShowConfirmation(false);\n\n                if (!isSrciError(error)) {\n                    console.error(error);\n                    return;\n                }\n\n                onError(error.reason);\n            }\n        },\n        [startIdentityValidation, onError, onResendCode]\n    );\n\n    if (showConfirmation) {\n        return (\n            <div className=\"adyen-checkout-ctp__otp-resend-code--confirmation\">\n                {i18n.get('ctp.otp.codeResent')}\n                <Icon type={`${PREFIX}checkmark`} height={14} width={14} />\n            </div>\n        );\n    }\n\n    if (counter > 0) {\n        return (\n            <div className=\"adyen-checkout-ctp__otp-resend-code--disabled\">\n                {i18n.get('ctp.otp.resendCode')} -{' '}\n                <span className=\"adyen-checkout-ctp__otp-resend-code-counter\"> {counter > 0 && `${counter}s`} </span>\n            </div>\n        );\n    }\n\n    return (\n        <Button\n            classNameModifiers={[classnames('otp-resend-code', { 'otp-resend-code--disabled': disabled })]}\n            onClick={handleResendCodeClick}\n            variant=\"link\"\n            inline={true}\n            disabled={disabled}\n        >\n            {i18n.get('ctp.otp.resendCode')}\n        </Button>\n    );\n};\n\nexport default CtPResendOtpLink;\n","import { h } from 'preact';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport { otpValidationRules } from './validate';\nimport CtPResendOtpLink from './CtPResendOtpLink';\nimport useClickToPayContext from '../../../context/useClickToPayContext';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport useForm from '../../../../../../utils/useForm';\nimport Field from '../../../../FormFields/Field';\nimport './CtPOneTimePasswordInput.scss';\nimport InputText from '../../../../FormFields/InputText';\n\ntype OnChangeProps = { data: CtPOneTimePasswordInputDataState; valid; errors; isValid: boolean };\n\ninterface CtPOneTimePasswordInputProps {\n    hideResendOtpButton: boolean;\n    disabled: boolean;\n    isValidatingOtp: boolean;\n    errorMessage?: string;\n    onSetInputHandlers(handlers: CtPOneTimePasswordInputHandlers): void;\n    onPressEnter(): Promise<void>;\n    onChange({ data, valid, errors, isValid }: OnChangeProps): void;\n    onResendCode(): void;\n}\n\ninterface CtPOneTimePasswordInputDataState {\n    otp?: string;\n}\n\nexport type CtPOneTimePasswordInputHandlers = {\n    validateInput(): void;\n};\n\nconst CtPOneTimePasswordInput = (props: CtPOneTimePasswordInputProps): h.JSX.Element => {\n    const { i18n } = useCoreContext();\n    const {\n        configuration: { disableOtpAutoFocus }\n    } = useClickToPayContext();\n\n    const formSchema = ['otp'];\n    const [resendOtpError, setResendOtpError] = useState<string>(null);\n    const { handleChangeFor, data, triggerValidation, valid, errors, isValid, setData } = useForm<CtPOneTimePasswordInputDataState>({\n        schema: formSchema,\n        rules: otpValidationRules\n    });\n    const otpInputHandlersRef = useRef<CtPOneTimePasswordInputHandlers>({ validateInput: null });\n    const inputRef = useRef<HTMLInputElement>(null);\n    const [isOtpFielDirty, setIsOtpFieldDirty] = useState<boolean>(false);\n\n    const validateInput = useCallback(() => {\n        setIsOtpFieldDirty(true);\n        triggerValidation();\n    }, [triggerValidation]);\n\n    /**\n     * If shopper changes the value of the OTP fields, input becomes dirty\n     */\n    useEffect(() => {\n        if (data.otp) setIsOtpFieldDirty(true);\n    }, [data.otp]);\n\n    useEffect(() => {\n        if (!disableOtpAutoFocus && inputRef.current) {\n            inputRef.current.focus();\n        }\n    }, [inputRef.current, disableOtpAutoFocus]);\n\n    useEffect(() => {\n        otpInputHandlersRef.current.validateInput = validateInput;\n        props.onSetInputHandlers(otpInputHandlersRef.current);\n    }, [validateInput, props.onSetInputHandlers]);\n\n    const handleOnResendOtp = useCallback(() => {\n        setData('otp', '');\n        setResendOtpError(null);\n        if (!disableOtpAutoFocus) {\n            inputRef.current.focus();\n        }\n        props.onResendCode();\n    }, [props.onResendCode, inputRef.current, disableOtpAutoFocus]);\n\n    const handleOnResendOtpError = useCallback(\n        (errorCode: string) => {\n            const message = i18n.get(`ctp.errors.${errorCode}`);\n            if (message) setResendOtpError(message);\n        },\n        [i18n]\n    );\n\n    const handleOnKeyPress = useCallback(\n        (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => {\n            if (event.key === 'Enter') {\n                void props.onPressEnter();\n            }\n        },\n        [props.onPressEnter]\n    );\n\n    useEffect(() => {\n        props.onChange({ data, valid, errors, isValid });\n    }, [data, valid, errors]);\n\n    return (\n        <div className={'adyen-checkout-ctp__otp-field-wrapper'}>\n            <Field\n                name=\"oneTimePassword\"\n                label={i18n.get('ctp.otp.fieldLabel')}\n                errorMessage={isOtpFielDirty ? resendOtpError || props.errorMessage || !!errors.otp : null}\n                classNameModifiers={['otp']}\n            >\n                <InputText\n                    name={'otp'}\n                    autocorrect={'off'}\n                    spellcheck={false}\n                    value={data.otp}\n                    disabled={props.disabled}\n                    onInput={handleChangeFor('otp', 'input')}\n                    onBlur={handleChangeFor('otp', 'blur')}\n                    onKeyPress={handleOnKeyPress}\n                    setRef={(ref: HTMLInputElement) => {\n                        inputRef.current = ref;\n                    }}\n                />\n            </Field>\n            <div className={'adyen-checkout-ctp__otp-resend-code-wrapper'}>\n                <CtPResendOtpLink disabled={props.isValidatingOtp} onError={handleOnResendOtpError} onResendCode={handleOnResendOtp} />\n            </div>\n        </div>\n    );\n};\n\nexport default CtPOneTimePasswordInput;\n","import { h } from 'preact';\nimport classnames from 'classnames';\nimport Img from '../../../Img';\nimport { SchemeNames } from '../../services/sdks/utils';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport useImage from '../../../../../core/Context/useImage';\nimport './CtPBrand.scss';\n\ntype CtPBrandProps = {\n    classNameModifiers?: string[];\n};\n\nconst CtPBrand = ({ classNameModifiers = [] }: CtPBrandProps) => {\n    const getImage = useImage();\n    const { schemes } = useClickToPayContext();\n\n    const ctpImageUrl = getImage()('ctp');\n    const pipeImageUrl = getImage({ imageFolder: 'components/' })('pipe');\n\n    return (\n        <div\n            className={classnames(\n                'adyen_checkout-ctp__brand-wrapper',\n                classNameModifiers.map(m => `adyen_checkout-ctp__brand-wrapper--${m}`)\n            )}\n        >\n            <Img className=\"adyen_checkout-ctp__brand-logo\" src={ctpImageUrl} alt={'Logo of Click to Pay'} />\n            <Img className=\"adyen_checkout-ctp__brand-pipe\" src={pipeImageUrl} alt=\"\" />\n\n            {schemes.map(brand => (\n                <Img\n                    key={brand}\n                    className={classnames('adyen_checkout-ctp__brand-scheme', `adyen_checkout-ctp__brand-scheme-${brand}`)}\n                    src={getImage()(brand)}\n                    alt={`Logo of ${SchemeNames[brand]}`}\n                />\n            ))}\n        </div>\n    );\n};\n\nexport { CtPBrand };\n","import { Fragment, h } from 'preact';\nimport { useRef } from 'preact/hooks';\nimport { CtPBrand } from '../../CtPBrand';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport useImage from '../../../../../../core/Context/useImage';\nimport { Modal } from '../../../../Modal';\nimport Img from '../../../../Img';\nimport Button from '../../../../Button';\nimport './CtPInfoModal.scss';\n\nlet idGenerator = Date.now();\n\nfunction getUniqueId() {\n    idGenerator += 1;\n    return `adyen-${idGenerator}`;\n}\n\ntype CtPInfoModalProps = {\n    isOpen: boolean;\n    onClose(): void;\n    focusAfterClose: HTMLElement;\n};\n\nconst CtPInfoModal = ({ isOpen, onClose, focusAfterClose }: CtPInfoModalProps) => {\n    const focusFirstElement = useRef<HTMLParagraphElement>();\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    const labelledBy = getUniqueId();\n    const describedBy = getUniqueId();\n\n    return (\n        <Modal\n            onClose={onClose}\n            isOpen={isOpen}\n            classNameModifiers={['ctp']}\n            labelledBy={labelledBy}\n            describedBy={describedBy}\n            focusFirst={focusFirstElement.current}\n            focusAfterClose={focusAfterClose}\n        >\n            {({ onCloseModal }) => (\n                <Fragment>\n                    <Img className=\"adyen-checkout__ctp-modal-header-image\" src={getImage({ imageFolder: 'components/' })('ctp_landscape')} alt=\"\" />\n                    <h1 id={labelledBy} className=\"adyen-checkout__ctp-modal-title\">\n                        {i18n.get('ctp.infoPopup.title')}\n                    </h1>\n\n                    <div id={describedBy}>\n                        <p tabIndex={-1} ref={focusFirstElement} className=\"adyen-checkout__ctp-modal-text\">\n                            {i18n.get('ctp.infoPopup.subtitle')}\n                        </p>\n\n                        <ul className=\"adyen-checkout__ctp-modal-text adyen-checkout__ctp-modal-benefits\" type=\"disc\">\n                            <li>{i18n.get('ctp.infoPopup.benefit1')}</li>\n                            <li>{i18n.get('ctp.infoPopup.benefit2')}</li>\n                            <li>{i18n.get('ctp.infoPopup.benefit3')}</li>\n                        </ul>\n\n                        <CtPBrand classNameModifiers={['popup']} />\n                    </div>\n\n                    <Button onClick={onCloseModal} label={i18n.get('close')} />\n                </Fragment>\n            )}\n        </Modal>\n    );\n};\n\nexport { CtPInfoModal };\n","import { Fragment, h } from 'preact';\nimport { useCallback, useRef, useState } from 'preact/hooks';\nimport { CtPInfoModal } from './CtPInfoModal';\nimport useImage from '../../../../../core/Context/useImage';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport Img from '../../../Img';\nimport './CtPInfo.scss';\n\nconst CtPInfo = () => {\n    const [isInfoModalOpen, setIsInfoModalOpen] = useState<boolean>(false);\n    const buttonRef = useRef<HTMLButtonElement>();\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const url = getImage({ imageFolder: 'components/' })('info');\n\n    const handleOnClose = useCallback(() => {\n        setIsInfoModalOpen(false);\n    }, []);\n\n    const handleOnIconClick = useCallback(() => {\n        setIsInfoModalOpen(true);\n    }, []);\n\n    return (\n        <Fragment>\n            <button\n                ref={buttonRef}\n                onClick={handleOnIconClick}\n                className=\"adyen-web__ctp-info-button\"\n                aria-label={i18n.get('ctp.aria.infoModalButton')}\n                type=\"button\"\n            >\n                <Img height=\"15\" src={url} ariaHidden={true} />\n            </button>\n\n            <CtPInfoModal isOpen={isInfoModalOpen} onClose={handleOnClose} focusAfterClose={buttonRef.current} />\n        </Fragment>\n    );\n};\n\nexport { CtPInfo };\n","import { h } from 'preact';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport { CtpState } from '../../services/ClickToPayService';\nimport classnames from 'classnames';\nimport { useMemo } from 'preact/hooks';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport './CtPLogoutLink.scss';\nimport Button from '../../../Button';\n\nconst CtPLogoutLink = () => {\n    const { ctpState, logoutShopper, status, cards } = useClickToPayContext();\n    const { i18n } = useCoreContext();\n\n    if ([CtpState.Ready, CtpState.OneTimePassword].includes(ctpState) === false) {\n        return null;\n    }\n\n    const label = useMemo(() => {\n        if (ctpState === CtpState.Ready && cards.length > 1) return i18n.get('ctp.logout.notYourCards');\n        if (ctpState === CtpState.Ready && cards.length === 1) return i18n.get('ctp.logout.notYourCard');\n        if (ctpState === CtpState.Ready && cards.length === 0) return i18n.get('ctp.logout.notYourProfile');\n        return i18n.get('ctp.logout.notYou');\n    }, [i18n, ctpState]);\n\n    return (\n        <Button\n            classNameModifiers={[\n                classnames('section-logout-button', {\n                    'section-logout-button--disabled': status === 'loading'\n                })\n            ]}\n            disabled={status === 'loading'}\n            onClick={logoutShopper}\n            variant=\"link\"\n            inline={true}\n        >\n            {label}\n        </Button>\n    );\n};\n\nexport default CtPLogoutLink;\n","import { h } from 'preact';\nimport classnames from 'classnames';\nimport CtPLogoutLink from './CtPLogoutLink';\nimport { CtPBrand } from '../CtPBrand';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport './CtPSection.scss';\n\ninterface CtPSectionProps {\n    onEnterKeyPress: (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => void;\n    children?: h.JSX.Element[];\n}\n\nconst CtPSection = ({ children, onEnterKeyPress }: CtPSectionProps): h.JSX.Element => {\n    const { isStandaloneComponent } = useClickToPayContext();\n\n    return (\n        // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n        <div\n            className={classnames('adyen-checkout-ctp__section', { 'adyen-checkout-ctp__section--standalone': isStandaloneComponent })}\n            onKeyPress={onEnterKeyPress}\n        >\n            <div className=\"adyen-checkout-ctp__section-brand\">\n                <CtPBrand />\n                <CtPLogoutLink />\n            </div>\n\n            {children}\n        </div>\n    );\n};\n\nconst Title = ({ endAdornment, children }: { endAdornment?; children }) => (\n    <div className=\"adyen-checkout-ctp__section-header\">\n        <h1 className=\"adyen-checkout-ctp__section-header-title\">{children}</h1>\n        {endAdornment && <span className=\"adyen-checkout-ctp__section-header-adornment\">{endAdornment}</span>}\n    </div>\n);\nconst Text = ({ children }: { children }) => <p className=\"adyen-checkout-ctp__section-text\">{children}</p>;\n\nCtPSection.Title = Title;\nCtPSection.Text = Text;\n\nexport default CtPSection;\n","import { h, Fragment } from 'preact';\nimport classnames from 'classnames';\nimport Field from '../../../../FormFields/Field';\nimport Checkbox from '../../../../FormFields/Checkbox';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport { useState, useCallback } from 'preact/hooks';\nimport useClickToPayContext from '../../../context/useClickToPayContext';\nimport isScreenSmall from '../../../../../../utils/isScreenSmall';\nimport './CtPSaveCookiesCheckbox.scss';\n\nfunction CtPSaveCookiesCheckbox() {\n    const { i18n } = useCoreContext();\n    const { updateStoreCookiesConsent, isStoringCookies } = useClickToPayContext();\n    const [checked, setIsChecked] = useState(isStoringCookies);\n    const [isTextTruncated, setIsTextTruncated] = useState<boolean>(isScreenSmall());\n\n    const handleOnChange = useCallback(() => {\n        const newChecked = !checked;\n        setIsChecked(newChecked);\n        updateStoreCookiesConsent(newChecked);\n    }, [updateStoreCookiesConsent, setIsChecked, checked]);\n\n    return (\n        <div\n            className={classnames('adyen-checkout-ctp__otp-checkbox-container', {\n                'adyen-checkout-ctp__otp-checkbox-container--checked': checked\n            })}\n        >\n            <Field\n                classNameModifiers={['consentCheckbox']}\n                name={'clickToPayCookiesCheckbox'}\n                showContextualElement={false}\n                useLabelElement={false}\n                i18n={i18n}\n            >\n                <Checkbox\n                    name={'clickToPayCookiesCheckbox'}\n                    onInput={handleOnChange}\n                    label={i18n.get('ctp.otp.saveCookiesCheckbox.label')}\n                    checked={checked}\n                    aria-describedby={'adyen-ctp-cookies-info'}\n                />\n            </Field>\n\n            <p className=\"adyen-checkout-ctp__otp-checkbox-info\">\n                {isTextTruncated ? (\n                    <Fragment>\n                        <span id=\"adyen-ctp-cookies-info\">{i18n.get('ctp.otp.saveCookiesCheckbox.shorterInfo')} </span>\n                        <button className=\"adyen-checkout-ctp__otp-readmore-button\" onClick={() => setIsTextTruncated(false)}>\n                            {i18n.get('readMore')}..\n                        </button>\n                    </Fragment>\n                ) : (\n                    <span id=\"adyen-ctp-cookies-info\">{i18n.get('ctp.otp.saveCookiesCheckbox.information')}</span>\n                )}\n            </p>\n        </div>\n    );\n}\n\nexport default CtPSaveCookiesCheckbox;\n","const isScreenSmall = (): boolean => window.matchMedia('(max-width: 480px)').matches;\n\nexport default isScreenSmall;\n","import { Fragment, h } from 'preact';\nimport { useCallback, useState } from 'preact/hooks';\nimport Button from '../../../Button';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport CtPOneTimePasswordInput from './CtPOneTimePasswordInput';\nimport { CtPOneTimePasswordInputHandlers } from './CtPOneTimePasswordInput/CtPOneTimePasswordInput';\nimport { CtPInfo } from '../CtPInfo';\nimport CtPSection from '../CtPSection';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport './CtPOneTimePassword.scss';\nimport CtPSaveCookiesCheckbox from './CtPSaveCookiesCheckbox';\nimport { isSrciError } from '../../services/utils';\n\ntype CtPOneTimePasswordProps = {\n    onDisplayCardComponent?(): void;\n};\nconst CtPOneTimePassword = ({ onDisplayCardComponent }: CtPOneTimePasswordProps): h.JSX.Element => {\n    const { i18n } = useCoreContext();\n    const { finishIdentityValidation, otpMaskedContact, otpNetwork, isCtpPrimaryPaymentMethod } = useClickToPayContext();\n    const [otp, setOtp] = useState<string>(null);\n    const [isValid, setIsValid] = useState<boolean>(false);\n    const [isValidatingOtp, setIsValidatingOtp] = useState<boolean>(false);\n    const [errorCode, setErrorCode] = useState<string>(null);\n    const [otpInputHandlers, setOtpInputHandlers] = useState<CtPOneTimePasswordInputHandlers>(null);\n    const [isAccountLocked, setIsAccountLocked] = useState<boolean>(false);\n\n    const onSetOtpInputHandlers = useCallback((handlers: CtPOneTimePasswordInputHandlers) => {\n        setOtpInputHandlers(handlers);\n    }, []);\n\n    const onChangeOtpInput = useCallback(({ data, isValid }) => {\n        setOtp(data.otp);\n        setIsValid(isValid);\n    }, []);\n\n    const onResendCode = useCallback(() => {\n        setErrorCode(null);\n    }, []);\n\n    const onSubmitPassword = useCallback(async () => {\n        setErrorCode(null);\n\n        if (!isValid) {\n            otpInputHandlers.validateInput();\n            return;\n        }\n\n        setIsValidatingOtp(true);\n\n        try {\n            await finishIdentityValidation(otp);\n        } catch (error: unknown) {\n            if (!isSrciError(error)) {\n                setIsValidatingOtp(false);\n                return;\n            }\n\n            setErrorCode(error?.reason);\n            setIsValidatingOtp(false);\n\n            if (error?.reason === 'ACCT_INACCESSIBLE') {\n                setIsAccountLocked(true);\n                onDisplayCardComponent?.();\n            }\n        }\n    }, [otp, isValid, otpInputHandlers, onDisplayCardComponent]);\n\n    const handleButtonKeyDown = useCallback(\n        (event: KeyboardEvent) => {\n            if (event.key === 'Enter') {\n                void onSubmitPassword();\n            }\n        },\n        [onSubmitPassword]\n    );\n\n    const subtitleParts = i18n.get('ctp.otp.subtitle').split('%@');\n\n    return (\n        <Fragment>\n            <CtPSection.Title endAdornment={<CtPInfo />}>{i18n.get('ctp.otp.title')}</CtPSection.Title>\n\n            <CtPSection.Text>\n                {subtitleParts[0]} {otpNetwork} {subtitleParts[1]}\n                <span className=\"adyen-checkout-ctp__otp-subtitle--highlighted\">{otpMaskedContact}</span>\n                {subtitleParts[2]}\n            </CtPSection.Text>\n\n            <CtPOneTimePasswordInput\n                hideResendOtpButton={isAccountLocked}\n                onChange={onChangeOtpInput}\n                onSetInputHandlers={onSetOtpInputHandlers}\n                disabled={isValidatingOtp}\n                errorMessage={errorCode && i18n.get(`ctp.errors.${errorCode}`)}\n                onPressEnter={onSubmitPassword}\n                onResendCode={onResendCode}\n                isValidatingOtp={isValidatingOtp}\n            />\n\n            <CtPSaveCookiesCheckbox />\n\n            <Button\n                disabled={isAccountLocked}\n                label={i18n.get('continue')}\n                variant={isCtpPrimaryPaymentMethod ? 'primary' : 'secondary'}\n                onClick={onSubmitPassword}\n                status={isValidatingOtp && 'loading'}\n                onKeyDown={handleButtonKeyDown}\n            />\n        </Fragment>\n    );\n};\n\nexport default CtPOneTimePassword;\n","import { Fragment, h } from 'preact';\nimport classnames from 'classnames';\nimport Img from '../../../../Img';\nimport ShopperCard from '../../../models/ShopperCard';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport useImage from '../../../../../../core/Context/useImage';\nimport './CtPSingleCard.scss';\n\ntype CtPSingleCardProps = {\n    card: ShopperCard;\n    errorMessage?: string;\n};\n\nconst CtPSingleCard = ({ card, errorMessage }: CtPSingleCardProps) => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const cardImage = card.artUri || getImage()(card.scheme);\n\n    return (\n        <Fragment>\n            <div className=\"adyen-checkout-ctp__card-list-single-card\">\n                <Img src={cardImage} height={24} className={'adyen-checkout-ctp__card-image'} />\n\n                <span className={classnames({ 'adyen-checkout-ctp__card-list-single-card-expired': card.isExpired })}>\n                    {card.title} {`•••• ${card.panLastFour}`}\n                </span>\n\n                {card.isExpired && <span className=\"adyen-checkout-ctp__expired-label\">{i18n.get('ctp.cards.expiredCard')}</span>}\n            </div>\n\n            {errorMessage && <div className=\"adyen-checkout-contextual-text--error\">{errorMessage}</div>}\n        </Fragment>\n    );\n};\n\nexport default CtPSingleCard;\n","import Language from '../../../language';\nimport { PaymentAmountExtended } from '../../../types/global-types';\n\nexport const PAY_BTN_DIVIDER = '/ ';\n\nconst amountLabel = (i18n, amount: PaymentAmountExtended) =>\n    !!amount?.value && !!amount?.currency ? i18n.amount(amount.value, amount.currency, { currencyDisplay: amount.currencyDisplay || 'symbol' }) : '';\n\nconst payAmountLabel = (i18n: Language, amount: PaymentAmountExtended) => `${i18n.get('payButton')} ${amountLabel(i18n, amount)}`;\n\nconst secondaryAmountLabel = (i18n: Language, secondaryAmount: PaymentAmountExtended) => {\n    const convertedSecondaryAmount =\n        secondaryAmount && !!secondaryAmount?.value && !!secondaryAmount?.currency\n            ? i18n.amount(secondaryAmount.value, secondaryAmount.currency, { currencyDisplay: secondaryAmount.currencyDisplay || 'symbol' })\n            : '';\n\n    const divider = convertedSecondaryAmount.length ? PAY_BTN_DIVIDER : '';\n\n    return `${divider}${convertedSecondaryAmount}`;\n};\n\nexport { payAmountLabel, amountLabel, secondaryAmountLabel };\n","import { h } from 'preact';\nimport './SecondaryButtonLabel.scss';\n\nconst SecondaryButtonLabel = ({ label }) => {\n    return <span className={'checkout-secondary-button__text'}>{label}</span>;\n};\n\nexport default SecondaryButtonLabel;\n","import { h } from 'preact';\nimport Button from '../Button';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { ButtonProps } from '../Button/types';\nimport { payAmountLabel, secondaryAmountLabel } from './utils';\nimport { PaymentAmountExtended } from '../../../types/global-types';\nimport SecondaryButtonLabel from './components/SecondaryButtonLabel';\n\nexport interface PayButtonProps extends ButtonProps {\n    /**\n     * Class name modifiers will be used as: `adyen-checkout__image--${modifier}`\n     */\n    classNameModifiers?: string[];\n    label?: string;\n    amount: PaymentAmountExtended;\n    secondaryAmount?: PaymentAmountExtended;\n    status?: string;\n    disabled?: boolean;\n    icon?: string;\n    onClick?(): void;\n}\n\nconst PayButton = ({ amount, secondaryAmount, classNameModifiers = [], label, ...props }: PayButtonProps) => {\n    const { i18n } = useCoreContext();\n    const isZeroAuth = amount && {}.hasOwnProperty.call(amount, 'value') && amount.value === 0;\n    const defaultLabel = isZeroAuth ? i18n.get('confirmPreauthorization') : payAmountLabel(i18n, amount);\n\n    /**\n     * Show the secondaryLabel if:\n     *  - it's not zero auth, and\n     *  - we don't have a predefined label (i.e. redirect, qrcode, await based comps...), and\n     *  - we do have an amount object (merchant might not be passing this in order to not show the amount on the button), and\n     *  - we have a secondaryAmount object with some properties\n     */\n    const secondaryLabel =\n        !isZeroAuth && !label && amount && secondaryAmount && Object.keys(secondaryAmount).length\n            ? secondaryAmountLabel(i18n, secondaryAmount)\n            : null;\n\n    return (\n        <Button\n            {...props}\n            disabled={props.disabled || props.status === 'loading'}\n            classNameModifiers={[...classNameModifiers, 'pay']}\n            label={label || defaultLabel}\n        >\n            {secondaryLabel && <SecondaryButtonLabel label={secondaryLabel} />}\n        </Button>\n    );\n};\n\nexport default PayButton;\nexport { payAmountLabel };\n","const isMobile = (): boolean => window.matchMedia('(max-width: 768px)').matches && /Android|iPhone|iPod/.test(navigator.userAgent);\n\nexport default isMobile;\n","import { h } from 'preact';\nimport { useEffect, useMemo } from 'preact/hooks';\nimport ShopperCard from '../../../models/ShopperCard';\nimport useClickToPayContext from '../../../context/useClickToPayContext';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport useImage from '../../../../../../core/Context/useImage';\nimport useForm from '../../../../../../utils/useForm';\nimport isMobile from '../../../../../../utils/isMobile';\nimport Field from '../../../../FormFields/Field';\nimport './CtPCardsList.scss';\nimport Select from '../../../../FormFields/Select';\n\ntype CtPCardsListProps = {\n    cards: ShopperCard[];\n    cardSelected: ShopperCard;\n    errorMessage?: string;\n    onChangeCard(card: ShopperCard): void;\n};\n\ntype CardsSelectorDataState = {\n    srcDigitalCardId: string;\n};\n\nconst schema = ['srcDigitalCardId'];\n\nconst CtPCardsList = ({ cardSelected, cards, errorMessage, onChangeCard }: CtPCardsListProps) => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const { status } = useClickToPayContext();\n    const { handleChangeFor, data } = useForm<CardsSelectorDataState>({\n        schema,\n        defaultData: { srcDigitalCardId: cardSelected.srcDigitalCardId }\n    });\n\n    const items = useMemo(() => {\n        return cards.map(card => ({\n            icon: card.artUri || getImage()(card.scheme),\n            name: `${isMobile() ? '' : card.title} •••• ${card.panLastFour} `,\n            secondaryText: card.isExpired && i18n.get('ctp.cards.expiredCard'),\n            id: card.srcDigitalCardId,\n            disabled: card.isExpired\n        }));\n    }, [cards]);\n\n    useEffect(() => {\n        const { srcDigitalCardId } = data;\n        const card = cards.find(card => card.srcDigitalCardId === srcDigitalCardId);\n        onChangeCard(card);\n    }, [data, onChangeCard]);\n\n    return (\n        <Field name=\"clickToPayCards\" errorMessage={errorMessage} readOnly={status === 'loading'}>\n            <Select\n                items={items}\n                selectedValue={data['srcDigitalCardId']}\n                name={'cards'}\n                filterable={false}\n                className={'adyen-checkout-ctp__cards-list-dropdown'}\n                readonly={status === 'loading'}\n                onChange={handleChangeFor('srcDigitalCardId')}\n            />\n        </Field>\n    );\n};\n\nexport default CtPCardsList;\n","import { Component, h } from 'preact';\nimport classNames from 'classnames';\nimport './Iframe.scss';\n\ninterface IframeProps {\n    width?: string;\n    height?: string;\n    minWidth?: string;\n    minHeight?: string;\n    border?: string;\n    src?: string;\n    allow?: string;\n    name?: string;\n    title?: string;\n    classNameModifiers?: string[];\n    callback?: (contentWindow) => void;\n}\n\nclass Iframe extends Component<IframeProps> {\n    public static defaultProps = {\n        width: '0',\n        height: '0',\n        minWidth: '0',\n        minHeight: '0',\n        src: null,\n        allow: null,\n        title: 'components iframe',\n        classNameModifiers: []\n    };\n\n    private iframeEl;\n\n    iframeOnLoad() {\n        if (this.props.callback && typeof this.props.callback === 'function') {\n            this.props.callback(this.iframeEl.contentWindow);\n        }\n    }\n\n    componentDidMount() {\n        if (this.iframeEl.addEventListener) {\n            this.iframeEl.addEventListener('load', this.iframeOnLoad.bind(this), false);\n        } else if (this.iframeEl.attachEvent) {\n            // IE fallback\n            this.iframeEl.attachEvent('onload', this.iframeOnLoad.bind(this));\n        } else {\n            this.iframeEl.onload = this.iframeOnLoad.bind(this);\n        }\n    }\n\n    componentWillUnmount() {\n        if (this.iframeEl.removeEventListener) {\n            this.iframeEl.removeEventListener('load', this.iframeOnLoad.bind(this), false);\n        } else if (this.iframeEl.detachEvent) {\n            // IE fallback\n            this.iframeEl.detachEvent('onload', this.iframeOnLoad.bind(this));\n        } else {\n            this.iframeEl.onload = null;\n        }\n    }\n\n    render({ name, src, width, height, minWidth, minHeight, allow, title, classNameModifiers }: IframeProps) {\n        const validClassNameModifiers = classNameModifiers.filter(m => !!m);\n\n        return (\n            <iframe\n                ref={ref => {\n                    this.iframeEl = ref;\n                }}\n                allow={allow}\n                className={classNames(\n                    'adyen-checkout__iframe',\n                    `adyen-checkout__iframe--${name}`,\n                    validClassNameModifiers.length && classNameModifiers.map(m => `adyen-checkout__iframe--${name}-${m}`)\n                )}\n                name={name}\n                src={src}\n                width={width}\n                height={height}\n                frameBorder=\"0\"\n                title={title}\n                /* eslint-disable react/no-unknown-property */\n                referrerpolicy=\"origin\"\n                min-width={minWidth}\n                min-height={minHeight}\n                /* eslint-enable react/no-unknown-property */\n            />\n        );\n    }\n}\n\nexport default Iframe;\n","import { Fragment, h } from 'preact';\nimport { useCallback, useEffect, useState } from 'preact/hooks';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport CtPSingleCard from './CtPSingleCard/CtPSingleCard';\nimport PayButton from '../../../PayButton';\nimport { amountLabel } from '../../../PayButton/utils';\nimport CtPCardsList from './CtPCardsList';\nimport ShopperCard from '../../models/ShopperCard';\nimport SrciError from '../../services/sdks/SrciError';\nimport CtPSection from '../CtPSection';\nimport { CTP_IFRAME_NAME } from '../../services/utils';\nimport Iframe from '../../../../internal/IFrame';\nimport useImage from '../../../../../core/Context/useImage';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport isMobile from '../../../../../utils/isMobile';\nimport Language from '../../../../../language';\nimport { PaymentAmount } from '../../../../../types/global-types';\nimport './CtPCards.scss';\nimport AdyenCheckoutError from '../../../../../core/Errors/AdyenCheckoutError';\nimport { PREFIX } from '../../../Icon/constants';\n\ntype CtPCardsProps = {\n    onDisplayCardComponent?(): void;\n};\n\nfunction getErrorLabel(errorCode: string, i18n: Language): string {\n    if (!errorCode) return null;\n\n    const errorLabel = i18n.get(`ctp.errors.${errorCode}`);\n    if (errorLabel.includes('ctp.errors')) return i18n.get(`ctp.errors.UNKNOWN_ERROR`);\n    return errorLabel;\n}\n\nfunction getPayButtonLabel(i18n: Language, amount: PaymentAmount, checkoutCard?: ShopperCard): string | null {\n    if (!checkoutCard) return i18n.get('payButton');\n    if (!isMobile())\n        return i18n.get('payButton.with', {\n            values: { value: amountLabel(i18n, amount), maskedData: `•••• ${checkoutCard?.panLastFour}` }\n        });\n    return null;\n}\n\nconst CtPCards = ({ onDisplayCardComponent }: CtPCardsProps) => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const { amount, cards, checkout, isCtpPrimaryPaymentMethod, status, onSubmit, onSetStatus, onError } = useClickToPayContext();\n    const [checkoutCard, setCheckoutCard] = useState<ShopperCard | undefined>(cards.find(card => !card.isExpired) || cards[0]);\n    const [errorCode, setErrorCode] = useState<string>(null);\n    const isEveryCardExpired = cards.every(card => card.isExpired);\n    const [isShopperCheckingOutWithCtp, setIsShopperCheckingOutWithCtp] = useState<boolean>(false);\n\n    useEffect(() => {\n        if (cards.length === 0 || isEveryCardExpired) {\n            onDisplayCardComponent?.();\n        }\n    }, [onDisplayCardComponent, isEveryCardExpired, cards]);\n\n    const doCheckout = useCallback(async () => {\n        if (!checkoutCard) return;\n\n        try {\n            setIsShopperCheckingOutWithCtp(true);\n            setErrorCode(null);\n            onSetStatus('loading');\n            const payload = await checkout(checkoutCard);\n            onSubmit(payload);\n        } catch (error: unknown) {\n            if (error instanceof SrciError) {\n                setErrorCode(error?.reason);\n                console.warn(`CtP - Checkout: Reason: ${error?.reason} / Source: ${error?.source} / Scheme: ${error?.scheme}`);\n            }\n            setIsShopperCheckingOutWithCtp(false);\n\n            if (error instanceof AdyenCheckoutError) onError(error);\n            else onError(new AdyenCheckoutError('ERROR', 'Error during ClickToPay checkout', { cause: error }));\n        }\n    }, [checkout, checkoutCard]);\n\n    const handleOnChangeCard = useCallback((card: ShopperCard) => {\n        setCheckoutCard(card);\n    }, []);\n\n    /**\n     * If shopper submits the payment using the default Card component while CtP is rendered, the status here will be updated\n     * and that can potentially display an iframe.\n     *\n     * Therefore, we use the flag 'isShopperCheckingOutWithCtp' to flag that the iframe should be displayed only in case the\n     * Shopper is checking out with Click to Pay.\n     */\n    const displayNetworkDcf = isShopperCheckingOutWithCtp && status === 'loading' && checkoutCard?.isDcfPopupEmbedded;\n    const displayCardCheckoutView = status !== 'loading' || !displayNetworkDcf;\n\n    const handlePayButtonKeyDown = useCallback(\n        (event: KeyboardEvent) => {\n            if (event.key === 'Enter') {\n                void doCheckout();\n            }\n        },\n        [doCheckout]\n    );\n\n    return (\n        <Fragment>\n            <Iframe name={CTP_IFRAME_NAME} height=\"380\" width=\"100%\" classNameModifiers={[displayNetworkDcf ? '' : 'hidden']} />\n\n            {displayCardCheckoutView && (\n                <Fragment>\n                    <CtPSection.Title>{i18n.get('ctp.cards.title')}</CtPSection.Title>\n                    <CtPSection.Text>{i18n.get('ctp.cards.subtitle')}</CtPSection.Text>\n                    {cards.length === 0 && <div className=\"adyen-checkout-ctp__empty-cards\">{i18n.get('ctp.emptyProfile.message')}</div>}\n                    {cards.length === 1 && <CtPSingleCard card={cards[0]} errorMessage={getErrorLabel(errorCode, i18n)} />}\n                    {cards.length > 1 && (\n                        <CtPCardsList\n                            cardSelected={checkoutCard}\n                            cards={cards}\n                            onChangeCard={handleOnChangeCard}\n                            errorMessage={getErrorLabel(errorCode, i18n)}\n                        />\n                    )}\n\n                    <PayButton\n                        disabled={isEveryCardExpired}\n                        amount={amount}\n                        label={getPayButtonLabel(i18n, amount, checkoutCard)}\n                        status={status}\n                        variant={isCtpPrimaryPaymentMethod ? 'primary' : 'secondary'}\n                        icon={\n                            cards.length !== 0 &&\n                            getImage({ imageFolder: 'components/' })(isCtpPrimaryPaymentMethod ? `${PREFIX}lock` : `${PREFIX}lock_black`)\n                        }\n                        onClick={doCheckout}\n                        onKeyDown={handlePayButtonKeyDown}\n                    />\n                </Fragment>\n            )}\n        </Fragment>\n    );\n};\n\nexport default CtPCards;\n","import { Fragment, h } from 'preact';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport './CtPLoader.scss';\n\nconst CtPLoader = (): h.JSX.Element => {\n    const { i18n } = useCoreContext();\n\n    return (\n        <Fragment>\n            <div className=\"adyen-checkout-ctp__card-animation\">\n                <div className=\"adyen-checkout-ctp__card-animation-layer\"></div>\n                <div className=\"adyen-checkout-ctp__card-animation-layer\"></div>\n                <div className=\"adyen-checkout-ctp__card-animation-layer\"></div>\n            </div>\n\n            <div className=\"adyen-checkout-ctp__loading-subtitle\">{i18n.get('ctp.loading.intro')}</div>\n        </Fragment>\n    );\n};\n\nexport default CtPLoader;\n","import { ValidatorRules } from '../../../../../utils/Validator/types';\n\nexport const loginValidationRules: ValidatorRules = {\n    shopperLogin: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: '',\n        modes: ['blur']\n    },\n    default: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: '',\n        modes: ['blur']\n    }\n};\n","import { h } from 'preact';\nimport InputBase, { InputBaseProps } from './InputBase';\n\nexport default function InputEmail(props: InputBaseProps) {\n    return <InputBase {...props} type=\"email\" autoCapitalize=\"off\" />;\n}\n","import { h } from 'preact';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport { loginValidationRules } from './validate';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport useForm from '../../../../../utils/useForm';\nimport Field from '../../../FormFields/Field';\nimport InputEmail from '../../../FormFields/InputEmail';\n\ntype OnChangeProps = { data: CtPLoginInputDataState; valid; errors; isValid: boolean };\n\ninterface CtPLoginInputProps {\n    disabled: boolean;\n    errorMessage?: string;\n    onPressEnter(): Promise<void>;\n    onChange({ data, valid, errors, isValid }: OnChangeProps): void;\n    onSetInputHandlers(handlers: CtPLoginInputHandlers): void;\n}\n\ninterface CtPLoginInputDataState {\n    shopperLogin?: string;\n}\n\nexport type CtPLoginInputHandlers = {\n    validateInput(): void;\n};\n\nconst CtPLoginInput = (props: CtPLoginInputProps): h.JSX.Element => {\n    const { i18n } = useCoreContext();\n    const formSchema = ['shopperLogin'];\n    const { handleChangeFor, data, triggerValidation, valid, errors, isValid } = useForm<CtPLoginInputDataState>({\n        schema: formSchema,\n        rules: loginValidationRules\n    });\n    const loginInputHandlersRef = useRef<CtPLoginInputHandlers>({ validateInput: null });\n    const [isLoginInputDirty, setIsLoginInputDirty] = useState<boolean>(false);\n\n    const validateInput = useCallback(() => {\n        setIsLoginInputDirty(true);\n        triggerValidation();\n    }, [triggerValidation]);\n\n    useEffect(() => {\n        if (data.shopperLogin) setIsLoginInputDirty(true);\n    }, [data.shopperLogin]);\n\n    useEffect(() => {\n        loginInputHandlersRef.current.validateInput = validateInput;\n        props.onSetInputHandlers(loginInputHandlersRef.current);\n    }, [validateInput, props.onSetInputHandlers]);\n\n    const handleOnKeyPress = useCallback(\n        (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => {\n            if (event.key === 'Enter') {\n                void props.onPressEnter();\n            }\n        },\n        [props.onPressEnter]\n    );\n\n    useEffect(() => {\n        props.onChange({ data, valid, errors, isValid });\n    }, [data, valid, errors]);\n\n    return (\n        <Field\n            name=\"shopperLogin\"\n            label={i18n.get('ctp.login.inputLabel')}\n            errorMessage={isLoginInputDirty ? props.errorMessage || !!errors.shopperLogin : null}\n            classNameModifiers={['shopperLogin']}\n        >\n            <InputEmail\n                name={'shopperLogin'}\n                autocorrect={'off'}\n                spellcheck={false}\n                value={data.shopperLogin}\n                disabled={props.disabled}\n                onInput={handleChangeFor('shopperLogin', 'input')}\n                onBlur={handleChangeFor('shopperLogin', 'blur')}\n                onKeyPress={handleOnKeyPress}\n            />\n        </Field>\n    );\n};\n\nexport default CtPLoginInput;\n","import { Fragment, h } from 'preact';\nimport { useCallback, useState } from 'preact/hooks';\nimport Button from '../../../Button';\nimport useClickToPayContext from '../../context/useClickToPayContext';\nimport CtPLoginInput, { CtPLoginInputHandlers } from './CtPLoginInput';\nimport { CtPInfo } from '../CtPInfo';\nimport CtPSection from '../CtPSection';\nimport SrciError from '../../services/sdks/SrciError';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport './CtPLogin.scss';\nimport TimeoutError from '../../errors/TimeoutError';\nimport { isSrciError } from '../../services/utils';\n\nconst CtPLogin = (): h.JSX.Element => {\n    const { i18n } = useCoreContext();\n    const { isCtpPrimaryPaymentMethod, setIsCtpPrimaryPaymentMethod, verifyIfShopperIsEnrolled, startIdentityValidation } = useClickToPayContext();\n    const [shopperLogin, setShopperLogin] = useState<string>(null);\n    const [isValid, setIsValid] = useState<boolean>(false);\n    const [errorCode, setErrorCode] = useState<string>(null);\n    const [isLoggingIn, setIsLoggingIn] = useState<boolean>(false);\n    const [loginInputHandlers, setLoginInputHandlers] = useState<CtPLoginInputHandlers>(null);\n\n    const onSetLoginInputHandlers = useCallback((handlers: CtPLoginInputHandlers) => {\n        setLoginInputHandlers(handlers);\n    }, []);\n\n    const handleOnLoginChange = useCallback(({ data, isValid }) => {\n        setShopperLogin(data.shopperLogin);\n        setIsValid(isValid);\n\n        // As soon as the Shopper interacts with input, the CtP becomes the primary PM\n        if (data?.shopperLogin?.length > 0) {\n            setIsCtpPrimaryPaymentMethod(true);\n        }\n    }, []);\n\n    const handleOnLoginButtonClick = useCallback(async () => {\n        setErrorCode(null);\n\n        if (!isValid) {\n            loginInputHandlers.validateInput();\n            return;\n        }\n\n        setIsLoggingIn(true);\n\n        try {\n            const { isEnrolled } = await verifyIfShopperIsEnrolled({ shopperEmail: shopperLogin });\n            if (isEnrolled) {\n                await startIdentityValidation();\n            } else {\n                setErrorCode('NOT_FOUND');\n                setIsLoggingIn(false);\n            }\n        } catch (error: unknown) {\n            if (error instanceof SrciError) console.warn(`CtP - Login error: ${error.toString()}`);\n            if (error instanceof TimeoutError) console.warn(error.toString());\n            if (isSrciError(error)) setErrorCode(error?.reason);\n            else console.error(error);\n\n            setIsLoggingIn(false);\n        }\n    }, [verifyIfShopperIsEnrolled, startIdentityValidation, shopperLogin, isValid, loginInputHandlers]);\n\n    const handleButtonKeyDown = useCallback(\n        (event: KeyboardEvent) => {\n            if (event.key === 'Enter') {\n                void handleOnLoginButtonClick();\n            }\n        },\n        [handleOnLoginButtonClick]\n    );\n\n    return (\n        <Fragment>\n            <CtPSection.Title endAdornment={<CtPInfo />}>{i18n.get('ctp.login.title')}</CtPSection.Title>\n\n            <CtPSection.Text>{i18n.get('ctp.login.subtitle')}</CtPSection.Text>\n\n            <CtPLoginInput\n                onChange={handleOnLoginChange}\n                onSetInputHandlers={onSetLoginInputHandlers}\n                disabled={isLoggingIn}\n                errorMessage={errorCode && i18n.get(`ctp.errors.${errorCode}`)}\n                onPressEnter={handleOnLoginButtonClick}\n            />\n\n            <Button\n                label={i18n.get('continue')}\n                variant={isCtpPrimaryPaymentMethod ? 'primary' : 'secondary'}\n                status={isLoggingIn && 'loading'}\n                onClick={() => {\n                    void handleOnLoginButtonClick();\n                }}\n                onKeyDown={handleButtonKeyDown}\n            />\n        </Fragment>\n    );\n};\n\nexport default CtPLogin;\n","import { h } from 'preact';\nimport { useCallback, useEffect } from 'preact/hooks';\nimport { CtpState } from './services/ClickToPayService';\nimport useClickToPayContext from './context/useClickToPayContext';\nimport CtPOneTimePassword from './components/CtPOneTimePassword';\nimport CtPCards from './components/CtPCards';\nimport CtPSection from './components/CtPSection';\nimport CtPLoader from './components/CtPLoader';\nimport CtPLogin from './components/CtPLogin';\nimport SrciError from './services/sdks/SrciError';\n\ntype ClickToPayComponentProps = {\n    onDisplayCardComponent?(): void;\n};\n\nconst ClickToPayComponent = ({ onDisplayCardComponent }: ClickToPayComponentProps): h.JSX.Element => {\n    const { ctpState, onReady, startIdentityValidation, logoutShopper } = useClickToPayContext();\n\n    useEffect(() => {\n        if ([CtpState.OneTimePassword, CtpState.Login, CtpState.Ready].includes(ctpState)) {\n            onReady();\n        }\n    }, [ctpState, onReady]);\n\n    useEffect(() => {\n        async function sendOneTimePassword() {\n            try {\n                await startIdentityValidation();\n            } catch (error) {\n                if (error instanceof SrciError) console.warn(`CtP - Identity Validation error: ${error.toString()}`);\n                await logoutShopper();\n            }\n        }\n        if (ctpState === CtpState.ShopperIdentified) {\n            void sendOneTimePassword();\n        }\n    }, [ctpState]);\n\n    /**\n     * We capture the ENTER keypress within the ClickToPay component because we do not want to propagate the event up to the UIElement\n     * UIElement would perform the payment flow (by calling .submit), which is not relevant/supported by Click to Pay\n     */\n    const handleEnterKeyPress = useCallback((event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => {\n        if (event.key === 'Enter') {\n            event.preventDefault(); // Prevent <form> submission if Component is placed inside a form\n            event.stopPropagation(); // Prevent global BaseElement keypress event to be triggered\n        }\n    }, []);\n\n    if (ctpState === CtpState.NotAvailable) {\n        return null;\n    }\n\n    return (\n        <CtPSection onEnterKeyPress={handleEnterKeyPress}>\n            {[CtpState.Loading, CtpState.ShopperIdentified].includes(ctpState) && <CtPLoader />}\n            {ctpState === CtpState.OneTimePassword && <CtPOneTimePassword onDisplayCardComponent={onDisplayCardComponent} />}\n            {ctpState === CtpState.Ready && <CtPCards onDisplayCardComponent={onDisplayCardComponent} />}\n            {ctpState === CtpState.Login && <CtPLogin />}\n        </CtPSection>\n    );\n};\n\nexport default ClickToPayComponent;\n","import { h } from 'preact';\nimport classnames from 'classnames';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './ContentSeparator.scss';\n\ninterface ContentSeparatorProps {\n    label?: string;\n    classNames?: string[];\n}\n\nfunction ContentSeparator({ label = 'qrCodeOrApp', classNames = [] }: ContentSeparatorProps) {\n    const { i18n } = useCoreContext();\n    return <div className={classnames('adyen-checkout__content-separator', ...classNames)}>{i18n.get(label)}</div>;\n}\n\nexport default ContentSeparator;\n","import { Fragment, h } from 'preact';\nimport { useCallback, useEffect, useState } from 'preact/hooks';\nimport useClickToPayContext from '../../internal/ClickToPay/context/useClickToPayContext';\nimport { CtpState } from '../../internal/ClickToPay/services/ClickToPayService';\nimport ClickToPayComponent from '../../internal/ClickToPay';\nimport ContentSeparator from '../../internal/ContentSeparator';\nimport Button from '../../internal/Button';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\n\ntype ClickToPayWrapperProps = {\n    children(isCardPrimaryInput?: boolean): h.JSX.Element;\n};\n\nconst ClickToPayHolder = ({ children }: ClickToPayWrapperProps) => {\n    const { i18n } = useCoreContext();\n    const [isCardInputVisible, setIsCardInputVisible] = useState<boolean>(null);\n    const { ctpState, isCtpPrimaryPaymentMethod, setIsCtpPrimaryPaymentMethod, status } = useClickToPayContext();\n\n    const areFieldsNotSet = isCardInputVisible === null && isCtpPrimaryPaymentMethod === null;\n\n    useEffect(() => {\n        if (areFieldsNotSet) {\n            if (ctpState === CtpState.ShopperIdentified || ctpState === CtpState.Ready) {\n                setIsCardInputVisible(false);\n                setIsCtpPrimaryPaymentMethod(true);\n                return;\n            }\n            if (ctpState === CtpState.NotAvailable) {\n                setIsCardInputVisible(true);\n                setIsCtpPrimaryPaymentMethod(false);\n            }\n        }\n    }, [ctpState, areFieldsNotSet]);\n\n    const handleOnShowCardButtonClick = useCallback(() => {\n        setIsCardInputVisible(true);\n        setIsCtpPrimaryPaymentMethod(false);\n    }, []);\n\n    const handleButtonKeyDown = useCallback(\n        (event: KeyboardEvent) => {\n            if (event.key === 'Enter') {\n                void handleOnShowCardButtonClick();\n            }\n        },\n        [handleOnShowCardButtonClick]\n    );\n\n    if (ctpState === CtpState.NotAvailable) {\n        return children();\n    }\n\n    if (ctpState === CtpState.Loading || ctpState === CtpState.ShopperIdentified) {\n        return <ClickToPayComponent />;\n    }\n\n    return (\n        <Fragment>\n            <ClickToPayComponent onDisplayCardComponent={handleOnShowCardButtonClick} />\n\n            <ContentSeparator classNames={['adyen-checkout-ctp__separator']} label={i18n.get('ctp.separatorText')} />\n\n            {isCardInputVisible ? (\n                children(!isCtpPrimaryPaymentMethod)\n            ) : (\n                <Button\n                    variant=\"secondary\"\n                    disabled={status === 'loading'}\n                    label={i18n.get('ctp.manualCardEntry')}\n                    onClick={handleOnShowCardButtonClick}\n                    onKeyDown={handleButtonKeyDown}\n                />\n            )}\n        </Fragment>\n    );\n};\n\nexport default ClickToPayHolder;\n","import ClickToPayProvider, { ClickToPayProviderProps } from '../../internal/ClickToPay/context/ClickToPayProvider';\nimport ClickToPayHolder from './ClickToPayHolder';\nimport { h } from 'preact';\n\nconst ClickToPayWrapper = ({\n    amount,\n    configuration,\n    clickToPayService,\n    setClickToPayRef,\n    onSetStatus,\n    onSubmit,\n    onError,\n    isStandaloneComponent,\n    ...props\n}: ClickToPayProviderProps) => {\n    return (\n        <ClickToPayProvider\n            isStandaloneComponent={isStandaloneComponent}\n            configuration={configuration}\n            amount={amount}\n            clickToPayService={clickToPayService}\n            setClickToPayRef={setClickToPayRef}\n            onSetStatus={onSetStatus}\n            onSubmit={onSubmit}\n            onError={onError}\n        >\n            <ClickToPayHolder>{props.children}</ClickToPayHolder>\n        </ClickToPayProvider>\n    );\n};\n\nexport default ClickToPayWrapper;\n","import { h, ComponentChildren } from 'preact';\nimport { SRPanelContext } from './SRPanelContext';\nimport { useCoreContext } from '../Context/CoreProvider';\nimport { partial } from '../../components/internal/SecuredFields/lib/utilities/commonUtils';\nimport { setSRMessagesFromErrors } from './utils';\nimport { SRPanel } from './SRPanel';\nimport { SetSRMessagesReturnObject } from './types';\nimport { StringObject } from '../../components/internal/Address/types';\n\ntype SRPanelProviderProps = {\n    srPanel: SRPanel;\n    children: ComponentChildren;\n};\n\ninterface SetSRMessagesReturnFnProps {\n    errors: {\n        [key: string]: any;\n    };\n    isValidating: boolean;\n    layout?: string[];\n    countrySpecificLabels?: StringObject;\n}\n\nexport type SetSRMessagesReturnFn = (props: SetSRMessagesReturnFnProps) => SetSRMessagesReturnObject;\n\nconst SRPanelProvider = ({ srPanel, children }: SRPanelProviderProps) => {\n    const { i18n } = useCoreContext();\n\n    // Helper fns\n    const setSRMessagesFromObjects = ({ fieldTypeMappingFn }): SetSRMessagesReturnFn => {\n        return partial(setSRMessagesFromErrors, {\n            SRPanelRef: srPanel,\n            i18n,\n            fieldTypeMappingFn\n        });\n    };\n\n    const setSRMessagesFromStrings = strs => {\n        srPanel.setMessages(strs);\n    };\n\n    const clearSRPanel = () => {\n        srPanel.setMessages(null);\n    };\n\n    const shouldMoveFocusSR = srPanel.moveFocus;\n\n    return (\n        <SRPanelContext.Provider value={{ srPanel, setSRMessagesFromObjects, setSRMessagesFromStrings, clearSRPanel, shouldMoveFocusSR }}>\n            {children}\n        </SRPanelContext.Provider>\n    );\n};\n\nexport default SRPanelProvider;\n","export enum TxVariants {\n    /** internal */\n    address = 'address',\n    bankTransfer_IBAN = 'bankTransfer_IBAN',\n    donation = 'donation',\n    personal_details = 'personal_details',\n    dropin = 'dropin',\n    /** internal */\n\n    /** Card */\n    bcmc = 'bcmc',\n    card = 'card',\n    scheme = 'scheme',\n    storedCard = 'storedCard',\n    customCard = 'customcard',\n    /** Card */\n\n    /** ThreeDS */\n    threeDS2Challenge = 'threeDS2Challenge',\n    threeDS2Fingerprint = 'threeDS2Fingerprint',\n    threeDS2DeviceFingerprint = 'threeDS2DeviceFingerprint',\n    /** ThreeDS */\n\n    /** Direct debit */\n    ach = 'ach',\n    directdebit_GB = 'directdebit_GB',\n    sepadirectdebit = 'sepadirectdebit',\n    eft_directdebit_CA = 'eft_directdebit_CA',\n    /** Direct debit */\n\n    /** Open Invoice */\n    affirm = 'affirm',\n    afterpay = 'afterpay',\n    afterpay_default = 'afterpay_default',\n    afterpay_b2b = 'afterpay_b2b',\n    atome = 'atome',\n    facilypay_3x = 'facilypay_3x',\n    facilypay_4x = 'facilypay_4x',\n    facilypay_6x = 'facilypay_6x',\n    facilypay_10x = 'facilypay_10x',\n    facilypay_12x = 'facilypay_12x',\n    ratepay = 'ratepay',\n    ratepay_directdebit = 'ratepay_directdebit',\n    /** Open Invoice */\n\n    /** Wallets */\n    amazonpay = 'amazonpay',\n    applepay = 'applepay',\n    cashapp = 'cashapp',\n    clicktopay = 'clicktopay',\n    googlepay = 'googlepay',\n    paypal = 'paypal',\n    fastlane = 'fastlane',\n    paywithgoogle = 'paywithgoogle',\n    /** Wallets */\n\n    /** Voucher */\n    boletobancario = 'boletobancario',\n    boletobancario_itau = 'boletobancario_itau',\n    boletobancario_santander = 'boletobancario_santander',\n    primeiropay_boleto = 'primeiropay_boleto',\n    doku = 'doku',\n    doku_alfamart = 'doku_alfamart',\n    doku_permata_lite_atm = 'doku_permata_lite_atm',\n    doku_indomaret = 'doku_indomaret',\n    doku_atm_mandiri_va = 'doku_atm_mandiri_va',\n    doku_sinarmas_va = 'doku_sinarmas_va',\n    doku_mandiri_va = 'doku_mandiri_va',\n    doku_cimb_va = 'doku_cimb_va',\n    doku_danamon_va = 'doku_danamon_va',\n    doku_bri_va = 'doku_bri_va',\n    doku_bni_va = 'doku_bni_va',\n    doku_bca_va = 'doku_bca_va',\n    doku_wallet = 'doku_wallet',\n    oxxo = 'oxxo',\n    /** Voucher */\n\n    /** issuerList */\n    billdesk_online = 'billdesk_online',\n    billdesk_wallet = 'billdesk_wallet',\n    dotpay = 'dotpay',\n    eps = 'eps',\n    molpay_ebanking_fpx_MY = 'molpay_ebanking_fpx_MY',\n    molpay_ebanking_TH = 'molpay_ebanking_TH',\n    molpay_ebanking_VN = 'molpay_ebanking_VN',\n    onlineBanking_CZ = 'onlineBanking_CZ',\n    onlinebanking_IN = 'onlinebanking_IN',\n    onlineBanking_PL = 'onlineBanking_PL',\n    onlineBanking_SK = 'onlineBanking_SK',\n    paybybank = 'paybybank',\n    payu_IN_cashcard = 'payu_IN_cashcard',\n    payu_IN_nb = 'payu_IN_nb',\n    wallet_IN = 'wallet_IN',\n    /** issuerList */\n\n    /** Dragonpay */\n    dragonpay = 'dragonpay',\n    dragonpay_ebanking = 'dragonpay_ebanking',\n    dragonpay_otc_banking = 'dragonpay_otc_banking',\n    dragonpay_otc_non_banking = 'dragonpay_otc_non_banking',\n    dragonpay_otc_philippines = 'dragonpay_otc_philippines',\n    /** Dragonpay */\n\n    /** Econtext */\n    econtext = 'econtext',\n    econtext_atm = 'econtext_atm',\n    econtext_online = 'econtext_online',\n    econtext_seven_eleven = 'econtext_seven_eleven',\n    econtext_stores = 'econtext_stores',\n    /** Econtext */\n\n    /** Redirect */\n    giropay = 'giropay',\n    multibanco = 'multibanco',\n    redirect = 'redirect',\n    twint = 'twint',\n    vipps = 'vipps',\n    trustly = 'trustly',\n    paybybank_AIS_DD = 'paybybank_AIS_DD',\n    riverty = 'riverty',\n    paybybank_pix = 'paybybank_pix',\n    /** Redirect */\n\n    /** Klarna */\n    klarna = 'klarna',\n    klarna_account = 'klarna_account',\n    klarna_paynow = 'klarna_paynow',\n    klarna_b2b = 'klarna_b2b',\n    /** Klarna */\n\n    /** QRLoader */\n    bcmc_mobile = 'bcmc_mobile',\n    bcmc_mobile_QR = 'bcmc_mobile_QR',\n    pix = 'pix',\n    swish = 'swish',\n    wechatpay = 'wechatpay',\n    wechatpayQR = 'wechatpayQR',\n    promptpay = 'promptpay',\n    paynow = 'paynow',\n    duitnow = 'duitnow',\n    /** QRLoader */\n\n    /** Await */\n    blik = 'blik',\n    mbway = 'mbway',\n    ancv = 'ancv',\n    payto = 'payto',\n    upi = 'upi', // also QR\n    upi_qr = 'upi_qr', // also QR\n    upi_collect = 'upi_collect', // also QR\n    upi_intent = 'upi_intent', // also QR\n    /** Await */\n\n    /** Giftcard */\n    giftcard = 'giftcard',\n    mealVoucher_FR = 'mealVoucher_FR',\n    mealVoucher_FR_natixis = 'mealVoucher_FR_natixis',\n    mealVoucher_FR_sodexo = 'mealVoucher_FR_sodexo',\n    mealVoucher_FR_groupeup = 'mealVoucher_FR_groupeup'\n    /** Giftcard */\n}\n","import { ComponentChild, h, render } from 'preact';\nimport getProp from '../../../utils/getProp';\nimport uuid from '../../../utils/uuid';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_RENDERED_STR, NO_CHECKOUT_ATTEMPT_ID } from '../../../core/Analytics/constants';\n\nimport type { ICore } from '../../../core/types';\nimport type { BaseElementProps, IBaseElement } from './types';\nimport type { PaymentData } from '../../../types/global-types';\nimport { AnalyticsInitialEvent } from '../../../core/Analytics/types';\nimport { off, on } from '../../../utils/listenerUtils';\nimport { AnalyticsInfoEvent } from '../../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsEvent } from '../../../core/Analytics/AnalyticsEvent';\n\n/**\n * Verify if the first parameter is instance of Core.\n * We do not use 'instanceof' to avoid importing the Core class directly into this class.\n * @param checkout\n */\nfunction assertIsCoreInstance(checkout: ICore): checkout is ICore {\n    if (!checkout) return false;\n    const isCoreObject = typeof checkout.initialize === 'function' && typeof checkout.createFromAction === 'function';\n    return isCoreObject;\n}\n\nabstract class BaseElement<P extends BaseElementProps> implements IBaseElement {\n    public readonly _id = `${this.constructor['type']}-${uuid()}`;\n    public readonly core: ICore;\n\n    public props: P;\n    public state: any = {};\n    public _component;\n\n    protected _node: HTMLElement = null;\n\n    protected static defaultProps = {};\n\n    constructor(checkout: ICore, props?: P) {\n        const isCoreInstance = assertIsCoreInstance(checkout);\n\n        if (!isCoreInstance) {\n            throw new AdyenCheckoutError(\n                'IMPLEMENTATION_ERROR',\n                `Trying to initialise the component '${this.constructor['type']}' without a reference to an instance of AdyenCheckout`\n            );\n        }\n\n        this.core = checkout;\n        this.buildElementProps(props);\n\n        this.handleKeyPress = this.handleKeyPress.bind(this);\n    }\n\n    protected buildElementProps(componentProps?: P) {\n        this.props = this.formatProps({ ...this.constructor['defaultProps'], ...componentProps });\n    }\n\n    /**\n     * Executed during creation of any payment element.\n     * Gives a chance to any paymentMethod to format the props we're receiving.\n     */\n    protected formatProps(props: P) {\n        return props;\n    }\n\n    /**\n     * Executed on the `data` getter.\n     * Returns the component data necessary for the /payments request\n     */\n    protected formatData(): any {\n        return {};\n    }\n\n    /* eslint-disable-next-line */\n    protected setUpAnalytics(setUpAnalyticsObj: AnalyticsInitialEvent) {\n        return null;\n    }\n\n    /* eslint-disable-next-line */\n    protected submitAnalytics(analyticsObj?: AnalyticsEvent) {\n        return null;\n    }\n\n    /* eslint-disable-next-line */\n    protected handleKeyPress(e: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) {\n        return null;\n    }\n\n    protected setState(newState: object): void {\n        this.state = { ...this.state, ...newState };\n    }\n\n    /**\n     * Returns the component payment data ready to submit to the Checkout API\n     * Note: this does not ensure validity, check isValid first\n     */\n    public get data(): PaymentData {\n        const clientData = getProp(this.props, 'modules.risk.data');\n        const checkoutAttemptId = getProp(this.props, 'modules.analytics.getCheckoutAttemptId')?.() ?? NO_CHECKOUT_ATTEMPT_ID; // NOTE: we never expect to see this \"failed\" value, but, just in case...\n        const order = this.state.order || this.props.order;\n        const componentData = this.formatData();\n\n        if (componentData.paymentMethod && checkoutAttemptId) {\n            componentData.paymentMethod.checkoutAttemptId = checkoutAttemptId;\n        }\n\n        return {\n            ...(clientData && { riskData: { clientData } }),\n            ...(order && { order: { orderData: order.orderData, pspReference: order.pspReference } }),\n            ...componentData,\n            clientStateDataIndicator: true\n        };\n    }\n\n    /**\n     * Method used to make the payment method active\n     * (Useful when there are different payment methods available and activating one PM must trigger a specific task)\n     */\n    public activate(): void {\n        return;\n    }\n\n    public render(): ComponentChild | Error {\n        // render() not implemented in the element\n        throw new Error('Payment method cannot be rendered.');\n    }\n\n    /**\n     * Mounts an element into the dom\n     * @param domNode - Node (or selector) where we will mount the payment element\n     * @returns this - the payment element instance we mounted\n     */\n    public mount(domNode: HTMLElement | string): this {\n        const node = typeof domNode === 'string' ? document.querySelector<HTMLElement>(domNode) : domNode;\n\n        if (!node) {\n            throw new Error('Component could not mount. Root node was not found.');\n        }\n\n        const setupAnalytics = !this._node;\n\n        if (this._node) {\n            this.unmount(); // new, if this._node exists then we are \"remounting\" so we first need to unmount if it's not already been done\n        }\n\n        this._node = node;\n\n        // Add listener for key press events, notably 'Enter' key presses\n        on(this._node, 'keypress', this.handleKeyPress, false);\n\n        this._component = this.render();\n\n        render(this._component, node);\n\n        // Set up analytics (once, since this._node is currently undefined) now that we have mounted and rendered\n        if (setupAnalytics) {\n            if (this.props.modules && this.props.modules.analytics) {\n                this.setUpAnalytics({\n                    containerWidth: node && node.offsetWidth,\n                    component: !this.props.isDropin ? (this.constructor['analyticsType'] ?? this.constructor['type']) : 'dropin',\n                    flavor: !this.props.isDropin ? 'components' : 'dropin'\n                }).then(() => {\n                    // Once the initial analytics set up call has been made...\n                    // ...create an analytics event  declaring that the component has been rendered\n                    // (The dropin will do this itself from DropinComponent once the PM list has rendered)\n                    if (!this.props.isDropin) {\n                        const event = new AnalyticsInfoEvent({ type: ANALYTICS_RENDERED_STR });\n                        this.submitAnalytics(event);\n                    }\n                });\n            }\n        }\n\n        return this;\n    }\n\n    /**\n     * Updates props, resets the internal state and remounts the element.\n     *\n     * @param props - props to update\n     * @returns this - the element instance\n     */\n    public update(props: Partial<P>): this {\n        this.props = this.formatProps({ ...this.props, ...props });\n        this.state = {};\n\n        return this.unmount().mount(this._node); // for new mount fny\n    }\n\n    /**\n     * Unmounts a payment element from the DOM\n     */\n    public unmount(): this {\n        // Remove listener\n        off(this._node, 'keypress', this.handleKeyPress);\n\n        if (this._node) {\n            render(null, this._node);\n        }\n\n        return this;\n    }\n\n    /**\n     * Unmounts an element and removes it from the parent instance\n     * For \"destroy\" type cleanup - when you don't intend to use the component again\n     */\n    public remove() {\n        this.unmount();\n\n        if (this.core) {\n            this.core.remove(this);\n        }\n    }\n}\n\nexport default BaseElement;\n","import { UIElementStatus } from './types';\nimport { RawPaymentResponse, PaymentResponseData, Order } from '../../../types/global-types';\nimport { IDropin } from '../../Dropin/types';\n\nconst ALLOWED_PROPERTIES = ['action', 'resultCode', 'sessionData', 'order', 'sessionResult', 'donationToken', 'error'];\n\nexport function sanitizeResponse(response: RawPaymentResponse): PaymentResponseData {\n    const removedProperties = [];\n\n    const sanitizedObject = Object.keys(response).reduce((acc, cur) => {\n        if (!ALLOWED_PROPERTIES.includes(cur)) {\n            removedProperties.push(cur);\n        } else {\n            acc[cur] = response[cur];\n        }\n        return acc;\n    }, {});\n\n    if (removedProperties.length) console.warn(`The following properties should not be passed to the client: ${removedProperties.join(', ')}`);\n\n    return sanitizedObject as PaymentResponseData;\n}\n\n/**\n * Remove not relevant properties in the final payment result object\n *\n * @param paymentResponse\n */\nexport function cleanupFinalResult(paymentResponse?: PaymentResponseData): void {\n    if (!paymentResponse) return;\n\n    delete paymentResponse.order;\n    delete paymentResponse.action;\n    if (!paymentResponse.donationToken || paymentResponse.donationToken.length === 0) {\n        delete paymentResponse.donationToken;\n    }\n}\n\nexport function resolveFinalResult(result: PaymentResponseData): [status: UIElementStatus, statusProps?: any] {\n    switch (result.resultCode) {\n        case 'Authorised':\n        case 'Received':\n            return ['success'];\n        case 'Pending':\n            return ['success'];\n        case 'Cancelled':\n        case 'Error':\n        case 'Refused':\n            return ['error'];\n        default:\n    }\n}\n\nexport function verifyPaymentDidNotFail(response: PaymentResponseData): Promise<PaymentResponseData> {\n    if (['Cancelled', 'Error', 'Refused'].includes(response.resultCode)) {\n        return Promise.reject(response);\n    }\n\n    return Promise.resolve(response);\n}\n\nexport function assertIsDropin(element: any): element is IDropin {\n    if (!element) return false;\n\n    const isDropin = typeof element.activePaymentMethod === 'object' && typeof element.closeActivePaymentMethod === 'function';\n    return isDropin;\n}\n\nexport function getRegulatoryDefaults(countryCode: string, isDropin: boolean): Record<string, any> {\n    switch (countryCode) {\n        // Finnish regulations state that no payment method can be open by default\n        case 'FI':\n            return isDropin\n                ? {\n                      openFirstPaymentMethod: false,\n                      openFirstStoredPaymentMethod: false\n                  }\n                : {};\n        default:\n            return {};\n    }\n}\n\nexport function sanitizeOrder(order: Order) {\n    if (!order || !order.orderData || !order.pspReference) return null;\n    return {\n        orderData: order.orderData,\n        pspReference: order.pspReference\n    };\n}\n","class CancelError extends Error {\n    constructor(message?: string) {\n        super(message);\n    }\n}\n\nexport default CancelError;\n","import { AnalyticsEvent } from './AnalyticsEvent';\nimport { ANALYTICS_EVENT } from './constants';\n\ntype AnalyticsLogEventObject = {\n    type: string;\n    message: string;\n    subType?: string;\n    result?: string;\n    component?: string;\n    target?: string; // is this ever used?\n};\n\nexport class AnalyticsLogEvent extends AnalyticsEvent {\n    public type: string;\n    public message?: string;\n    public subType?: string;\n    public result?: string;\n    public target?: string; // is this ever used?\n\n    constructor(analyticsObject: AnalyticsLogEventObject) {\n        super();\n\n        this.type = analyticsObject.type;\n        this.message = analyticsObject.message;\n        this.subType = analyticsObject.subType;\n        this.result = analyticsObject.result;\n        this.target = analyticsObject.target;\n        this.component = analyticsObject.component;\n\n        return this;\n    }\n\n    public getEventCategory(): string {\n        return ANALYTICS_EVENT.log;\n    }\n}\n","import { AnalyticsEvent } from './AnalyticsEvent';\nimport { ANALYTICS_EVENT } from './constants';\n\ntype AnalyticsErrorEventObject = {\n    code: string;\n    errorType: string;\n    message?: string;\n    component?: string;\n};\n\nexport class AnalyticsErrorEvent extends AnalyticsEvent {\n    public code?: string;\n    public errorType?: string;\n    public message?: string;\n\n    constructor(analyticsObject: AnalyticsErrorEventObject) {\n        super();\n\n        this.code = analyticsObject.code;\n        this.errorType = analyticsObject.errorType;\n        this.message = analyticsObject.message;\n        this.component = analyticsObject.component;\n\n        return this;\n    }\n\n    public getEventCategory(): string {\n        return ANALYTICS_EVENT.error;\n    }\n}\n","import { h } from 'preact';\nimport BaseElement from '../BaseElement/BaseElement';\nimport PayButton from '../PayButton';\nimport { assertIsDropin, cleanupFinalResult, getRegulatoryDefaults, sanitizeResponse, verifyPaymentDidNotFail } from './utils';\nimport AdyenCheckoutError, { NETWORK_ERROR } from '../../../core/Errors/AdyenCheckoutError';\nimport { hasOwnProperty } from '../../../utils/hasOwnProperty';\nimport { Resources } from '../../../core/Context/Resources';\nimport { ANALYTICS_ERROR_TYPE, ANALYTICS_SUBMIT_STR } from '../../../core/Analytics/constants';\n\nimport { AnalyticsInitialEvent } from '../../../core/Analytics/types';\nimport type { CoreConfiguration, ICore, AdditionalDetailsData } from '../../../core/types';\nimport type { ComponentMethodsRef, PayButtonFunctionProps, UIElementProps, UIElementStatus } from './types';\nimport type { CheckoutSessionDetailsResponse, CheckoutSessionPaymentResponse } from '../../../core/CheckoutSession/types';\nimport type {\n    ActionHandledReturnObject,\n    CheckoutAdvancedFlowResponse,\n    Order,\n    PaymentAction,\n    PaymentAmount,\n    PaymentData,\n    PaymentMethod,\n    PaymentMethodsResponse,\n    PaymentResponseData\n} from '../../../types/global-types';\nimport type { IDropin } from '../../Dropin/types';\nimport type { NewableComponent } from '../../../core/core.registry';\nimport CancelError from '../../../core/Errors/CancelError';\n\nimport './UIElement.scss';\nimport { AnalyticsEvent } from '../../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsLogEvent } from '../../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsErrorEvent } from '../../../core/Analytics/AnalyticsErrorEvent';\n\nexport abstract class UIElement<P extends UIElementProps = UIElementProps> extends BaseElement<P> {\n    protected componentRef: any;\n\n    protected resources: Resources;\n\n    public elementRef: UIElement;\n\n    public static type = undefined;\n\n    /**\n     * Defines all txVariants that the Component supports (in case it support multiple ones besides the 'type' one)\n     */\n    public static txVariants: string[] = [];\n\n    constructor(checkout: ICore, props?: P) {\n        super(checkout, props);\n\n        this.core.register(this.constructor as NewableComponent);\n\n        this.submit = this.submit.bind(this);\n        this.setState = this.setState.bind(this);\n        this.onComplete = this.onComplete.bind(this);\n        this.handleAction = this.handleAction.bind(this);\n        this.handleOrder = this.handleOrder.bind(this);\n        this.handleAdditionalDetails = this.handleAdditionalDetails.bind(this);\n        this.handleResponse = this.handleResponse.bind(this);\n        this.setElementStatus = this.setElementStatus.bind(this);\n        this.submitAnalytics = this.submitAnalytics.bind(this);\n        this.makePaymentsCall = this.makePaymentsCall.bind(this);\n        this.makeAdditionalDetailsCall = this.makeAdditionalDetailsCall.bind(this);\n        this.submitUsingSessionsFlow = this.submitUsingSessionsFlow.bind(this);\n\n        this.elementRef = (props && props.elementRef) || this;\n        this.resources = this.props.modules ? this.props.modules.resources : undefined;\n\n        this.storeElementRefOnCore(this.props);\n\n        this.onEnterKeyPressed = this.onEnterKeyPressed.bind(this);\n        this.onActionHandled = this.onActionHandled.bind(this);\n    }\n\n    protected override buildElementProps(componentProps?: P) {\n        const globalCoreProps = this.core.getCorePropsForComponent();\n        const isStoredPaymentMethod = !!componentProps?.isStoredPaymentMethod;\n\n        const paymentMethodFromResponse = isStoredPaymentMethod ? {} : this.getPaymentMethodFromPaymentMethodsResponse(componentProps?.type);\n\n        const finalProps = {\n            showPayButton: true,\n            ...globalCoreProps,\n            ...paymentMethodFromResponse,\n            ...componentProps\n        };\n\n        const isDropin = assertIsDropin(this as unknown as IDropin);\n\n        this.props = this.formatProps({\n            ...this.constructor['defaultProps'], // component defaults\n            ...getRegulatoryDefaults(this.core.options.countryCode, isDropin), // regulatory defaults\n            ...finalProps // the rest (inc. merchant defined config)\n        });\n    }\n\n    /**\n     *  Get the payment method from the paymentMethodsResponse\n     *\n     * @param type - The type of the payment method to get. (This prop is passed by Drop-in OR Standalone components containing the property 'type' as part of their configuration)\n     */\n    protected getPaymentMethodFromPaymentMethodsResponse(type?: string): PaymentMethod {\n        return this.core.paymentMethodsResponse.find(type || this.constructor['type']);\n    }\n\n    protected storeElementRefOnCore(props?: P) {\n        if (!props?.isDropin) {\n            this.core.storeElementReference(this);\n        }\n    }\n\n    public isAvailable(): Promise<void> {\n        return Promise.resolve();\n    }\n\n    public setState(newState: object): void {\n        this.state = { ...this.state, ...newState };\n        this.onChange();\n    }\n\n    public showValidation(): this {\n        if (this.componentRef && this.componentRef.showValidation) this.componentRef.showValidation();\n        return this;\n    }\n\n    /**\n     * elementRef is a ref to the subclass that extends UIElement e.g. Card.tsx\n     */\n    public setElementStatus(status: UIElementStatus, props?: any): this {\n        this.elementRef?.setStatus(status, props);\n        return this;\n    }\n\n    /**\n     * componentRef is a ref to the primary component inside that subclass e.g. CardInput.tsx\n     */\n    public setStatus(status: UIElementStatus, props?): this {\n        if (this.componentRef?.setStatus) {\n            this.componentRef.setStatus(status, props);\n        }\n        return this;\n    }\n\n    protected onChange(): void {\n        this.props.onChange?.(\n            {\n                data: this.data,\n                isValid: this.isValid,\n                errors: this.state.errors,\n                valid: this.state.valid\n            },\n            this.elementRef\n        );\n    }\n\n    // Only called once, for UIElements (including Dropin), as they are being mounted\n    protected setUpAnalytics(setUpAnalyticsObj: AnalyticsInitialEvent) {\n        const sessionId = this.props.session?.id;\n\n        return this.props.modules.analytics.setUp({\n            ...setUpAnalyticsObj,\n            ...(sessionId && { sessionId })\n        });\n    }\n\n    /**\n     * A function for all UIElements, or BaseElement, to use to create an analytics action for when it's been:\n     *  - mounted,\n     *  - a PM has been selected\n     *  - onSubmit has been called (as a result of the pay button being pressed)\n     *\n     *  In some other cases e.g. 3DS2 components, this function is overridden to allow more specific analytics actions to be created\n     */\n\n    protected submitAnalytics(analyticsObj: AnalyticsEvent) {\n        try {\n            analyticsObj.component = this.getComponent(analyticsObj);\n\n            this.props.modules.analytics.sendAnalytics(analyticsObj);\n        } catch (error) {\n            console.warn('Failed to submit the analytics event. Error:', error);\n        }\n    }\n\n    /** Work out what the component's \"type\" is:\n     * - first check for a dedicated \"analyticsType\" (currently only applies to custom-cards)\n     * - otherwise, distinguish cards from non-cards: cards will use their static type property, everything else will use props.type\n     */\n    private getComponent({ component }: AnalyticsEvent): string {\n        if (component) {\n            return component;\n        }\n        if (this.constructor['analyticsType']) {\n            return this.constructor['analyticsType'];\n        }\n        if (this.constructor['type'] === 'scheme' || this.constructor['type'] === 'bcmc') {\n            return this.constructor['type'];\n        }\n        return this.type;\n    }\n\n    public submit(): void {\n        if (!this.isValid) {\n            this.showValidation();\n            return;\n        }\n\n        this.makePaymentsCall()\n            .then(sanitizeResponse)\n            .then(verifyPaymentDidNotFail)\n            .then(this.handleResponse)\n            .catch((e: PaymentResponseData | Error) => {\n                if (e instanceof CancelError) {\n                    this.setElementStatus('ready');\n                    return;\n                }\n                this.handleFailedResult(e as PaymentResponseData);\n            });\n    }\n\n    protected makePaymentsCall(): Promise<CheckoutAdvancedFlowResponse | CheckoutSessionPaymentResponse> {\n        this.setElementStatus('loading');\n\n        if (this.props.onSubmit) {\n            return this.submitUsingAdvancedFlow();\n        }\n\n        if (this.core.session) {\n            const beforeSubmitEvent: Promise<PaymentData> = this.props.beforeSubmit\n                ? new Promise((resolve, reject) =>\n                      this.props.beforeSubmit(this.data, this.elementRef, {\n                          resolve,\n                          reject: () => reject(new CancelError('beforeSubmitRejected'))\n                      })\n                  )\n                : Promise.resolve(this.data);\n\n            return beforeSubmitEvent.then(this.submitUsingSessionsFlow);\n        }\n\n        this.handleError(\n            new AdyenCheckoutError(\n                'IMPLEMENTATION_ERROR',\n                'It can not perform /payments call. Callback \"onSubmit\" is missing or Checkout session is not available'\n            )\n        );\n    }\n\n    private async submitUsingAdvancedFlow(): Promise<CheckoutAdvancedFlowResponse> {\n        return new Promise<CheckoutAdvancedFlowResponse>((resolve, reject) => {\n            // Call analytics endpoint\n            const event = new AnalyticsLogEvent({\n                type: ANALYTICS_SUBMIT_STR,\n                message: 'Shopper clicked pay'\n            });\n            this.submitAnalytics(event);\n\n            this.props.onSubmit(\n                {\n                    data: this.data,\n                    isValid: this.isValid\n                },\n                this.elementRef,\n                { resolve, reject }\n            );\n        });\n    }\n\n    private async submitUsingSessionsFlow(data: PaymentData): Promise<CheckoutSessionPaymentResponse> {\n        const event = new AnalyticsLogEvent({\n            type: ANALYTICS_SUBMIT_STR,\n            message: 'Shopper clicked pay'\n        });\n        this.submitAnalytics(event);\n\n        try {\n            return await this.core.session.submitPayment(data);\n        } catch (error: unknown) {\n            if (error instanceof AdyenCheckoutError) {\n                this.handleError(error);\n            } else {\n                this.handleError(new AdyenCheckoutError('ERROR', 'Error when making /payments call', { cause: error }));\n            }\n\n            return Promise.reject(error);\n        }\n\n        // // Uncomment to simulate failed\n        // return {\n        //     resultCode: 'Refused',\n        //     sessionData:\n        //         'Ab02b4c0!BQABAgBKGgqfEz8uQlU4yCIOWjA8bkEwmbJ7Qt4r+x5IPXREu1rMjwNk5MDoHFNlv+MWvinS6nXIDniXgRzXCdSC4ksw9CNDBAjOa+B88wRoj/rLTieuWh/0leR88qkV24vtIkjsIsbJTDB78Pd8wX8MEDsXhaAdEIyX9E8eqxuQ3bwPbvLs1Dlgo1ZrfkQRzaNiuVM8ejRG0IWE1bGThJzY+sJvZZHvlDMXIlxhZcDoQvsMj/WwE6+nFJxBiC3oRzmvVn3AbkLQGtvwq16UUSfYbPzG9dXypJMtcrZAQYq2g/2+BSibCcmee9AXq/wij11BERrYmjbDt5NkkdUnDVgAB7pdqbnWX0A2sxBKeYtLSP2kxp+5LoU/Wty3fmcVA3VKVkHfgmIihkeL8lY++5hvHjnkzOE4tyx/sheiKS4zqoWE43TD6n8mpFskAzwMHq4G2o6vkXqvaKFEq7y/R2fVrCypenmRhkPASizpM265rKLU+L4E/C+LMHfN0LYKRMCrLr0gI2GAp+1PZLHgh0tCtiJC/zcJJtJs6sHNQxLUN+kxJuELUHOcuL3ivjG+mWteUnBENZu7KqOSZYetiWYRiyLOXDiBHqbxuQwTuO54L15VLkS/mYB20etibM1nn+fRmbo+1IJkCSalhwi5D7fSrpjbQTmAsOpJT1N8lC1MSNmAvAwG1kWL4JxYwXDKYyYASnsia2V5IjoiQUYwQUFBMTAzQ0E1MzdFQUVEODdDMjRERDUzOTA5QjgwQTc4QTkyM0UzODIzRDY4REFDQzk0QjlGRjgzMDVEQyJ98uZI4thGveOByYbomCeeP2Gy2rzs99FOBoDYVeWIUjyM+gfnW89DdJZAhxe74Tv0TnL5DRQYPCTRQPOoLbQ21NaeSho70FNE+n8XYKlVK5Ore6BoB6IVCaal5MkM27VmZPMmGflgcPx+pakx+EmRsYGdvYNImYxJYrRk3CI+l3T3ZiVpPPqebaVSLaSkEfu0iOFPjjLUhWN6QW6c18heE5vq/pcoeBf7p0Jgr9I5aBFY0avYG57BDGHzU1ZiQ9LLMTis2BA7Ap9pdNq8FVXL4fnoVHNZiiANOf3uvSknPKBID8sdOXUStA0crmO322FYjDqh1n6FG+D7+OJSayNsXIz6Zoy0eFn4HbT8nt8L2X2tdzkMayCYHXRwKh13Xyleqxt4WoEZmhwTmB3p9d1F0SylWnjcC6o/DnshJ9mMW/8D3oWS30Z7BwRODqKGVahRD0YGRzwMbVnEe5JFRfNvJZdLGl35L9632DVmuFQ0lr/8WNL/NrAJNtI6PXrZMNiza0/omPwPfe5ZYuD1Jgq59TX4h9d+3fdkArcJYL7AdoMZON1YEiWY5EzazQwtHd9yzdty9ZHPxAfuOfCh4OhbhFNp+v5YQ+PzKZ+UpM1VxV863+9XgWEURPNvX7qq1cpUSRzrSGq01QBBM3MKzRh5mAgqIdXgtl7L0EXAep0MECc7QY0/o3tW3VR8eEJGsSzrNxpFItqj0SEaIWo25dRfkl5zuw47GQrN9Qzxl2WV3A38MQPUqFtIr/71Rjkphgg49ZGWEYCwgFmm8jJc2/5qTabSGk4bzwiETCTzeydq30bUGqCwglj8CrFViAuQeTJm7dp+PYKMkUNvQRpnSXMj6Kz7rvAMzhzJgK62ltN2idqKxLC7WtivCUgejuQUvNreCYBQCaKwTwP02lZsJpGF9yw8gbyuoB+2aB7IZmgIB8GP4qVQ/ht5B9z/FLohK/8cSPV/4i32SNNdcwhV',\n        //     sessionResult:\n        //         'X3XtfGC7!H4sIAAAAAAAA/6tWykxRslJyDjaxNDMyM3E2MXIyNDUys3RU0lHKTS1KzkjMK3FMTs4vzSsBKgtJLS7xhYo6Z6QmZ+eXlgAVFpcklpQWA+WLUtNKi1NTlGoBMEEbz1cAAAA=iMsCaEJ5LcnsqIUtmNxjm8HtfQ8gZW8JewEU3wHz4qg='\n        // };\n    }\n\n    protected onComplete(state): void {\n        if (this.props.onComplete) this.props.onComplete(state, this.elementRef);\n    }\n\n    protected handleError = (error: AdyenCheckoutError): void => {\n        /**\n         * Set status using elementRef, which:\n         * - If Drop-in, will set status for Dropin component, and then it will propagate the new status for the active payment method component\n         * - If Component, it will set its own status\n         */\n        this.setElementStatus('ready');\n\n        if (error.name === NETWORK_ERROR && error.options.code) {\n            const event = new AnalyticsErrorEvent({\n                errorType: ANALYTICS_ERROR_TYPE.apiError,\n                code: error.options.code\n            });\n\n            this.submitAnalytics(event);\n        }\n\n        if (this.props.onError) {\n            this.props.onError(error, this.elementRef);\n        }\n    };\n\n    protected handleAdditionalDetails(state: AdditionalDetailsData): void {\n        this.makeAdditionalDetailsCall(state)\n            .then(sanitizeResponse)\n            .then(verifyPaymentDidNotFail)\n            .then(this.handleResponse)\n            .catch(this.handleFailedResult);\n    }\n\n    private makeAdditionalDetailsCall(state: AdditionalDetailsData): Promise<CheckoutSessionDetailsResponse | CheckoutAdvancedFlowResponse> {\n        if (this.props.onAdditionalDetails) {\n            return new Promise<CheckoutAdvancedFlowResponse>((resolve, reject) => {\n                this.props.onAdditionalDetails(state, this.elementRef, { resolve, reject });\n            });\n        }\n\n        if (this.core.session) {\n            return this.submitAdditionalDetailsUsingSessionsFlow(state.data);\n        }\n\n        this.handleError(\n            new AdyenCheckoutError(\n                'IMPLEMENTATION_ERROR',\n                'It can not perform /payments/details call. Callback \"onAdditionalDetails\" is missing or Checkout session is not available'\n            )\n        );\n    }\n\n    private async submitAdditionalDetailsUsingSessionsFlow(data: any): Promise<CheckoutSessionDetailsResponse> {\n        try {\n            return await this.core.session.submitDetails(data);\n        } catch (error: unknown) {\n            if (error instanceof AdyenCheckoutError) this.handleError(error);\n            else this.handleError(new AdyenCheckoutError('ERROR', 'Error when making /details call', { cause: error }));\n\n            return Promise.reject(error);\n        }\n    }\n\n    public handleAction(action: PaymentAction, props = {}): UIElement | null {\n        if (!action || !action.type) {\n            if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n                throw new Error(\n                    'handleAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n                        'a \"resultCode\": have you passed in the whole response object by mistake?'\n                );\n            }\n            throw new Error('handleAction::Invalid Action - the passed action object does not have a \"type\" property');\n        }\n\n        const paymentAction = this.core.createFromAction(action, {\n            ...this.elementRef.props,\n            ...props,\n            onAdditionalDetails: this.handleAdditionalDetails\n        });\n\n        if (paymentAction) {\n            this.unmount();\n            return paymentAction.mount(this._node);\n        }\n\n        return null;\n    }\n\n    protected onActionHandled(actionHandledObj: ActionHandledReturnObject) {\n        this.props?.onActionHandled?.({ originalAction: this.props.originalAction, ...actionHandledObj });\n    }\n\n    protected handleOrder = (response: PaymentResponseData): void => {\n        const { order } = response;\n\n        const updateCorePromise = this.core.session ? this.core.update({ order }) : this.handleAdvanceFlowPaymentMethodsUpdate(order);\n\n        void updateCorePromise.then(() => {\n            this.props.onOrderUpdated?.({ order });\n        });\n    };\n\n    /**\n     * Handles when the payment fails. The payment fails when:\n     * - adv flow: the merchant rejects the payment due to a critical error\n     * - adv flow: the merchant resolves the payment with a failed resultCode\n     * - sessions: a network error occurs when making the payment\n     * - sessions: the payment fails with a failed resultCode\n     *\n     * @param result\n     */\n    protected handleFailedResult = (result?: PaymentResponseData): void => {\n        if (assertIsDropin(this.elementRef)) {\n            this.elementRef.displayFinalAnimation('error');\n        }\n\n        cleanupFinalResult(result);\n        this.props.onPaymentFailed?.(result, this.elementRef);\n    };\n\n    protected handleSuccessResult = (result: PaymentResponseData): void => {\n        if (assertIsDropin(this.elementRef)) {\n            this.elementRef.displayFinalAnimation('success');\n        }\n\n        cleanupFinalResult(result);\n        this.props.onPaymentCompleted?.(result, this.elementRef);\n    };\n\n    /**\n     * Handles a /payments or /payments/details response.\n     * The component will handle automatically actions, orders, and final results.\n     *\n     * Expected to be called after sanitizeResponse has been run on the raw payment response\n     *\n     * @param response -\n     */\n    protected handleResponse(response: PaymentResponseData): void {\n        if (response.action) {\n            this.elementRef.handleAction(response.action);\n            return;\n        }\n\n        if (response.order?.remainingAmount?.value > 0) {\n            // we don't want to call elementRef here, use the component handler\n            // we do this way so the logic on handlingOrder is associated with payment method\n            this.handleOrder(response);\n            return;\n        }\n\n        this.handleSuccessResult(response);\n    }\n\n    protected handleKeyPress(e: h.JSX.TargetedKeyboardEvent<HTMLInputElement> | KeyboardEvent) {\n        if (e.key === 'Enter' || e.code === 'Enter') {\n            e.preventDefault(); // Prevent <form> submission if Component is placed inside a form\n\n            this.onEnterKeyPressed(document?.activeElement, this);\n        }\n    }\n\n    /**\n     * Handle Enter key pressed from a UIElement (called via handleKeyPress)\n     * @param obj\n     */\n    protected onEnterKeyPressed(activeElement: Element, component: UIElement) {\n        if (this.props.onEnterKeyPressed) {\n            this.props.onEnterKeyPressed(activeElement, component);\n        } else {\n            (activeElement as HTMLElement).blur();\n            this.submit();\n        }\n    }\n\n    /**\n     * Call update on parent instance\n     * This function exist to make safe access to the protected _parentInstance\n     * @param options - CoreOptions\n     */\n    public updateParent(options: CoreConfiguration = {}): Promise<ICore> {\n        return this.elementRef.core.update(options);\n    }\n\n    public setComponentRef = (ref: ComponentMethodsRef) => {\n        this.componentRef = ref;\n    };\n\n    /**\n     * Get the current validation status of the element\n     */\n    public get isValid(): boolean {\n        return false;\n    }\n\n    /**\n     * Get the element icon URL for the current environment\n     */\n    public get icon(): string {\n        const type = this.props.paymentMethodType || this.type;\n        return this.props.icon ?? this.resources.getImage()(type);\n    }\n\n    /**\n     * Get the element's displayable name\n     */\n    public get displayName(): string {\n        const paymentMethodFromResponse = this.core.paymentMethodsResponse?.paymentMethods?.find(pm => pm.type === this.type);\n        return this.props.name || paymentMethodFromResponse?.name || this.type;\n    }\n\n    /**\n     * Get the element accessible name, used in the aria-label of the button that controls selected payment method\n     */\n    public get accessibleName(): string {\n        return this.displayName;\n    }\n\n    /**\n     * Used to display the second line of a payment method item\n     */\n    get additionalInfo(): string {\n        return null;\n    }\n\n    /**\n     * Return the type of an element\n     */\n    public get type(): string {\n        return this.props.type || this.constructor['type'];\n    }\n\n    /**\n     * Get the payButton component for the current element\n     */\n    protected payButton = (props: PayButtonFunctionProps) => {\n        return <PayButton {...props} amount={this.props.amount} secondaryAmount={this.props.secondaryAmount} onClick={this.submit} />;\n    };\n\n    /**\n     * Used in the Partial Orders flow.\n     * When the Order is updated, the merchant can request new payment methods based on the new remaining amount\n     *\n     * @private\n     */\n    protected async handleAdvanceFlowPaymentMethodsUpdate(order: Order | null, amount?: PaymentAmount) {\n        return new Promise<void | PaymentMethodsResponse>((resolve, reject) => {\n            if (!this.props.onPaymentMethodsRequest) {\n                return resolve();\n            }\n\n            this.props.onPaymentMethodsRequest(\n                {\n                    ...(order && {\n                        order: {\n                            orderData: order.orderData,\n                            pspReference: order.pspReference\n                        }\n                    }),\n                    locale: this.core.options.locale\n                },\n                { resolve, reject }\n            );\n        })\n            .catch(error => {\n                this.handleError(\n                    new AdyenCheckoutError(\n                        'IMPLEMENTATION_ERROR',\n                        'Something failed during payment methods update or onPaymentMethodsRequest was not implemented',\n                        {\n                            cause: error\n                        }\n                    )\n                );\n            })\n            .then(paymentMethodsResponse => {\n                // in the case of the session flow we get order, amount, countryCode and shopperLocale from initialize()\n                // apply the same logic here for order and amount\n                // in the future it might be worth moving this logic to be performed by the core on update()\n                // it would make this more consistent\n                return this.core.update({\n                    ...(paymentMethodsResponse && { paymentMethodsResponse }),\n                    order,\n                    amount: order ? order.remainingAmount : amount\n                });\n            });\n    }\n}\n\nexport default UIElement;\n","import { h } from 'preact';\nimport CardInput from './components/CardInput';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { BinLookupResponse, CardElementData, CardConfiguration } from './types';\nimport triggerBinLookUp from '../internal/SecuredFields/binLookup/triggerBinLookUp';\nimport { CardBinLookupData, CardConfigSuccessData, CardFocusData } from '../internal/SecuredFields/lib/types';\nimport { fieldTypeToSnakeCase } from '../internal/SecuredFields/utils';\nimport { reject } from '../../utils/commonUtils';\nimport { hasValidInstallmentsObject } from './components/CardInput/utils';\nimport createClickToPayService from '../internal/ClickToPay/services/create-clicktopay-service';\nimport { ClickToPayCheckoutPayload, IClickToPayService } from '../internal/ClickToPay/services/types';\nimport ClickToPayWrapper from './components/ClickToPayWrapper';\nimport { ComponentFocusObject } from '../../types/global-types';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\nimport { TxVariants } from '../tx-variants';\nimport type { PayButtonFunctionProps, UIElementStatus } from '../internal/UIElement/types';\nimport UIElement from '../internal/UIElement';\nimport PayButton from '../internal/PayButton';\nimport type { ICore } from '../../core/types';\nimport { ANALYTICS_FOCUS_STR, ANALYTICS_CONFIGURED_STR, ANALYTICS_UNFOCUS_STR, ANALYTICS_RENDERED_STR } from '../../core/Analytics/constants';\nimport { ALL_SECURED_FIELDS } from '../internal/SecuredFields/lib/constants';\nimport { hasOwnProperty } from '../../utils/hasOwnProperty';\nimport AdyenCheckoutError, { IMPLEMENTATION_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport CardInputDefaultProps from './components/CardInput/defaultProps';\nimport { getCardConfigData } from './components/CardInput/utils';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\n\nexport class CardElement extends UIElement<CardConfiguration> {\n    public static type = TxVariants.scheme;\n\n    private readonly clickToPayService: IClickToPayService | null;\n\n    /**\n     * Reference to the 'ClickToPayComponent'\n     */\n    private clickToPayRef = null;\n\n    constructor(checkout: ICore, props?: CardConfiguration) {\n        super(checkout, props);\n\n        if (props && !props._disableClickToPay) {\n            this.clickToPayService = createClickToPayService(this.props.configuration, this.props.clickToPayConfiguration, this.props.environment);\n            void this.clickToPayService?.initialize();\n        }\n    }\n\n    protected static defaultProps = {\n        showFormInstruction: true,\n        _disableClickToPay: false,\n        doBinLookup: true,\n        // Merge most of CardInput's defaultProps\n        ...reject(['type', 'setComponentRef']).from(CardInputDefaultProps)\n    };\n\n    public setStatus(status: UIElementStatus, props?): this {\n        if (this.componentRef?.setStatus) {\n            this.componentRef.setStatus(status, props);\n        }\n        if (this.clickToPayRef?.setStatus) {\n            this.clickToPayRef.setStatus(status, props);\n        }\n        return this;\n    }\n\n    private setClickToPayRef = ref => {\n        this.clickToPayRef = ref;\n    };\n\n    formatProps(props: CardConfiguration): CardConfiguration {\n        // The value from a session should be used, before falling back to the merchant configuration\n        const enableStoreDetails = props.session?.configuration?.enableStoreDetails ?? props.enableStoreDetails;\n\n        const isZeroAuth = props.amount?.value === 0;\n        const showStoreDetailsCheckbox = isZeroAuth ? false : enableStoreDetails;\n\n        const storedCardID = props.storedPaymentMethodId || props.id; // check if we've been passed a (checkout) processed storedCard or one that merchant has pulled from the PMs response\n        const isEcommerceStoredCard = storedCardID && props?.supportedShopperInteractions?.includes('Ecommerce'); // If we have a storedCard does it support Ecommerce (it might not if the merchant has pulled it from the PMs response)\n\n        // If we have a storedPM but it doesn't support Ecommerce - we can't make a storedCard component from it\n        if (storedCardID && !isEcommerceStoredCard) {\n            // TODO - Decide if an error is too severe? Would a console.warning suffice?\n            throw new AdyenCheckoutError(\n                IMPLEMENTATION_ERROR,\n                'You are trying to create a storedCard from a stored PM that does not support Ecommerce interactions'\n            );\n        }\n\n        return {\n            ...props,\n            // Mismatch between hasHolderName & holderNameRequired which can mean card can never be valid\n            holderNameRequired: !props.hasHolderName ? false : props.holderNameRequired,\n            // False for *stored* BCMC cards & if merchant explicitly wants to hide the CVC field\n            hasCVC: !((props.brand && props.brand === 'bcmc') || props.hideCVC),\n            // billingAddressRequired only available for non-stored cards\n            billingAddressRequired: props.storedPaymentMethodId ? false : props.billingAddressRequired,\n            // edge case where merchant has defined both an onAddressLookup callback AND set billingAddressMode: 'partial' - which leads to some strange behaviour in the address UI\n            billingAddressMode: props.onAddressLookup ? CardInputDefaultProps.billingAddressMode : props.billingAddressMode,\n            /** props.brand will be specified in the case of a StoredCard or a Bancontact component, for a regular Card we default it to 'card' */\n            brand: props.brand ?? TxVariants.card,\n            countryCode: props.countryCode ? props.countryCode.toLowerCase() : null,\n            // Required for transition period (until configuration object becomes the norm)\n            // - if merchant has defined value directly in props, use this instead\n            configuration: {\n                ...props.configuration,\n                socialSecurityNumberMode: props.configuration?.socialSecurityNumberMode ?? 'auto'\n            },\n            brandsConfiguration: props.brandsConfiguration || props.configuration?.brandsConfiguration || {},\n            icon: props.icon || props.configuration?.icon,\n            // installmentOptions of a session should be used before falling back to the merchant configuration\n            installmentOptions: props.session?.configuration?.installmentOptions || props.installmentOptions,\n            enableStoreDetails,\n            showStoreDetailsCheckbox,\n            /**\n             * Click to Pay configuration\n             * - If email is set explicitly in the configuration, then it can override the one used in the session creation\n             */\n            clickToPayConfiguration: {\n                ...props.clickToPayConfiguration,\n                disableOtpAutoFocus: props.clickToPayConfiguration?.disableOtpAutoFocus || false,\n                shopperEmail: props.clickToPayConfiguration?.shopperEmail || this.core.options?.session?.shopperEmail,\n                telephoneNumber: props.clickToPayConfiguration?.telephoneNumber || this.core.options?.session?.telephoneNumber,\n                locale: props.clickToPayConfiguration?.locale || props.i18n?.locale?.replace('-', '_')\n            },\n            ...(storedCardID && { storedPaymentMethodId: storedCardID })\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData(): CardElementData {\n        /**\n         *  this.state.selectedBrandValue will be set when:\n         *  - /binLookup detects a single brand,\n         *  - when /binLookup detects a dual-branded card and the shopper makes a brand selection\n         *  - or, in the case of a storedCard\n         */\n        const cardBrand = this.state.selectedBrandValue;\n\n        return {\n            paymentMethod: {\n                type: CardElement.type,\n                ...this.state.data,\n                ...(this.props.storedPaymentMethodId && {\n                    storedPaymentMethodId: this.props.storedPaymentMethodId,\n                    holderName: this.props.holderName ?? ''\n                }),\n                ...(cardBrand && { brand: cardBrand }),\n                ...(this.props.fundingSource && { fundingSource: this.props.fundingSource }),\n                ...(this.state.fastlaneData && { fastlaneData: btoa(JSON.stringify(this.state.fastlaneData)) })\n            },\n            ...(this.state.billingAddress && { billingAddress: this.state.billingAddress }),\n            ...(this.state.socialSecurityNumber && { socialSecurityNumber: this.state.socialSecurityNumber }),\n            ...this.storePaymentMethodPayload,\n            ...(hasValidInstallmentsObject(this.state.installments) && { installments: this.state.installments }),\n            browserInfo: this.browserInfo,\n            origin: !!window && window.location.origin\n        };\n    }\n\n    updateStyles(stylesObj) {\n        if (this.componentRef?.updateStyles) this.componentRef.updateStyles(stylesObj);\n        return this;\n    }\n\n    setFocusOn(fieldName) {\n        if (this.componentRef?.setFocusOn) this.componentRef.setFocusOn(fieldName);\n        return this;\n    }\n\n    public onBrand = event => {\n        this.props.onBrand?.(event);\n    };\n\n    processBinLookupResponse(binLookupResponse: BinLookupResponse, isReset = false) {\n        if (this.componentRef?.processBinLookupResponse) this.componentRef.processBinLookupResponse(binLookupResponse, isReset);\n        return this;\n    }\n\n    handleUnsupportedCard(errObj) {\n        if (this.componentRef?.handleUnsupportedCard) this.componentRef.handleUnsupportedCard(errObj);\n        return this;\n    }\n\n    private handleClickToPaySubmit = (payload: ClickToPayCheckoutPayload) => {\n        this.setState({ data: { ...payload }, valid: {}, errors: {}, isValid: true });\n        this.submit();\n    };\n\n    onBinLookup(obj: CardBinLookupData) {\n        // Handler for regular card comp doesn't need this 'raw' data or to know about 'resets'\n        if (!obj.isReset) {\n            const nuObj = reject('supportedBrandsRaw').from(obj);\n            this.props.onBinLookup?.(nuObj);\n        }\n    }\n\n    protected submitAnalytics(analyticsObj: AnalyticsEvent) {\n        const isInfoType = analyticsObj instanceof AnalyticsInfoEvent;\n\n        if ((isInfoType && analyticsObj.type === ANALYTICS_RENDERED_STR) || (isInfoType && analyticsObj.type === ANALYTICS_CONFIGURED_STR)) {\n            // Check if it's a storedCard\n            if (this.constructor['type'] === 'scheme') {\n                if (hasOwnProperty(this.props, 'supportedShopperInteractions')) {\n                    analyticsObj.isStoredPaymentMethod = true;\n                    analyticsObj.brand = this.props.brand;\n                }\n            }\n\n            // Add config data\n            if (isInfoType && analyticsObj.type === ANALYTICS_RENDERED_STR) {\n                analyticsObj.configData = getCardConfigData(this.props);\n            }\n        }\n\n        super.submitAnalytics(analyticsObj);\n    }\n\n    private onConfigSuccess = (obj: CardConfigSuccessData) => {\n        const event = new AnalyticsInfoEvent({ type: ANALYTICS_CONFIGURED_STR });\n        this.submitAnalytics(event);\n\n        this.props.onConfigSuccess?.(obj);\n    };\n\n    private onFocus = (obj: ComponentFocusObject) => {\n        const event = new AnalyticsInfoEvent({ type: ANALYTICS_FOCUS_STR, target: fieldTypeToSnakeCase(obj.fieldType) });\n        this.submitAnalytics(event);\n\n        // Call merchant defined callback\n        if (ALL_SECURED_FIELDS.includes(obj.fieldType)) {\n            this.props.onFocus?.(obj.event as CardFocusData);\n        } else {\n            this.props.onFocus?.(obj);\n        }\n    };\n\n    private onBlur = (obj: ComponentFocusObject) => {\n        const event = new AnalyticsInfoEvent({ type: ANALYTICS_UNFOCUS_STR, target: fieldTypeToSnakeCase(obj.fieldType) });\n        this.submitAnalytics(event);\n\n        // Call merchant defined callback\n        if (ALL_SECURED_FIELDS.includes(obj.fieldType)) {\n            this.props.onBlur?.(obj.event as CardFocusData);\n        } else {\n            this.props.onBlur?.(obj);\n        }\n    };\n\n    public onBinValue = triggerBinLookUp(this);\n\n    get storePaymentMethodPayload() {\n        const isStoredCard = this.props.storedPaymentMethodId?.length > 0;\n        if (isStoredCard) {\n            return {};\n        }\n\n        /**\n         * For regular card, zero auth payments, we store the payment method, *if* the configuration says we should:\n         *  - For sessions, this means if the session has been created with storePaymentMethodMode: 'askForConsent'\n         *  - For the advanced flow, this means if the merchant has still set enableStoreDetails: true\n         *\n         * What we are doing is.. if for a normal payment we would show the \"Save for my next payment\" checkbox,\n         * for a zero-auth payment we effectively click the checkbox on behalf of the shopper.\n         */\n        const isZeroAuth = this.props.amount?.value === 0;\n        if (isZeroAuth) {\n            return this.props.enableStoreDetails ? { storePaymentMethod: true } : {};\n        }\n\n        // For regular card, non-zero auth payments, we store the payment method based on the checkbox value.\n        const includeStorePaymentMethod = this.props.showStoreDetailsCheckbox && typeof this.state.storePaymentMethod !== 'undefined';\n        return includeStorePaymentMethod ? { storePaymentMethod: Boolean(this.state.storePaymentMethod) } : {};\n    }\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    get icon() {\n        return this.props.icon ?? this.resources.getImage()(this.props.brand);\n    }\n\n    get brands(): { icon: any; name: string }[] {\n        const { brands, brandsConfiguration } = this.props;\n        if (brands) {\n            return brands.map(brand => {\n                const brandIcon = brandsConfiguration[brand]?.icon ?? this.props.modules.resources.getImage()(brand);\n                return { icon: brandIcon, name: brand };\n            });\n        }\n\n        return [];\n    }\n\n    get displayName(): string {\n        if (this.props.storedPaymentMethodId) {\n            return `•••• ${this.props.lastFour}`;\n        }\n\n        return this.props.name || CardElement.type;\n    }\n\n    get accessibleName(): string {\n        // Use display name, unless it's a stored payment method, there inform user\n        return (\n            (this.props.name || CardElement.type) +\n            (this.props.storedPaymentMethodId\n                ? ' ' + this.props.i18n.get('creditCard.storedCard.description.ariaLabel').replace('%@', this.props.lastFour)\n                : '')\n        );\n    }\n\n    get browserInfo() {\n        return collectBrowserInfo();\n    }\n\n    protected override payButton = (props: PayButtonFunctionProps) => {\n        const isZeroAuth = this.props.amount?.value === 0;\n        const isStoredCard = this.props.storedPaymentMethodId?.length > 0;\n        return (\n            <PayButton\n                {...props}\n                amount={this.props.amount}\n                secondaryAmount={this.props.secondaryAmount}\n                label={isZeroAuth && !isStoredCard ? this.props.i18n.get('payButton.saveDetails') : ''}\n                onClick={this.submit}\n            />\n        );\n    };\n\n    private renderCardInput(isCardPrimaryInput = true): h.JSX.Element {\n        return (\n            <CardInput\n                setComponentRef={this.setComponentRef}\n                {...this.props}\n                {...this.state}\n                onSubmitAnalytics={this.submitAnalytics}\n                onChange={this.setState}\n                onSubmit={this.submit}\n                handleKeyPress={this.handleKeyPress}\n                payButton={this.payButton}\n                onBrand={this.onBrand}\n                onBinValue={this.onBinValue}\n                brand={this.props.brand}\n                brandsIcons={this.brands}\n                isPayButtonPrimaryVariant={isCardPrimaryInput}\n                resources={this.resources}\n                onFocus={this.onFocus}\n                onBlur={this.onBlur}\n                onConfigSuccess={this.onConfigSuccess}\n            />\n        );\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                    <ClickToPayWrapper\n                        amount={this.props.amount}\n                        configuration={this.props.clickToPayConfiguration}\n                        clickToPayService={this.clickToPayService}\n                        isStandaloneComponent={false}\n                        setClickToPayRef={this.setClickToPayRef}\n                        onSetStatus={this.setElementStatus}\n                        onSubmit={this.handleClickToPaySubmit}\n                        onError={this.handleError}\n                    >\n                        {isCardPrimaryInput => this.renderCardInput(isCardPrimaryInput)}\n                    </ClickToPayWrapper>\n                </SRPanelProvider>\n            </CoreProvider>\n        );\n    }\n}\n\nexport default CardElement;\n","import { CardElement } from './Card';\nimport { CardElementData, CardConfiguration } from './types';\nimport { CVC_POLICY_HIDDEN } from '../internal/SecuredFields/lib/constants';\nimport { TxVariants } from '../tx-variants';\nimport type { ICore } from '../../core/types';\n\nclass BancontactElement extends CardElement {\n    public static type = TxVariants.bcmc;\n\n    constructor(checkout: ICore, props?: CardConfiguration) {\n        super(checkout, props);\n    }\n\n    protected static defaultProps = {\n        ...CardElement.defaultProps,\n        brands: ['bcmc', 'maestro', 'visa']\n    };\n\n    formatData(): CardElementData {\n        const data = super.formatData();\n        data.paymentMethod.type = this.constructor['type'];\n        return data;\n    }\n\n    /**\n     * Now that the Bancontact (BCMC) Card component can accept a number dual branded with Visa (which requires a CVC) it has to be handled differently\n     * at creation time (no automatic removing of the CVC securedField).\n     * At the same time we can't treat it as a regular 'card' component - because it needs to hide the CVC field at at startup,\n     * as well as show the BCMC logo in the number field and ignore any of the internal, regEx driven, brand detection.\n     */\n    formatProps(props: CardConfiguration) {\n        return {\n            ...super.formatProps(props),\n            /**\n             * Force type (only for the Dropin is type automatically set to 'bcmc')\n             * - this will bypass the regEx brand detection that SF normally tries to carry out when the first few digits are entered in the PAN\n             */\n            type: TxVariants.bcmc,\n            brand: TxVariants.bcmc,\n            cvcPolicy: CVC_POLICY_HIDDEN\n        };\n    }\n\n    // Disable internal event.emit() for Bancontact\n    public onBrand = event => {\n        if (this.props.onBrand) this.props.onBrand(event);\n    };\n}\n\nexport default BancontactElement;\n","import { h } from 'preact';\nimport { useState, useEffect, useRef, useMemo } from 'preact/hooks';\nimport Language from '../../../language/Language';\nimport SecuredFieldsProvider from '../../internal/SecuredFields/SFP/SecuredFieldsProvider';\nimport { SFPState } from '../../internal/SecuredFields/SFP/types';\nimport { BinLookupResponse, CardBrandsConfiguration, CardPlaceholders } from '../../Card/types';\nimport SFExtensions from '../../internal/SecuredFields/binLookup/extensions';\nimport { StylesObject } from '../../internal/SecuredFields/lib/types';\nimport { Resources } from '../../../core/Context/Resources';\nimport { SFError } from '../../Card/components/CardInput/types';\nimport { ValidationError } from '../types';\n\ninterface SecuredFieldsProps {\n    autoFocus?: boolean;\n    brand?: string;\n    brands?: string[];\n    brandsConfiguration?: CardBrandsConfiguration;\n    clientKey?: string;\n    countryCode?: string;\n    forceCompat?: boolean;\n    i18n: Language;\n    implementationType?: string;\n    keypadFix?: boolean;\n    loadingContext?: string;\n    legacyInputMode?: boolean;\n    minimumExpiryDate?: string;\n    onAdditionalSFConfig?: () => {};\n    onAdditionalSFRemoved?: () => {};\n    onAllValid?: () => {};\n    onAutoComplete?: () => {};\n    onBinValue?: () => {};\n    onBrand?: () => {};\n    onConfigSuccess?: () => {};\n    onChange: (data) => void;\n    handleKeyPress?: (obj: KeyboardEvent) => void;\n    onError?: () => {};\n    onFieldValid?: () => {};\n    onFocus?: (e) => {};\n    onLoad?: () => {};\n    placeholders?: CardPlaceholders;\n    rootNode: HTMLElement;\n    resources: Resources;\n    showWarnings?: boolean;\n    styles?: StylesObject;\n    trimTrailingSeparator?: boolean;\n    type: string;\n    maskSecurityCode?: boolean;\n}\n\nconst defaultProps = {\n    onChange: () => {},\n    onError: () => {},\n    onValidationError: () => {}\n};\n\nfunction CustomCardInput(props: SecuredFieldsProps) {\n    const sfp = useRef(null);\n\n    const [errors, setErrors] = useState({});\n    const [valid, setValid] = useState({});\n    const [data, setData] = useState({});\n\n    const [isSfpValid, setIsSfpValid] = useState(false);\n\n    const [issuingCountryCode, setIssuingCountryCode] = useState(null);\n\n    const [dualBrandSelectElements, setDualBrandSelectElements] = useState([]);\n    const [selectedBrandValue, setSelectedBrandValue] = useState('');\n\n    const handleSecuredFieldsChange = (sfState: SFPState): void => {\n        setData({ ...data, ...sfState.data });\n        setErrors({ ...errors, ...sfState.errors });\n        setValid({ ...valid, ...sfState.valid });\n\n        setIsSfpValid(sfState.isSfpValid);\n    };\n\n    // Farm the handlers for binLookup related functionality out to another 'extensions' file\n    const extensions = useMemo(\n        () =>\n            SFExtensions(\n                props,\n                { sfp },\n                { dualBrandSelectElements, setDualBrandSelectElements, setSelectedBrandValue, issuingCountryCode, setIssuingCountryCode }\n            ),\n        [dualBrandSelectElements, issuingCountryCode]\n    );\n\n    /**\n     * EXPECTED METHODS ON SecuredFields.this\n     */\n    this.processBinLookupResponse = (binLookupResponse: BinLookupResponse, isReset: boolean) => {\n        extensions.processBinLookup(binLookupResponse, isReset);\n    };\n\n    this.dualBrandingChangeHandler = extensions.handleDualBrandSelection;\n\n    /**\n     * EFFECT HOOKS\n     */\n    useEffect(() => {\n        // componentDidMount\n        this.setFocusOn = sfp.current.setFocusOn;\n        this.updateStyles = sfp.current.updateStyles;\n        this.showValidation = sfp.current.showValidation;\n        this.handleUnsupportedCard = sfp.current.handleUnsupportedCard;\n\n        // componentWillUnmount\n        return () => {\n            sfp.current.destroy();\n        };\n    }, []);\n\n    /**\n     * Main 'componentDidUpdate' handler\n     */\n    useEffect(() => {\n        const sfStateErrorsObj = sfp.current.mapErrorsToValidationRuleResult();\n\n        const mappedErrors = { ...errors, ...sfStateErrorsObj }; // maps sfErrors\n\n        props.onChange({\n            data,\n            valid,\n            errors: mappedErrors,\n            isValid: isSfpValid,\n            selectedBrandValue\n        });\n\n        // Create an array of Validation error objects and send to callback\n        if (Object.keys(mappedErrors).length) {\n            const validationErrors: ValidationError[] = Object.entries(mappedErrors).map(([fieldType, error]) => {\n                const valErr: ValidationError = {\n                    fieldType,\n                    ...(error ? (error as SFError) : { error: '', rootNode: this.props.rootNode })\n                };\n                return valErr;\n            });\n            this.props.onValidationError?.(validationErrors);\n        }\n    }, [data, valid, errors, selectedBrandValue]);\n\n    /**\n     * RENDER\n     */\n    // prettier-ignore\n    return (\n        <SecuredFieldsProvider\n            ref={sfp}\n            {...extractPropsForSFP(props)}\n            type={props.brand}\n            onChange={handleSecuredFieldsChange}\n            render={() => null}\n        />\n    );\n}\n\nCustomCardInput.defaultProps = defaultProps;\n\nexport default CustomCardInput;\n\nconst extractPropsForSFP = (props: SecuredFieldsProps) => {\n    return {\n        autoFocus: props.autoFocus,\n        brands: props.brands,\n        brandsConfiguration: props.brandsConfiguration,\n        clientKey: props.clientKey,\n        forceCompat: props.forceCompat,\n        // countryCode: props.countryCode, // only used for korean cards when koreanAuthenticationRequired is true\n        i18n: props.i18n,\n        implementationType: props.implementationType,\n        keypadFix: props.keypadFix,\n        legacyInputMode: props.legacyInputMode,\n        loadingContext: props.loadingContext,\n        minimumExpiryDate: props.minimumExpiryDate,\n        onAdditionalSFConfig: props.onAdditionalSFConfig,\n        onAdditionalSFRemoved: props.onAdditionalSFRemoved,\n        onAllValid: props.onAllValid,\n        onAutoComplete: props.onAutoComplete,\n        onBinValue: props.onBinValue,\n        onBrand: props.onBrand,\n        // onChange // set directly\n        onConfigSuccess: props.onConfigSuccess,\n        handleKeyPress: props.handleKeyPress,\n        onError: props.onError,\n        onFieldValid: props.onFieldValid,\n        onFocus: props.onFocus,\n        onLoad: props.onLoad,\n        // render // set directly\n        rootNode: props.rootNode,\n        showWarnings: props.showWarnings,\n        styles: props.styles,\n        trimTrailingSeparator: props.trimTrailingSeparator,\n        resources: props.resources,\n        maskSecurityCode: props.maskSecurityCode,\n        placeholders: props.placeholders\n    };\n};\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement';\nimport CustomCardInput from './CustomCardInput';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport triggerBinLookUp from '../internal/SecuredFields/binLookup/triggerBinLookUp';\nimport { CardBinLookupData, CardFocusData } from '../internal/SecuredFields/lib/types';\nimport { BrandObject } from '../Card/types';\nimport { getCardImageUrl, fieldTypeToSnakeCase } from '../internal/SecuredFields/utils';\nimport { TxVariants } from '../tx-variants';\nimport { CustomCardConfiguration } from './types';\nimport { ANALYTICS_FOCUS_STR, ANALYTICS_UNFOCUS_STR } from '../../core/Analytics/constants';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\n\nexport class CustomCard extends UIElement<CustomCardConfiguration> {\n    public static type = TxVariants.customCard;\n\n    public static analyticsType = 'custom-scheme';\n\n    protected static defaultProps = {\n        onBinLookup: () => {},\n        brandsConfiguration: {}\n    };\n\n    private brand = TxVariants.card;\n\n    formatProps(props: CustomCardConfiguration) {\n        return {\n            ...props,\n            type: TxVariants.customCard\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        const sfBrand = this.state.selectedBrandValue;\n        return {\n            paymentMethod: {\n                type: 'scheme',\n                ...this.state.data,\n                ...(sfBrand && { brand: sfBrand })\n            },\n            browserInfo: this.browserInfo,\n            origin: !!window && window.location.origin\n        };\n    }\n\n    updateStyles(stylesObj) {\n        if (this.componentRef?.updateStyles) this.componentRef.updateStyles(stylesObj);\n        return this;\n    }\n\n    setFocusOn(frame) {\n        if (this.componentRef?.setFocusOn) this.componentRef.setFocusOn(frame);\n        return this;\n    }\n\n    processBinLookupResponse(binLookupResponse) {\n        if (this.componentRef?.processBinLookupResponse) this.componentRef.processBinLookupResponse(binLookupResponse);\n        return this;\n    }\n\n    dualBrandingChangeHandler(e: Event | string) {\n        if (this.componentRef?.dualBrandingChangeHandler) this.componentRef.dualBrandingChangeHandler(e);\n        return this;\n    }\n\n    handleUnsupportedCard(errObj) {\n        if (this.componentRef?.handleUnsupportedCard) this.componentRef.handleUnsupportedCard(errObj);\n        return this;\n    }\n\n    onBinLookup(obj: CardBinLookupData) {\n        const nuObj = { ...obj };\n        nuObj.rootNode = this._node;\n\n        if (!nuObj.isReset) {\n            // Add brandImage urls, first checking if the merchant has configured their own one for the brand\n            nuObj.supportedBrandsRaw = obj.supportedBrandsRaw?.map((item: BrandObject) => {\n                item.brandImageUrl = this.props.brandsConfiguration[item.brand]?.icon ?? getCardImageUrl(item.brand, this.resources);\n                return item;\n            });\n        }\n\n        this.props.onBinLookup(nuObj);\n    }\n\n    public onBinValue = triggerBinLookUp(this);\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    get browserInfo() {\n        return collectBrowserInfo();\n    }\n\n    private onFocus = (obj: CardFocusData) => {\n        const event = new AnalyticsInfoEvent({\n            type: obj.focus === true ? ANALYTICS_FOCUS_STR : ANALYTICS_UNFOCUS_STR,\n            target: fieldTypeToSnakeCase(obj.fieldType)\n        });\n\n        this.submitAnalytics(event);\n\n        // Call merchant defined callback\n        this.props.onFocus?.(obj);\n    };\n\n    protected onEnterKeyPressed = (activeElement: Element, component: UIElement) => {\n        this.props.onEnterKeyPressed?.(activeElement, component);\n    };\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <CustomCardInput\n                    ref={ref => {\n                        this.componentRef = ref;\n                    }}\n                    {...this.props}\n                    {...this.state}\n                    handleKeyPress={this.handleKeyPress}\n                    rootNode={this._node}\n                    onChange={this.setState}\n                    onBinValue={this.onBinValue}\n                    implementationType={'custom'}\n                    resources={this.resources}\n                    brand={this.brand}\n                    onFocus={this.onFocus}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default CustomCard;\n","import { Component, h } from 'preact';\nimport classNames from 'classnames';\n\ninterface ThreeDS2FormProps {\n    name: string;\n    action: string;\n    target: string;\n    inputName: string;\n    inputValue: string;\n    onFormSubmit: (msg: string) => void;\n}\n\nexport default class ThreeDS2Form extends Component<ThreeDS2FormProps> {\n    protected formEl;\n\n    componentDidMount() {\n        this.formEl.submit();\n        this.props.onFormSubmit(`${this.props.inputName} sent`);\n    }\n\n    render({ name, action, target, inputName, inputValue }) {\n        return (\n            <form\n                ref={ref => {\n                    this.formEl = ref;\n                }}\n                method=\"POST\"\n                className={classNames(['adyen-checkout__threeds2__form', `adyen-checkout__threeds2__form--${name}`])}\n                name={name}\n                action={action}\n                target={target}\n                style={{ display: 'none' }}\n            >\n                <input name={inputName} value={inputValue} />\n            </form>\n        );\n    }\n}\n","/**\n * Centralised window.postMessage processing function used in 3DS2 components and also by the deviceFingerprinting process\n * NOTE: this latter use case means that while the deviceFingerprinting is still completing this component is also listening to\n *  securedFields related postMessaging\n *\n * @param domain - expected domain for the postMesssage to have originated from\n * @param resolve - the resolve function from the Promise that called this function\n * @param reject - the reject function from the Promise that called this function\n * @param parseErrorObj - an error object to log in the case of unparseable data (albeit from a valid origin)\n * @param expectedType - string to check that the passed data has the expected type\n */\nimport { hasOwnProperty } from './hasOwnProperty';\nimport { PostMsgParseErrorObject } from '../components/ThreeDS2/types';\n\nconst getProcessMessageHandler =\n    (domain: string, resolve: Function, reject: Function, expectedType: string): Function =>\n    event => {\n        const parseErrorObj: PostMsgParseErrorObject = {};\n        const origin = event.origin || event.originalEvent?.origin;\n\n        if (origin !== domain) {\n            return 'Message was not sent from the expected domain';\n        }\n\n        if (typeof event.data !== 'string') {\n            return 'Event data was not of type string';\n        }\n\n        if (!event.data.length) {\n            return 'Invalid event data string';\n        }\n\n        // Try to parse the data\n        try {\n            const feedbackObj = JSON.parse(event.data);\n            if (hasOwnProperty(feedbackObj, 'type') && feedbackObj.type === expectedType) {\n                resolve(feedbackObj);\n            } else {\n                // Silent fail - applies when RiskModule device fingerprinting is ongoing and this handler is picking up securedFields traffic\n                return 'Event data was not of expected type';\n            }\n        } catch (e) {\n            parseErrorObj.type = `${expectedType}-JSON-parse-error`;\n            parseErrorObj.comment = 'failed to JSON parse event.data';\n            parseErrorObj.extraInfo = `event.data = ${event.data}`;\n            parseErrorObj.eventDataRaw = event.data;\n\n            // TODO - decide whether to console.log/debug/error &/or call the merchant defined onError callback\n            console.debug('get-process-message-handler::CATCH::Un-parseable JSON:: parseErrorObj=', parseErrorObj);\n\n            return false;\n        }\n\n        return true;\n    };\n\nexport default getProcessMessageHandler;\n","/**\n *  Used to retrieve the origin from a url\n *\n *  @remarks\n *  Uses a regex to get origin (can't handle localhost origins)\n *\n *  @param url - URL\n *  @returns The origin of the url\n */\nexport const getOrigin = (url: string): string => {\n    const originRegex = /^(?:([A-Za-z]+):)?(\\/{0,3})([0-9.\\-A-Za-z]+)(?::(\\d+))?(?:\\/([^?#]*))?(?:\\?([^#]*))?(?:#(.*))?$/;\n    const matches = originRegex.exec(url);\n\n    if (!matches) return null;\n\n    const [, protocol, separator, host, port] = matches;\n\n    if (!protocol || !separator || !host) return null;\n\n    return `${protocol}:${separator}${host}${port ? `:${port}` : ''}`;\n};\n\nexport default getOrigin;\n","import { DecodeObject } from '../types/global-types';\n\nexport const NOT_BASE64_ERROR = 'not base64';\nexport const BASE64_MALFORMED_URI_ERROR = 'malformed URI sequence';\n\nconst b64DecodeUnicode = str =>\n    /**\n     * The \"Unicode Problem\" Since DOMStrings are 16-bit-encoded strings:\n     * In most browsers calling window.btoa on a Unicode string will cause\n     * a Character Out Of Range exception if a character exceeds the range\n     * of a 8-bit ASCII-encoded character.\n     * This method solves the problem\n     */\n    decodeURIComponent(Array.prototype.map.call(window.atob(str), c => `%${`00${c.charCodeAt(0).toString(16)}`.slice(-2)}`).join(''));\n\n/**\n * @internal\n */\nconst base64 = {\n    decode: (pData: string): DecodeObject => {\n        if (!base64.isBase64(pData)) {\n            return {\n                success: false,\n                error: NOT_BASE64_ERROR\n            };\n        }\n\n        try {\n            const data = b64DecodeUnicode(pData);\n            return {\n                success: true,\n                data\n            };\n        } catch (e) {\n            return {\n                success: false,\n                error: BASE64_MALFORMED_URI_ERROR\n            };\n        }\n    },\n\n    encode: (pData: string) => window.btoa(pData),\n\n    isBase64: pDataStr => {\n        if (!pDataStr) {\n            return false;\n        }\n\n        if (pDataStr.length % 4) {\n            return false;\n        }\n\n        try {\n            return window.btoa(window.atob(pDataStr)) === pDataStr;\n        } catch (e) {\n            return false;\n        }\n    }\n};\n\nexport default base64;\n","import { CHALLENGE_WINDOW_SIZES, DEFAULT_CHALLENGE_WINDOW_SIZE } from '../constants';\nimport { getOrigin } from '../../../utils/getOrigin';\nimport base64 from '../../../utils/base64';\nimport { ChallengeData, ThreeDS2Token, FingerPrintData, ResultObject, FingerprintResolveData, ChallengeResolveData } from '../types';\nimport { pick } from '../../../utils/commonUtils';\nimport { DecodeObject } from '../../../types/global-types';\nimport { ErrorObject } from '../../../core/Errors/types';\n\n/**\n * Check if we have been passed an ErrorObject because either base64 decoding or JSON.parse failed\n * @param obj -\n */\nexport const isErrorObject = (obj: ErrorObject | ThreeDS2Token): boolean => {\n    return 'success' in obj && !obj.success;\n};\n\nexport const decodeAndParseToken = (token: string): ThreeDS2Token | ErrorObject => {\n    const decodedToken: DecodeObject = base64.decode(token);\n    if (decodedToken.success) {\n        try {\n            return JSON.parse(decodedToken.data) as ThreeDS2Token;\n        } catch (e) {\n            return {\n                success: false,\n                error: 'Could not JSON parse token'\n            };\n        }\n    }\n\n    // base64.decode failed - object will contain error msg: 'not base64' or 'malformed URI sequence'\n    return decodedToken as ErrorObject;\n};\n\n/**\n * Performs JSON.stringify on passed object & and base64 encodes result\n * @param obj -\n * @returns encoded result\n */\nexport const encodeObject = obj => {\n    if (!obj || !Object.keys(obj).length) {\n        throw new Error('No (populated) data object to encode');\n    }\n    return base64.encode(JSON.stringify(obj));\n};\n\n/**\n * Accepts a size string for the challenge window & returns it if it is valid else returns a default value\n * @param sizeStr - the size string to check the validity of\n * @returns a valid size string\n */\nexport const validateChallengeWindowSize = (sizeStr: string): string => {\n    const sizeString = sizeStr.length === 1 ? `0${sizeStr}` : sizeStr;\n    const hasSize = Object.prototype.hasOwnProperty.call(CHALLENGE_WINDOW_SIZES, sizeString);\n    return hasSize ? sizeString : DEFAULT_CHALLENGE_WINDOW_SIZE;\n};\n\n/**\n * Accepts a size string for the challenge window & returns the corresponding array of w/h values\n * @param sizeStr -\n */\nexport const getChallengeWindowSize = (sizeStr: string): string[] => CHALLENGE_WINDOW_SIZES[validateChallengeWindowSize(sizeStr)];\n\n/**\n *  prepareChallengeData\n *\n *  Requires an object containing the challenge parameters:\n *  @param token - challengeToken string received from /submitThreeDS2Fingerprint, /details or /payments call: contains acsTransID, acsURL, messageVersion,\n *     threeDSNotificationURL and threeDSServerTransID\n *  @param size - one of five possible challenge window sizes\n */\nexport const prepareChallengeData = ({ token, size }): ChallengeData | ErrorObject => {\n    const decodedChallengeToken = decodeAndParseToken(token);\n\n    if (isErrorObject(decodedChallengeToken)) {\n        return decodedChallengeToken as ErrorObject;\n    }\n\n    const { acsTransID, acsURL, messageVersion, threeDSNotificationURL, threeDSServerTransID } = decodedChallengeToken as ThreeDS2Token;\n    const notificationURLOrigin = getOrigin(threeDSNotificationURL);\n\n    return {\n        acsURL,\n        cReqData: {\n            acsTransID,\n            messageVersion,\n            threeDSServerTransID,\n            messageType: 'CReq',\n            challengeWindowSize: validateChallengeWindowSize(size)\n        },\n        iframeSizeArr: getChallengeWindowSize(size),\n        postMessageDomain: notificationURLOrigin\n    } as ChallengeData;\n};\n\n/**\n *  prepareFingerPrintData\n *\n *  Requires an object containing the fingerprint parameters:\n *  @param token - fingerprintToken string received from /payments call: contains threeDSMethodNotificationURL, threeDSMethodUrl and\n *     threeDSServerTransID\n *  @param notificationURL - the URL that the final notification is expected to be postMessaged from.\n *\n *  NOTE: we don't expect merchants to alter the default by passing in a notificationURL of their own via props;\n *  and if 3DS2 is being done via createFromAction or handleAction we won't accept it.\n *  But if the merchant is using checkout.create('threeDS2DeviceFingerprint') we still support the fact that they might want to set their own\n *  notificationURL (aka threeDSMethodNotificationURL)\n */\nexport const prepareFingerPrintData = ({ token, notificationURL }): FingerPrintData | ErrorObject => {\n    const decodedFingerPrintToken = decodeAndParseToken(token);\n\n    if (isErrorObject(decodedFingerPrintToken)) {\n        return decodedFingerPrintToken as ErrorObject;\n    }\n\n    const { threeDSMethodNotificationURL, threeDSMethodUrl: threeDSMethodURL, threeDSServerTransID } = decodedFingerPrintToken as ThreeDS2Token;\n    const receivedNotificationURL = notificationURL || threeDSMethodNotificationURL;\n    const notificationURLOrigin = getOrigin(receivedNotificationURL);\n\n    return {\n        threeDSServerTransID,\n        threeDSMethodURL,\n        threeDSMethodNotificationURL: receivedNotificationURL,\n        postMessageDomain: notificationURLOrigin\n    } as FingerPrintData;\n};\n\nexport const createFingerprintResolveData = (dataKey: string, resultObj: ResultObject, paymentData: string): FingerprintResolveData => ({\n    data: {\n        [dataKey]: encodeObject({ threeDSCompInd: resultObj.threeDSCompInd }),\n        paymentData\n    }\n});\n\n// Old 3DS2 flow\nexport const createOldFingerprintResolveData = (dataKey: string, resultObj: ResultObject, paymentData: string): any => ({\n    data: {\n        details: { 'threeds2.fingerprint': encodeObject(resultObj) },\n        paymentData\n    }\n});\n\nexport const createChallengeResolveData = (dataKey: string, transStatus: string, authorisationToken: string): ChallengeResolveData => ({\n    data: {\n        details: { [dataKey]: encodeObject({ transStatus, authorisationToken }) }\n    }\n});\n\n// Needed for old 3DS2 flow & threeds2InMDFlow\nexport const createOldChallengeResolveData = (dataKey: string, transStatus: string, authorisationToken: string): any => ({\n    data: {\n        details: { 'threeds2.challengeResult': encodeObject({ transStatus }) },\n        paymentData: authorisationToken\n    }\n});\n\n/**\n *\n * Takes a string and encodes it as a base64url string\n * (https://en.wikipedia.org/wiki/Base64#URL_applications)\n * (See also https://tools.ietf.org/html/rfc7515)\n *\n * @example\n * ```\n * const jsonStr = JSON.stringify( {name:'john', surname:'smith'} );\n * const base64url = encodeBase64URL(jsonStr);\n * ```\n *\n * @param dataStr - data, as a string, to be encoded\n *\n * @returns base64URL - a base64url encoded string\n */\nexport const encodeBase64URL = (dataStr: string): string => {\n    const base64Data = window.btoa(dataStr);\n    let base64url = base64Data.split('=')[0]; // Remove any trailing '='s\n\n    base64url = base64url.replace(/\\+/g, '-'); // 62nd char of encoding\n    base64url = base64url.replace(/\\//g, '_'); // 63rd char of encoding\n\n    return base64url;\n};\n\nconst fingerprintFlowPropsDropin = ['elementRef'];\n\n/**\n *  Must contain all props needed for the challenge stage since, in the new 3DS2 flow, the fingerprint component will be the \"component\" reference\n *  if the /submitThreeDS2Fingerprint response dictates we \"handleAction\" to create a challenge\n */\nconst fingerprintFlowProps = ['createFromAction', 'onAdditionalDetails'];\n\n/**\n * Add props specifically needed for the type of 3DS2 flow: fingerprint or challenge\n *\n * @param actionSubtype - 3DS2 flow type: fingerprint or challenge\n * @param props - object from which to extract particular properties\n */\nexport const get3DS2FlowProps = (actionSubtype, props) => {\n    if (actionSubtype === 'fingerprint') {\n        // elementRef exists when the fingerprint component is created from the Dropin\n        const fingerprintProps = props.elementRef ? fingerprintFlowPropsDropin : fingerprintFlowProps;\n        const rtnObj = pick(fingerprintProps).from(props);\n        rtnObj.showSpinner = !props.isDropin;\n        rtnObj.statusType = 'loading';\n        return rtnObj;\n    }\n\n    // Challenge\n    return {\n        statusType: 'custom',\n        i18n: props.i18n\n    };\n};\n","/**\n * Tests if a passed promise settles before a certain amount of time has elapsed\n *\n * @param ms - number of milliseconds the passed promise has to settle\n * @param promise - the passed promise\n * @param timeOutObject - the object that the promiseTimeout will reject with if the passed promise doesn't settle in time\n */\nconst promiseTimeout = (ms: number, promise: Promise<any>, timeOutObject: object) => {\n    let timer;\n\n    const promiseTimer: Promise<any> = new Promise((resolve, reject): void => {\n        // Create a timeout to reject promise if not resolved\n        timer = setTimeout((): void => {\n            reject(timeOutObject);\n        }, ms);\n\n        promise\n            .then((res): void => {\n                clearTimeout(timer);\n                resolve(res);\n            })\n            .catch((err): void => {\n                clearTimeout(timer);\n                reject(err);\n            });\n    });\n\n    const cancelTimer = (): void => {\n        clearTimeout(timer);\n    };\n\n    return {\n        promise: promiseTimer,\n        cancel: cancelTimer\n    };\n};\n\nexport default promiseTimeout;\n","import { Component, h } from 'preact';\nimport classNames from 'classnames';\nimport Iframe from '../../../internal/IFrame';\nimport Spinner from '../../../internal/Spinner';\nimport ThreeDS2Form from '../Form';\nimport getProcessMessageHandler from '../../../../utils/get-process-message-handler';\nimport { encodeBase64URL } from '../utils';\nimport promiseTimeout from '../../../../utils/promiseTimeout';\nimport { CHALLENGE_TIMEOUT, CHALLENGE_TIMEOUT_REJECT_OBJECT, THREEDS2_NUM } from '../../constants';\nimport { DoChallenge3DS2Props, DoChallenge3DS2State } from './types';\nimport { ThreeDS2FlowObject } from '../../types';\n\nconst iframeName = 'threeDSIframe';\n\nclass DoChallenge3DS2 extends Component<DoChallenge3DS2Props, DoChallenge3DS2State> {\n    private processMessageHandler;\n    private challengePromise: { cancel: () => void; promise: Promise<any> };\n\n    constructor(props) {\n        super(props);\n\n        /**\n         * Create and Base64Url encode a JSON object containing the serverTransactionID & threeDSMethodNotificationURL\n         */\n        const jsonStr = JSON.stringify(this.props.cReqData);\n        const base64URLencodedData = encodeBase64URL(jsonStr);\n        this.state = { base64URLencodedData, status: 'init' };\n    }\n\n    private iframeCallback = () => {\n        this.setState({ status: 'iframeLoaded' });\n        // On Test - actually calls-back 3 times: once for challenge screen, once again as challenge.html reloads after the challenge is submitted, and once for redirect to threeDSNotificationURL.\n        // But for the purposes of calling the merchant defined onActionHandled callback - we only want to do it once\n        if (this.state.status === 'init') {\n            this.props.onActionHandled?.({ componentType: '3DS2Challenge', actionDescription: `${THREEDS2_NUM} challenge iframe loaded` });\n        }\n    };\n\n    private get3DS2ChallengePromise(): Promise<any> {\n        return new Promise((resolve, reject) => {\n            /**\n             * Listen for postMessage responses from the notification url\n             */\n            this.processMessageHandler = getProcessMessageHandler(this.props.postMessageDomain, resolve, reject, 'challengeResult');\n\n            window.addEventListener('message', this.processMessageHandler);\n        });\n    }\n\n    componentDidMount() {\n        // Render challenge\n        this.challengePromise = promiseTimeout(CHALLENGE_TIMEOUT, this.get3DS2ChallengePromise(), CHALLENGE_TIMEOUT_REJECT_OBJECT);\n        this.challengePromise.promise\n            .then((resolveObject: ThreeDS2FlowObject) => {\n                window.removeEventListener('message', this.processMessageHandler);\n                this.props.onCompleteChallenge(resolveObject);\n            })\n            /** Catch, for when Challenge times-out */\n            .catch((rejectObject: ThreeDS2FlowObject) => {\n                window.removeEventListener('message', this.processMessageHandler);\n                this.props.onErrorChallenge(rejectObject);\n            });\n    }\n\n    componentWillUnmount() {\n        if (this.challengePromise) this.challengePromise.cancel();\n        window.removeEventListener('message', this.processMessageHandler);\n    }\n\n    render({ acsURL, cReqData, iframeSizeArr, onFormSubmit }, { base64URLencodedData, status }) {\n        const [width, height] = iframeSizeArr;\n\n        return (\n            <div\n                className={classNames([\n                    'adyen-checkout__threeds2__challenge',\n                    `adyen-checkout__threeds2__challenge--${cReqData.challengeWindowSize}`\n                ])}\n            >\n                {status !== 'iframeLoaded' && <Spinner />}\n\n                <Iframe name={iframeName} width={width} height={height} callback={this.iframeCallback} />\n                <ThreeDS2Form\n                    name={'cReqForm'}\n                    action={acsURL}\n                    target={iframeName}\n                    inputName={'creq'}\n                    inputValue={base64URLencodedData}\n                    onFormSubmit={onFormSubmit}\n                />\n            </div>\n        );\n    }\n}\n\nexport default DoChallenge3DS2;\n","import { Component, h } from 'preact';\nimport DoChallenge3DS2 from './DoChallenge3DS2';\nimport { createChallengeResolveData, prepareChallengeData, createOldChallengeResolveData, isErrorObject } from '../utils';\nimport { PrepareChallenge3DS2Props, PrepareChallenge3DS2State, StatusErrorInfoObject } from './types';\nimport { ChallengeData, ResultObject, ThreeDS2FlowObject, ErrorCodeObject } from '../../types';\nimport '../../ThreeDS2.scss';\nimport Img from '../../../internal/Img';\nimport './challenge.scss';\nimport { hasOwnProperty } from '../../../../utils/hasOwnProperty';\nimport useImage from '../../../../core/Context/useImage';\nimport AdyenCheckoutError, { ERROR } from '../../../../core/Errors/AdyenCheckoutError';\nimport { THREEDS2_CHALLENGE, THREEDS2_CHALLENGE_ERROR, THREEDS2_FULL, THREEDS2_NUM, MISSING_TOKEN_IN_ACTION_MSG } from '../../constants';\nimport { isValidHttpUrl } from '../../../../utils/isValidURL';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, Analytics3DS2Events } from '../../../../core/Analytics/constants';\nimport { ErrorObject } from '../../../../core/Errors/types';\nimport { AnalyticsLogEvent } from '../../../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsErrorEvent } from '../../../../core/Analytics/AnalyticsErrorEvent';\nimport { AnalyticsEvent } from '../../../../core/Analytics/AnalyticsEvent';\n\nclass PrepareChallenge3DS2 extends Component<PrepareChallenge3DS2Props, PrepareChallenge3DS2State> {\n    public static defaultProps = {\n        onComplete: () => {},\n        onError: () => {},\n        isMDFlow: false\n    };\n\n    constructor(props) {\n        super(props);\n\n        if (this.props.token) {\n            const challengeData: ChallengeData | ErrorObject = prepareChallengeData({\n                token: this.props.token,\n                size: this.props.challengeWindowSize || this.props.size // TODO confirm that this.props.size is legacy and can be removed\n            });\n\n            this.state = {\n                status: 'init',\n                challengeData: challengeData as ChallengeData\n            };\n        } else {\n            // Will be picked up in componentDidMount\n            this.state = { challengeData: { success: false, error: MISSING_TOKEN_IN_ACTION_MSG } };\n\n            console.debug(`${THREEDS2_CHALLENGE_ERROR}: ${MISSING_TOKEN_IN_ACTION_MSG}`);\n        }\n    }\n\n    public onFormSubmit = (msg: string) => {\n        const event = new AnalyticsLogEvent({\n            type: THREEDS2_FULL,\n            message: msg,\n            subType: Analytics3DS2Events.CHALLENGE_DATA_SENT\n        });\n\n        this.props.onSubmitAnalytics(event);\n    };\n\n    componentDidMount() {\n        const hasChallengeData = !isErrorObject(this.state.challengeData);\n\n        if (hasChallengeData) {\n            const shouldAllowHttpDomains =\n                /** Allow http urls if in development and testing against localhost:8080 */\n                (process.env.NODE_ENV === 'development' && process.env.__CLIENT_ENV__?.indexOf('localhost:8080') > -1) ||\n                /**\n                 * Allows the checkoutshopper demo on localhost:8080 to work -\n                 *  requires a configuration in localhost of environment: 'test', _environmentUrls: {api: 'http://localhost:8080/'}\n                 */\n                (this.props.environment === 'test' && this.props._environmentUrls?.api?.includes('http://localhost:8080'));\n\n            /**\n             * Check the structure of the created challengeData\n             */\n            const { acsURL } = this.state.challengeData as ChallengeData;\n            const hasValidAcsURL = isValidHttpUrl(acsURL, shouldAllowHttpDomains);\n\n            // Only render component if we have an acsURL.\n            if (!hasValidAcsURL) {\n                // Set UI error & call onError callback\n                this.setError(\n                    {\n                        errorInfo: `${Analytics3DS2Errors.TOKEN_IS_MISSING_ACSURL}: ${this.props.i18n.get('err.gen.9102')}` //\n                    },\n                    true\n                );\n\n                // Send error to analytics endpoint // TODO - check logs to see if this *ever* happens\n                const event = new AnalyticsErrorEvent({\n                    code: Analytics3DS2Errors.TOKEN_IS_MISSING_ACSURL,\n                    errorType: ANALYTICS_ERROR_TYPE.apiError,\n                    message: `${THREEDS2_CHALLENGE_ERROR}: Decoded token is missing a valid acsURL property`\n                });\n                this.props.onSubmitAnalytics(event);\n\n                console.debug('### PrepareChallenge3DS2::exiting:: no valid acsURL');\n                return;\n            }\n\n            const { acsTransID, messageVersion, threeDSServerTransID } = (this.state.challengeData as ChallengeData).cReqData;\n\n            // Only render component if we have a acsTransID, messageVersion & threeDSServerTransID\n            if (!acsTransID || !messageVersion || !threeDSServerTransID) {\n                // Set UI error & call onError callback\n                this.setError(\n                    {\n                        errorInfo: `${Analytics3DS2Errors.TOKEN_IS_MISSING_OTHER_PROPS}: ${this.props.i18n.get('err.gen.9102')}`\n                        // errorObj: this.state.challengeData // TODO Decide if we want to expose this data\n                    },\n                    true\n                );\n\n                // Send error to analytics endpoint // TODO - check logs to see if this *ever* happens\n                const event = new AnalyticsErrorEvent({\n                    code: Analytics3DS2Errors.TOKEN_IS_MISSING_OTHER_PROPS,\n                    errorType: ANALYTICS_ERROR_TYPE.apiError,\n                    message: `${THREEDS2_CHALLENGE_ERROR}: Decoded token is missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)`\n                });\n                this.props.onSubmitAnalytics(event);\n\n                console.debug(\n                    '### PrepareChallenge3DS2::exiting:: missing one or more of the following properties (acsTransID | messageVersion | threeDSServerTransID)'\n                );\n                return;\n            }\n\n            // Proceed to allow component to render\n            this.setState({ status: 'performingChallenge' });\n            //\n        } else {\n            const errorMsg: string = (this.state.challengeData as ErrorObject).error;\n\n            const errorCode =\n                errorMsg.indexOf(MISSING_TOKEN_IN_ACTION_MSG) > -1\n                    ? Analytics3DS2Errors.ACTION_IS_MISSING_TOKEN\n                    : Analytics3DS2Errors.TOKEN_DECODE_OR_PARSING_FAILED;\n\n            // Set UI error & call onError callback\n            this.setError(\n                {\n                    errorInfo:\n                        errorMsg.indexOf(MISSING_TOKEN_IN_ACTION_MSG) > -1\n                            ? `${Analytics3DS2Errors.ACTION_IS_MISSING_TOKEN}: ${this.props.i18n.get('err.gen.9102')}`\n                            : `${Analytics3DS2Errors.TOKEN_DECODE_OR_PARSING_FAILED}: ${this.props.i18n.get('err.gen.9102')}`\n                    // errorObj: this.state.challengeData // TODO Decide if we want to expose this data\n                },\n                true\n            );\n\n            // Send error to analytics endpoint // TODO - check logs to see if the base64 decoding errors *ever* happen\n            const event = new AnalyticsErrorEvent({\n                code: errorCode,\n                errorType: ANALYTICS_ERROR_TYPE.apiError,\n                message: `${THREEDS2_CHALLENGE_ERROR}: ${errorMsg}` // can be: 'Missing \"token\" property from threeDS2 action', 'not base64', 'malformed URI sequence' or 'Could not JSON parse token'\n            });\n\n            this.props.onSubmitAnalytics(event);\n\n            console.debug('### PrepareChallenge3DS2::exiting:: no challengeData');\n        }\n    }\n\n    setStatusComplete(resultObj: ResultObject, errorCodeObject: ErrorCodeObject = null) {\n        this.setState({ status: 'complete' }, () => {\n            /**\n             * Create the data in the way that the /details endpoint expects.\n             *  This is different for the flow triggered by the threeds2InMDFlow process than for the new, v67, 'threeDS2' action\n             */\n            const resolveDataFunction = this.props.isMDFlow ? createOldChallengeResolveData : createChallengeResolveData;\n            const data = resolveDataFunction(this.props.dataKey, resultObj.transStatus, this.props.paymentData);\n\n            if (errorCodeObject) {\n                console.debug('### PrepareChallenge3DS2::errorCodeObject::', errorCodeObject);\n            }\n\n            let event: AnalyticsEvent;\n\n            /** Are we in an \"error\" i.e. timeout or no transStatus, scenario? If so, submit analytics about it */\n            const finalResObject = errorCodeObject ? errorCodeObject : resultObj;\n            if (finalResObject.errorCode) {\n                const errorTypeAndCode = {\n                    code: finalResObject.errorCode === 'timeout' ? Analytics3DS2Errors.THREEDS2_TIMEOUT : Analytics3DS2Errors.NO_TRANSSTATUS,\n                    errorType: finalResObject.errorCode === 'timeout' ? ANALYTICS_ERROR_TYPE.network : ANALYTICS_ERROR_TYPE.apiError\n                };\n\n                // Challenge process has timed out,\n                // or, It's an error reported by the backend 'cos no transStatus could be retrieved // TODO - check logs to see if this *ever* happens\n\n                event = new AnalyticsErrorEvent({\n                    message: (finalResObject as ErrorCodeObject).message,\n                    ...errorTypeAndCode\n                });\n\n                // Send error to analytics endpoint\n                this.props.onSubmitAnalytics(event);\n            }\n\n            /** Calculate \"result\" for analytics */\n            let result: string;\n\n            switch (resultObj?.transStatus) {\n                case 'Y':\n                    result = 'success';\n                    break;\n                case 'N':\n                    result = 'failed';\n                    break;\n                case 'U':\n                    result = !errorCodeObject ? 'cancelled' : 'timeout';\n                    break;\n                default:\n            }\n            if (resultObj?.errorCode) {\n                result = 'noTransStatus';\n            }\n\n            /** Create log object - the process is completed, one way or another */\n\n            event = new AnalyticsLogEvent({\n                type: THREEDS2_FULL,\n                message: `${THREEDS2_NUM} challenge has completed`,\n                subType: Analytics3DS2Events.CHALLENGE_COMPLETED,\n                result\n            });\n\n            // Send log to analytics endpoint\n            this.props.onSubmitAnalytics(event);\n\n            /**\n             * Equals call to onAdditionalDetails (except for in 3DS2InMDFlow)\n             */\n            this.props.onComplete(data);\n        });\n    }\n\n    /**\n     * Display error in the UI,\n     * and, optionally, decide whether to send any of these errors to the merchant defined onError callback\n     *\n     * @param errorInfoObj -\n     * @param isFatal -\n     */\n    setError(errorInfoObj: StatusErrorInfoObject, isFatal: boolean) {\n        this.setState({ status: 'error', errorInfo: errorInfoObj.errorInfo });\n\n        // Decide whether to call this.props.onError\n        if (isFatal) {\n            this.props.onError(new AdyenCheckoutError(ERROR, errorInfoObj.errorInfo, { cause: errorInfoObj.errorObj }));\n        }\n    }\n\n    render(_, { challengeData }) {\n        const getImage = useImage();\n        if (this.state.status === 'performingChallenge') {\n            return (\n                <DoChallenge3DS2\n                    onCompleteChallenge={(challenge: ThreeDS2FlowObject) => {\n                        let errorCodeObject: ErrorCodeObject = null;\n\n                        // Challenge has resulted in an error (no transStatus could be retrieved) - but we still treat this as a valid scenario\n                        if (hasOwnProperty(challenge.result, 'errorCode') && challenge.result.errorCode.length) {\n                            // Tell the merchant there's been an error\n                            errorCodeObject = {\n                                errorCode: challenge.result.errorCode,\n                                message: `${THREEDS2_CHALLENGE_ERROR}: ${\n                                    challenge.result.errorDescription ? challenge.result.errorDescription : 'no transStatus could be retrieved'\n                                }`\n                            };\n\n                            /**\n                             * NOTE: we can now use this.props.isMDFlow to decide if we want to send any of these errors to the onError handler\n                             *  - this is problematic in the regular flow since merchants tend to treat any calls to their onError handler as 'fatal',\n                             *   but in the MDFlow we control what the onError handler does.\n                             */\n                            if (this.props.isMDFlow) {\n                                this.props.onError(\n                                    new AdyenCheckoutError(\n                                        ERROR,\n                                        `${THREEDS2_CHALLENGE_ERROR}: ${\n                                            challenge.result.errorDescription\n                                                ? challenge.result.errorDescription\n                                                : 'no transStatus could be retrieved'\n                                        }`,\n                                        { cause: challenge.result.errorCode }\n                                    )\n                                );\n                            }\n                        }\n\n                        /**\n                         * An object has been returned, parsed & accepted as legit (according to the rules in getProcessMessageHandler),\n                         * but the result prop on that object is missing\n                         */\n                        if (!challenge.result) {\n                            this.setError(\n                                {\n                                    errorInfo: `${THREEDS2_CHALLENGE_ERROR}:  ${this.props.i18n.get('3ds.chal.805', {\n                                        values: { result: '\"result\"' }\n                                    })}`,\n                                    errorObj: challenge as unknown as ErrorObject\n                                },\n                                true\n                            );\n\n                            // Send error to analytics endpoint\n                            const event = new AnalyticsErrorEvent({\n                                code: Analytics3DS2Errors.CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP,\n                                errorType: ANALYTICS_ERROR_TYPE.apiError,\n                                message: `${THREEDS2_CHALLENGE_ERROR}: challenge resolved without a \"result\" object`\n                            });\n\n                            this.props.onSubmitAnalytics(event);\n\n                            console.debug('### PrepareChallenge3DS2::exiting:: challenge resolved without a \"result\" object');\n\n                            return;\n                        }\n\n                        // Proceed with call to onAdditionalDetails (except for in 3DS2InMDFlow)\n                        this.setStatusComplete(challenge.result, errorCodeObject);\n                    }}\n                    onErrorChallenge={(challenge: ThreeDS2FlowObject) => {\n                        /**\n                         * Called when challenge times-out (which is still a valid scenario)...\n                         */\n                        if (hasOwnProperty(challenge, 'errorCode')) {\n                            const timeoutObject: ErrorCodeObject = {\n                                errorCode: challenge.errorCode,\n                                message: `${THREEDS2_CHALLENGE}: ${challenge.errorCode}`\n                            };\n\n                            // see comment in onCompleteChallenge code block\n                            if (this.props.isMDFlow) {\n                                this.props.onError(\n                                    new AdyenCheckoutError(ERROR, `${THREEDS2_CHALLENGE_ERROR}: '3DS2 challenge timed out'`, {\n                                        cause: challenge.errorCode\n                                    })\n                                );\n                            }\n\n                            this.setStatusComplete(challenge.result, timeoutObject);\n                            return;\n                        }\n                    }}\n                    {...challengeData}\n                    onActionHandled={this.props.onActionHandled}\n                    onFormSubmit={this.onFormSubmit}\n                />\n            );\n        }\n\n        if (this.state.status === 'error') {\n            return (\n                <div className=\"adyen-checkout__threeds2-challenge-error\">\n                    <Img\n                        className=\"adyen-checkout__status__icon adyen-checkout__status__icon--error\"\n                        src={getImage({\n                            imageFolder: 'components/'\n                        })('error')}\n                        alt={''}\n                    />\n                    <div className=\"adyen-checkout__status__text\">\n                        {this.state.errorInfo ? this.state.errorInfo : this.props.i18n.get('error.message.unknown')}\n                    </div>\n                </div>\n            );\n        }\n\n        return null;\n    }\n}\n\nexport default PrepareChallenge3DS2;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PrepareChallenge from './components/Challenge';\nimport { DEFAULT_CHALLENGE_WINDOW_SIZE, THREEDS2_CHALLENGE, THREEDS2_CHALLENGE_ERROR, THREEDS2_FULL } from './constants';\nimport { existy } from '../../utils/commonUtils';\nimport { hasOwnProperty } from '../../utils/hasOwnProperty';\nimport { TxVariants } from '../tx-variants';\nimport { ThreeDS2ChallengeConfiguration } from './types';\nimport AdyenCheckoutError, { API_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, ANALYTICS_RENDERED_STR, Analytics3DS2Events } from '../../core/Analytics/constants';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { ActionHandledReturnObject } from '../../types/global-types';\nimport { AnalyticsLogEvent } from '../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\nclass ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeConfiguration> {\n    public static type = TxVariants.threeDS2Challenge;\n\n    public static defaultProps = {\n        dataKey: 'threeDSResult',\n        size: DEFAULT_CHALLENGE_WINDOW_SIZE,\n        type: THREEDS2_CHALLENGE\n    };\n\n    protected submitAnalytics = (aObj: AnalyticsEvent) => {\n        if (aObj instanceof AnalyticsInfoEvent && aObj.type === ANALYTICS_RENDERED_STR) return; // suppress the rendered event (it will have the same timestamp as the \"creq sent\" event)\n\n        super.submitAnalytics(aObj);\n    };\n\n    protected onActionHandled = (rtnObj: ActionHandledReturnObject) => {\n        const event = new AnalyticsLogEvent({\n            type: THREEDS2_FULL,\n            message: rtnObj.actionDescription,\n            subType: Analytics3DS2Events.CHALLENGE_IFRAME_LOADED\n        });\n\n        this.submitAnalytics(event);\n\n        super.onActionHandled(rtnObj);\n    };\n\n    onComplete(state) {\n        /**\n         * Equals a call to onAdditionalDetails (as set in actionTypes.ts) for the regular, \"native\" flow.\n         * However, if the action to create this component came from the 3DS2InMDFlow process it will instead equal a call to the onComplete callback\n         * (as defined in the 3DS2InMDFlow and passed in as a config prop).\n         */\n        if (state) super.onComplete(state);\n        this.unmount(); // re. fixing issue around back to back challenge calls\n    }\n\n    render() {\n        // existy used because threeds2InMDFlow will send empty string for paymentData and we should be allowed to proceed with this\n        if (!existy(this.props.paymentData)) {\n            /**\n             *   The presence of props.isMDFlow indicates the action to create this component came from the threeds2InMDFlow process which passes (an empty) paymentsData.\n             *   The regular, \"native\" flow uses the authorisationToken from the 3DS2 action, which actionTypes.ts assigns to a property called paymentData\n             */\n            const dataTypeForError = hasOwnProperty(this.props, 'isMDFlow') ? 'paymentData' : 'authorisationToken';\n\n            this.props.onError(new AdyenCheckoutError(API_ERROR, `No ${dataTypeForError} received. 3DS2 Challenge cannot proceed`));\n\n            const event = new AnalyticsErrorEvent({\n                code: Analytics3DS2Errors.ACTION_IS_MISSING_PAYMENT_DATA,\n                errorType: ANALYTICS_ERROR_TYPE.apiError,\n                message: `${THREEDS2_CHALLENGE_ERROR}: Missing 'paymentData' property from threeDS2 action`\n            });\n\n            this.submitAnalytics(event);\n\n            return null;\n        }\n\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <PrepareChallenge\n                    {...this.props}\n                    onComplete={this.onComplete}\n                    onSubmitAnalytics={this.submitAnalytics}\n                    isMDFlow={this.props.paymentData.length < 15}\n                    onActionHandled={this.onActionHandled}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default ThreeDS2Challenge;\n","import { Component, h } from 'preact';\nimport Iframe from '../../../internal/IFrame';\nimport Spinner from '../../../internal/Spinner';\nimport ThreeDS2Form from '../Form';\nimport promiseTimeout from '../../../../utils/promiseTimeout';\nimport getProcessMessageHandler from '../../../../utils/get-process-message-handler';\nimport { THREEDS_METHOD_TIMEOUT, FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT, THREEDS2_NUM } from '../../constants';\nimport { encodeBase64URL } from '../utils';\nimport { DoFingerprint3DS2Props, DoFingerprint3DS2State } from './types';\n\nconst iframeName = 'threeDSMethodIframe';\n\n/**\n * Create and Base64URL encode a JSON object containing the serverTransactionID & threeDSMethodNotificationURL.\n * This Base64URL string will be added to the <form> in the ThreeDS2Form component.\n * The ThreeDS2Form component will submit the <form> when it mounts, using the ThreeDS2Iframe as the <form> target.\n * getProcessMessageHandler will listen for the postMessage response from the notificationURL and will settle the\n * promise accordingly causing this component to call the appropriate callback.\n * The callbacks exist in the parent component: ThreeDS2DeviceFingerprint where they ultimately call the onComplete\n * function passed as a prop when checkout.create('threeDS2DeviceFingerprint') is called.\n */\nclass DoFingerprint3DS2 extends Component<DoFingerprint3DS2Props, DoFingerprint3DS2State> {\n    private processMessageHandler;\n    private fingerPrintPromise: any;\n    public static defaultProps = {\n        showSpinner: true\n    };\n\n    constructor(props) {\n        super(props);\n\n        /**\n         * Create and Base64URL encode a JSON object\n         */\n        const { threeDSServerTransID, threeDSMethodNotificationURL } = this.props;\n\n        const jsonStr = JSON.stringify({\n            threeDSServerTransID,\n            threeDSMethodNotificationURL\n        });\n        const base64URLencodedData = encodeBase64URL(jsonStr);\n        this.state = { base64URLencodedData };\n    }\n\n    get3DS2MethodPromise() {\n        return new Promise((resolve, reject) => {\n            /**\n             * Listen for postMessage responses from the notification url\n             */\n            this.processMessageHandler = getProcessMessageHandler(this.props.postMessageDomain, resolve, reject, 'fingerPrintResult');\n\n            window.addEventListener('message', this.processMessageHandler);\n        });\n    }\n\n    componentDidMount() {\n        // Check 3DS2 Device fingerprint\n        this.fingerPrintPromise = promiseTimeout(THREEDS_METHOD_TIMEOUT, this.get3DS2MethodPromise(), FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT);\n        this.fingerPrintPromise.promise\n            .then(resolveObject => {\n                window.removeEventListener('message', this.processMessageHandler);\n                this.props.onCompleteFingerprint(resolveObject);\n            })\n            .catch(rejectObject => {\n                window.removeEventListener('message', this.processMessageHandler);\n                this.props.onErrorFingerprint(rejectObject);\n            });\n    }\n\n    componentWillUnmount() {\n        if (this.fingerPrintPromise) this.fingerPrintPromise.cancel();\n        window.removeEventListener('message', this.processMessageHandler);\n    }\n\n    render({ threeDSMethodURL, onActionHandled, onFormSubmit }, { base64URLencodedData }) {\n        return (\n            <div className=\"adyen-checkout__3ds2-device-fingerprint\">\n                {this.props.showSpinner && <Spinner />}\n                <div style={{ display: 'none' }}>\n                    <Iframe\n                        name={iframeName}\n                        callback={() => {\n                            onActionHandled?.({ componentType: '3DS2Fingerprint', actionDescription: `${THREEDS2_NUM} fingerprint iframe loaded` });\n                        }}\n                    />\n                    <ThreeDS2Form\n                        name={'threeDSMethodForm'}\n                        action={threeDSMethodURL}\n                        target={iframeName}\n                        inputName={'threeDSMethodData'}\n                        inputValue={base64URLencodedData}\n                        onFormSubmit={onFormSubmit}\n                    />\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default DoFingerprint3DS2;\n","import { Component, h } from 'preact';\nimport DoFingerprint3DS2 from './DoFingerprint3DS2';\nimport { createFingerprintResolveData, createOldFingerprintResolveData, isErrorObject, prepareFingerPrintData } from '../utils';\nimport { PrepareFingerprint3DS2Props, PrepareFingerprint3DS2State } from './types';\nimport { FingerPrintData, ResultObject, ErrorCodeObject } from '../../types';\nimport { ErrorObject } from '../../../../core/Errors/types';\nimport { isValidHttpUrl } from '../../../../utils/isValidURL';\nimport { THREEDS2_FULL, THREEDS2_FINGERPRINT, THREEDS2_FINGERPRINT_ERROR, THREEDS2_NUM, MISSING_TOKEN_IN_ACTION_MSG, TIMEOUT } from '../../constants';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, Analytics3DS2Events } from '../../../../core/Analytics/constants';\nimport { AnalyticsLogEvent } from '../../../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsEvent } from '../../../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsErrorEvent } from '../../../../core/Analytics/AnalyticsErrorEvent';\n\nclass PrepareFingerprint3DS2 extends Component<PrepareFingerprint3DS2Props, PrepareFingerprint3DS2State> {\n    public static type = 'scheme';\n\n    public static defaultProps = {\n        onComplete: () => {},\n        onError: () => {},\n        paymentData: '',\n        showSpinner: true,\n        isMDFlow: false\n    };\n\n    constructor(props) {\n        super(props);\n\n        const { token, notificationURL } = this.props; // See comments on prepareFingerPrintData regarding notificationURL\n\n        if (token) {\n            const fingerPrintData: FingerPrintData | ErrorObject = prepareFingerPrintData({ token, notificationURL });\n\n            this.state = {\n                status: 'init',\n                fingerPrintData: fingerPrintData as FingerPrintData\n            };\n        } else {\n            // Will be picked up in componentDidMount\n            this.state = { fingerPrintData: { success: false, error: MISSING_TOKEN_IN_ACTION_MSG } };\n\n            console.debug(`${THREEDS2_FINGERPRINT_ERROR}: ${MISSING_TOKEN_IN_ACTION_MSG}`);\n        }\n    }\n\n    public onFormSubmit = (msg: string) => {\n        const event = new AnalyticsLogEvent({\n            type: THREEDS2_FULL,\n            message: msg,\n            subType: Analytics3DS2Events.FINGERPRINT_DATA_SENT\n        });\n\n        this.props.onSubmitAnalytics(event);\n    };\n\n    componentDidMount() {\n        const hasFingerPrintData = !isErrorObject(this.state.fingerPrintData);\n\n        if (hasFingerPrintData) {\n            const shouldAllowHttpDomains =\n                /** Allow http urls if in development and testing against localhost:8080 */\n                (process.env.NODE_ENV === 'development' && process.env.__CLIENT_ENV__?.indexOf('localhost:8080') > -1) ||\n                /**\n                 * Allows the checkoutshopper demo on localhost:8080 to work -\n                 *  requires a configuration in localhost of environment: 'test', _environmentUrls: {api: 'http://localhost:8080/'}\n                 */\n                (this.props.environment === 'test' && this.props._environmentUrls?.api?.includes('http://localhost:8080'));\n\n            /**\n             * Check the structure of the created fingerPrintData\n             */\n            const { threeDSMethodURL, threeDSMethodNotificationURL, postMessageDomain, threeDSServerTransID } = this.state\n                .fingerPrintData as FingerPrintData;\n\n            const hasValid3DSMethodURL = isValidHttpUrl(threeDSMethodURL, shouldAllowHttpDomains);\n\n            // Only render component if we have a threeDSMethodURL. Otherwise, exit with threeDSCompInd: 'U'\n            if (!hasValid3DSMethodURL) {\n                this.setStatusComplete(\n                    { threeDSCompInd: 'U' },\n                    {\n                        errorCode: Analytics3DS2Errors.TOKEN_IS_MISSING_THREEDSMETHODURL,\n                        message: `${THREEDS2_FINGERPRINT_ERROR}: Decoded token is missing a valid threeDSMethodURL property`\n                    }\n                );\n\n                /**\n                 * NOTE: we can now use this.props.isMDFlow to decide if we want to send any of these errors to the onError handler\n                 *  - this is problematic in the regular flow since merchants tend to treat any calls to their onError handler as 'fatal',\n                 *   but in the MDFlow we control what the onError handler does.\n                 */\n                // if (this.props.isMDFlow) {}\n\n                console.debug('### PrepareFingerprint3DS2::exiting:: no valid threeDSMethodURL');\n                return;\n            }\n\n            const hasValid3DSMethodNotificationURL = isValidHttpUrl(threeDSMethodNotificationURL, shouldAllowHttpDomains);\n            const hasValidPostMessageDomain = isValidHttpUrl(postMessageDomain, shouldAllowHttpDomains);\n            const hasTransServerID = threeDSServerTransID?.length;\n\n            if (!hasValid3DSMethodNotificationURL || !hasValidPostMessageDomain || !hasTransServerID) {\n                /**\n                 * NOTE: EMVCo_3DS_CoreSpec_v2.3.1_20220831.pdf states that we should return: threeDSCompInd: 'N'\n                 * when the fingerprinting process \"Did not run or did not successfully complete\"\n                 */\n                this.setStatusComplete(\n                    { threeDSCompInd: 'N' },\n                    {\n                        errorCode: Analytics3DS2Errors.TOKEN_IS_MISSING_OTHER_PROPS,\n                        message: `${THREEDS2_FINGERPRINT_ERROR}: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)`\n                    }\n                );\n\n                console.debug(\n                    '### PrepareFingerprint3DS2::exiting:: Decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)'\n                );\n\n                return;\n            }\n\n            // Proceed to allow component to render\n            this.setState({ status: 'retrievingFingerPrint' });\n            //\n        } else {\n            // Only render component if we have fingerPrintData. Otherwise, complete with threeDSCompInd: 'N'\n\n            const errorMsg: string = (this.state.fingerPrintData as ErrorObject).error;\n\n            const errorCode =\n                errorMsg.indexOf(MISSING_TOKEN_IN_ACTION_MSG) > -1\n                    ? Analytics3DS2Errors.ACTION_IS_MISSING_TOKEN\n                    : Analytics3DS2Errors.TOKEN_DECODE_OR_PARSING_FAILED;\n\n            this.setStatusComplete(\n                { threeDSCompInd: 'N' },\n                {\n                    errorCode,\n                    message: `${THREEDS2_FINGERPRINT_ERROR}: ${errorMsg}` // can be: 'Missing \"token\" property from threeDS2 action', 'not base64', 'malformed URI sequence' or 'Could not JSON parse token'\n                }\n            );\n\n            console.debug('### PrepareFingerprint3DS2:: token does not exist or could not be base64 decoded &/or JSON.parsed');\n        }\n    }\n\n    setStatusComplete(resultObj: ResultObject, errorCodeObject: ErrorCodeObject = null) {\n        this.setState({ status: 'complete' }, () => {\n            /**\n             * Create the data in the way that the /details endpoint expects.\n             *  This is different for the flow triggered by the threeds2InMDFlow process than for the new, v67, 'threeDS2' action\n             */\n            const resolveDataFunction = this.props.isMDFlow ? createOldFingerprintResolveData : createFingerprintResolveData;\n            const data = resolveDataFunction(this.props.dataKey, resultObj, this.props.paymentData);\n\n            let event: AnalyticsEvent;\n\n            /** Are we in an error scenario? If so, submit analytics about it */\n            const finalResObject = errorCodeObject ? errorCodeObject : resultObj;\n            if (finalResObject.errorCode) {\n                const errorTypeAndCode = {\n                    code: finalResObject.errorCode === TIMEOUT ? Analytics3DS2Errors.THREEDS2_TIMEOUT : finalResObject.errorCode,\n                    errorType: finalResObject.errorCode === TIMEOUT ? ANALYTICS_ERROR_TYPE.network : ANALYTICS_ERROR_TYPE.apiError\n                };\n\n                /**\n                 * Timeout or data parsing problems:\n                 *\n                 * (threeDSCompInd:\"U\"):\n                 *   - Decoded token is missing a valid threeDSMethodURL property,\n                 *  or, (threeDSCompInd:\"N\"):\n                 *   - Fingerprint process has timed out,\n                 *  also, (threeDSCompInd:\"N\"):\n                 *   - Missing \"token\" property from threeDS2 action\n                 *   - or, decoded token is missing one or more of the following properties (threeDSMethodNotificationURL | postMessageDomain | threeDSServerTransID)\n                 *   - or, token could not be base64 decoded &/or JSON.parsed\n                 */\n\n                event = new AnalyticsErrorEvent({\n                    message: (finalResObject as ErrorCodeObject).message,\n                    ...errorTypeAndCode\n                });\n\n                // Send error to analytics endpoint\n                this.props.onSubmitAnalytics(event);\n            }\n\n            /** Calculate \"result\" for analytics */\n            let result: string;\n\n            switch (resultObj?.threeDSCompInd) {\n                case 'Y':\n                    result = 'success';\n                    break;\n                case 'N': {\n                    if (!errorCodeObject) {\n                        result = 'failed'; // 'failed' is the result returned from the threeDSMethodURL\n                    } else {\n                        result = errorCodeObject.errorCode === TIMEOUT ? TIMEOUT : 'failedInternal'; // timed-out; or, 'failed' as a result of internal checks\n                    }\n                    break;\n                }\n                case 'U':\n                    result = 'noThreeDSMethodURL';\n                    break;\n                default:\n            }\n\n            /**\n             * The fingerprint process is completed, one way or another.\n             * The resultObj will be {threeDSCompInd:\"Y\"} in the case of success,\n             * else {threeDSCompInd:\"U\"} or {threeDSCompInd:\"N\"} - if we've had some kind of timeout or data parsing problem (as described above)\n             */\n\n            event = new AnalyticsLogEvent({\n                type: THREEDS2_FULL,\n                message: `${THREEDS2_NUM} fingerprinting has completed`,\n                subType: Analytics3DS2Events.FINGERPRINT_COMPLETED,\n                result\n            });\n            // Send log to analytics endpoint\n            this.props.onSubmitAnalytics(event);\n\n            /**\n             * Equals call to callSubmit3DS2Fingerprint (except for in 3DS2InMDFlow)\n             */\n            this.props.onComplete(data);\n        });\n    }\n\n    render({ showSpinner }, { status, fingerPrintData }) {\n        if (status === 'retrievingFingerPrint') {\n            return (\n                <DoFingerprint3DS2\n                    onCompleteFingerprint={fingerprint => {\n                        this.setStatusComplete(fingerprint.result);\n                    }}\n                    onErrorFingerprint={fingerprint => {\n                        /**\n                         * Called when fingerprint times-out (which is still a valid scenario)...\n                         */\n                        const timeoutObject: ErrorCodeObject = {\n                            errorCode: fingerprint.errorCode, // 'timeout'\n                            message: `${THREEDS2_FINGERPRINT}: ${fingerprint.errorCode}`\n                        };\n\n                        this.setStatusComplete(fingerprint.result, timeoutObject); // fingerprint.result = threeDSCompInd: 'N'\n                    }}\n                    showSpinner={showSpinner}\n                    {...fingerPrintData}\n                    onActionHandled={this.props.onActionHandled}\n                    onFormSubmit={this.onFormSubmit}\n                />\n            );\n        }\n\n        return null;\n    }\n}\n\nexport default PrepareFingerprint3DS2;\n","export const API_VERSION = 'v1';\n\n// Same error code will be sent to the analytics\nexport const API_ERROR_CODE = {\n    makePayments: '620',\n    submitPaymentDetails: '621',\n    submitThreeDS2Fingerprint: '622',\n    createOrder: '623'\n};\n","import { httpPost } from '../../core/Services/http';\nimport { pick } from '../../utils/commonUtils';\nimport { ThreeDS2FingerprintResponse } from './types';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { THREEDS2_FINGERPRINT_SUBMIT } from './constants';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors } from '../../core/Analytics/constants';\nimport { API_ERROR_CODE } from '../../core/Services/sessions/constants';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\n/**\n * ThreeDS2DeviceFingerprint, onComplete, calls a new, internal, endpoint which\n * behaves like the /details endpoint but doesn't require the same credentials\n */\nexport default function callSubmit3DS2Fingerprint({ data }): void {\n    httpPost<ThreeDS2FingerprintResponse>(\n        {\n            path: `v1/submitThreeDS2Fingerprint?token=${this.props.clientKey}`,\n            loadingContext: this.props.loadingContext,\n            errorLevel: 'fatal',\n            errorCode: API_ERROR_CODE.submitThreeDS2Fingerprint\n        },\n        {\n            ...data\n        }\n    )\n        .then(resData => {\n            let event: AnalyticsEvent;\n\n            /**\n             * Frictionless (no challenge) flow OR \"refused\" flow\n             */\n            if (resData.type === 'completed') {\n                const { details } = resData;\n\n                if (!resData.details) {\n                    console.debug(\n                        'Handled Error::callSubmit3DS2Fingerprint::FAILED:: no details object in a response indicating either a \"frictionless\" flow, or a \"refused\" response. resData=',\n                        resData\n                    );\n\n                    event = new AnalyticsErrorEvent({\n                        code: Analytics3DS2Errors.NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED,\n                        errorType: ANALYTICS_ERROR_TYPE.apiError,\n                        message: `${THREEDS2_FINGERPRINT_SUBMIT}: no details object in a response indicating either a \"frictionless\" flow, or a \"refused\" response`\n                    });\n\n                    this.submitAnalytics(event);\n\n                    return;\n                }\n\n                return this.onComplete({ data: { details } });\n            }\n\n            /**\n             * If we don't have a type: \"completed\", then we expect an action, because we must be in a Challenge or Redirect flow\n             */\n            if (!resData.action) {\n                console.debug(\n                    'Handled Error::callSubmit3DS2Fingerprint::FAILED:: no action object in a response indicating a \"challenge\". resData=',\n                    resData\n                );\n\n                event = new AnalyticsErrorEvent({\n                    code: Analytics3DS2Errors.NO_ACTION_FOR_CHALLENGE,\n                    errorType: ANALYTICS_ERROR_TYPE.apiError,\n                    message: `${THREEDS2_FINGERPRINT_SUBMIT}: no action object in a response indicating a \"challenge\" flow`\n                });\n                this.submitAnalytics(event);\n\n                return;\n            }\n\n            // elementRef exists when the fingerprint component is created from the Dropin\n            const actionHandler = this.props.elementRef ?? this;\n\n            /**\n             * We have an action but do we have a way to handle it?\n             * TODO - check logs: do we ever *not* have an actionHandler?\n             */\n            if (!actionHandler) {\n                console.debug('Handled Error::callSubmit3DS2Fingerprint::FAILED:: no actionHandler');\n\n                event = new AnalyticsErrorEvent({\n                    code: Analytics3DS2Errors.NO_COMPONENT_FOR_ACTION,\n                    errorType: ANALYTICS_ERROR_TYPE.sdkError,\n                    message: `${THREEDS2_FINGERPRINT_SUBMIT}: no component defined to handle the action response`\n                });\n\n                this.submitAnalytics(event);\n\n                return;\n            }\n\n            /**\n             * Challenge flow\n             */\n            if (resData.action?.type === 'threeDS2') {\n                // Ensure challengeWindowSize is propagated if there was a (merchant defined) handleAction call proceeding this one that had it set as an option\n                return actionHandler.handleAction(resData.action, pick('challengeWindowSize').from(this.props));\n            }\n\n            /**\n             * Redirect flow (usecase: we thought we could do 3DS2 but it turns out we can't)\n             * TODO - check logs: does this ever happen, anymore?\n             */\n            if (resData.action?.type === 'redirect') {\n                return actionHandler.handleAction(resData.action);\n            }\n        })\n        .catch((error: AdyenCheckoutError) => {\n            this.handleError(error);\n        });\n}\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PrepareFingerprint from './components/DeviceFingerprint';\nimport callSubmit3DS2Fingerprint from './callSubmit3DS2Fingerprint';\nimport { existy } from '../../utils/commonUtils';\nimport { TxVariants } from '../tx-variants';\nimport { ThreeDS2DeviceFingerprintConfiguration } from './types';\nimport AdyenCheckoutError, { API_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { ANALYTICS_ERROR_TYPE, Analytics3DS2Errors, ANALYTICS_RENDERED_STR, Analytics3DS2Events } from '../../core/Analytics/constants';\nimport { THREEDS2_FINGERPRINT, THREEDS2_FINGERPRINT_ERROR, THREEDS2_FULL } from './constants';\nimport { ActionHandledReturnObject } from '../../types/global-types';\nimport { AnalyticsLogEvent } from '../../core/Analytics/AnalyticsLogEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\nclass ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerprintConfiguration> {\n    public static type = TxVariants.threeDS2Fingerprint;\n\n    public static defaultProps = {\n        dataKey: 'fingerprintResult',\n        type: THREEDS2_FINGERPRINT\n    };\n\n    private callSubmit3DS2Fingerprint = callSubmit3DS2Fingerprint.bind(this); // New 3DS2 flow\n\n    protected submitAnalytics = (aObj: AnalyticsEvent) => {\n        if (aObj instanceof AnalyticsInfoEvent && aObj.type === ANALYTICS_RENDERED_STR) return; // suppress the rendered event (it will have the same timestamp as the \"threeDSMethodData sent\" event)\n\n        super.submitAnalytics(aObj);\n    };\n\n    protected onActionHandled = (rtnObj: ActionHandledReturnObject) => {\n        const event = new AnalyticsLogEvent({\n            type: THREEDS2_FULL,\n            message: rtnObj.actionDescription,\n            subType: Analytics3DS2Events.FINGERPRINT_IFRAME_LOADED\n        });\n\n        this.submitAnalytics(event);\n\n        super.onActionHandled(rtnObj);\n    };\n\n    onComplete(state) {\n        super.onComplete(state);\n        this.unmount(); // re. fixing issue around back to back fingerprinting calls\n    }\n\n    render() {\n        /**\n         * In the regular components (aka \"native\") flow we can't proceed because something has gone wrong with the payment if paymentData is missing from the threeDS2 action.\n         * In the MDFlow the paymentData is always present (albeit an empty string, which is why we use 'existy' since we should be allowed to proceed with this)\n         */\n        if (!existy(this.props.paymentData)) {\n            this.props.onError(new AdyenCheckoutError(API_ERROR, `No paymentData received. 3DS2 Fingerprint cannot proceed`));\n\n            // TODO - check logs to see if this *ever* happens\n            const event = new AnalyticsErrorEvent({\n                code: Analytics3DS2Errors.ACTION_IS_MISSING_PAYMENT_DATA,\n                errorType: ANALYTICS_ERROR_TYPE.apiError,\n                message: `${THREEDS2_FINGERPRINT_ERROR}: Missing 'paymentData' property from threeDS2 action`\n            });\n\n            this.submitAnalytics(event);\n\n            return null;\n        }\n\n        /**\n         * this.props.isMDFlow indicates the action to create this component came from the 3DS2InMDFlow process and upon completion should call the\n         * passed onComplete callback (as defined in the 3DS2InMDFlow) instead of the /submitThreeDS2Fingerprint endpoint for the regular, \"native\" flow\n         */\n        return (\n            <PrepareFingerprint\n                {...this.props}\n                onComplete={this.props.isMDFlow ? this.onComplete : this.callSubmit3DS2Fingerprint}\n                onSubmitAnalytics={this.submitAnalytics}\n                isMDFlow={this.props.paymentData.length < 15}\n                onActionHandled={this.onActionHandled}\n            />\n        );\n    }\n}\n\nexport default ThreeDS2DeviceFingerprint;\n","import { h, Fragment } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { useState } from 'preact/hooks';\nimport { PaymentAmount } from '../../../types';\n\n// TODO this should ideally be remove but we need let prop propagate down\n//  probably not worth changing this behaviour now\nexport interface RedirectButtonProps {\n    label?: string;\n    icon?: string;\n    payButton: Function;\n    onSubmit: Function;\n    amount?: PaymentAmount;\n    name: string;\n    showPayButton: boolean;\n    ref?: any;\n}\n\nfunction RedirectButton({ label = null, icon = null, payButton, onSubmit, amount = null, name, showPayButton, ...props }: RedirectButtonProps) {\n    const { i18n } = useCoreContext();\n    const [status, setStatus] = useState('ready');\n\n    this.setStatus = newStatus => {\n        setStatus(newStatus);\n    };\n\n    const payButtonLabel = () => {\n        const isZeroAuth = amount && {}.hasOwnProperty.call(amount, 'value') && amount.value === 0;\n        if (isZeroAuth) return `${i18n.get('preauthorizeWith')} ${name}`;\n        return `${i18n.get('continueTo')} ${name}`;\n    };\n\n    if (!showPayButton) {\n        return;\n    }\n\n    return (\n        <Fragment>\n            {payButton({\n                ...props,\n                status,\n                icon,\n                classNameModifiers: ['standalone'],\n                label: label || payButtonLabel(),\n                onClick: onSubmit\n            })}\n        </Fragment>\n    );\n}\n\nexport default RedirectButton;\n","import Select from '../../internal/FormFields/Select';\nimport Field from '../../internal/FormFields/Field';\nimport { h } from 'preact';\nimport { useCallback, useMemo } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { SelectItem } from '../../internal/FormFields/Select/types';\n\nconst SELECTOR_OPTIONS = [\n    { id: 'personal.checking', nameKey: 'ach.bankAccount.option.personal-checking' },\n    { id: 'personal.savings', nameKey: 'ach.bankAccount.option.personal-savings' },\n    { id: 'business.checking', nameKey: 'ach.bankAccount.option.business-checking' },\n    { id: 'business.savings', nameKey: 'ach.bankAccount.option.business-savings' }\n];\n\ninterface AccountTypeSelectorProps {\n    selectedAccountType?: string;\n    onSelect(value: string): void;\n    disabled: boolean;\n    errorMessage?: string;\n    placeholder?: string;\n}\n\nconst AccountTypeSelector = ({ onSelect, selectedAccountType, errorMessage, placeholder, disabled }: AccountTypeSelectorProps) => {\n    const { i18n } = useCoreContext();\n    const options: SelectItem[] = useMemo(\n        () =>\n            SELECTOR_OPTIONS.map(option => ({\n                id: option.id,\n                name: i18n.get(option.nameKey)\n            })),\n        [i18n, SELECTOR_OPTIONS]\n    );\n\n    const onChange = useCallback(\n        event => {\n            const value = event.target.value;\n            onSelect(value);\n        },\n        [onSelect]\n    );\n\n    return (\n        <Field\n            name={'ach-bankaccount-type'}\n            useLabelElement={true}\n            showContextualElement={false}\n            label={i18n.get('ach.bankAccount.label')}\n            errorMessage={errorMessage}\n            classNameModifiers={['selectedAccountType']}\n        >\n            <Select\n                placeholder={placeholder || i18n.get('ach.bankAccount.placeholder')}\n                filterable={false}\n                items={options}\n                selectedValue={selectedAccountType}\n                onChange={onChange}\n                name={'ach-bankaccount-type'}\n                disabled={disabled}\n            />\n        </Field>\n    );\n};\n\nexport { AccountTypeSelector };\n","import { ValidatorRules } from '../../../utils/Validator/types';\nimport { digitsOnlyFormatter } from '../../../utils/Formatters/formatters';\nimport { isEmpty } from '../../../utils/validator-utils';\n\nconst accountNumberRegex = /^\\d{4,17}$/;\nconst routingNumberRegex = /^\\d{9}$/;\n\nexport const achValidationRules: ValidatorRules = {\n    selectedAccountType: {\n        validate: value => (isEmpty(value) ? null : true),\n        errorMessage: 'ach.bankAccount.nothing-selected-error',\n        modes: ['blur']\n    },\n    ownerName: {\n        validate: value => (isEmpty(value) ? null : true),\n        errorMessage: 'ach.accountHolderNameField.invalid',\n        modes: ['blur']\n    },\n    routingNumber: [\n        // Empty field\n        {\n            validate: value => (isEmpty(value) ? null : true),\n            errorMessage: 'ach.loc.947',\n            modes: ['blur']\n        },\n        // Incomplete field\n        {\n            validate: value => {\n                if (isEmpty(value)) return null;\n                return routingNumberRegex.test(value);\n            },\n            errorMessage: 'ach.loc.948',\n            modes: ['blur']\n        }\n    ],\n    accountNumber: [\n        // Empty field\n        {\n            validate: value => (isEmpty(value) ? null : true),\n            errorMessage: 'ach.num.945',\n            modes: ['blur']\n        },\n        // Incomplete field: value is not between 4 and 17 chars\n        {\n            validate: value => {\n                if (isEmpty(value)) return null;\n                return accountNumberRegex.test(value);\n            },\n            errorMessage: 'ach.num.946',\n            modes: ['blur']\n        }\n    ],\n    accountNumberVerification: [\n        {\n            /**\n             * If the account number is empty, then validate that the field has an empty error state.\n             * Otherwise, the other validator will validate if the fields match\n             */\n            validate: (value, context) => {\n                const { accountNumber } = context.state.data;\n                return !accountNumber && isEmpty(value) ? null : true;\n            },\n            errorMessage: 'ach.bankAccountNumberVerification.error.empty',\n            modes: ['blur']\n        },\n        {\n            validate: (value, context) => {\n                if (isEmpty(value)) return null;\n                const { accountNumber } = context.state.data;\n                return accountNumber === value;\n            },\n            errorMessage: 'ach.bankAccountNumberVerification.error.not-match',\n            modes: ['blur']\n        }\n    ]\n};\n\nexport const achFormatters = {\n    routingNumber: digitsOnlyFormatter,\n    accountNumber: digitsOnlyFormatter,\n    accountNumberVerification: digitsOnlyFormatter\n};\n","import { selectOne } from '../components/internal/SecuredFields/lib/utilities/dom';\n\n/**\n * Generic function to set focus on named element\n * @param holder -\n * @param fieldToFocus -\n * @param focusContextSelector - some fields can occur twice in a form but in a different context e.g. as part of a billingAddress or as part of a deliverySddress.\n * This param provides the context so we can select them correctly\n */\nexport const setFocusOnField = (holder, fieldToFocus, focusContextSelector = '') => {\n    const pdHolder = selectOne(document, holder);\n\n    // Identify if we're dealing with a dropdown\n    if (\n        fieldToFocus === 'country' ||\n        fieldToFocus === 'stateOrProvince' ||\n        fieldToFocus === 'issuer-list' ||\n        fieldToFocus === 'selectedAccountType'\n    ) {\n        // Set focus on dropdown\n        const field: HTMLElement = selectOne(\n            pdHolder,\n            `${focusContextSelector}.adyen-checkout__field--${fieldToFocus} .adyen-checkout__filter-input`\n        );\n        field?.focus();\n    } else {\n        // Set focus on input\n        const field: HTMLElement = selectOne(pdHolder, `${focusContextSelector} [name=\"${fieldToFocus}\"]`);\n        field?.focus();\n    }\n};\n","import { h } from 'preact';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport FormInstruction from '../../internal/FormInstruction';\nimport { AccountTypeSelector } from './AccountTypeSelector';\nimport Fieldset from '../../internal/FormFields/Fieldset';\nimport useForm from '../../../utils/useForm';\nimport Field from '../../internal/FormFields/Field';\nimport InputText from '../../internal/FormFields/InputText';\nimport { achValidationRules, achFormatters } from './validate';\nimport StoreDetails from '../../internal/StoreDetails';\n\nimport type { PayButtonProps } from '../../internal/PayButton/PayButton';\nimport type { ComponentMethodsRef } from '../../internal/UIElement/types';\nimport type { AchPlaceholders } from '../types';\nimport type { AchStateErrors } from './useSRPanelForACHErrors';\nimport useSRPanelForAchErrors from './useSRPanelForACHErrors';\n\ntype AchForm = {\n    selectedAccountType: string;\n    ownerName: string;\n    routingNumber: string;\n    accountNumber: string;\n    accountNumberVerification: string;\n};\n\ninterface AchComponentProps {\n    onChange({\n        data,\n        valid,\n        errors,\n        isValid,\n        storePaymentMethod\n    }: {\n        data: AchForm;\n        valid: { [key: string]: boolean };\n        errors: { [key: string]: any };\n        isValid: boolean;\n        storePaymentMethod: boolean;\n    }): void;\n    payButton: (props: Partial<PayButtonProps>) => h.JSX.Element;\n    setComponentRef: (ref: ComponentMethodsRef) => void;\n    hasHolderName: boolean;\n    showPayButton: boolean;\n    enableStoreDetails: boolean;\n    placeholders?: AchPlaceholders;\n}\n\nfunction AchComponent({ onChange, payButton, showPayButton, placeholders, hasHolderName, setComponentRef, enableStoreDetails }: AchComponentProps) {\n    const schema = useMemo(\n        () => ['selectedAccountType', 'routingNumber', 'accountNumber', 'accountNumberVerification', ...(hasHolderName ? ['ownerName'] : [])],\n        [hasHolderName]\n    );\n    const { i18n } = useCoreContext();\n    const [status, setStatus] = useState('ready');\n    const { handleChangeFor, triggerValidation, data, errors, valid, isValid } = useForm<AchForm>({\n        schema,\n        rules: achValidationRules,\n        formatters: achFormatters\n    });\n    const [storePaymentMethod, setStorePaymentMethod] = useState(false);\n    const isFormDisabled = status === 'loading';\n\n    const isValidating = useRef(false);\n\n    const achRef = useRef<ComponentMethodsRef>({\n        setStatus: setStatus,\n        showValidation: () => {\n            isValidating.current = true;\n            triggerValidation();\n        }\n    });\n\n    useEffect(() => {\n        setComponentRef(achRef.current);\n    }, [setComponentRef, achRef.current]);\n\n    useSRPanelForAchErrors({ errors: errors as AchStateErrors, data, isValidating });\n\n    useEffect(() => {\n        onChange({ data, valid, errors, isValid, storePaymentMethod });\n    }, [onChange, data, valid, errors, isValid, storePaymentMethod]);\n\n    /**\n     * If the \"Verify account number\" field has errors, we want to trigger\n     * its validation when there is any change done to the \"Account number\" field\n     */\n    const onAccountNumberInput = useCallback(\n        (event: h.JSX.TargetedInputEvent<HTMLInputElement>) => {\n            handleChangeFor('accountNumber', 'input')(event);\n\n            const hasAccountVerificationError = !!errors.accountNumberVerification;\n            if (hasAccountVerificationError) {\n                triggerValidation(['accountNumberVerification']);\n            }\n        },\n        [handleChangeFor, triggerValidation, data.accountNumberVerification, errors.accountNumberVerification]\n    );\n\n    return (\n        <div className=\"adyen-checkout__ach\">\n            <FormInstruction />\n\n            <Fieldset classNameModifiers={[]} label={i18n.get('ach.bankAccount.title')}>\n                <AccountTypeSelector\n                    placeholder={placeholders?.accountTypeSelector}\n                    onSelect={handleChangeFor('selectedAccountType')}\n                    selectedAccountType={data.selectedAccountType}\n                    disabled={isFormDisabled}\n                    errorMessage={!!errors.selectedAccountType && i18n.get(errors.selectedAccountType.errorMessage)}\n                />\n\n                {hasHolderName && (\n                    <Field\n                        label={i18n.get('ach.accountHolderNameField.title')}\n                        errorMessage={!!errors.ownerName && i18n.get(errors.ownerName.errorMessage)}\n                        isValid={!!valid.ownerName}\n                        name={'ownerName'}\n                    >\n                        <InputText\n                            disabled={isFormDisabled}\n                            name={'ownerName'}\n                            placeholder={placeholders?.ownerName}\n                            value={data.ownerName}\n                            onInput={handleChangeFor('ownerName', 'input')}\n                            onBlur={handleChangeFor('ownerName', 'blur')}\n                            required={true}\n                        />\n                    </Field>\n                )}\n\n                <Field\n                    label={i18n.get('ach.routingNumber.label')}\n                    classNameModifiers={['col-60']}\n                    errorMessage={!!errors.routingNumber && i18n.get(errors.routingNumber.errorMessage)}\n                    name={'routingNumber'}\n                    isValid={!!valid.routingNumber}\n                >\n                    <InputText\n                        disabled={isFormDisabled}\n                        name={'routingNumber'}\n                        placeholder={placeholders?.routingNumber}\n                        value={data.routingNumber}\n                        onInput={handleChangeFor('routingNumber', 'input')}\n                        onBlur={handleChangeFor('routingNumber', 'blur')}\n                        required={true}\n                        maxlength={9}\n                    />\n                </Field>\n\n                <Field\n                    label={i18n.get('ach.bankAccountNumber.label')}\n                    classNameModifiers={['col-40']}\n                    errorMessage={!!errors.accountNumber && i18n.get(errors.accountNumber.errorMessage)}\n                    isValid={!!valid.accountNumber}\n                    name={'accountNumber'}\n                >\n                    <InputText\n                        disabled={isFormDisabled}\n                        name={'accountNumber'}\n                        placeholder={placeholders?.accountNumber}\n                        value={data.accountNumber}\n                        onInput={onAccountNumberInput}\n                        onBlur={handleChangeFor('accountNumber', 'blur')}\n                        required={true}\n                        maxlength={17}\n                    />\n                </Field>\n\n                <Field\n                    label={i18n.get('ach.bankAccountNumberVerification.label')}\n                    errorMessage={!!errors.accountNumberVerification && i18n.get(errors.accountNumberVerification.errorMessage)}\n                    name={'accountNumberVerification'}\n                    isValid={!!valid.accountNumberVerification}\n                >\n                    <InputText\n                        disabled={isFormDisabled}\n                        name={'accountNumberVerification'}\n                        placeholder={placeholders?.accountNumberVerification}\n                        value={data.accountNumberVerification}\n                        onInput={handleChangeFor('accountNumberVerification', 'input')}\n                        onBlur={handleChangeFor('accountNumberVerification', 'blur')}\n                        required={true}\n                        maxlength={17}\n                    />\n                </Field>\n            </Fieldset>\n\n            {enableStoreDetails && <StoreDetails disabled={isFormDisabled} onChange={setStorePaymentMethod} />}\n\n            {showPayButton && payButton({ status, label: i18n.get('confirmPurchase') })}\n        </div>\n    );\n}\n\nexport default AchComponent;\n","import { useEffect, useState, MutableRef } from 'preact/hooks';\nimport { SetSRMessagesReturnObject } from '../../../core/Errors/types';\nimport useSRPanelContext from '../../../core/Errors/useSRPanelContext';\nimport { SetSRMessagesReturnFn } from '../../../core/Errors/SRPanelProvider';\nimport { usePrevious } from '../../../utils/hookUtils';\nimport { ERROR_ACTION_BLUR_SCENARIO, ERROR_ACTION_FOCUS_FIELD } from '../../../core/Errors/constants';\nimport { setFocusOnField } from '../../../utils/setFocus';\nimport { getArrayDifferences } from '../../../utils/arrayUtils';\nimport { ValidationRuleResult } from '../../../utils/Validator/ValidationRuleResult';\n\nexport interface AchStateErrors {\n    selectedAccountType: ValidationRuleResult;\n    ownerName: ValidationRuleResult;\n    routingNumber: ValidationRuleResult;\n    accountNumber: ValidationRuleResult;\n    accountNumberVerification: ValidationRuleResult;\n}\n\ninterface UseSRPanelForErrorsProps {\n    errors: AchStateErrors;\n    data: AchStateData;\n    isValidating: MutableRef<boolean>;\n}\n\ninterface AchStateData {\n    selectedAccountType: string;\n    ownerName: string;\n    routingNumber: string;\n    accountNumber: string;\n    accountNumberVerification: string;\n}\n\nconst useSRPanelForACHErrors = ({ errors, data, isValidating }: UseSRPanelForErrorsProps) => {\n    // Relates to onBlur errors\n    const [sortedErrorList, setSortedErrorList] = useState(null);\n    // Get the previous value (Relates to onBlur errors)\n    const previousSortedErrors = usePrevious(sortedErrorList);\n    const { setSRMessagesFromObjects, setSRMessagesFromStrings, clearSRPanel, shouldMoveFocusSR } = useSRPanelContext();\n    const setSRMessages: SetSRMessagesReturnFn = setSRMessagesFromObjects?.({});\n\n    // Fixed layout for the ACH comp\n    const layout = ['selectedAccountType', 'ownerName', 'routingNumber', 'accountNumber', 'accountNumberVerification'];\n\n    useEffect(() => {\n        try {\n            const srPanelResp: SetSRMessagesReturnObject = setSRMessages?.({ errors, isValidating: isValidating.current, layout });\n\n            // Relates to onBlur errors\n            const currentErrorsSortedByLayout = srPanelResp?.currentErrorsSortedByLayout;\n            // Store the array of sorted error objects separately so that we can use it to make comparisons between the old and new arrays\n            setSortedErrorList(currentErrorsSortedByLayout);\n\n            /**\n             * Need extra actions after setting SRPanel messages in order to focus field (if required) and because we have some errors that are fired onBlur\n             */\n            switch (srPanelResp?.action) {\n                // A call to focus the first field in error will always follow the call to validate the whole form\n                case ERROR_ACTION_FOCUS_FIELD:\n                    // Focus field in error, if required\n                    if (shouldMoveFocusSR) setFocusOnField('.adyen-checkout__ach', srPanelResp.fieldToFocus);\n                    // Remove 'showValidation' mode - allowing time for collation of all the fields in error whilst it is 'showValidation' mode (some errors come in a second render pass)\n                    setTimeout(() => {\n                        isValidating.current = false;\n                    }, 300);\n                    break;\n\n                /**\n                 * Relates to errors triggered by a field blurring (some pm forms have this, some don't) - check if there is an error to either set or to clear\n                 */\n                case ERROR_ACTION_BLUR_SCENARIO: {\n                    const difference = getArrayDifferences(currentErrorsSortedByLayout, previousSortedErrors, 'field');\n\n                    const latestErrorMsg = difference?.[0];\n\n                    if (latestErrorMsg) {\n                        // Is error actually a blur based one - depends on the specific fields in a component as to whether they validate on blur\n                        // In the case of the ACH form currently all the fields validate on blur\n                        const isBlurBasedError = true;\n\n                        // Only add blur based errors to the error panel - doing this step prevents the non-blur based errors from being read out twice\n                        const latestSRError = isBlurBasedError ? latestErrorMsg.errorMessage : null;\n                        setSRMessagesFromStrings(latestSRError);\n                    } else {\n                        // called when previousSortedErrors.length >= currentErrorsSortedByLayout.length\n                        clearSRPanel();\n                    }\n                    break;\n                }\n                default:\n                    break;\n            }\n        } catch (_) {\n            // We don't handle the error related to the sr panel, let it fail silently.\n        }\n    }, [errors, data]);\n};\n\nexport default useSRPanelForACHErrors;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport AchComponent from './components/AchComponent';\nimport defaultProps from './defaultProps';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\n\nimport type { AchConfiguration } from './types';\n\nexport class AchElement extends UIElement<AchConfiguration> {\n    public static type = TxVariants.ach;\n\n    protected static defaultProps = defaultProps;\n\n    public override formatData() {\n        const recurringPayment = !!this.props.storedPaymentMethodId;\n\n        if (recurringPayment) {\n            return {\n                paymentMethod: {\n                    type: AchElement.type,\n                    storedPaymentMethodId: this.props.storedPaymentMethodId\n                }\n            };\n        }\n\n        return {\n            paymentMethod: {\n                type: AchElement.type,\n                ownerName: this.state.data.ownerName,\n                accountHolderType: this.state.data.selectedAccountType?.split('.')[0],\n                bankAccountType: this.state.data.selectedAccountType?.split('.')[1],\n                bankLocationId: this.state.data.routingNumber,\n                bankAccountNumber: this.state.data.accountNumber\n            },\n            ...(this.state.storePaymentMethod && { storePaymentMethod: this.state.storePaymentMethod })\n        };\n    }\n\n    public override get isValid(): boolean {\n        if (this.props.storedPaymentMethodId) {\n            return true;\n        }\n\n        return !!this.state.isValid;\n    }\n\n    public override get displayName(): string {\n        if (this.props.storedPaymentMethodId && this.props.bankAccountNumber) {\n            return `•••• ${this.props.bankAccountNumber.slice(-4)}`;\n        }\n        return this.props.name;\n    }\n\n    public override get additionalInfo(): string {\n        return this.props.storedPaymentMethodId ? this.props.i18n.get('ach.savedBankAccount') : '';\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.storedPaymentMethodId ? (\n                    <RedirectButton\n                        showPayButton={this.props.showPayButton}\n                        name={this.displayName}\n                        amount={this.props.amount}\n                        payButton={this.payButton}\n                        onSubmit={this.submit}\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                    />\n                ) : (\n                    <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                        <AchComponent\n                            onChange={this.setState}\n                            payButton={this.payButton}\n                            showPayButton={this.props.showPayButton}\n                            hasHolderName={this.props.hasHolderName}\n                            placeholders={this.props.placeholders}\n                            setComponentRef={this.setComponentRef}\n                            enableStoreDetails={this.props.enableStoreDetails}\n                        />\n                    </SRPanelProvider>\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default AchElement;\n","import { h } from 'preact';\nimport Field from '../Field';\nimport Checkbox from '../Checkbox';\n\nexport default function ConsentCheckbox({ errorMessage, label, onChange, i18n, ...props }) {\n    return (\n        <Field classNameModifiers={['consentCheckbox']} errorMessage={errorMessage} i18n={i18n} name={'consentCheckbox'} useLabelElement={false}>\n            <Checkbox\n                name={'consentCheckbox'}\n                classNameModifiers={[...(props.classNameModifiers ??= []), 'consentCheckbox']}\n                onInput={onChange}\n                value={props?.data?.consentCheckbox}\n                label={label}\n                checked={props.checked}\n            />\n        </Field>\n    );\n}\n","import { AchConfiguration } from './types';\n\nconst defaultProps: AchConfiguration = {\n    hasHolderName: true\n};\n\nexport default defaultProps;\n","/**\n * Email regex follows https://en.wikipedia.org/wiki/Email_address.\n * It checks that the email address starts with a local part that includes letters, digits, and some special characters, optionally separated by periods.\n * Alternatively, the local part can be enclosed in quotes and include any characters except a new line.\n * This is followed by an `@` symbol and a domain name or an IP address enclosed in square brackets.\n * The domain name consists of one or more words separated by periods, where each word can include letters, digits, and hyphens. The top-level domain must consist of two or more letters.\n */\nexport const email =\n    /^(([a-z0-9!#$%&'*+\\-/=?^_`{|}~]+(\\.[a-z0-9!#$%&'*+\\-/=?^_`{|}~]+)*)|(\".+\"))@((\\[((25[0-5]|(2[0-4]|1\\d|[1-9]|)\\d)\\.?\\b){4}])|([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*\\.([a-z]{2,})))$/i;\n\n/**\n * Telephone number regex\n */\nexport const telephoneNumber = /^[+]*[(]{0,1}[0-9]{1,3}[)]{0,1}[-\\s./0-9]*$/;\n","/**\n * Returns either the date input is supported or not in the current browser\n */\nconst checkDateInputSupport = (): boolean => {\n    const input = document.createElement('input');\n    input.setAttribute('type', 'date');\n    return input.type === 'date';\n};\n\n/**\n * Returns a formatted date\n * @param value -\n * @example\n * formatDate('22111990');\n * // '22/11/1990'\n */\nconst formatDate = (value: string): string => {\n    const date = value\n        .replace(/\\D|\\s/g, '') // Digits only\n        .replace(/^(00)(.*)?/, '01$2') // 00 -> 01\n        .replace(/^(3[2-9])(.*)?/, '0$1$2') // 34 -> 03/04\n        .replace(/^([4-9])(.*)?/, '0$1') // 4 -> 04\n        .replace(/^([0-9]{2})(00)(.*)?/, '$101') // 01/00 -> 01/01\n        .replace(/^(3[01])(02)(.*)?/, '29$2') // Force up to day 29 for Feb\n        .replace(/^([0-9]{2})([2-9]|1[3-9])(.*)?/, '$10$2') // 01/4 -> 01/04\n        .replace(/^([0-9]{2})([0-9]{2})([0-9])/, '$1/$2/$3') // 22111990 -> 22/11/1990\n        .replace(/^([0-9]{2})([0-9])/, '$1/$2'); // 2211 -> 22/11\n\n    const [day = '', month = '', year = ''] = date.split('/');\n\n    // Check leap year\n    if (year.length === 4 && day === '29' && month === '02' && (Number(year) % 4 !== 0 || (year.substr(2, 2) === '00' && Number(year) % 400 !== 0))) {\n        return date.replace(/^29/, '28');\n    }\n\n    return date;\n};\n\n/**\n * Receives a formatted date and returns it as the API expects it\n * @param value -\n * @example\n * unformatDate('22/11/1990');\n * // '1990-11-22'\n */\nconst unformatDate = (value = ''): string => {\n    if (value.indexOf('/') === -1) return value;\n    const [day = '', month = '', year = ''] = value.split('/');\n    if (!day || !month || !year) return null;\n    return `${year}-${month}-${day}`;\n};\n\nexport { checkDateInputSupport, formatDate, unformatDate };\n","import { ValidatorRule } from './types';\nimport { isEmpty } from '../validator-utils';\nimport { ERROR_FIELD_INVALID, ERROR_FIELD_REQUIRED } from '../../core/Errors/constants';\nimport { email, telephoneNumber } from '../regex';\nimport { unformatDate } from '../../components/internal/FormFields/InputDate/utils';\n\nconst isPhoneValid = (value: string, validationRule: ValidatorRule): boolean | null => {\n    if (isEmpty(value)) {\n        validationRule.errorMessage = ERROR_FIELD_REQUIRED;\n        return null;\n    }\n    validationRule.errorMessage = ERROR_FIELD_INVALID;\n    return telephoneNumber.test(value);\n};\n\nconst isEmailValid = (value: string, validationRule: ValidatorRule): boolean | null => {\n    if (isEmpty(value)) {\n        validationRule.errorMessage = ERROR_FIELD_REQUIRED;\n        return null;\n    }\n    validationRule.errorMessage = ERROR_FIELD_INVALID;\n    return value.length >= 6 && value.length <= 320 && email.test(value);\n};\n\nconst isDateOfBirthValid = (value: string, validationRule: ValidatorRule): boolean | null => {\n    if (!value) {\n        validationRule.errorMessage = ERROR_FIELD_REQUIRED;\n        return false;\n    }\n    validationRule.errorMessage = 'dateOfBirth.invalid';\n    const rawValue = unformatDate(value);\n    const ageDiff = Date.now() - Date.parse(rawValue);\n    const age = new Date(ageDiff).getFullYear() - 1970;\n    return age >= 18;\n};\n\nconst phoneNumberRule: ValidatorRule = {\n    validate: value => isPhoneValid(value, phoneNumberRule),\n    modes: ['blur']\n};\n\nconst emailRule: ValidatorRule = {\n    validate: value => isEmailValid(value, emailRule),\n    modes: ['blur']\n};\n\nconst dateOfBirthRule: ValidatorRule = {\n    validate: value => isDateOfBirthValid(value, dateOfBirthRule),\n    modes: ['blur']\n};\n\nexport const validationRules = { phoneNumberRule, emailRule, dateOfBirthRule };\n","import { ValidatorRules } from '../../../utils/Validator/types';\nimport { digitsOnlyFormatter } from '../../../utils/Formatters/formatters';\nimport { validationRules } from '../../../utils/Validator/defaultRules';\n\nconst bankAccountNumberRegEx = /^(\\d){1,8}$/;\nconst bankLocationIdRegEx = /^(\\d){6}$/;\n\nexport const bacsValidationRules: ValidatorRules = {\n    bankAccountNumber: {\n        modes: ['blur', 'input'],\n        validate: value => !!value && bankAccountNumberRegEx.test(value)\n    },\n    bankLocationId: [\n        {\n            modes: ['input'],\n            validate: value => !!value && /^(\\d){1,6}$/.test(value)\n        },\n        {\n            modes: ['blur'],\n            validate: value => !!value && bankLocationIdRegEx.test(value)\n        }\n    ],\n    amountConsentCheckbox: {\n        modes: ['blur'],\n        validate: value => !!value\n    },\n    accountConsentCheckbox: {\n        modes: ['blur'],\n        validate: value => !!value\n    },\n    shopperEmail: validationRules.emailRule,\n    default: {\n        modes: ['blur'],\n        validate: value => !!value && value.length > 0\n    }\n};\n\nexport const bacsFormatters = {\n    bankAccountNumber: digitsOnlyFormatter,\n    bankLocationId: digitsOnlyFormatter\n};\n","import { ERROR_FIELD_INVALID, ERROR_FIELD_REQUIRED } from '../core/Errors/constants';\n\nexport const getErrorMessage = (i18n, error, label?: string): string | boolean => {\n    if (error?.errorMessage) {\n        const errorKey = error.errorMessage;\n        const shouldBuildErrorMessage = [ERROR_FIELD_REQUIRED, ERROR_FIELD_INVALID].includes(errorKey);\n        // Build the error msg: Enter the [label name] or Enter a valid [label name]\n        const options = { values: { label: label?.toLowerCase() ?? '' } };\n        return shouldBuildErrorMessage ? i18n.get(errorKey, options) : i18n.get(errorKey);\n    }\n\n    return !!error;\n};\n","import { h } from 'preact';\nimport { useState, useEffect } from 'preact/hooks';\nimport classNames from 'classnames';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Field from '../../internal/FormFields/Field';\nimport ConsentCheckbox from '../../internal/FormFields/ConsentCheckbox';\nimport { bacsValidationRules, bacsFormatters } from './validate';\nimport { BacsDataState, BacsInputProps } from './types';\nimport './BacsInput.scss';\n\nimport useForm from '../../../utils/useForm';\nimport useImage from '../../../core/Context/useImage';\nimport InputText from '../../internal/FormFields/InputText';\nimport InputEmail from '../../internal/FormFields/InputEmail';\nimport FormInstruction from '../../internal/FormInstruction';\nimport { getErrorMessage } from '../../../utils/getErrorMessage';\nimport { PREFIX } from '../../internal/Icon/constants';\n\nconst ENTER_STATE = 'enter-data';\nconst CONFIRM_STATE = 'confirm-data';\n\nfunction BacsInput(props: BacsInputProps) {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<BacsDataState>({\n        schema: ['holderName', 'bankAccountNumber', 'bankLocationId', 'shopperEmail', 'amountConsentCheckbox', 'accountConsentCheckbox'],\n        defaultData: props.data,\n        formatters: bacsFormatters,\n        rules: bacsValidationRules\n    });\n\n    const [status, setStatus] = useState(ENTER_STATE);\n    this.setStatus = setStatus;\n    this.showValidation = triggerValidation;\n\n    const handlePayButton = () => {\n        if (!isValid) return this.showValidation();\n\n        if (status === ENTER_STATE) {\n            return this.setStatus(CONFIRM_STATE);\n        } else if (status === CONFIRM_STATE) {\n            return props.onSubmit();\n        }\n    };\n\n    const handleEdit = () => {\n        return this.setStatus(ENTER_STATE);\n    };\n\n    useEffect(() => {\n        props.onChange({ data, valid, errors, isValid });\n    }, [data, valid, errors, isValid]);\n\n    return (\n        <div\n            className={classNames({\n                'adyen-checkout__bacs': true,\n                'adyen-checkout__bacs--confirm': status === CONFIRM_STATE || status === 'loading'\n            })}\n        >\n            <FormInstruction />\n\n            {status == CONFIRM_STATE && (\n                <div\n                    className={classNames({\n                        'adyen-checkout__bacs--edit': true,\n                        'adyen-checkout__bacs--edit-dropin': props.isDropin\n                    })}\n                >\n                    <InputText\n                        name={'bacsEdit'}\n                        className={'adyen-checkout__bacs--edit-button'}\n                        value={i18n.get('edit')}\n                        aria-label={i18n.get('edit')}\n                        readonly={true}\n                        onClick={handleEdit}\n                    />\n                </div>\n            )}\n\n            <Field\n                className={classNames({\n                    'adyen-checkout__bacs--holder-name': true,\n                    'adyen-checkout__field--inactive': status === CONFIRM_STATE || status === 'loading'\n                })}\n                label={i18n.get('bacs.accountHolderName')}\n                errorMessage={errors.holderName ? i18n.get('bacs.accountHolderName.invalid') : false}\n                isValid={valid.holderName}\n                name={'accountHolderName'}\n                i18n={i18n}\n            >\n                <InputText\n                    name={'bacs.accountHolderName'}\n                    className={'adyen-checkout__bacs-input--holder-name'}\n                    placeholder={props.placeholders.holderName}\n                    value={data.holderName}\n                    aria-invalid={!valid.holderName}\n                    aria-label={i18n.get('bacs.accountHolderName')}\n                    aria-required={'true'}\n                    required={true}\n                    readonly={status === CONFIRM_STATE || status === 'loading'}\n                    autocorrect={'off'}\n                    onBlur={handleChangeFor('holderName', 'blur')}\n                    onInput={handleChangeFor('holderName', 'input')}\n                />\n            </Field>\n\n            <div className=\"adyen-checkout__bacs__num-id adyen-checkout__field-wrapper\">\n                <Field\n                    errorMessage={!!errors.bankAccountNumber && i18n.get('bacs.accountNumber.invalid')}\n                    label={i18n.get('bacs.accountNumber')}\n                    className={classNames({\n                        'adyen-checkout__bacs--bank-account-number': true,\n                        'adyen-checkout__field--inactive': status === CONFIRM_STATE || status === 'loading'\n                    })}\n                    classNameModifiers={['col-70']}\n                    isValid={valid.bankAccountNumber}\n                    name={'bankAccountNumber'}\n                    i18n={i18n}\n                >\n                    <InputText\n                        value={data.bankAccountNumber}\n                        className={'adyen-checkout__bacs-input--bank-account-number'}\n                        placeholder={props.placeholders.bankAccountNumber}\n                        aria-invalid={!valid.bankAccountNumber}\n                        aria-label={i18n.get('bacs.accountNumber')}\n                        aria-required={'true'}\n                        required={true}\n                        readonly={status === CONFIRM_STATE || status === 'loading'}\n                        autocorrect={'off'}\n                        onBlur={handleChangeFor('bankAccountNumber', 'blur')}\n                        onInput={handleChangeFor('bankAccountNumber', 'input')}\n                    />\n                </Field>\n\n                <Field\n                    errorMessage={!!errors.bankLocationId && i18n.get('bacs.bankLocationId.invalid')}\n                    label={i18n.get('bacs.bankLocationId')}\n                    className={classNames({\n                        'adyen-checkout__bacs--bank-location-id': true,\n                        'adyen-checkout__field--inactive': status === CONFIRM_STATE || status === 'loading'\n                    })}\n                    classNameModifiers={['col-30']}\n                    isValid={valid.bankLocationId}\n                    name={'bankLocationId'}\n                    i18n={i18n}\n                >\n                    <InputText\n                        value={data.bankLocationId}\n                        className={'adyen-checkout__bacs-input--bank-location-id'}\n                        placeholder={props.placeholders.bankLocationId}\n                        aria-invalid={!valid.bankLocationId}\n                        aria-label={i18n.get('bacs.bankLocationId')}\n                        aria-required={'true'}\n                        required={true}\n                        readonly={status === CONFIRM_STATE || status === 'loading'}\n                        autocorrect={'off'}\n                        onBlur={handleChangeFor('bankLocationId', 'blur')}\n                        onInput={handleChangeFor('bankLocationId', 'input')}\n                    />\n                </Field>\n            </div>\n\n            <Field\n                errorMessage={getErrorMessage(i18n, errors.shopperEmail, i18n.get('shopperEmail'))}\n                label={i18n.get('shopperEmail')}\n                className={classNames({\n                    'adyen-checkout__bacs--shopper-email': true,\n                    'adyen-checkout__field--inactive': status === CONFIRM_STATE || status === 'loading'\n                })}\n                isValid={valid.shopperEmail}\n                name={'emailAddress'}\n                i18n={i18n}\n            >\n                <InputEmail\n                    value={data.shopperEmail}\n                    name={'shopperEmail'}\n                    className={'adyen-checkout__bacs-input--shopper-email'}\n                    classNameModifiers={['large']}\n                    placeholder={props.placeholders.shopperEmail}\n                    spellcheck={false}\n                    aria-invalid={!valid.shopperEmail}\n                    aria-label={i18n.get('shopperEmail')}\n                    aria-required={'true'}\n                    required={true}\n                    readonly={status === CONFIRM_STATE || status === 'loading'}\n                    autocorrect={'off'}\n                    onInput={handleChangeFor('shopperEmail', 'input')}\n                    onBlur={handleChangeFor('shopperEmail', 'blur')}\n                />\n            </Field>\n\n            {status === ENTER_STATE && (\n                <ConsentCheckbox\n                    classNameModifiers={['amountConsentCheckbox']}\n                    errorMessage={!!errors.amountConsentCheckbox}\n                    label={i18n.get('bacs.consent.amount')}\n                    onChange={handleChangeFor('amountConsentCheckbox')}\n                    checked={!!data.amountConsentCheckbox}\n                    i18n={i18n}\n                />\n            )}\n\n            {status === ENTER_STATE && (\n                <ConsentCheckbox\n                    classNameModifiers={['accountConsentCheckbox']}\n                    errorMessage={!!errors.accountConsentCheckbox}\n                    label={i18n.get('bacs.consent.account')}\n                    onChange={handleChangeFor('accountConsentCheckbox')}\n                    checked={!!data.accountConsentCheckbox}\n                    i18n={i18n}\n                />\n            )}\n\n            {props.showPayButton &&\n                props.payButton({\n                    status,\n                    label:\n                        status === ENTER_STATE\n                            ? i18n.get('continue')\n                            : `${i18n.get('bacs.confirm')} ${\n                                  !!props.amount?.value && !!props.amount?.currency ? i18n.amount(props.amount.value, props.amount.currency) : ''\n                              }`,\n                    icon: getImage({ imageFolder: 'components/' })(`${PREFIX}lock`),\n                    onClick: handlePayButton\n                })}\n        </div>\n    );\n}\n\nBacsInput.defaultProps = {\n    data: {},\n    placeholders: {}\n};\n\nexport default BacsInput;\n","export function copyToClipboard(value) {\n    function createInput(text): HTMLInputElement {\n        const textArea = document.createElement('textArea');\n        (textArea as HTMLInputElement).readOnly = true;\n        (textArea as HTMLInputElement).value = text;\n        document.body.appendChild(textArea);\n        return textArea as HTMLInputElement;\n    }\n\n    const copyInput = createInput(value);\n\n    copyInput.select();\n\n    document.execCommand('copy');\n\n    document.body.removeChild(copyInput);\n}\n\nexport default copyToClipboard;\n","import { h } from 'preact';\nimport './DetailsTable.scss';\n\nexport interface DetailsTableData\n    extends Array<{\n        label: string;\n        value: string;\n    }> {}\n\nexport interface DetailsTableProps {\n    tableFields: DetailsTableData;\n}\n\nexport default function DetailsTable({ tableFields }: DetailsTableProps) {\n    // For context, this markup uses 2 classes for backwards compatibility\n    // This was originally part of the voucher component and ported out\n    // We can remove the voucher class names at point\n    return (\n        <dl className=\"adyen-checkout__voucher-result__details adyen-checkout__details-table\">\n            {tableFields\n                // first remove empty values\n                .filter(item => !!item)\n                // or objects without label and value\n                .filter(({ label, value }) => !!label && !!value)\n                .map(({ label, value }) => (\n                    <div key={`${label + value}`} className=\"adyen-checkout__voucher-result__details__item adyen-checkout__details-table__item\">\n                        <dt className=\"adyen-checkout__voucher-result__details__label adyen-checkout__details-table__label\">{label}</dt>\n                        <dd className=\"adyen-checkout__voucher-result__details__value adyen-checkout__details-table__value\">{value}</dd>\n                    </div>\n                ))}\n        </dl>\n    );\n}\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport Button from '../Button';\nimport { copyToClipboard } from '../../../utils/clipboard';\n\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './Voucher.scss';\nimport { VoucherProps } from './types';\nimport useImage from '../../../core/Context/useImage';\nimport { PREFIX } from '../Icon/constants';\nimport DetailsTable from '../DetailsTable';\n\nexport default function Voucher({ voucherDetails = [], className = '', ...props }: VoucherProps) {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    props.onActionHandled?.({ componentType: props.paymentMethodType, actionDescription: 'voucher-presented' });\n\n    return (\n        <div className={classNames('adyen-checkout__voucher-result', `adyen-checkout__voucher-result--${props.paymentMethodType}`, className)}>\n            <div className=\"adyen-checkout__voucher-result__top\">\n                <div className=\"adyen-checkout__voucher-result__image\">\n                    {!!props.imageUrl && (\n                        <span className=\"adyen-checkout__voucher-result__image__wrapper\">\n                            <img alt={props.paymentMethodType} className=\"adyen-checkout__voucher-result__image__brand\" src={props.imageUrl} />\n                        </span>\n                    )}\n\n                    {!!props.issuerImageUrl && (\n                        <span className=\"adyen-checkout__voucher-result__image__wrapper\">\n                            <img alt={props.paymentMethodType} className=\"adyen-checkout__voucher-result__image__issuer\" src={props.issuerImageUrl} />\n                        </span>\n                    )}\n                </div>\n\n                <div className=\"adyen-checkout__voucher-result__introduction\">\n                    {props.introduction}{' '}\n                    {props.instructionsUrl && (\n                        <a\n                            className=\"adyen-checkout-link adyen-checkout-link--voucher-result-instructions\"\n                            href={props.instructionsUrl}\n                            target=\"_blank\"\n                            rel=\"noopener noreferrer\"\n                        >\n                            {i18n.get('voucher.readInstructions')} ›\n                        </a>\n                    )}\n                </div>\n\n                {props.amount && (\n                    <div className=\"adyen-checkout__voucher-result__amount\">\n                        {props.amount}\n\n                        {props.surcharge && (\n                            <span className=\"adyen-checkout__voucher-result__surcharge\">\n                                ({i18n.get('voucher.surcharge').replace('%@', props.surcharge)})\n                            </span>\n                        )}\n                    </div>\n                )}\n            </div>\n\n            {props.reference && (\n                <div className=\"adyen-checkout__voucher-result__separator\">\n                    <div className=\"adyen-checkout__voucher-result__separator__inner\" />\n                    <div className=\"adyen-checkout__voucher-result__code__label\">\n                        <span className=\"adyen-checkout__voucher-result__code__label__text\">{i18n.get('voucher.paymentReferenceLabel')}</span>\n                    </div>\n                </div>\n            )}\n\n            <div className=\"adyen-checkout__voucher-result__bottom\">\n                {props.reference && (\n                    <div className=\"adyen-checkout__voucher-result__code\">\n                        {props.barcode && (\n                            <img\n                                alt={i18n.get('voucher.paymentReferenceLabel')}\n                                className=\"adyen-checkout__voucher-result__code__barcode\"\n                                src={props.barcode}\n                            />\n                        )}\n                        <span>{props.reference}</span>\n                    </div>\n                )}\n\n                {(!!props.downloadUrl || !!props.copyBtn) && (\n                    <ul className=\"adyen-checkout__voucher-result__actions\">\n                        {!!props.copyBtn && (\n                            <li className=\"adyen-checkout__voucher-result__actions__item\">\n                                <Button\n                                    inline\n                                    variant=\"action\"\n                                    onClick={(e, { complete }) => {\n                                        copyToClipboard(props.reference);\n                                        complete();\n                                    }}\n                                    icon={getImage({ imageFolder: 'components/' })(`${PREFIX}copy`)}\n                                    label={i18n.get('button.copy')}\n                                />\n                            </li>\n                        )}\n\n                        {!!props.downloadUrl && (\n                            <li className=\"adyen-checkout__voucher-result__actions__item\">\n                                <Button\n                                    inline\n                                    variant=\"action\"\n                                    href={props.downloadUrl}\n                                    icon={getImage({ imageFolder: 'components/' })(`${PREFIX}download`)}\n                                    label={props.downloadButtonText || i18n.get('button.download')}\n                                    target=\"_blank\"\n                                    rel=\"noopener noreferrer\"\n                                />\n                            </li>\n                        )}\n                    </ul>\n                )}\n\n                <DetailsTable tableFields={voucherDetails} />\n            </div>\n        </div>\n    );\n}\n","import { CommonVoucherProps } from './types';\n\nexport const extractCommonPropsForVoucher = ({ props, i18n, introKey, getImage }): CommonVoucherProps => {\n    const { paymentMethodType, onActionHandled, totalAmount, reference } = props;\n\n    return {\n        // occur in all vouchers\n        paymentMethodType,\n        introduction: i18n.get(introKey),\n        imageUrl: getImage(paymentMethodType),\n        onActionHandled,\n        // occurs in 7/8 vouchers\n        ...(totalAmount ? { amount: i18n.amount(totalAmount.value, totalAmount.currency) } : {}),\n        // occurs in 6/8 vouchers\n        ...(reference ? { reference } : {})\n    };\n};\n","import { h } from 'preact';\n\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Voucher from '../../internal/Voucher';\nimport '../../internal/Voucher/Voucher.scss';\nimport './BacsResult.scss';\nimport useImage from '../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../internal/Voucher/utils';\n\nconst BacsResult = props => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    return (\n        <Voucher\n            {...extractCommonPropsForVoucher({ props, i18n, introKey: 'bacs.result.introduction', getImage: getImage() })}\n            downloadUrl={props.url}\n            downloadButtonText={i18n.get('download.pdf')}\n        />\n    );\n};\n\nexport default BacsResult;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport BacsInput from './components/BacsInput';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport BacsResult from './components/BacsResult';\nimport PayButton from '../internal/PayButton';\nimport { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\nimport { BacsElementData } from './types';\n\nclass BacsElement extends UIElement<VoucherConfiguration> {\n    public static type = TxVariants.directdebit_GB;\n\n    formatData(): BacsElementData {\n        return {\n            paymentMethod: {\n                type: BacsElement.type,\n                ...(this.state.data?.holderName && { holderName: this.state.data.holderName }),\n                ...(this.state.data?.bankAccountNumber && { bankAccountNumber: this.state.data.bankAccountNumber }),\n                ...(this.state.data?.bankLocationId && { bankLocationId: this.state.data.bankLocationId })\n            },\n            ...(this.state.data?.shopperEmail && { shopperEmail: this.state.data.shopperEmail })\n        };\n    }\n\n    get isValid(): boolean {\n        return !!this.state.isValid;\n    }\n\n    public payButton = props => {\n        return <PayButton amount={this.props.amount} onClick={this.submit} {...props} />;\n    };\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.url ? (\n                    <BacsResult\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        icon={this.icon}\n                        url={this.props.url}\n                        paymentMethodType={this.props.paymentMethodType}\n                        onActionHandled={this.onActionHandled}\n                        // originalAction={this.props.originalAction}\n                    />\n                ) : (\n                    <BacsInput\n                        // @ts-ignore ref is internal from the Component\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        {...this.props}\n                        onChange={this.setState}\n                        payButton={this.payButton}\n                        onSubmit={this.submit}\n                    />\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default BacsElement;\n","/**\n * @internal\n * IBAN Countries, length, structure and examples\n */\nconst countries = {\n    AD: {\n        length: 24,\n        structure: 'F04F04A12',\n        example: 'AD9912345678901234567890'\n    },\n    AE: {\n        length: 23,\n        structure: 'F03F16',\n        example: 'AE993331234567890123456'\n    },\n    AL: {\n        length: 28,\n        structure: 'F08A16',\n        example: 'AL47212110090000000235698741'\n    },\n    AT: {\n        length: 20,\n        structure: 'F05F11',\n        example: 'AT611904300234573201'\n    },\n    AZ: {\n        length: 28,\n        structure: 'U04A20',\n        example: 'AZ21NABZ00000000137010001944'\n    },\n    BA: {\n        length: 20,\n        structure: 'F03F03F08F02',\n        example: 'BA391290079401028494'\n    },\n    BE: {\n        length: 16,\n        structure: 'F03F07F02',\n        example: 'BE68 5390 0754 7034'\n    },\n    BG: {\n        length: 22,\n        structure: 'U04F04F02A08',\n        example: 'BG80BNBG96611020345678'\n    },\n    BH: {\n        length: 22,\n        structure: 'U04A14',\n        example: 'BH67BMAG00001299123456'\n    },\n    BR: {\n        length: 29,\n        structure: 'F08F05F10U01A01',\n        example: 'BR9700360305000010009795493P1'\n    },\n    CH: {\n        length: 21,\n        structure: 'F05A12',\n        example: 'CH9300762011623852957'\n    },\n    CR: {\n        length: 22,\n        structure: 'F04F14',\n        example: 'CR72012300000171549015'\n    },\n    CY: {\n        length: 28,\n        structure: 'F03F05A16',\n        example: 'CY17002001280000001200527600'\n    },\n    CZ: {\n        length: 24,\n        structure: 'F04F06F10',\n        example: 'CZ6508000000192000145399'\n    },\n    DE: {\n        length: 22,\n        structure: 'F08F10',\n        example: 'DE00123456789012345678'\n    },\n    DK: {\n        length: 18,\n        structure: 'F04F09F01',\n        example: 'DK5000400440116243'\n    },\n    DO: {\n        length: 28,\n        structure: 'U04F20',\n        example: 'DO28BAGR00000001212453611324'\n    },\n    EE: {\n        length: 20,\n        structure: 'F02F02F11F01',\n        example: 'EE382200221020145685'\n    },\n    ES: {\n        length: 24,\n        structure: 'F04F04F01F01F10',\n        example: 'ES9121000418450200051332'\n    },\n    FI: {\n        length: 18,\n        structure: 'F06F07F01',\n        example: 'FI2112345600000785'\n    },\n    FO: {\n        length: 18,\n        structure: 'F04F09F01',\n        example: 'FO6264600001631634'\n    },\n    FR: {\n        length: 27,\n        structure: 'F05F05A11F02',\n        example: 'FR1420041010050500013M02606'\n    },\n    GB: {\n        length: 22,\n        structure: 'U04F06F08',\n        example: 'GB29NWBK60161331926819'\n    },\n    GE: {\n        length: 22,\n        structure: 'U02F16',\n        example: 'GE29NB0000000101904917'\n    },\n    GI: {\n        length: 23,\n        structure: 'U04A15',\n        example: 'GI75NWBK000000007099453'\n    },\n    GL: {\n        length: 18,\n        structure: 'F04F09F01',\n        example: 'GL8964710001000206'\n    },\n    GR: {\n        length: 27,\n        structure: 'F03F04A16',\n        example: 'GR1601101250000000012300695'\n    },\n    GT: {\n        length: 28,\n        structure: 'A04A20',\n        example: 'GT82TRAJ01020000001210029690'\n    },\n    HR: {\n        length: 21,\n        structure: 'F07F10',\n        example: 'HR1210010051863000160'\n    },\n    HU: {\n        length: 28,\n        structure: 'F03F04F01F15F01',\n        example: 'HU42117730161111101800000000'\n    },\n    IE: {\n        length: 22,\n        structure: 'U04F06F08',\n        example: 'IE29AIBK93115212345678'\n    },\n    IL: {\n        length: 23,\n        structure: 'F03F03F13',\n        example: 'IL620108000000099999999'\n    },\n    IS: {\n        length: 26,\n        structure: 'F04F02F06F10',\n        example: 'IS140159260076545510730339'\n    },\n    IT: {\n        length: 27,\n        structure: 'U01F05F05A12',\n        example: 'IT60X0542811101000000123456'\n    },\n    KW: {\n        length: 30,\n        structure: 'U04A22',\n        example: 'KW81CBKU0000000000001234560101'\n    },\n    KZ: {\n        length: 20,\n        structure: 'F03A13',\n        example: 'KZ86125KZT5004100100'\n    },\n    LB: {\n        length: 28,\n        structure: 'F04A20',\n        example: 'LB62099900000001001901229114'\n    },\n    LC: {\n        length: 32,\n        structure: 'U04F24',\n        example: 'LC07HEMM000100010012001200013015'\n    },\n    LI: {\n        length: 21,\n        structure: 'F05A12',\n        example: 'LI21088100002324013AA'\n    },\n    LT: {\n        length: 20,\n        structure: 'F05F11',\n        example: 'LT121000011101001000'\n    },\n    LU: {\n        length: 20,\n        structure: 'F03A13',\n        example: 'LU280019400644750000'\n    },\n    LV: {\n        length: 21,\n        structure: 'U04A13',\n        example: 'LV80BANK0000435195001'\n    },\n    MC: {\n        length: 27,\n        structure: 'F05F05A11F02',\n        example: 'MC5811222000010123456789030'\n    },\n    MD: {\n        length: 24,\n        structure: 'U02A18',\n        example: 'MD24AG000225100013104168'\n    },\n    ME: {\n        length: 22,\n        structure: 'F03F13F02',\n        example: 'ME25505000012345678951'\n    },\n    MK: {\n        length: 19,\n        structure: 'F03A10F02',\n        example: 'MK07250120000058984'\n    },\n    MR: {\n        length: 27,\n        structure: 'F05F05F11F02',\n        example: 'MR1300020001010000123456753'\n    },\n    MT: {\n        length: 31,\n        structure: 'U04F05A18',\n        example: 'MT84MALT011000012345MTLCAST001S'\n    },\n    MU: {\n        length: 30,\n        structure: 'U04F02F02F12F03U03',\n        example: 'MU17BOMM0101101030300200000MUR'\n    },\n    NL: {\n        length: 18,\n        structure: 'U04F10',\n        example: 'NL99BANK0123456789'\n    },\n    NO: {\n        length: 15,\n        structure: 'F04F06F01',\n        example: 'NO9386011117947'\n    },\n    PK: {\n        length: 24,\n        structure: 'U04A16',\n        example: 'PK36SCBL0000001123456702'\n    },\n    PL: {\n        length: 28,\n        structure: 'F08F16',\n        example: 'PL00123456780912345678901234'\n    },\n    PS: {\n        length: 29,\n        structure: 'U04A21',\n        example: 'PS92PALS000000000400123456702'\n    },\n    PT: {\n        length: 25,\n        structure: 'F04F04F11F02',\n        example: 'PT50000201231234567890154'\n    },\n    RO: {\n        length: 24,\n        structure: 'U04A16',\n        example: 'RO49AAAA1B31007593840000'\n    },\n    RS: {\n        length: 22,\n        structure: 'F03F13F02',\n        example: 'RS35260005601001611379'\n    },\n    SA: {\n        length: 24,\n        structure: 'F02A18',\n        example: 'SA0380000000608010167519'\n    },\n    SE: {\n        length: 24,\n        structure: 'F03F16F01',\n        example: 'SE4550000000058398257466'\n    },\n    SI: {\n        length: 19,\n        structure: 'F05F08F02',\n        example: 'SI56263300012039086'\n    },\n    SK: {\n        length: 24,\n        structure: 'F04F06F10',\n        example: 'SK3112000000198742637541'\n    },\n    SM: {\n        length: 27,\n        structure: 'U01F05F05A12',\n        example: 'SM86U0322509800000000270100'\n    },\n    ST: {\n        length: 25,\n        structure: 'F08F11F02',\n        example: 'ST68000100010051845310112'\n    },\n    TL: {\n        length: 23,\n        structure: 'F03F14F02',\n        example: 'TL380080012345678910157'\n    },\n    TN: {\n        length: 24,\n        structure: 'F02F03F13F02',\n        example: 'TN5910006035183598478831'\n    },\n    TR: {\n        length: 26,\n        structure: 'F05F01A16',\n        example: 'TR330006100519786457841326'\n    },\n    VG: {\n        length: 24,\n        structure: 'U04F16',\n        example: 'VG96VPVG0000012345678901'\n    },\n    XK: {\n        length: 20,\n        structure: 'F04F10F02',\n        example: 'XK051212012345678906'\n    },\n    AO: {\n        length: 25,\n        structure: 'F21',\n        example: 'AO69123456789012345678901'\n    },\n    BF: {\n        length: 27,\n        structure: 'F23',\n        example: 'BF2312345678901234567890123'\n    },\n    BI: {\n        length: 16,\n        structure: 'F12',\n        example: 'BI41123456789012'\n    },\n    BJ: {\n        length: 28,\n        structure: 'F24',\n        example: 'BJ39123456789012345678901234'\n    },\n    CI: {\n        length: 28,\n        structure: 'U01F23',\n        example: 'CI17A12345678901234567890123'\n    },\n    CM: {\n        length: 27,\n        structure: 'F23',\n        example: 'CM9012345678901234567890123'\n    },\n    CV: {\n        length: 25,\n        structure: 'F21',\n        example: 'CV30123456789012345678901'\n    },\n    DZ: {\n        length: 24,\n        structure: 'F20',\n        example: 'DZ8612345678901234567890'\n    },\n    IR: {\n        length: 26,\n        structure: 'F22',\n        example: 'IR861234568790123456789012'\n    },\n    JO: {\n        length: 30,\n        structure: 'A04F22',\n        example: 'JO15AAAA1234567890123456789012'\n    },\n    MG: {\n        length: 27,\n        structure: 'F23',\n        example: 'MG1812345678901234567890123'\n    },\n    ML: {\n        length: 28,\n        structure: 'U01F23',\n        example: 'ML15A12345678901234567890123'\n    },\n    MZ: {\n        length: 25,\n        structure: 'F21',\n        example: 'MZ25123456789012345678901'\n    },\n    QA: {\n        length: 29,\n        structure: 'U04A21',\n        example: 'QA30AAAA123456789012345678901'\n    },\n    SN: {\n        length: 28,\n        structure: 'U01F23',\n        example: 'SN52A12345678901234567890123'\n    },\n    UA: {\n        length: 29,\n        structure: 'F25',\n        example: 'UA511234567890123456789012345'\n    }\n};\n\nexport default countries;\n","import countries from './specifications';\n\n/**\n * Parse the BBAN structure used to configure each IBAN __specification and returns a matching regular expression.\n * A structure is composed of blocks of 3 characters (one letter and 2 digits). Each block represents\n * a logical group in the typical representation of the BBAN. For each group, the letter indicates which characters\n * are allowed in this group and the following 2-digits number tells the length of the group.\n *\n * @param structure - the structure to parse\n * @param countryCode - the countryCode to check format against\n *\n * @internal\n */\nexport const parseStructure = (structure, countryCode) => {\n    if (countryCode === null || !countries[countryCode] || !countries[countryCode].structure) {\n        return false;\n    }\n\n    const passedStructure = countries[countryCode].structure;\n\n    // split in blocks of 3 chars\n    const regex = passedStructure.match(/(.{3})/g).map(block => {\n        // parse each structure block (1-char + 2-digits)\n        const pattern = block.slice(0, 1);\n        const repeats = parseInt(block.slice(1), 10);\n        let format;\n\n        switch (pattern) {\n            case 'A':\n                format = '0-9A-Za-z';\n                break;\n            case 'B':\n                format = '0-9A-Z';\n                break;\n            case 'C':\n                format = 'A-Za-z';\n                break;\n            case 'F':\n                format = '0-9';\n                break;\n            case 'L':\n                format = 'a-z';\n                break;\n            case 'U':\n                format = 'A-Z';\n                break;\n            case 'W':\n                format = '0-9a-z';\n                break;\n            default:\n                break;\n        }\n\n        return `([${format}]{${repeats}})`;\n    });\n\n    return new RegExp(`^${regex.join('')}$`);\n};\n\n/**\n * @internal\n */\nexport const formatIban = iban =>\n    iban\n        .replace(/\\W/gi, '')\n        .replace(/(.{4})(?!$)/g, '$1 ')\n        .trim();\n\nexport type ElectronicFormat = string;\n/**\n * Returns any non alphanumeric characters and uppercases them\n *\n * @internal\n */\nexport const electronicFormat = (iban: string): ElectronicFormat => {\n    const NON_ALPHANUM = /[^a-zA-Z0-9]/g;\n    return iban.replace(NON_ALPHANUM, '').toUpperCase();\n};\n\n/**\n * Lazy-loaded regex (parse the structure and construct the regular expression the first time we need it for validation)\n *\n * @internal\n */\nexport const regex = (iban, countryCode) => parseStructure(iban, countryCode);\n\n/**\n * Prepare an IBAN for mod 97 computation by moving the first 4 chars to the end and transforming the letters to\n * numbers (A = 10, B = 11, ..., Z = 35), as specified in ISO13616.\n * @param ibanInput - The IBAN value\n * @returns The prepared IBAN\n *\n * @internal\n */\nexport const iso13616Prepare = ibanInput => {\n    let iban = ibanInput;\n    const A = 'A'.charCodeAt(0);\n    const Z = 'Z'.charCodeAt(0);\n    iban = iban.toUpperCase();\n    iban = iban.substr(4) + iban.substr(0, 4);\n\n    return iban\n        .split('')\n        .map(n => {\n            const code = n.charCodeAt(0);\n\n            if (code >= A && code <= Z) {\n                // A = 10, B = 11, ... Z = 35\n                const codeA = code - A;\n                return codeA + 10;\n            }\n\n            return n;\n        })\n        .join('');\n};\n\n/**\n * Calculates the MOD 97 10 of the passed IBAN as specified in ISO7064.\n *\n * @param iban -\n *\n * @internal\n */\nexport const iso7064Mod97_10 = iban => {\n    let remainder = iban;\n    let block;\n\n    while (remainder.length > 2) {\n        block = remainder.slice(0, 9);\n        remainder = (parseInt(block, 10) % 97) + remainder.slice(block.length);\n    }\n\n    return parseInt(remainder, 10) % 97;\n};\n\n/**\n *  @param countryCode -\n *  @returns Example of IBAN Number\n */\nexport const getIbanPlaceHolder = (countryCode = null) => {\n    if (countryCode && countries[countryCode] && countries[countryCode].example) {\n        return formatIban(countries[countryCode].example);\n    }\n\n    return 'AB00 1234 5678 9012 3456 7890';\n};\n\nexport const getIbanCountrySpecification = countryCode => {\n    if (countryCode && countries[countryCode]) {\n        return countries[countryCode];\n    }\n\n    return false;\n};\n\n/**\n *  @param cursor -\n *  @param iban -\n *  @param previousIban -\n *  @returns new cursor position\n */\nexport const getNextCursorPosition = (cursor, iban, previousIban) => {\n    if (cursor === 0 || !iban.length) return 0;\n\n    // This tells us how long the edit is. If user modified input from `(2__)` to `(243__)`,\n    // we know the user in this instance pasted two characters\n    const editLength = iban.length - previousIban.length;\n    const isAddition = editLength > 0;\n    const isMaskChar = (ibanValue, position) => /\\s/.test(ibanValue.charAt(position));\n    const initialCursor = cursor - editLength;\n\n    // is adding text, check calculate if there was a mask element after the initial cursor, then move cursor forward\n    // example: NL13 ABNA| 1234 5678 9 => NL13 ABNA 0|123 4567 89\n    if (isAddition && (isMaskChar(iban, initialCursor + 1) || isMaskChar(iban, initialCursor))) {\n        return cursor + 1;\n    }\n\n    // is removing text, check if the previous is a mask character, then move cursor back\n    // example: NL13 ABNA 0|123 4567 89 => NL13 ABNA| 1234 5678 9\n    if (!isAddition && isMaskChar(iban, cursor - 1)) {\n        return cursor - 1;\n    }\n\n    return cursor;\n};\n\n/**\n * @param electronicFormatIban -\n * @returns countryCode string\n */\nexport const getCountryCode = (electronicFormatIban: ElectronicFormat) => electronicFormatIban.slice(0, 2);\n","import { iso13616Prepare, iso7064Mod97_10, electronicFormat, regex, getIbanCountrySpecification, getCountryCode } from './utils';\nimport { isEmpty } from '../../../utils/validator-utils';\n\n/**\n * Contains a validation status\n * @internal\n * @param status -\n * @param code -\n */\nfunction ValidationStatus(status, code = null) {\n    this.status = status;\n    this.code = code;\n}\n\n/**\n * Validates the format of an iban\n * @internal\n * @param iban -\n */\nconst checkIbanStructure = iban => {\n    const countryCode = iban.slice(0, 2);\n    const ibanRegex = regex(iban, countryCode);\n\n    return ((ibanRegex as RegExp).test && (ibanRegex as RegExp).test(iban.slice(4))) || false;\n};\n\n/**\n * Checks validity of an IBAN\n * @param iban -\n */\nexport const isValidIBAN = iban => {\n    const electronicFormatIban = electronicFormat(iban);\n    const preparedIban = iso13616Prepare(electronicFormatIban);\n    const isValidISO = iso7064Mod97_10(preparedIban) === 1;\n\n    return isValidISO && checkIbanStructure(electronicFormatIban);\n};\n\n/**\n * Checkss the validity status of an IBAN\n * @param iban -\n */\nexport const checkIbanStatus = iban => {\n    const electronicFormatIban = electronicFormat(iban);\n\n    if (iban.length < 2) {\n        return new ValidationStatus('no-validate', 'TOO_SHORT'); // A\n    }\n\n    const countryCode = getCountryCode(electronicFormatIban);\n    const countrySpecification = getIbanCountrySpecification(countryCode);\n\n    if (!countrySpecification) {\n        return new ValidationStatus('invalid', 'INVALID_COUNTRY'); // AA13TEST0123456789\n    }\n\n    if (electronicFormatIban.length > countrySpecification.length) {\n        return new ValidationStatus('invalid', 'TOO_LONG'); // NL13TEST01234567891\n    }\n\n    if (electronicFormatIban.length === countrySpecification.length) {\n        if (isValidIBAN(iban)) {\n            return new ValidationStatus('valid', 'VALID'); // NL13TEST0123456789\n        }\n\n        return new ValidationStatus('invalid', 'INVALID_IBAN'); // NL13TEST0123456781\n    }\n\n    return new ValidationStatus('no-validate', 'UNKNOWN'); // NL13TEST012345678\n};\n\n/**\n * Checks validity of a holder name\n */\nexport const isValidHolder = value => (isEmpty(value) ? null : true); // true, if there are chars other than spaces\n","import { Component, h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Field from '../FormFields/Field';\nimport { checkIbanStatus, isValidHolder } from './validate';\nimport { electronicFormat, formatIban, getCountryCode, getNextCursorPosition } from './utils';\nimport Fieldset from '../FormFields/Fieldset';\nimport { GenericError } from '../../../core/Errors/types';\nimport InputText from '../FormFields/InputText';\n\ninterface IbanInputProps {\n    holderName?: boolean;\n    placeholders?: Omit<IbanData, 'countryCode'>;\n    countryCode?: string;\n    showPayButton?: boolean;\n    payButton?: any;\n    onChange: (data) => void;\n    label: string;\n    data: IbanData;\n}\n\ninterface IbanData {\n    ownerName?: string;\n    ibanNumber?: string;\n    countryCode?: string;\n}\n\ninterface IbanInputState {\n    data: any;\n    errors: any;\n    valid: any;\n    status: string;\n    isValid: boolean;\n    cursor: number;\n}\n\nconst ibanHolderNameErrorObj: GenericError = {\n    isValid: false,\n    errorMessage: 'ach.accountHolderNameField.invalid', // TODO create bespoke translation key\n    error: 'ach.accountHolderNameField.invalid'\n};\n\nconst ibanErrorObj: GenericError = {\n    isValid: false,\n    errorMessage: 'sepaDirectDebit.ibanField.invalid',\n    error: 'sepaDirectDebit.ibanField.invalid'\n};\n\nclass IbanInput extends Component<IbanInputProps, IbanInputState> {\n    private ibanNumber: HTMLInputElement;\n\n    constructor(props) {\n        super(props);\n\n        this.state = {\n            status: 'ready',\n            data: {\n                ownerName: props?.data?.ownerName || '',\n                ibanNumber: props?.data?.ibanNumber || '',\n                countryCode: props?.data?.countryCode || ''\n            },\n            isValid: false,\n            cursor: 0,\n            errors: {},\n            valid: {}\n        };\n\n        if (this.state.data['ibanNumber']) {\n            const electronicFormatIban = electronicFormat(this.state.data['ibanNumber']); // example: NL13TEST0123456789\n            this.state.data['ibanNumber'] = formatIban(electronicFormatIban); // example: NL13 TEST 0123 4567 89\n        }\n\n        if (this.state.data['ibanNumber'] || this.state.data['ownerName']) {\n            const holderNameValid = this.props.holderName ? isValidHolder(this.state.data['ownerName']) : '';\n            const ibanValid = this.state.data['ibanNumber'] ? checkIbanStatus(this.state.data['ibanNumber']).status === 'valid' : '';\n            const isValid = ibanValid && holderNameValid;\n            const data = { data: this.state.data, isValid };\n\n            this.props.onChange(data);\n        }\n    }\n\n    public static defaultProps = {\n        onChange: () => {},\n        countryCode: null,\n        holderName: true,\n        placeholders: {},\n        label: null\n    };\n\n    setStatus(status) {\n        this.setState({ status });\n    }\n\n    onChange() {\n        const holderNameValid = this.props.holderName ? isValidHolder(this.state.data['ownerName']) : true;\n        const ibanValid = checkIbanStatus(this.state.data['ibanNumber']).status === 'valid';\n        const isValid = ibanValid && holderNameValid;\n        const data = { data: this.state.data, isValid, errors: this.state.errors };\n\n        this.props.onChange(data);\n    }\n\n    public setData = (key, value, cb?) => {\n        this.setState(prevState => ({ data: { ...prevState.data, [key]: value } }), cb);\n    };\n\n    public setError = (key, value, cb?) => {\n        this.setState(prevState => ({ errors: { ...prevState.errors, [key]: value } }), cb);\n    };\n\n    public setValid = (key, value, cb?) => {\n        this.setState(prevState => ({ valid: { ...prevState.valid, [key]: value } }), cb);\n    };\n\n    public handleHolderInput = holder => {\n        this.setState(\n            prevState => ({ data: { ...prevState.data, ownerName: holder } }),\n            () => {\n                const holderStatus = isValidHolder(this.state.data['ownerName']);\n                const holderErr =\n                    holderStatus != null && !holderStatus // *don't* consider null, i.e. a value that has just been deleted, to be in error\n                        ? ibanHolderNameErrorObj\n                        : null;\n\n                this.setError('holder', holderErr, this.onChange);\n            }\n        );\n    };\n\n    public handleIbanInput = e => {\n        const inputValue = e.target.value;\n        const electronicFormatIban = electronicFormat(inputValue); // example: NL13TEST0123456789\n        const iban = formatIban(electronicFormatIban); // example: NL13 TEST 0123 4567 89\n        const validationStatus = checkIbanStatus(iban).status;\n\n        const countryCode = getCountryCode(electronicFormatIban);\n\n        // calculate cursor's new position\n        const cursor = e.target.selectionStart;\n        const previousIban = this.state.data['ibanNumber'];\n        const newCursorPosition = getNextCursorPosition(cursor, iban, previousIban);\n\n        this.setState(\n            prevState => ({\n                data: { ...prevState.data, ibanNumber: iban, countryCode: countryCode },\n                errors: {\n                    ...prevState.errors,\n                    iban: validationStatus === 'invalid' ? ibanErrorObj : null\n                },\n                valid: { ...prevState.valid, iban: validationStatus === 'valid' }\n            }),\n            () => {\n                e.target.setSelectionRange(newCursorPosition, newCursorPosition);\n                this.onChange();\n            }\n        );\n    };\n\n    public handleIbanBlur = e => {\n        const currentIban = e.target.value;\n\n        if (currentIban.length > 0) {\n            const validationStatus = checkIbanStatus(currentIban).status;\n            this.setError('iban', validationStatus !== 'valid' ? ibanErrorObj : null, this.onChange);\n        } else {\n            // Empty field is not in error\n            this.setError('iban', null, this.onChange);\n        }\n    };\n\n    showValidation() {\n        const validationStatus = checkIbanStatus(this.state.data['ibanNumber']).status;\n        const holderStatus = isValidHolder(this.state.data['ownerName']);\n        this.setError('iban', validationStatus !== 'valid' ? ibanErrorObj : null);\n\n        const holderErr = !holderStatus // *do* consider null, i.e. an empty field, to be in error\n            ? ibanHolderNameErrorObj\n            : null;\n\n        this.setError('holder', holderErr, this.onChange); // add callback param to force propagation of state to parent comp\n    }\n\n    render({ placeholders }: IbanInputProps, { data, errors, valid }) {\n        const { i18n } = useCoreContext();\n        return (\n            <Fieldset classNameModifiers={['iban-input']} label={this.props.label}>\n                {this.props.holderName && (\n                    <Field\n                        className={'adyen-checkout__field--owner-name'}\n                        label={i18n.get('sepa.ownerName')}\n                        filled={data['ownerName'] && data['ownerName'].length}\n                        errorMessage={errors.holder ? i18n.get(errors.holder.error) : false}\n                        dir={'ltr'}\n                        i18n={i18n}\n                        name={'ownerName'}\n                    >\n                        <InputText\n                            name={'ownerName'}\n                            className={'adyen-checkout__iban-input__owner-name'}\n                            placeholder={placeholders?.ownerName}\n                            value={data['ownerName']}\n                            aria-invalid={!!this.state.errors.holder}\n                            aria-label={i18n.get('sepa.ownerName')}\n                            onInput={e => this.handleHolderInput((e.target as HTMLInputElement).value)}\n                            onBlur={e => this.handleHolderInput((e.target as HTMLInputElement).value)}\n                        />\n                    </Field>\n                )}\n\n                <Field\n                    className={'adyen-checkout__field--iban-number'}\n                    label={i18n.get('sepa.ibanNumber')}\n                    errorMessage={errors.iban ? i18n.get(errors.iban.error) : false}\n                    filled={data['ibanNumber'] && data['ibanNumber'].length}\n                    isValid={valid.iban}\n                    onBlur={this.handleIbanBlur}\n                    dir={'ltr'}\n                    i18n={i18n}\n                    name={'ibanNumber'}\n                >\n                    <InputText\n                        setRef={ref => {\n                            this.ibanNumber = ref;\n                        }}\n                        name={'ibanNumber'}\n                        className={'adyen-checkout__iban-input__iban-number'}\n                        classNameModifiers={['large']}\n                        placeholder={placeholders?.ibanNumber}\n                        value={data['ibanNumber']}\n                        onInput={this.handleIbanInput}\n                        aria-invalid={!!this.state.errors.iban}\n                        aria-label={i18n.get('sepa.ibanNumber')}\n                        autocorrect={'off'}\n                        spellcheck={false}\n                    />\n                </Field>\n\n                {this.props.showPayButton && this.props.payButton({ status: this.state.status })}\n            </Fieldset>\n        );\n    }\n}\n\nexport default IbanInput;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport IbanInput from '../internal/IbanInput';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { SepaElementData, SepaConfiguration } from './types';\nimport { TxVariants } from '../tx-variants';\nimport FormInstruction from '../internal/FormInstruction';\nimport type { ICore } from '../../core/types';\n\nclass SepaElement extends UIElement<SepaConfiguration> {\n    public static type = TxVariants.sepadirectdebit;\n\n    constructor(checkout: ICore, props?: SepaConfiguration) {\n        super(checkout, props);\n        this.state = { ...this.state, ...{ data: { ibanNumber: '', ownerName: '' } } };\n    }\n\n    /**\n     * Formats props on construction time\n     */\n    formatProps(props) {\n        return {\n            holderName: true,\n            ...props\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData(): SepaElementData {\n        return {\n            paymentMethod: {\n                type: SepaElement.type,\n                iban: this.state.data['ibanNumber'],\n                ownerName: this.state.data['ownerName']\n            }\n        };\n    }\n\n    /**\n     * Returns whether the component state is valid or not\n     */\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <FormInstruction />\n\n                {/* @ts-ignore TODO: add props */}\n                <IbanInput\n                    ref={ref => {\n                        this.componentRef = ref;\n                    }}\n                    {...this.props}\n                    onChange={this.setState}\n                    // onSubmit={this.submit}\n                    payButton={this.payButton}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default SepaElement;\n","import { ValidatorRules } from '../../../utils/Validator/types';\nimport { digitsOnlyFormatter } from '../../../utils/Formatters/formatters';\nimport { isEmpty } from '../../../utils/validator-utils';\n\nconst bankAccountNumberRegex = /^\\d{7,12}$/;\nconst bankCodeRegex = /^\\d{3}$/;\nconst bankLocationIdRegex = /^\\d{5}$/;\n\nexport const preAuthorizedDebitCanadaValidationRules: ValidatorRules = {\n    ownerName: {\n        validate: value => (isEmpty(value) ? null : true),\n        errorMessage: 'eftpad-canada.input.accountHolderName.error',\n        modes: ['blur']\n    },\n    bankAccountNumber: {\n        validate: value => (isEmpty(value) ? null : bankAccountNumberRegex.test(value)),\n        errorMessage: 'eftpad-canada.input.accountNumber.error',\n        modes: ['blur']\n    },\n    bankCode: {\n        validate: value => (isEmpty(value) ? null : bankCodeRegex.test(value)),\n        errorMessage: 'eftpad-canada.input.institutionNumber.error',\n        modes: ['blur']\n    },\n    bankLocationId: {\n        validate: value => (isEmpty(value) ? null : bankLocationIdRegex.test(value)),\n        errorMessage: 'eftpad-canada.input.transitNumber.error',\n        modes: ['blur']\n    }\n};\n\nexport const preAuthorizedDebitCanadaFormatters = {\n    bankAccountNumber: digitsOnlyFormatter,\n    bankCode: digitsOnlyFormatter,\n    bankLocationId: digitsOnlyFormatter\n};\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport useImage from '../../../core/Context/useImage';\nimport Img from '../../internal/Img';\n\nexport const SettlementInfo = () => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    return (\n        <div className=\"adyen-checkout__eftpad-canada-info\">\n            <Img height=\"18\" width=\"18\" src={getImage({ imageFolder: 'components/' })('info_black')} alt=\"\" ariaHidden={true} />\n            <div>{i18n.get('eftpad-canada.settlement-info')}</div>\n        </div>\n    );\n};\n","import { h } from 'preact';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Fieldset from '../../internal/FormFields/Fieldset';\nimport FormInstruction from '../../internal/FormInstruction';\nimport useForm from '../../../utils/useForm';\nimport Field from '../../internal/FormFields/Field';\nimport InputText from '../../internal/FormFields/InputText';\nimport { preAuthorizedDebitCanadaFormatters, preAuthorizedDebitCanadaValidationRules } from './validate';\nimport StoreDetails from '../../internal/StoreDetails';\nimport useImage from '../../../core/Context/useImage';\nimport { SettlementInfo } from './SettlementInfo';\n\nimport type { PayButtonProps } from '../../internal/PayButton/PayButton';\nimport type { ComponentMethodsRef } from '../../internal/UIElement/types';\nimport type { PreAuthorizedDebitCanadaPlaceholders } from '../types';\n\nimport './PreAuthorizedDebitCanada.scss';\n\ninterface PreAuthorizedDebitCanadaForm {\n    ownerName: string;\n    bankAccountNumber: string;\n    bankCode: string;\n    bankLocationId: string;\n}\n\ninterface PreAuthorizedDebitCanadaComponentProps {\n    onChange({\n        data,\n        valid,\n        errors,\n        isValid,\n        storePaymentMethod\n    }: {\n        data: PreAuthorizedDebitCanadaForm;\n        valid: { [key: string]: boolean };\n        errors: { [key: string]: any };\n        isValid: boolean;\n        storePaymentMethod: boolean;\n    }): void;\n    payButton: (props: Partial<PayButtonProps>) => h.JSX.Element;\n    setComponentRef: (ref: ComponentMethodsRef) => void;\n    showPayButton: boolean;\n    enableStoreDetails: boolean;\n    showContextualElement?: boolean;\n    placeholders?: PreAuthorizedDebitCanadaPlaceholders;\n}\n\nfunction PreAuthorizedDebitCanadaComponent({\n    onChange,\n    payButton,\n    showPayButton,\n    placeholders,\n    setComponentRef,\n    enableStoreDetails,\n    showContextualElement = true\n}: Readonly<PreAuthorizedDebitCanadaComponentProps>) {\n    const getImage = useImage();\n    const { i18n } = useCoreContext();\n    const [status, setStatus] = useState('ready');\n    const { handleChangeFor, triggerValidation, data, errors, valid, isValid } = useForm<PreAuthorizedDebitCanadaForm>({\n        schema: ['ownerName', 'bankAccountNumber', 'bankCode', 'bankLocationId'],\n        rules: preAuthorizedDebitCanadaValidationRules,\n        formatters: preAuthorizedDebitCanadaFormatters\n    });\n    const [storePaymentMethod, setStorePaymentMethod] = useState(false);\n\n    const isFormDisabled = status === 'loading';\n\n    const componentRef = useRef<ComponentMethodsRef>({\n        setStatus: setStatus,\n        showValidation: () => {\n            triggerValidation();\n        }\n    });\n\n    useEffect(() => {\n        setComponentRef(componentRef.current);\n    }, [setComponentRef, componentRef.current]);\n\n    useEffect(() => {\n        onChange({ data, valid, errors, isValid, storePaymentMethod });\n    }, [onChange, data, valid, errors, isValid, storePaymentMethod]);\n\n    return (\n        <div className=\"adyen-checkout__eftpad-canada\">\n            <FormInstruction />\n\n            <Fieldset>\n                <Field\n                    label={i18n.get('eftpad-canada.input.accountHolderName.label')}\n                    errorMessage={!!errors.ownerName && i18n.get(errors.ownerName.errorMessage)}\n                    isValid={!!valid.ownerName}\n                    name={'ownerName'}\n                >\n                    <InputText\n                        disabled={isFormDisabled}\n                        name={'ownerName'}\n                        placeholder={placeholders?.ownerName}\n                        value={data.ownerName}\n                        onInput={handleChangeFor('ownerName', 'input')}\n                        onBlur={handleChangeFor('ownerName', 'blur')}\n                        required={true}\n                        data-testid={'owner-name'}\n                    />\n                </Field>\n\n                <Field\n                    label={i18n.get('eftpad-canada.input.accountNumber.label')}\n                    errorMessage={!!errors.bankAccountNumber && i18n.get(errors.bankAccountNumber.errorMessage)}\n                    name={'bankAccountNumber'}\n                    isValid={!!valid.bankAccountNumber}\n                    showContextualElement={showContextualElement}\n                    contextualText={i18n.get('eftpad-canada.input.accountNumber.contextualText')}\n                >\n                    <InputText\n                        disabled={isFormDisabled}\n                        name={'bankAccountNumber'}\n                        placeholder={placeholders?.bankAccountNumber}\n                        value={data.bankAccountNumber}\n                        onInput={handleChangeFor('bankAccountNumber', 'input')}\n                        onBlur={handleChangeFor('bankAccountNumber', 'blur')}\n                        required={true}\n                        maxlength={12}\n                    />\n                </Field>\n\n                <Field\n                    label={i18n.get('eftpad-canada.input.institutionNumber.label')}\n                    classNameModifiers={['col-50']}\n                    errorMessage={!!errors.bankCode && i18n.get(errors.bankCode.errorMessage)}\n                    isValid={!!valid.bankCode}\n                    name={'bankCode'}\n                    showContextualElement={showContextualElement}\n                    contextualText={i18n.get('eftpad-canada.input.institutionNumber.contextualText')}\n                >\n                    <InputText\n                        disabled={isFormDisabled}\n                        name={'bankCode'}\n                        placeholder={placeholders?.bankCode}\n                        value={data.bankCode}\n                        onInput={handleChangeFor('bankCode', 'input')}\n                        onBlur={handleChangeFor('bankCode', 'blur')}\n                        required={true}\n                        maxlength={3}\n                    />\n                </Field>\n\n                <Field\n                    label={i18n.get('eftpad-canada.input.transitNumber.label')}\n                    classNameModifiers={['col-50']}\n                    errorMessage={!!errors.bankLocationId && i18n.get(errors.bankLocationId.errorMessage)}\n                    name={'bankLocationId'}\n                    isValid={!!valid.bankLocationId}\n                    showContextualElement={showContextualElement}\n                    contextualText={i18n.get('eftpad-canada.input.transitNumber.contextualText')}\n                >\n                    <InputText\n                        disabled={isFormDisabled}\n                        name={'bankLocationId'}\n                        placeholder={placeholders?.bankLocationId}\n                        value={data.bankLocationId}\n                        onInput={handleChangeFor('bankLocationId', 'input')}\n                        onBlur={handleChangeFor('bankLocationId', 'blur')}\n                        required={true}\n                        maxlength={5}\n                    />\n                </Field>\n            </Fieldset>\n\n            {enableStoreDetails && (\n                <StoreDetails className={'adyen-checkout_eftpad-canada-store-details'} disabled={isFormDisabled} onChange={setStorePaymentMethod} />\n            )}\n\n            <SettlementInfo />\n\n            {showPayButton && payButton({ status, icon: getImage({ imageFolder: 'components/' })('bento_lock') })}\n        </div>\n    );\n}\n\nexport default PreAuthorizedDebitCanadaComponent;\n","import { h, Fragment } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { TxVariants } from '../tx-variants';\nimport PreAuthorizedDebitCanadaComponent from './components/PreAuthorizedDebitCanadaComponent';\nimport { SettlementInfo } from './components/SettlementInfo';\nimport RedirectButton from '../internal/RedirectButton';\nimport { payAmountLabel } from '../internal/PayButton';\n\nimport type { PreAuthorizedDebitCanadaConfiguration } from './types';\n\nexport class PreAuthorizedDebitCanada extends UIElement<PreAuthorizedDebitCanadaConfiguration> {\n    public static type = TxVariants.eft_directdebit_CA;\n\n    public override formatData() {\n        const recurringPayment = !!this.props.storedPaymentMethodId;\n\n        if (recurringPayment) {\n            return {\n                paymentMethod: {\n                    type: PreAuthorizedDebitCanada.type,\n                    storedPaymentMethodId: this.props.storedPaymentMethodId\n                }\n            };\n        }\n\n        return {\n            paymentMethod: {\n                type: PreAuthorizedDebitCanada.type,\n                ownerName: this.state.data.ownerName,\n                bankAccountNumber: this.state.data.bankAccountNumber,\n                bankCode: this.state.data.bankCode,\n                bankLocationId: this.state.data.bankLocationId\n            },\n            ...(this.state.storePaymentMethod && { storePaymentMethod: this.state.storePaymentMethod })\n        };\n    }\n\n    public override formatProps(props: PreAuthorizedDebitCanadaConfiguration): PreAuthorizedDebitCanadaConfiguration {\n        return {\n            enableStoreDetails: props.session?.configuration?.enableStoreDetails ?? props.enableStoreDetails,\n            ...props\n        };\n    }\n\n    public override get isValid(): boolean {\n        if (this.props.storedPaymentMethodId) {\n            return true;\n        }\n\n        return !!this.state.isValid;\n    }\n\n    public override get displayName(): string {\n        if (this.props.storedPaymentMethodId && this.props.lastFour) {\n            return `•••• ${this.props.lastFour}`;\n        }\n\n        return this.props.name;\n    }\n\n    public override get additionalInfo(): string {\n        return this.props.storedPaymentMethodId ? this.props.label : '';\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.storedPaymentMethodId ? (\n                    <Fragment>\n                        <SettlementInfo />\n                        <RedirectButton\n                            showPayButton={this.props.showPayButton}\n                            icon={this.resources?.getImage({ imageFolder: 'components/' })(`bento_lock`)}\n                            label={payAmountLabel(this.props.i18n, this.props.amount)}\n                            name={this.displayName}\n                            amount={this.props.amount}\n                            payButton={this.payButton}\n                            onSubmit={this.submit}\n                            ref={ref => {\n                                this.componentRef = ref;\n                            }}\n                        />\n                    </Fragment>\n                ) : (\n                    <PreAuthorizedDebitCanadaComponent\n                        onChange={this.setState}\n                        payButton={this.payButton}\n                        showPayButton={this.props.showPayButton}\n                        placeholders={this.props.placeholders}\n                        setComponentRef={this.setComponentRef}\n                        showContextualElement={this.props.showContextualElement}\n                        enableStoreDetails={this.props.enableStoreDetails}\n                    />\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default PreAuthorizedDebitCanada;\n","import { h } from 'preact';\nimport Fieldset from '../FormFields/Fieldset';\nimport { ReadOnlyCompanyDetailsProps } from './types';\n\nconst ReadOnlyCompanyDetails = ({ data }) => {\n    const { name, registrationNumber }: ReadOnlyCompanyDetailsProps = data;\n\n    return (\n        <Fieldset classNameModifiers={['companyDetails']} label=\"companyDetails\" readonly>\n            {name && `${name} `}\n            {registrationNumber && `${registrationNumber} `}\n        </Fieldset>\n    );\n};\n\nexport default ReadOnlyCompanyDetails;\n","import { ValidatorRules } from '../../../utils/Validator/types';\nimport { isEmpty } from '../../../utils/validator-utils';\nimport { SF_ErrorCodes } from '../../../core/Errors/constants';\n\nexport const companyDetailsValidationRules: ValidatorRules = {\n    default: {\n        validate: value => {\n            return value && value.length > 0;\n        },\n        modes: ['blur'],\n        errorMessage: SF_ErrorCodes.ERROR_MSG_INCOMPLETE_FIELD // = 'err-gen-9100'\n    },\n    name: {\n        validate: value => (isEmpty(value) ? null : true), // valid, if there are chars other than spaces\n        errorMessage: 'companyDetails.name.invalid',\n        modes: ['blur']\n    },\n    registrationNumber: {\n        validate: value => (isEmpty(value) ? null : true),\n        errorMessage: 'companyDetails.registrationNumber.invalid',\n        modes: ['blur']\n    }\n};\n","export const getFormattedData = data => {\n    const { name, registrationNumber } = data;\n    return {\n        ...((name || registrationNumber) && {\n            company: {\n                ...(name && { name }),\n                ...(registrationNumber && { registrationNumber })\n            }\n        })\n    };\n};\n","import { h } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport Fieldset from '../FormFields/Fieldset';\nimport Field from '../FormFields/Field';\nimport ReadOnlyCompanyDetails from './ReadOnlyCompanyDetails';\nimport { companyDetailsValidationRules } from './validate';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { getFormattedData } from './utils';\nimport { CompanyDetailsSchema, CompanyDetailsProps } from './types';\nimport useForm from '../../../utils/useForm';\nimport InputText from '../FormFields/InputText';\nimport { ComponentMethodsRef } from '../UIElement/types';\nimport { HandleChangeForModeType } from '../../../utils/useForm/types';\n\nexport const COMPANY_DETAILS_SCHEMA = ['name', 'registrationNumber'];\n\nexport default function CompanyDetails(props: CompanyDetailsProps) {\n    const { label = '', namePrefix, requiredFields, visibility } = props;\n    const { i18n } = useCoreContext();\n    const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<CompanyDetailsSchema>({\n        schema: requiredFields,\n        rules: { ...companyDetailsValidationRules, ...props.validationRules },\n        defaultData: props.data\n    });\n\n    /** An object by which to expose 'public' members to the parent UIElement */\n    const companyDetailsRef = useRef<ComponentMethodsRef>({});\n    // Just call once\n    if (!Object.keys(companyDetailsRef.current).length) {\n        props.setComponentRef?.(companyDetailsRef.current);\n    }\n\n    // Expose method expected by (parent) Address.tsx\n    companyDetailsRef.current.showValidation = () => {\n        triggerValidation();\n    };\n\n    const generateFieldName = (name: string): string => `${namePrefix ? `${namePrefix}.` : ''}${name}`;\n\n    const eventHandler =\n        (mode: HandleChangeForModeType): h.JSX.FocusEventHandler<HTMLInputElement> =>\n        (e): void => {\n            const { name } = e.target as HTMLInputElement;\n            const key = name.split(`${namePrefix}.`).pop();\n\n            handleChangeFor(key, mode)(e);\n        };\n\n    const inputEventHandler =\n        (mode: HandleChangeForModeType): h.JSX.InputEventHandler<HTMLInputElement> =>\n        (e): void => {\n            const { name } = e.target as HTMLInputElement;\n            const key = name.split(`${namePrefix}.`).pop();\n\n            handleChangeFor(key, mode)(e);\n        };\n\n    useEffect(() => {\n        const formattedData = getFormattedData(data);\n        props.onChange({ data: formattedData, valid, errors, isValid });\n    }, [data, valid, errors, isValid]);\n\n    if (visibility === 'hidden') return null;\n    if (visibility === 'readOnly') return <ReadOnlyCompanyDetails {...props} data={data} />;\n\n    return (\n        <Fieldset classNameModifiers={[label]} label={label}>\n            {requiredFields.includes('name') && (\n                <Field\n                    label={i18n.get('companyDetails.name')}\n                    classNameModifiers={['name']}\n                    errorMessage={!!errors.name}\n                    i18n={i18n}\n                    name={generateFieldName('companyName')}\n                >\n                    <InputText\n                        name={generateFieldName('name')}\n                        value={data.name}\n                        classNameModifiers={['name']}\n                        onInput={inputEventHandler('input')}\n                        onBlur={eventHandler('blur')}\n                        spellCheck={false}\n                    />\n                </Field>\n            )}\n\n            {requiredFields.includes('registrationNumber') && (\n                <Field\n                    label={i18n.get('companyDetails.registrationNumber')}\n                    classNameModifiers={['registrationNumber']}\n                    errorMessage={!!errors.registrationNumber}\n                    i18n={i18n}\n                    name={generateFieldName('registrationNumber')}\n                >\n                    <InputText\n                        name={generateFieldName('registrationNumber')}\n                        value={data.registrationNumber}\n                        classNameModifiers={['registrationNumber']}\n                        onInput={inputEventHandler('input')}\n                        onBlur={eventHandler('blur')}\n                        spellCheck={false}\n                    />\n                </Field>\n            )}\n        </Fieldset>\n    );\n}\n\nCompanyDetails.defaultProps = {\n    data: {},\n    onChange: () => {},\n    visibility: 'editable',\n    requiredFields: COMPANY_DETAILS_SCHEMA,\n    validationRules: companyDetailsValidationRules\n};\n","import { h, Fragment } from 'preact';\nimport Fieldset from '../FormFields/Fieldset';\nimport { ReadOnlyPersonalDetailsProps } from './types';\n\nconst ReadOnlyPersonalDetails = ({ data }) => {\n    const { firstName, lastName, shopperEmail, telephoneNumber }: ReadOnlyPersonalDetailsProps = data;\n\n    return (\n        <Fieldset classNameModifiers={['personalDetails']} label=\"personalDetails\" readonly>\n            {firstName && `${firstName} `}\n            {lastName && `${lastName} `}\n            {shopperEmail && (\n                <Fragment>\n                    <br />\n                    {shopperEmail}\n                </Fragment>\n            )}\n            {telephoneNumber && (\n                <Fragment>\n                    <br />\n                    {telephoneNumber}\n                </Fragment>\n            )}\n        </Fieldset>\n    );\n};\n\nexport default ReadOnlyPersonalDetails;\n","import { ValidatorRules } from '../../../utils/Validator/types';\nimport { isEmpty } from '../../../utils/validator-utils';\nimport { ERROR_FIELD_REQUIRED } from '../../../core/Errors/constants';\nimport { validationRules } from '../../../utils/Validator/defaultRules';\n\nexport const personalDetailsValidationRules: ValidatorRules = {\n    default: {\n        validate: value => {\n            return value && value.length > 0;\n        },\n        errorMessage: ERROR_FIELD_REQUIRED,\n        modes: ['blur']\n    },\n    gender: {\n        validate: value => value && value.length > 0,\n        errorMessage: 'gender.notselected',\n        modes: ['blur']\n    },\n    firstName: {\n        validate: value => (isEmpty(value) ? null : true), // valid, if there are chars other than spaces,\n        errorMessage: 'firstName.invalid',\n        modes: ['blur']\n    },\n    lastName: {\n        validate: value => (isEmpty(value) ? null : true),\n        errorMessage: 'lastName.invalid',\n        modes: ['blur']\n    },\n    dateOfBirth: validationRules.dateOfBirthRule,\n    telephoneNumber: validationRules.phoneNumberRule,\n    shopperEmail: validationRules.emailRule\n};\n","import { unformatDate } from '../FormFields/InputDate/utils';\nimport Language from '../../../language';\n\nexport const getFormattedData = data => {\n    const { firstName, lastName, gender, dateOfBirth, shopperEmail, telephoneNumber } = data;\n\n    return {\n        ...((firstName || lastName) && {\n            shopperName: {\n                ...(firstName && { firstName }),\n                ...(lastName && { lastName }),\n                ...(gender && { gender })\n            }\n        }),\n        ...(dateOfBirth && { dateOfBirth: unformatDate(dateOfBirth) }),\n        ...(shopperEmail && { shopperEmail }),\n        ...(telephoneNumber && { telephoneNumber })\n    };\n};\n\n/**\n * Used by the SRPanel sorting function to tell it whether we need to prepend the field type to the SR panel message, and, if so, we retrieve the correct translation for the field type.\n * (Whether we need to prepend the field type depends on whether we know that the error message correctly reflects the label of the field. Ultimately all error messages should do this\n * and this mapping fn will become redundant)\n */\nexport const mapFieldKey = (key: string, i18n: Language): string => {\n    switch (key) {\n        case 'gender':\n            return i18n.get(key);\n        // We know that the translated error messages do contain a reference to the field they refer to, so we won't need to map them\n        default:\n            return null;\n    }\n};\n","import { h } from 'preact';\nimport { useMemo } from 'preact/hooks';\nimport InputBase, { InputBaseProps } from '../InputBase';\nimport { checkDateInputSupport, formatDate } from './utils';\n\ninterface InputDateProps extends InputBaseProps {\n    onInput?: (e) => void;\n}\n\nexport default function InputDate(props: InputDateProps) {\n    const isDateInputSupported = useMemo(checkDateInputSupport, []);\n\n    const handleInput = e => {\n        const { value } = e.target;\n        e.target.value = formatDate(value);\n        props.onInput(e);\n    };\n\n    if (isDateInputSupported) {\n        return <InputBase {...props} type=\"date\" />;\n    }\n\n    return <InputBase {...props} onInput={handleInput} maxLength={10} />;\n}\n","import { Fragment, h } from 'preact';\nimport { useEffect, useMemo, useRef } from 'preact/hooks';\nimport Fieldset from '../FormFields/Fieldset';\nimport Field from '../FormFields/Field';\nimport ReadOnlyPersonalDetails from './ReadOnlyPersonalDetails';\nimport { personalDetailsValidationRules } from './validate';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { PersonalDetailsProps } from './types';\nimport { checkDateInputSupport } from '../FormFields/InputDate/utils';\nimport { PersonalDetailsSchema } from '../../../types';\nimport { getFormattedData } from './utils';\nimport useForm from '../../../utils/useForm';\nimport './PersonalDetails.scss';\nimport InputText from '../FormFields/InputText';\nimport RadioGroup from '../FormFields/RadioGroup';\nimport InputDate from '../FormFields/InputDate';\nimport InputEmail from '../FormFields/InputEmail';\nimport InputTelephone from '../FormFields/InputTelephone';\nimport { getErrorMessage } from '../../../utils/getErrorMessage';\nimport { ComponentMethodsRef } from '../UIElement/types';\nimport { HandleChangeForModeType } from '../../../utils/useForm/types';\n\nexport const PERSONAL_DETAILS_SCHEMA = ['firstName', 'lastName', 'gender', 'dateOfBirth', 'shopperEmail', 'telephoneNumber'];\n\nexport default function PersonalDetails(props: PersonalDetailsProps) {\n    const { label = '', namePrefix, placeholders, requiredFields, visibility } = props;\n\n    const { i18n } = useCoreContext();\n\n    /** An object by which to expose 'public' members to the parent UIElement */\n    const personalDetailsRef = useRef<ComponentMethodsRef>({});\n    // Just call once\n    if (!Object.keys(personalDetailsRef.current).length) {\n        props.setComponentRef?.(personalDetailsRef.current);\n    }\n\n    const isDateInputSupported = useMemo(checkDateInputSupport, []);\n    const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<PersonalDetailsSchema>({\n        schema: requiredFields,\n        // Ensure any passed validation rules are merged with the default ones\n        rules: { ...personalDetailsValidationRules, ...props.validationRules },\n        defaultData: props.data\n    });\n\n    // Expose method expected by (parent) PersonalDetails.tsx\n    personalDetailsRef.current.showValidation = () => {\n        triggerValidation();\n    };\n\n    const eventHandler =\n        (mode: HandleChangeForModeType): h.JSX.GenericEventHandler<EventTarget> =>\n        (e: Event): void => {\n            const { name } = e.target as HTMLInputElement;\n            const key = name.split(`${namePrefix}.`).pop();\n\n            handleChangeFor(key, mode)(e);\n        };\n\n    const generateFieldName = (name: string): string => `${namePrefix ? `${namePrefix}.` : ''}${name}`;\n\n    useEffect(() => {\n        const formattedData = getFormattedData(data);\n        props.onChange({ data: formattedData, valid, errors, isValid });\n    }, [data, valid, errors, isValid]);\n\n    if (visibility === 'hidden') return null;\n    if (visibility === 'readOnly') return <ReadOnlyPersonalDetails {...props} data={data} />;\n\n    return (\n        <Fragment>\n            <Fieldset classNameModifiers={['personalDetails']} label={label}>\n                {requiredFields.includes('firstName') && (\n                    <Field\n                        label={i18n.get('firstName')}\n                        classNameModifiers={['col-50', 'firstName']}\n                        errorMessage={getErrorMessage(i18n, errors.firstName, i18n.get('firstName'))}\n                        name={'firstName'}\n                        i18n={i18n}\n                    >\n                        <InputText\n                            name={generateFieldName('firstName')}\n                            value={data.firstName}\n                            classNameModifiers={['firstName']}\n                            onInput={eventHandler('input')}\n                            onBlur={eventHandler('blur')}\n                            placeholder={placeholders.firstName}\n                            spellCheck={false}\n                            required={true}\n                        />\n                    </Field>\n                )}\n\n                {requiredFields.includes('lastName') && (\n                    <Field\n                        label={i18n.get('lastName')}\n                        classNameModifiers={['col-50', 'lastName']}\n                        errorMessage={getErrorMessage(i18n, errors.lastName, i18n.get('lastName'))}\n                        name={'lastName'}\n                        i18n={i18n}\n                    >\n                        <InputText\n                            name={generateFieldName('lastName')}\n                            value={data.lastName}\n                            classNameModifiers={['lastName']}\n                            onInput={eventHandler('input')}\n                            onBlur={eventHandler('blur')}\n                            placeholder={placeholders.lastName}\n                            spellCheck={false}\n                            required={true}\n                        />\n                    </Field>\n                )}\n\n                {requiredFields.includes('gender') && (\n                    <Field\n                        errorMessage={getErrorMessage(i18n, errors.gender)}\n                        classNameModifiers={['gender']}\n                        name={'gender'}\n                        useLabelElement={false}\n                    >\n                        <RadioGroup\n                            name={generateFieldName('gender')}\n                            value={data.gender}\n                            items={[\n                                { id: 'MALE', name: 'male' },\n                                { id: 'FEMALE', name: 'female' }\n                            ]}\n                            classNameModifiers={['gender']}\n                            onInput={eventHandler('input')}\n                            onChange={eventHandler('blur')}\n                            required={true}\n                        />\n                    </Field>\n                )}\n\n                {requiredFields.includes('dateOfBirth') && (\n                    <Field\n                        label={i18n.get('dateOfBirth')}\n                        classNameModifiers={['col-50', 'dateOfBirth']}\n                        errorMessage={getErrorMessage(i18n, errors.dateOfBirth, i18n.get('dateOfBirth'))}\n                        helper={isDateInputSupported ? null : i18n.get('dateOfBirth.format')}\n                        name={'dateOfBirth'}\n                        i18n={i18n}\n                    >\n                        <InputDate\n                            name={generateFieldName('dateOfBirth')}\n                            value={data.dateOfBirth}\n                            classNameModifiers={['dateOfBirth']}\n                            onInput={eventHandler('input')}\n                            onBlur={eventHandler('blur')}\n                            placeholder={placeholders.dateOfBirth}\n                            required={true}\n                        />\n                    </Field>\n                )}\n\n                {requiredFields.includes('shopperEmail') && (\n                    <Field\n                        label={i18n.get('shopperEmail')}\n                        classNameModifiers={['shopperEmail']}\n                        errorMessage={getErrorMessage(i18n, errors.shopperEmail, i18n.get('shopperEmail'))}\n                        dir={'ltr'}\n                        name={'emailAddress'}\n                        i18n={i18n}\n                    >\n                        <InputEmail\n                            name={generateFieldName('shopperEmail')}\n                            value={data.shopperEmail}\n                            classNameModifiers={['shopperEmail']}\n                            onInput={eventHandler('input')}\n                            onBlur={eventHandler('blur')}\n                            placeholder={placeholders.shopperEmail}\n                            required={true}\n                        />\n                    </Field>\n                )}\n\n                {requiredFields.includes('telephoneNumber') && (\n                    <Field\n                        label={i18n.get('telephoneNumber')}\n                        classNameModifiers={['telephoneNumber']}\n                        errorMessage={getErrorMessage(i18n, errors.telephoneNumber, i18n.get('telephoneNumber'))}\n                        dir={'ltr'}\n                        name={'telephoneNumber'}\n                        i18n={i18n}\n                    >\n                        <InputTelephone\n                            name={generateFieldName('telephoneNumber')}\n                            value={data.telephoneNumber}\n                            classNameModifiers={['telephoneNumber']}\n                            onInput={eventHandler('input')}\n                            onBlur={eventHandler('blur')}\n                            placeholder={placeholders.telephoneNumber}\n                            required={true}\n                        />\n                    </Field>\n                )}\n            </Fieldset>\n        </Fragment>\n    );\n}\n\nPersonalDetails.defaultProps = {\n    data: {},\n    onChange: () => {},\n    placeholders: {},\n    requiredFields: PERSONAL_DETAILS_SCHEMA,\n    validationRules: personalDetailsValidationRules,\n    visibility: 'editable'\n};\n","import Language from '../../../language';\nimport { ADDRESS_SCHEMA } from './constants';\nimport { AddressField } from '../../../types/global-types';\nimport { StringObject } from './types';\n\n/**\n * Used by the SRPanel sorting function to tell it whether we need to prepend the field type to the SR panel message, and, if so, we retrieve the correct translation for the field type.\n * (Whether we need to prepend the field type depends on whether we know that the error message correctly reflects the label of the field. Ultimately all error messages should do this\n * and this mapping fn will become redundant)\n */\nexport const mapFieldKey = (key: string, i18n: Language, countrySpecificLabels: StringObject): string => {\n    if (ADDRESS_SCHEMA.includes(key as AddressField)) {\n        return countrySpecificLabels?.[key] ? i18n.get(countrySpecificLabels?.[key]) : i18n.get(key);\n    }\n    return null;\n};\n","import { OpenInvoiceActiveFieldsets, OpenInvoiceStateData, OpenInvoiceVisibility } from './types';\nimport Language from '../../../language';\nimport { mapFieldKey as mapFieldKeyAddress } from '../Address/utils';\nimport { StringObject } from '../Address/types';\n\nexport const fieldsetsSchema: Array<keyof OpenInvoiceStateData> = [\n    'companyDetails',\n    'personalDetails',\n    'billingAddress',\n    'deliveryAddress',\n    'bankAccount'\n];\n\nconst isPrefilled = (fieldsetData: object = {}): boolean => Object.keys(fieldsetData).length > 1;\n\nexport const getActiveFieldsData = (activeFieldsets: OpenInvoiceActiveFieldsets, data: OpenInvoiceStateData): OpenInvoiceStateData =>\n    Object.keys(data)\n        .filter(fieldset => activeFieldsets[fieldset])\n        .reduce((acc, cur) => {\n            acc[cur] = data[cur];\n            return acc;\n        }, {});\n\nexport const getInitialActiveFieldsets = (visibility: OpenInvoiceVisibility, data: OpenInvoiceStateData = {}): OpenInvoiceActiveFieldsets =>\n    fieldsetsSchema.reduce((acc, fieldset) => {\n        const isVisible = visibility[fieldset] !== 'hidden';\n        const isDeliveryAddress = fieldset === 'deliveryAddress';\n        const billingAddressIsHidden = visibility?.billingAddress === 'hidden';\n\n        // The delivery address will be active not only when set as visible\n        // but also when the billing address is hidden or when it has prefilled data\n        acc[fieldset] = isVisible && (!isDeliveryAddress || billingAddressIsHidden || isPrefilled(data[fieldset]));\n        return acc;\n    }, {} as OpenInvoiceActiveFieldsets);\n\n/**\n * Used by the SRPanel sorting function to tell it whether we need to add the field type to the SR panel message, and, if so, we retrieve the correct translation for the field type.\n * (Whether we need to add the field type depends on whether we know that the error message correctly reflects the label of the field. Ultimately all error messages should do this\n * and this mapping fn will become redundant)\n */\nexport const mapFieldKey = (key: string, i18n: Language, countrySpecificLabels: StringObject): string => {\n    let refKey = key;\n    let label;\n\n    // Differentiate between address types (billing and delivery)\n    const splitKey = refKey.split(':');\n    const hasSplitKey = splitKey.length > 1;\n\n    if (hasSplitKey) {\n        label = splitKey[0];\n        refKey = splitKey[1];\n    }\n\n    const addressKey = mapFieldKeyAddress(refKey, i18n, countrySpecificLabels);\n    // Also use the presence of a label to know that we are dealing with address related fields. (This matters now that addresses can contain first & last name fields.)\n    if (addressKey && label) return hasSplitKey ? `${i18n.get(label)} ${addressKey}` : addressKey;\n\n    switch (refKey) {\n        case 'dateOfBirth':\n        case 'shopperEmail':\n        case 'telephoneNumber':\n            return i18n.get(refKey);\n        default:\n            break;\n    }\n\n    // We know that the translated error messages do contain a reference to the field they refer to, so we won't need to map them\n    return null;\n};\n","import { h } from 'preact';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport CompanyDetails from '../CompanyDetails';\nimport PersonalDetails from '../PersonalDetails';\nimport Address from '../Address';\nimport Checkbox from '../FormFields/Checkbox';\nimport ConsentCheckbox from '../FormFields/ConsentCheckbox';\nimport { getActiveFieldsData, getInitialActiveFieldsets, fieldsetsSchema } from './utils';\nimport {\n    OpenInvoiceActiveFieldsets,\n    OpenInvoiceFieldsetsRefs,\n    OpenInvoiceProps,\n    OpenInvoiceStateData,\n    OpenInvoiceStateError,\n    OpenInvoiceStateValid\n} from './types';\nimport './OpenInvoice.scss';\nimport IbanInput from '../IbanInput';\nimport { GenericError } from '../../../core/Errors/types';\nimport Field from '../FormFields/Field';\nimport FormInstruction from '../FormInstruction';\nimport { ComponentMethodsRef } from '../UIElement/types';\nimport useSRPanelForOpenInvoiceErrors from './useSRPanelForOpenInvoiceErrors';\nimport classNames from 'classnames';\n\nconst consentCBErrorObj: GenericError = {\n    isValid: false,\n    errorMessage: 'consent.checkbox.invalid',\n    error: 'consent.checkbox.invalid'\n};\n\nexport default function OpenInvoice(props: OpenInvoiceProps) {\n    const { countryCode, visibility } = props;\n    const { i18n } = useCoreContext();\n\n    /** An object by which to expose 'public' members to the parent UIElement */\n    const openInvoiceRef = useRef<ComponentMethodsRef>({});\n    // Just call once\n    if (!Object.keys(openInvoiceRef.current).length) {\n        props.setComponentRef?.(openInvoiceRef.current);\n    }\n\n    const isValidating = useRef(false);\n\n    const initialActiveFieldsets: OpenInvoiceActiveFieldsets = getInitialActiveFieldsets(visibility, props.data);\n    const [activeFieldsets, setActiveFieldsets] = useState<OpenInvoiceActiveFieldsets>(initialActiveFieldsets);\n\n    const { current: fieldsetsRefs } = useRef<OpenInvoiceFieldsetsRefs>(\n        fieldsetsSchema.reduce((acc, fieldset) => {\n            acc[fieldset] = ref => {\n                fieldsetsRefs[fieldset].current = ref;\n            };\n            return acc;\n        }, {})\n    );\n\n    const checkFieldsets = () => Object.keys(activeFieldsets).every(fieldset => !activeFieldsets[fieldset] || !!valid[fieldset]);\n    const hasConsentCheckbox = !!props.consentCheckboxLabel;\n    const isStandAloneButton = !hasConsentCheckbox && Object.keys(activeFieldsets).every(key => !activeFieldsets[key]);\n    const showSeparateDeliveryAddressCheckbox = visibility.deliveryAddress === 'editable' && visibility.billingAddress !== 'hidden';\n\n    const [data, setData] = useState<OpenInvoiceStateData>({\n        ...props.data,\n        ...(hasConsentCheckbox && { consentCheckbox: false })\n    });\n    const [errors, setErrors] = useState<OpenInvoiceStateError>({});\n    const [valid, setValid] = useState<OpenInvoiceStateValid>({});\n    const [status, setStatus] = useState('ready');\n\n    // Expose methods expected by parent\n    openInvoiceRef.current.showValidation = () => {\n        isValidating.current = true;\n        fieldsetsSchema.forEach(fieldset => {\n            if (fieldsetsRefs[fieldset].current) fieldsetsRefs[fieldset].current.showValidation();\n        });\n\n        setErrors({\n            ...(hasConsentCheckbox && { consentCheckbox: data.consentCheckbox ? null : consentCBErrorObj })\n        });\n    };\n\n    openInvoiceRef.current.setStatus = setStatus;\n\n    useSRPanelForOpenInvoiceErrors({ errors, data, props, isValidating });\n\n    useEffect(() => {\n        const fieldsetsAreValid: boolean = checkFieldsets();\n        const consentCheckboxValid: boolean = !hasConsentCheckbox || !!valid.consentCheckbox;\n        const isValid: boolean = fieldsetsAreValid && consentCheckboxValid;\n        const newData: OpenInvoiceStateData = getActiveFieldsData(activeFieldsets, data);\n        props.onChange({ data: newData, errors, valid, isValid });\n    }, [data, activeFieldsets]);\n\n    const handleFieldset = key => state => {\n        setData(prevData => ({ ...prevData, [key]: state.data }));\n        setValid(prevValid => ({ ...prevValid, [key]: state.isValid }));\n        setErrors(prevErrors => ({ ...prevErrors, [key]: state.errors }));\n    };\n\n    const handleSeparateDeliveryAddress = () => {\n        setActiveFieldsets(prevActiveFields => ({\n            ...prevActiveFields,\n            deliveryAddress: !activeFieldsets.deliveryAddress\n        }));\n    };\n\n    const handleConsentCheckbox = e => {\n        const { checked } = e.target;\n        setData(prevData => ({ ...prevData, consentCheckbox: checked }));\n        setValid(prevValid => ({ ...prevValid, consentCheckbox: checked }));\n        setErrors(prevErrors => ({ ...prevErrors, ...{ consentCheckbox: !checked ? consentCBErrorObj : null } }));\n    };\n    return (\n        <div\n            className={classNames({\n                'adyen-checkout__open-invoice': true,\n                'adyen-checkout__open-invoice--loading': status === 'loading'\n            })}\n        >\n            <FormInstruction />\n\n            {activeFieldsets.companyDetails && (\n                <CompanyDetails\n                    data={props.data.companyDetails}\n                    label=\"companyDetails\"\n                    onChange={handleFieldset('companyDetails')}\n                    setComponentRef={fieldsetsRefs.companyDetails}\n                    visibility={visibility.companyDetails}\n                />\n            )}\n\n            {activeFieldsets.personalDetails && (\n                <PersonalDetails\n                    data={props.data.personalDetails}\n                    requiredFields={props.personalDetailsRequiredFields}\n                    label=\"personalDetails\"\n                    onChange={handleFieldset('personalDetails')}\n                    setComponentRef={fieldsetsRefs.personalDetails}\n                    visibility={visibility.personalDetails}\n                />\n            )}\n\n            {activeFieldsets.bankAccount && (\n                <IbanInput\n                    holderName={true}\n                    label=\"ach.bankAccount\"\n                    data={data.bankAccount}\n                    onChange={handleFieldset('bankAccount')}\n                    ref={fieldsetsRefs.bankAccount}\n                />\n            )}\n\n            {activeFieldsets.billingAddress && (\n                <Address\n                    allowedCountries={props?.billingAddressSpecification?.allowedCountries ?? props.allowedCountries}\n                    countryCode={countryCode}\n                    requiredFields={props.billingAddressRequiredFields}\n                    specifications={props.billingAddressSpecification}\n                    data={data.billingAddress}\n                    label=\"billingAddress\"\n                    onChange={handleFieldset('billingAddress')}\n                    setComponentRef={fieldsetsRefs.billingAddress}\n                    visibility={visibility.billingAddress}\n                />\n            )}\n\n            {showSeparateDeliveryAddressCheckbox && (\n                <Field\n                    classNameModifiers={['separateDeliveryAddress', 'consentCheckbox']}\n                    name={'separateDeliveryAddress'}\n                    useLabelElement={false}\n                    showErrorElement={false}\n                >\n                    <Checkbox\n                        label={i18n.get('separateDeliveryAddress')}\n                        checked={activeFieldsets.deliveryAddress}\n                        classNameModifiers={['separateDeliveryAddress']}\n                        name={'separateDeliveryAddress'}\n                        onChange={handleSeparateDeliveryAddress}\n                    />\n                </Field>\n            )}\n\n            {activeFieldsets.deliveryAddress && (\n                <Address\n                    allowedCountries={props?.deliveryAddressSpecification?.allowedCountries ?? props.allowedCountries}\n                    countryCode={countryCode}\n                    requiredFields={props.deliveryAddressRequiredFields}\n                    specifications={props.deliveryAddressSpecification}\n                    data={data.deliveryAddress}\n                    label=\"deliveryAddress\"\n                    onChange={handleFieldset('deliveryAddress')}\n                    setComponentRef={fieldsetsRefs.deliveryAddress}\n                    visibility={visibility.deliveryAddress}\n                />\n            )}\n\n            {hasConsentCheckbox && (\n                <ConsentCheckbox\n                    data={data}\n                    errorMessage={!!errors.consentCheckbox}\n                    label={props.consentCheckboxLabel}\n                    onChange={handleConsentCheckbox}\n                    i18n={i18n}\n                />\n            )}\n\n            {props.showPayButton &&\n                props.payButton({\n                    status,\n                    classNameModifiers: [...(isStandAloneButton ? ['standalone'] : [])],\n                    label: i18n.get('confirmPurchase')\n                })}\n        </div>\n    );\n}\n","import { useEffect, useState, useMemo, MutableRef } from 'preact/hooks';\nimport { enhanceErrorObjectKeys } from '../../../core/Errors/utils';\nimport { COMPANY_DETAILS_SCHEMA } from '../CompanyDetails/CompanyDetails';\nimport { PERSONAL_DETAILS_SCHEMA } from '../PersonalDetails/PersonalDetails';\nimport { SetSRMessagesReturnObject } from '../../../core/Errors/types';\nimport { ERROR_ACTION_BLUR_SCENARIO, ERROR_ACTION_FOCUS_FIELD } from '../../../core/Errors/constants';\nimport useSRPanelContext from '../../../core/Errors/useSRPanelContext';\nimport { SetSRMessagesReturnFn } from '../../../core/Errors/SRPanelProvider';\nimport Specifications from '../Address/Specifications';\nimport { setFocusOnField } from '../../../utils/setFocus';\nimport { usePrevious } from '../../../utils/hookUtils';\nimport { getArrayDifferences } from '../../../utils/arrayUtils';\nimport { mapFieldKey } from './utils';\nimport { OpenInvoiceProps, OpenInvoiceStateData, OpenInvoiceStateError } from './types';\n\ninterface UseSRPanelForErrorsProps {\n    errors: OpenInvoiceStateError;\n    data: OpenInvoiceStateData;\n    props: OpenInvoiceProps;\n    isValidating: MutableRef<boolean>;\n}\n\nconst useSRPanelForOpenInvoiceErrors = ({ errors, data, props, isValidating }: UseSRPanelForErrorsProps) => {\n    // Relates to onBlur errors\n    const [sortedErrorList, setSortedErrorList] = useState(null);\n    // Get the previous value (Relates to onBlur errors)\n    const previousSortedErrors = usePrevious(sortedErrorList);\n    const { setSRMessagesFromObjects, setSRMessagesFromStrings, clearSRPanel, shouldMoveFocusSR } = useSRPanelContext();\n    // Generate a setSRMessages function - implemented as a partial, since the initial set of arguments don't change.\n    const setSRMessages: SetSRMessagesReturnFn = setSRMessagesFromObjects?.({\n        fieldTypeMappingFn: mapFieldKey\n    });\n\n    const billingAddressSpecifications = useMemo(() => new Specifications(), []);\n    const deliveryAddressSpecifications = useMemo(() => new Specifications(props.deliveryAddressSpecification), []);\n\n    useEffect(() => {\n        try {\n            const DELIVERY_ADDRESS_PREFIX = 'deliveryAddress:';\n            const BILLING_ADDRESS_PREFIX = 'billingAddress:';\n\n            /** Create messages for SRPanel */\n            // Extract nested errors from the various child components...\n            const {\n                companyDetails: extractedCompanyDetailsErrors,\n                personalDetails: extractedPersonalDetailsErrors,\n                bankAccount: extractedBankAccountErrors,\n                billingAddress: extractedBillingAddressErrors,\n                deliveryAddress: extractedDeliveryAddressErrors,\n                ...remainingErrors\n            } = errors;\n\n            // Differentiate between billingAddress and deliveryAddress errors by adding a prefix.\n            // This also allows overlapping errors e.g. now that addresses can contain first & last name fields\n            const enhancedBillingAddressErrors = enhanceErrorObjectKeys(extractedBillingAddressErrors, BILLING_ADDRESS_PREFIX);\n            const enhancedDeliveryAddressErrors = enhanceErrorObjectKeys(extractedDeliveryAddressErrors, DELIVERY_ADDRESS_PREFIX);\n\n            // ...and then collate the errors into a new object so that they all sit at top level\n            const errorsForPanel = {\n                ...(typeof extractedCompanyDetailsErrors === 'object' && extractedCompanyDetailsErrors),\n                ...(typeof extractedPersonalDetailsErrors === 'object' && extractedPersonalDetailsErrors),\n                ...(typeof extractedBankAccountErrors === 'object' && extractedBankAccountErrors),\n                ...(typeof enhancedBillingAddressErrors === 'object' && enhancedBillingAddressErrors),\n                ...(typeof enhancedDeliveryAddressErrors === 'object' && enhancedDeliveryAddressErrors),\n                ...remainingErrors\n            };\n\n            // Create layout\n            const companyDetailsLayout: string[] = COMPANY_DETAILS_SCHEMA;\n\n            const personalDetailsReqFields: string[] = props.personalDetailsRequiredFields ?? PERSONAL_DETAILS_SCHEMA;\n            const personalDetailLayout: string[] = PERSONAL_DETAILS_SCHEMA.filter(x => personalDetailsReqFields?.includes(x));\n\n            const bankAccountLayout = ['holder', 'iban'];\n\n            const billingAddressLayout = billingAddressSpecifications.getAddressSchemaForCountryFlat(data.billingAddress?.country);\n            // In order to sort the address errors the layout entries need to have the same (prefixed) identifier as the errors themselves\n            const billingAddressLayoutEnhanced = billingAddressLayout.map(item => `${BILLING_ADDRESS_PREFIX}${item}`);\n\n            const deliveryAddressLayout = deliveryAddressSpecifications.getAddressSchemaForCountryFlat(data.deliveryAddress?.country);\n            const deliveryAddressLayoutEnhanced = deliveryAddressLayout.map(item => `${DELIVERY_ADDRESS_PREFIX}${item}`);\n\n            const fullLayout = companyDetailsLayout.concat(\n                personalDetailLayout,\n                bankAccountLayout,\n                billingAddressLayoutEnhanced,\n                deliveryAddressLayoutEnhanced,\n                ['consentCheckbox']\n            );\n\n            // Country specific address labels\n            const countrySpecificLabels_billing = billingAddressSpecifications.getAddressLabelsForCountry(data.billingAddress?.country);\n            const countrySpecificLabels_delivery = deliveryAddressSpecifications.getAddressLabelsForCountry(data.deliveryAddress?.country);\n\n            // Set messages: Pass dynamic props (errors, layout etc) to SRPanel via partial\n            const srPanelResp: SetSRMessagesReturnObject = setSRMessages?.({\n                errors: errorsForPanel,\n                isValidating: isValidating.current,\n                layout: fullLayout,\n                countrySpecificLabels: { ...countrySpecificLabels_billing, ...countrySpecificLabels_delivery }\n            });\n\n            // Relates to onBlur errors\n            const currentErrorsSortedByLayout = srPanelResp?.currentErrorsSortedByLayout;\n\n            // Store the array of sorted error objects separately so that we can use it to make comparisons between the old and new arrays\n            setSortedErrorList(currentErrorsSortedByLayout); // Relates to onBlur errors\n\n            /**\n             * Need extra actions after setting SRPanel messages in order to focus field (if required) and because we have some errors that are fired onBlur\n             */\n            switch (srPanelResp?.action) {\n                // A call to focus the first field in error will always follow the call to validate the whole form\n                case ERROR_ACTION_FOCUS_FIELD: {\n                    /**\n                     * For prefixed fields (ones that can occur twice but in different contexts i.e. billingAddress & deliveryAddress) - consider the prefix...\n                     */\n                    // ...Firstly strip it to gain a \"clean\" reference to the field...\n                    const fieldToFocus = srPanelResp.fieldToFocus.includes(':') ? srPanelResp.fieldToFocus.split(':')[1] : srPanelResp.fieldToFocus; // country, street etc\n\n                    // ...Secondly use the prefix to add context for when we try to select it\n                    let focusContextSelector = '';\n                    const focusContext = srPanelResp.fieldToFocus.includes(':') ? srPanelResp.fieldToFocus.split(':')[0] : ''; // 'billingAddress' | 'deliveryAddress'\n                    if (focusContext.length) {\n                        focusContextSelector = `.adyen-checkout__fieldset--${focusContext} `;\n                    }\n\n                    // Focus first field in error, if required\n                    if (shouldMoveFocusSR) setFocusOnField('.adyen-checkout__open-invoice', fieldToFocus, focusContextSelector);\n                    // Remove 'showValidation' mode - allowing time for collation of all the fields in error whilst it is 'showValidation' mode (some errors come in a second render pass)\n                    setTimeout(() => {\n                        isValidating.current = false;\n                    }, 300);\n                    break;\n                }\n\n                /**\n                 * Relates to errors triggered by a field blurring (some pm forms have this, some don't) - check if there is an error to either set or to clear\n                 */\n                case ERROR_ACTION_BLUR_SCENARIO: {\n                    const difference = getArrayDifferences(currentErrorsSortedByLayout, previousSortedErrors, 'field');\n\n                    const latestErrorMsg = difference?.[0];\n\n                    if (latestErrorMsg) {\n                        // Is error actually a blur based one - depends on the specific fields in a component as to whether they validate on blur\n                        const isBlurBasedError = latestErrorMsg.field === 'shopperEmail' && latestErrorMsg.errorCode === 'field.error.invalid';\n\n                        // Only add blur based errors to the error panel - doing this step prevents the non-blur based errors from being read out twice\n                        const latestSRError = isBlurBasedError ? latestErrorMsg.errorMessage : null;\n                        setSRMessagesFromStrings(latestSRError);\n                    } else {\n                        // called when previousSortedErrors.length >= currentErrorsSortedByLayout.length\n                        clearSRPanel();\n                    }\n\n                    break;\n                }\n                default:\n                    break;\n            }\n        } catch (_) {\n            // We don't handle the error related to the sr panel, let it fail silently.\n        }\n    }, [errors, data]);\n};\n\nexport default useSRPanelForOpenInvoiceErrors;\n","import { h } from 'preact';\nimport UIElement from '../../internal/UIElement/UIElement';\nimport OpenInvoice from '../../internal/OpenInvoice';\nimport { CoreProvider } from '../../../core/Context/CoreProvider';\nimport SRPanelProvider from '../../../core/Errors/SRPanelProvider';\nimport { OpenInvoiceConfiguration } from './types';\n\nexport default class OpenInvoiceContainer extends UIElement<OpenInvoiceConfiguration> {\n    protected static defaultProps: Partial<OpenInvoiceConfiguration> = {\n        onChange: () => {},\n        data: { companyDetails: {}, personalDetails: {}, billingAddress: {}, deliveryAddress: {}, bankAccount: {} },\n        visibility: {\n            companyDetails: 'hidden',\n            personalDetails: 'editable',\n            billingAddress: 'editable',\n            deliveryAddress: 'editable',\n            bankAccount: 'hidden'\n        }\n    };\n\n    /**\n     * Returns whether the component state is valid or not\n     */\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    /**\n     * Formats props on construction time\n     */\n    formatProps(props) {\n        const country = props.countryCode || props.data?.billingAddress?.countryCode;\n\n        return {\n            ...props,\n            allowedCountries: [country],\n            visibility: {\n                ...OpenInvoiceContainer.defaultProps.visibility,\n                ...props.visibility\n            },\n            data: {\n                ...props.data,\n                billingAddress: {\n                    ...props.data.billingAddress,\n                    country\n                },\n                deliveryAddress: {\n                    ...props.data.deliveryAddress,\n                    country\n                }\n            }\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        const { data = {} } = this.state;\n        const { companyDetails = {}, personalDetails = {}, billingAddress, deliveryAddress, bankAccount } = data;\n\n        return {\n            paymentMethod: {\n                type: this.constructor['type']\n            },\n            ...personalDetails,\n            ...companyDetails,\n            ...(bankAccount && {\n                bankAccount: {\n                    iban: bankAccount.ibanNumber,\n                    ownerName: bankAccount.ownerName,\n                    countryCode: bankAccount.countryCode\n                }\n            }),\n            ...(billingAddress && { billingAddress }),\n            ...((deliveryAddress || billingAddress) && { deliveryAddress: deliveryAddress || billingAddress })\n        };\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                    <OpenInvoice\n                        setComponentRef={this.setComponentRef}\n                        {...this.props}\n                        {...this.state}\n                        onChange={this.setState}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                    />\n                </SRPanelProvider>\n            </CoreProvider>\n        );\n    }\n}\n","export const ALLOWED_COUNTRIES = ['CA', 'US'];\n","import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ALLOWED_COUNTRIES } from './config';\nimport { TxVariants } from '../tx-variants';\n\nexport default class Affirm extends OpenInvoiceContainer {\n    public static type = TxVariants.affirm;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            allowedCountries: ALLOWED_COUNTRIES,\n            personalDetailsRequiredFields: ['firstName', 'lastName', 'telephoneNumber', 'shopperEmail']\n        };\n    }\n}\n","import { Fragment, h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\n\ninterface ConsentCheckboxLabelProps {\n    url: string;\n}\n\nexport default function ConsentCheckboxLabel(props: ConsentCheckboxLabelProps) {\n    const { i18n } = useCoreContext();\n    const linkText = i18n.get('paymentConditions');\n    const translationString = i18n.get('afterPay.agreement');\n    const [textBeforeLink, textAfterLink] = translationString.split('%@');\n\n    if (textBeforeLink && textAfterLink) {\n        return (\n            <Fragment>\n                {textBeforeLink}\n                <a className=\"adyen-checkout-link\" target=\"_blank\" rel=\"noopener noreferrer\" href={props.url}>\n                    {linkText}\n                </a>\n                {textAfterLink}\n            </Fragment>\n        );\n    }\n\n    return <span className=\"adyen-checkout__checkbox__label\">{i18n.get('privacyPolicy')}</span>;\n}\n","const ALLOWED_COUNTRIES = ['BE', 'NL'];\nconst rivertyConsentUrlMap = {\n    be: {\n        en: 'https://documents.riverty.com/terms_conditions/payment_methods/invoice/be_en',\n        fr: 'https://documents.riverty.com/terms_conditions/payment_methods/invoice/be_fr',\n        nl: 'https://documents.riverty.com/terms_conditions/payment_methods/invoice/be_nl'\n    },\n    nl: {\n        en: 'https://documents.riverty.com/terms_conditions/payment_methods/invoice/nl_en',\n        nl: 'https://documents.riverty.com/terms_conditions/payment_methods/invoice/nl_nl'\n    }\n};\nexport { ALLOWED_COUNTRIES, rivertyConsentUrlMap };\n","type UrlMap = {\n    [countryCode: string]: {\n        [language: string]: string;\n    };\n};\n\nfunction getConsentUrl(countryCode: string, locale: string, urlMap: UrlMap): string {\n    const languageCode = locale?.toLowerCase().slice(0, 2);\n    const consentLink = urlMap[countryCode?.toLowerCase()]?.[languageCode];\n    if (!consentLink) {\n        console.warn(`Cannot find a consent url for the provided countryCode: ${countryCode} and locale: ${locale}`);\n        return;\n    }\n    return consentLink;\n}\n\nexport { getConsentUrl };\n","import { h } from 'preact';\nimport OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport ConsentCheckboxLabel from '../internal/ConsentCheckboxLabel';\nimport { ALLOWED_COUNTRIES, rivertyConsentUrlMap } from './config';\nimport { getConsentUrl } from '../../utils/getConsentUrl';\nimport { TxVariants } from '../tx-variants';\n\nexport default class AfterPay extends OpenInvoiceContainer {\n    public static type = TxVariants.afterpay_default;\n    public static txVariants = [TxVariants.afterpay_default, TxVariants.afterpay];\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES,\n            consentCheckboxLabel: <ConsentCheckboxLabel url={getConsentUrl(props.countryCode, props.i18n?.locale, rivertyConsentUrlMap)} />\n        };\n    }\n}\n","import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { TxVariants } from '../tx-variants';\nimport { OpenInvoiceConfiguration } from '../helpers/OpenInvoiceContainer/types';\nimport { ALLOWED_COUNTRIES } from './config';\n\nexport default class AfterPayB2B extends OpenInvoiceContainer {\n    public static type = TxVariants.afterpay_b2b;\n\n    protected static defaultProps: Partial<OpenInvoiceConfiguration> = {\n        onChange: () => {},\n        data: { companyDetails: {}, personalDetails: {}, billingAddress: {}, deliveryAddress: {} },\n        visibility: {\n            companyDetails: 'editable',\n            personalDetails: 'editable',\n            billingAddress: 'editable',\n            deliveryAddress: 'editable'\n        }\n    };\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES\n        };\n    }\n}\n","import { COUNTRIES_WITH_CUSTOM_SPECIFICATION, COUNTRY, POSTAL_CODE, STREET } from '../internal/Address/constants';\nimport { AddressSpecifications } from '../internal/Address/types';\n\nconst ATOME_ADDRESS_SPECIFICATION = {\n    labels: {\n        [STREET]: 'address'\n    },\n    schema: [\n        STREET,\n        [\n            [COUNTRY, 70],\n            [POSTAL_CODE, 30]\n        ]\n    ]\n};\n\nexport const ATOME_SUPPORTED_COUNTRIES = ['ID', 'PH', 'TH', 'VN', 'JP', 'TW', 'KR', 'SG', 'MY', 'HK'];\n\n/**\n * Creates Address Specification according to the Atome UI. This specification overrides all available specifications\n *\n * This custom specification is needed in order to create the desired layout of the Atome billing address part. The usage of the\n * 'default' layout specification from the Address component does not align correctly the available fields, therefore we need to\n * create this customization.\n */\nexport const BILLING_ADDRESS_SPECIFICATION = COUNTRIES_WITH_CUSTOM_SPECIFICATION.reduce(\n    (memo: AddressSpecifications, countryCode: string) => {\n        return {\n            ...memo,\n            [countryCode]: ATOME_ADDRESS_SPECIFICATION\n        };\n    },\n    { default: ATOME_ADDRESS_SPECIFICATION }\n);\n","import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ATOME_SUPPORTED_COUNTRIES, BILLING_ADDRESS_SPECIFICATION } from './config';\nimport { TxVariants } from '../tx-variants';\n\nexport default class Atome extends OpenInvoiceContainer {\n    public static type = TxVariants.atome;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps({ ...props, ...{ visibility: { deliveryAddress: 'hidden', companyDetails: 'hidden' } } }),\n            allowedCountries: ATOME_SUPPORTED_COUNTRIES,\n            personalDetailsRequiredFields: ['firstName', 'lastName', 'telephoneNumber'],\n            billingAddressRequiredFields: ['country', 'street', 'postalCode'],\n            billingAddressSpecification: BILLING_ADDRESS_SPECIFICATION\n        };\n    }\n}\n","export const ALLOWED_COUNTRIES = ['ES', 'FR'];\n","import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ALLOWED_COUNTRIES } from './config';\nimport { TxVariants } from '../tx-variants';\n\nexport default class FacilyPay3x extends OpenInvoiceContainer {\n    public static type = TxVariants.facilypay_3x;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES\n        };\n    }\n}\n","import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ALLOWED_COUNTRIES } from './config';\nimport { TxVariants } from '../tx-variants';\n\nexport default class FacilyPay4x extends OpenInvoiceContainer {\n    public static type = TxVariants.facilypay_4x;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES\n        };\n    }\n}\n","import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ALLOWED_COUNTRIES } from './config';\nimport { TxVariants } from '../tx-variants';\n\nexport default class FacilyPay6x extends OpenInvoiceContainer {\n    public static type = TxVariants.facilypay_6x;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES\n        };\n    }\n}\n","import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ALLOWED_COUNTRIES } from './config';\nimport { TxVariants } from '../tx-variants';\n\nexport default class FacilyPay10x extends OpenInvoiceContainer {\n    public static type = TxVariants.facilypay_10x;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES\n        };\n    }\n}\n","import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ALLOWED_COUNTRIES } from './config';\nimport { TxVariants } from '../tx-variants';\n\nexport default class FacilyPay12x extends OpenInvoiceContainer {\n    public static type = TxVariants.facilypay_12x;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES\n        };\n    }\n}\n","export const ALLOWED_COUNTRIES = ['AT', 'CH', 'DE', 'NL'];\n","import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ALLOWED_COUNTRIES } from './config';\nimport { TxVariants } from '../tx-variants';\n\nexport default class RatePay extends OpenInvoiceContainer {\n    public static type = TxVariants.ratepay;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES\n        };\n    }\n}\n","import OpenInvoiceContainer from '../helpers/OpenInvoiceContainer';\nimport { ALLOWED_COUNTRIES } from './config';\nimport { TxVariants } from '../tx-variants';\n\nexport default class RatePayDirectDebit extends OpenInvoiceContainer {\n    public static type = TxVariants.ratepay_directdebit;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps({ ...props, ...{ visibility: { bankAccount: 'editable' } } }),\n            allowedCountries: props.countryCode ? [props.countryCode] : ALLOWED_COUNTRIES\n        };\n    }\n}\n","import { LedgerCurrencies } from './types';\n\nconst AMAZONPAY_GET_CHECKOUT_DETAILS_ENDPOINT = 'v1/AmazonPayUtility/getCheckoutDetails';\nconst AMAZONPAY_SIGN_STRING_ENDPOINT = 'v1/AmazonPayUtility/signString';\nconst AMAZONPAY_UPDATE_CHECKOUT_SESSION_ENDPOINT = 'v1/AmazonPayUtility/updateCheckoutSession';\n\nconst AMAZONPAY_URL_EU = 'https://static-eu.payments-amazon.com/checkout.js';\nconst AMAZONPAY_URL_US = 'https://static-na.payments-amazon.com/checkout.js';\n\nconst FALLBACK_LOCALE_EU = 'en_GB';\nconst FALLBACK_LOCALE_US = 'en_US';\n\nconst LEDGER_CURRENCIES_PER_REGION: LedgerCurrencies = {\n    EU: 'EUR',\n    UK: 'GBP',\n    US: 'USD'\n};\n\nconst SUPPORTED_LOCALES_EU = ['en_GB', 'de_DE', 'fr_FR', 'it_IT', 'es_ES'] as const;\nconst SUPPORTED_LOCALES_US = ['en_US'] as const;\n\nexport {\n    AMAZONPAY_GET_CHECKOUT_DETAILS_ENDPOINT,\n    AMAZONPAY_SIGN_STRING_ENDPOINT,\n    AMAZONPAY_UPDATE_CHECKOUT_SESSION_ENDPOINT,\n    AMAZONPAY_URL_EU,\n    AMAZONPAY_URL_US,\n    FALLBACK_LOCALE_EU,\n    FALLBACK_LOCALE_US,\n    LEDGER_CURRENCIES_PER_REGION,\n    SUPPORTED_LOCALES_EU,\n    SUPPORTED_LOCALES_US\n};\n","const CURRENCY_DECIMALS = {\n    // ZERO_DECIMAL_CURRENCIES\n    IDR: 1,\n    JPY: 1,\n    KRW: 1,\n    VND: 1,\n    BYR: 1,\n    CVE: 1,\n    DJF: 1,\n    GHC: 1,\n    GNF: 1,\n    KMF: 1,\n    PYG: 1,\n    RWF: 1,\n    UGX: 1,\n    VUV: 1,\n    XAF: 1,\n    XOF: 1,\n    XPF: 1,\n\n    // ONE_DECIMAL_CURRENCIES\n    MRO: 10,\n\n    // THREE_DECIMAL_CURRENCIES\n    BHD: 1000,\n    IQD: 1000,\n    JOD: 1000,\n    KWD: 1000,\n    OMR: 1000,\n    LYD: 1000,\n    TND: 1000\n};\n\nexport default CURRENCY_DECIMALS;\n","/** Work around solution until chromium bug is fixed https://bugs.chromium.org/p/chromium/issues/detail?id=1381996\n * We need to hardcode minimumFractionDigits for the following currencies in order to force them to have 2 decimal places and\n * not be rounded up to a major unit\n */\nexport const currencyMinorUnitsConfig = {\n    RSD: { minimumFractionDigits: 2 },\n    AFN: { minimumFractionDigits: 2 },\n    ALL: { minimumFractionDigits: 2 },\n    IRR: { minimumFractionDigits: 2 },\n    LAK: { minimumFractionDigits: 2 },\n    LBP: { minimumFractionDigits: 2 },\n    MMK: { minimumFractionDigits: 2 },\n    SOS: { minimumFractionDigits: 2 },\n    SYP: { minimumFractionDigits: 2 },\n    YER: { minimumFractionDigits: 2 },\n    IQD: { minimumFractionDigits: 3 }\n};\n","import CURRENCY_CODES from './constants/currency-codes';\nimport CURRENCY_DECIMALS from './constants/currency-decimals';\nimport { currencyMinorUnitsConfig } from './constants/currency-minor-units';\n\n/**\n * @internal\n * @param currencyCode -\n * Get divider amount\n */\nexport const getDivider = (currencyCode: string): number => CURRENCY_DECIMALS[currencyCode] || 100;\n\n/**\n * @internal\n * @param currencyCode -\n * Returns whether a CURRENCY CODE is valid\n */\nexport const isValidCurrencyCode = (currencyCode: string): boolean => !!CURRENCY_CODES[currencyCode];\n\n/**\n * @internal\n */\nexport const getCurrencyCode = (currencyCode: string): string => (isValidCurrencyCode(currencyCode) ? CURRENCY_CODES[currencyCode] : false);\n\n/**\n * @internal\n */\nexport const getDecimalAmount = (amount: number | string, currencyCode: string): number => {\n    const divider = getDivider(currencyCode);\n    return parseInt(String(amount), 10) / divider;\n};\n\n/**\n * @internal\n */\nexport const getLocalisedAmount = (amount: number, locale: string, currencyCode: string, options = {}): string => {\n    const stringAmount = amount.toString(); // Changing amount to string to avoid 0-value from returning false\n\n    const decimalAmount = getDecimalAmount(stringAmount, currencyCode);\n    const formattedLocale = locale.replace('_', '-');\n\n    const modifiedOptions = currencyMinorUnitsConfig[currencyCode] ? { ...options, ...currencyMinorUnitsConfig[currencyCode] } : options;\n    const localeOptions = {\n        style: 'currency',\n        currency: currencyCode,\n        currencyDisplay: 'symbol',\n        ...modifiedOptions\n    };\n\n    try {\n        return decimalAmount.toLocaleString(formattedLocale, localeOptions);\n    } catch (e) {\n        return stringAmount;\n    }\n};\n\n/**\n * @internal\n */\nexport const getLocalisedPercentage = (percent = 0, locale: string): string => {\n    const decimalPercent = percent / 100 / 100;\n    const localeOptions: Intl.NumberFormatOptions = {\n        style: 'percent',\n        maximumFractionDigits: 2\n    };\n\n    try {\n        return decimalPercent.toLocaleString(locale, localeOptions);\n    } catch (e) {\n        return null;\n    }\n};\n","import {\n    AMAZONPAY_URL_EU,\n    AMAZONPAY_URL_US,\n    FALLBACK_LOCALE_EU,\n    FALLBACK_LOCALE_US,\n    LEDGER_CURRENCIES_PER_REGION,\n    SUPPORTED_LOCALES_EU,\n    SUPPORTED_LOCALES_US\n} from './config';\nimport { AmazonPayButtonProps, AmazonPayButtonSettings, ChargeAmount, Currency, PayloadJSON, Region, SupportedLocale } from './types';\nimport { PaymentAmount } from '../../types/global-types';\nimport { getDecimalAmount } from '../../utils/amount-util';\n\n/**\n * Returns the AmazonPay script URL for passed region.\n * @param region - Two-letter country code in ISO 3166 format\n * @returns the AmazonPay script URL\n */\nexport function getAmazonPayUrl(region: Region): string {\n    return region === 'US' ? AMAZONPAY_URL_US : AMAZONPAY_URL_EU;\n}\n\n/**\n * Returns the AmazonPay button settings object\n * @param props -\n * @returns the AmazonPay button settings\n */\nexport function getAmazonPaySettings(props: AmazonPayButtonProps): AmazonPayButtonSettings {\n    return {\n        ...(props.buttonColor && { buttonColor: props.buttonColor }),\n        ...(props.design && { design: getDesignCode(props.design) }),\n        checkoutLanguage: getCheckoutLocale(props.locale, props.configuration.region),\n        ledgerCurrency: LEDGER_CURRENCIES_PER_REGION[props.configuration.region] || props.currency || (props.amount?.currency as Currency),\n        merchantId: props.configuration.merchantId,\n        productType: props.productType,\n        placement: props.placement,\n        sandbox: props.environment === 'TEST'\n    };\n}\n\n/**\n * Returns the fallback locale for passed region.\n * @param region - Two-letter country code in ISO 3166 format\n * @returns A fallback locale\n */\nexport function getFallbackLocale(region: Region): SupportedLocale {\n    return region === 'US' ? FALLBACK_LOCALE_US : FALLBACK_LOCALE_EU;\n}\n\n/**\n * Returns an array of supported locales for passed region.\n * @param region - Two-letter country code in ISO 3166 format\n * @returns An array of supported locales\n */\nexport function getSupportedLocales(region: Region): SupportedLocale[] {\n    const supportedLocales = region === 'US' ? SUPPORTED_LOCALES_US : SUPPORTED_LOCALES_EU;\n    return supportedLocales as unknown as SupportedLocale[];\n}\n\n/**\n * Gets a locale and matches it with one of the supported locales for the given region.\n * If there's no match, it will return the region's fallback option.\n * @param locale - Locale to be processed\n * @param region - Two-letter country code in ISO 3166 format\n * @returns A supported locale\n */\nexport function getCheckoutLocale(locale: string, region: Region): SupportedLocale {\n    const supportedLocales = getSupportedLocales(region);\n    const isSupportedLocale = supportedLocales.includes(locale as SupportedLocale);\n    const checkoutLocale = isSupportedLocale ? locale : getFallbackLocale(region);\n\n    return checkoutLocale as SupportedLocale;\n}\n\n/**\n * Gets the design code from the given alias.\n * @param design - The alias of one of the possible designs.\n * @returns A design code\n */\nexport function getDesignCode(design: string): string {\n    if (design === 'noTagline') return 'C0001';\n    return null;\n}\n\n/**\n * Returns the amount in the format Amazon expects.\n * @param amount - The amount object in the Adyen format\n * @returns the charge amount object in the Amazon format\n */\nexport function getChargeAmount(amount: PaymentAmount): ChargeAmount {\n    return {\n        amount: String(getDecimalAmount(amount.value, amount.currency)),\n        currencyCode: amount.currency as Currency\n    };\n}\n\n/**\n * Returns a PayloadJSON object.\n * @param props -\n * @returns PayloadJSON\n */\nexport function getPayloadJSON(props): PayloadJSON {\n    const { addressDetails, cancelUrl, checkoutMode, deliverySpecifications, returnUrl, merchantMetadata, chargePermissionType, recurringMetadata } =\n        props;\n\n    const { storeId } = props.configuration;\n    const isPayNow = checkoutMode === 'ProcessOrder';\n    const amount = isPayNow ? getChargeAmount(props.amount) : null;\n\n    return {\n        storeId,\n        chargePermissionType,\n        webCheckoutDetails: {\n            ...(isPayNow ? { checkoutResultReturnUrl: returnUrl } : { checkoutReviewReturnUrl: returnUrl }),\n            ...(cancelUrl && { checkoutCancelUrl: cancelUrl }),\n            ...(isPayNow && { checkoutMode })\n        },\n        ...(isPayNow && {\n            paymentDetails: {\n                chargeAmount: amount,\n                paymentIntent: 'Confirm',\n                presentmentCurrency: amount.currencyCode,\n                totalOrderAmount: amount\n            }\n        }),\n        ...(recurringMetadata && { recurringMetadata }),\n        ...(merchantMetadata && { merchantMetadata }),\n        ...(deliverySpecifications && { deliverySpecifications }),\n        ...(addressDetails && { addressDetails })\n    };\n}\n","import { httpPost } from '../../core/Services/http';\nimport { AMAZONPAY_SIGN_STRING_ENDPOINT, AMAZONPAY_UPDATE_CHECKOUT_SESSION_ENDPOINT, AMAZONPAY_GET_CHECKOUT_DETAILS_ENDPOINT } from './config';\nimport { CheckoutDetailsRequest, PayloadJSON, UpdateAmazonCheckoutSessionRequest } from './types';\n\n/**\n * Calls the Sign String endpoint to the PayloadJSON string.\n * @param loadingContext - Loading context to be used in the call\n * @param clientKey - Key to be used as a public token\n * @param payloadJSON - Object to be signed\n * @returns A promise containing the response of the call\n */\nexport function getAmazonSignature(loadingContext: string, clientKey: string, payloadJSON: PayloadJSON): Promise<any> {\n    const options = {\n        loadingContext,\n        path: `${AMAZONPAY_SIGN_STRING_ENDPOINT}?clientKey=${clientKey}`\n    };\n\n    const request = { stringToSign: JSON.stringify(payloadJSON) };\n\n    return httpPost(options, request);\n}\n\n/**\n * Calls the getCheckoutDetails details to either get the shopper details or the decline flow URL.\n * @param loadingContext - Loading context to be used in the call\n * @param clientKey - Key to be used as a public token\n * @param request - Object to sent\n * @returns A promise containing the response of the call\n */\nexport function getCheckoutDetails(loadingContext: string, clientKey: string, request: CheckoutDetailsRequest): Promise<any> {\n    const options = {\n        loadingContext,\n        path: `${AMAZONPAY_GET_CHECKOUT_DETAILS_ENDPOINT}?clientKey=${clientKey}`\n    };\n\n    return httpPost(options, request);\n}\n\n/**\n * Calls the Update Checkout Session endpoint to create an order.\n * @param loadingContext - Loading context to be used in the call\n * @param clientKey - Key to be used as a public token\n * @param data -\n * @returns A promise containing the response of the call\n */\nexport function updateAmazonCheckoutSession(loadingContext: string, clientKey: string, data: UpdateAmazonCheckoutSessionRequest): Promise<any> {\n    const options = {\n        loadingContext,\n        path: `${AMAZONPAY_UPDATE_CHECKOUT_SESSION_ENDPOINT}?clientKey=${clientKey}`\n    };\n\n    return httpPost(options, data);\n}\n","import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport { getAmazonSignature } from '../services';\nimport { getAmazonPaySettings, getPayloadJSON } from '../utils';\nimport { AmazonPayButtonProps, CheckoutSessionConfig, PayloadJSON } from '../types';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\n\nexport default function AmazonPayButton(props: AmazonPayButtonProps) {\n    const { loadingContext } = useCoreContext();\n    const { amazonRef, configuration = {} } = props;\n    const [signature, setSignature] = useState<string>(null);\n    const payloadJSON: PayloadJSON = getPayloadJSON(props);\n    const settings = getAmazonPaySettings(props);\n\n    const handleOnClick = () => {\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        new Promise(props.onClick).then(this.initCheckout).catch(error => {\n            if (props.onError) props.onError(error, this.componentRef);\n        });\n    };\n\n    const renderAmazonPayButton = (): void => {\n        const amazonPayButton = amazonRef.Pay.renderButton('#amazonPayButton', settings);\n        amazonPayButton.onClick(handleOnClick);\n    };\n\n    this.initCheckout = () => {\n        const checkoutSessionConfig: CheckoutSessionConfig = {\n            payloadJSON: JSON.stringify(payloadJSON),\n            publicKeyId: configuration.publicKeyId,\n            signature\n        };\n\n        amazonRef.Pay.initCheckout({\n            ...settings,\n            createCheckoutSessionConfig: checkoutSessionConfig\n        });\n    };\n\n    useEffect(() => {\n        const { clientKey } = props;\n\n        getAmazonSignature(loadingContext, clientKey, payloadJSON)\n            .then(response => {\n                if (!response?.signature) return console.error('Could not get AmazonPay signature');\n                setSignature(response.signature);\n                if (props.showPayButton) renderAmazonPayButton();\n            })\n            .catch(error => {\n                console.error(error);\n                if (props.onError) props.onError(error, this.componentRef);\n            });\n    }, []);\n\n    if (!props.showPayButton) return null;\n    return <div className=\"adyen-checkout__amazonpay__button\" id=\"amazonPayButton\" />;\n}\n","import { h } from 'preact';\nimport { useEffect } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { ChangeActionOptions, ChangePaymentDetailsButtonProps } from '../types';\n\nexport default function ChangePaymentDetailsButton(props: ChangePaymentDetailsButtonProps) {\n    const { i18n } = useCoreContext();\n    const { amazonRef, amazonCheckoutSessionId } = props;\n\n    useEffect(() => {\n        const changeActionOptions: ChangeActionOptions = {\n            amazonCheckoutSessionId,\n            changeAction: 'changeAddress'\n        };\n\n        amazonRef.Pay.bindChangeAction('.adyen-checkout__amazonpay__button--changeAddress', changeActionOptions);\n    }, []);\n\n    return (\n        <button type=\"button\" className=\"adyen-checkout__button adyen-checkout__button--ghost adyen-checkout__amazonpay__button--changeAddress\">\n            {i18n.get('amazonpay.changePaymentDetails')}\n        </button>\n    );\n}\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Button from '../../internal/Button';\nimport { updateAmazonCheckoutSession } from '../services';\nimport { OrderButtonProps, UpdateAmazonCheckoutSessionRequest } from '../types';\n\nexport default function OrderButton(props: OrderButtonProps) {\n    const { i18n, loadingContext } = useCoreContext();\n\n    this.createOrder = () => {\n        const { amazonCheckoutSessionId, amount, clientKey, chargePermissionType, publicKeyId, region, recurringMetadata, returnUrl } = props;\n        const request: UpdateAmazonCheckoutSessionRequest = {\n            amount,\n            chargePermissionType,\n            checkoutResultReturnUrl: returnUrl,\n            checkoutSessionId: amazonCheckoutSessionId,\n            publicKeyId,\n            recurringMetadata,\n            region\n        };\n\n        updateAmazonCheckoutSession(loadingContext, clientKey, request)\n            .then(response => {\n                if (!response?.action?.type) return console.error(response.errorMessage || 'Could not get the AmazonPay URL');\n                if (response.action.type === 'redirect') window.location.assign(response.action.url);\n            })\n            .catch(error => {\n                if (props.onError) props.onError(error, this.componentRef);\n            });\n    };\n\n    return <Button classNameModifiers={['standalone', 'pay']} label={i18n.get('confirmPurchase')} onClick={this.createOrder} />;\n}\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { SignOutButtonProps } from '../types';\n\nexport default function SignOutButton(props: SignOutButtonProps) {\n    const { i18n } = useCoreContext();\n\n    const handleClick = () => {\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        new Promise(props.onSignOut)\n            .then(() => {\n                props.amazonRef.Pay.signout();\n            })\n            .catch(console.error);\n    };\n\n    return (\n        <button\n            type=\"button\"\n            className=\"adyen-checkout__button  adyen-checkout__button--ghost adyen-checkout__amazonpay__button--signOut\"\n            onClick={handleClick}\n        >\n            {i18n.get('amazonpay.signout')}\n        </button>\n    );\n}\n","import { h } from 'preact';\nimport { useState, useEffect, useRef } from 'preact/hooks';\nimport Spinner from '../../internal/Spinner';\nimport { getAmazonPayUrl } from '../utils';\nimport { AmazonPayComponentProps } from '../types';\nimport AmazonPayButton from './AmazonPayButton';\nimport ChangePaymentDetailsButton from './ChangePaymentDetailsButton';\nimport OrderButton from './OrderButton';\nimport SignOutButton from './SignOutButton';\nimport Script from '../../../utils/Script';\n\nexport default function AmazonPayComponent(props: AmazonPayComponentProps) {\n    const [status, setStatus] = useState('pending');\n    const amazonPayButtonRef = useRef(null);\n    const orderButtonRef = useRef(null);\n\n    const handleLoad = () => {\n        setStatus('ready');\n    };\n\n    this.getSubmitFunction = () => {\n        if (amazonPayButtonRef.current && amazonPayButtonRef.current.initCheckout) return () => amazonPayButtonRef.current.initCheckout();\n        if (orderButtonRef.current && orderButtonRef.current.createOrder) return () => orderButtonRef.current.createOrder();\n    };\n\n    useEffect(() => {\n        const src = getAmazonPayUrl(props.configuration.region);\n        const script = new Script(src);\n        if (window.amazon) {\n            handleLoad();\n        } else {\n            void script.load().then(handleLoad);\n        }\n\n        return () => {\n            script.remove();\n        };\n    }, []);\n\n    if (status === 'pending') {\n        return (\n            <div className=\"adyen-checkout__amazonpay\">\n                <div className=\"adyen-checkout__amazonpay__status adyen-checkout__amazonpay__status--pending\">\n                    <Spinner />\n                </div>\n            </div>\n        );\n    }\n\n    if (props.showSignOutButton) {\n        return (\n            <div className=\"adyen-checkout__amazonpay\">\n                <SignOutButton amazonRef={window.amazon} onSignOut={props.onSignOut} />\n            </div>\n        );\n    }\n\n    if (props.amazonCheckoutSessionId) {\n        return (\n            <div className=\"adyen-checkout__amazonpay\">\n                {props.showOrderButton && (\n                    <OrderButton\n                        amazonCheckoutSessionId={props.amazonCheckoutSessionId}\n                        amount={props.amount}\n                        chargePermissionType={props.chargePermissionType}\n                        recurringMetadata={props.recurringMetadata}\n                        clientKey={props.clientKey}\n                        onError={props.onError}\n                        publicKeyId={props.configuration?.publicKeyId}\n                        region={props.configuration?.region}\n                        returnUrl={props.returnUrl}\n                        ref={orderButtonRef}\n                    />\n                )}\n\n                {props.showChangePaymentDetailsButton && (\n                    <ChangePaymentDetailsButton amazonCheckoutSessionId={props.amazonCheckoutSessionId} amazonRef={window.amazon} />\n                )}\n            </div>\n        );\n    }\n\n    return (\n        <div className=\"adyen-checkout__amazonpay\">\n            <AmazonPayButton {...props} showPayButton={this.props.showPayButton} amazonRef={window.amazon} ref={amazonPayButtonRef} />\n        </div>\n    );\n}\n","import { AmazonPayConfiguration } from './types';\n\nconst defaultProps: Partial<AmazonPayConfiguration> = {\n    cancelUrl: typeof window !== 'undefined' ? window.location.href : '',\n    configuration: {},\n    environment: 'TEST',\n    locale: 'en_GB',\n    placement: 'Cart',\n    productType: 'PayAndShip',\n    returnUrl: typeof window !== 'undefined' ? window.location.href : '',\n    showOrderButton: true,\n    showChangePaymentDetailsButton: false,\n    showSignOutButton: false,\n    onClick: resolve => resolve(),\n    onSignOut: resolve => resolve(),\n    isExpress: false\n};\n\nexport default defaultProps;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport AmazonPayComponent from './components/AmazonPayComponent';\nimport { AmazonPayElementData, AmazonPayConfiguration, CheckoutDetailsRequest } from './types';\nimport defaultProps from './defaultProps';\nimport { getCheckoutDetails } from './services';\nimport './AmazonPay.scss';\nimport { TxVariants } from '../tx-variants';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { ANALYTICS_EXPRESS_PAGES_ARRAY, ANALYTICS_RENDERED_STR } from '../../core/Analytics/constants';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\n\nexport class AmazonPayElement extends UIElement<AmazonPayConfiguration> {\n    public static type = TxVariants.amazonpay;\n\n    protected static defaultProps = defaultProps;\n\n    formatProps(props) {\n        return {\n            ...props,\n            checkoutMode: props.isDropin ? 'ProcessOrder' : props.checkoutMode,\n            environment: props.environment.toUpperCase(),\n            locale: props.locale.replace('-', '_'),\n            productType: props.isDropin && !props.addressDetails ? 'PayOnly' : props.productType\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData(): AmazonPayElementData {\n        const { amazonCheckoutSessionId: checkoutSessionId } = this.props;\n        return {\n            paymentMethod: {\n                type: AmazonPayElement.type,\n                ...(checkoutSessionId && { checkoutSessionId })\n            },\n            browserInfo: this.browserInfo\n        };\n    }\n\n    protected submitAnalytics(analyticsObj: AnalyticsEvent) {\n        // Analytics will need to know about this.props.isExpress & this.props.expressPage\n        if (analyticsObj instanceof AnalyticsInfoEvent && analyticsObj.type === ANALYTICS_RENDERED_STR) {\n            const { isExpress, expressPage } = this.props;\n            const hasExpressPage = expressPage && ANALYTICS_EXPRESS_PAGES_ARRAY.includes(expressPage);\n\n            if (typeof isExpress === 'boolean') {\n                analyticsObj.isExpress = isExpress;\n            }\n\n            if (isExpress === true && hasExpressPage) {\n                analyticsObj.expressPage = expressPage; // We only care about the expressPage value if isExpress is true\n            }\n        }\n\n        super.submitAnalytics(analyticsObj);\n    }\n\n    getShopperDetails() {\n        const { amazonCheckoutSessionId, configuration = {}, loadingContext, clientKey } = this.props;\n        if (!amazonCheckoutSessionId) return console.error('Could not shopper details. Missing checkoutSessionId.');\n\n        const request: CheckoutDetailsRequest = {\n            checkoutSessionId: amazonCheckoutSessionId,\n            getDeliveryAddress: true,\n            publicKeyId: configuration.publicKeyId,\n            region: configuration.region\n        };\n\n        return getCheckoutDetails(loadingContext, clientKey, request);\n    }\n\n    public handleDeclineFlow() {\n        const { amazonCheckoutSessionId, configuration = {}, loadingContext, clientKey } = this.props;\n        if (!amazonCheckoutSessionId) return console.error('Could handle the decline flow. Missing checkoutSessionId.');\n\n        const request: CheckoutDetailsRequest = {\n            checkoutSessionId: amazonCheckoutSessionId,\n            getDeclineFlowUrl: true,\n            publicKeyId: configuration.publicKeyId,\n            region: configuration.region\n        };\n\n        getCheckoutDetails(loadingContext, clientKey, request)\n            .then((response = {}) => {\n                if (!response?.declineFlowUrl) throw response;\n                window.location.assign(response.declineFlowUrl);\n            })\n            .catch(error => {\n                if (this.props.onError) this.props.onError(error, this.componentRef);\n            });\n    }\n\n    get isValid() {\n        return true;\n    }\n\n    get browserInfo() {\n        return collectBrowserInfo();\n    }\n\n    public submit(): void {\n        const amazonComponentSubmit = this.componentRef && this.componentRef.getSubmitFunction();\n        if (amazonComponentSubmit) {\n            return amazonComponentSubmit();\n        }\n        this.makePaymentsCall().then(sanitizeResponse).then(verifyPaymentDidNotFail).then(this.handleResponse).catch(this.handleFailedResult);\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <AmazonPayComponent\n                    ref={ref => {\n                        this.componentRef = ref;\n                    }}\n                    showPayButton={this.props.showPayButton}\n                    onClick={this.props.onClick}\n                    onError={this.props.onError}\n                    onSignOut={this.props.onSignOut}\n                    {...this.props}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default AmazonPayElement;\n","import { h } from 'preact';\nimport type { ApplePayButtonStyle, ApplePayButtonType } from '../types';\nimport './ApplePayButton.scss';\n\ninterface ApplePayButtonProps {\n    buttonStyle: ApplePayButtonStyle;\n    buttonType: ApplePayButtonType;\n    buttonLocale: string;\n    onClick(): void;\n}\n\nconst ApplePayButton = ({ buttonStyle, buttonType, buttonLocale, onClick }: ApplePayButtonProps) => {\n    return <apple-pay-button data-testid=\"apple-pay-button\" buttonstyle={buttonStyle} type={buttonType} locale={buttonLocale} onclick={onClick} />;\n};\n\nexport default ApplePayButton;\n","import { ApplePayPaymentAuthorizationResult } from '../types';\n\nexport interface ApplePayServiceOptions {\n    version: number;\n    onValidateMerchant: (resolve, reject, url) => void;\n    onError: (error?: unknown) => void;\n    onCancel?: (event: ApplePayJS.Event) => void;\n    onPaymentMethodSelected?: (resolve, reject, event: ApplePayJS.ApplePayPaymentMethodSelectedEvent) => void;\n    onShippingMethodSelected?: (resolve, reject, event: ApplePayJS.ApplePayShippingMethodSelectedEvent) => void;\n    onShippingContactSelected?: (resolve, reject, event: ApplePayJS.ApplePayShippingContactSelectedEvent) => void;\n    onPaymentAuthorized: (\n        resolve: (result: ApplePayPaymentAuthorizationResult) => void,\n        reject: (result: ApplePayPaymentAuthorizationResult) => void,\n        event: ApplePayJS.ApplePayPaymentAuthorizedEvent\n    ) => void;\n}\n\nclass ApplePayService {\n    private session: ApplePaySession;\n    private readonly options: ApplePayServiceOptions;\n\n    constructor(paymentRequest: ApplePayJS.ApplePayPaymentRequest, options: ApplePayServiceOptions) {\n        this.options = options;\n\n        this.session = new ApplePaySession(options.version, paymentRequest);\n        this.session.onvalidatemerchant = event => {\n            void this.onvalidatemerchant(event, options.onValidateMerchant);\n        };\n        this.session.onpaymentauthorized = event => {\n            void this.onpaymentauthorized(event, options.onPaymentAuthorized);\n        };\n\n        this.session.oncancel = event => {\n            this.oncancel(event, options.onCancel);\n        };\n\n        if (typeof options.onPaymentMethodSelected === 'function') {\n            this.session.onpaymentmethodselected = event => {\n                void this.onpaymentmethodselected(event, options.onPaymentMethodSelected);\n            };\n        }\n\n        if (typeof options.onShippingContactSelected === 'function') {\n            this.session.onshippingcontactselected = event => {\n                void this.onshippingcontactselected(event, options.onShippingContactSelected);\n            };\n        }\n\n        if (typeof options.onShippingMethodSelected === 'function') {\n            this.session.onshippingmethodselected = event => {\n                void this.onshippingmethodselected(event, options.onShippingMethodSelected);\n            };\n        }\n    }\n\n    /**\n     * Begins the merchant validation process.\n     * When this method is called, the payment sheet is presented and the merchant validation process is initiated.\n     * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778001-begin}\n     */\n    begin() {\n        return this.session.begin();\n    }\n\n    /**\n     * An event handler that is called when the payment sheet is displayed.\n     * Use this attribute to request and return a merchant session.\n     * @param event - An ApplePayValidateMerchantEvent object (contains validationURL)\n     * @param onValidateMerchant - A promise implemented by the merchant that will resolve with the merchantSession\n     * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/apple_pay_js_api/providing_merchant_validation}\n     */\n    onvalidatemerchant(event: ApplePayJS.ApplePayValidateMerchantEvent, onValidateMerchant) {\n        return new Promise((resolve, reject) => onValidateMerchant(resolve, reject, event.validationURL))\n            .then(response => {\n                this.session.completeMerchantValidation(response);\n            })\n            .catch(error => {\n                console.error(error);\n                this.session.abort();\n                this.options.onError(error);\n            });\n    }\n\n    /**\n     * An event handler that is called when the user has authorized the Apple Pay payment with Touch ID, Face ID, or passcode.\n     * The onpaymentauthorized function must complete the payment and respond by calling completePayment before the 30 second timeout.\n     *\n     * @param event - The event parameter contains the payment (ApplePayPayment) attribute.\n     * @param onPaymentAuthorized - A promise that will complete the payment when resolved. Use this promise to process the payment.\n     * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778020-onpaymentauthorized}\n     */\n    onpaymentauthorized(\n        event: ApplePayJS.ApplePayPaymentAuthorizedEvent,\n        onPaymentAuthorized: ApplePayServiceOptions['onPaymentAuthorized']\n    ): Promise<void> {\n        return new Promise((resolve, reject) => onPaymentAuthorized(resolve, reject, event))\n            .then((result: ApplePayPaymentAuthorizationResult) => {\n                this.session.completePayment(result);\n            })\n            .catch((result: ApplePayPaymentAuthorizationResult) => {\n                this.session.completePayment(result);\n            });\n    }\n\n    /**\n     * An event handler that is called when a new payment method is selected.\n     * The onpaymentmethodselected function must resolve before the 30 second timeout\n     *\n     * @param event - The event parameter contains the payment (ApplePayPayment) attribute.\n     * @param onPaymentMethodSelected - A promise that will complete the payment when resolved. Use this promise to process the payment.\n     * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778013-onpaymentmethodselected}\n     */\n    onpaymentmethodselected(event: ApplePayJS.ApplePayPaymentMethodSelectedEvent, onPaymentMethodSelected) {\n        return new Promise((resolve, reject) => onPaymentMethodSelected(resolve, reject, event))\n            .then((paymentMethodUpdate: ApplePayJS.ApplePayPaymentMethodUpdate) => {\n                this.session.completePaymentMethodSelection(paymentMethodUpdate);\n            })\n            .catch((paymentMethodUpdate: ApplePayJS.ApplePayPaymentMethodUpdate) => {\n                this.session.completePaymentMethodSelection(paymentMethodUpdate);\n            });\n    }\n\n    /**\n     * An event handler that is called when a new payment method is selected.\n     * The onpaymentmethodselected function must resolve before the 30 second timeout\n     * @param event - The event parameter contains the shippingContact attribute.\n     * @param onShippingContactSelected - A promise that will complete the selection of a shipping contact with an update.\n     * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778009-onshippingcontactselected}\n     */\n    onshippingcontactselected(event: ApplePayJS.ApplePayShippingContactSelectedEvent, onShippingContactSelected) {\n        return new Promise((resolve, reject) => onShippingContactSelected(resolve, reject, event))\n            .then((shippingContactUpdate: ApplePayJS.ApplePayShippingContactUpdate) => {\n                this.session.completeShippingContactSelection(shippingContactUpdate);\n            })\n            .catch((shippingContactUpdate: ApplePayJS.ApplePayShippingContactUpdate) => {\n                this.session.completeShippingContactSelection(shippingContactUpdate);\n            });\n    }\n\n    /**\n     * An event handler that is called when a new payment method is selected.\n     * The onpaymentmethodselected function must resolve before the 30 second timeout\n     * @param event - The event parameter contains the shippingMethod attribute.\n     * @param onShippingMethodSelected - A promise that will complete the selection of a shipping method with an update.\n     * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778009-onshippingcontactselected}\n     */\n    onshippingmethodselected(event: ApplePayJS.ApplePayShippingMethodSelectedEvent, onShippingMethodSelected) {\n        return new Promise((resolve, reject) => onShippingMethodSelected(resolve, reject, event))\n            .then((shippingMethodUpdate: ApplePayJS.ApplePayShippingMethodUpdate) => {\n                this.session.completeShippingMethodSelection(shippingMethodUpdate);\n            })\n            .catch((shippingMethodUpdate: ApplePayJS.ApplePayShippingMethodUpdate) => {\n                this.session.completeShippingMethodSelection(shippingMethodUpdate);\n            });\n    }\n\n    /**\n     * An event handler that is automatically called when the payment UI is dismissed.\n     * This function can be called even after an onpaymentauthorized event has been dispatched.\n     * @param event -\n     * @param onCancel -\n     * @see {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778029-oncancel}\n     */\n    oncancel(event: ApplePayJS.Event, onCancel): void {\n        onCancel(event);\n    }\n}\n\nexport default ApplePayService;\n","import { getDecimalAmount } from '../../../utils/amount-util';\nimport { PaymentAmount } from '../../../types/global-types';\n\nconst formatAmount = (amount: PaymentAmount) => String(getDecimalAmount(amount.value, amount.currency));\n\nexport const preparePaymentRequest = (paymentRequest): ApplePayJS.ApplePayPaymentRequest => {\n    const { countryCode, companyName, amount, ...props } = paymentRequest;\n    const formattedAmount = formatAmount(amount);\n\n    if (!countryCode) {\n        console.warn('Apple Pay - Make sure to set the countryCode in the AdyenCheckout configuration or in the Checkout Session creation');\n    }\n\n    return {\n        countryCode,\n        currencyCode: amount.currency,\n\n        total: {\n            label: props.totalPriceLabel,\n            amount: formattedAmount,\n            type: props.totalPriceStatus\n        },\n\n        lineItems: props.lineItems,\n        shippingContactEditingMode: props.shippingContactEditingMode,\n        shippingMethods: props.shippingMethods,\n        shippingType: props.shippingType,\n\n        recurringPaymentRequest: props.recurringPaymentRequest,\n\n        merchantCapabilities: props.merchantCapabilities,\n        supportedCountries: props.supportedCountries,\n        supportedNetworks: props.supportedNetworks,\n\n        requiredShippingContactFields: props.requiredShippingContactFields,\n        requiredBillingContactFields: props.requiredBillingContactFields,\n\n        billingContact: props.billingContact,\n        shippingContact: props.shippingContact,\n\n        applicationData: props.applicationData\n    };\n};\n\nexport default preparePaymentRequest;\n","import { AddressData } from '../../../types/global-types';\n\n/**\n * This function formats Apple Pay contact format to Adyen address format\n *\n * Setting 'houseNumberOrName' to ZZ won't affect the AVS check, and it will make the algorithm take the\n * house number from the 'street' property.\n */\nexport function formatApplePayContactToAdyenAddressFormat(\n    paymentContact: ApplePayJS.ApplePayPaymentContact,\n    isDeliveryAddress?: boolean\n): AddressData | undefined {\n    if (!paymentContact) {\n        return;\n    }\n\n    return {\n        city: paymentContact.locality,\n        country: paymentContact.countryCode,\n        houseNumberOrName: 'ZZ',\n        postalCode: paymentContact.postalCode,\n        street: paymentContact.addressLines?.join(' ').trim(),\n        ...(paymentContact.administrativeArea && { stateOrProvince: paymentContact.administrativeArea }),\n        ...(isDeliveryAddress && {\n            firstName: paymentContact.givenName,\n            lastName: paymentContact.familyName\n        })\n    };\n}\n","import Script from '../../../utils/Script';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\n\nexport const APPLE_PAY_SDK_URL = 'https://applepay.cdn-apple.com/jsapi/1.latest/apple-pay-sdk.js';\n\nclass ApplePaySdkLoader {\n    private sdkLoadingPromise: Promise<void>;\n\n    public async load(): Promise<ApplePaySession> {\n        try {\n            const scriptElement = new Script(APPLE_PAY_SDK_URL, 'body', { crossOrigin: 'anonymous' });\n            this.sdkLoadingPromise = scriptElement.load();\n            await this.sdkLoadingPromise;\n            return window?.ApplePaySession;\n        } catch (error) {\n            throw new AdyenCheckoutError('SCRIPT_ERROR', 'ApplePaySDK failed to load', { cause: error });\n        }\n    }\n\n    public isSdkLoaded(): Promise<void> {\n        if (this.sdkLoadingPromise === undefined) {\n            return Promise.reject();\n        }\n\n        return this.sdkLoadingPromise;\n    }\n}\n\nexport default ApplePaySdkLoader;\n","/**\n * Returns true if the Checkout is hosted within an iframe, false otherwise.\n */\nconst detectInIframe = () => {\n    if (typeof window !== 'undefined') {\n        try {\n            return window.self !== window.top;\n        } catch (e) {\n            // In some cross-origin scenarios, accessing window.top might throw an error.\n            // In such cases, it is likely in an iframe.\n            return true;\n        }\n    } else {\n        // SSR\n        return false;\n    }\n};\n\nexport { detectInIframe };\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ApplePayButton from './components/ApplePayButton';\nimport ApplePayService from './services/ApplePayService';\nimport base64 from '../../utils/base64';\nimport defaultProps from './defaultProps';\nimport { httpPost } from '../../core/Services/http';\nimport { preparePaymentRequest } from './utils/payment-request';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { DecodeObject } from '../../types/global-types';\nimport { TxVariants } from '../tx-variants';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport {\n    ANALYTICS_EXPRESS_PAGES_ARRAY,\n    ANALYTICS_INSTANT_PAYMENT_BUTTON,\n    ANALYTICS_RENDERED_STR,\n    ANALYTICS_SELECTED_STR\n} from '../../core/Analytics/constants';\nimport { resolveSupportedVersion } from './utils/resolve-supported-version';\nimport { formatApplePayContactToAdyenAddressFormat } from './utils/format-applepay-contact-to-adyen-format';\nimport { mapBrands } from './utils/map-adyen-brands-to-applepay-brands';\nimport ApplePaySdkLoader from './services/ApplePaySdkLoader';\nimport { detectInIframe } from '../../utils/detectInIframe';\nimport type { ApplePayConfiguration, ApplePayElementData, ApplePayPaymentOrderDetails, ApplePaySessionRequest } from './types';\nimport type { ICore } from '../../core/types';\nimport type { PaymentResponseData, RawPaymentResponse } from '../../types/global-types';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\n\nconst LATEST_APPLE_PAY_VERSION = 14;\n\nclass ApplePayElement extends UIElement<ApplePayConfiguration> {\n    public static type = TxVariants.applepay;\n\n    protected static defaultProps = defaultProps;\n\n    private sdkLoader: ApplePaySdkLoader;\n    private applePayVersionNumber: number = undefined;\n\n    constructor(checkout: ICore, props?: ApplePayConfiguration) {\n        super(checkout, props);\n\n        const { isExpress, onShippingContactSelected, onShippingMethodSelected } = this.props;\n\n        if (isExpress === false && (onShippingContactSelected || onShippingMethodSelected)) {\n            throw new AdyenCheckoutError(\n                'IMPLEMENTATION_ERROR',\n                'ApplePay - You must set \"isExpress\" flag to \"true\" in order to use \"onShippingContactSelected\" and/or \"onShippingMethodSelected\" callbacks'\n            );\n        }\n\n        this.startSession = this.startSession.bind(this);\n        this.submit = this.submit.bind(this);\n        this.validateMerchant = this.validateMerchant.bind(this);\n        this.collectOrderTrackingDetailsIfNeeded = this.collectOrderTrackingDetailsIfNeeded.bind(this);\n        this.handleAuthorization = this.handleAuthorization.bind(this);\n        this.defineApplePayVersionNumber = this.defineApplePayVersionNumber.bind(this);\n        this.configureApplePayWebOptions = this.configureApplePayWebOptions.bind(this);\n\n        this.sdkLoader = new ApplePaySdkLoader();\n\n        void this.sdkLoader\n            .load()\n            .then(this.defineApplePayVersionNumber)\n            .then(this.configureApplePayWebOptions)\n            .catch(error => {\n                this.handleError(error);\n            });\n    }\n\n    /**\n     * Formats the component props\n     */\n    protected override formatProps(props: ApplePayConfiguration): ApplePayConfiguration {\n        // @ts-ignore TODO: Fix brands prop\n        const supportedNetworks = props.brands?.length ? mapBrands(props.brands) : props.supportedNetworks;\n\n        return {\n            ...props,\n            configuration: props.configuration,\n            supportedNetworks,\n            buttonLocale: props.buttonLocale ?? props.i18n?.locale,\n            totalPriceLabel: props.totalPriceLabel || props.configuration?.merchantName,\n            renderApplePayCodeAs: props.renderApplePayCodeAs ?? (detectInIframe() ? 'window' : 'modal')\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    protected override formatData(): ApplePayElementData {\n        const { applePayToken, billingAddress, deliveryAddress } = this.state;\n        const { isExpress } = this.props;\n\n        return {\n            paymentMethod: {\n                type: ApplePayElement.type,\n                applePayToken,\n                ...(isExpress && { subtype: 'express' })\n            },\n            ...(billingAddress && { billingAddress }),\n            ...(deliveryAddress && { deliveryAddress })\n        };\n    }\n\n    protected submitAnalytics(analyticsObj: AnalyticsEvent) {\n        // Analytics will need to know about this.props.isExpress & this.props.expressPage\n        if (analyticsObj instanceof AnalyticsInfoEvent && analyticsObj.type === ANALYTICS_RENDERED_STR) {\n            const { isExpress, expressPage } = this.props;\n            const hasExpressPage = expressPage && ANALYTICS_EXPRESS_PAGES_ARRAY.includes(expressPage);\n\n            if (typeof isExpress === 'boolean') {\n                analyticsObj.isExpress = isExpress;\n            }\n\n            if (isExpress === true && hasExpressPage) {\n                analyticsObj.expressPage = expressPage; // We only care about the expressPage value if isExpress is true\n            }\n        }\n\n        super.submitAnalytics(analyticsObj);\n    }\n\n    public override submit = (): void => {\n        // Analytics\n        if (this.props.isInstantPayment) {\n            const event = new AnalyticsInfoEvent({\n                type: ANALYTICS_SELECTED_STR,\n                target: ANALYTICS_INSTANT_PAYMENT_BUTTON\n            });\n            this.submitAnalytics(event);\n        }\n        void this.startSession();\n    };\n\n    public get isValid(): boolean {\n        return true;\n    }\n\n    /**\n     * This API is only intended for upstreaming or defaulting to Apple Pay, all other scenarios should continue to\n     * use canMakePayments(). For Safari browsers, this API will indicate whether there is a card available to make\n     * payments. For third-party browsers a new status of paymentCredentialStatusUnknown will be returned. This does\n     * not mean there are no cards available, it means the status cannot be determined and as such defaulting\n     * and upstreaming should still be considered.\n     *\n     * {@link https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/4440085-applepaycapabilities}\n     * @param merchantIdentifier\n     */\n    public async applePayCapabilities(merchantIdentifier?: string): Promise<ApplePayJS.PaymentCredentialStatusResponse> {\n        const identifier = merchantIdentifier || this.props.configuration.merchantId;\n\n        try {\n            await this.sdkLoader.isSdkLoaded();\n            return await ApplePaySession?.applePayCapabilities(identifier);\n        } catch (error) {\n            throw new AdyenCheckoutError('ERROR', 'Apple Pay: Error when requesting applePayCapabilities()', { cause: error });\n        }\n    }\n\n    /**\n     * Determines if Apple Pay component can be displayed or not\n     */\n    public override async isAvailable(): Promise<void> {\n        if (window.location.protocol !== 'https:') {\n            return Promise.reject(new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'Trying to start an Apple Pay session from an insecure document'));\n        }\n\n        try {\n            await this.sdkLoader.isSdkLoaded();\n\n            if (ApplePaySession?.canMakePayments()) {\n                return Promise.resolve();\n            }\n\n            return Promise.reject(new AdyenCheckoutError('ERROR', 'Apple Pay is not available on this device'));\n        } catch (error) {\n            return Promise.reject(new AdyenCheckoutError('ERROR', 'Apple Pay SDK failed to load', { cause: error }));\n        }\n    }\n\n    /**\n     * Sets the Apple Pay version available for the shopper.\n     * This code needs to be executed once the  Apple Pay SDK is fully loaded\n     * @private\n     */\n    private defineApplePayVersionNumber() {\n        if (window.location.protocol !== 'https:') return;\n        this.applePayVersionNumber = this.props.version || resolveSupportedVersion(LATEST_APPLE_PAY_VERSION);\n    }\n\n    /**\n     * Sets the configuration/callbacks that pertain to the Apple Pay code overlay/modal.\n     * @private\n     */\n    private configureApplePayWebOptions() {\n        if (window.ApplePayWebOptions) {\n            const { renderApplePayCodeAs, onApplePayCodeClose } = this.props;\n\n            window.ApplePayWebOptions.set({\n                renderApplePayCodeAs,\n                ...(onApplePayCodeClose && { onApplePayCodeClose })\n            });\n        }\n    }\n\n    private startSession() {\n        const { onValidateMerchant, onPaymentMethodSelected, onShippingMethodSelected, onShippingContactSelected } = this.props;\n\n        const paymentRequest = preparePaymentRequest({\n            companyName: this.props.configuration.merchantName,\n            countryCode: this.core.options.countryCode,\n            ...this.props\n        });\n\n        const session = new ApplePayService(paymentRequest, {\n            version: this.applePayVersionNumber,\n            onError: (error: unknown) => {\n                this.handleError(\n                    new AdyenCheckoutError('ERROR', 'ApplePay - Something went wrong on ApplePayService', {\n                        cause: error\n                    })\n                );\n            },\n            onCancel: event => {\n                this.handleError(new AdyenCheckoutError('CANCEL', 'ApplePay UI dismissed', { cause: event }));\n            },\n            onPaymentMethodSelected,\n            onShippingMethodSelected,\n            onShippingContactSelected,\n            onValidateMerchant: onValidateMerchant || this.validateMerchant,\n            onPaymentAuthorized: (resolve, reject, event) => {\n                const billingAddress = formatApplePayContactToAdyenAddressFormat(event.payment.billingContact);\n                const deliveryAddress = formatApplePayContactToAdyenAddressFormat(event.payment.shippingContact, true);\n\n                this.setState({\n                    applePayToken: btoa(JSON.stringify(event.payment.token.paymentData)),\n                    authorizedEvent: event,\n                    ...(billingAddress && { billingAddress }),\n                    ...(deliveryAddress && { deliveryAddress })\n                });\n\n                this.handleAuthorization()\n                    .then(this.makePaymentsCall)\n                    .then(sanitizeResponse)\n                    .then(verifyPaymentDidNotFail)\n                    .then(this.collectOrderTrackingDetailsIfNeeded)\n                    .then(({ paymentResponse, orderDetails }) => {\n                        resolve({\n                            status: ApplePaySession.STATUS_SUCCESS,\n                            ...(orderDetails && { orderDetails })\n                        });\n                        return paymentResponse;\n                    })\n                    .then(paymentResponse => {\n                        this.handleResponse(paymentResponse);\n                    })\n                    .catch((paymentResponse?: RawPaymentResponse) => {\n                        const errors = paymentResponse?.error?.applePayError;\n\n                        reject({\n                            status: ApplePaySession.STATUS_FAILURE,\n                            errors: errors ? (Array.isArray(errors) ? errors : [errors]) : undefined\n                        });\n\n                        const responseWithError: RawPaymentResponse = {\n                            ...paymentResponse,\n                            error: {\n                                applePayError: errors\n                            }\n                        };\n\n                        this.handleFailedResult(responseWithError);\n                    });\n            }\n        });\n\n        return new Promise((resolve, reject) => this.props.onClick(resolve, reject))\n            .then(() => {\n                session.begin();\n            })\n            .catch(() => ({\n                // Swallow exception triggered by onClick reject\n            }));\n    }\n\n    /**\n     * Call the 'onAuthorized' callback if available.\n     * Must be resolved/reject for the payment flow to continue\n     *\n     * @private\n     */\n    private async handleAuthorization(): Promise<void> {\n        return new Promise<void>((resolve, reject) => {\n            if (!this.props.onAuthorized) {\n                resolve();\n            }\n\n            const { authorizedEvent, billingAddress, deliveryAddress } = this.state;\n\n            this.props.onAuthorized(\n                {\n                    authorizedEvent,\n                    ...(billingAddress && { billingAddress }),\n                    ...(deliveryAddress && { deliveryAddress })\n                },\n                { resolve, reject }\n            );\n        }).catch((error?: ApplePayJS.ApplePayError) => {\n            // Format error in a way that the 'catch' of the 'onPaymentAuthorize' block accepts it\n            const data = { error: { applePayError: error } };\n            return Promise.reject(data);\n        });\n    }\n\n    /**\n     * Verify if the 'onOrderTrackingRequest' is provided. If so, triggers the callback expecting an\n     * Apple Pay order details back\n     *\n     * @private\n     */\n    private async collectOrderTrackingDetailsIfNeeded(\n        paymentResponse: PaymentResponseData\n    ): Promise<{ orderDetails?: ApplePayPaymentOrderDetails; paymentResponse: PaymentResponseData }> {\n        return new Promise<ApplePayPaymentOrderDetails | void>((resolve, reject) => {\n            if (!this.props.onOrderTrackingRequest) {\n                return resolve();\n            }\n\n            this.props.onOrderTrackingRequest(resolve, reject);\n        })\n            .then(orderDetails => {\n                return {\n                    paymentResponse,\n                    ...(orderDetails && { orderDetails })\n                };\n            })\n            .catch(() => {\n                return { paymentResponse };\n            });\n    }\n\n    private async validateMerchant(resolve, reject) {\n        const { hostname: domainName } = window.location;\n        const { clientKey, configuration, loadingContext, initiative } = this.props;\n        const { merchantName, merchantId } = configuration;\n        const path = `v1/applePay/sessions?clientKey=${clientKey}`;\n        const options = { loadingContext, path };\n        const request: ApplePaySessionRequest = {\n            displayName: merchantName,\n            domainName,\n            initiative,\n            merchantIdentifier: merchantId\n        };\n\n        try {\n            const response = await httpPost(options, request);\n            const decodedData: DecodeObject = base64.decode(response.data);\n            if (!decodedData.success) {\n                reject('Could not decode Apple Pay session');\n            } else {\n                const session = JSON.parse(decodedData.data);\n                resolve(session);\n            }\n        } catch (e) {\n            reject('Could not get Apple Pay session');\n        }\n    }\n\n    render() {\n        if (!this.props.showPayButton) {\n            return null;\n        }\n\n        return (\n            <ApplePayButton\n                buttonStyle={this.props.buttonColor}\n                buttonType={this.props.buttonType}\n                buttonLocale={this.props.buttonLocale}\n                onClick={this.submit}\n            />\n        );\n    }\n}\n\nexport default ApplePayElement;\n","export function mapBrands(brands) {\n    const brandMapping = {\n        mc: 'masterCard',\n        amex: 'amex',\n        visa: 'visa',\n        elodebit: 'elo',\n        elo: 'elo',\n        interac: 'interac',\n        discover: 'discover',\n        jcb: 'jcb',\n        electron: 'electron',\n        maestro: 'maestro',\n        girocard: 'girocard',\n        cartebancaire: 'cartesBancaires',\n        eftpos_australia: 'eftpos'\n    };\n\n    return brands.reduce((accumulator, item) => {\n        if (!!brandMapping[item] && !accumulator.includes(brandMapping[item])) {\n            accumulator.push(brandMapping[item]);\n        }\n        return accumulator;\n    }, []);\n}\n","export function resolveSupportedVersion(latestVersion: number): number | null {\n    try {\n        for (let v = latestVersion; v > 0; v--) {\n            if (ApplePaySession?.supportsVersion(v)) {\n                return v;\n            }\n        }\n    } catch (error) {\n        console.warn(error);\n    }\n    return null;\n}\n","import { ApplePayConfiguration } from './types';\n\nconst defaultProps: ApplePayConfiguration = {\n    isExpress: false,\n    amount: { currency: 'USD', value: 0 },\n    totalPriceStatus: 'final',\n    initiative: 'web',\n    merchantCapabilities: ['supports3DS'],\n    supportedNetworks: ['amex', 'discover', 'masterCard', 'visa'],\n    buttonType: 'plain',\n    buttonColor: 'black',\n    onClick: resolve => resolve()\n};\n\nexport default defaultProps;\n","import { PaymentAmount } from '../../../types/global-types';\n\nexport interface ICashAppWindowObject {\n    pay({ clientId }: { clientId: string }): Promise<ICashAppSDK>;\n}\n\n/**\n * https://developers.cash.app/docs/api/technical-documentation/sdks/pay-kit/technical-reference\n */\nexport interface ICashAppSDK {\n    render(target: string | HTMLElement, options?: any): Promise<{ begin?: () => void }>;\n    addEventListener(eventType: CashAppPayEvents, callback: Function): void;\n    removeEventListener(eventType: CashAppPayEvents, callback: Function): void;\n    customerRequest(customerRequest: any): Promise<void>;\n    restart(): Promise<void>;\n}\n\nexport enum CashAppPayEvents {\n    CustomerDismissed = 'CUSTOMER_DISMISSED',\n    CustomerRequestApproved = 'CUSTOMER_REQUEST_APPROVED',\n    CustomerRequestDeclined = 'CUSTOMER_REQUEST_DECLINED',\n    CustomerRequestFailed = 'CUSTOMER_REQUEST_FAILED'\n}\n\nexport interface ICashAppService {\n    begin(): void;\n    initialize(): Promise<void>;\n    setStorePaymentMethod(store: boolean): void;\n    renderButton(target: HTMLElement): Promise<void>;\n    restart(): Promise<void>;\n    createCustomerRequest(): Promise<void>;\n    subscribeToEvent(eventType: CashAppPayEvents, callback: Function): Function;\n}\n\nexport type CashAppServiceConfig = {\n    useCashAppButtonUi: boolean;\n    storePaymentMethod: boolean;\n    environment: string;\n    clientId: string;\n    scopeId: string;\n    amount: PaymentAmount;\n    referenceId?: string;\n    redirectURL?: string;\n    button?: {\n        shape?: 'semiround' | 'round';\n        size?: 'medium' | 'small';\n        theme?: 'dark' | 'light';\n        width?: 'static' | 'full';\n    };\n};\n","import { h, RefObject } from 'preact';\nimport { useCallback, useEffect, useRef, useState } from 'preact/hooks';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport Spinner from '../../internal/Spinner';\nimport { CashAppPayEvents, ICashAppService } from '../services/types';\nimport { CashAppPayEventData } from '../types';\nimport StoreDetails from '../../internal/StoreDetails';\nimport './CashAppComponent.scss';\nimport { UIElementStatus } from '../../internal/UIElement/types';\n\ninterface CashAppComponentProps {\n    enableStoreDetails?: boolean;\n    cashAppService: ICashAppService;\n    onClick(): void;\n    onChangeStoreDetails(data: any): void;\n    onAuthorize(payEventData: CashAppPayEventData): void;\n    onError(error: AdyenCheckoutError): void;\n    ref(ref: RefObject<typeof CashAppComponent>): void;\n}\n\nexport function CashAppComponent({\n    enableStoreDetails,\n    cashAppService,\n    onClick,\n    onChangeStoreDetails,\n    onAuthorize,\n    onError\n}: CashAppComponentProps): h.JSX.Element {\n    const cashAppRef = useRef<HTMLDivElement>(null);\n    const [status, setStatus] = useState<UIElementStatus>('loading');\n    const subscriptions = useRef<Function[]>([]);\n    const [storePaymentMethod, setStorePaymentMethod] = useState<boolean>(false);\n\n    this.setStatus = setStatus;\n\n    const initializeCashAppSdk = useCallback(async () => {\n        try {\n            await cashAppService.initialize();\n\n            subscriptions.current = [\n                cashAppService.subscribeToEvent(CashAppPayEvents.CustomerDismissed, () => {\n                    onError(new AdyenCheckoutError('CANCEL', 'Customer dismissed the modal'));\n                }),\n                cashAppService.subscribeToEvent(CashAppPayEvents.CustomerRequestDeclined, async () => {\n                    onError(new AdyenCheckoutError('ERROR', 'Payment declined by CashAppPay'));\n                    await cashAppService.restart();\n                    await cashAppService.renderButton(cashAppRef.current);\n                }),\n\n                cashAppService.subscribeToEvent(CashAppPayEvents.CustomerRequestApproved, ({ customerProfile, grants }) => {\n                    const cashAppPaymentData: CashAppPayEventData = {\n                        ...(customerProfile?.id && { customerId: customerProfile.id }),\n                        ...(customerProfile?.cashtag && { cashTag: customerProfile.cashtag }),\n                        ...(grants?.payment?.grantId && { grantId: grants.payment.grantId }),\n                        ...(grants?.onFile?.grantId && { onFileGrantId: grants.onFile.grantId })\n                    };\n\n                    onAuthorize(cashAppPaymentData);\n                }),\n                cashAppService.subscribeToEvent(CashAppPayEvents.CustomerRequestFailed, () => {\n                    onError(new AdyenCheckoutError('ERROR', 'Customer request failed'));\n                })\n            ];\n\n            await cashAppService.renderButton(cashAppRef.current);\n\n            setStatus('ready');\n        } catch (error) {\n            if (error instanceof AdyenCheckoutError) onError(error);\n            else onError(new AdyenCheckoutError('ERROR', 'Error when initializing CashAppPay', { cause: error }));\n        }\n    }, [cashAppService, onError, onAuthorize]);\n\n    useEffect(() => {\n        if (enableStoreDetails) {\n            cashAppService.setStorePaymentMethod(storePaymentMethod);\n            onChangeStoreDetails(storePaymentMethod);\n        }\n    }, [enableStoreDetails, storePaymentMethod]);\n\n    useEffect(() => {\n        void initializeCashAppSdk();\n        return () => {\n            void cashAppService.restart();\n            subscriptions.current.forEach(unsubscribeFn => unsubscribeFn());\n        };\n    }, [cashAppService, initializeCashAppSdk]);\n\n    return (\n        <div className=\"adyen-checkout__cashapp\" aria-live=\"polite\" aria-busy={status === 'loading'}>\n            {status === 'loading' && <Spinner />}\n            {status !== 'loading' && enableStoreDetails && <StoreDetails storeDetails={storePaymentMethod} onChange={setStorePaymentMethod} />}\n\n            {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions,jsx-a11y/click-events-have-key-events */}\n            <div onClick={onClick} className={'adyen-checkout__cashapp-button'} ref={cashAppRef}></div>\n        </div>\n    );\n}\n","import { ICashAppSdkLoader } from './CashAppSdkLoader';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport { CashAppPayEvents, CashAppServiceConfig, ICashAppSDK, ICashAppService } from './types';\n\nexport default class CashAppService implements ICashAppService {\n    private readonly sdkLoader: ICashAppSdkLoader;\n    private readonly configuration: CashAppServiceConfig;\n\n    private pay: ICashAppSDK;\n\n    /**\n     * Reference to CashApp 'begin' method\n     */\n    private startAuthorization?: () => void;\n\n    constructor(sdkLoader: ICashAppSdkLoader, configuration: CashAppServiceConfig) {\n        this.configuration = configuration;\n        this.sdkLoader = sdkLoader;\n\n        if (!configuration.clientId) {\n            console.warn('CashAppService: clientId is missing');\n        }\n    }\n\n    get hasOneTimePayment() {\n        const { amount } = this.configuration;\n        return amount?.value > 0;\n    }\n\n    get hasOnFilePayment() {\n        return this.configuration.storePaymentMethod;\n    }\n\n    public setStorePaymentMethod(store: boolean) {\n        this.configuration.storePaymentMethod = store;\n    }\n\n    public async initialize(): Promise<void> {\n        try {\n            const { environment, clientId } = this.configuration;\n            const cashApp = await this.sdkLoader.load(environment);\n            this.pay = await cashApp.pay({ clientId });\n        } catch (error) {\n            throw new AdyenCheckoutError('ERROR', 'Error during initialization', { cause: error });\n        }\n    }\n\n    public async renderButton(target: HTMLElement): Promise<void> {\n        try {\n            const { button, useCashAppButtonUi } = this.configuration;\n\n            const { begin } = await this.pay.render(target, {\n                manage: false,\n                button: useCashAppButtonUi ? { width: 'full', shape: 'semiround', ...button } : false\n            });\n            this.startAuthorization = begin;\n        } catch (error) {\n            throw new AdyenCheckoutError('ERROR', 'Error rendering CashAppPay button', { cause: error });\n        }\n    }\n\n    public begin(): void {\n        if (!this.startAuthorization) console.warn('CashAppService - begin() not available');\n        else this.startAuthorization();\n    }\n\n    public subscribeToEvent(eventType: CashAppPayEvents, callback: Function): Function {\n        this.pay.addEventListener(eventType, callback);\n        return () => {\n            this.pay.removeEventListener(eventType, callback);\n        };\n    }\n\n    public async createCustomerRequest(): Promise<void> {\n        try {\n            const { referenceId, amount, scopeId, redirectURL = window.location.href } = this.configuration;\n\n            const customerRequest = {\n                referenceId,\n                redirectURL,\n                actions: {\n                    ...(this.hasOneTimePayment && {\n                        payment: {\n                            amount,\n                            scopeId\n                        }\n                    }),\n                    ...(this.hasOnFilePayment && {\n                        onFile: {\n                            scopeId\n                        }\n                    })\n                }\n            };\n            await this.pay.customerRequest(customerRequest);\n        } catch (error) {\n            throw new AdyenCheckoutError('ERROR', 'Something went wrong during customerRequest creation', { cause: error });\n        }\n    }\n\n    public async restart(): Promise<void> {\n        await this.pay.restart();\n    }\n}\n","import { CASHAPPPAY_PROD_SDK, CASHAPPPAY_SANDBOX_SDK } from './config';\nimport Script from '../../../utils/Script';\nimport { ICashAppWindowObject } from './types';\n\nexport interface ICashAppSdkLoader {\n    load(environment: string): Promise<ICashAppWindowObject>;\n}\n\nclass CashAppSdkLoader implements ICashAppSdkLoader {\n    private isSdkIsAvailableOnWindow(): boolean {\n        // @ts-ignore CashApp is created by the Cash App SDK\n        return !!window.CashApp;\n    }\n\n    public async load(environment: string): Promise<ICashAppWindowObject> {\n        const url = environment.toLowerCase().includes('live') ? CASHAPPPAY_PROD_SDK : CASHAPPPAY_SANDBOX_SDK;\n\n        if (!this.isSdkIsAvailableOnWindow()) {\n            const scriptElement = new Script(url);\n            await scriptElement.load();\n        }\n\n        // @ts-ignore CashApp is created by the Cash App SDK\n        return window.CashApp;\n    }\n}\n\nexport { CashAppSdkLoader };\n","const CASHAPPPAY_SANDBOX_SDK = 'https://sandbox.kit.cash.app/v1/pay.js';\nconst CASHAPPPAY_PROD_SDK = 'https://kit.cash.app/v1/pay.js';\n\nexport { CASHAPPPAY_SANDBOX_SDK, CASHAPPPAY_PROD_SDK };\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { CashAppComponent } from './components/CashAppComponent';\nimport CashAppService from './services/CashAppService';\nimport { CashAppSdkLoader } from './services/CashAppSdkLoader';\nimport { CashAppPayElementData, CashAppPayConfiguration, CashAppPayEventData } from './types';\nimport { ICashAppService } from './services/types';\nimport defaultProps from './defaultProps';\nimport RedirectButton from '../internal/RedirectButton';\nimport { payAmountLabel } from '../internal/PayButton';\nimport { TxVariants } from '../tx-variants';\nimport type { ICore } from '../../core/types';\nimport { PREFIX } from '../internal/Icon/constants';\n\nexport class CashAppPay extends UIElement<CashAppPayConfiguration> {\n    public static type = TxVariants.cashapp;\n\n    private readonly cashAppService: ICashAppService | undefined;\n\n    protected static defaultProps = defaultProps;\n\n    constructor(checkout: ICore, props?: CashAppPayConfiguration) {\n        super(checkout, props);\n\n        if (this.props.enableStoreDetails && this.props.storePaymentMethod) {\n            console.warn(\n                'CashAppPay: enableStoreDetails AND storePaymentMethod configuration properties should not be used together. That can lead to undesired behavior.'\n            );\n        }\n\n        if (this.props.storedPaymentMethodId) {\n            return;\n        }\n\n        this.cashAppService = new CashAppService(new CashAppSdkLoader(), {\n            storePaymentMethod: this.props.storePaymentMethod,\n            useCashAppButtonUi: this.props.showPayButton,\n            environment: this.props.environment,\n            amount: this.props.amount,\n            redirectURL: this.props.redirectURL,\n            clientId: this.props.configuration?.clientId,\n            scopeId: this.props.configuration?.scopeId,\n            button: this.props.button,\n            referenceId: this.props.referenceId\n        });\n    }\n\n    public formatProps(props: CashAppPayConfiguration) {\n        return {\n            ...props,\n            enableStoreDetails: props.session?.configuration?.enableStoreDetails || props.enableStoreDetails\n        };\n    }\n\n    public formatData(): CashAppPayElementData {\n        const { shopperWantsToStore, grantId, onFileGrantId, cashTag, customerId } = this.state.data || {};\n        const { storePaymentMethod: storePaymentMethodSetByMerchant, storedPaymentMethodId } = this.props;\n\n        /**\n         * We include 'storePaymentMethod' flag if we either Display the Checkbox OR if it is non-sessions flow AND the merchant wants to store the payment method\n         */\n        const includeStorePaymentMethod = this.props.enableStoreDetails || (!this.props.session && storePaymentMethodSetByMerchant);\n\n        if (storedPaymentMethodId) {\n            return {\n                paymentMethod: {\n                    type: CashAppPay.type,\n                    storedPaymentMethodId\n                }\n            };\n        }\n\n        const shouldAddOnFileProperties = onFileGrantId && cashTag;\n\n        return {\n            paymentMethod: {\n                type: CashAppPay.type,\n                ...(grantId && { grantId }),\n                ...(customerId && { customerId }),\n                ...(shouldAddOnFileProperties && { onFileGrantId, cashtag: cashTag })\n            },\n            ...(includeStorePaymentMethod && { storePaymentMethod: storePaymentMethodSetByMerchant || shopperWantsToStore })\n        };\n    }\n\n    get displayName() {\n        if (this.props.storedPaymentMethodId && this.props.cashtag) {\n            return this.props.cashtag;\n        }\n        return this.props.name;\n    }\n\n    get additionalInfo() {\n        return this.props.storedPaymentMethodId ? 'Cash App Pay' : '';\n    }\n\n    public submit = () => {\n        const { onClick, storedPaymentMethodId } = this.props;\n\n        if (storedPaymentMethodId) {\n            super.submit();\n            return;\n        }\n\n        let onClickPromiseRejected = false;\n\n        new Promise<void>((resolve, reject) => onClick({ resolve, reject }))\n            .catch(() => {\n                onClickPromiseRejected = true;\n                throw Error('onClick rejected');\n            })\n            .then(() => {\n                return this.cashAppService.createCustomerRequest();\n            })\n            .then(() => {\n                this.cashAppService.begin();\n            })\n            .catch(error => {\n                if (onClickPromiseRejected) {\n                    // Swallow exception triggered by onClick reject\n                    return;\n                }\n                this.handleError(error);\n            });\n    };\n\n    public get isValid(): boolean {\n        return true;\n    }\n\n    private handleOnChangeStoreDetails = (storePayment: boolean) => {\n        const data = { ...this.state.data, shopperWantsToStore: storePayment };\n        this.setState({ data });\n    };\n\n    private handleAuthorize = (cashAppPaymentData: CashAppPayEventData): void => {\n        const data = { ...this.state.data, ...cashAppPaymentData };\n        this.setState({ data, valid: {}, errors: {}, isValid: true });\n        super.submit();\n    };\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} resources={this.resources} loadingContext={this.props.loadingContext}>\n                {this.props.storedPaymentMethodId ? (\n                    <RedirectButton\n                        showPayButton={this.props.showPayButton}\n                        label={payAmountLabel(this.props.i18n, this.props.amount)}\n                        icon={this.resources?.getImage({ imageFolder: 'components/' })(`${PREFIX}lock`)}\n                        name={this.displayName}\n                        amount={this.props.amount}\n                        payButton={this.payButton}\n                        onSubmit={this.submit}\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                    />\n                ) : (\n                    <CashAppComponent\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        enableStoreDetails={this.props.enableStoreDetails}\n                        cashAppService={this.cashAppService}\n                        onChangeStoreDetails={this.handleOnChangeStoreDetails}\n                        onError={this.handleError}\n                        onClick={this.submit}\n                        onAuthorize={this.handleAuthorize}\n                    />\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default CashAppPay;\n","export default {\n    onClick: actions => {\n        actions.resolve();\n    },\n    enableStoreDetails: false,\n    storePaymentMethod: false\n};\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { ClickToPayConfiguration, ClickToPayPaymentData } from './types';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { ClickToPayCheckoutPayload, IClickToPayService } from '../internal/ClickToPay/services/types';\nimport { ClickToPayProps } from '../internal/ClickToPay/types';\nimport createClickToPayService from '../internal/ClickToPay/services/create-clicktopay-service';\nimport { CtpState } from '../internal/ClickToPay/services/ClickToPayService';\nimport ClickToPayProvider from '../internal/ClickToPay/context/ClickToPayProvider';\nimport ClickToPayComponent from '../internal/ClickToPay';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { TxVariants } from '../tx-variants';\nimport type { ICore } from '../../core/types';\n\nexport class ClickToPayElement extends UIElement<ClickToPayConfiguration> {\n    public static type = TxVariants.clicktopay;\n\n    private readonly clickToPayService: IClickToPayService | null;\n    private readonly ctpConfiguration: ClickToPayProps;\n\n    constructor(checkout: ICore, props?: ClickToPayConfiguration) {\n        super(checkout, props);\n\n        this.ctpConfiguration = {\n            shopperEmail: this.props.shopperEmail,\n            telephoneNumber: this.props.telephoneNumber,\n            merchantDisplayName: this.props.merchantDisplayName,\n            locale: this.props.locale,\n            onReady: this.props.onReady,\n            onTimeout: this.props.onTimeout\n        };\n\n        this.clickToPayService = createClickToPayService(this.props.configuration, this.ctpConfiguration, this.props.environment);\n        this.clickToPayService?.initialize().catch(error => {\n            this.handleError(new AdyenCheckoutError('ERROR', error.toString(), { cause: error }));\n        });\n\n        if (!this.clickToPayService) {\n            console.warn('ClickToPay not initialized - Likely the payment method is not configured or its configuration is missing');\n        }\n    }\n\n    get isValid() {\n        return true;\n    }\n\n    get browserInfo() {\n        return collectBrowserInfo();\n    }\n\n    public formatData(): ClickToPayPaymentData {\n        const { srcScheme, srcCorrelationId, srcTokenReference, srcCheckoutPayload, srcDigitalCardId } = this.state.data;\n        return {\n            paymentMethod: {\n                type: ClickToPayElement.type,\n                ...(srcScheme && { srcScheme }),\n                ...(srcCorrelationId && { srcCorrelationId }),\n                ...(srcTokenReference && { srcTokenReference }),\n                ...(srcCheckoutPayload && { srcCheckoutPayload }),\n                ...(srcDigitalCardId && { srcDigitalCardId })\n            },\n            browserInfo: this.browserInfo,\n            origin: window?.location?.origin\n        };\n    }\n\n    protected formatProps(props: ClickToPayConfiguration) {\n        return {\n            ...props,\n            disableOtpAutoFocus: props.disableOtpAutoFocus || false,\n            shopperEmail: props.shopperEmail || this.core.options?.session?.shopperEmail,\n            telephoneNumber: props.telephoneNumber || this.core.options?.session?.telephoneNumber,\n            locale: props.locale || props.i18n?.locale?.replace('-', '_')\n        };\n    }\n\n    /**\n     * Method used to let the merchant know if the shopper have a valid CtP accoubt\n     *\n     * Resolves Promise if the Shopper has cookies OR has valid CtP account\n     * Rejects Promise if account isn't found or if Login screen is triggered\n     */\n    public override async isAvailable(): Promise<void> {\n        if (!this.clickToPayService) {\n            return Promise.reject();\n        }\n\n        if (this.clickToPayService.shopperAccountFound) {\n            return Promise.resolve();\n        }\n\n        return new Promise((resolve, reject) => {\n            this.clickToPayService.subscribeOnStateChange((state: CtpState) => {\n                if (this.clickToPayService.shopperAccountFound) resolve();\n                if (state === CtpState.NotAvailable || state === CtpState.Login || state === CtpState.Idle) reject();\n            });\n        });\n    }\n\n    private handleClickToPaySubmit = (payload: ClickToPayCheckoutPayload) => {\n        this.setState({ data: { ...payload }, valid: {}, errors: {}, isValid: true });\n        this.submit();\n    };\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <ClickToPayProvider\n                    isStandaloneComponent={true}\n                    configuration={this.ctpConfiguration}\n                    amount={this.props.amount}\n                    clickToPayService={this.clickToPayService}\n                    setClickToPayRef={this.setComponentRef}\n                    onSetStatus={this.setElementStatus}\n                    onSubmit={this.handleClickToPaySubmit}\n                    onError={this.handleError}\n                >\n                    <ClickToPayComponent />\n                </ClickToPayProvider>\n            </CoreProvider>\n        );\n    }\n}\n\nexport default ClickToPayElement;\n","export default {\n    API_VERSION: 2,\n    API_VERSION_MINOR: 0,\n    GATEWAY: 'adyen',\n    URL: 'https://pay.google.com/gp/p/js/pay.js'\n};\n","import { getDecimalAmount } from '../../utils/amount-util';\nimport config from './config';\nimport { GooglePaymentDataRequest, GooglePayConfiguration } from './types';\n\n/**\n * Configure your site's support for payment methods supported by the Google Pay API.\n *\n * @see {@link https://developers.google.com/pay/api/web/reference/object#IsReadyToPayRequest|isReadyToPayRequest}\n * @returns Google Pay API version, payment methods supported by the site\n */\nexport function isReadyToPayRequest({\n    allowedAuthMethods,\n    allowedCardNetworks,\n    existingPaymentMethodRequired = false\n}: Pick<\n    GooglePayConfiguration,\n    'allowedAuthMethods' | 'allowedCardNetworks' | 'existingPaymentMethodRequired'\n>): google.payments.api.IsReadyToPayRequest {\n    return {\n        apiVersion: config.API_VERSION,\n        apiVersionMinor: config.API_VERSION_MINOR,\n        allowedPaymentMethods: [\n            {\n                type: 'CARD',\n                parameters: {\n                    allowedAuthMethods,\n                    allowedCardNetworks\n                },\n                tokenizationSpecification: {\n                    type: 'PAYMENT_GATEWAY',\n                    parameters: {}\n                }\n            }\n        ],\n        existingPaymentMethodRequired\n    };\n}\n\n/**\n * Provide Google Pay API with a payment amount, currency, and amount status\n *\n * @see {@link https://developers.google.com/pay/api/web/reference/object#TransactionInfo|TransactionInfo}\n * @returns transaction info, suitable for use as transactionInfo property of PaymentDataRequest\n */\nexport function getTransactionInfo({\n    amount,\n    countryCode = 'US',\n    totalPriceStatus = 'FINAL',\n    ...props\n}: GooglePayConfiguration): google.payments.api.TransactionInfo {\n    const formattedPrice = String(getDecimalAmount(amount.value, amount.currency));\n\n    return {\n        countryCode,\n        currencyCode: amount.currency,\n        totalPrice: formattedPrice,\n        totalPriceStatus: totalPriceStatus,\n        ...props.transactionInfo\n    };\n}\n\nexport function initiatePaymentRequest({ configuration, ...props }: GooglePayConfiguration, countryCode: string): GooglePaymentDataRequest {\n    return {\n        apiVersion: config.API_VERSION,\n        apiVersionMinor: config.API_VERSION_MINOR,\n        transactionInfo: getTransactionInfo({ countryCode, ...props }),\n        merchantInfo: {\n            merchantId: configuration.merchantId,\n            merchantName: configuration.merchantName,\n            ...(configuration.merchantOrigin ? { merchantOrigin: configuration.merchantOrigin } : {}),\n            ...(configuration.authJwt ? { authJwt: configuration.authJwt } : {})\n        },\n        allowedPaymentMethods: [\n            {\n                type: 'CARD',\n                tokenizationSpecification: {\n                    type: 'PAYMENT_GATEWAY',\n                    parameters: {\n                        gateway: config.GATEWAY,\n                        gatewayMerchantId: configuration.gatewayMerchantId\n                    }\n                },\n                parameters: {\n                    allowedAuthMethods: props.allowedAuthMethods,\n                    allowedCardNetworks: props.allowedCardNetworks,\n                    assuranceDetailsRequired: props.assuranceDetailsRequired,\n                    allowPrepaidCards: props.allowPrepaidCards,\n                    allowCreditCards: props.allowCreditCards,\n                    billingAddressRequired: props.billingAddressRequired,\n                    billingAddressParameters: props.billingAddressParameters\n                }\n            }\n        ],\n        emailRequired: props.emailRequired,\n        shippingAddressRequired: props.shippingAddressRequired,\n        shippingAddressParameters: props.shippingAddressParameters,\n        shippingOptionRequired: props.shippingOptionRequired,\n        shippingOptionParameters: props.shippingOptionParameters,\n        callbackIntents: props.callbackIntents\n    };\n}\n","import { AddressData } from '../../types/global-types';\n\n/**\n *\n */\nexport function resolveEnvironment(env = 'TEST'): google.payments.api.Environment {\n    const environment = env.toLowerCase();\n    switch (environment) {\n        case 'production':\n        case 'live':\n        case 'live-au':\n        case 'live-apse':\n        case 'live-us':\n        case 'live-in':\n            return 'PRODUCTION';\n        default:\n            return 'TEST';\n    }\n}\n\n/**\n * This function formats Google Pay contact format to Adyen address format\n *\n * Setting 'houseNumberOrName' to ZZ won't affect the AVS check, and it will make the algorithm take the\n * house number from the 'street' property.\n */\nexport function formatGooglePayContactToAdyenAddressFormat(\n    paymentContact?: Partial<google.payments.api.Address>,\n    isDeliveryAddress?: boolean\n): AddressData | undefined {\n    if (!paymentContact) {\n        return;\n    }\n\n    return {\n        postalCode: paymentContact.postalCode,\n        country: paymentContact.countryCode,\n        street: [paymentContact.address1, paymentContact.address2, paymentContact.address3].join(' ').trim(),\n        houseNumberOrName: 'ZZ',\n        city: paymentContact.locality || '',\n        ...(paymentContact.administrativeArea && { stateOrProvince: paymentContact.administrativeArea }),\n        ...(isDeliveryAddress && {\n            firstName: paymentContact.name\n        })\n    };\n}\n\nconst supportedLocales = [\n    'en',\n    'ar',\n    'bg',\n    'ca',\n    'cs',\n    'da',\n    'de',\n    'el',\n    'es',\n    'et',\n    'fi',\n    'fr',\n    'hr',\n    'id',\n    'it',\n    'ja',\n    'ko',\n    'ms',\n    'nl',\n    'no',\n    'pl',\n    'pt',\n    'ru',\n    'sk',\n    'sl',\n    'sr',\n    'sv',\n    'th',\n    'tr',\n    'uk',\n    'zh'\n];\n\nexport function getGooglePayLocale(locale = '') {\n    const twoLetterLocale = locale.toLowerCase().substring(0, 2);\n    return supportedLocales.includes(twoLetterLocale) ? twoLetterLocale : null;\n}\n","import { isReadyToPayRequest, initiatePaymentRequest } from './requests';\nimport { resolveEnvironment } from './utils';\nimport Script from '../../utils/Script';\nimport config from './config';\nimport type { GooglePayConfiguration } from './types';\n\nclass GooglePayService {\n    public readonly paymentsClient: Promise<google.payments.api.PaymentsClient>;\n\n    constructor(environment: string, paymentDataCallbacks: google.payments.api.PaymentDataCallbacks) {\n        const googlePayEnvironment = resolveEnvironment(environment);\n\n        this.paymentsClient = this.getGooglePaymentsClient({\n            environment: googlePayEnvironment,\n            paymentDataCallbacks\n        });\n    }\n\n    /**\n     * Initialize a Google Pay API client\n     *\n     * @see {@link https://developers.google.com/pay/api/web/reference/client#PaymentsClient|PaymentsClient constructor}\n     * @returns Google Pay API client\n     */\n    async getGooglePaymentsClient(paymentOptions: google.payments.api.PaymentOptions): Promise<google.payments.api.PaymentsClient> {\n        if (!window.google?.payments) {\n            const script = new Script(config.URL);\n            await script.load();\n        }\n\n        return new google.payments.api.PaymentsClient(paymentOptions);\n    }\n\n    /**\n     * Determine a shopper's ability to return a form of payment from the Google Pay API.\n     * @see {@link https://developers.google.com/pay/api/web/reference/client#isReadyToPay|isReadyToPay}\n     */\n    isReadyToPay(props): Promise<google.payments.api.IsReadyToPayResponse> {\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        if (!this.paymentsClient) return Promise.reject(new Error('Google Pay is not available'));\n\n        return this.paymentsClient.then(client => client.isReadyToPay(isReadyToPayRequest(props)));\n    }\n\n    prefetchPaymentData(props: GooglePayConfiguration, countryCode: string): void {\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        if (!this.paymentsClient) throw new Error('Google Pay is not available');\n\n        const paymentDataRequest = initiatePaymentRequest(props, countryCode);\n        void this.paymentsClient.then(client => client.prefetchPaymentData(paymentDataRequest));\n    }\n\n    /**\n     * Show Google Pay payment sheet when Google Pay payment button is clicked\n     * @returns paymentData response from Google Pay API after user approves payment\n     * @see {@link https://developers.google.com/pay/api/web/reference/object#PaymentData|PaymentData object reference}\n     */\n    initiatePayment(props: GooglePayConfiguration, countryCode: string): Promise<google.payments.api.PaymentData> {\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        if (!this.paymentsClient) throw new Error('Google Pay is not available');\n\n        const paymentDataRequest = initiatePaymentRequest(props, countryCode);\n        return this.paymentsClient.then(client => client.loadPaymentData(paymentDataRequest));\n    }\n}\n\nexport default GooglePayService;\n","import { h } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport './GooglePayButton.scss';\n\ninterface GooglePayButtonProps {\n    buttonColor: google.payments.api.ButtonColor;\n    buttonType: google.payments.api.ButtonType;\n    buttonSizeMode: google.payments.api.ButtonSizeMode;\n    buttonLocale: string;\n    buttonRadius?: number;\n    buttonRootNode?: HTMLDocument | ShadowRoot;\n    paymentsClient: Promise<google.payments.api.PaymentsClient>;\n    onClick: (e: Event) => void;\n}\n\nconst GooglePayButton = (props: GooglePayButtonProps) => {\n    const googlePayWrapperRef = useRef<HTMLDivElement | undefined>(undefined);\n\n    useEffect(() => {\n        const { onClick, buttonRadius, buttonColor, buttonType, buttonLocale, buttonSizeMode, buttonRootNode, paymentsClient } = props;\n\n        void paymentsClient\n            .then(client =>\n                client.createButton({\n                    onClick,\n                    buttonType,\n                    buttonColor,\n                    buttonLocale,\n                    buttonSizeMode,\n                    buttonRootNode,\n                    ...(buttonRadius !== undefined && { buttonRadius })\n                })\n            )\n            .then(googlePayButton => {\n                if (googlePayWrapperRef.current) {\n                    googlePayWrapperRef.current.appendChild(googlePayButton);\n                }\n            });\n    }, [props.buttonColor, props.buttonType, props.buttonLocale, props.buttonSizeMode, props.buttonRootNode, props.paymentsClient]);\n\n    return <div data-testid=\"googlepay-button-container\" className={'adyen-checkout__paywithgoogle'} ref={googlePayWrapperRef} />;\n};\n\nexport default GooglePayButton;\n","import { GooglePayConfiguration } from './types';\n\nconst defaultProps: GooglePayConfiguration = {\n    isExpress: false,\n\n    // isReadyToPayRequest\n    existingPaymentMethodRequired: false,\n\n    // ButtonOptions\n    // https://developers.google.com/pay/api/web/reference/object#ButtonOptions\n    buttonColor: 'default',\n    buttonType: 'buy',\n    buttonSizeMode: 'fill',\n\n    // PaymentDataRequest\n    configuration: {\n        // Adyen's merchant account\n        gatewayMerchantId: '', // E.g TestMerchant\n\n        // https://developers.google.com/pay/api/web/reference/object#MerchantInfo\n        merchantId: '', // E.g 039484839309\n        merchantName: '' // E.g Example Merchant,\n    },\n\n    // Payment\n    amount: {\n        value: 0,\n        currency: 'USD'\n    },\n\n    totalPriceStatus: 'FINAL',\n\n    // Callbacks\n    onClick: resolve => resolve(),\n\n    // CardParameters\n    // https://developers.google.com/pay/api/web/reference/object#CardParameters\n    allowedAuthMethods: ['PAN_ONLY', 'CRYPTOGRAM_3DS'] as google.payments.api.CardAuthMethod[],\n    allowedCardNetworks: ['AMEX', 'DISCOVER', 'JCB', 'MASTERCARD', 'VISA'] as google.payments.api.CardNetwork[],\n    allowCreditCards: true, // Set to false if you don't support credit cards.\n    allowPrepaidCards: true, // Set to false if you don't support prepaid cards.\n    billingAddressRequired: false, // A billing address should only be requested if it's required to process the transaction.\n    billingAddressParameters: undefined, // The expected fields returned if billingAddressRequired is set to true.\n    assuranceDetailsRequired: false, // https://developers.google.com/pay/api/web/reference/response-objects#assurance-details-specifications\n\n    emailRequired: false,\n    shippingAddressRequired: false,\n    shippingAddressParameters: undefined, // https://developers.google.com/pay/api/web/reference/object#ShippingAddressParameters\n    shippingOptionRequired: false,\n    shippingOptionParameters: undefined,\n    callbackIntents: []\n};\n\nexport default defaultProps;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport GooglePayService from './GooglePayService';\nimport GooglePayButton from './components/GooglePayButton';\nimport defaultProps from './defaultProps';\nimport { formatGooglePayContactToAdyenAddressFormat, getGooglePayLocale } from './utils';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { TxVariants } from '../tx-variants';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport {\n    ANALYTICS_EXPRESS_PAGES_ARRAY,\n    ANALYTICS_INSTANT_PAYMENT_BUTTON,\n    ANALYTICS_RENDERED_STR,\n    ANALYTICS_SELECTED_STR\n} from '../../core/Analytics/constants';\n\nimport type { AddressData, BrowserInfo, PaymentMethod, PaymentResponseData, RawPaymentResponse } from '../../types/global-types';\nimport type { GooglePayConfiguration } from './types';\nimport type { ICore } from '../../core/types';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\n\nclass GooglePay extends UIElement<GooglePayConfiguration> {\n    public static type = TxVariants.googlepay;\n    public static txVariants = [TxVariants.googlepay, TxVariants.paywithgoogle];\n    public static defaultProps = defaultProps;\n\n    protected readonly googlePay;\n\n    constructor(checkout: ICore, props?: GooglePayConfiguration) {\n        super(checkout, props);\n        this.handleAuthorization = this.handleAuthorization.bind(this);\n        this.showGooglePayPaymentSheet = this.showGooglePayPaymentSheet.bind(this);\n\n        const { isExpress, paymentDataCallbacks } = this.props;\n\n        if (isExpress === false && paymentDataCallbacks?.onPaymentDataChanged) {\n            throw new AdyenCheckoutError(\n                'IMPLEMENTATION_ERROR',\n                'GooglePay - You must set \"isExpress\" flag to \"true\" in order to use \"onPaymentDataChanged\" callback'\n            );\n        }\n\n        if (!this.props.configuration.merchantId) {\n            throw new AdyenCheckoutError(\n                'IMPLEMENTATION_ERROR',\n                'GooglePay - Missing merchantId. Please ensure that it is correctly configured in your customer area.'\n            );\n        }\n\n        this.googlePay = new GooglePayService(this.props.environment, {\n            ...(isExpress && paymentDataCallbacks?.onPaymentDataChanged && { onPaymentDataChanged: paymentDataCallbacks.onPaymentDataChanged }),\n            onPaymentAuthorized: this.onPaymentAuthorized\n        });\n    }\n\n    /**\n     * Google Pay requires custom logic due to supporting two Tx variants that lead to the same payment method.\n     * If the merchant creates a standalone Google Pay component, we need to verify if the payment method is available using both tx variants\n     *\n     * @param type\n     * @returns\n     */\n    protected override getPaymentMethodFromPaymentMethodsResponse(type?: string): PaymentMethod {\n        return (\n            this.core.paymentMethodsResponse.find(type || this.constructor['type']) || this.core.paymentMethodsResponse.find(TxVariants.paywithgoogle)\n        );\n    }\n\n    protected override formatProps(props): GooglePayConfiguration {\n        const buttonSizeMode = props.buttonSizeMode ?? (props.isDropin ? 'fill' : 'static');\n        const buttonLocale = getGooglePayLocale(props.buttonLocale ?? props.i18n?.locale);\n\n        const callbackIntents: google.payments.api.CallbackIntent[] = [...props.callbackIntents, 'PAYMENT_AUTHORIZATION'];\n\n        return {\n            ...props,\n            configuration: props.configuration,\n            buttonSizeMode,\n            buttonLocale,\n            callbackIntents\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    protected override formatData() {\n        const { googlePayCardNetwork, googlePayToken, billingAddress, deliveryAddress } = this.state;\n        const { isExpress } = this.props;\n\n        return {\n            paymentMethod: {\n                type: this.type,\n                googlePayCardNetwork,\n                googlePayToken,\n                ...(isExpress && { subtype: 'express' })\n            },\n            browserInfo: this.browserInfo,\n            origin: !!window && window.location.origin,\n            ...(billingAddress && { billingAddress }),\n            ...(deliveryAddress && { deliveryAddress })\n        };\n    }\n\n    protected submitAnalytics(analyticsObj: AnalyticsEvent) {\n        // Analytics will need to know about this.props.isExpress & this.props.expressPage\n        if (analyticsObj instanceof AnalyticsInfoEvent && analyticsObj.type === ANALYTICS_RENDERED_STR) {\n            const { isExpress, expressPage } = this.props;\n            const hasExpressPage = expressPage && ANALYTICS_EXPRESS_PAGES_ARRAY.includes(expressPage);\n\n            if (typeof isExpress === 'boolean') {\n                analyticsObj.isExpress = isExpress;\n            }\n\n            if (isExpress === true && hasExpressPage) {\n                analyticsObj.expressPage = expressPage; // We only care about the expressPage value if isExpress is true\n            }\n        }\n\n        super.submitAnalytics(analyticsObj);\n    }\n\n    /**\n     * Displays the Google Pay payment sheet overlay\n     */\n    private showGooglePayPaymentSheet() {\n        this.googlePay.initiatePayment(this.props, this.core.options.countryCode).catch((error: google.payments.api.PaymentsError) => {\n            // eslint-disable-next-line @typescript-eslint/no-base-to-string\n            this.handleError(new AdyenCheckoutError(error.statusCode === 'CANCELED' ? 'CANCEL' : 'ERROR', error.toString(), { cause: error }));\n        });\n    }\n\n    public override submit = () => {\n        if (this.props.isInstantPayment) {\n            const event = new AnalyticsInfoEvent({\n                type: ANALYTICS_SELECTED_STR,\n                target: ANALYTICS_INSTANT_PAYMENT_BUTTON\n            });\n\n            this.submitAnalytics(event);\n        }\n\n        new Promise<void>((resolve, reject) => this.props.onClick(resolve, reject)).then(this.showGooglePayPaymentSheet).catch(() => {\n            // Swallow exception triggered by onClick reject\n        });\n    };\n\n    /**\n     * Method called when the payment is authorized in the payment sheet\n     *\n     * @see https://developers.google.com/pay/api/web/reference/client#onPaymentAuthorized\n     **/\n    private onPaymentAuthorized = async (paymentData: google.payments.api.PaymentData): Promise<google.payments.api.PaymentAuthorizationResult> => {\n        const billingAddress: AddressData = formatGooglePayContactToAdyenAddressFormat(paymentData.paymentMethodData.info.billingAddress);\n        const deliveryAddress: AddressData = formatGooglePayContactToAdyenAddressFormat(paymentData.shippingAddress, true);\n\n        this.setState({\n            authorizedEvent: paymentData,\n            googlePayToken: paymentData.paymentMethodData.tokenizationData.token,\n            googlePayCardNetwork: paymentData.paymentMethodData.info.cardNetwork,\n            ...(billingAddress && { billingAddress }),\n            ...(deliveryAddress && { deliveryAddress })\n        });\n\n        return new Promise<google.payments.api.PaymentAuthorizationResult>(resolve => {\n            this.handleAuthorization()\n                .then(this.makePaymentsCall)\n                .then(sanitizeResponse)\n                .then(verifyPaymentDidNotFail)\n                .then((paymentResponse: PaymentResponseData) => {\n                    resolve({ transactionState: 'SUCCESS' });\n                    return paymentResponse;\n                })\n                .then(paymentResponse => {\n                    this.handleResponse(paymentResponse);\n                })\n                .catch((paymentResponse?: RawPaymentResponse) => {\n                    this.setElementStatus('ready');\n\n                    const googlePayError = paymentResponse?.error?.googlePayError;\n                    const fallbackMessage = this.props.i18n.get('error.subtitle.payment');\n\n                    const error: google.payments.api.PaymentDataError =\n                        typeof googlePayError === 'string' || undefined\n                            ? {\n                                  intent: 'PAYMENT_AUTHORIZATION',\n                                  reason: 'OTHER_ERROR',\n                                  message: (googlePayError as string) || fallbackMessage\n                              }\n                            : {\n                                  intent: googlePayError?.intent || 'PAYMENT_AUTHORIZATION',\n                                  reason: googlePayError?.reason || 'OTHER_ERROR',\n                                  message: googlePayError?.message || fallbackMessage\n                              };\n\n                    resolve({\n                        transactionState: 'ERROR',\n                        error\n                    });\n\n                    const responseWithError = {\n                        ...paymentResponse,\n                        error: {\n                            googlePayError: error\n                        }\n                    };\n\n                    this.handleFailedResult(responseWithError);\n                });\n        });\n    };\n\n    /**\n     * Call the 'onAuthorized' callback if available.\n     * Must be resolved/reject for the payment flow to continue\n     */\n    private async handleAuthorization(): Promise<void> {\n        return new Promise<void>((resolve, reject) => {\n            if (!this.props.onAuthorized) {\n                resolve();\n            }\n\n            const { authorizedEvent, billingAddress, deliveryAddress } = this.state;\n\n            this.props.onAuthorized(\n                {\n                    authorizedEvent,\n                    ...(billingAddress && { billingAddress }),\n                    ...(deliveryAddress && { deliveryAddress })\n                },\n                { resolve, reject }\n            );\n        }).catch((error?: google.payments.api.PaymentDataError | string) => {\n            // Format error in a way that the 'catch' of the 'onPaymentAuthorize' block accepts it\n            const data = { error: { googlePayError: error } };\n            return Promise.reject(data);\n        });\n    }\n\n    public get isValid(): boolean {\n        return true;\n    }\n\n    /**\n     * Determine a shopper's ability to return a form of payment from the Google Pay API.\n     */\n    public override async isAvailable(): Promise<void> {\n        return this.isReadyToPay()\n            .then(response => {\n                if (!response.result) {\n                    throw new AdyenCheckoutError('ERROR', 'GooglePay is not available');\n                }\n\n                if (response.paymentMethodPresent === false) {\n                    throw new AdyenCheckoutError('ERROR', 'GooglePay - No paymentMethodPresent');\n                }\n\n                return Promise.resolve();\n            })\n            .catch(error => {\n                return Promise.reject(error);\n            });\n    }\n\n    /**\n     * Determine a shopper's ability to return a form of payment from the Google Pay API.\n     */\n    public isReadyToPay = (): Promise<google.payments.api.IsReadyToPayResponse> => {\n        return this.googlePay.isReadyToPay(this.props);\n    };\n\n    /**\n     * Use this method to prefetch a PaymentDataRequest configuration to improve loadPaymentData execution time on later user interaction. No value is returned.\n     */\n    public prefetch = (): void => {\n        return this.googlePay.prefetchPaymentData(this.props, this.core.options.countryCode);\n    };\n\n    get browserInfo(): BrowserInfo {\n        return collectBrowserInfo();\n    }\n\n    get icon(): string {\n        return this.props.icon ?? this.resources.getImage()('googlepay');\n    }\n\n    render() {\n        if (this.props.showPayButton) {\n            return (\n                <GooglePayButton\n                    buttonColor={this.props.buttonColor}\n                    buttonType={this.props.buttonType}\n                    buttonSizeMode={this.props.buttonSizeMode}\n                    buttonLocale={this.props.buttonLocale}\n                    buttonRootNode={this.props.buttonRootNode}\n                    buttonRadius={this.props.buttonRadius}\n                    paymentsClient={this.googlePay.paymentsClient}\n                    onClick={this.submit}\n                />\n            );\n        }\n\n        return null;\n    }\n}\n\nexport default GooglePay;\n","const INTEGRATION_DATE = '2020-02-01';\nconst PAYPAL_JS_URL = 'https://www.paypal.com/sdk/js';\nconst ADYEN_CLIENTID_TEST = 'AXy9hIzWB6h_LjZUHjHmsbsiicSIbL4GKOrcgomEedVjduUinIU4C2llxkW5p0OG0zTNgviYFceaXEnj';\nconst ADYEN_CLIENTID_LIVE = 'AU0Z-TP9t5_9196agaBN6ZD3UAwypdP1IX8ZYH3PcNNAQMXUTDQlChruXqQEhyI6-NKBKowN6ydkj477';\n\nconst SUPPORTED_COLORS_FOR_CREDIT = ['black', 'white'];\n\nconst SUPPORTED_LOCALES = [\n    'en_US',\n    'en_AU',\n    'en_GB',\n    'fr_CA',\n    'es_ES',\n    'it_IT',\n    'fr_FR',\n    'de_DE',\n    'pt_BR',\n    'zh_CN',\n    'da_DK',\n    'zh_HK',\n    'id_ID',\n    'he_IL',\n    'ja_JP',\n    'ko_KR',\n    'nl_NL',\n    'no_NO',\n    'pl_PL',\n    'pt_PT',\n    'ru_RU',\n    'sv_SE',\n    'th_TH',\n    'zh_TW'\n] as const;\n\nexport { INTEGRATION_DATE, PAYPAL_JS_URL, ADYEN_CLIENTID_TEST, ADYEN_CLIENTID_LIVE, SUPPORTED_LOCALES, SUPPORTED_COLORS_FOR_CREDIT };\n","import { SUPPORTED_COLORS_FOR_CREDIT } from '../config';\nimport type { FundingSource } from '../types';\n\n/**\n * Processes and returns a new style object.\n */\nexport const getStyle = (fundingSource: FundingSource, style = {}) => {\n    if (fundingSource === 'paypal') return { ...style };\n\n    return Object.keys(style).reduce((acc, prop) => {\n        const value = style[prop];\n        if (prop !== 'color' || SUPPORTED_COLORS_FOR_CREDIT.includes(value)) {\n            acc[prop] = value;\n        }\n        return acc;\n    }, {});\n};\n","import { h } from 'preact';\nimport { useEffect, useRef } from 'preact/hooks';\nimport classnames from 'classnames';\nimport { getStyle } from '../utils/get-paypal-styles';\nimport Spinner from '../../internal/Spinner';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\n\nimport type { PayPalButtonsProps } from './types';\nimport type { FundingSource } from '../types';\n\nexport default function PaypalButtons({\n    onInit,\n    onApprove,\n    onClick,\n    onCancel,\n    onError,\n    onShippingAddressChange,\n    onShippingOptionsChange,\n    onSubmit,\n    isProcessingPayment,\n    paypalRef,\n    style,\n    ...props\n}: PayPalButtonsProps) {\n    const { i18n } = useCoreContext();\n    const isTokenize = props.configuration?.intent === 'tokenize';\n    const paypalButtonRef = useRef<HTMLDivElement>(null);\n    const creditButtonRef = useRef<HTMLDivElement>(null);\n    const payLaterButtonRef = useRef<HTMLDivElement>(null);\n    const venmoButtonRef = useRef<HTMLDivElement>(null);\n\n    const createButton = (fundingSource: FundingSource, buttonRef) => {\n        const configuration = {\n            ...(isTokenize && { createBillingAgreement: onSubmit }),\n            ...(!isTokenize && { createOrder: onSubmit }),\n            ...(!isTokenize && fundingSource !== 'venmo' && onShippingAddressChange && { onShippingAddressChange }),\n            ...(!isTokenize && fundingSource !== 'venmo' && onShippingOptionsChange && { onShippingOptionsChange }),\n            fundingSource,\n            style: getStyle(fundingSource, style),\n            onInit,\n            onClick,\n            onCancel,\n            onError,\n            onApprove\n        };\n\n        const button = paypalRef.Buttons(configuration);\n\n        if (button.isEligible()) {\n            button.render(buttonRef.current);\n        }\n    };\n\n    useEffect(() => {\n        const { PAYPAL, CREDIT, PAYLATER, VENMO } = paypalRef.FUNDING;\n        createButton(PAYPAL, paypalButtonRef);\n\n        if (!props.blockPayPalCreditButton) createButton(CREDIT, creditButtonRef);\n        if (!props.blockPayPalPayLaterButton) createButton(PAYLATER, payLaterButtonRef);\n        if (!props.blockPayPalVenmoButton) createButton(VENMO, venmoButtonRef);\n    }, []);\n\n    const isProcessingPaymentWithoutReviewPage = props.commit === true;\n\n    return (\n        <div className={classnames('adyen-checkout__paypal__buttons', { 'adyen-checkout__paypal-processing': isProcessingPayment })}>\n            <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--paypal\" ref={paypalButtonRef} />\n            <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--credit\" ref={creditButtonRef} />\n            <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--pay-later\" ref={payLaterButtonRef} />\n            <div className=\"adyen-checkout__paypal__button adyen-checkout__paypal__button--venmo\" ref={venmoButtonRef} />\n\n            {isProcessingPayment && (\n                <div className=\"adyen-checkout__paypal\">\n                    <div className=\"adyen-checkout__paypal__status adyen-checkout__paypal__status--processing\">\n                        <Spinner size=\"medium\" inline />\n                        {isProcessingPaymentWithoutReviewPage && i18n.get('paypal.processingPayment')}\n                    </div>\n                </div>\n            )}\n        </div>\n    );\n}\n","import { getSupportedLocale } from './get-paypal-locale';\nimport { ADYEN_CLIENTID_LIVE, ADYEN_CLIENTID_TEST, INTEGRATION_DATE } from '../config';\nimport type { PaypalSettings, PayPalSupportedLocale } from './types';\nimport type { PayPalComponentProps } from '../components/types';\n\n/**\n * Returns an object of settings for the PayPal SDK\n */\nexport const getPaypalSettings = ({\n    amount,\n    countryCode,\n    debug,\n    environment = '',\n    locale,\n    configuration,\n    commit,\n    vault,\n    enableMessages\n}: Partial<PayPalComponentProps>): PaypalSettings => {\n    const shopperLocale: PayPalSupportedLocale = getSupportedLocale(locale);\n    const currency: string = amount ? amount.currency : null;\n    const isTestEnvironment: boolean = environment.toLowerCase() === 'test';\n    const clientId: string = isTestEnvironment ? ADYEN_CLIENTID_TEST : ADYEN_CLIENTID_LIVE;\n    const { merchantId, intent } = configuration;\n    const components = `buttons,funding-eligibility${enableMessages ? ',messages' : ''}`;\n\n    return {\n        ...(merchantId && { 'merchant-id': merchantId }),\n        ...(shopperLocale && { locale: shopperLocale }),\n        ...(countryCode && isTestEnvironment && { 'buyer-country': countryCode }),\n        ...(debug && isTestEnvironment && { debug }),\n        ...(currency && { currency }),\n        ...(intent && { intent }),\n        commit,\n        vault,\n        'client-id': clientId,\n        'integration-date': INTEGRATION_DATE,\n        'enable-funding': 'paylater,venmo',\n        components\n    };\n};\n","import { SUPPORTED_LOCALES } from '../config';\nimport type { PayPalSupportedLocale } from './types';\n\n/**\n * Returns either a locale supported by PayPal or null, in order to let the PayPal SDK auto-detect the shopper locale.\n */\nexport const getSupportedLocale = (locale: string): PayPalSupportedLocale => {\n    const formattedLocale = locale ? locale.replace('-', '_') : null;\n    const supportedLocale = SUPPORTED_LOCALES.includes(formattedLocale as PayPalSupportedLocale) ? formattedLocale : null;\n    return supportedLocale as PayPalSupportedLocale;\n};\n","import { h } from 'preact';\nimport { useState, useEffect, useCallback } from 'preact/hooks';\nimport PaypalButtons from './PaypalButtons';\nimport Spinner from '../../internal/Spinner';\nimport { getPaypalUrl } from '../utils/get-paypal-url';\nimport Script from '../../../utils/Script';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport type { PayPalComponentProps } from './types';\n\nexport default function PaypalComponent({ onApprove, onCancel, onChange, onError, onSubmit, onScriptLoadFailure, ...props }: PayPalComponentProps) {\n    const [status, setStatus] = useState('pending');\n\n    this.setStatus = setStatus;\n\n    const handleOnApprove = useCallback(\n        (data: any, actions: any) => {\n            setStatus('processing');\n            onApprove(data, actions);\n        },\n        [onApprove]\n    );\n\n    const handlePaypalLoad = () => {\n        setStatus('ready');\n    };\n\n    const handlePaypalLoadFailure = (error: AdyenCheckoutError) => {\n        onScriptLoadFailure(error);\n    };\n\n    useEffect(() => {\n        const src = getPaypalUrl(props);\n\n        const attributes = { ...(props.cspNonce && { nonce: props.cspNonce }) },\n            dataAttributes = { ...(props.cspNonce && { cspNonce: props.cspNonce }) };\n\n        const script = new Script(src, 'body', attributes, dataAttributes);\n\n        script.load().then(handlePaypalLoad).catch(handlePaypalLoadFailure);\n\n        return () => {\n            script.remove();\n        };\n    }, []);\n\n    if (status === 'pending') {\n        return (\n            <div className=\"adyen-checkout__paypal\" aria-live=\"polite\" aria-busy=\"true\">\n                <div className=\"adyen-checkout__paypal__status adyen-checkout__paypal__status--pending\" data-testid={'paypal-loader'}>\n                    <Spinner />\n                </div>\n            </div>\n        );\n    }\n\n    return (\n        <div className=\"adyen-checkout__paypal\">\n            <PaypalButtons\n                {...props}\n                onCancel={onCancel}\n                onChange={onChange}\n                onError={onError}\n                onSubmit={onSubmit}\n                onApprove={handleOnApprove}\n                isProcessingPayment={status === 'processing'}\n                paypalRef={window.paypal}\n            />\n        </div>\n    );\n}\n","import { getPaypalSettings } from './get-paypal-settings';\nimport { PAYPAL_JS_URL } from '../config';\nimport type { PayPalComponentProps } from '../components/types';\n\n/**\n * Returns the PayPal SDK script URL with query parameters\n * @see {@link https://developer.paypal.com/docs/checkout/reference/customize-sdk/}\n */\nexport const getPaypalUrl = (props: Partial<PayPalComponentProps>): string => {\n    const settings = getPaypalSettings(props);\n    const params = decodeURIComponent(\n        Object.keys(settings)\n            .map(key => `${key}=${settings[key]}`)\n            .join('&')\n    );\n    return `${PAYPAL_JS_URL}?${params}`;\n};\n","import { PayPalConfiguration } from './types';\n\nconst defaultProps: Partial<PayPalConfiguration> = {\n    isExpress: false,\n    userAction: 'pay',\n    commit: true,\n    vault: false,\n    enableMessages: false,\n    style: {\n        height: 50 // The height of the buttons is set to 50px to align with the default size of our Pay buttons.\n    },\n    blockPayPalCreditButton: false,\n    blockPayPalPayLaterButton: false,\n    blockPayPalVenmoButton: false\n};\n\nexport default defaultProps;\n","export const ERRORS = {\n    INVALID_ACTION: 'Invalid Action',\n    NO_TOKEN_PROVIDED: 'No token was provided',\n    PAYPAL_OVERLAY_CLOSED: 'PayPal overlay closed',\n    SUBMIT_NOT_SUPPORTED: 'Calling submit() is not supported for this payment method',\n    WRONG_INSTANCE: 'The instance of the PayPal component being used is not the same which started the payment'\n};\n","import { AddressData } from '../../../types/global-types';\n\n/**\n * This function formats PayPal contact format to Adyen address format\n */\nexport const formatPaypalOrderContactToAdyenFormat = (paymentContact: any, isDeliveryAddress?: boolean): AddressData | null => {\n    const getStreet = (addressPart1 = null, addressPart2 = null): string | null => {\n        if (addressPart1 && addressPart2) return `${addressPart1}, ${addressPart2}`;\n        if (addressPart1) return addressPart1;\n        if (addressPart2) return addressPart2;\n        return null;\n    };\n\n    if (paymentContact?.address === undefined) return null;\n\n    const { address, name } = paymentContact;\n    const street = getStreet(address.address_line_1, address.address_line_2);\n\n    return {\n        houseNumberOrName: 'ZZ',\n        ...(street && { street }),\n        ...(address.admin_area_1 && { stateOrProvince: address.admin_area_1 }),\n        ...(address.admin_area_2 && { city: address.admin_area_2 }),\n        ...(address.postal_code && { postalCode: address.postal_code }),\n        ...(address.country_code && { country: address.country_code }),\n        ...(isDeliveryAddress && {\n            firstName: name.full_name\n        })\n    };\n};\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PaypalComponent from './components/PaypalComponent';\nimport defaultProps from './defaultProps';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { ERRORS } from './constants';\nimport { TxVariants } from '../tx-variants';\nimport { formatPaypalOrderContactToAdyenFormat } from './utils/format-paypal-order-contact-to-adyen-format';\n\nimport type { ICore } from '../../core/types';\nimport type { PaymentAction } from '../../types/global-types';\nimport type { Intent, PayPalConfiguration } from './types';\n\nimport './Paypal.scss';\nimport { ANALYTICS_EXPRESS_PAGES_ARRAY, ANALYTICS_RENDERED_STR } from '../../core/Analytics/constants';\nimport { AnalyticsInfoEvent } from '../../core/Analytics/AnalyticsInfoEvent';\nimport { AnalyticsEvent } from '../../core/Analytics/AnalyticsEvent';\n\nclass PaypalElement extends UIElement<PayPalConfiguration> {\n    public static type = TxVariants.paypal;\n    public static subtype = 'sdk';\n\n    public paymentData: string = null;\n\n    private resolve = null;\n    private reject = null;\n\n    protected static defaultProps = defaultProps;\n\n    constructor(checkout: ICore, props?: PayPalConfiguration) {\n        super(checkout, props);\n        this.handleSubmit = this.handleSubmit.bind(this);\n        this.handleOnShippingAddressChange = this.handleOnShippingAddressChange.bind(this);\n        this.handleOnShippingOptionsChange = this.handleOnShippingOptionsChange.bind(this);\n    }\n\n    formatProps(props: PayPalConfiguration): PayPalConfiguration {\n        const merchantId = props.configuration?.merchantId;\n        const intentFromConfig = props.configuration?.intent;\n        const isZeroAuth = props.amount?.value === 0;\n        const intent: Intent = isZeroAuth ? 'tokenize' : props.intent || intentFromConfig;\n        const vault = intent === 'tokenize' || props.vault;\n\n        const displayContinueToReviewPageButton = props.userAction === 'continue';\n\n        return {\n            ...props,\n            commit: displayContinueToReviewPageButton ? false : props.commit,\n            vault,\n            configuration: {\n                intent,\n                merchantId\n            }\n        };\n    }\n\n    protected submitAnalytics(analyticsObj: AnalyticsEvent) {\n        // Analytics will need to know about this.props.isExpress & this.props.expressPage\n        if (analyticsObj instanceof AnalyticsInfoEvent && analyticsObj.type === ANALYTICS_RENDERED_STR) {\n            const { isExpress, expressPage } = this.props;\n            const hasExpressPage = expressPage && ANALYTICS_EXPRESS_PAGES_ARRAY.includes(expressPage);\n\n            if (typeof isExpress === 'boolean') {\n                analyticsObj.isExpress = isExpress;\n            }\n\n            if (isExpress === true && hasExpressPage) {\n                analyticsObj.expressPage = expressPage; // We only care about the expressPage value if isExpress is true\n            }\n        }\n\n        super.submitAnalytics(analyticsObj);\n    }\n\n    public submit = () => {\n        this.handleError(new AdyenCheckoutError('IMPLEMENTATION_ERROR', ERRORS.SUBMIT_NOT_SUPPORTED));\n    };\n\n    /**\n     * Updates the paymentData value. It must be used in the PayPal Express flow, when patching the amount\n     * @param paymentData - Payment data value\n     */\n    public updatePaymentData(paymentData: string): void {\n        if (!paymentData) console.warn('PayPal - Updating payment data with an invalid value');\n        this.paymentData = paymentData;\n    }\n\n    /**\n     * Formats the component data output\n     */\n    protected formatData() {\n        const { isExpress, userAction } = this.props;\n\n        return {\n            paymentMethod: {\n                type: PaypalElement.type,\n                userAction,\n                subtype: isExpress ? 'express' : PaypalElement.subtype\n            }\n        };\n    }\n\n    public handleAction = (action: PaymentAction) => {\n        return this.updateWithAction(action);\n    };\n\n    public updateWithAction = (action: PaymentAction) => {\n        if (action.paymentMethodType !== this.type) throw new Error('Invalid Action');\n\n        if (action.paymentData) {\n            this.paymentData = action.paymentData;\n        }\n\n        if (action.sdkData && action.sdkData.token) {\n            this.onActionHandled({ componentType: this.type, actionDescription: 'sdk-loaded', originalAction: action });\n            this.handleResolve(action.sdkData.token);\n        } else {\n            this.handleReject(ERRORS.NO_TOKEN_PROVIDED);\n        }\n\n        return null;\n    };\n\n    /**\n     * Dropin Validation\n     *\n     * @remarks\n     * Paypal does not require any specific Dropin validation\n     */\n    get isValid() {\n        return true;\n    }\n\n    private handleOnApprove = (data: any, actions: any): Promise<void> | void => {\n        const { onAuthorized } = this.props;\n        const state = { data: { details: data, paymentData: this.paymentData } };\n\n        if (!onAuthorized) {\n            this.handleAdditionalDetails(state);\n            return;\n        }\n\n        return actions.order\n            .get()\n            .then((paypalOrder: any) => {\n                const billingAddress = formatPaypalOrderContactToAdyenFormat(paypalOrder?.payer);\n                const deliveryAddress = formatPaypalOrderContactToAdyenFormat(paypalOrder?.purchase_units?.[0].shipping, true);\n\n                this.setState({\n                    authorizedEvent: paypalOrder,\n                    ...(billingAddress && { billingAddress }),\n                    ...(deliveryAddress && { deliveryAddress })\n                });\n\n                return new Promise<void>((resolve, reject) =>\n                    onAuthorized(\n                        {\n                            authorizedEvent: paypalOrder,\n                            ...(billingAddress && { billingAddress }),\n                            ...(deliveryAddress && { deliveryAddress })\n                        },\n                        { resolve, reject }\n                    )\n                );\n            })\n            .then(() => this.handleAdditionalDetails(state))\n            .catch(error => this.handleError(new AdyenCheckoutError('ERROR', 'Something went wrong while parsing PayPal Order', { cause: error })));\n    };\n\n    handleResolve(token: string) {\n        if (!this.resolve) return this.handleError(new AdyenCheckoutError('ERROR', ERRORS.WRONG_INSTANCE));\n        this.resolve(token);\n    }\n\n    handleReject(errorMessage: string) {\n        if (!this.reject) return this.handleError(new AdyenCheckoutError('ERROR', ERRORS.WRONG_INSTANCE));\n        this.reject(new Error(errorMessage));\n    }\n\n    private handleSubmit(): Promise<void> {\n        super.submit();\n\n        return new Promise((resolve, reject) => {\n            this.resolve = resolve;\n            this.reject = reject;\n        });\n    }\n\n    /**\n     * If the merchant provides the 'onShippingAddressChange' callback, then this method is used as a wrapper to it, in order\n     * to expose to the merchant the 'component' instance. The merchant needs the 'component' in order to manipulate the\n     * paymentData\n     *\n     * @param data - PayPal data\n     * @param actions - PayPal actions.\n     */\n    private handleOnShippingAddressChange(data: any, actions: any): Promise<void> {\n        return this.props.onShippingAddressChange(data, actions, this);\n    }\n\n    /**\n     * If the merchant provides the 'onShippingOptionsChange' callback, then this method is used as a wrapper to it, in order\n     * to expose to the merchant the 'component' instance. The merchant needs the 'component' in order to manipulate the\n     * paymentData\n     *\n     * @param data - PayPal data\n     * @param actions - PayPal actions.\n     */\n    private handleOnShippingOptionsChange(data: any, actions: any): Promise<void> {\n        return this.props.onShippingOptionsChange(data, actions, this);\n    }\n\n    render() {\n        if (!this.props.showPayButton) return null;\n\n        const { onShippingAddressChange, onShippingOptionsChange, ...rest } = this.props;\n\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <PaypalComponent\n                    ref={ref => {\n                        this.componentRef = ref;\n                    }}\n                    {...rest}\n                    {...(onShippingAddressChange && { onShippingAddressChange: this.handleOnShippingAddressChange })}\n                    {...(onShippingOptionsChange && { onShippingOptionsChange: this.handleOnShippingOptionsChange })}\n                    onCancel={() => this.handleError(new AdyenCheckoutError('CANCEL'))}\n                    onChange={this.setState}\n                    onApprove={this.handleOnApprove}\n                    onError={error => {\n                        this.handleError(new AdyenCheckoutError('ERROR', error.toString(), { cause: error }));\n                    }}\n                    onScriptLoadFailure={error => this.handleError(error)}\n                    onSubmit={this.handleSubmit}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default PaypalElement;\n","import { h } from 'preact';\nimport useImage from '../../../core/Context/useImage';\nimport Img from '../../internal/Img';\nimport { getFullBrandName } from '../../Card/components/CardInput/utils';\n\ninterface FastlaneCardBrandIconProps {\n    brand: string;\n}\n\nfunction mapFastlaneCardBrandToAdyenBrand(brand: string) {\n    return brand === 'mastercard' ? 'mc' : brand;\n}\n\nconst FastlaneCardBrandIcon = ({ brand }: FastlaneCardBrandIconProps) => {\n    const getImage = useImage();\n    const mappedBrand = mapFastlaneCardBrandToAdyenBrand(brand);\n\n    return (\n        <span className=\"adyen-checkout-fastlane__card-brand--wrapper\">\n            <Img src={getImage()(mappedBrand)} alt={getFullBrandName(mappedBrand)} />\n        </span>\n    );\n};\n\nexport default FastlaneCardBrandIcon;\n","import { h } from 'preact';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport FastlaneCardBrandIcon from './FaslaneCardBrandIcon';\nimport { PREFIX } from '../../internal/Icon/constants';\nimport useImage from '../../../core/Context/useImage';\nimport Img from '../../internal/Img';\nimport type { ComponentMethodsRef, PayButtonFunctionProps, UIElementStatus } from '../../internal/UIElement/types';\n\nimport './Fastlane.scss';\n\ninterface FastlaneComponentProps {\n    lastFour: string;\n    brand: string;\n    showPayButton: boolean;\n    setComponentRef(ref: ComponentMethodsRef): void;\n    payButton(props?: PayButtonFunctionProps): h.JSX.Element;\n}\n\nconst FastlaneComponent = ({ lastFour, brand, payButton, setComponentRef, showPayButton }: FastlaneComponentProps) => {\n    const getImage = useImage();\n    const [status, setStatus] = useState<UIElementStatus>('ready');\n    const fastlaneRef = useRef({\n        setStatus: (status: UIElementStatus) => setStatus(status)\n    });\n\n    useEffect(() => {\n        setComponentRef(fastlaneRef.current);\n    }, []);\n\n    return (\n        <div className=\"adyen-checkout-fastlane\" data-testid=\"payment-method-fastlane\">\n            <div className=\"adyen-checkout-fastlane__card-section\">\n                <FastlaneCardBrandIcon brand={brand} />\n                <span className=\"adyen-checkout-fastlane__card-number\">•••• {lastFour}</span>\n            </div>\n\n            {showPayButton && payButton({ status, icon: getImage({ imageFolder: 'components/' })(`${PREFIX}lock`) })}\n\n            <div className=\"adyen-checkout-fastlane__brand\">\n                <Img src={getImage({ imageFolder: 'components/' })(`paypal_fastlane_gray`)} alt=\"Fastlane logo\" />\n            </div>\n        </div>\n    );\n};\n\nexport default FastlaneComponent;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { TxVariants } from '../tx-variants';\nimport FastlaneComponent from './components/FastlaneComponent';\nimport type { FastlaneConfiguration } from './types';\n\nclass Fastlane extends UIElement<FastlaneConfiguration> {\n    public static readonly type = TxVariants.fastlane;\n\n    protected static defaultProps = {\n        keepBrandsVisible: true\n    };\n\n    protected override formatData() {\n        return {\n            paymentMethod: {\n                type: Fastlane.type,\n                fastlaneData: btoa(\n                    JSON.stringify({\n                        fastlaneSessionId: this.props.fastlaneSessionId,\n                        tokenId: this.props.tokenId\n                    })\n                )\n            }\n        };\n    }\n\n    public override async isAvailable(): Promise<void> {\n        const { tokenId, lastFour, brand, email } = this.props;\n        if (tokenId && lastFour && brand && email) {\n            return Promise.resolve();\n        }\n        return Promise.reject();\n    }\n\n    public override get isValid(): boolean {\n        return true;\n    }\n\n    /**\n     * Used to display payment method logo within Drop-in\n     */\n    public override get icon(): string {\n        return this.props.icon ?? this.resources.getImage()('card');\n    }\n\n    /**\n     * Used to display the payment method supported brands within Drop-in\n     */\n    public get brands(): { icon: string; name: string }[] {\n        const { brands } = this.props;\n        return brands.map(brand => ({ icon: this.props.modules.resources.getImage()(brand), name: brand }));\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <FastlaneComponent\n                    lastFour={this.props.lastFour}\n                    brand={this.props.brand}\n                    payButton={this.payButton}\n                    setComponentRef={this.setComponentRef}\n                    showPayButton={this.props.showPayButton}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default Fastlane;\n","import { ValidatorRules } from '../../../../utils/Validator/types';\nimport validateSSN from '../../../internal/SocialSecurityNumberBrazil/validate';\nimport { validationRules } from '../../../../utils/Validator/defaultRules';\nimport { BOLETO_SOCIAL_SECURITY_NUMBER_INVALID, SF_ErrorCodes } from '../../../../core/Errors/constants';\n\nexport const boletoValidationRules: ValidatorRules = {\n    socialSecurityNumber: {\n        validate: validateSSN,\n        errorMessage: BOLETO_SOCIAL_SECURITY_NUMBER_INVALID,\n        modes: ['blur']\n    },\n    shopperEmail: validationRules.emailRule,\n    default: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: SF_ErrorCodes.ERROR_MSG_INVALID_FIELD,\n        modes: ['blur']\n    },\n    firstName: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: 'firstName.invalid',\n        modes: ['blur']\n    },\n    lastName: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: 'lastName.invalid',\n        modes: ['blur']\n    }\n};\n","import { formatCPFCNPJ } from '../../../internal/SocialSecurityNumberBrazil/utils';\n\nexport const boletoFormatters = {\n    socialSecurityNumber: ssn => formatCPFCNPJ(ssn)\n};\n","import { h } from 'preact';\nimport cx from 'classnames';\nimport { useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Field from '../FormFields/Field';\nimport Checkbox from '../FormFields/Checkbox';\nimport InputEmail from '../FormFields/InputEmail';\nimport './SendCopyToEmail.scss';\nimport { getErrorMessage } from '../../../utils/getErrorMessage';\n\nexport default function SendCopyToEmail(props) {\n    const { errors, value, onInput, onBlur } = props;\n    const { i18n } = useCoreContext();\n    const [sendCopyToEmail, setSendCopyToEmail] = useState(false);\n\n    const toggleEmailField = e => {\n        setSendCopyToEmail(e.target.checked);\n        props.onToggle(sendCopyToEmail);\n    };\n\n    return (\n        <div className={cx('adyen-checkout__fieldset', 'adyen-checkout__fieldset--sendCopyToEmail', props.classNames)}>\n            <Field\n                classNameModifiers={['sendCopyToEmail', 'consentCheckbox']}\n                name={'sendCopyToEmail'}\n                useLabelElement={false}\n                showErrorElement={false}\n            >\n                <Checkbox onChange={toggleEmailField} label={i18n.get('boleto.sendCopyToEmail')} name={'sendCopyToEmail'} />\n            </Field>\n\n            {sendCopyToEmail && (\n                <Field\n                    label={i18n.get('shopperEmail')}\n                    classNameModifiers={['shopperEmail']}\n                    errorMessage={getErrorMessage(i18n, errors, i18n.get('shopperEmail'))}\n                    name={'shopperEmail'}\n                >\n                    <InputEmail name={'shopperEmail'} autoCorrect={'off'} spellCheck={false} value={value} onInput={onInput} onBlur={onBlur} />\n                </Field>\n            )}\n        </div>\n    );\n}\n","import Field from '../FormFields/Field';\nimport SocialSecurityNumberBrazil from './SocialSecurityNumberBrazil';\nimport { h } from 'preact';\nimport InputText from '../FormFields/InputText';\n\nexport function BrazilPersonalDetail(props) {\n    const { i18n, data, handleChangeFor, errors, valid } = props;\n    const getErrorMessage = error => (error && error.errorMessage ? i18n.get(error.errorMessage) : !!error);\n    return (\n        <div className={'adyen-checkout__fieldset adyen-checkout__fieldset--address adyen-checkout__fieldset--personalDetails'}>\n            <div className=\"adyen-checkout__fieldset__title\">{i18n.get('personalDetails')}</div>\n\n            <div className=\"adyen-checkout__fieldset__fields\">\n                <Field\n                    label={i18n.get('firstName')}\n                    classNameModifiers={['firstName', 'col-50']}\n                    errorMessage={getErrorMessage(errors.firstName)}\n                    name={'firstName'}\n                >\n                    <InputText\n                        name={'firstName'}\n                        autocorrect={'off'}\n                        spellcheck={false}\n                        value={data.firstName}\n                        onInput={handleChangeFor('firstName', 'input')}\n                        onBlur={handleChangeFor('firstName', 'blur')}\n                    />\n                </Field>\n\n                <Field\n                    label={i18n.get('lastName')}\n                    classNameModifiers={['lastName', 'col-50']}\n                    errorMessage={getErrorMessage(errors.lastName)}\n                    name={'lastName'}\n                >\n                    <InputText\n                        name={'lastName'}\n                        autocorrect={'off'}\n                        spellcheck={false}\n                        value={data.lastName}\n                        onInput={handleChangeFor('lastName', 'input')}\n                        onBlur={handleChangeFor('lastName', 'blur')}\n                    />\n                </Field>\n\n                <SocialSecurityNumberBrazil\n                    data={data.socialSecurityNumber}\n                    error={errors.socialSecurityNumber}\n                    valid={valid.socialSecurityNumber}\n                    onInput={handleChangeFor('socialSecurityNumber', 'input')}\n                    onBlur={handleChangeFor('socialSecurityNumber', 'blur')}\n                />\n            </div>\n        </div>\n    );\n}\n","import { h } from 'preact';\nimport { useState, useEffect, useRef } from 'preact/hooks';\nimport Address from '../../../internal/Address';\nimport { boletoValidationRules } from './validate';\nimport { boletoFormatters } from './utils';\nimport SendCopyToEmail from '../../../internal/SendCopyToEmail/SendCopyToEmail';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { BoletoInputDataState } from '../../types';\nimport useForm from '../../../../utils/useForm';\nimport { BrazilPersonalDetail } from '../../../internal/SocialSecurityNumberBrazil/BrazilPersonalDetail';\nimport FormInstruction from '../../../internal/FormInstruction';\nimport { ComponentMethodsRef } from '../../../internal/UIElement/types';\n\ninterface BoletoInputProps {\n    onChange(data: any): void;\n    // TODO\n    [key: string]: any;\n}\n\nfunction BoletoInput(props: BoletoInputProps) {\n    const { i18n } = useCoreContext();\n    const addressRef = useRef(null);\n    const setAddressRef = ref => {\n        addressRef.current = ref;\n    };\n    const { handleChangeFor, triggerValidation, setSchema, setData, setValid, setErrors, data, valid, errors, isValid } =\n        useForm<BoletoInputDataState>({\n            schema: ['firstName', 'lastName', 'socialSecurityNumber', 'billingAddress', 'shopperEmail'],\n            defaultData: props.data,\n            rules: boletoValidationRules,\n            formatters: boletoFormatters\n        });\n\n    // Email field toggle\n    const [showingEmail, setShowingEmail] = useState<boolean>(false);\n    const toggleEmailField = () => setShowingEmail(!showingEmail);\n\n    // Handle form schema updates\n    useEffect(() => {\n        const newSchema = [\n            ...(props.personalDetailsRequired ? ['firstName', 'lastName', 'socialSecurityNumber'] : []),\n            ...(props.billingAddressRequired ? ['billingAddress'] : []),\n            ...(showingEmail ? ['shopperEmail'] : [])\n        ];\n        setSchema(newSchema);\n    }, [showingEmail, props.personalDetailsRequired, props.billingAddressRequired]);\n\n    const handleAddress = address => {\n        setData('billingAddress', address.data);\n        setValid('billingAddress', address.isValid);\n        setErrors('billingAddress', address.errors);\n    };\n\n    const [status, setStatus] = useState('ready');\n\n    /** An object by which to expose 'public' members to the parent UIElement */\n    const boletoRef = useRef<ComponentMethodsRef>({});\n    // Just call once\n    if (!Object.keys(boletoRef.current).length) {\n        props.setComponentRef?.(boletoRef.current);\n    }\n\n    boletoRef.current.showValidation = () => {\n        triggerValidation();\n        if (props.billingAddressRequired) {\n            addressRef.current.showValidation();\n        }\n    };\n\n    boletoRef.current.setStatus = setStatus;\n\n    useEffect(() => {\n        const billingAddressValid = props.billingAddressRequired ? Boolean(valid.billingAddress) : true;\n        props.onChange({ data, valid, errors, isValid: isValid && billingAddressValid });\n    }, [data, valid, errors]);\n\n    const buttonModifiers = [...(!props.personalDetailsRequired && !props.billingAddressRequired && !props.showEmailAddress ? ['standalone'] : [])];\n\n    const showFormInstruction = props.personalDetailsRequired || props.billingAddressRequired;\n\n    return (\n        <div className=\"adyen-checkout__boleto-input__field\">\n            {showFormInstruction && <FormInstruction />}\n\n            {props.personalDetailsRequired && (\n                <BrazilPersonalDetail i18n={i18n} data={data} handleChangeFor={handleChangeFor} errors={errors} valid={valid} />\n            )}\n\n            {props.billingAddressRequired && (\n                <Address\n                    allowedCountries={['BR']}\n                    label=\"billingAddress\"\n                    data={{ ...props.data.billingAddress, country: 'BR' }}\n                    onChange={handleAddress}\n                    requiredFields={['country', 'street', 'houseNumberOrName', 'postalCode', 'city', 'stateOrProvince']}\n                    setComponentRef={setAddressRef}\n                />\n            )}\n\n            {props.showEmailAddress && (\n                <SendCopyToEmail\n                    value={data.shopperEmail}\n                    errors={errors.shopperEmail}\n                    onToggle={toggleEmailField}\n                    onInput={handleChangeFor('shopperEmail', 'input')}\n                    onBlur={handleChangeFor('shopperEmail', 'blur')}\n                />\n            )}\n\n            {props.showPayButton &&\n                props.payButton({\n                    status,\n                    label: i18n.get('boletobancario.btnLabel'),\n                    classNameModifiers: buttonModifiers\n                })}\n        </div>\n    );\n}\n\nBoletoInput.defaultProps = {\n    data: {},\n    showEmailAddress: true,\n    personalDetailsRequired: true,\n    billingAddressRequired: true\n};\n\nexport default BoletoInput;\n","import { h } from 'preact';\nimport Voucher from '../../../internal/Voucher';\n\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport './BoletoVoucherResult.scss';\nimport { VoucherDetail } from '../../../internal/Voucher/types';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nconst BoletoVoucherResult = props => {\n    const { i18n, loadingContext } = useCoreContext();\n    const getImage = useImage();\n    const { reference, expiresAt, downloadUrl } = props;\n    const barcodeReference = reference.replace(/[^\\d]/g, '').replace(/^(\\d{4})(\\d{5})\\d{1}(\\d{10})\\d{1}(\\d{10})\\d{1}(\\d{15})$/, '$1$5$2$3$4');\n    const barcodeUrl = `${loadingContext}utility/v1/barcode.png?data=${barcodeReference}&type=itf&clientKey=${props.clientKey}`;\n\n    const paymentMethodType = 'boletobancario'; // overwrite the bank specific type of boleto, e.g. 'boletobancario_santander', to a more generic form\n\n    return (\n        <Voucher\n            {...extractCommonPropsForVoucher({\n                props: { ...props, paymentMethodType },\n                i18n,\n                introKey: 'voucher.introduction',\n                getImage: getImage()\n            })}\n            barcode={barcodeUrl}\n            voucherDetails={[{ label: i18n.get('voucher.expirationDate'), value: i18n.date(expiresAt) }] as VoucherDetail[]}\n            downloadUrl={downloadUrl}\n            copyBtn\n        />\n    );\n};\n\nexport default BoletoVoucherResult;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport BoletoInput from './components/BoletoInput';\nimport { cleanCPFCNPJ } from '../internal/SocialSecurityNumberBrazil/utils';\nimport BoletoVoucherResult from './components/BoletoVoucherResult';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { TxVariants } from '../tx-variants';\n\nimport type { BoletoConfiguration } from './types';\n\nexport class BoletoElement extends UIElement<BoletoConfiguration> {\n    public static type = TxVariants.boletobancario;\n\n    public static txVariants = [\n        TxVariants.boletobancario,\n        TxVariants.boletobancario_itau,\n        TxVariants.boletobancario_santander,\n        TxVariants.primeiropay_boleto\n    ];\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        const { data = {} } = this.state;\n        const { billingAddress, shopperEmail, firstName, lastName, socialSecurityNumber = '' } = data;\n\n        return {\n            paymentMethod: {\n                type: this.type\n            },\n            ...(billingAddress && { billingAddress }),\n            ...(shopperEmail && { shopperEmail }),\n            ...(firstName && lastName && { shopperName: { firstName, lastName } }),\n            ...(socialSecurityNumber && { socialSecurityNumber: cleanCPFCNPJ(socialSecurityNumber) })\n        };\n    }\n\n    private handleRef = ref => {\n        this.componentRef = ref;\n    };\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.reference ? (\n                    <BoletoVoucherResult ref={this.handleRef} icon={this.icon} {...this.props} onActionHandled={this.onActionHandled} />\n                ) : (\n                    <BoletoInput\n                        setComponentRef={this.handleRef}\n                        {...this.props}\n                        onChange={this.setState}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                    />\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default BoletoElement;\n","import { h } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport PersonalDetails from '../../../internal/PersonalDetails/PersonalDetails';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport FormInstruction from '../../../internal/FormInstruction';\nimport { ComponentMethodsRef } from '../../../internal/UIElement/types';\n\nexport default function DokuInput(props) {\n    const personalDetailsRef = useRef(null);\n    const setPersonalDetailsRef = ref => {\n        personalDetailsRef.current = ref;\n    };\n\n    const { i18n } = useCoreContext();\n\n    const [status, setStatus] = useState('ready');\n\n    /** An object by which to expose 'public' members to the parent UIElement */\n    const dokuRef = useRef<ComponentMethodsRef>({});\n    // Just call once\n    if (!Object.keys(dokuRef.current).length) {\n        props.setComponentRef?.(dokuRef.current);\n    }\n\n    dokuRef.current.showValidation = () => {\n        personalDetailsRef.current?.showValidation();\n    };\n\n    dokuRef.current.setStatus = setStatus;\n\n    return (\n        <div className=\"adyen-checkout__doku-input__field\">\n            <FormInstruction />\n\n            <PersonalDetails\n                data={props.data}\n                requiredFields={['firstName', 'lastName', 'shopperEmail']}\n                onChange={props.onChange}\n                namePrefix=\"doku\"\n                setComponentRef={setPersonalDetailsRef}\n            />\n\n            {props.showPayButton && props.payButton({ status, label: i18n.get('confirmPurchase') })}\n        </div>\n    );\n}\n","import { h } from 'preact';\nimport Voucher from '../../../internal/Voucher';\n\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { DokuVoucherResultProps } from '../../types';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nconst DokuVoucherResult = (props: DokuVoucherResultProps) => {\n    const { expiresAt, instructionsUrl, shopperName, merchantName } = props;\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    return (\n        <Voucher\n            {...extractCommonPropsForVoucher({ props, i18n, introKey: 'voucher.introduction.doku', getImage: getImage() })}\n            instructionsUrl={instructionsUrl}\n            voucherDetails={[\n                { label: i18n.get('voucher.expirationDate'), value: i18n.date(expiresAt) },\n                { label: i18n.get('voucher.shopperName'), value: shopperName },\n                { label: i18n.get('voucher.merchantName'), value: merchantName }\n            ]}\n            copyBtn\n        />\n    );\n};\n\nexport default DokuVoucherResult;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport DokuInput from './components/DokuInput';\nimport DokuVoucherResult from './components/DokuVoucherResult';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\n\nexport class DokuElement extends UIElement<VoucherConfiguration> {\n    public static type = TxVariants.doku;\n    public static txVariants = [\n        TxVariants.doku,\n        TxVariants.doku_alfamart,\n        TxVariants.doku_permata_lite_atm,\n        TxVariants.doku_indomaret,\n        TxVariants.doku_atm_mandiri_va,\n        TxVariants.doku_sinarmas_va,\n        TxVariants.doku_mandiri_va,\n        TxVariants.doku_cimb_va,\n        TxVariants.doku_danamon_va,\n        TxVariants.doku_bri_va,\n        TxVariants.doku_bni_va,\n        TxVariants.doku_bca_va,\n        TxVariants.doku_wallet\n    ];\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        return {\n            ...this.state.data,\n            paymentMethod: {\n                type: this.type\n            }\n        };\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.reference ? (\n                    <DokuVoucherResult\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        {...this.props}\n                        onActionHandled={this.onActionHandled}\n                    />\n                ) : (\n                    <DokuInput\n                        setComponentRef={this.setComponentRef}\n                        {...this.props}\n                        onChange={this.setState}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                    />\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default DokuElement;\n","import { h } from 'preact';\nimport Voucher from '../../../../components/internal/Voucher';\nimport { VoucherDetail } from '../../../internal/Voucher/types';\n\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { OxxoVoucherResultProps } from '../../types';\nimport './OxxoVoucherResult.scss';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nconst OxxoVoucherResult = (props: OxxoVoucherResultProps) => {\n    const { i18n, loadingContext } = useCoreContext();\n    const getImage = useImage();\n    const { alternativeReference, reference, expiresAt, merchantReference, downloadUrl } = props;\n\n    const barcodeUrl = `${loadingContext}utility/v1/barcode.png?data=${reference}&type=code128c&clientKey=${props.clientKey}`;\n\n    const voucherDetails: VoucherDetail[] = [\n        ...(expiresAt\n            ? [\n                  {\n                      label: i18n.get('voucher.expirationDate'),\n                      value: i18n.date(expiresAt)\n                  }\n              ]\n            : []),\n        ...(merchantReference\n            ? [\n                  {\n                      label: i18n.get('voucher.shopperReference'),\n                      value: merchantReference\n                  }\n              ]\n            : []),\n        ...(alternativeReference\n            ? [\n                  {\n                      label: i18n.get('voucher.alternativeReference'),\n                      value: alternativeReference\n                  }\n              ]\n            : [])\n    ];\n\n    return (\n        <Voucher\n            {...extractCommonPropsForVoucher({ props, i18n, introKey: 'voucher.introduction', getImage: getImage() })}\n            barcode={barcodeUrl}\n            copyBtn\n            downloadUrl={downloadUrl}\n            voucherDetails={voucherDetails}\n        />\n    );\n};\n\nexport default OxxoVoucherResult;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport OxxoVoucherResult from './components/OxxoVoucherResult';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\n\nexport class OxxoElement extends UIElement<VoucherConfiguration> {\n    public static type = TxVariants.oxxo;\n\n    protected static defaultProps = {\n        name: 'Oxxo'\n    };\n\n    get isValid(): boolean {\n        return true;\n    }\n\n    formatData() {\n        return {\n            paymentMethod: {\n                type: this.props.type || OxxoElement.type\n            }\n        };\n    }\n\n    private handleRef = ref => {\n        this.componentRef = ref;\n    };\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.reference ? (\n                    <OxxoVoucherResult ref={this.handleRef} {...this.props} onActionHandled={this.onActionHandled} />\n                ) : (\n                    this.props.showPayButton &&\n                    this.payButton({\n                        ...this.props,\n                        classNameModifiers: ['standalone'],\n                        label: `${this.props.i18n.get('continueTo')} ${this.props.name}`,\n                        onClick: this.submit\n                    })\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default OxxoElement;\n","import { h } from 'preact';\nimport cx from 'classnames';\nimport Img from '../../Img';\nimport './IssuerButton.scss';\n\ninterface IssuerButtonProps {\n    name: string;\n    id: string;\n    selected: boolean;\n    onClick: (event: UIEvent) => void;\n    icon?: string;\n}\n\nfunction IssuerButton({ name, id, icon, onClick, selected = false }: IssuerButtonProps) {\n    return (\n        <button\n            type=\"button\"\n            className={cx('adyen-checkout__issuer-button', { 'adyen-checkout__issuer-button--selected': selected })}\n            aria-label={name}\n            aria-pressed={selected}\n            onClick={onClick}\n            value={id}\n        >\n            {!!icon && <Img className=\"adyen-checkout__issuer-button-img\" alt={name} src={icon} />}\n            <span className=\"adyen-checkout__issuer-button-text\">{name}</span>\n        </button>\n    );\n}\n\nexport default IssuerButton;\n","import { h } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport IssuerButton from './IssuerButton';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport './IssuerButtonGroup.scss';\nimport { IssuerItem } from '../types';\n\ninterface IssuerButtonGroupProps {\n    items: IssuerItem[];\n    selectedIssuerId: string;\n    onChange: (event: UIEvent) => void;\n}\n\nconst IssuerButtonGroup = ({ items = [], selectedIssuerId, onChange }: IssuerButtonGroupProps) => {\n    const { i18n } = useCoreContext();\n\n    const handleClick = useCallback(\n        (event: UIEvent) => {\n            const value = (event.currentTarget as HTMLButtonElement).value;\n            Object.defineProperty(event.target, 'value', { value });\n            onChange(event);\n        },\n        [onChange]\n    );\n\n    return (\n        <div className=\"adyen-checkout__issuer-button-group\" role=\"group\" aria-label={i18n.get('issuerList.selectField.contextualText')}>\n            {items.map(issuer => (\n                <IssuerButton key={issuer.id} {...issuer} selected={selectedIssuerId === issuer.id} onClick={handleClick} />\n            ))}\n        </div>\n    );\n};\n\nexport default IssuerButtonGroup;\n","import { Fragment, h } from 'preact';\nimport { useState, useEffect, useCallback, useRef } from 'preact/hooks';\nimport useForm from '../../../utils/useForm';\nimport Field from '../FormFields/Field';\nimport IssuerButtonGroup from './IssuerButtonGroup';\nimport ContentSeparator from '../ContentSeparator';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { ValidatorRules } from '../../../utils/Validator/types';\nimport { IssuerListProps } from './types';\nimport './IssuerList.scss';\nimport useSRPanelContext from '../../../core/Errors/useSRPanelContext';\nimport { SetSRMessagesReturnFn } from '../../../core/Errors/SRPanelProvider';\nimport { SetSRMessagesReturnObject } from '../../../core/Errors/types';\nimport { ERROR_ACTION_FOCUS_FIELD } from '../../../core/Errors/constants';\nimport { setFocusOnField } from '../../../utils/setFocus';\nimport DisclaimerMessage from '../DisclaimerMessage';\nimport Select from '../FormFields/Select';\nimport { SelectTargetObject } from '../FormFields/Select/types';\nimport {\n    ANALYTICS_DISPLAYED_STR,\n    ANALYTICS_FEATURED_ISSUER,\n    ANALYTICS_INPUT_STR,\n    ANALYTICS_LIST,\n    ANALYTICS_LIST_SEARCH,\n    ANALYTICS_SEARCH_DEBOUNCE_TIME,\n    ANALYTICS_SELECTED_STR\n} from '../../../core/Analytics/constants';\nimport { debounce } from '../../../utils/debounce';\nimport { AnalyticsInfoEvent } from '../../../core/Analytics/AnalyticsInfoEvent';\n\nconst payButtonLabel = ({ issuer, items }, i18n): string => {\n    const issuerName = items.find(i => i.id === issuer)?.name;\n    if (!issuer || !issuerName) return i18n.get('continue');\n    return `${i18n.get('continueTo')} ${issuerName}`;\n};\n\nconst schema = ['issuer'];\nconst validationRules: ValidatorRules = {\n    issuer: {\n        validate: issuer => !!issuer && issuer.length > 0,\n        errorMessage: 'issuerList.selectField.contextualText',\n        modes: ['blur']\n    }\n};\n\nenum IssuerListInputTypes {\n    ButtonGroup,\n    Dropdown\n}\n\nfunction IssuerList({ items, placeholder, issuer, highlightedIds = [], showContextualElement, contextualText, ...props }: IssuerListProps) {\n    const { i18n } = useCoreContext();\n    const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm({\n        schema,\n        defaultData: { issuer },\n        rules: validationRules\n    });\n    const [status, setStatus] = useState('ready');\n    const [inputType, setInputType] = useState<IssuerListInputTypes>(IssuerListInputTypes.Dropdown);\n\n    const { setSRMessagesFromObjects, shouldMoveFocusSR } = useSRPanelContext();\n    const setSRMessages: SetSRMessagesReturnFn = setSRMessagesFromObjects?.({});\n\n    const getErrorMessage = error => (error && error.errorMessage ? i18n.get(error.errorMessage) : !!error);\n\n    this.setStatus = newStatus => {\n        setStatus(newStatus);\n    };\n\n    const handleInputChange = useCallback(\n        (type: IssuerListInputTypes) => (event: h.JSX.TargetedKeyboardEvent<HTMLInputElement>) => {\n            const target = type === IssuerListInputTypes.Dropdown ? ANALYTICS_LIST : ANALYTICS_FEATURED_ISSUER;\n            const issuerObj = items.find(issuer => issuer.id === (event.target as SelectTargetObject).value);\n\n            const analyticsEvent = new AnalyticsInfoEvent({\n                type: ANALYTICS_SELECTED_STR,\n                target,\n                issuer: issuerObj.name\n            });\n            props.onSubmitAnalytics(analyticsEvent);\n\n            setInputType(type);\n            handleChangeFor('issuer')(event);\n        },\n        [handleChangeFor]\n    );\n\n    const handleListToggle = useCallback((isOpen: boolean) => {\n        if (isOpen) {\n            const event = new AnalyticsInfoEvent({\n                type: ANALYTICS_DISPLAYED_STR,\n                target: ANALYTICS_LIST\n            });\n            props.onSubmitAnalytics(event);\n        }\n    }, []);\n\n    const debounceSearchAnalytics = useRef(debounce(props.onSubmitAnalytics, ANALYTICS_SEARCH_DEBOUNCE_TIME));\n\n    const handleSearch = useCallback(() => {\n        debounceSearchAnalytics.current({ type: ANALYTICS_INPUT_STR, target: ANALYTICS_LIST_SEARCH });\n    }, []);\n\n    useEffect(() => {\n        props.onChange({ data, valid, errors, isValid });\n\n        const srPanelResp: SetSRMessagesReturnObject = setSRMessages?.({ errors, isValidating: true });\n        if (srPanelResp?.action === ERROR_ACTION_FOCUS_FIELD) {\n            // Focus field in error, if required\n            if (shouldMoveFocusSR) setFocusOnField('.adyen-checkout__issuer-list', 'issuer-list');\n        }\n    }, [data, valid, errors, isValid]);\n\n    this.showValidation = () => {\n        triggerValidation();\n    };\n\n    const { highlightedItems } = items.reduce(\n        (memo, item) => {\n            if (highlightedIds.includes(item.id)) memo.highlightedItems.push({ ...item });\n            return memo;\n        },\n        { highlightedItems: [] }\n    );\n\n    return (\n        <div className=\"adyen-checkout__issuer-list\">\n            {!!highlightedItems.length && (\n                <Fragment>\n                    <IssuerButtonGroup\n                        selectedIssuerId={inputType === IssuerListInputTypes.ButtonGroup ? data['issuer'] : null}\n                        items={highlightedItems}\n                        onChange={handleInputChange(IssuerListInputTypes.ButtonGroup)}\n                    />\n                    <ContentSeparator />\n                </Fragment>\n            )}\n\n            <Field\n                label={i18n.get('issuerList.selectField.label')}\n                errorMessage={getErrorMessage(errors.issuer)}\n                classNameModifiers={['issuer-list']}\n                name={'issuer'}\n                showContextualElement={showContextualElement}\n                contextualText={contextualText}\n            >\n                <Select\n                    items={items}\n                    selectedValue={inputType === IssuerListInputTypes.Dropdown ? data['issuer'] : null}\n                    placeholder={placeholder}\n                    name={'issuer'}\n                    className={'adyen-checkout__issuer-list__dropdown'}\n                    onChange={handleInputChange(IssuerListInputTypes.Dropdown)}\n                    onListToggle={handleListToggle}\n                    onInput={handleSearch}\n                />\n            </Field>\n\n            {props.termsAndConditions && (\n                <div className=\"adyen-checkout__issuer-list__termsAndConditions\">\n                    <DisclaimerMessage message={i18n.get(props.termsAndConditions.translationKey)} urls={props.termsAndConditions.urls} />\n                </div>\n            )}\n\n            {props.showPayButton &&\n                props.payButton({\n                    status,\n                    label: payButtonLabel({ issuer: data['issuer'], items: [...items, ...highlightedItems] }, i18n)\n                })}\n        </div>\n    );\n}\n\nIssuerList.defaultProps = {\n    onChange: () => {}\n};\n\nexport default IssuerList;\n","import { ImageOptions } from '../core/Context/Resources';\nimport { UseImageHookType } from '../core/Context/useImage';\n\nconst getIssuerImageUrl =\n    (options: object, type: string, getImage: UseImageHookType) =>\n    (issuer: string): string => {\n        if (!issuer) return null;\n\n        const imageOptions: ImageOptions = {\n            parentFolder: issuer ? `${type}/` : '',\n            type: issuer || type,\n            ...options\n        };\n\n        return getImage(imageOptions)(issuer);\n    };\n\nexport default getIssuerImageUrl;\n","import { h } from 'preact';\nimport UIElement from '../../internal/UIElement/UIElement';\nimport IssuerList from '../../internal/IssuerList';\nimport getIssuerImageUrl from '../../../utils/get-issuer-image';\nimport { FALLBACK_CONTEXT } from '../../../core/config';\nimport { CoreProvider } from '../../../core/Context/CoreProvider';\nimport RedirectButton from '../../internal/RedirectButton';\nimport SRPanelProvider from '../../../core/Errors/SRPanelProvider';\nimport { IssuerListConfiguration, IssuerListData } from './types';\nimport type { ICore } from '../../../core/types';\n\nclass IssuerListContainer extends UIElement<IssuerListConfiguration> {\n    protected static defaultProps = {\n        showImage: true,\n        issuers: [],\n        highlightedIssuers: [],\n        loadingContext: FALLBACK_CONTEXT,\n        showPaymentMethodItemImages: false\n    };\n\n    constructor(checkout: ICore, props?: IssuerListConfiguration) {\n        super(checkout, props);\n\n        const getImage = props => this.resources.getImage(props);\n\n        if (this.props.showImage) {\n            const getIssuerIcon = getIssuerImageUrl({ loadingContext: this.props.loadingContext }, this.constructor['type'], getImage);\n\n            this.props.issuers = this.props.issuers.map(item => ({\n                ...item,\n                icon: getIssuerIcon(item.id)\n            }));\n        }\n    }\n\n    formatProps(props) {\n        const issuers = (props.details && props.details.length && (props.details.find(d => d.key === 'issuer') || {}).items) || props.issuers || [];\n        return { ...props, issuers };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData(): IssuerListData {\n        return {\n            paymentMethod: {\n                type: this.type,\n                issuer: this.state?.data?.issuer\n            }\n        };\n    }\n\n    /**\n     * Returns whether the component state is valid or not\n     */\n    get isValid() {\n        if (this.props.issuers.length === 0) {\n            return true;\n        }\n        return !!this.state?.isValid;\n    }\n\n    /**\n     * Returns brands array (similar to card) depending on showPaymentMethodItemImages\n     * This is used to show the brands in the PaymentMethodItem\n     * Requires brands icons to be loaded in the payment method\n     */\n    get brands(): { icon: any; name: string }[] {\n        if (this.props.showPaymentMethodItemImages) {\n            return this.props.issuers.map(brand => {\n                const brandIcon = brand.icon;\n                return { icon: brandIcon, name: brand.id };\n            });\n        }\n\n        return [];\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.issuers.length > 0 ? (\n                    <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                        <IssuerList\n                            ref={ref => {\n                                this.componentRef = ref;\n                            }}\n                            items={this.props.issuers}\n                            highlightedIds={this.props.highlightedIssuers}\n                            {...this.props}\n                            {...this.state}\n                            showImage={this.props.showImage}\n                            type={this.constructor['type']}\n                            onChange={this.setState}\n                            onSubmit={this.submit}\n                            payButton={this.payButton}\n                            contextualText={this.props.i18n.get('issuerList.selectField.contextualText')}\n                            onSubmitAnalytics={this.submitAnalytics}\n                        />\n                    </SRPanelProvider>\n                ) : (\n                    <RedirectButton\n                        showPayButton={this.props.showPayButton}\n                        name={this.props.name}\n                        {...this.props}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                    />\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default IssuerListContainer;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass BillDeskOnlineElement extends IssuerListContainer {\n    public static type = TxVariants.billdesk_online;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            showImage: false\n        };\n    }\n}\n\nexport default BillDeskOnlineElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass BillDeskWalletElement extends IssuerListContainer {\n    public static type = TxVariants.billdesk_wallet;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            showImage: false\n        };\n    }\n}\n\nexport default BillDeskWalletElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass DotpayElement extends IssuerListContainer {\n    public static type = TxVariants.dotpay;\n}\n\nexport default DotpayElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass EPSElement extends IssuerListContainer {\n    public static type = TxVariants.eps;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            showImage: false\n        };\n    }\n}\n\nexport default EPSElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass MolPayEBankingMYElement extends IssuerListContainer {\n    public static type = TxVariants.molpay_ebanking_fpx_MY;\n}\n\nexport default MolPayEBankingMYElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass MolPayEBankingTHElement extends IssuerListContainer {\n    public static type = TxVariants.molpay_ebanking_TH;\n}\n\nexport default MolPayEBankingTHElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass MolPayEbankingVNElement extends IssuerListContainer {\n    public static type = TxVariants.molpay_ebanking_VN;\n}\n\nexport default MolPayEbankingVNElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nconst TERMS_AND_CONDITIONS = 'https://static.payu.com/sites/terms/files/payu_privacy_policy_cs.pdf';\nconst ICON = 'bankTransfer_IBAN';\n\nclass OnlineBankingCZElement extends IssuerListContainer {\n    public static type = TxVariants.onlineBanking_CZ;\n\n    private static termsAndConditions = {\n        translationKey: 'onlineBanking.termsAndConditions',\n        urls: [TERMS_AND_CONDITIONS]\n    };\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            showImage: true,\n            termsAndConditions: OnlineBankingCZElement.termsAndConditions\n        };\n    }\n\n    get icon(): string {\n        return this.props.icon ?? this.resources.getImage()(ICON);\n    }\n}\n\nexport default OnlineBankingCZElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { TxVariants } from '../tx-variants';\n\nclass OnlineBankingINElement extends IssuerListContainer {\n    public static type = TxVariants.onlinebanking_IN;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            showImage: false\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        return {\n            ...super.formatData(),\n            browserInfo: this.browserInfo\n        };\n    }\n\n    get browserInfo() {\n        return collectBrowserInfo();\n    }\n}\n\nexport default OnlineBankingINElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\nimport { IssuerListConfiguration } from '../helpers/IssuerListContainer/types';\nimport type { ICore } from '../../core/types';\n\nclass OnlineBankingPL extends IssuerListContainer {\n    public static type = TxVariants.onlineBanking_PL;\n\n    private static disclaimerUrlsMap = {\n        regulation: 'https://www.przelewy24.pl/regulamin',\n        obligation: 'https://www.przelewy24.pl/obowiazek-informacyjny-rodo-platnicy'\n    };\n\n    private static termsAndConditions = {\n        translationKey: 'onlineBankingPL.termsAndConditions',\n        urls: [OnlineBankingPL.disclaimerUrlsMap.regulation, OnlineBankingPL.disclaimerUrlsMap.obligation]\n    };\n\n    constructor(checkout: ICore, props?: IssuerListConfiguration) {\n        super(checkout, { ...props, termsAndConditions: OnlineBankingPL.termsAndConditions });\n    }\n}\n\nexport default OnlineBankingPL;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nconst TERMS_AND_CONDITIONS = 'https://static.payu.com/sites/terms/files/payu_privacy_policy_sk.pdf';\nconst ICON = 'bankTransfer_IBAN';\n\nclass OnlineBankingSKElement extends IssuerListContainer {\n    public static type = TxVariants.onlineBanking_SK;\n\n    private static termsAndConditions = {\n        translationKey: 'onlineBanking.termsAndConditions',\n        urls: [TERMS_AND_CONDITIONS]\n    };\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            showImage: true,\n            termsAndConditions: OnlineBankingSKElement.termsAndConditions\n        };\n    }\n\n    get icon(): string {\n        return this.props.icon ?? this.resources.getImage()(ICON);\n    }\n}\n\nexport default OnlineBankingSKElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer';\n\nclass OnlineBankingFI extends IssuerListContainer {\n    public static type = 'ebanking_FI';\n}\n\nexport default OnlineBankingFI;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\nimport { IssuerListConfiguration } from '../helpers/IssuerListContainer/types';\nimport type { ICore } from '../../core/types';\n\nclass PayByBank extends IssuerListContainer {\n    public static type = TxVariants.paybybank;\n\n    constructor(checkout: ICore, props?: IssuerListConfiguration) {\n        super(checkout, { ...props, showPaymentMethodItemImages: true });\n    }\n}\n\nexport default PayByBank;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass PayuNetCashcardElement extends IssuerListContainer {\n    public static type = TxVariants.payu_IN_cashcard;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            showImage: false\n        };\n    }\n}\n\nexport default PayuNetCashcardElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass PayuNetBankingElement extends IssuerListContainer {\n    public static type = TxVariants.payu_IN_nb;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            showImage: false\n        };\n    }\n}\n\nexport default PayuNetBankingElement;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { TxVariants } from '../tx-variants';\n\nclass WalletINElement extends IssuerListContainer {\n    public static type = TxVariants.wallet_IN;\n\n    formatProps(props) {\n        return {\n            ...super.formatProps(props),\n            showImage: false\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        return {\n            ...super.formatData(),\n            browserInfo: this.browserInfo\n        };\n    }\n\n    get browserInfo() {\n        return collectBrowserInfo();\n    }\n}\n\nexport default WalletINElement;\n","import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport useForm from '../../../../utils/useForm';\nimport Field from '../../../internal/FormFields/Field';\nimport getIssuerImageUrl from '../../../../utils/get-issuer-image';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { DragonpayInputData, DragonpayInputIssuerItem, DragonpayInputProps } from '../../types';\nimport InputEmail from '../../../internal/FormFields/InputEmail';\nimport Select from '../../../internal/FormFields/Select';\nimport useImage from '../../../../core/Context/useImage';\nimport { validationRules } from '../../../../utils/Validator/defaultRules';\nimport { getErrorMessage } from '../../../../utils/getErrorMessage';\n\nexport default function DragonpayInput(props: DragonpayInputProps) {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const isIssuerRequired = () => {\n        const typesRequiringIssuers = ['dragonpay_ebanking', 'dragonpay_otc_banking', 'dragonpay_otc_non_banking'];\n        return typesRequiringIssuers.indexOf(props.type) > -1;\n    };\n\n    const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<DragonpayInputData>({\n        schema: [...(isIssuerRequired() ? ['issuer'] : []), 'shopperEmail'],\n        rules: {\n            issuer: {\n                validate: issuer => isIssuerRequired() && !!issuer,\n                modes: ['input', 'blur']\n            },\n            shopperEmail: validationRules.emailRule\n        }\n    });\n\n    const getIssuerIcon = getIssuerImageUrl({}, props.type, getImage);\n    const items = props.items.map(\n        (item: DragonpayInputIssuerItem): DragonpayInputIssuerItem => ({\n            ...item,\n            icon: getIssuerIcon(item.id && item.id.toLowerCase())\n        })\n    );\n\n    const getIssuerSelectFieldKey = type => {\n        if (type === 'dragonpay_otc_non_banking') {\n            return 'dragonpayVoucher.selectField.contextualText.nonBank';\n        }\n        return 'dragonpayVoucher.selectField.contextualText.bank';\n    };\n\n    useEffect(() => {\n        props.onChange({ isValid, data, valid, errors });\n    }, [isValid, data, valid, errors]);\n\n    const [status, setStatus] = useState('ready');\n    this.setStatus = setStatus;\n    this.showValidation = triggerValidation;\n\n    return (\n        <div className=\"adyen-checkout__dragonpay-input__field\">\n            <Field\n                label={i18n.get('shopperEmail')}\n                errorMessage={getErrorMessage(i18n, errors.shopperEmail, i18n.get('shopperEmail'))}\n                name={'dragonpay-shopperEmail'}\n            >\n                <InputEmail\n                    name={'dragonpay-shopperEmail'}\n                    autoCorrect={'off'}\n                    value={data.shopperEmail}\n                    className={'adyen-checkout__input--large'}\n                    spellCheck={false}\n                    onInput={handleChangeFor('shopperEmail', 'input')}\n                    onBlur={handleChangeFor('shopperEmail', 'blur')}\n                />\n            </Field>\n\n            {isIssuerRequired() && (\n                <Field label={i18n.get(getIssuerSelectFieldKey(props.type))} errorMessage={!!errors.issuer} name={'issuer'}>\n                    <Select\n                        items={items}\n                        selectedValue={data.issuer}\n                        name={'issuer'}\n                        className={'adyen-checkout__dropdown--large adyen-checkout__issuer-list__dropdown'}\n                        onChange={handleChangeFor('issuer')}\n                    />\n                </Field>\n            )}\n\n            {props.showPayButton && props.payButton({ status, label: i18n.get('confirmPurchase') })}\n        </div>\n    );\n}\n\nDragonpayInput.defaultProps = {\n    data: {},\n    items: [],\n    onChange: () => {}\n};\n","import { h } from 'preact';\nimport Voucher from '../../../internal/Voucher';\nimport getIssuerImageUrl from '../../../../utils/get-issuer-image';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { DragonpayVoucherResultProps } from '../../types';\nimport { VoucherDetail } from '../../../internal/Voucher/types';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nexport default function DragonpayVoucherResult(props: DragonpayVoucherResultProps) {\n    const { surcharge, expiresAt, alternativeReference, instructionsUrl, icon, issuer, paymentMethodType } = props;\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const issuerImageUrl =\n        paymentMethodType !== 'dragonpay_otc_philippines' ? getIssuerImageUrl({}, paymentMethodType, getImage)(issuer.toLowerCase()) : null;\n\n    return (\n        <Voucher\n            {...extractCommonPropsForVoucher({ props, i18n, introKey: 'voucher.introduction', getImage: getImage() })}\n            imageUrl={icon} // Can this url be different to the one generated by using the paymentMethodType?\n            issuerImageUrl={issuerImageUrl}\n            instructionsUrl={instructionsUrl}\n            surcharge={surcharge && i18n.amount(surcharge.value, surcharge.currency)}\n            voucherDetails={\n                [\n                    { label: i18n.get('voucher.expirationDate'), value: i18n.dateTime(expiresAt) },\n                    { label: i18n.get('voucher.alternativeReference'), value: alternativeReference }\n                ] as VoucherDetail[]\n            }\n            copyBtn\n        />\n    );\n}\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport DragonpayInput from './components/DragonpayInput';\nimport DragonpayVoucherResult from './components/DragonpayVoucherResult';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { DragonpayConfiguraton } from './types';\nimport { TxVariants } from '../tx-variants';\n\nexport class DragonpayElement extends UIElement<DragonpayConfiguraton> {\n    public static type = TxVariants.dragonpay;\n\n    public static txVariants = [\n        TxVariants.dragonpay,\n        TxVariants.dragonpay_ebanking,\n        TxVariants.dragonpay_otc_banking,\n        TxVariants.dragonpay_otc_non_banking,\n        TxVariants.dragonpay_otc_philippines\n    ];\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        const { issuer, shopperEmail } = this.state.data;\n\n        return {\n            ...(shopperEmail && { shopperEmail }),\n            paymentMethod: {\n                ...(issuer && { issuer }),\n                type: this.type\n            }\n        };\n    }\n\n    protected formatProps(props: DragonpayConfiguraton) {\n        return {\n            ...props,\n            issuers: props.details?.find(detail => detail.key === 'issuer')?.items ?? props.issuers\n        };\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.reference ? (\n                    <DragonpayVoucherResult\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        icon={this.icon}\n                        {...this.props}\n                        onActionHandled={this.onActionHandled}\n                    />\n                ) : (\n                    <DragonpayInput\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        items={this.props.issuers}\n                        {...this.props}\n                        showPayButton={this.props.showPayButton}\n                        onChange={this.setState}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                    />\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default DragonpayElement;\n","import { telephoneNumber } from '../../utils/regex';\nimport { ValidatorRules } from '../../utils/Validator/types';\n\nexport const econtextValidationRules: ValidatorRules = {\n    telephoneNumber: [\n        {\n            validate: value => !!value && value.length <= 11,\n            errorMessage: 'voucher.econtext.telephoneNumber.invalid',\n            modes: ['input', 'blur']\n        },\n        {\n            validate: value => !!value && telephoneNumber.test(value) && (value.length === 10 || value.length === 11),\n            errorMessage: 'voucher.econtext.telephoneNumber.invalid',\n            modes: ['blur']\n        }\n    ]\n};\n","import { Fragment, h, VNode } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport PersonalDetails from '../../../internal/PersonalDetails/PersonalDetails';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { econtextValidationRules } from '../../validate';\nimport { PersonalDetailsSchema } from '../../../../types/global-types';\nimport './EcontextInput.scss';\nimport FormInstruction from '../../../internal/FormInstruction';\nimport { ComponentMethodsRef } from '../../../internal/UIElement/types';\n\ninterface EcontextInputProps {\n    personalDetailsRequired?: boolean;\n    data?: PersonalDetailsSchema;\n    showPayButton: boolean;\n    payButton(config: any): VNode;\n    onChange?(data: any): void;\n    onSubmit?(state: any, component: any): void;\n    [key: string]: any;\n}\n\nexport default function EcontextInput({ personalDetailsRequired = true, data, onChange, showPayButton, payButton, ...props }: EcontextInputProps) {\n    const personalDetailsRef = useRef(null);\n    const setPersonalDetailsRef = ref => {\n        personalDetailsRef.current = ref;\n    };\n    const { i18n } = useCoreContext();\n\n    const [status, setStatus] = useState('ready');\n\n    /** An object by which to expose 'public' members to the parent UIElement */\n    const econtextRef = useRef<ComponentMethodsRef>({});\n    // Just call once\n    if (!Object.keys(econtextRef.current).length) {\n        props.setComponentRef?.(econtextRef.current);\n    }\n\n    econtextRef.current.showValidation = () => {\n        personalDetailsRef.current?.showValidation();\n    };\n\n    econtextRef.current.setStatus = setStatus;\n\n    return (\n        <div className=\"adyen-checkout__econtext-input__field\">\n            {personalDetailsRequired && (\n                <Fragment>\n                    <FormInstruction />\n                    <PersonalDetails\n                        data={data}\n                        requiredFields={['firstName', 'lastName', 'telephoneNumber', 'shopperEmail']}\n                        onChange={onChange}\n                        namePrefix=\"econtext\"\n                        setComponentRef={setPersonalDetailsRef}\n                        validationRules={econtextValidationRules}\n                    />\n                </Fragment>\n            )}\n            {showPayButton && payButton({ status, label: i18n.get('confirmPurchase') })}\n        </div>\n    );\n}\n","import { h } from 'preact';\nimport Voucher from '../../../internal/Voucher';\n\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { EcontextVoucherResultProps } from '../../types';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nconst EcontextVoucherResult = (props: EcontextVoucherResultProps) => {\n    const { expiresAt, maskedTelephoneNumber, instructionsUrl, collectionInstitutionNumber } = props;\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    return (\n        <Voucher\n            {...extractCommonPropsForVoucher({ props, i18n, introKey: 'voucher.introduction.econtext', getImage: getImage() })}\n            instructionsUrl={instructionsUrl}\n            voucherDetails={[\n                { label: i18n.get('voucher.collectionInstitutionNumber'), value: collectionInstitutionNumber },\n                { label: i18n.get('voucher.expirationDate'), value: i18n.dateTime(expiresAt) },\n                { label: i18n.get('voucher.telephoneNumber'), value: maskedTelephoneNumber }\n            ]}\n            copyBtn\n        />\n    );\n};\n\nexport default EcontextVoucherResult;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport EcontextInput from './components/EcontextInput';\nimport EcontextVoucherResult from './components/EcontextVoucherResult';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { TxVariants } from '../tx-variants';\nimport { EcontextConfiguration } from './types';\n\nexport class EcontextElement extends UIElement<EcontextConfiguration> {\n    public static type = TxVariants.econtext;\n    public static txVariants = [\n        TxVariants.econtext,\n        TxVariants.econtext_atm,\n        TxVariants.econtext_online,\n        TxVariants.econtext_seven_eleven,\n        TxVariants.econtext_stores\n    ];\n\n    protected static defaultProps = {\n        personalDetailsRequired: true\n    };\n\n    get isValid() {\n        if (!this.props.personalDetailsRequired) {\n            return true;\n        }\n        return !!this.state.isValid;\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        return {\n            ...this.state.data,\n            paymentMethod: {\n                type: this.type\n            }\n        };\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.reference ? (\n                    <EcontextVoucherResult\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        {...this.props}\n                        onActionHandled={this.onActionHandled}\n                    />\n                ) : (\n                    <EcontextInput\n                        setComponentRef={this.setComponentRef}\n                        {...this.props}\n                        showPayButton={this.props.showPayButton}\n                        onChange={this.setState}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                    />\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default EcontextElement;\n","/**\n * Returns true if the page is being run in an iframe with the same origin as the parent.\n * In this scenario, if the merchant has set redirectFromTopWhenInIframe: true, then we can perform the redirect on the top level, parent, window;\n * rather than on the iframe's window\n */\nexport default () => {\n    try {\n        if (window.parent.location.href) {\n            return window.location !== window.parent.location; // iframe check: locations will differ if we're in an iframe\n        }\n    } catch (e) {\n        return false; // we cannot access window.parent.location.href - so consider us \"not to be in an iframe\" for the purpose of Redirects\n    }\n};\n","import { Component, h } from 'preact';\nimport detectInIframeInSameOrigin from '../../../../utils/detectInIframeInSameOrigin';\nimport { ActionHandledReturnObject } from '../../../../types/global-types';\n\ninterface RedirectShopperProps {\n    beforeRedirect: (resolve, reject, url) => Promise<void>;\n    url: string;\n    method: 'GET' | 'POST';\n    data?: any;\n    redirectFromTopWhenInIframe?: boolean;\n    paymentMethodType?: string;\n    onActionHandled?: (rtnObj: ActionHandledReturnObject) => void;\n    onRedirectError?: () => void;\n}\n\nclass RedirectShopper extends Component<RedirectShopperProps> {\n    private postForm;\n    public static defaultProps = {\n        beforeRedirect: resolve => resolve(),\n        onRedirectError: () => {},\n        method: 'GET'\n    };\n\n    componentDidMount() {\n        const doRedirect = () => {\n            // call callback\n            this.props.onActionHandled?.({\n                componentType: this.props.paymentMethodType,\n                actionDescription: 'performing-redirect'\n            });\n\n            // perform redirect\n            if (this.postForm) {\n                this.postForm.submit();\n            } else {\n                if (this.props.redirectFromTopWhenInIframe && detectInIframeInSameOrigin()) {\n                    // if in an iframe and the config prop allows it - try to redirect from the top level window\n                    window.top.location.assign?.(this.props.url);\n                } else {\n                    window.location.assign(this.props.url);\n                }\n            }\n        };\n\n        const dispatchEvent = new Promise(\n            (resolve, reject) =>\n                void this.props.beforeRedirect(resolve, reject, {\n                    url: this.props.url,\n                    method: this.props.method,\n                    ...(this.props.data ? { data: this.props.data } : {})\n                })\n        );\n\n        dispatchEvent.then(doRedirect).catch(() => {\n            this.props.onRedirectError();\n        });\n    }\n\n    render({ url, method, data = {} }) {\n        if (method === 'POST') {\n            return (\n                <form\n                    method=\"post\"\n                    data-testid=\"redirect-shopper-form\"\n                    action={url}\n                    style={{ display: 'none' }}\n                    ref={ref => {\n                        this.postForm = ref;\n                    }}\n                    {...(this.props.redirectFromTopWhenInIframe && detectInIframeInSameOrigin() && { target: '_top' })}\n                >\n                    {Object.keys(data).map(key => (\n                        <input type=\"hidden\" name={key} key={key} value={data[key]} />\n                    ))}\n                </form>\n            );\n        }\n\n        return null;\n    }\n}\n\nexport default RedirectShopper;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport RedirectShopper from './components/RedirectShopper';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport { RedirectConfiguration } from './types';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { ANALYTICS_ERROR_CODE, ANALYTICS_ERROR_TYPE } from '../../core/Analytics/constants';\nimport { AnalyticsErrorEvent } from '../../core/Analytics/AnalyticsErrorEvent';\n\nclass RedirectElement extends UIElement<RedirectConfiguration> {\n    public static type = TxVariants.redirect;\n\n    public static defaultProps = {\n        type: RedirectElement.type\n    };\n\n    formatData() {\n        return {\n            paymentMethod: {\n                type: this.type\n            },\n            browserInfo: this.browserInfo\n        };\n    }\n\n    private handleRedirectError = () => {\n        const event = new AnalyticsErrorEvent({\n            component: this.props.paymentMethodType,\n            errorType: ANALYTICS_ERROR_TYPE.redirect,\n            code: ANALYTICS_ERROR_CODE.redirect\n        });\n        super.submitAnalytics(event);\n    };\n\n    get isValid() {\n        return true;\n    }\n\n    get browserInfo() {\n        return collectBrowserInfo();\n    }\n\n    render() {\n        if (this.props.url && this.props.method) {\n            return (\n                <RedirectShopper\n                    url={this.props.url}\n                    {...this.props}\n                    onActionHandled={this.onActionHandled}\n                    onRedirectError={this.handleRedirectError}\n                />\n            );\n        }\n\n        if (this.props.showPayButton) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <RedirectButton\n                        {...this.props}\n                        showPayButton={this.props.showPayButton}\n                        name={this.displayName}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                    />\n                </CoreProvider>\n            );\n        }\n\n        return null;\n    }\n}\n\nexport default RedirectElement;\n","import { h } from 'preact';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport RedirectElement from '../Redirect';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\n\nclass GiropayElement extends RedirectElement {\n    public static type = TxVariants.giropay;\n\n    get displayName() {\n        return this.props.name || this.constructor['type'];\n    }\n\n    render() {\n        if (this.props.showPayButton) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <RedirectButton\n                        {...this.props}\n                        showPayButton={this.props.showPayButton}\n                        name={this.displayName}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                    />\n                </CoreProvider>\n            );\n        }\n\n        return null;\n    }\n}\n\nexport default GiropayElement;\n","import { h } from 'preact';\nimport Voucher from '../../../internal/Voucher';\n\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { MultibancoVoucherResultProps } from '../../types';\nimport { VoucherDetail } from '../../../internal/Voucher/types';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nconst MultibancoVoucherResult = (props: MultibancoVoucherResultProps) => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const { entity, expiresAt, merchantReference, downloadUrl } = props;\n\n    const voucherDetails: VoucherDetail[] = [\n        ...(entity ? [{ label: i18n.get('voucher.entity'), value: entity }] : []),\n        ...(expiresAt ? [{ label: i18n.get('voucher.expirationDate'), value: i18n.date(expiresAt) }] : []),\n        ...(merchantReference ? [{ label: i18n.get('voucher.shopperReference'), value: merchantReference }] : [])\n    ];\n\n    return (\n        <Voucher\n            {...extractCommonPropsForVoucher({ props, i18n, introKey: 'voucher.introduction', getImage: getImage() })}\n            barcode={null}\n            copyBtn\n            downloadUrl={downloadUrl}\n            voucherDetails={voucherDetails}\n        />\n    );\n};\n\nexport default MultibancoVoucherResult;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport MultibancoVoucherResult from './components/MultibancoVoucherResult';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\n\nexport class MultibancoElement extends UIElement<VoucherConfiguration> {\n    public static type = TxVariants.multibanco;\n\n    get isValid() {\n        return true;\n    }\n\n    formatProps(props) {\n        return {\n            ...props,\n            name: props.name || 'Multibanco'\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        return {\n            paymentMethod: {\n                type: this.props.type || MultibancoElement.type\n            }\n        };\n    }\n\n    private handleRef = ref => {\n        this.componentRef = ref;\n    };\n\n    render() {\n        if (this.props.reference) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <MultibancoVoucherResult ref={this.handleRef} {...this.props} onActionHandled={this.onActionHandled} />\n                </CoreProvider>\n            );\n        }\n\n        if (this.props.showPayButton) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <RedirectButton\n                        showPayButton={this.props.showPayButton}\n                        name={this.displayName}\n                        amount={this.props.amount}\n                        payButton={this.payButton}\n                        onSubmit={this.submit}\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                    />\n                </CoreProvider>\n            );\n        }\n\n        return null;\n    }\n}\n\nexport default MultibancoElement;\n","import RedirectElement from '../Redirect';\nimport PayButton, { payAmountLabel } from '../internal/PayButton';\nimport { h } from 'preact';\nimport { TxVariants } from '../tx-variants';\n\nclass TwintElement extends RedirectElement {\n    public static type = TxVariants.twint;\n\n    public static defaultProps = {\n        type: TwintElement.type,\n        name: 'Twint'\n    };\n    /**\n     * Get the element displayable name\n     */\n    get displayName(): string {\n        const { i18n, name, isStoredPaymentMethod } = this.props;\n        return isStoredPaymentMethod ? `${name} ${i18n.get('twint.saved')}` : name || this.constructor['type'];\n    }\n\n    public payButtonLabel() {\n        const { i18n, amount, isStoredPaymentMethod, name } = this.props;\n        if (isStoredPaymentMethod) return payAmountLabel(i18n, amount);\n        return `${i18n.get('continueTo')} ${name}`;\n    }\n\n    /**\n     * Overrides RedirectElement default payButton behaviour to use label\n     * @param props - props\n     */\n    public payButton = props => {\n        return <PayButton {...props} label={this.payButtonLabel()} onClick={this.submit} />;\n    };\n}\n\nexport default TwintElement;\n","import RedirectElement from '../Redirect';\nimport { TxVariants } from '../tx-variants';\n\nclass VippsElement extends RedirectElement {\n    public static type = TxVariants.vipps;\n\n    public static defaultProps = {\n        type: VippsElement.type,\n        name: 'Vipps'\n    };\n}\n\nexport default VippsElement;\n","import { h } from 'preact';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport RedirectElement from '../Redirect';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport './Trustly.scss';\n\nclass TrustlyElement extends RedirectElement {\n    public static type = TxVariants.trustly;\n\n    get displayName() {\n        return this.props.name || this.constructor['type'];\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <div className=\"adyen-checkout-trustly\">\n                    <p className=\"adyen-checkout-trustly__descriptor\">{this.props.i18n.get('trustly.descriptor')}</p>\n                    <ul className=\"adyen-checkout-trustly__description-list\">\n                        <li>{this.props.i18n.get('trustly.description1')}</li>\n                        <li>{this.props.i18n.get('trustly.description2')}</li>\n                    </ul>\n                </div>\n\n                {this.props.showPayButton && (\n                    <RedirectButton\n                        {...this.props}\n                        showPayButton={this.props.showPayButton}\n                        name={this.displayName}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                    />\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default TrustlyElement;\n","import { Fragment, h } from 'preact';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport RedirectElement from '../Redirect';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport './PayByBankUS.scss';\nimport getIssuerImageUrl from '../../utils/get-issuer-image';\nimport PayButton, { payAmountLabel } from '../internal/PayButton';\n\nexport default class PayByBankUS extends RedirectElement {\n    public static type = TxVariants.paybybank_AIS_DD;\n\n    protected formatProps(props) {\n        return {\n            // paymentMethodBrands configuration\n            keepBrandsVisible: true,\n            showOtherInsteafOfNumber: true,\n            ...props\n        };\n    }\n\n    public formatData() {\n        return {\n            paymentMethod: {\n                type: this.type,\n                ...(this.props.storedPaymentMethodId && {\n                    storedPaymentMethodId: this.props.storedPaymentMethodId\n                })\n            },\n            browserInfo: this.browserInfo\n        };\n    }\n\n    get displayName() {\n        if (this.props.storedPaymentMethodId && this.props.label) {\n            return this.props.label;\n        }\n        return this.props.name;\n    }\n\n    get additionalInfo() {\n        return this.props.storedPaymentMethodId ? this.props.name : '';\n    }\n\n    /*\n    Hardcode US brands \n    */\n    get brands(): { icon: string; name: string }[] {\n        const getImage = props => this.resources.getImage(props);\n        // paybybank_AIS_DD / tx_variant not used here since images are kept in paybybank subfolder\n        const getIssuerIcon = getIssuerImageUrl({}, 'paybybank', getImage);\n\n        // hardcoding\n        return [\n            { icon: getIssuerIcon('US-1'), name: 'Wells Fargo' },\n            { icon: getIssuerIcon('US-2'), name: 'Bank of America' },\n            { icon: getIssuerIcon('US-3'), name: 'Chase' },\n            { icon: getIssuerIcon('US-4'), name: 'Citi' }\n        ];\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.storedPaymentMethodId ? (\n                    this.props.showPayButton && (\n                        <PayButton\n                            {...this.props}\n                            classNameModifiers={['standalone']}\n                            amount={this.props.amount}\n                            label={payAmountLabel(this.props.i18n, this.props.amount)}\n                            onClick={this.submit}\n                        />\n                    )\n                ) : (\n                    <Fragment>\n                        <div className=\"adyen-checkout-paybybank_AIS_DD\">\n                            <p className=\"adyen-checkout-paybybank_AIS_DD__description-header\">\n                                {this.props.i18n.get('payByBankAISDD.disclaimer.header')}\n                            </p>\n                            <p className=\"adyen-checkout-paybybank_AIS_DD__description-body\">\n                                {this.props.i18n.get('payByBankAISDD.disclaimer.body')}\n                            </p>\n                        </div>\n\n                        {this.props.showPayButton && (\n                            <RedirectButton\n                                {...this.props}\n                                showPayButton={this.props.showPayButton}\n                                name={this.displayName}\n                                onSubmit={this.submit}\n                                payButton={this.payButton}\n                                ref={ref => {\n                                    this.componentRef = ref;\n                                }}\n                            />\n                        )}\n                    </Fragment>\n                )}\n            </CoreProvider>\n        );\n    }\n}\n","import { TxVariants } from '../tx-variants';\nimport RedirectElement from '../Redirect';\n\nclass Riverty extends RedirectElement {\n    public static readonly type = TxVariants.riverty;\n\n    public static override readonly defaultProps = {\n        type: TxVariants.riverty\n    };\n\n    public override formatData() {\n        return {\n            paymentMethod: {\n                type: this.type,\n                subtype: 'redirect'\n            },\n            browserInfo: this.browserInfo\n        };\n    }\n}\n\nexport default Riverty;\n","const API_ENVIRONMENTS = {\n    test: 'https://checkoutshopper-test.adyen.com/checkoutshopper/',\n    live: 'https://checkoutshopper-live.adyen.com/checkoutshopper/',\n    'live-us': 'https://checkoutshopper-live-us.adyen.com/checkoutshopper/',\n    'live-au': 'https://checkoutshopper-live-au.adyen.com/checkoutshopper/',\n    'live-apse': 'https://checkoutshopper-live-apse.adyen.com/checkoutshopper/',\n    'live-in': 'https://checkoutshopper-live-in.adyen.com/checkoutshopper/',\n    fallback: 'https://checkoutshopper-live.adyen.com/checkoutshopper/'\n};\n\nconst CDN_ENVIRONMENTS = {\n    test: 'https://checkoutshopper-test.cdn.adyen.com/checkoutshopper/',\n    live: 'https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/',\n    'live-us': 'https://checkoutshopper-live-us.cdn.adyen.com/checkoutshopper/',\n    'live-au': 'https://checkoutshopper-live-au.cdn.adyen.com/checkoutshopper/',\n    'live-apse': 'https://checkoutshopper-live-apse.cdn.adyen.com/checkoutshopper/',\n    'live-in': 'https://checkoutshopper-live-in.cdn.adyen.com/checkoutshopper/',\n    fallback: 'https://checkoutshopper-live.cdn.adyen.com/checkoutshopper/'\n};\n\nconst ANALYTICS_ENVIRONMENTS = {\n    test: 'https://checkoutanalytics-test.adyen.com/checkoutanalytics/',\n    live: 'https://checkoutanalytics-live.adyen.com/checkoutanalytics/',\n    'live-us': 'https://checkoutanalytics-live-us.adyen.com/checkoutanalytics/',\n    'live-au': 'https://checkoutanalytics-live-au.adyen.com/checkoutanalytics/',\n    'live-apse': 'https://checkoutanalytics-live-apse.adyen.com/checkoutanalytics/',\n    'live-in': 'https://checkoutanalytics-live-in.adyen.com/checkoutanalytics/',\n    fallback: 'https://checkoutanalytics-live.adyen.com/checkoutanalytics/'\n};\n\nexport { API_ENVIRONMENTS, CDN_ENVIRONMENTS, ANALYTICS_ENVIRONMENTS };\n","import { ANALYTICS_ENVIRONMENTS, API_ENVIRONMENTS, CDN_ENVIRONMENTS } from './constants';\nimport type { CoreConfiguration } from '../types';\n\nexport const getUrlFromMap = (env: CoreConfiguration['environment'], environmentMap: Record<string, string>, environmentUrl?: string): string => {\n    if (environmentUrl) {\n        return environmentUrl;\n    }\n    return environmentMap[env?.toLowerCase()] || environmentMap.fallback;\n};\n\nexport const resolveEnvironments = (environment: CoreConfiguration['environment'], environmentsUrls?: CoreConfiguration['_environmentUrls']) => {\n    const apiUrl = getUrlFromMap(environment, API_ENVIRONMENTS, environmentsUrls?.api);\n    const analyticsUrl = getUrlFromMap(environment, ANALYTICS_ENVIRONMENTS, environmentsUrls?.analytics);\n    const cdnImagesUrl = getUrlFromMap(environment, CDN_ENVIRONMENTS, environmentsUrls?.cdn?.images);\n    const cdnTranslationsUrl =\n        process.env.NODE_ENV === 'development' ? '/' : getUrlFromMap(environment, CDN_ENVIRONMENTS, environmentsUrls?.cdn?.translations);\n\n    return {\n        apiUrl,\n        analyticsUrl,\n        cdnImagesUrl,\n        cdnTranslationsUrl\n    };\n};\n","import { IAdyenPasskey } from './types';\nimport { getUrlFromMap } from '../../../core/Environment/Environment';\nimport type { CoreConfiguration } from '../../../core/types';\nimport { CDN_ENVIRONMENTS } from '../../../core/Environment/constants';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport Script from '../../../utils/Script';\n\nexport interface IPasskeySdkLoader {\n    load(environment: CoreConfiguration['environment']): Promise<IAdyenPasskey>;\n}\n\nclass PasskeySdkLoader implements IPasskeySdkLoader {\n    private static readonly PASSKEY_SDK_URL = 'js/adyenpasskey/1.1.0/adyen-passkey.js';\n    private AdyenPasskey: IAdyenPasskey;\n\n    private isAvailable(): boolean {\n        return this.AdyenPasskey != null;\n    }\n\n    public async load(environment: string): Promise<IAdyenPasskey> {\n        if (this.isAvailable()) {\n            return this.AdyenPasskey;\n        }\n\n        try {\n            const cdnUrl = getUrlFromMap(environment as CoreConfiguration['environment'], CDN_ENVIRONMENTS);\n            const url = `${cdnUrl}${PasskeySdkLoader.PASSKEY_SDK_URL}`;\n            const scriptElement = new Script(url);\n            await scriptElement.load();\n            this.AdyenPasskey = window.AdyenPasskey?.default;\n            return this.AdyenPasskey;\n        } catch (e: unknown) {\n            throw new AdyenCheckoutError(\n                'SCRIPT_ERROR',\n                `Unable to load script. Message: ${e instanceof Error ? e.message : 'Unknown error loading Passkey sdk'}`\n            );\n        }\n    }\n}\n\nexport { PasskeySdkLoader };\n","interface BrowserRiskSignals {\n    osVersion: string;\n    userTimeZoneOffset: number;\n    language: string;\n    screenDimensions: ScreenDimensions;\n}\n\ninterface ScreenDimensions {\n    width: number;\n    height: number;\n}\n\ntype RiskSignalsError = {\n    type: typeof PasskeyErrorTypes.RISK_SIGNALS_ERROR;\n    message: string;\n};\n\ntype ConfidenceScore = {\n    score: number;\n    errors?: string[];\n};\n\ninterface PublicKeyCredentialCreationOptionsDTO {\n    enrollmentId: string;\n    challenge: string;\n    rp: {\n        name: string;\n        id: string;\n    };\n    user: {\n        id: string;\n        name: string;\n        displayName: string;\n    };\n    pubKeyCredParams: { alg: number; type: string }[];\n    timeout?: number;\n    attestation: string;\n    excludeCredentials: string[];\n    authenticatorSelection?: {\n        authenticatorAttachment: string;\n        residentKey: string;\n        userVerification: string;\n        requireResidentKey: boolean;\n    };\n    extensions?: {\n        credProps?: boolean;\n    };\n}\n\ninterface WebAuthnPublicKeyCreationCredential extends Omit<PublicKeyCredential, 'response'> {\n    id: string;\n    response: AuthenticatorAttestationResponse;\n}\n\ninterface PublicKeyCredentialRequestOptionsDTO {\n    challenge: string;\n    allowCredentials?: { id: string; type: string }[];\n    timeout: number;\n    userVerification: string;\n    rpId: string;\n}\n\ninterface WebAuthnPublicKeyPaymentCredential extends Omit<PublicKeyCredential, 'response'> {\n    response: AuthenticatorAssertionResponse;\n}\n\nexport const PasskeyErrorTypes = {\n    CREDENTIAL_CREATION_ERROR: 'Navigator.credentials creation error',\n    CREDENTIAL_RETRIEVAL_ERROR: 'Navigator.credentials retrieval error',\n    RISK_SIGNALS_ERROR: 'Error capturing Risk Signals'\n};\n\nexport interface RiskSignalsEnrollment extends BrowserRiskSignals {\n    deviceId: string;\n}\n\nexport interface RiskSignalsAuthentication extends BrowserRiskSignals {\n    deviceId: string;\n    confidenceScore: ConfidenceScore;\n}\n\nexport type NavigatorCredentialCreationsError = {\n    type: typeof PasskeyErrorTypes.CREDENTIAL_CREATION_ERROR;\n    message: string;\n};\n\nexport type NavigatorCredentialRetrievalError = {\n    type: typeof PasskeyErrorTypes.CREDENTIAL_RETRIEVAL_ERROR;\n    message: string;\n};\n\nexport interface IAdyenPasskey {\n    captureRiskSignalsEnrollment: (deviceId?: string) => Promise<RiskSignalsEnrollment | RiskSignalsError>;\n    captureRiskSignalsAuthentication: (deviceId: string) => Promise<RiskSignalsAuthentication | RiskSignalsError>;\n    createCredentialForEnrollment: (\n        creationData: PublicKeyCredentialCreationOptionsDTO\n    ) => Promise<WebAuthnPublicKeyCreationCredential | NavigatorCredentialCreationsError>;\n    authenticateWithCredential: (\n        retrievalData: PublicKeyCredentialRequestOptionsDTO\n    ) => Promise<WebAuthnPublicKeyPaymentCredential | NavigatorCredentialRetrievalError>;\n}\n\nexport interface IPasskeyService {\n    captureRiskSignalsEnrollment(): Promise<RiskSignalsEnrollment>;\n    captureRiskSignalsAuthentication(): Promise<RiskSignalsAuthentication>;\n    /**\n     *\n     * @param registrationOptions - registration options object encoded in base64\n     * @returns fido assertion result encoded in base64\n     */\n    createCredentialForEnrollment: (registrationOptions: string) => Promise<string>;\n    /**\n     *\n     * @param authenticationOptions - encoded in base64\n     * @returns result encoded in base64\n     */\n    authenticateWithCredential: (authenticationOptions: string) => Promise<string>;\n}\n\nexport type PasskeyServiceConfig = {\n    deviceId?: string; // Merchant optionally pass\n    environment: string;\n};\n","import { PasskeySdkLoader } from './PasskeySdkLoader';\nimport {\n    PasskeyServiceConfig,\n    IPasskeyService,\n    IAdyenPasskey,\n    PasskeyErrorTypes,\n    RiskSignalsEnrollment,\n    RiskSignalsAuthentication,\n    NavigatorCredentialCreationsError,\n    NavigatorCredentialRetrievalError\n} from './types';\nimport AdyenCheckoutError, { SDK_ERROR } from '../../../core/Errors/AdyenCheckoutError';\nimport { DecodeObject } from '../../../types/global-types';\nimport base64 from '../../../utils/base64';\n\nexport class PasskeyService implements IPasskeyService {\n    private passkeySdk: IAdyenPasskey;\n    private readonly passkeyServiceConfig: PasskeyServiceConfig;\n    private riskSignals: RiskSignalsEnrollment | RiskSignalsAuthentication;\n    private initialized: Promise<void>;\n\n    constructor(configuration: PasskeyServiceConfig) {\n        this.passkeyServiceConfig = configuration;\n    }\n\n    get deviceId() {\n        return this.passkeyServiceConfig.deviceId;\n    }\n\n    public async getWebAuthnUnsupportedReason(): Promise<string> {\n        if (!window.PublicKeyCredential) {\n            return 'Browser does not support webauthn';\n        }\n        try {\n            const platformAuthenticatorAvailable = await window.PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable();\n            if (!platformAuthenticatorAvailable) {\n                return 'Device does not have platform authenticator';\n            }\n        } catch (e) {\n            return 'Unknown error';\n        }\n\n        return '';\n    }\n\n    public initialize() {\n        if (this.initialized == null) {\n            this.initialized = new PasskeySdkLoader().load(this.passkeyServiceConfig.environment).then(passkey => {\n                this.passkeySdk = passkey;\n            });\n        }\n\n        return this.initialized;\n    }\n\n    public async captureRiskSignalsEnrollment(): Promise<RiskSignalsEnrollment> {\n        await this.initialized;\n        if (this.riskSignals) {\n            // Cache it so we don't create unnecessary entries in the localstorage by calling captureRiskSignalsEnrollment\n            return this.riskSignals;\n        }\n\n        const result = await this.passkeySdk.captureRiskSignalsEnrollment(this.deviceId);\n        if (result && 'type' in result && result.type === PasskeyErrorTypes.RISK_SIGNALS_ERROR) {\n            throw new AdyenCheckoutError(SDK_ERROR, result.message);\n        }\n        this.riskSignals = result as RiskSignalsEnrollment;\n        return this.riskSignals;\n    }\n\n    public async canUseStoredCredential(): Promise<boolean> {\n        try {\n            await this.captureRiskSignalsAuthentication();\n            return true;\n        } catch (error) {\n            console.warn(\n                `The device is not eligible for stored credential authentication: ${error instanceof Error ? error?.message : 'unknown error'}`\n            );\n            return false;\n        }\n    }\n\n    public async captureRiskSignalsAuthentication(): Promise<RiskSignalsAuthentication> {\n        await this.initialized;\n        const result = await this.passkeySdk.captureRiskSignalsAuthentication(this.deviceId);\n        if (result && 'type' in result && result.type === PasskeyErrorTypes.RISK_SIGNALS_ERROR) {\n            throw new AdyenCheckoutError(SDK_ERROR, result.message);\n        }\n        return result as RiskSignalsAuthentication;\n    }\n\n    public async createCredentialForEnrollment(registrationOptions: string): Promise<string> {\n        await this.initialized;\n        const options = this.decodeJsonBase64(registrationOptions, 'Failed to decode registrationOptions');\n        const result = await this.passkeySdk.createCredentialForEnrollment(options);\n        if (result && 'type' in result && result.type === PasskeyErrorTypes.CREDENTIAL_CREATION_ERROR) {\n            throw new AdyenCheckoutError(SDK_ERROR, (result as NavigatorCredentialCreationsError).message);\n        }\n        return base64.encode(JSON.stringify(result));\n    }\n\n    public async authenticateWithCredential(authenticationOptions: string): Promise<string> {\n        await this.initialized;\n        const options = this.decodeJsonBase64(authenticationOptions, 'Failed to decode authenticationOptions');\n        const result = await this.passkeySdk.authenticateWithCredential(options);\n        if (result && 'type' in result && result.type === PasskeyErrorTypes.CREDENTIAL_RETRIEVAL_ERROR) {\n            throw new AdyenCheckoutError(SDK_ERROR, (result as NavigatorCredentialRetrievalError).message);\n        }\n        return base64.encode(JSON.stringify(result));\n    }\n\n    private decodeJsonBase64(encoded: string, errorMessage: string) {\n        const decoded: DecodeObject = base64.decode(encoded);\n        if (!decoded.success) {\n            throw new AdyenCheckoutError(SDK_ERROR, errorMessage);\n        }\n        return JSON.parse(decoded.data);\n    }\n}\n","import { h } from 'preact';\nimport './AwaitLogoContainer.scss';\n\ntype Logo = {\n    name: string;\n    src: string;\n    alt: string;\n};\n\nexport interface IAwaitLogoContainer {\n    logos: Logo[];\n}\n\nfunction AwaitLogoContainer({ logos }: Readonly<IAwaitLogoContainer>) {\n    return (\n        <div className={'adyen-checkout-await-logo-container'}>\n            {logos.map(logo => (\n                <img\n                    key={logo.name}\n                    src={logo.src}\n                    alt={logo.alt}\n                    className={`adyen-checkout__await__brand-logo adyen-checkout-await-logo-${logo.name}`}\n                />\n            ))}\n        </div>\n    );\n}\n\nexport default AwaitLogoContainer;\n","import { httpPost } from './http';\n\n/**\n * Calls the payment status endpoint\n * @param paymentData -\n * @param clientKey -\n * @param loadingContext -\n * @param timeout - in milliseconds\n * @returns a promise containing the response of the call\n */\nexport default function checkPaymentStatus(paymentData, clientKey, loadingContext, timeout) {\n    if (!paymentData || !clientKey) {\n        throw new Error('Could not check the payment status');\n    }\n\n    const options = {\n        loadingContext,\n        path: `services/PaymentInitiation/v1/status?clientKey=${clientKey}`,\n        timeout\n    };\n\n    return httpPost(options, { paymentData });\n}\n","import { PaymentResponseData, ProcessedResponse } from '../../types/global-types';\n\n/**\n * Processes a complete response from Adyen by resultCode\n * @param response - to be processed\n * @returns a new object describing the response result (ready for onStatusChange)\n */\nconst processCompleteResponse = (response: PaymentResponseData): ProcessedResponse => {\n    switch (response.resultCode.toLowerCase()) {\n        case 'refused':\n        case 'error':\n        case 'cancelled':\n            return { type: 'error', props: { ...response, message: 'error.subtitle.refused' } };\n        case 'unknown':\n            return { type: 'error', props: { ...response, message: 'error.message.unknown' } };\n        case 'pending':\n        case 'received':\n            return { type: response.resultCode.toLowerCase(), props: response };\n        case 'authorised':\n            return { type: 'success', props: response };\n        default:\n            return { type: 'success', props: response };\n    }\n};\n\n/**\n * Processes a response from Adyen by type\n * @param response - to be processed\n * @returns a new object describing the response result (ready for onStatusChange)\n */\nexport const processResponse = (response: PaymentResponseData): ProcessedResponse => {\n    if (!response.type && response.resultCode) {\n        return processCompleteResponse(response);\n    }\n\n    if (!response.type) {\n        return { type: 'error', props: response };\n    }\n\n    switch (response.type.toLowerCase()) {\n        case 'pending':\n            return { type: 'pending', props: response };\n        case 'complete':\n            return processCompleteResponse(response);\n        case 'validation':\n            return { type: 'error', props: response };\n        default:\n            return { type: 'error', props: response };\n    }\n};\n\nexport default processResponse;\n","/**\n * Pads a given string or number with zeros.\n *\n * @param value - Value to zero-pad.\n * @param length - Amount of characters to pad.\n * @returns Left-padded number/string.\n */\nexport const zeroPad = (value, length = 2) => {\n    if (length === 0) return value;\n    const strValue = String(value);\n    return strValue.length >= length ? strValue : ('0'.repeat(length) + strValue).slice(length * -1);\n};\n\n/**\n * Calculates the remaining time as a percentage\n *\n * @param start - Start date\n * @param now - Current date\n * @param end - End date\n * @returns Percentage of the remaining time\n */\nexport const getProgressPercentage = (start, now, end) => {\n    const difference = end.getTime() - start.getTime();\n    return 100 - Math.round(((now.getTime() - start.getTime()) * 100) / difference);\n};\n\n/**\n * Calculates the difference in minutes and seconds from now to endDate\n *\n * @param startTime -\n * @param endTime -\n * @returns  Time difference\n */\nexport const getTimeDifference = (startTime, endTime) => {\n    const now = new Date();\n    const diff = endTime.getTime() - now.getTime();\n    const seconds = diff / 1000;\n    const percentage = getProgressPercentage(startTime, now, endTime);\n\n    return {\n        total: diff,\n        minutes: zeroPad(Math.floor((seconds / 60) % 60)),\n        seconds: zeroPad(Math.floor(seconds % 60)),\n        completed: diff <= 0,\n        percentage\n    };\n};\n","import { interpolateElement } from '../../../language/utils';\nimport { SRPanel } from '../../../core/Errors/SRPanel';\nimport Language from '../../../language';\nimport { CountdownTime } from './types';\n\ninterface ICountdownA11yService {\n    srPanel: SRPanel;\n    i18n: Language;\n}\n\nexport class CountdownA11yReporter {\n    protected TRANSLATION_KEY = 'sr.wechatpay.timetopay';\n    protected LONG_TIMEOUT = 180000;\n    protected MID_TIMEOUT = 60000;\n    protected SHORT_TIMEOUT = 30000;\n\n    private readonly srPanel: SRPanel;\n    private readonly i18n: Language;\n    private srInterval: ReturnType<typeof setInterval>;\n    private timeout: number;\n    private timeLeft: CountdownTime;\n\n    constructor(props: ICountdownA11yService) {\n        const { srPanel, i18n } = props;\n\n        this.srPanel = srPanel;\n        this.i18n = i18n;\n        // Force the srPanel to update ariaRelevant\n        this.srPanel.setAriaProps({ 'aria-relevant': 'additions text' });\n    }\n\n    public update(time: CountdownTime): void {\n        const { minutes, seconds } = time;\n        if (minutes === '-' || seconds === '-') return;\n\n        const minutesLeft = typeof minutes === 'string' ? parseInt(minutes, 10) : minutes;\n        const secondsLeft = typeof seconds === 'string' ? parseInt(seconds, 10) : seconds;\n        this.timeLeft = { minutes: minutesLeft, seconds: secondsLeft };\n\n        if (minutesLeft > 5 && this.timeout !== this.LONG_TIMEOUT) {\n            this.timeout = this.LONG_TIMEOUT;\n            this.setInterval(this.timeout);\n        }\n        if (minutesLeft >= 1 && minutesLeft <= 5 && this.timeout !== this.MID_TIMEOUT) {\n            this.timeout = this.MID_TIMEOUT;\n            this.setInterval(this.timeout);\n        }\n        if (minutesLeft < 1 && secondsLeft > 0 && this.timeout !== this.SHORT_TIMEOUT) {\n            this.timeout = this.SHORT_TIMEOUT;\n            this.setInterval(this.timeout);\n        }\n    }\n\n    public tearDown(): void {\n        this.clearInterval();\n        // Reset the srPanel ariaRelevant\n        this.srPanel.setAriaProps({ 'aria-relevant': this.srPanel.constructor['defaultProps'].ariaAttributes['aria-relevant'] });\n        this.srPanel.setMessages(null);\n    }\n\n    private setInterval(timeout): void {\n        this.clearInterval();\n        const setSrMessages = () => {\n            this.srPanel.setMessages(null);\n            this.srPanel.setMessages(this.getSrMessages(this.timeLeft));\n        };\n        // To execute immediately\n        setSrMessages();\n        this.srInterval = setInterval(setSrMessages, timeout);\n    }\n\n    private getSrMessages({ minutes, seconds }): Array<string> {\n        const translation = this.i18n.get(this.TRANSLATION_KEY);\n        const getTimeTranslation = time => (time !== 0 ? translation => `${time} ${translation}` : () => '');\n        const fns = [minutes, seconds].map(getTimeTranslation);\n        return [interpolateElement(translation, fns).join('')];\n    }\n\n    private clearInterval(): void {\n        if (this.srInterval) clearInterval(this.srInterval);\n    }\n}\n","import { useEffect, useRef } from 'preact/hooks';\nimport { CountdownA11yReporter } from './CountdownA11yReporter';\nimport useSRPanelContext from '../../../core/Errors/useSRPanelContext';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { CountdownTime } from './types';\n\nexport const useCountdownA11yReporter = (time: CountdownTime): void => {\n    const { i18n } = useCoreContext();\n    const { srPanel } = useSRPanelContext();\n    const reporter = useRef<CountdownA11yReporter>(null);\n\n    useEffect(() => {\n        reporter.current = new CountdownA11yReporter({ i18n, srPanel });\n        return () => {\n            reporter.current.tearDown();\n        };\n    }, []);\n\n    useEffect(() => {\n        try {\n            if (!reporter.current) return;\n            reporter.current.update(time);\n        } catch (e) {\n            reporter.current.tearDown();\n            reporter.current = null;\n            throw e;\n        }\n    }, [time]);\n};\n","import { h } from 'preact';\nimport { getTimeDifference } from './utils';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { CountdownProps, CountdownTime } from './types';\nimport { useCountdownA11yReporter } from './useCountdownA11yReporter';\n\nconst calculateStartAndEndTime = (minutesFromNow: number) => {\n    const secondsFromNow = minutesFromNow * 60000;\n    const nowTime = new Date().getTime();\n    return { startTime: new Date(nowTime), endTime: new Date(nowTime + secondsFromNow) };\n};\n\nfunction Countdown({ minutesFromNow, onTick = () => {}, onCompleted = () => {} }: CountdownProps) {\n    const startAndEndTime = useRef(calculateStartAndEndTime(minutesFromNow));\n    const { startTime, endTime } = startAndEndTime.current;\n    const [time, setTime] = useState<CountdownTime>({\n        minutes: '-',\n        seconds: '-'\n    });\n    useCountdownA11yReporter(time);\n\n    useEffect(() => {\n        const tick = () => {\n            const { minutes, seconds, percentage, completed } = getTimeDifference(startTime, endTime);\n            if (completed) {\n                onCompleted();\n            } else {\n                const timeLeft = { minutes, seconds, percentage };\n                setTime(timeLeft);\n                onTick(timeLeft);\n            }\n        };\n        const interval = setInterval(tick, 1000);\n\n        return () => {\n            clearInterval(interval);\n        };\n    }, []);\n\n    return (\n        <span className=\"adyen-checkout__countdown\" role=\"timer\">\n            <span className=\"countdown__minutes\">{time.minutes}</span>\n            <span className=\"countdown__separator\">:</span>\n            <span className=\"countdown__seconds\">{time.seconds}</span>\n        </span>\n    );\n}\n\nexport default Countdown;\n","import { h } from 'preact';\nimport { useState, useEffect } from 'preact/hooks';\nimport classnames from 'classnames';\nimport checkPaymentStatus from '../../../core/Services/payment-status';\nimport processResponse from '../../../core/ProcessResponse';\n\nimport Spinner from '../../internal/Spinner';\nimport Countdown from '../Countdown';\nimport Button from '../Button';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { AwaitComponentProps, StatusObject } from './types';\nimport './Await.scss';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport ContentSeparator from '../ContentSeparator';\nimport useImage from '../../../core/Context/useImage';\n\nfunction Await(props: AwaitComponentProps) {\n    const { i18n, loadingContext } = useCoreContext();\n    const getImage = useImage();\n    const [completed, setCompleted] = useState(false);\n    const [expired, setExpired] = useState(false);\n    const [loading, setLoading] = useState(true);\n    const [hasCalledActionHandled, setHasCalledActionHandled] = useState(false);\n    const [delay, setDelay] = useState(props.delay);\n    const [percentage, setPercentage] = useState(100);\n    const [timePassed, setTimePassed] = useState(0);\n    const [hasAdjustedTime, setHasAdjustedTime] = useState(false);\n    const [storedTimeout, setStoredTimeout] = useState(null);\n    const { amount } = props;\n\n    const onTimeUp = (): void => {\n        setExpired(true);\n        clearTimeout(storedTimeout);\n        props.onError(new AdyenCheckoutError('ERROR', 'Payment Expired'));\n    };\n\n    const onTick = (time): void => {\n        setPercentage(time.percentage);\n    };\n\n    const onComplete = (status: StatusObject): void => {\n        // Only make details call if we have a payload\n        if (status.props.payload) {\n            setCompleted(true);\n            const state = {\n                data: {\n                    details: { payload: status.props.payload },\n                    paymentData: props.paymentData\n                }\n            };\n            // Send success response to onAdditionalDetails\n            return props.onComplete(state, this);\n        }\n\n        // Show error state & call merchant defined error callback if we do not have a payload\n        setExpired(true);\n        props.onError(new AdyenCheckoutError('ERROR', 'successful result, but no payload in response'));\n    };\n\n    const onError = (status: StatusObject): void => {\n        setExpired(true);\n\n        // Only make details call if we have a payload\n        if (status.props.payload) {\n            const state = {\n                data: {\n                    details: { payload: status.props.payload },\n                    paymentData: props.paymentData\n                }\n            };\n            // Send error response to onAdditionalDetails\n            return props.onComplete(state, this);\n        }\n\n        // Call merchant defined error callback if we do not have a payload\n        props.onError(new AdyenCheckoutError('ERROR', 'error result with no payload in response'));\n    };\n\n    const checkStatus = async (): Promise<void> => {\n        const { paymentData, clientKey, throttleInterval, pollStatus } = props;\n\n        // If there's a custom pollStatus function, call it.\n        // Otherwise, call the default one.\n        const pollStatusFunction = pollStatus ?? (() => checkPaymentStatus(paymentData, clientKey, loadingContext, throttleInterval));\n\n        if (!hasCalledActionHandled) {\n            props.onActionHandled?.({ componentType: props.type, actionDescription: 'polling-started' });\n            setHasCalledActionHandled(true);\n        }\n\n        return pollStatusFunction()\n            .then(processResponse)\n            .catch(({ message, ...response }) => ({\n                type: 'network-error',\n                props: {\n                    ...(message && { message: i18n.get(message) }),\n                    ...response\n                }\n            }))\n            .then((status: StatusObject) => {\n                switch (status.type) {\n                    case 'success':\n                        onComplete(status);\n                        break;\n\n                    case 'error':\n                        onError(status);\n                        break;\n\n                    default:\n                        setLoading(false);\n                }\n            });\n    };\n\n    const redirectToApp = (url): void => {\n        window.location.assign(url);\n    };\n\n    useEffect(() => {\n        if (props.shouldRedirectAutomatically && props.url) {\n            redirectToApp(props.url);\n        }\n    }, [props.shouldRedirectAutomatically, props.url]);\n\n    useEffect(() => {\n        void checkStatus();\n        return (): void => {\n            clearTimeout(storedTimeout);\n        };\n    }, []);\n\n    useEffect(() => {\n        if (expired) return clearTimeout(storedTimeout);\n\n        if (completed) return clearTimeout(storedTimeout);\n\n        if (!loading) {\n            // Retry until getting a complete response from the server OR it times out\n            // Changes setTimeout time to new value (throttleInterval) after a certain amount of time (throttleTime) has passed\n            const statusInterval = async (): Promise<void> => {\n                await checkStatus();\n\n                const actualTimePassed = timePassed + delay;\n                // timePassed is the value that is the main \"engine\" that drives this useEffect/polling\n                setTimePassed(actualTimePassed);\n\n                if (actualTimePassed >= props.throttleTime && !hasAdjustedTime) {\n                    setDelay(props.throttleInterval);\n                    setHasAdjustedTime(true);\n                }\n            };\n\n            // Create (another) interval to poll for a result\n            setStoredTimeout(setTimeout(() => void statusInterval(), delay));\n        }\n    }, [loading, expired, completed, timePassed]);\n\n    const finalState = (image, message) => (\n        <div className=\"adyen-checkout__await adyen-checkout__await--result\">\n            <img\n                className=\"adyen-checkout__await__icon adyen-checkout__await__icon--result\"\n                src={getImage({ imageFolder: 'components/' })(image)}\n                alt={i18n.get(message)}\n            />\n            <div className=\"adyen-checkout__await__subtitle adyen-checkout__await__subtitle--result\">{i18n.get(message)}</div>\n        </div>\n    );\n\n    if (expired) {\n        return finalState('error', 'error.subtitle.payment');\n    }\n\n    if (completed) {\n        return finalState('success', 'creditCard.success');\n    }\n\n    if (loading) {\n        return (\n            <div className=\"adyen-checkout__await\">\n                {props.brandLogo && <img src={props.brandLogo} alt={props.type} className=\"adyen-checkout__await__brand-logo\" />}\n                <Spinner inline={false} size=\"large\" />\n            </div>\n        );\n    }\n\n    const timeToPayString = i18n.get('wechatpay.timetopay').split('%@');\n\n    return (\n        <div\n            className={classnames(\n                'adyen-checkout__await',\n                `adyen-checkout__await--${props.type}`,\n                props.classNameModifiers.map(m => `adyen-checkout__await--${m}`)\n            )}\n        >\n            {props.brandLogo && <img src={props.brandLogo} alt={props.type} className=\"adyen-checkout__await__brand-logo\" />}\n\n            {/* Everything is wrapped in !! so we evaluate the result as boolean,\n             otherwise we might just print the value or object as mistake */}\n            {!!(props.showAmount && amount?.value && amount?.currency) && (\n                <div className=\"adyen-checkout__await__amount\">{i18n.amount(amount.value, amount.currency)}</div>\n            )}\n\n            {props.messageText != null && <div className=\"adyen-checkout__await__subtitle\">{props.messageText}</div>}\n\n            <div className=\"adyen-checkout__await__indicator-holder\">\n                <div className=\"adyen-checkout__await__indicator-spinner\">\n                    <Spinner inline={false} size=\"medium\" />\n                </div>\n                <div className=\"adyen-checkout__await__indicator-text\">{props.awaitText}</div>\n            </div>\n\n            {props.showCountdownTimer && (\n                <div className=\"adyen-checkout__await__countdown-holder\">\n                    <div className=\"adyen-checkout__await__progress\">\n                        <span className=\"adyen-checkout__await__percentage\" style={{ width: `${percentage}%` }} />\n                    </div>\n\n                    <div className=\"adyen-checkout__await__countdown\">\n                        {timeToPayString[0]}&nbsp;\n                        <Countdown minutesFromNow={props.countdownTime} onTick={onTick} onCompleted={onTimeUp} />\n                        &nbsp;{timeToPayString[1]}\n                    </div>\n                </div>\n            )}\n\n            {props.url && !props.shouldRedirectAutomatically && (\n                <div className=\"adyen-checkout__await__app-link\">\n                    <ContentSeparator />\n                    <Button classNameModifiers={['await']} onClick={() => redirectToApp(props.url)} label={i18n.get('openApp')} />\n                </div>\n            )}\n\n            {props.instructions && (\n                <div className=\"adyen-checkout__await__instructions\">\n                    {typeof props.instructions === 'string' ? i18n.get(props.instructions) : props.instructions?.()}\n                </div>\n            )}\n\n            {props.endSlot && <div className=\"adyen-checkout__await__end-slot\">{props.endSlot()}</div>}\n        </div>\n    );\n}\n\nAwait.defaultProps = {\n    countdownTime: 15,\n    onError: () => {},\n    onComplete: () => {},\n    delay: 2000,\n    throttleTime: 60000,\n    throttleInterval: 10000,\n    showCountdownTimer: true,\n    classNameModifiers: [],\n    url: null\n};\n\nexport default Await;\n","import { h } from 'preact';\nimport AwaitLogoContainer, { IAwaitLogoContainer } from './AwaitLogoContainer';\nimport Await from '../../../../internal/Await';\nimport './PayBankBankPixAwait.scss';\nimport { AwaitComponentProps } from '../../../../internal/Await/types';\n\nexport interface IPayByBankPixAwait extends Partial<AwaitComponentProps>, Partial<IAwaitLogoContainer> {}\n\nfunction PayByBankPixAwait(props: IPayByBankPixAwait) {\n    return (\n        <div className={'adyen-checkout-pay-by-bank-pix-await'}>\n            {props.logos?.length > 0 && <AwaitLogoContainer logos={props.logos}></AwaitLogoContainer>}\n            <Await\n                // We want the countdown capability but the adyen-checkout__await__countdown-holder is visually hidden.\n                showCountdownTimer={true}\n                type={props.type}\n                countdownTime={props.countdownTime}\n                clientKey={props.clientKey}\n                onError={props.onError}\n                awaitText={props.awaitText}\n                instructions={props.instructions}\n                pollStatus={props.pollStatus}\n                endSlot={props.endSlot}\n            ></Await>\n        </div>\n    );\n}\n\nexport default PayByBankPixAwait;\n","import { h, Fragment } from 'preact';\nimport { useState, useEffect, useRef, useCallback } from 'preact/hooks';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { PaymentProps } from './types';\nimport PaymentDetails from '../../../internal/Voucher';\nimport useImage from '../../../../core/Context/useImage';\nimport PayButton from '../../../internal/PayButton';\nimport './StoredPayment.scss';\nimport getAuthorizationStatus from './getAuthorizationStatus';\nimport PayByBankPixAwait from '../Enrollment/components/PayByBankPixAwait';\n\nfunction StoredPayment({\n    onPay,\n    type,\n    countdownTime,\n    receiver,\n    amount,\n    txVariant,\n    issuer,\n    setComponentRef,\n    enrollmentId,\n    initiationId,\n    clientKey,\n    onAuthorize,\n    onError\n}: PaymentProps) {\n    const { i18n, loadingContext } = useCoreContext();\n    const getImage = useImage();\n    const [status, setStatus] = useState('ready');\n    const [authorizationOptions, setAuthorizationOptions] = useState<string>(null);\n    const buttonModifiers = ['standalone'];\n    const logos = [\n        {\n            name: 'open-finance',\n            alt: i18n.get('paybybankpix.await.logoAlt.openFinance'),\n            src: `${getImage({ parentFolder: `${txVariant}/` })('open-finance')}`\n        }\n    ];\n    const details = [\n        { label: i18n.get('paybybankpix.payment.receiver.label'), value: receiver },\n        { label: i18n.get('paybybankpix.payment.paymentDate.label'), value: i18n.date(new Date().toString()) },\n        { label: i18n.get('paybybankpix.payment.paymentMethod.label'), value: 'Pix Open Finance' }\n    ];\n    const self = useRef({\n        setStatus\n    });\n\n    const pollStatus = useCallback(async () => {\n        if (authorizationOptions) return;\n\n        const response = await getAuthorizationStatus({ enrollmentId, initiationId, clientKey, loadingContext });\n        if (response.authorizationOptions) {\n            setAuthorizationOptions(response.authorizationOptions);\n        }\n\n        return response;\n    }, [authorizationOptions, enrollmentId, initiationId, clientKey, loadingContext]);\n\n    useEffect(() => {\n        setComponentRef(self.current);\n    }, [setComponentRef]);\n\n    useEffect(() => {\n        if (authorizationOptions) {\n            onAuthorize(authorizationOptions);\n        }\n    }, [authorizationOptions]);\n\n    return type === 'await' ? (\n        <PayByBankPixAwait\n            logos={logos}\n            type={txVariant}\n            countdownTime={countdownTime}\n            clientKey={clientKey}\n            onError={onError}\n            awaitText={i18n.get('paybybankpix.await.fetchDetails')}\n            pollStatus={pollStatus}\n        ></PayByBankPixAwait>\n    ) : (\n        <Fragment>\n            <PaymentDetails\n                issuerImageUrl={getImage({ imageFolder: `${txVariant}/` })(issuer)}\n                paymentMethodType={txVariant}\n                amount={i18n.amount(amount.value, amount.currency)}\n                voucherDetails={details}\n            ></PaymentDetails>\n            <PayButton\n                classNameModifiers={buttonModifiers}\n                label={i18n.get('paybybankpix.storedPayment.payButton.label')}\n                status={status}\n                amount={amount}\n                onClick={onPay}\n            />\n        </Fragment>\n    );\n}\n\nexport default StoredPayment;\n","import { httpGet } from '../../../../core/Services/http';\nimport { RawPaymentResponse } from '../../../../types/global-types';\n\ninterface IGetAuthorizationStatus {\n    enrollmentId: string;\n    initiationId: string;\n    clientKey: string;\n    loadingContext: string;\n    timeout?: number; // in milliseconds\n}\n\nexport default async function getAuthorizationStatus({\n    enrollmentId,\n    initiationId,\n    clientKey,\n    loadingContext,\n    timeout = 10000\n}: IGetAuthorizationStatus): Promise<RawPaymentResponse> {\n    if (!enrollmentId || !initiationId || !clientKey) {\n        throw new Error('Could not get auth options');\n    }\n\n    const options = {\n        loadingContext,\n        path: `utility/v1/pixpaybybank/authorization-options?initiationId=${initiationId}&enrollmentId=${enrollmentId}&clientKey=${clientKey}`,\n        timeout\n    };\n\n    return httpGet(options);\n}\n","import { useEffect, useState } from 'preact/hooks';\nimport { IssuerItem } from '../../../internal/IssuerList/types';\nimport getIssuerImageUrl from '../../../../utils/get-issuer-image';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport useImage from '../../../../core/Context/useImage';\n\ninterface UseIssuerWithLogoProps {\n    txVariant: string;\n    issuers: IssuerItem[];\n}\nexport const useIssuerWithLogo = ({ issuers, txVariant }: UseIssuerWithLogoProps): IssuerItem[] => {\n    const { loadingContext } = useCoreContext();\n    const getImage = useImage();\n    const [issuersWithLogo, setIssuersWithLogo] = useState<IssuerItem[]>(issuers);\n\n    useEffect(() => {\n        if (issuers?.length > 0) {\n            const getIssuerIcon = getIssuerImageUrl({ loadingContext }, txVariant, getImage);\n            setIssuersWithLogo(\n                issuers.map(item => ({\n                    ...item,\n                    icon: getIssuerIcon(item.id)\n                }))\n            );\n        }\n    }, [issuers, txVariant]);\n\n    return issuersWithLogo;\n};\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport './IssuerListIntroduction.scss';\nimport useImage from '../../../../../core/Context/useImage';\n\nconst LOGO = {\n    name: 'open-finance',\n    altI18nKey: 'paybybankpix.await.logoAlt.openFinance'\n};\n\nfunction IssuerListIntroduction({ txVariant }) {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    return (\n        <div className={'adyen-checkout-issuer-list-introduction'}>\n            <div className=\"adyen-checkout-issuer-list-introduction-logo-container\">\n                <img\n                    src={getImage({ parentFolder: `${txVariant}/` })(LOGO.name)}\n                    alt={i18n.get(LOGO.altI18nKey)}\n                    className=\"adyen-checkout-issuer-list-introduction-logo-container__logo\"\n                />\n                <p className=\"adyen-checkout-issuer-list-introduction-logo-container__title\">\n                    {i18n.get('paybybankpix.issuerList.introduction.logo.content')}\n                </p>\n            </div>\n            <div className=\"adyen-checkout-issuer-list-introduction-text-container\">\n                <p className=\"adyen-checkout-issuer-list-introduction-text-container__title\">\n                    {i18n.get('paybybankpix.issuerList.introduction.title')}\n                </p>\n                <p className=\"adyen-checkout-issuer-list-introduction-text-container__content\">\n                    {i18n.get('paybybankpix.issuerList.introduction.content1')}\n                </p>\n                <p className=\"adyen-checkout-issuer-list-introduction-text-container__content\">\n                    {i18n.get('paybybankpix.issuerList.introduction.content2')}\n                </p>\n            </div>\n        </div>\n    );\n}\n\nexport default IssuerListIntroduction;\n","import { h } from 'preact';\nimport { useRef, useState, useEffect } from 'preact/hooks';\nimport { AwaitProps, EnrollmentProps } from './types';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport IssuerList from '../../../internal/IssuerList';\nimport { useIssuerWithLogo } from './useIssuerWithLogo';\nimport getEnrollmentStatus from './getEnrollmentStatus';\nimport IssuerListIntroduction from './components/IssuerListIntroduction';\nimport PayByBankPixAwait from './components/PayByBankPixAwait';\nimport useImage from '../../../../core/Context/useImage';\nimport './Enrollment.scss';\nimport { LabelOnlyDisclaimerMessage } from '../../../internal/DisclaimerMessage/DisclaimerMessage';\nimport { ComponentMethodsRef, UIElementStatus } from '../../../internal/UIElement/types';\n\n//todo: add\nconst TERMS_CONDITIONS_URL = '';\n\nfunction Enrollment(props: EnrollmentProps) {\n    const { i18n, loadingContext } = useCoreContext();\n    const getImage = useImage();\n    const issuerListRef = useRef<ComponentMethodsRef>(null);\n    const [registrationOptions, setRegistrationOptions] = useState<string>(null);\n    const logos = [\n        {\n            name: 'open-finance',\n            alt: i18n.get('paybybankpix.await.logoAlt.openFinance'),\n            src: `${getImage({ parentFolder: `${props.txVariant}/` })('open-finance')}`\n        },\n        {\n            name: 'arrow-down',\n            alt: i18n.get('paybybankpix.await.logoAlt.arrowDown'),\n            src: `${getImage({ imageFolder: 'components/' })('arrow_down')}`\n        },\n        { name: 'bank', alt: i18n.get('paybybankpix.await.logoAlt.bank'), src: `${getImage({ imageFolder: 'components/' })('bank')}` }\n    ];\n    const self = useRef({\n        showValidation: () => {\n            issuerListRef?.current?.showValidation();\n        },\n        setStatus: (newStatus: UIElementStatus) => {\n            issuerListRef?.current?.setStatus(newStatus);\n        }\n    });\n\n    const pollStatus = async () => {\n        if (registrationOptions) return;\n\n        const { enrollmentId, clientKey } = props as AwaitProps;\n        const response = await getEnrollmentStatus({ enrollmentId, clientKey, loadingContext });\n        if (response.registrationOptions) {\n            setRegistrationOptions(response.registrationOptions);\n        }\n        return response;\n    };\n    //  Assist typescript to narrow down the type.\n    const isAwait = (props: EnrollmentProps): props is AwaitProps => props.type === 'await';\n    const awaitEndSlot = () => <span>{i18n.get('paybybankpix.await.withOpenFinance')}</span>;\n\n    useEffect(() => {\n        props.setComponentRef(self.current);\n    }, [props.setComponentRef]);\n\n    useEffect(() => {\n        if (registrationOptions) {\n            props.onEnroll(registrationOptions);\n        }\n    }, [registrationOptions]);\n\n    return (\n        <div className={'adyen-checkout-pix-enrollment'}>\n            {isAwait(props) ? (\n                <PayByBankPixAwait\n                    logos={logos}\n                    type={props.txVariant}\n                    countdownTime={props.countdownTime}\n                    clientKey={props.clientKey}\n                    onError={props.onError}\n                    awaitText={i18n.get('paybybankpix.await.waitForConfirmation')}\n                    instructions={i18n.get('paybybankpix.await.timeToPay', {\n                        values: { numberOfMin: props.countdownTime }\n                    })}\n                    pollStatus={pollStatus}\n                    endSlot={awaitEndSlot}\n                ></PayByBankPixAwait>\n            ) : (\n                <div className=\"adyen-checkout-pix-enrollment-issuer-list\">\n                    <IssuerListIntroduction txVariant={props.txVariant} />\n                    <IssuerList\n                        items={useIssuerWithLogo({ issuers: props.issuers, txVariant: props.txVariant })}\n                        onSubmitAnalytics={props.onSubmitAnalytics}\n                        onChange={props.onChange}\n                        payButton={props.payButton}\n                        showPayButton={true}\n                        ref={issuerListRef}\n                    ></IssuerList>\n                    <span className=\"adyen-checkout-disclaimer__label\">\n                        <LabelOnlyDisclaimerMessage message={i18n.get('paybybankpix.issuerList.disclaimer')} urls={[TERMS_CONDITIONS_URL]} />\n                    </span>\n                </div>\n            )}\n        </div>\n    );\n}\n\nexport default Enrollment;\n","import { httpGet } from '../../../../core/Services/http';\nimport { RawPaymentResponse } from '../../../../types/global-types';\n\ninterface IGetEnrollmentStatus {\n    enrollmentId: string;\n    clientKey: string;\n    loadingContext: string;\n    timeout?: number; // in milliseconds\n}\n\nexport default async function getEnrollmentStatus({\n    enrollmentId,\n    clientKey,\n    loadingContext,\n    timeout = 10000\n}: IGetEnrollmentStatus): Promise<RawPaymentResponse> {\n    if (!enrollmentId || !clientKey) {\n        throw new Error('Could not check the enrollment status');\n    }\n    const options = {\n        loadingContext,\n        path: `utility/v1/pixpaybybank/registration-options/${enrollmentId}?clientKey=${clientKey}`,\n        timeout\n    };\n\n    return httpGet(options);\n}\n","import { h } from 'preact';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { PayByBankPixData, PayByBankPixConfiguration } from './types';\nimport { TxVariants } from '../tx-variants';\nimport UIElement from '../internal/UIElement';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\nimport RedirectButton from '../internal/RedirectButton';\nimport AdyenCheckoutError, { ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { PasskeyService } from './services/PasskeyService';\nimport { authorizeEnrollment } from './services/authorizeEnrollment';\nimport { authorizePayment } from './services/authorizePayment';\nimport StoredPayment from './components/StoredPayment';\nimport Enrollment from './components/Enrollment';\nimport { PaymentAction } from '../../types/global-types';\nimport type { ICore } from '../../core/types';\n\nconst isAdyenHosted = () => {\n    try {\n        const currentUrl = new URL(window.location.href);\n        return currentUrl.hostname.endsWith('.adyen.com');\n    } catch (e) {\n        // SSR, or it fails to parse the full url\n        return false;\n    }\n};\nclass PayByBankPixElement extends UIElement<PayByBankPixConfiguration> {\n    public static readonly type = TxVariants.paybybank_pix;\n    private static readonly TIMEOUT_MINUTES = 1;\n    private readonly passkeyService: PasskeyService;\n\n    public static readonly defaultProps: PayByBankPixConfiguration = {\n        showPayButton: true,\n        _isAdyenHosted: isAdyenHosted(),\n        countdownTime: PayByBankPixElement.TIMEOUT_MINUTES\n    };\n\n    constructor(checkout: ICore, props?: PayByBankPixConfiguration) {\n        super(checkout, props);\n        const deviceId = this.props.storedPaymentMethodId ? this.props?.payByBankPixDetails?.deviceId : this.props.deviceId;\n        this.passkeyService = new PasskeyService({ environment: this.props.environment, deviceId });\n        if (this.props._isAdyenHosted) {\n            void this.passkeyService.initialize();\n        }\n    }\n\n    get isValid(): boolean {\n        // Always true for non-hosted page or stored payment\n        if (!this.props._isAdyenHosted || this.props.storedPaymentMethodId) {\n            return true;\n        }\n        return !!this.state?.isValid;\n    }\n\n    /**\n     * Display in the drop-in\n     */\n    get additionalInfo() {\n        return this.props.storedPaymentMethodId\n            ? this.props.i18n.get('paybybankpix.storedPayment.additionalLabel', { values: { receiver: this.props?.payByBankPixDetails?.receiver } })\n            : '';\n    }\n\n    /**\n     * Display in the drop-in\n     */\n    public override get icon() {\n        return this.props.storedPaymentMethodId\n            ? this.resources.getImage({ parentFolder: `${PayByBankPixElement.type}/` })(this.props?.payByBankPixDetails?.ispb)\n            : super.icon;\n    }\n\n    /**\n     * Method used to let the merchant know if the shopper's device supports WebAuthn APIs: https://featuredetect.passkeys.dev/\n     */\n    public override async isAvailable(): Promise<void> {\n        const unsupportedReason = await this.passkeyService.getWebAuthnUnsupportedReason();\n        if (unsupportedReason) {\n            return Promise.reject(new AdyenCheckoutError(ERROR, unsupportedReason));\n        }\n        if (!this.props._isAdyenHosted) {\n            return Promise.resolve();\n        }\n\n        // Load passkey sdk on the hosted page\n        try {\n            await this.passkeyService.initialize();\n\n            if (this.props.storedPaymentMethodId) {\n                // If the provided deviceId from the server does not match the localstorage deviceId, do not render the stored payment component.\n                const shouldShowStoredPaymentMethod = await this.passkeyService.canUseStoredCredential();\n                return shouldShowStoredPaymentMethod\n                    ? Promise.resolve()\n                    : Promise.reject(new AdyenCheckoutError('ERROR', 'The stored payment method is not available on this device'));\n            }\n\n            return Promise.resolve();\n        } catch (error) {\n            return Promise.reject(error instanceof Error ? error?.message : 'Unknown error');\n        }\n    }\n\n    /**\n     * Make sure the await action UIElement is available before mounting\n     */\n    public override handleAction(action: PaymentAction, props: {} = {}): UIElement | null {\n        const paymentAction = this.core.createFromAction(action, {\n            ...this.elementRef.props,\n            ...props,\n            onAdditionalDetails: this.handleAdditionalDetails\n        });\n        if (paymentAction) {\n            this.unmount();\n            void paymentAction.isAvailable().then(() => {\n                paymentAction.mount(this._node);\n            });\n            return paymentAction;\n        }\n\n        return null;\n    }\n\n    formatData(): PayByBankPixData {\n        if (!this.props._isAdyenHosted) {\n            return {\n                paymentMethod: { type: TxVariants.paybybank_pix }\n            };\n        }\n\n        const isEnrollment = this.props.storedPaymentMethodId == null;\n        return {\n            paymentMethod: { type: TxVariants.paybybank_pix, ...this.state.data },\n            // Always store the payment method for the enrollment flow.\n            ...(isEnrollment ? { storePaymentMethod: true } : {})\n        };\n    }\n\n    /**\n     * There are 3 endpoints (stages) we need to call for the enrollment flow.\n     * The first one is the regular payments call on issuer selection - we indicate to store the payment token for the selected issuer.\n     * The second one is to poll the enrollment eligibility - we poll the server to get the enrollment challenge in the `getEnrollmentStatus` function.\n     * The third one is in the `authorizeEnrollment` function - we create passkeys and authorize the enrollment with shopper's passkey.\n     */\n    private readonly onIssuerSelected = async payload => {\n        try {\n            const { data = {} } = payload;\n            if (!data.issuer) {\n                return;\n            }\n\n            const { deviceId, ...riskSignals } = await this.passkeyService.captureRiskSignalsEnrollment();\n            this.setState({ ...payload, data: { ...data, riskSignals, deviceId } });\n        } catch (error) {\n            const errorMsg = error instanceof Error ? error.message : 'Unknown error in the onIssuerSelected';\n            this.handleError(error instanceof AdyenCheckoutError ? error : new AdyenCheckoutError(ERROR, errorMsg));\n        }\n    };\n\n    private readonly authorizeEnrollment = async (registrationOptions: string): Promise<void> => {\n        try {\n            const fidoAssertion = await this.passkeyService.createCredentialForEnrollment(registrationOptions); // Create passkey and trigger biometrics\n            const enrollment = { enrollmentId: this.props.paymentMethodData?.enrollmentId, fidoAssertion };\n            const { redirectResult } = await authorizeEnrollment({\n                enrollment,\n                clientKey: this.props.clientKey,\n                loadingContext: this.props.loadingContext\n            });\n            // Make paymentDetails call to finalize the enrollment.\n            this.handleAdditionalDetails({ data: { details: { redirectResult } } });\n        } catch (error) {\n            const errorMsg = error instanceof Error ? error.message : 'Unknown error in the authorizeEnrollment';\n            this.handleError(error instanceof AdyenCheckoutError ? error : new AdyenCheckoutError(ERROR, errorMsg));\n        }\n    };\n\n    /**\n     * There are 3 endpoints (stages) we need to call for the payment flow.\n     * The first one `payWithStoredPayment` is the regular payments call - we attempt to pay with the stored payment token.\n     * The second one is to poll the authorization options - we poll the server to get the challenge in the `getAuthorizationStatus` function.\n     * The third one is in the `authorizePayment` function - we authorize the payment with shopper's passkey.\n     */\n    private readonly payWithStoredPayment = async () => {\n        try {\n            const { deviceId, ...riskSignals } = await this.passkeyService.captureRiskSignalsAuthentication();\n            this.state = { ...this.state, ...{ data: { storedPaymentMethodId: this.props.storedPaymentMethodId, riskSignals, deviceId } } };\n            super.submit();\n        } catch (error) {\n            const errorMsg = error instanceof Error ? error.message : 'Unknown error in the payWithStoredPayment';\n            this.handleError(error instanceof AdyenCheckoutError ? error : new AdyenCheckoutError(ERROR, errorMsg));\n        }\n    };\n\n    private readonly authorizePayment = async (authenticationOptions: string): Promise<void> => {\n        try {\n            const fidoAssertion = await this.passkeyService.authenticateWithCredential(authenticationOptions);\n            const payment = {\n                enrollmentId: this.props.paymentMethodData?.enrollmentId,\n                initiationId: this.props.paymentMethodData?.initiationId,\n                fidoAssertion\n            };\n            const { redirectResult } = await authorizePayment({\n                payment,\n                clientKey: this.props.clientKey,\n                loadingContext: this.props.loadingContext\n            });\n            this.handleAdditionalDetails({ data: { details: { redirectResult } } });\n        } catch (error) {\n            const errorMsg = error instanceof Error ? error.message : 'Unknown error in the authorizePayment';\n            this.handleError(error instanceof AdyenCheckoutError ? error : new AdyenCheckoutError(ERROR, errorMsg));\n        }\n    };\n\n    render() {\n        // Always render the redirect button on the merchant's page\n        if (!this.props._isAdyenHosted) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                        <RedirectButton\n                            showPayButton={this.props.showPayButton}\n                            name={this.displayName}\n                            label={this.props.i18n.get('paybybankpix.redirectBtn.label')}\n                            amount={this.props.amount}\n                            payButton={this.payButton}\n                            onSubmit={this.submit}\n                            ref={ref => {\n                                this.componentRef = ref;\n                            }}\n                        />\n                    </SRPanelProvider>\n                </CoreProvider>\n            );\n        }\n\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                    {this.props.storedPaymentMethodId != null ? (\n                        <StoredPayment\n                            txVariant={PayByBankPixElement.type}\n                            type={this.props.type}\n                            clientKey={this.props.clientKey}\n                            amount={this.props.amount}\n                            issuer={this.props?.payByBankPixDetails?.ispb}\n                            receiver={this.props?.payByBankPixDetails?.receiver}\n                            enrollmentId={this.props.paymentMethodData?.enrollmentId}\n                            initiationId={this.props.paymentMethodData?.initiationId}\n                            setComponentRef={this.setComponentRef}\n                            onPay={this.payWithStoredPayment}\n                            onAuthorize={this.authorizePayment}\n                        />\n                    ) : (\n                        <Enrollment\n                            onError={this.handleError}\n                            txVariant={PayByBankPixElement.type}\n                            // Await\n                            type={this.props.type}\n                            clientKey={this.props.clientKey}\n                            enrollmentId={this.props.paymentMethodData?.enrollmentId}\n                            countdownTime={this.props.countdownTime}\n                            onEnroll={this.authorizeEnrollment}\n                            // Issuer List\n                            issuers={this.props.issuers}\n                            payButton={this.payButton}\n                            onChange={this.onIssuerSelected}\n                            onSubmitAnalytics={this.submitAnalytics}\n                            setComponentRef={this.setComponentRef}\n                        />\n                    )}\n                </SRPanelProvider>\n            </CoreProvider>\n        );\n    }\n}\n//\nexport default PayByBankPixElement;\n","import { httpPost } from '../../../core/Services/http';\nimport { RawPaymentResponse } from '../../../types/global-types';\n\ninterface IPostEnrollment {\n    enrollment: { enrollmentId: string; fidoAssertion: string };\n    clientKey: string;\n    loadingContext: string;\n    timeout?: number; // in milliseconds\n}\n\nasync function authorizeEnrollment({ enrollment, clientKey, loadingContext, timeout = 10000 }: IPostEnrollment): Promise<RawPaymentResponse> {\n    if (!enrollment || !clientKey) {\n        throw new Error('Could not authorize the enrollment');\n    }\n    const options = {\n        loadingContext,\n        path: `utility/v1/pixpaybybank/redirect-result?clientKey=${clientKey}`,\n        timeout\n    };\n\n    return httpPost(options, enrollment);\n}\n\nexport { authorizeEnrollment };\n","import { httpPost } from '../../../core/Services/http';\nimport { RawPaymentResponse } from '../../../types/global-types';\n\ninterface IAuthorizePayment {\n    payment: { enrollmentId: string; initiationId: string; fidoAssertion: string };\n    clientKey: string;\n    loadingContext: string;\n    timeout?: number; // in milliseconds\n}\n\nasync function authorizePayment({ payment, clientKey, loadingContext, timeout = 10000 }: IAuthorizePayment): Promise<RawPaymentResponse> {\n    if (!payment || !clientKey) {\n        throw new Error('Could not authorize the payment');\n    }\n    const options = {\n        loadingContext,\n        path: `utility/v1/pixpaybybank/redirect-result?clientKey=${clientKey}`,\n        timeout\n    };\n\n    return httpPost(options, payment);\n}\n\nexport { authorizePayment };\n","export const KLARNA_WIDGET_URL = 'https://x.klarnacdn.net/kp/lib/v1/api.js';\n","import { h } from 'preact';\nimport { useEffect, useRef, useState, useCallback } from 'preact/hooks';\nimport Script from '../../../../utils/Script';\nimport { KLARNA_WIDGET_URL } from '../../constants';\nimport type { KlarnaWidgetAuthorizeResponse, KlarnaWidgetProps } from '../../types';\n\nimport './KlarnaWidget.scss';\n\nexport function KlarnaWidget({ sdkData, paymentMethodType, widgetInitializationTime, payButton, ...props }: KlarnaWidgetProps) {\n    const klarnaWidgetRef = useRef(null);\n    const [status, setStatus] = useState('ready');\n\n    const handleError = useCallback(() => {\n        setStatus('error');\n        props.onComplete({\n            data: {\n                paymentData: props.paymentData,\n                details: {}\n            }\n        });\n    }, [props.paymentData, props.onComplete]);\n\n    const initializeKlarnaWidget = useCallback(() => {\n        window.Klarna.Payments.init({\n            client_token: sdkData.client_token\n        });\n\n        window.Klarna.Payments.load(\n            {\n                container: klarnaWidgetRef.current,\n                payment_method_category: sdkData.payment_method_category\n            },\n            function (res) {\n                // If show_form: true is received together with an error, something fixable is wrong and the consumer\n                // needs to take action before moving forward\n                // If show_form: false, the payment method in the loaded widget will not be offered for this order\n                // based on Klarna’s pre-assessment.\n                if (!res.show_form || !!res.error) {\n                    handleError();\n                } else {\n                    props.onLoaded();\n                }\n            }\n        );\n    }, [sdkData.client_token, sdkData.payment_method_category]);\n\n    const authorizeKlarna = useCallback(() => {\n        setStatus('loading');\n        try {\n            window.Klarna.Payments.authorize(\n                {\n                    payment_method_category: sdkData.payment_method_category\n                },\n                function (res: KlarnaWidgetAuthorizeResponse) {\n                    if (res.approved === true && res.show_form === true) {\n                        // Klarna has approved the authorization of credit for this order.\n                        setStatus('success');\n                        props.onComplete({\n                            data: {\n                                paymentData: props.paymentData,\n                                details: {\n                                    authorization_token: res.authorization_token\n                                }\n                            }\n                        });\n                    } else if (!res.approved && res.show_form === true) {\n                        // Fixable error\n                        setStatus('ready');\n                        props.onError(res);\n                    } else {\n                        // The purchase is declined. The widget should be hidden and the user\n                        // should select another payment method.\n                        handleError();\n                    }\n                }\n            );\n        } catch (e) {\n            handleError();\n        }\n    }, [sdkData.payment_method_category, props.onComplete, props.onError]);\n\n    /**\n     * Initializes Klarna SDK if it is already available and reinitialize\n     * it when the init time refreshes\n     */\n    useEffect(() => {\n        const isKlarnaAvailable = window.Klarna?.Payments?.init;\n        if (isKlarnaAvailable) {\n            initializeKlarnaWidget();\n        }\n    }, [widgetInitializationTime]);\n\n    useEffect(() => {\n        window.klarnaAsyncCallback = function () {\n            initializeKlarnaWidget();\n        };\n        const script = new Script(KLARNA_WIDGET_URL);\n        void script.load();\n\n        return () => {\n            script.remove();\n        };\n    }, [initializeKlarnaWidget]);\n\n    if (status !== 'error' && status !== 'success') {\n        return (\n            <div className=\"adyen-checkout__klarna-widget\">\n                <div ref={klarnaWidgetRef} />\n                {payButton({ status, disabled: status === 'loading', onClick: authorizeKlarna })}\n            </div>\n        );\n    }\n\n    return null;\n}\n","import { h } from 'preact';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { KlarnaWidget } from '../KlarnaWidget/KlarnaWidget';\nimport type { ComponentMethodsRef, PayButtonFunctionProps, UIElementStatus } from '../../../internal/UIElement/types';\nimport type { ActionHandledReturnObject } from '../../../../types/global-types';\nimport type { AdyenCheckoutError, KlarnaAction, KlarnaAdditionalDetailsData, KlarnaComponentRef } from '../../../../types';\n\ninterface KlarnaContainerProps {\n    setComponentRef: (ref: ComponentMethodsRef) => void;\n    displayName: string;\n    showPayButton: boolean;\n    type: string;\n    onComplete(state: KlarnaAdditionalDetailsData): void;\n    onError(error: AdyenCheckoutError): void;\n    payButton(props?: PayButtonFunctionProps): h.JSX.Element;\n    onLoaded(): void;\n    onActionHandled(actionHandled: ActionHandledReturnObject): void;\n}\n\nexport function KlarnaContainer({ setComponentRef, ...props }: KlarnaContainerProps) {\n    const [widgetInitializationTime, setWidgetInitializationTime] = useState<number>(null);\n    const [action, setAction] = useState<KlarnaAction>();\n    const [status, setStatus] = useState('ready');\n    const klarnaRef = useRef<KlarnaComponentRef>({\n        setAction: (action: KlarnaAction) => {\n            setAction(action);\n            setWidgetInitializationTime(new Date().getTime());\n        },\n        setStatus: (status: UIElementStatus) => setStatus(status),\n        reinitializeWidget: () => {\n            setWidgetInitializationTime(new Date().getTime());\n        }\n    });\n\n    useEffect(() => {\n        setComponentRef(klarnaRef.current);\n    }, [setComponentRef]);\n\n    if (action?.sdkData) {\n        return (\n            <KlarnaWidget\n                widgetInitializationTime={widgetInitializationTime}\n                sdkData={action.sdkData}\n                paymentMethodType={action.paymentMethodType}\n                paymentData={action.paymentData}\n                payButton={props.payButton}\n                onComplete={props.onComplete}\n                onError={props.onError}\n                onLoaded={() => {\n                    props.onActionHandled?.({ componentType: props.type, actionDescription: 'sdk-loaded', originalAction: action });\n                    props.onLoaded();\n                }}\n            />\n        );\n    }\n\n    if (props.showPayButton) {\n        return props.payButton({\n            ...props,\n            status,\n            disabled: status === 'loading',\n            classNameModifiers: ['standalone'],\n            label: `${this.props.i18n.get('continueTo')} ${props.displayName}`\n        });\n    }\n\n    return null;\n}\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport PayButton from '../internal/PayButton';\nimport { KlarnaContainer } from './components/KlarnaContainer/KlarnaContainer';\nimport { TxVariants } from '../tx-variants';\nimport type { KlarnaAction, KlarnaAdditionalDetailsData, KlarnaComponentRef, KlarnaConfiguration } from './types';\nimport type { ICore } from '../../core/types';\n\nclass KlarnaPayments extends UIElement<KlarnaConfiguration> {\n    public static type = TxVariants.klarna;\n    public static txVariants = [TxVariants.klarna, TxVariants.klarna_account, TxVariants.klarna_paynow, TxVariants.klarna_b2b];\n\n    public componentRef: KlarnaComponentRef;\n\n    protected static defaultProps = {\n        useKlarnaWidget: false\n    };\n\n    constructor(checkout: ICore, props?: KlarnaConfiguration) {\n        super(checkout, props);\n\n        this.onComplete = this.onComplete.bind(this);\n        this.updateWithAction = this.updateWithAction.bind(this);\n        this.submit = this.submit.bind(this);\n        this.onLoaded = this.onLoaded.bind(this);\n    }\n    get isValid() {\n        return true;\n    }\n\n    protected formatData() {\n        return {\n            paymentMethod: {\n                type: this.type,\n                ...(this.props.useKlarnaWidget ? { subtype: 'sdk' } : {})\n            }\n        };\n    }\n\n    public payButton = props => {\n        return <PayButton amount={this.props.amount} onClick={this.submit} {...props} />;\n    };\n\n    public override handleAction(action: KlarnaAction, props = {}): UIElement | null {\n        if (action.type === 'sdk') {\n            this.updateWithAction(action);\n            return;\n        }\n        return super.handleAction(action, props);\n    }\n\n    updateWithAction(action: KlarnaAction): void {\n        if (action.paymentMethodType !== this.type) throw new Error('Invalid Action');\n        this.componentRef.setAction(action);\n    }\n\n    private onLoaded() {\n        // When action/widget is loaded, set the 'drop-in' back to ready\n        this.setElementStatus('ready');\n    }\n\n    public override activate() {\n        this.componentRef.reinitializeWidget();\n    }\n\n    protected onComplete(details: KlarnaAdditionalDetailsData): void {\n        this.handleAdditionalDetails(details);\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <KlarnaContainer\n                    {...this.props}\n                    setComponentRef={this.setComponentRef}\n                    displayName={this.displayName}\n                    onComplete={this.onComplete}\n                    onError={this.props.onError}\n                    payButton={this.payButton}\n                    onLoaded={this.onLoaded}\n                    showPayButton={this.props.showPayButton}\n                    onActionHandled={this.onActionHandled}\n                    type={this.props.type}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default KlarnaPayments;\n","import { useEffect } from 'preact/hooks';\nimport useSRPanelContext from './useSRPanelContext';\n\nexport const useA11yReporter = (statusMessage): void => {\n    const { srPanel } = useSRPanelContext();\n\n    useEffect(() => {\n        srPanel.setAriaProps({ 'aria-relevant': 'additions text' });\n        return () => {\n            srPanel.setMessages(null);\n            srPanel.setAriaProps({ 'aria-relevant': srPanel.constructor['defaultProps'].ariaAttributes['aria-relevant'] });\n        };\n    }, []);\n\n    useEffect(() => {\n        srPanel.setMessages(statusMessage);\n    }, [statusMessage]);\n};\n","import { Component, h } from 'preact';\nimport Countdown from '../Countdown';\nimport Button from '../Button';\nimport Spinner from '../Spinner';\nimport checkPaymentStatus from '../../../core/Services/payment-status';\nimport processResponse from '../../../core/ProcessResponse';\n\nimport './QRLoader.scss';\nimport { QRLoaderProps, QRLoaderState } from './types';\nimport copyToClipboard from '../../../utils/clipboard';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport ContentSeparator from '../ContentSeparator';\nimport { StatusObject } from '../Await/types';\nimport useImage from '../../../core/Context/useImage';\nimport { useA11yReporter } from '../../../core/Errors/useA11yReporter';\nimport useAutoFocus from '../../../utils/useAutoFocus';\nimport { ANALYTICS_DOWNLOAD_STR, ANALYTICS_QR_CODE_DOWNLOAD } from '../../../core/Analytics/constants';\nimport { PREFIX } from '../Icon/constants';\nimport { AnalyticsInfoEvent } from '../../../core/Analytics/AnalyticsInfoEvent';\n\nconst QRCODE_URL = 'utility/v1/barcode.png?type=qrCode&data=';\n\nclass QRLoader extends Component<QRLoaderProps, QRLoaderState> {\n    private timeoutId;\n\n    constructor(props) {\n        super(props);\n\n        this.state = {\n            buttonStatus: 'default',\n            completed: false,\n            delay: props.delay,\n            expired: false,\n            loading: true,\n            percentage: 100,\n            timePassed: 0\n        };\n    }\n\n    public static defaultProps = {\n        delay: 2000,\n        countdownTime: 15,\n        onError: () => {},\n        onComplete: () => {},\n        throttleTime: 60000,\n        classNameModifiers: [],\n        throttledInterval: 10000,\n        introduction: 'wechatpay.scanqrcode',\n        timeToPay: 'wechatpay.timetopay',\n        buttonLabel: 'openApp'\n    };\n\n    componentDidMount() {\n        this.statusInterval();\n    }\n\n    componentWillUnmount() {\n        clearTimeout(this.timeoutId);\n    }\n\n    public redirectToApp = (url: string | URL) => {\n        window.location.assign(url);\n    };\n\n    // Retry until getting a complete response from the server, or it times out\n    public statusInterval = (responseTime = 0) => {\n        // If we are already in the final statuses, do not poll!\n        if (this.state.expired || this.state.completed) return;\n\n        this.setState(previous => ({ timePassed: previous.timePassed + this.props.delay + responseTime }));\n        // Changes interval time to 10 seconds after 1 minute (60 seconds)\n        const newDelay = this.state.timePassed >= this.props.throttleTime ? this.props.throttledInterval : this.state.delay;\n        this.pollStatus(newDelay);\n    };\n\n    private pollStatus(delay: number) {\n        clearTimeout(this.timeoutId);\n\n        // eslint-disable-next-line @typescript-eslint/no-misused-promises\n        this.timeoutId = setTimeout(async () => {\n            // Wait for previous status call to finish.\n            // Also taking the server response time into the consideration to calculate timePassed.\n            const start = performance.now();\n            await this.checkStatus();\n            const end = performance.now();\n            this.statusInterval(Math.round(end - start));\n        }, delay);\n    }\n\n    private onTick = (time): void => {\n        this.setState({ percentage: time.percentage });\n    };\n\n    private onTimeUp = (): void => {\n        this.setState({ expired: true });\n        clearTimeout(this.timeoutId);\n        this.props.onError(new AdyenCheckoutError('ERROR', 'Payment Expired'));\n    };\n\n    private onComplete = (status: StatusObject): void => {\n        clearTimeout(this.timeoutId);\n        this.setState({ completed: true, loading: false });\n\n        const state = {\n            data: {\n                details: { payload: status.props.payload },\n                paymentData: this.props.paymentData\n            }\n        };\n\n        this.props.onComplete(state, this);\n    };\n\n    private onError = (status: StatusObject): void => {\n        clearTimeout(this.timeoutId);\n        this.setState({ expired: true, loading: false });\n\n        if (status.props.payload) {\n            const state = {\n                data: {\n                    details: { payload: status.props.payload },\n                    paymentData: this.props.paymentData\n                }\n            };\n            this.props.onComplete(state, this);\n        }\n\n        const error = new AdyenCheckoutError('ERROR', 'error result with no payload in response');\n        return this.props.onError(error);\n    };\n\n    private checkStatus = () => {\n        const { paymentData, clientKey, loadingContext, throttledInterval } = this.props;\n\n        return checkPaymentStatus(paymentData, clientKey, loadingContext, throttledInterval)\n            .then(processResponse)\n            .catch(response => ({ type: 'network-error', props: response }))\n            .then((status: StatusObject) => {\n                switch (status.type) {\n                    case 'success':\n                        this.onComplete(status);\n                        break;\n                    case 'error':\n                        this.onError(status);\n                        break;\n                    default:\n                        this.setState({ loading: false });\n                }\n                return status;\n            });\n    };\n\n    render({ amount, url, brandLogo, brandName, countdownTime, type, onActionHandled }: QRLoaderProps, { expired, completed, loading }) {\n        const { i18n, loadingContext } = useCoreContext();\n        const getImage = useImage();\n\n        const qrCodeImage = this.props.qrCodeData\n            ? `${loadingContext}${QRCODE_URL}${this.props.qrCodeData}&clientKey=${this.props.clientKey}`\n            : this.props.qrCodeImage;\n\n        const finalState = (image, message) => {\n            const status = i18n.get(message);\n            useA11yReporter(status);\n            return (\n                <div className=\"adyen-checkout__qr-loader adyen-checkout__qr-loader--result\">\n                    <img\n                        className=\"adyen-checkout__qr-loader__icon adyen-checkout__qr-loader__icon--result\"\n                        src={getImage({ imageFolder: 'components/' })(image)}\n                        alt={status}\n                    />\n                    <div className=\"adyen-checkout__qr-loader__subtitle\">{status}</div>\n                </div>\n            );\n        };\n\n        if (expired) {\n            return finalState('error', 'error.subtitle.payment');\n        }\n\n        if (completed) {\n            return finalState('success', 'creditCard.success');\n        }\n\n        if (loading) {\n            return (\n                <div className=\"adyen-checkout__qr-loader\">\n                    {brandLogo && (\n                        <div className=\"adyen-checkout__qr-loader__brand-logo-wrapper\">\n                            <img alt={brandName} src={brandLogo} className=\"adyen-checkout__qr-loader__brand-logo\" />\n                        </div>\n                    )}\n                    <Spinner />\n                </div>\n            );\n        }\n\n        const timeToPayString = i18n.get(this.props.timeToPay).split('%@');\n\n        const qrSubtitleRef = useAutoFocus();\n        const classnames = this.props.classNameModifiers.map(m => `adyen-checkout__qr-loader--${m}`);\n\n        return (\n            <div className={`adyen-checkout__qr-loader adyen-checkout__qr-loader--${type} ${classnames.join(' ')}`}>\n                {brandLogo && (\n                    <div className=\"adyen-checkout__qr-loader__brand-logo-wrapper\">\n                        <img src={brandLogo} alt={brandName} className=\"adyen-checkout__qr-loader__brand-logo\" />\n                    </div>\n                )}\n\n                {amount && amount.value && amount.currency && (\n                    <div className=\"adyen-checkout__qr-loader__payment_amount\">{i18n.amount(amount.value, amount.currency)}</div>\n                )}\n\n                {url && (\n                    <div className=\"adyen-checkout__qr-loader__app-link\">\n                        {this.props.redirectIntroduction && (\n                            <div className=\"adyen-checkout__qr-loader__subtitle\">{i18n.get(this.props.redirectIntroduction)}</div>\n                        )}\n                        <Button classNameModifiers={['qr-loader']} onClick={() => this.redirectToApp(url)} label={i18n.get(this.props.buttonLabel)} />\n                        <ContentSeparator />\n                    </div>\n                )}\n\n                {/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n                <div ref={qrSubtitleRef} tabIndex={0} className=\"adyen-checkout__qr-loader__subtitle\">\n                    {typeof this.props.introduction === 'string' ? i18n.get(this.props.introduction) : this.props.introduction?.()}\n                </div>\n\n                <img\n                    src={qrCodeImage}\n                    alt={i18n.get('wechatpay.scanqrcode')}\n                    onLoad={() => {\n                        onActionHandled?.({\n                            componentType: this.props.type,\n                            actionDescription: 'qr-code-loaded'\n                        });\n                    }}\n                />\n\n                <div className=\"adyen-checkout__qr-loader__progress\">\n                    <span className=\"adyen-checkout__qr-loader__percentage\" style={{ width: `${this.state.percentage}%` }} />\n                </div>\n\n                <div className=\"adyen-checkout__qr-loader__countdown\">\n                    {timeToPayString[0]}&nbsp;\n                    <Countdown minutesFromNow={countdownTime} onTick={this.onTick} onCompleted={this.onTimeUp} />\n                    &nbsp;{timeToPayString[1]}\n                </div>\n\n                {this.props.instructions && (\n                    <div className=\"adyen-checkout__qr-loader__instructions\">\n                        {typeof this.props.instructions === 'string' ? i18n.get(this.props.instructions) : this.props.instructions?.()}\n                    </div>\n                )}\n\n                {this.props.copyBtn && (\n                    <div className=\"adyen-checkout__qr-loader__actions\">\n                        <Button\n                            inline\n                            variant=\"action\"\n                            onClick={(e, { complete }) => {\n                                copyToClipboard(this.props.qrCodeData);\n\n                                const event = new AnalyticsInfoEvent({\n                                    type: ANALYTICS_DOWNLOAD_STR,\n                                    target: ANALYTICS_QR_CODE_DOWNLOAD\n                                });\n                                this.props.onSubmitAnalytics(event);\n\n                                complete();\n                            }}\n                            icon={getImage({ imageFolder: 'components/' })(`${PREFIX}copy`)}\n                            label={i18n.get('button.copy')}\n                        />\n                    </div>\n                )}\n            </div>\n        );\n    }\n}\n\nexport default QRLoader;\n","import { useRef, useEffect } from 'preact/hooks';\n\nconst useAutoFocus = () => {\n    const ref = useRef(null);\n\n    useEffect(() => {\n        ref.current?.focus();\n    }, []);\n\n    return ref;\n};\n\nexport default useAutoFocus;\n","import { h } from 'preact';\nimport UIElement from '../../internal/UIElement/UIElement';\nimport QRLoader from '../../internal/QRLoader';\nimport { CoreProvider } from '../../../core/Context/CoreProvider';\nimport RedirectButton from '../../internal/RedirectButton';\nimport SRPanelProvider from '../../../core/Errors/SRPanelProvider';\nimport { QRLoaderConfiguration } from './types';\n\nclass QRLoaderContainer<T extends QRLoaderConfiguration = QRLoaderConfiguration> extends UIElement<T> {\n    // Using the generic here allow to fully extend the QRLoaderContainer (including it's props)\n    protected static defaultProps = {\n        qrCodeImage: '',\n        amount: null,\n        paymentData: null,\n        onError: () => {},\n        onComplete: () => {}\n    };\n\n    formatData() {\n        return {\n            paymentMethod: {\n                type: this.type,\n                ...this.state.data\n            }\n        };\n    }\n\n    get isValid() {\n        return true;\n    }\n\n    // Makes possible to extend the final QR code step\n    public renderQRCode() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                    <QRLoader\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        {...this.props}\n                        type={this.constructor['type']}\n                        brandLogo={this.props.brandLogo || this.icon}\n                        delay={this.props.delay}\n                        onComplete={this.onComplete}\n                        countdownTime={this.props.countdownTime}\n                        instructions={this.props.instructions}\n                        onActionHandled={this.onActionHandled}\n                        brandName={this.displayName}\n                        onSubmitAnalytics={this.submitAnalytics}\n                    />\n                </SRPanelProvider>\n            </CoreProvider>\n        );\n    }\n\n    render() {\n        if (this.props.paymentData) {\n            return this.renderQRCode();\n        }\n\n        if (this.props.showPayButton) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <RedirectButton\n                        showPayButton={this.props.showPayButton}\n                        name={this.displayName}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                    />\n                </CoreProvider>\n            );\n        }\n\n        return null;\n    }\n}\n\nexport default QRLoaderContainer;\n","import QRLoaderContainer from '../helpers/QRLoaderContainer/QRLoaderContainer';\nimport { STATUS_INTERVAL, COUNTDOWN_MINUTES } from './config';\nimport { TxVariants } from '../tx-variants';\n\nclass BCMCMobileElement extends QRLoaderContainer {\n    public static type = TxVariants.bcmc_mobile;\n    public static txVariants = [TxVariants.bcmc_mobile, TxVariants.bcmc_mobile_QR];\n\n    formatProps(props) {\n        return {\n            delay: STATUS_INTERVAL,\n            countdownTime: COUNTDOWN_MINUTES,\n            timeToPay: 'payme.timeToPay',\n            ...super.formatProps(props)\n        };\n    }\n}\n\nexport default BCMCMobileElement;\n","export const COUNTDOWN_MINUTES = 15; // min\nexport const STATUS_INTERVAL = 2000; // ms\n\nexport default {\n    STATUS_INTERVAL,\n    COUNTDOWN_MINUTES\n};\n","import { ValidatorRules } from '../../../utils/Validator/types';\nimport validateSSN from '../../internal/SocialSecurityNumberBrazil/validate';\n\nexport const pixValidationRules: ValidatorRules = {\n    socialSecurityNumber: {\n        validate: validateSSN,\n        errorMessage: '',\n        modes: ['blur']\n    },\n    default: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: '',\n        modes: ['blur']\n    }\n};\n","import { formatCPFCNPJ } from '../../internal/SocialSecurityNumberBrazil/utils';\n\nexport const pixFormatters = {\n    socialSecurityNumber: ssn => formatCPFCNPJ(ssn)\n};\n","import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport { pixValidationRules } from './validate';\nimport { pixFormatters } from './utils';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport useForm from '../../../utils/useForm';\nimport { BrazilPersonalDetail } from '../../internal/SocialSecurityNumberBrazil/BrazilPersonalDetail';\nimport { PixInputDataState, PixInputProps } from './types';\n\nfunction PixInput({ name, data: dataProps, personalDetailsRequired, showPayButton, onChange, payButton }: PixInputProps) {\n    const { i18n } = useCoreContext();\n    const formSchema = ['firstName', 'lastName', 'socialSecurityNumber'];\n\n    const { handleChangeFor, triggerValidation, setSchema, data, valid, errors, isValid } = useForm<PixInputDataState>({\n        schema: formSchema,\n        defaultData: dataProps,\n        rules: pixValidationRules,\n        formatters: pixFormatters\n    });\n\n    // Handle form schema updates\n    useEffect(() => {\n        const newSchema = personalDetailsRequired ? [...formSchema] : [];\n        setSchema(newSchema);\n    }, [personalDetailsRequired]);\n\n    const [status, setStatus] = useState('ready');\n    this.setStatus = setStatus;\n\n    this.showValidation = () => {\n        triggerValidation();\n    };\n\n    useEffect(() => {\n        onChange({ data, valid, errors, isValid });\n    }, [onChange, data, valid, errors]);\n\n    const buttonModifiers = !personalDetailsRequired ? ['standalone'] : [];\n\n    return (\n        <div className=\"adyen-checkout__pix-input__field\" style={!showPayButton && !personalDetailsRequired ? { display: 'none' } : null}>\n            {personalDetailsRequired && (\n                <BrazilPersonalDetail i18n={i18n} data={data} handleChangeFor={handleChangeFor} errors={errors} valid={valid} />\n            )}\n\n            {showPayButton &&\n                payButton({\n                    status,\n                    label: `${i18n.get('continueTo')} ${name}`,\n                    classNameModifiers: buttonModifiers\n                })}\n        </div>\n    );\n}\n\nexport default PixInput;\n","import { h } from 'preact';\nimport QRLoaderContainer from '../helpers/QRLoaderContainer/QRLoaderContainer';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport PixInput from './PixInput';\nimport { cleanCPFCNPJ } from '../internal/SocialSecurityNumberBrazil/utils';\nimport { PixElementData, PixConfiguration } from './types';\nimport { TxVariants } from '../tx-variants';\n\nclass PixElement extends QRLoaderContainer<PixConfiguration> {\n    public static type = TxVariants.pix;\n\n    public static defaultProps = {\n        personalDetailsRequired: false,\n        countdownTime: 15,\n        delay: 2000,\n        ...QRLoaderContainer.defaultProps\n    };\n\n    get isValid(): boolean {\n        return !!this.state.isValid;\n    }\n\n    formatProps(props): PixConfiguration {\n        return {\n            copyBtn: true,\n            introduction: 'pix.instructions',\n            ...super.formatProps(props)\n        };\n    }\n\n    formatData(): PixElementData {\n        const { data = {} } = this.state;\n        const { firstName, lastName, socialSecurityNumber = '' } = data;\n\n        return {\n            paymentMethod: {\n                type: this.props.type || this.constructor['type']\n            },\n            ...(firstName && lastName && { shopperName: { firstName, lastName } }),\n            ...(socialSecurityNumber && { socialSecurityNumber: cleanCPFCNPJ(socialSecurityNumber) })\n        };\n    }\n\n    render() {\n        if (this.props.paymentData) {\n            return this.renderQRCode();\n        }\n\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <PixInput\n                    ref={ref => {\n                        this.componentRef = ref;\n                    }}\n                    {...this.props}\n                    showPayButton={this.props.showPayButton}\n                    personalDetailsRequired={this.props.personalDetailsRequired}\n                    name={this.displayName}\n                    onChange={this.setState}\n                    payButton={this.payButton}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default PixElement;\n","import QRLoaderContainer from '../helpers/QRLoaderContainer/QRLoaderContainer';\nimport { TxVariants } from '../tx-variants';\nimport './Swish.scss';\n\nclass SwishElement extends QRLoaderContainer {\n    public static type = TxVariants.swish;\n\n    formatProps(props) {\n        return {\n            delay: 2000, // ms\n            countdownTime: 3, // min\n            instructions: 'swish.pendingMessage',\n            ...super.formatProps(props)\n        };\n    }\n}\n\nexport default SwishElement;\n","import QRLoaderContainer from '../helpers/QRLoaderContainer/QRLoaderContainer';\nimport { delay, countdownTime } from './config';\nimport { TxVariants } from '../tx-variants';\n\nclass WeChatPayElement extends QRLoaderContainer {\n    public static type = TxVariants.wechatpayQR;\n    public static txVariants = [TxVariants.wechatpay];\n    public static analyticsType = 'wechatpayQR'; // Needed for use-case where merchant makes a payment themselves and then calls checkout.createFromAction(action)\n\n    formatProps(props) {\n        return {\n            delay,\n            countdownTime,\n            ...super.formatProps(props)\n        };\n    }\n}\n\nexport default WeChatPayElement;\n","export const countdownTime = 30; // min\nexport const delay = 2000; // ms\n\nexport default {\n    delay,\n    countdownTime\n};\n","import QRLoaderContainer from '../helpers/QRLoaderContainer/QRLoaderContainer';\nimport { delay, countdownTime } from './config';\nimport { TxVariants } from '../tx-variants';\n\nclass PromptPayElement extends QRLoaderContainer {\n    public static type = TxVariants.promptpay;\n\n    formatProps(props) {\n        return {\n            delay,\n            countdownTime,\n            ...super.formatProps(props)\n        };\n    }\n}\n\nexport default PromptPayElement;\n","export const countdownTime = 1.5; // min\nexport const delay = 2000; // ms\n\nexport default {\n    delay,\n    countdownTime\n};\n","export const countdownTime = 3; // min\nexport const delay = 2000; // ms\n\nexport default {\n    delay,\n    countdownTime\n};\n","import { ComponentChildren, h } from 'preact';\nimport './TimelineWrapper.scss';\n\ninterface TimelineWrapperProps {\n    children: ComponentChildren;\n    className?: string;\n}\n\nconst TimelineWrapper = ({ children, className }: TimelineWrapperProps) => {\n    return <div className={`adyen-checkout-timeline-wrapper ${className}`}>{children}</div>;\n};\n\nexport { TimelineWrapper };\n","import { h } from 'preact';\nimport './Timeline.scss';\n\ninterface Timeline {\n    instructions: string[];\n}\n\nconst Timeline = ({ instructions }: Timeline) => {\n    if (!instructions || instructions.length === 0) {\n        return null;\n    }\n\n    return (\n        <div className=\"adyen-checkout-timeline\">\n            <ol className=\"adyen-checkout-timeline__items\">\n                {instructions.map((value, index) => (\n                    <li className=\"adyen-checkout-timeline-item\" key={index}>\n                        <div className=\"adyen-checkout-timeline-item__row\">\n                            <div aria-hidden=\"true\" className=\"adyen-checkout-timeline-item__marker\">\n                                <svg role=\"img\" xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\">\n                                    <path\n                                        fill=\"#00112C\"\n                                        d=\"M5.5 3.25C4.25736 3.25 3.25 4.25736 3.25 5.5V10.5C3.25 11.7426 4.25736 12.75 5.5 12.75H10.5C11.7426 12.75 12.75 11.7426 12.75 10.5V5.5C12.75 4.25736 11.7426 3.25 10.5 3.25H5.5Z\"\n                                    ></path>\n                                </svg>\n                                <div className=\"adyen-checkout-timeline-item__separator\"></div>\n                            </div>\n                            <div className=\"adyen-checkout-timeline-item__content\">\n                                <div className=\"adyen-checkout-timeline-item__title\">{value}</div>\n                            </div>\n                        </div>\n                    </li>\n                ))}\n            </ol>\n        </div>\n    );\n};\n\nexport { Timeline };\n","import { useCallback, useEffect, useState } from 'preact/hooks';\n\nfunction isTabletWidthOrSmaller() {\n    return window.matchMedia('(max-width: 1024px)').matches;\n}\n\nconst useIsMobile = () => {\n    const [isMobileScreenSize, setIsMobileScreenSize] = useState(isTabletWidthOrSmaller());\n\n    const handleWindowResize = useCallback(() => {\n        const isMobileScreenSize = isTabletWidthOrSmaller();\n        setIsMobileScreenSize(isMobileScreenSize);\n    }, []);\n\n    useEffect(() => {\n        window.addEventListener('resize', handleWindowResize);\n        return () => {\n            window.removeEventListener('resize', handleWindowResize);\n        };\n    }, [handleWindowResize]);\n\n    return { isMobileScreenSize };\n};\n\nexport { useIsMobile };\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './PayNowIntroduction.scss';\nimport { TimelineWrapper, Timeline } from '../../internal/Timeline';\nimport { useIsMobile } from '../../../utils/useIsMobile';\n\nconst PayNowIntroduction = () => {\n    const { i18n } = useCoreContext();\n    const { isMobileScreenSize } = useIsMobile();\n\n    const instructions = [\n        i18n.get('paynow.mobileViewInstruction.step1'),\n        i18n.get('paynow.mobileViewInstruction.step2'),\n        i18n.get('paynow.mobileViewInstruction.step3'),\n        i18n.get('paynow.mobileViewInstruction.step4'),\n        i18n.get('paynow.mobileViewInstruction.step5')\n    ];\n\n    return (\n        <div className=\"adyen-checkout-paynow__introduction\" data-testid=\"paynow-introduction\">\n            {isMobileScreenSize ? (\n                <TimelineWrapper>\n                    <Timeline instructions={instructions} />\n                </TimelineWrapper>\n            ) : (\n                i18n.get('paynow.scanQrCode')\n            )}\n        </div>\n    );\n};\n\nexport { PayNowIntroduction };\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport ContentSeparator from '../../internal/ContentSeparator';\nimport './PayNowInstructions.scss';\nimport { useIsMobile } from '../../../utils/useIsMobile';\n\nconst PayNowInstructions = () => {\n    const { i18n } = useCoreContext();\n    const { isMobileScreenSize } = useIsMobile();\n\n    if (!isMobileScreenSize) return;\n\n    return (\n        <div className=\"adyen-checkout-paynow__instructions\">\n            <ContentSeparator />\n            <p>{i18n.get('paynow.scanQrCode')}</p>\n        </div>\n    );\n};\n\nexport { PayNowInstructions };\n","import QRLoaderContainer from '../helpers/QRLoaderContainer/QRLoaderContainer';\nimport { delay, countdownTime } from './config';\nimport { TxVariants } from '../tx-variants';\nimport { PayNowIntroduction } from './components/PayNowIntroduction';\nimport { PayNowInstructions } from './components/PayNowInstructions';\n\nclass PayNowElement extends QRLoaderContainer {\n    public static type = TxVariants.paynow;\n\n    formatProps(props) {\n        return {\n            introduction: PayNowIntroduction,\n            instructions: PayNowInstructions,\n            timeToPay: 'payme.timeToPay',\n            delay,\n            countdownTime,\n            ...super.formatProps(props)\n        };\n    }\n}\n\nexport default PayNowElement;\n","import QRLoaderContainer from '../helpers/QRLoaderContainer/QRLoaderContainer';\nimport { delay, countdownTime } from './config';\nimport { TxVariants } from '../tx-variants';\n\nclass DuitNowElement extends QRLoaderContainer {\n    public static type = TxVariants.duitnow;\n\n    formatProps(props) {\n        return {\n            delay,\n            countdownTime,\n            ...super.formatProps(props)\n        };\n    }\n}\n\nexport default DuitNowElement;\n","export const countdownTime = 1.5; // min\nexport const delay = 2000; // ms\n\nexport default {\n    delay,\n    countdownTime\n};\n","import { useIsMobile } from '../../../utils/useIsMobile';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { Timeline, TimelineWrapper } from '../../internal/Timeline';\nimport { h } from 'preact';\n\nconst PayMeInstructions = () => {\n    const { i18n } = useCoreContext();\n    const { isMobileScreenSize } = useIsMobile();\n\n    if (isMobileScreenSize) {\n        return null;\n    }\n\n    const instructions = i18n.get('payme.instructions.steps').split('%@');\n\n    return (\n        <TimelineWrapper>\n            <Timeline instructions={instructions} />\n        </TimelineWrapper>\n    );\n};\n\nexport { PayMeInstructions };\n","import { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { useIsMobile } from '../../../utils/useIsMobile';\nimport { Timeline, TimelineWrapper } from '../../internal/Timeline';\nimport { Fragment, h } from 'preact';\n\nconst PayMeIntroduction = () => {\n    const { i18n } = useCoreContext();\n    const { isMobileScreenSize } = useIsMobile();\n\n    const instructions = i18n.get('payme.instructions.steps').split('%@');\n\n    return isMobileScreenSize ? (\n        <TimelineWrapper>\n            <Timeline instructions={instructions} />\n        </TimelineWrapper>\n    ) : (\n        <Fragment>{i18n.get('payme.scanQrCode')}</Fragment>\n    );\n};\n\nexport { PayMeIntroduction };\n","import QRLoaderContainer from '../helpers/QRLoaderContainer';\nimport { PayMeInstructions } from './components/PayMeInstructions';\nimport { PayMeIntroduction } from './components/PayMeIntroduction';\n\nclass PayMeElement extends QRLoaderContainer {\n    public static type = 'payme';\n    private static defaultCountdown = 10; // min\n    private static defaultDelay = 2000; // ms\n\n    formatProps(props) {\n        return {\n            delay: PayMeElement.defaultDelay,\n            countdownTime: PayMeElement.defaultCountdown,\n            redirectIntroduction: 'payme.openPayMeApp',\n            timeToPay: 'payme.timeToPay',\n            buttonLabel: 'payme.redirectButtonLabel',\n            introduction: PayMeIntroduction,\n            instructions: PayMeInstructions,\n            ...super.formatProps(props)\n        };\n    }\n}\n\nexport default PayMeElement;\n","import { h } from 'preact';\nimport { useState, useEffect } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Field from '../../internal/FormFields/Field';\nimport './BlikInput.scss';\nimport useForm from '../../../utils/useForm';\nimport { digitsOnlyFormatter } from '../../../utils/Formatters/formatters';\nimport useImage from '../../../core/Context/useImage';\nimport InputText from '../../internal/FormFields/InputText';\nimport { UIElementProps } from '../../internal/UIElement/types';\nimport { PREFIX } from '../../internal/Icon/constants';\n\ninterface BlikInputProps extends UIElementProps {\n    data?: BlikInputDataState;\n    placeholders?: BlikInputDataState;\n}\n\ninterface BlikInputDataState {\n    blikCode: string;\n}\n\nfunction BlikInput(props: BlikInputProps) {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<BlikInputDataState>({\n        schema: ['blikCode'],\n        rules: {\n            blikCode: {\n                validate: code => code?.length === 6,\n                errorMessage: 'blik.invalid',\n                modes: ['blur']\n            }\n        },\n        formatters: {\n            blikCode: digitsOnlyFormatter\n        }\n    });\n\n    useEffect(() => {\n        // @ts-ignore TODO: Fix this. Preact component types should not inherit from UIElementProps.\n        props.onChange({ data, errors, valid, isValid }, this);\n    }, [data, valid, errors, isValid]);\n\n    const [status, setStatus] = useState('ready');\n    this.setStatus = setStatus;\n    this.showValidation = triggerValidation;\n\n    return (\n        <div className=\"adyen-checkout__blik\">\n            <p className=\"adyen-checkout__blik__helper\">{i18n.get('blik.help')}</p>\n            <Field\n                errorMessage={!!errors.blikCode && i18n.get(errors.blikCode.errorMessage)}\n                label={i18n.get('blik.code')}\n                classNameModifiers={['blikCode', '50']}\n                isValid={valid.blikCode}\n                dir={'ltr'}\n                name={'blikCode'}\n            >\n                <InputText\n                    value={data.blikCode}\n                    name={'blikCode'}\n                    spellcheck={false}\n                    required={true}\n                    autocorrect={'off'}\n                    autocomplete={'off'}\n                    onInput={handleChangeFor('blikCode', 'input')}\n                    onBlur={handleChangeFor('blikCode', 'blur')}\n                    placeholder={props?.placeholders?.blikCode}\n                    inputMode={'numeric'}\n                    maxLength={6}\n                />\n            </Field>\n\n            {props.showPayButton &&\n                props.payButton({\n                    status,\n                    icon: getImage({ imageFolder: 'components/' })(`${PREFIX}lock`)\n                })}\n        </div>\n    );\n}\n\nBlikInput.defaultProps = { data: { blikCode: '' } };\n\nexport default BlikInput;\n","export const COUNTDOWN_MINUTES = 15; // min\nexport const STATUS_INTERVAL = 2000; // ms\nexport const THROTTLE_TIME = 60000; // ms\nexport const THROTTLE_INTERVAL = 10000; // ms\n\nexport default {\n    STATUS_INTERVAL,\n    COUNTDOWN_MINUTES,\n    THROTTLE_TIME,\n    THROTTLE_INTERVAL,\n    type: 'blik',\n    messageTextId: 'blik.confirmPayment', // identifier for a translation string\n    awaitTextId: 'await.waitForConfirmation',\n    showCountdownTimer: false\n};\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport BlikInput from '../../components/Blik/components/BlikInput';\nimport Await from '../internal/Await';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport config from './config';\nimport RedirectButton from '../../components/internal/RedirectButton';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\nimport { TxVariants } from '../tx-variants';\nimport { AwaitConfiguration } from '../internal/Await/types';\n\ninterface BlikElementData {\n    paymentMethod: {\n        type: string;\n        blikCode: string;\n    };\n}\n\nclass BlikElement extends UIElement<AwaitConfiguration> {\n    public static type = TxVariants.blik;\n\n    formatData(): BlikElementData {\n        const recurringPayment = !!this.props.storedPaymentMethodId;\n\n        return {\n            paymentMethod: {\n                type: BlikElement.type,\n                ...(!recurringPayment && { blikCode: this.state?.data?.blikCode }),\n                ...(recurringPayment && { storedPaymentMethodId: this.props.storedPaymentMethodId })\n            }\n        };\n    }\n\n    get isValid(): boolean {\n        if (this.props.storedPaymentMethodId) {\n            return true;\n        }\n\n        return !!this.state.isValid;\n    }\n\n    get displayName() {\n        if (this.props.storedPaymentMethodId && this.props.label) {\n            return this.props.label;\n        }\n        return this.props.name;\n    }\n\n    get additionalInfo() {\n        if (this.props.storedPaymentMethodId && this.props.label) {\n            return this.props.name;\n        }\n        return null;\n    }\n\n    /**\n     * NOTE: for future reference:\n     *  this.props.onComplete (which is called from this.onComplete) equates to the merchant defined onAdditionalDetails callback\n     *  (the initial /payments response defines an \"await\" action, actionTypes.ts translates this to \"onComplete: props.onAdditionalDetails\")\n     */\n    render() {\n        if (this.props.paymentData) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                        <Await\n                            ref={ref => {\n                                this.componentRef = ref;\n                            }}\n                            clientKey={this.props.clientKey}\n                            paymentData={this.props.paymentData}\n                            onError={this.handleError}\n                            onComplete={this.onComplete}\n                            brandLogo={this.icon}\n                            type={config.type}\n                            messageText={this.props.i18n.get(config.messageTextId)}\n                            awaitText={this.props.i18n.get(config.awaitTextId)}\n                            showCountdownTimer={config.showCountdownTimer}\n                            delay={config.STATUS_INTERVAL}\n                            countdownTime={config.COUNTDOWN_MINUTES}\n                            throttleTime={config.THROTTLE_TIME}\n                            throttleInterval={config.THROTTLE_INTERVAL}\n                            onActionHandled={this.onActionHandled}\n                        />\n                    </SRPanelProvider>\n                </CoreProvider>\n            );\n        }\n\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.storedPaymentMethodId ? (\n                    <RedirectButton\n                        showPayButton={this.props.showPayButton}\n                        name={this.displayName}\n                        amount={this.props.amount}\n                        payButton={this.payButton}\n                        onSubmit={this.submit}\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                    />\n                ) : (\n                    <BlikInput\n                        // @ts-ignore Ref is used by preact component\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        {...this.props}\n                        onChange={this.setState}\n                        onSubmit={this.submit}\n                        payButton={this.payButton}\n                    />\n                )}\n            </CoreProvider>\n        );\n    }\n}\n\nexport default BlikElement;\n","import { FormatRules, ValidatorRules } from '../../../utils/Validator/types';\nimport { isEmpty, getFormattingRegEx } from '../../../utils/validator-utils';\n\n// ((+351|00351|351)?)(2\\d{1}|(9(3|6|2|1)))\\d{7} full portuguese phone num regex\n\nconst portugueseRegex = /\\b(2\\d{1}|(9(3|6|2|1)))\\d{7}\\b/; // match 2 + any digit + 7 digits OR 9 + 3|6|2|1 + 7 digits\nconst defaultRegex = /^(\\d){4,}$/; // match >= 4 digits\n\nexport const phoneValidationRules: ValidatorRules = {\n    phoneNumber: {\n        modes: ['blur'],\n        validate: (value, context) => {\n            // TODO improve this switching mechanism *if* we get any more country based regexs\n            const testRegex = context.state.data.phonePrefix === '+351' ? portugueseRegex : defaultRegex;\n\n            return isEmpty(value) ? null : testRegex.test(value);\n        },\n        errorMessage: 'invalidPhoneNumber'\n    },\n    phonePrefix: {\n        modes: ['blur'],\n        validate: phonePrefix => !!phonePrefix,\n        errorMessage: 'invalidCountryCode'\n    }\n};\n\nexport const phoneFormatters: FormatRules = {\n    phoneNumber: {\n        formatterFn: val => val.replace(getFormattingRegEx('^\\\\d', 'g'), '')\n    }\n};\n","import { Fragment, h } from 'preact';\nimport { useEffect } from 'preact/hooks';\nimport Field from '../FormFields/Field';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './PhoneInput.scss';\nimport Select from '../FormFields/Select';\nimport { PhoneInputSchema } from './types';\nimport InputText from '../FormFields/InputText';\nimport { DataSet } from '../../../core/Services/data-set';\nimport { Form } from '../../../utils/useForm/types';\n\nexport interface PhoneInputFieldProps {\n    items: DataSet;\n    requiredFields?: string[];\n    data: PhoneInputSchema;\n    onChange: (obj) => void;\n    form: Form<PhoneInputSchema>;\n    getError: (string) => string | boolean;\n    phoneNumberKey?: string;\n    phonePrefixErrorKey?: string;\n    phoneNumberErrorKey?: string;\n    placeholders?: PhoneInputSchema;\n    ref?;\n    showPrefix?: boolean;\n    showNumber?: boolean;\n    canSelectPrefix?: boolean;\n}\n/**\n *\n * @param PhoneInputFormProps\n * @constructor\n */\nexport default function PhoneInputFields({ getError, showNumber, showPrefix, form, canSelectPrefix = true, ...props }: PhoneInputFieldProps) {\n    const { i18n } = useCoreContext();\n\n    const { handleChangeFor, data, valid } = form;\n\n    // Force re-validation of the phoneNumber when data.phonePrefix changes (since the validation rules will also change)\n    useEffect((): void => {\n        if (data.phoneNumber) {\n            handleChangeFor('phoneNumber', 'blur')(data.phoneNumber);\n        }\n    }, [data.phonePrefix]);\n\n    return (\n        <Fragment>\n            {showPrefix && (\n                <Field\n                    className={'adyen-checkout-field--phone-prefix'}\n                    label={i18n.get('telephonePrefix')}\n                    errorMessage={getError('phonePrefix')}\n                    showValidIcon={false}\n                    isValid={valid.phonePrefix}\n                    dir={'ltr'}\n                    i18n={i18n}\n                    name={'phonePrefix'}\n                >\n                    <Select\n                        readonly={!canSelectPrefix}\n                        className={'adyen-checkout-dropdown adyen-checkout-dropdown--countrycode-selector'}\n                        name={'phonePrefix'}\n                        items={props.items}\n                        onChange={handleChangeFor('phonePrefix')}\n                        placeholder={props?.placeholders?.phonePrefix}\n                        selectedValue={data.phonePrefix}\n                    />\n                </Field>\n            )}\n\n            {showNumber && (\n                <Field\n                    className={'adyen-checkout-field--phone-number'}\n                    label={props.phoneNumberKey ? i18n.get(props.phoneNumberKey) : i18n.get('telephoneNumber')}\n                    errorMessage={getError('phoneNumber')}\n                    isValid={valid.phoneNumber}\n                    filled={data?.phoneNumber?.length > 0}\n                    dir={'ltr'}\n                    i18n={i18n}\n                    name={'phoneNumber'}\n                >\n                    <InputText\n                        className=\"adyen-checkout__input adyen-checkout-input adyen-checkout-input--phone-number\"\n                        type=\"tel\"\n                        name=\"phoneNumber\"\n                        value={data.phoneNumber}\n                        onInput={handleChangeFor('phoneNumber', 'input')}\n                        onBlur={handleChangeFor('phoneNumber', 'blur')}\n                        placeholder={props?.placeholders?.phoneNumber}\n                        autoCorrect=\"off\"\n                        required={true}\n                    />\n                </Field>\n            )}\n        </Fragment>\n    );\n}\n","import { h } from 'preact';\nimport { useEffect, useCallback, useRef } from 'preact/hooks';\nimport useForm from '../../../utils/useForm';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport './PhoneInput.scss';\nimport { phoneFormatters, phoneValidationRules } from './validate';\nimport { PhoneInputFormProps, PhoneInputSchema } from './types';\nimport Fieldset from '../FormFields/Fieldset';\nimport PhoneInputFields from './PhoneInputFields';\nimport { ComponentMethodsRef } from '../UIElement/types';\n\n/**\n *\n * @param PhoneInputFormProps\n * @constructor\n */\nfunction PhoneInputForm(props: PhoneInputFormProps) {\n    const { i18n } = useCoreContext();\n\n    const schema = props.requiredFields || [...(props?.items?.length ? ['phonePrefix'] : []), 'phoneNumber'];\n    const showPrefix = schema.includes('phonePrefix') && !!props?.items?.length;\n    const showNumber = schema.includes('phoneNumber');\n\n    const form = useForm<PhoneInputSchema>({\n        i18n,\n        ...props,\n        schema,\n        defaultData: props.data,\n        rules: phoneValidationRules,\n        formatters: phoneFormatters\n    });\n\n    useEffect(() => {\n        form.setSchema(schema);\n    }, [schema.toString()]);\n\n    const { data, valid, errors, isValid, triggerValidation } = form;\n\n    useEffect(() => {\n        props.onChange({ data, valid, errors, isValid });\n    }, [data, valid, errors, isValid]);\n\n    const componentRef = useRef<ComponentMethodsRef>({\n        showValidation: triggerValidation\n    });\n\n    useEffect(() => {\n        props.setComponentRef(componentRef.current);\n    }, [props.setComponentRef]);\n\n    // This is here for MBWay, prob should be moved up\n    // MBWay has a weird way of loading its error messages\n    // They come form the prop phoneNumberErrorKey: 'mobileNumber.invalid'\n    // Strangely it's defined as invalidPhoneNumber in the validation rules\n    const getPhoneFieldError = useCallback(\n        (field: string) => {\n            if (errors[field]) {\n                const propsField = field === 'phoneNumber' ? 'phoneNumberErrorKey' : 'phonePrefixErrorKey';\n                const key = props[propsField] ? props[propsField] : errors[field].errorMessage;\n                return i18n.get(key) ?? null;\n            }\n            return null;\n        },\n        [errors]\n    );\n\n    return (\n        <Fieldset classNameModifiers={['phone-input']}>\n            <PhoneInputFields getError={getPhoneFieldError} showNumber={showNumber} showPrefix={showPrefix} form={form} {...props} />\n        </Fieldset>\n    );\n}\n\nPhoneInputForm.defaultProps = {\n    phoneLabel: 'telephoneNumber'\n};\n\nexport default PhoneInputForm;\n","import { h } from 'preact';\nimport { useState, useRef } from 'preact/hooks';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { MBWayInputProps } from './types';\nimport './MBWayInput.scss';\nimport PhoneInputForm from '../../../internal/PhoneInput';\nimport LoadingWrapper from '../../../internal/LoadingWrapper';\nimport usePhonePrefixes from '../../../internal/PhoneInput/usePhonePrefixes';\n\nfunction MBWayInput(props: MBWayInputProps) {\n    const { i18n, loadingContext } = useCoreContext();\n\n    const phoneInputRef = useRef(null);\n\n    const { allowedCountries = [] } = props;\n\n    const [status, setStatus] = useState<string>('ready');\n\n    this.setStatus = setStatus;\n\n    const { loadingStatus: prefixLoadingStatus, phonePrefixes } = usePhonePrefixes({ allowedCountries, loadingContext, handleError: props.onError });\n\n    const onChange = ({ data, valid, errors, isValid }) => {\n        props.onChange({ data, valid, errors, isValid });\n    };\n\n    return (\n        <LoadingWrapper status={prefixLoadingStatus}>\n            <div className=\"adyen-checkout__mb-way\">\n                <PhoneInputForm\n                    setComponentRef={props.setComponentRef}\n                    {...props}\n                    items={phonePrefixes}\n                    ref={phoneInputRef}\n                    onChange={onChange}\n                    data={props.data}\n                />\n\n                {props.showPayButton && props.payButton({ status, label: i18n.get('confirmPurchase') })}\n            </div>\n        </LoadingWrapper>\n    );\n}\n\nMBWayInput.defaultProps = {\n    onChange: () => {},\n    phoneNumberKey: 'mobileNumber',\n    phoneNumberErrorKey: 'mobileNumber.invalid'\n};\n\nexport default MBWayInput;\n","import { useLayoutEffect, useState } from 'preact/hooks';\nimport getDataset from '../../../core/Services/get-dataset';\nimport { DataSet } from '../../../core/Services/data-set';\nimport { PhonePrefixes } from './types';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\n\nfunction usePhonePrefixes({ allowedCountries, loadingContext, handleError }): PhonePrefixes {\n    const [loadingStatus, setLoadingStatus] = useState<string>('loading');\n    const [phonePrefixes, setPhonePrefixes] = useState<DataSet>([]);\n\n    useLayoutEffect(() => {\n        getDataset('phonenumbers', loadingContext)\n            .then(response => {\n                const countriesFilter = country => allowedCountries.includes(country.id);\n                const filteredCountries = allowedCountries.length ? response.filter(countriesFilter) : response;\n                const mappedCountries = filteredCountries.map(({ prefix, id }) => ({\n                    id: prefix,\n                    name: `${prefix} (${id})`,\n                    selectedOptionName: prefix\n                }));\n\n                setPhonePrefixes(mappedCountries || []);\n                setLoadingStatus('ready');\n            })\n            .catch(error => {\n                setPhonePrefixes([]);\n                setLoadingStatus('ready');\n                handleError?.(new AdyenCheckoutError('ERROR', error));\n            });\n    }, []);\n\n    return { phonePrefixes, loadingStatus };\n}\n\nexport default usePhonePrefixes;\n","export const COUNTDOWN_MINUTES = 15; // min\nexport const STATUS_INTERVAL = 2000; // ms\nexport const THROTTLE_TIME = 60000; // ms\nexport const THROTTLE_INTERVAL = 10000; // ms\n\nexport default {\n    STATUS_INTERVAL,\n    COUNTDOWN_MINUTES,\n    THROTTLE_TIME,\n    THROTTLE_INTERVAL,\n    type: 'mbway',\n    messageTextId: 'mbway.confirmPayment', // identifier for a translation string\n    awaitTextId: 'await.waitForConfirmation',\n    showCountdownTimer: false\n};\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport MBWayInput from './components/MBWayInput';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport config from './components/MBWayAwait/config';\nimport Await from '../../components/internal/Await';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\nimport { TxVariants } from '../tx-variants';\nimport { AwaitConfiguration } from '../internal/Await/types';\n\nexport class MBWayElement extends UIElement<AwaitConfiguration> {\n    public static type = TxVariants.mbway;\n\n    formatProps(props) {\n        const { data = {}, placeholders = {} } = props;\n\n        return {\n            ...props,\n            data: {\n                phoneNumber: data.telephoneNumber || data.phoneNumber,\n                phonePrefix: data.phonePrefix || '+351' // if not specified default to Portuguese country code\n            },\n            placeholders: {\n                phoneNumber: placeholders.telephoneNumber || placeholders.phoneNumber\n            }\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData(): object {\n        return {\n            paymentMethod: {\n                type: MBWayElement.type,\n                ...(this.state.data?.phoneNumber && { telephoneNumber: this.state.data.phonePrefix + this.state.data.phoneNumber })\n            }\n        };\n    }\n\n    get isValid(): boolean {\n        return !!this.state.isValid;\n    }\n\n    get displayName(): string {\n        return this.props.name;\n    }\n\n    render() {\n        if (this.props.paymentData) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                        <Await\n                            ref={ref => {\n                                this.componentRef = ref;\n                            }}\n                            clientKey={this.props.clientKey}\n                            paymentData={this.props.paymentData}\n                            onError={this.props.onError}\n                            onComplete={this.onComplete}\n                            brandLogo={this.icon}\n                            type={config.type}\n                            messageText={this.props.i18n.get(config.messageTextId)}\n                            awaitText={this.props.i18n.get(config.awaitTextId)}\n                            showCountdownTimer={config.showCountdownTimer}\n                            delay={config.STATUS_INTERVAL}\n                            countdownTime={config.COUNTDOWN_MINUTES}\n                            throttleTime={config.THROTTLE_TIME}\n                            throttleInterval={config.THROTTLE_INTERVAL}\n                            onActionHandled={this.onActionHandled}\n                        />\n                    </SRPanelProvider>\n                </CoreProvider>\n            );\n        }\n\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <MBWayInput\n                    /* @ts-ignore ref handled internally by Component */\n                    ref={ref => {\n                        this.componentRef = ref;\n                    }}\n                    {...this.props}\n                    setComponentRef={this.setComponentRef}\n                    onChange={this.setState}\n                    onSubmit={this.submit}\n                    payButton={this.payButton}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default MBWayElement;\n","import { ValidatorRules } from '../../../../utils/Validator/types';\n\nexport const vpaValidationRules: ValidatorRules = {\n    virtualPaymentAddress: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: '',\n        modes: ['blur']\n    },\n    default: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: '',\n        modes: ['blur']\n    }\n};\n","import { h } from 'preact';\nimport { useCallback, useEffect, useRef } from 'preact/hooks';\nimport { vpaValidationRules } from './validate';\nimport './VpaInput.scss';\nimport InputText from '../../../internal/FormFields/InputText';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport useForm from '../../../../utils/useForm';\nimport Field from '../../../internal/FormFields/Field';\n\nexport type OnChangeProps = { data: VpaInputDataState; valid; errors; isValid: boolean };\n\ninterface VpaInputProps {\n    data?: {};\n    disabled?: boolean;\n    onChange({ data, valid, errors, isValid }: OnChangeProps): void;\n    onSetInputHandlers(handlers: VpaInputHandlers): void;\n}\n\nexport interface VpaInputDataState {\n    virtualPaymentAddress?: string;\n}\n\nexport type VpaInputHandlers = {\n    validateInput(): void;\n};\n\nconst VpaInput = (props: VpaInputProps): h.JSX.Element => {\n    const { i18n } = useCoreContext();\n    const formSchema = ['virtualPaymentAddress'];\n    const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<VpaInputDataState>({\n        schema: formSchema,\n        defaultData: props.data,\n        rules: vpaValidationRules\n    });\n    const vpaInputHandlersRef = useRef<VpaInputHandlers>({ validateInput: null });\n\n    const validateInput = useCallback(() => {\n        triggerValidation();\n    }, [triggerValidation]);\n\n    useEffect(() => {\n        vpaInputHandlersRef.current.validateInput = validateInput;\n        props.onSetInputHandlers(vpaInputHandlersRef.current);\n    }, [validateInput, props.onSetInputHandlers]);\n\n    useEffect(() => {\n        props.onChange({ data, valid, errors, isValid });\n    }, [data, valid, errors, isValid]);\n\n    return (\n        <Field\n            label={i18n.get('upi.collect.field.label')}\n            errorMessage={!!errors.virtualPaymentAddress}\n            classNameModifiers={['vpa']}\n            name=\"virtualPaymentAddress\"\n        >\n            <InputText\n                name={'virtualPaymentAddress'}\n                autocorrect={'off'}\n                spellcheck={false}\n                disabled={props.disabled}\n                value={data.virtualPaymentAddress}\n                onInput={handleChangeFor('virtualPaymentAddress', 'input')}\n                onBlur={handleChangeFor('virtualPaymentAddress', 'blur')}\n                data-testid={'input-virtual-payment-address'}\n            />\n        </Field>\n    );\n};\n\nexport default VpaInput;\n","export const A11Y = {\n    ButtonId: {\n        VPA: 'upi-button-vpa',\n        QR: 'upi-button-qrCode',\n        INTENT: 'upi-button-intent'\n    },\n    AreaId: {\n        VPA: 'upi-area-vpa',\n        QR: 'upi-area-qrCode',\n        INTENT: 'upi-area-intent'\n    }\n};\n","import { h } from 'preact';\nimport cx from 'classnames';\nimport './SegmentedControl.scss';\n\n/**\n * It makes no sense of the aria tags to be responsibility of another component\n * The new interface makes it clear that id and control are required\n * While moving the expanded logic to within the SegmentedController\n * Both interfaces are compatible\n */\nexport interface OldSegmentedControlOption<T> {\n    label: string;\n    value: T;\n    htmlProps: {\n        id: string;\n        'aria-expanded': boolean;\n        'aria-controls': string;\n    };\n}\n\nexport interface NewSegmentedControlOption<T> {\n    label: string;\n    value: T;\n    id: string;\n    controls: string;\n    htmlProps?: {};\n}\n\ntype SegmentedControlOption<T> = NewSegmentedControlOption<T> | OldSegmentedControlOption<T>;\n\nexport type SegmentedControlOptions<T> = Array<SegmentedControlOption<T>>;\n\nexport interface SegmentedControlProps<T> {\n    classNameModifiers?: string[];\n    selectedValue: T;\n    disabled?: boolean;\n    options: SegmentedControlOptions<T>;\n    onChange(value: T, event: MouseEvent): void;\n}\n\n/**\n *\n * example:\n * <SegmentedControl\n *   onChange={(value) = setMode(value)}\n *   selectedValue={mode}\n *   disabled={status === 'loading'}\n *   classNameModifiers={['css-class']}\n *   options={segmentedControlOptions}\n * />\n *\n * @param classNameModifiers\n * @param selectedValue\n * @param disabled\n * @param options\n * @param onChange\n * @constructor\n */\nfunction SegmentedControl<T>({ classNameModifiers = [], selectedValue, disabled = false, options, onChange }: SegmentedControlProps<T>) {\n    if (!options || options.length === 0) {\n        return null;\n    }\n\n    return (\n        <div\n            className={cx(\n                'adyen-checkout__segmented-control',\n                { 'adyen-checkout__segmented-control--disabled': disabled },\n                ...classNameModifiers.map(modifier => `adyen-checkout__segmented-control--${modifier}`)\n            )}\n            role=\"group\"\n        >\n            {options.map(({ label, value, controls, htmlProps }: NewSegmentedControlOption<T>) => (\n                <button\n                    disabled={disabled}\n                    key={value}\n                    onClick={(event: MouseEvent) => onChange(value, event)}\n                    className={cx('adyen-checkout__segmented-control-segment', {\n                        'adyen-checkout__segmented-control-segment--selected': selectedValue === value\n                    })}\n                    aria-controls={controls}\n                    aria-expanded={selectedValue === value}\n                    type=\"button\"\n                    {...htmlProps}\n                >\n                    {selectedValue === value && <span className=\"adyen-checkout-checkmark\"></span>}\n                    {label}\n                </button>\n            ))}\n        </div>\n    );\n}\n\nexport default SegmentedControl;\n","import { h } from 'preact';\nimport Img from '../../../internal/Img';\nimport classNames from 'classnames';\n\ninterface PaymentMethodIconProps {\n    /** URL to the payment method icon */\n    src: string;\n\n    /** Alt description of payment method used of a11y */\n    altDescription: string;\n\n    /** Type of the payment method*/\n    type: string;\n\n    disabled?: boolean;\n}\n\nconst paymentMethodsWithoutBorder = ['googlepay', 'paywithgoogle'];\n\nconst PaymentMethodIcon = ({ src, altDescription, type, disabled = false }: PaymentMethodIconProps) => {\n    return (\n        <span\n            className={classNames('adyen-checkout__payment-method__image__wrapper', {\n                'adyen-checkout__payment-method__image__wrapper--outline': !paymentMethodsWithoutBorder.includes(type),\n                'adyen-checkout__payment-method__image__wrapper--disabled': !!disabled\n            })}\n        >\n            <Img className=\"adyen-checkout__payment-method__image\" src={src} alt={altDescription} />\n        </span>\n    );\n};\n\nexport default PaymentMethodIcon;\n","import classNames from 'classnames';\nimport { ComponentChildren, h } from 'preact';\nimport './ExpandButton.scss';\n\ninterface ExpandButton {\n    buttonId: string;\n    isSelected: boolean;\n    expandContentId: string;\n    children?: ComponentChildren;\n    showRadioButton?: boolean;\n    classNameModifiers?: string[];\n    standalone?: boolean;\n}\n\nfunction ExpandButton({\n    buttonId,\n    showRadioButton,\n    isSelected,\n    expandContentId,\n    children,\n    classNameModifiers = [],\n    standalone = false\n}: Readonly<ExpandButton>) {\n    // If we only have a single payment method we should use a div instead of toggable button\n    if (standalone) {\n        return (\n            <div className={classNames('adyen-checkout__payment-method__header__title', 'adyen-checkout__payment-method__header__title--standalone')}>\n                {children}\n            </div>\n        );\n    }\n\n    return (\n        // See discussion: https://github.com/w3c/aria/issues/1404\n        // this has been disabled as we got quite a few complains\n        // mainly from merchants running automated systems\n        <button\n            className={classNames(\n                'adyen-checkout__payment-method__header__title',\n                ...classNameModifiers.map(modifier => `adyen-checkout-expand-button--${modifier}`)\n            )}\n            id={buttonId}\n            role={'radio'}\n            aria-checked={isSelected}\n            //aria-expanded={isSelected} - disabled for now\n            aria-controls={expandContentId}\n            type=\"button\"\n        >\n            {showRadioButton && (\n                <span\n                    className={classNames({\n                        'adyen-checkout__payment-method__radio': true,\n                        'adyen-checkout__payment-method__radio--selected': isSelected\n                    })}\n                    aria-hidden=\"true\"\n                />\n            )}\n            {children}\n        </button>\n    );\n}\n\nexport default ExpandButton;\n","import { ComponentChildren, h } from 'preact';\nimport cx from 'classnames';\nimport { App } from '../../../types';\nimport PaymentMethodIcon from '../../../../Dropin/components/PaymentMethod/PaymentMethodIcon';\nimport ExpandButton from '../../../../internal/ExpandButton';\nimport './UPIIntentAppItem.scss';\n\ninterface UPIIntentAppItemProps {\n    app: App;\n    imgSrc: string;\n    isSelected: boolean;\n    onSelect?: Function;\n    children?: ComponentChildren;\n}\n\nconst UPIIntentAppItem = ({ app, imgSrc, isSelected, onSelect = () => {}, children }: UPIIntentAppItemProps): h.JSX.Element => {\n    const buttonId = `adyen-checkout-upi-app-item-button-${app.id}`;\n    const containerId = `adyen-checkout-upi-app-${app.id}`;\n    const handleAppSelected = (app: App) => {\n        onSelect(app);\n    };\n\n    return (\n        // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-noninteractive-element-interactions\n        <li\n            className={cx({\n                'adyen-checkout-upi-app-item': true,\n                'adyen-checkout-upi-app-item--selected': isSelected\n            })}\n            onClick={() => handleAppSelected(app)}\n        >\n            <div className=\"adyen-checkout-upi-app-item-header\">\n                <ExpandButton classNameModifiers={['upi-app-item']} buttonId={buttonId} isSelected={isSelected} expandContentId={containerId}>\n                    <PaymentMethodIcon src={imgSrc} altDescription={app.name} type={app.id}></PaymentMethodIcon>\n                    <label className=\"adyen-checkout-upi-app-item__label\" htmlFor={buttonId}>\n                        {app.name}\n                    </label>\n                </ExpandButton>\n            </div>\n            {isSelected && children && (\n                <div className=\"adyen-checkout-upi-app-item-details\" id={containerId}>\n                    {children}\n                </div>\n            )}\n        </li>\n    );\n};\n\nexport default UPIIntentAppItem;\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport { App } from '../../types';\nimport UPIIntentAppItem from './UPIIntentAppItem';\nimport VpaInput from '../VpaInput';\nimport { OnChangeProps, VpaInputHandlers } from '../VpaInput/VpaInput';\nimport useImage from '../../../../core/Context/useImage';\nimport './UPIIntentAppList.scss';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\n\ninterface UPIIntentAppListProps {\n    apps: Array<App>;\n    selectedAppId?: string;\n    disabled?: boolean;\n    onAppSelect?: Function;\n    onVpaInputChange?({ data, valid, errors, isValid }: OnChangeProps): void;\n    onSetInputHandlers?(handlers: VpaInputHandlers): void;\n}\n\nconst UPIIntentAppList = ({\n    apps,\n    selectedAppId,\n    disabled,\n    onAppSelect = () => {},\n    onVpaInputChange = () => {},\n    onSetInputHandlers = () => {}\n}: UPIIntentAppListProps): h.JSX.Element => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    return (\n        /* eslint-disable jsx-a11y/no-noninteractive-element-to-interactive-role */\n        <ul\n            className={classNames({\n                'adyen-checkout-upi-app-list': true,\n                'adyen-checkout-upi-app-list--loading': disabled\n            })}\n            role=\"radiogroup\"\n            aria-label={i18n.get('paymentMethodsList.aria.label')}\n            required\n        >\n            {apps.map(app => {\n                const key = `adyen-checkout-upi-app-item-${app.id}}`;\n                const isSelected = selectedAppId === app.id;\n\n                const showUpiCollectInput = app.id === 'vpa';\n                const imgName = showUpiCollectInput ? 'upi' : `upi/${app.id}`;\n                const imgSrc = getImage()(imgName.toLowerCase());\n\n                return (\n                    <UPIIntentAppItem key={key} app={app} imgSrc={imgSrc} isSelected={isSelected} onSelect={onAppSelect}>\n                        {showUpiCollectInput && <VpaInput disabled={disabled} onChange={onVpaInputChange} onSetInputHandlers={onSetInputHandlers} />}\n                    </UPIIntentAppItem>\n                );\n            })}\n        </ul>\n    );\n};\n\nexport default UPIIntentAppList;\n","import { Fragment, h, RefObject } from 'preact';\nimport { useCallback, useEffect, useState } from 'preact/hooks';\nimport { PayButtonFunctionProps, UIElementStatus } from '../../../types';\nimport VpaInput, { VpaInputHandlers } from '../VpaInput/VpaInput';\nimport { App, UpiMode } from '../../types';\nimport useImage from '../../../../core/Context/useImage';\nimport useUpiSegmentedControlOptions from './useUpiSegmentedControlOptions';\nimport { A11Y } from './constants';\nimport './UPIComponent.scss';\nimport SegmentedControl from '../../../internal/SegmentedControl';\nimport ContentSeparator from '../../../internal/ContentSeparator';\nimport UPIIntentAppList from '../UPIIntentAppList';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\n\ntype UpiData = { app?: App; virtualPaymentAddress?: string };\n\ntype OnChangeProps = { data: UpiData; valid; errors; isValid: boolean };\n\ninterface UPIComponentProps {\n    defaultMode: UpiMode;\n    showPayButton: boolean;\n    apps?: Array<App>;\n\n    ref?(ref: RefObject<typeof UPIComponent>): void;\n\n    payButton?(props: PayButtonFunctionProps): h.JSX.Element;\n\n    onChange({ data, valid, errors, isValid }: OnChangeProps): void;\n\n    onUpdateMode?(mode: UpiMode): void;\n}\n\nexport default function UPIComponent({ defaultMode, onChange, onUpdateMode, payButton, showPayButton, apps = [] }: UPIComponentProps): h.JSX.Element {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const [status, setStatus] = useState<UIElementStatus>('ready');\n    const [isValid, setIsValid] = useState<boolean>(defaultMode === 'qrCode');\n    const [mode, setMode] = useState<UpiMode>(defaultMode);\n    const [vpa, setVpa] = useState<string>('');\n    const [vpaInputHandlers, setVpaInputHandlers] = useState<VpaInputHandlers>(null);\n    const [selectedApp, setSelectedApp] = useState<App>(null);\n    const [valid, setValid] = useState(null);\n    const [errors, setErrors] = useState(null);\n    const segmentedControlOptions = useUpiSegmentedControlOptions(apps, mode);\n\n    this.setStatus = (status: UIElementStatus) => {\n        setStatus(status);\n    };\n\n    this.showValidation = () => {\n        vpaInputHandlers?.validateInput();\n    };\n\n    const onSetVpaInputHandlers = useCallback((handlers: VpaInputHandlers) => {\n        setVpaInputHandlers(handlers);\n    }, []);\n\n    const onChangeUpiMode = useCallback(\n        (newMode: UpiMode) => {\n            setMode(newMode);\n            onUpdateMode(newMode);\n        },\n        [onUpdateMode]\n    );\n\n    const handleAppSelect = useCallback(\n        (app: App) => {\n            if (app?.id === selectedApp?.id) return;\n\n            setSelectedApp(app);\n            setIsValid(true);\n        },\n        [selectedApp]\n    );\n\n    const handleVpaInputChange = useCallback(({ data: { virtualPaymentAddress }, errors, valid, isValid }: OnChangeProps) => {\n        setVpa(virtualPaymentAddress);\n        setErrors(errors);\n        setValid(valid);\n        setIsValid(isValid);\n    }, []);\n\n    useEffect(() => {\n        if (mode !== 'qrCode') {\n            onChange({\n                data: { ...(vpa && { virtualPaymentAddress: vpa }), ...(selectedApp && { app: selectedApp }) },\n                errors,\n                valid,\n                isValid\n            });\n        } else {\n            /**\n             * When selecting QR code mode, we need to clear the state data and trigger the 'onChange'.\n             */\n            onChange({ data: {}, valid: {}, errors: {}, isValid: true });\n        }\n    }, [vpa, selectedApp, errors, valid, isValid, mode]);\n\n    return (\n        <Fragment>\n            <p className=\"adyen-checkout_upi-mode-selection-text\">{i18n.get('upi.modeSelection')}</p>\n            <SegmentedControl\n                onChange={onChangeUpiMode}\n                selectedValue={mode}\n                disabled={status === 'loading'}\n                classNameModifiers={['upi-margin-bottom']}\n                options={segmentedControlOptions}\n            />\n            <ContentSeparator label={i18n.get('upi.completePayment')} />\n            {mode === 'intent' && (\n                <div id={A11Y.AreaId.INTENT} aria-labelledby={A11Y.ButtonId.INTENT} className=\"adyen-checkout-upi-area-intent\" role=\"region\">\n                    <UPIIntentAppList\n                        disabled={status === 'loading'}\n                        apps={apps}\n                        selectedAppId={selectedApp?.id}\n                        onAppSelect={handleAppSelect}\n                        onVpaInputChange={handleVpaInputChange}\n                        onSetInputHandlers={onSetVpaInputHandlers}\n                    />\n\n                    {showPayButton &&\n                        payButton({\n                            label: i18n.get('continue'),\n                            status,\n                            disabled: selectedApp == null\n                        })}\n                </div>\n            )}\n            {mode === 'vpa' && (\n                <div id={A11Y.AreaId.VPA} aria-labelledby={A11Y.ButtonId.VPA} className=\"adyen-checkout-upi-area-vpa\" role=\"region\">\n                    <VpaInput disabled={status === 'loading'} onChange={onChange} onSetInputHandlers={onSetVpaInputHandlers} />\n\n                    {showPayButton &&\n                        payButton({\n                            label: i18n.get('continue'),\n                            status\n                        })}\n                </div>\n            )}\n            {mode === 'qrCode' && (\n                <div id={A11Y.AreaId.QR} aria-labelledby={A11Y.ButtonId.QR} className=\"adyen-checkout-upi-area-qr-code\" role=\"region\">\n                    {showPayButton &&\n                        payButton({\n                            label: i18n.get('generateQRCode'),\n                            icon: getImage({ imageFolder: 'components/' })('qr'),\n                            status\n                        })}\n                </div>\n            )}\n        </Fragment>\n    );\n}\n","import { useMemo } from 'preact/hooks';\nimport { App, UpiMode } from '../../types';\nimport { A11Y } from './constants';\nimport isMobile from '../../../../utils/isMobile';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { OldSegmentedControlOption } from '../../../internal/SegmentedControl/SegmentedControl';\n\ninterface SegmentedControlOption extends OldSegmentedControlOption<UpiMode> {}\n\nfunction useUpiSegmentedControlOptions(apps: Array<App>, mode: UpiMode): Array<SegmentedControlOption> {\n    const { i18n } = useCoreContext();\n\n    return useMemo(() => {\n        const intentOption: SegmentedControlOption = {\n            label: i18n.get('upi.mode.payByAnyUpi'),\n            value: 'intent',\n            htmlProps: {\n                id: A11Y.ButtonId.INTENT,\n                'aria-expanded': mode === 'intent',\n                'aria-controls': A11Y.AreaId.INTENT\n            }\n        };\n        const vpaOption: SegmentedControlOption = {\n            label: i18n.get('upi.mode.enterUpiId'),\n            value: 'vpa',\n            htmlProps: {\n                id: A11Y.ButtonId.VPA,\n                'aria-expanded': mode === 'vpa',\n                'aria-controls': A11Y.AreaId.VPA\n            }\n        };\n        const qrOption: SegmentedControlOption = {\n            label: i18n.get('upi.mode.qrCode'),\n            value: 'qrCode',\n            htmlProps: {\n                id: A11Y.ButtonId.QR,\n                'aria-expanded': mode === 'qrCode',\n                'aria-controls': A11Y.AreaId.QR\n            }\n        };\n\n        const shouldShowUpiIntent = apps.length > 0;\n        const positionOfQrOption = isMobile() ? 1 : 0;\n        const segmentedControlOptions = new Array(2).fill(shouldShowUpiIntent ? intentOption : vpaOption);\n        segmentedControlOptions[positionOfQrOption] = qrOption;\n        return segmentedControlOptions;\n    }, [apps, mode]);\n}\n\nexport default useUpiSegmentedControlOptions;\n","import { h, RefObject } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport UPIComponent from './components/UPIComponent';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport Await from '../internal/Await';\nimport QRLoader from '../internal/QRLoader';\nimport { App, UPIConfiguration, UpiMode, UpiPaymentData, UpiType } from './types';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\nimport { TxVariants } from '../tx-variants';\nimport isMobile from '../../utils/isMobile';\nimport type { ICore } from '../../core/types';\n\n/**\n * For mobile:\n * We should show upi_collect or upi_intent depending on if `apps` are returned in /paymentMethods response\n * The upi_qr should always be on the second tab\n *\n * For non-mobile:\n * We should never show the upi_intent (ignore `apps` in /paymentMethods response)\n * The upi_qr should be on the first tab and the upi_collect should be on second tab\n */\n\nclass UPI extends UIElement<UPIConfiguration> {\n    public static type = TxVariants.upi;\n    public static txVariants = [TxVariants.upi, TxVariants.upi_qr, TxVariants.upi_collect, TxVariants.upi_intent];\n\n    private selectedMode: UpiMode;\n\n    constructor(checkout: ICore, props: UPIConfiguration) {\n        super(checkout, props);\n        this.selectedMode = this.props.defaultMode;\n    }\n\n    formatProps(props: UPIConfiguration) {\n        if (!isMobile()) {\n            return {\n                ...super.formatProps(props),\n                defaultMode: props?.defaultMode ?? 'qrCode',\n                // For large screen, ignore the apps\n                apps: []\n            };\n        }\n\n        const hasIntentApps = props.apps?.length > 0;\n        const fallbackDefaultMode = hasIntentApps ? 'intent' : 'vpa';\n        const allowedModes = [fallbackDefaultMode, 'qrCode'];\n        const upiCollectApp: App = {\n            id: 'vpa',\n            name: props.i18n.get('upi.collect.dropdown.label'),\n            type: TxVariants.upi_collect as UpiType\n        };\n        const apps = hasIntentApps ? [...props.apps.map(app => ({ ...app, type: TxVariants.upi_intent as UpiType })), upiCollectApp] : [];\n        return {\n            ...super.formatProps(props),\n            defaultMode: allowedModes.includes(props?.defaultMode) ? props.defaultMode : fallbackDefaultMode,\n            apps\n        };\n    }\n\n    public get isValid(): boolean {\n        return this.state.isValid;\n    }\n\n    public formatData(): UpiPaymentData {\n        const { virtualPaymentAddress, app } = this.state.data || {};\n\n        return {\n            paymentMethod: {\n                ...(this.paymentType && { type: this.paymentType }),\n                ...(this.paymentType === TxVariants.upi_collect && virtualPaymentAddress && { virtualPaymentAddress }),\n                ...(this.paymentType === TxVariants.upi_intent && app?.id && { appId: app.id })\n            }\n        };\n    }\n\n    get paymentType(): UpiType {\n        if (this.selectedMode === 'qrCode') {\n            return TxVariants.upi_qr;\n        }\n        if (this.selectedMode === 'vpa') {\n            return TxVariants.upi_collect;\n        }\n        return this.state.data?.app?.type;\n    }\n\n    private onUpdateMode = (mode: UpiMode): void => {\n        this.selectedMode = mode;\n    };\n\n    private renderContent(type: string, url: string, paymentMethodType: string): h.JSX.Element {\n        switch (type) {\n            case 'qrCode':\n                return (\n                    <QRLoader\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        {...this.props}\n                        qrCodeData={this.props.qrCodeData ? encodeURIComponent(this.props.qrCodeData) : null}\n                        type={TxVariants.upi_qr}\n                        brandLogo={this.props.brandLogo || this.icon}\n                        onComplete={this.onComplete}\n                        introduction={this.props.i18n.get('upi.qrCodeWaitingMessage')}\n                        countdownTime={5}\n                        onActionHandled={this.onActionHandled}\n                    />\n                );\n            case 'await':\n                return (\n                    <Await\n                        ref={ref => {\n                            this.componentRef = ref;\n                        }}\n                        url={url}\n                        type={paymentMethodType}\n                        showCountdownTimer\n                        shouldRedirectAutomatically\n                        countdownTime={5}\n                        clientKey={this.props.clientKey}\n                        paymentData={this.props.paymentData}\n                        onActionHandled={this.onActionHandled}\n                        onError={this.props.onError}\n                        messageText={this.props.i18n.get('upi.vpaWaitingMessage')}\n                        awaitText={this.props.i18n.get('await.waitForConfirmation')}\n                        onComplete={this.onComplete}\n                        brandLogo={this.icon}\n                    />\n                );\n            default:\n                return (\n                    <UPIComponent\n                        ref={(ref: RefObject<typeof UPIComponent>) => {\n                            this.componentRef = ref;\n                        }}\n                        payButton={this.payButton}\n                        onChange={this.setState}\n                        onUpdateMode={this.onUpdateMode}\n                        apps={this.props.apps}\n                        defaultMode={this.props.defaultMode}\n                        showPayButton={this.props.showPayButton}\n                    />\n                );\n        }\n    }\n\n    public render(): h.JSX.Element {\n        const { type, url, paymentMethodType } = this.props;\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <SRPanelProvider srPanel={this.props.modules.srPanel}>{this.renderContent(type, url, paymentMethodType)}</SRPanelProvider>\n            </CoreProvider>\n        );\n    }\n}\n\nexport default UPI;\n","import { ValidatorRules } from '../../utils/Validator/types';\nimport { isEmpty } from '../../utils/validator-utils';\nimport { email } from '../../utils/regex';\n\nexport const isEmailValid = value => {\n    if (isEmpty(value)) return null;\n    return value.length >= 6 && value.length <= 320 && email.test(value);\n};\n\nexport const isANCVNumber = text => /^\\d{11}$/.test(text);\n\nexport const ancvValidationRules: ValidatorRules = {\n    beneficiaryId: {\n        validate: value => isEmailValid(value) || isANCVNumber(value),\n        errorMessage: 'ancv.beneficiaryId.invalid',\n        modes: ['blur']\n    }\n};\n","import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport LoadingWrapper from '../../internal/LoadingWrapper';\nimport InputText from '../../internal/FormFields/InputText';\nimport Field from '../../internal/FormFields/Field';\nimport useForm from '../../../utils/useForm';\nimport { ancvValidationRules } from '../validate';\nimport { ANCVDataState } from '../types';\nimport { UIElementProps } from '../../internal/UIElement/types';\n\nexport interface ANCVInputProps extends UIElementProps {\n    ref?: any;\n    showPayButton: boolean;\n    onSubmit: () => void;\n}\n\ntype ANCVInputDataState = ANCVDataState;\n\nfunction ANCVInput({ showPayButton, payButton, onChange, onSubmit }: ANCVInputProps) {\n    const { i18n } = useCoreContext();\n\n    const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<ANCVInputDataState>({\n        schema: ['beneficiaryId'],\n        rules: ancvValidationRules\n    });\n\n    useEffect(() => {\n        // @ts-ignore TODO: Fix this. Preact component types should not inherit from UIElementProps.\n        onChange({ data, errors, valid, isValid }, this);\n    }, [data, valid, errors, isValid]);\n\n    const [status, setStatus] = useState<string>('ready');\n\n    this.setStatus = setStatus;\n    this.showValidation = triggerValidation;\n\n    return (\n        <LoadingWrapper>\n            <div className=\"adyen-checkout__ancv\">\n                <p className=\"adyen-checkout-form-instruction\">{i18n.get('ancv.form.instruction')}</p>\n                <Field\n                    errorMessage={!!errors.beneficiaryId && i18n.get(errors.beneficiaryId.errorMessage)}\n                    label={i18n.get('ancv.input.label')}\n                    isValid={valid.beneficiaryId}\n                    name={'beneficiaryId'}\n                >\n                    <InputText\n                        value={data.beneficiaryId}\n                        name={'beneficiaryId'}\n                        spellcheck={true}\n                        required={true}\n                        onInput={handleChangeFor('beneficiaryId', 'input')}\n                        onBlur={handleChangeFor('beneficiaryId', 'blur')}\n                    />\n                </Field>\n                {showPayButton && payButton({ status, label: i18n.get('confirmPurchase'), onClick: onSubmit })}\n            </div>\n        </LoadingWrapper>\n    );\n}\n\nANCVInput.defaultProps = {};\n\nexport default ANCVInput;\n","export const COUNTDOWN_MINUTES = 15; // min\nexport const THROTTLE_TIME = 60000; // ms\nexport const THROTTLE_INTERVAL = 10000; // ms\n\nexport default {\n    COUNTDOWN_MINUTES,\n    THROTTLE_TIME,\n    THROTTLE_INTERVAL,\n    showCountdownTimer: false\n};\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport ANCVInput from './components/ANCVInput';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport config from './components/ANCVAwait/config';\nimport Await from '../../components/internal/Await';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport PayButton from '../internal/PayButton';\nimport { ANCVConfiguration } from './types';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\n\nexport class ANCVElement extends UIElement<ANCVConfiguration> {\n    public static type = 'ancv';\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        return {\n            paymentMethod: {\n                type: ANCVElement.type,\n                beneficiaryId: this.state.data?.beneficiaryId\n            }\n        };\n    }\n\n    private onOrderRequest = data => {\n        if (this.props.onOrderRequest)\n            return new Promise((resolve, reject) => {\n                this.props.onOrderRequest(resolve, reject, data);\n            });\n\n        if (this.props.session) {\n            return this.props.session.createOrder();\n        }\n    };\n\n    /**\n     * Check if order exists, if it does Resolve.\n     * Otherwise createOrder and then Resolve.\n     */\n    public createOrder = (): Promise<void> => {\n        this.setStatus('loading');\n\n        // allow for multiple ANCV payments, follow giftcard logic and just use order if it exists\n        if (this.props.order) {\n            return Promise.resolve();\n        }\n\n        return this.onOrderRequest(this.data)\n            .then((order: { orderData: string; pspReference: string }) => {\n                const stateOrder = { order: { orderData: order.orderData, pspReference: order.pspReference } };\n                this.setState(stateOrder);\n                return Promise.resolve();\n            })\n            .catch(error => {\n                this.setStatus(error?.message || 'error');\n                if (this.props.onError) {\n                    if (error instanceof AdyenCheckoutError) {\n                        this.handleError(error);\n                    } else {\n                        this.handleError(new AdyenCheckoutError('ERROR', error));\n                    }\n                }\n            });\n    };\n\n    public submit() {\n        if (!this.isValid) {\n            this.showValidation();\n            return false;\n        }\n\n        this.createOrder()\n            .then(this.makePaymentsCall)\n            .then(sanitizeResponse)\n            .then(verifyPaymentDidNotFail)\n            .then(this.handleResponse)\n            .catch(this.handleFailedResult);\n    }\n\n    // Reimplement payButton similar to GiftCard to allow to set onClick\n    public payButton = props => {\n        return <PayButton {...props} />;\n    };\n\n    get isValid(): boolean {\n        return !!this.state.isValid;\n    }\n\n    get displayName(): string {\n        return this.props.name;\n    }\n\n    render() {\n        if (this.props.paymentData) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                        <Await\n                            ref={ref => {\n                                this.componentRef = ref;\n                            }}\n                            clientKey={this.props.clientKey}\n                            paymentData={this.props.paymentData}\n                            onError={this.props.onError}\n                            onComplete={this.onComplete}\n                            brandLogo={this.icon}\n                            type={this.constructor['type']}\n                            messageText={this.props.i18n.get('ancv.confirmPayment')}\n                            awaitText={this.props.i18n.get('await.waitForConfirmation')}\n                            showCountdownTimer={config.showCountdownTimer}\n                            throttleTime={config.THROTTLE_TIME}\n                            throttleInterval={config.THROTTLE_INTERVAL}\n                            onActionHandled={this.onActionHandled}\n                        />\n                    </SRPanelProvider>\n                </CoreProvider>\n            );\n        }\n\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <ANCVInput\n                    ref={ref => {\n                        this.componentRef = ref;\n                    }}\n                    {...this.props}\n                    onSubmit={this.submit}\n                    onChange={this.setState}\n                    payButton={this.payButton}\n                    showPayButton={this.props.showPayButton}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default ANCVElement;\n","import { h } from 'preact';\nimport Select from '../../internal/FormFields/Select';\nimport { SelectTargetObject } from '../../internal/FormFields/Select/types';\nimport Field from '../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Language from '../../../language';\nimport { createEnumChecker } from '../../../core/utils';\n\nexport enum PayToIdentifierEnum {\n    phone = 'phone',\n    email = 'email',\n    abn = 'abn',\n    orgid = 'orgid'\n}\n\nconst payToIdentifierEnumCheck = createEnumChecker(PayToIdentifierEnum);\n\nexport type PayToPayIDInputIdentifierValues = keyof typeof PayToIdentifierEnum;\n\ntype PayIdOptionsType = { id: PayToPayIDInputIdentifierValues; nameKey: string }[];\n\nexport const PAYID_IDENTIFIER_OPTIONS: PayIdOptionsType = [\n    {\n        id: PayToIdentifierEnum.phone,\n        nameKey: 'payto.payid.option.phone'\n    },\n    {\n        id: PayToIdentifierEnum.email,\n        nameKey: 'payto.payid.option.email'\n    },\n    {\n        id: PayToIdentifierEnum.abn,\n        nameKey: 'ABN'\n    },\n    {\n        id: PayToIdentifierEnum.orgid,\n        nameKey: 'payto.payid.option.orgid'\n    }\n];\n\ninterface IdentifierSelectorProps {\n    classNameModifiers?: string[];\n    selectedIdentifier: PayToPayIDInputIdentifierValues;\n    onSelectedIdentifier: (value: PayToPayIDInputIdentifierValues) => void;\n}\n\nconst loadI18nForOptions = (i18n: Language, options: PayIdOptionsType) =>\n    options.map(option => ({\n        id: option.id,\n        name: i18n.get(option.nameKey)\n    }));\n\nexport default function IdentifierSelector({ selectedIdentifier, onSelectedIdentifier, classNameModifiers }: IdentifierSelectorProps) {\n    const { i18n } = useCoreContext();\n\n    const hydratedOptions = loadI18nForOptions(i18n, PAYID_IDENTIFIER_OPTIONS);\n\n    const onChange = (e: { target: SelectTargetObject }) => {\n        const valueStr = e.target.value + '';\n\n        if (payToIdentifierEnumCheck(valueStr)) {\n            onSelectedIdentifier(valueStr);\n        }\n    };\n\n    return (\n        <Field\n            className={''}\n            name={'payid-identifier'}\n            useLabelElement={true}\n            label={i18n.get('payto.payid.label.identifier')}\n            showContextualElement={false}\n            classNameModifiers={classNameModifiers}\n        >\n            <Select filterable={false} items={hydratedOptions} selectedValue={selectedIdentifier} onChange={onChange} name={'payid-identifier'} />\n        </Field>\n    );\n}\n","import { GENERIC_OPTIONS } from './config';\nimport type { CoreConfiguration } from './types';\n\n/**\n * Filter properties in a global configuration object from an allow list (GENERIC_OPTIONS)\n * @param globalOptions -\n * @returns any\n */\nexport function processGlobalOptions(globalOptions) {\n    return Object.keys(globalOptions).reduce((r, e) => {\n        if (GENERIC_OPTIONS.includes(e)) r[e] = globalOptions[e];\n        return r;\n    }, {});\n}\n\n/**\n * Validates that there is no unknown property as part of the CoreConfiguration.\n * The validator makes sure to throw a lint error in case a property is added to CoreConfiguration, but it is not added here\n *\n * @param props - AdyenCheckout props\n */\nexport function assertConfigurationPropertiesAreValid(propsSetByMerchant: CoreConfiguration): void {\n    /** Helper that creates a function that validates the array contain ALL CoreConfiguration properties in it */\n    function createConfigurationKeysValidator<T>() {\n        const arrayOfAll =\n            <T>() =>\n            <U extends T[]>(array: U & ([T] extends [U[number]] ? unknown : 'Invalid')) =>\n                array;\n        const arrayWithAllKeys = arrayOfAll<T>();\n        return arrayWithAllKeys;\n    }\n\n    const validator = createConfigurationKeysValidator<keyof CoreConfiguration>();\n    const possibleFields = validator([\n        'session',\n        'environment',\n        '_environmentUrls',\n        'showPayButton',\n        'clientKey',\n        'locale',\n        'translations',\n        'paymentMethodsResponse',\n        'amount',\n        'secondaryAmount',\n        'countryCode',\n        'allowPaymentMethods',\n        'removePaymentMethods',\n        'srConfig',\n        'analytics',\n        'risk',\n        'order',\n        'exposeLibraryMetadata',\n        'beforeRedirect',\n        'beforeSubmit',\n        'onPaymentCompleted',\n        'onPaymentFailed',\n        'onSubmit',\n        'onAdditionalDetails',\n        'onActionHandled',\n        'onChange',\n        'onError',\n        'onBalanceCheck',\n        'onOrderRequest',\n        'onPaymentMethodsRequest',\n        'onOrderCancel',\n        'onOrderUpdated',\n        'loadingContext',\n        'onEnterKeyPressed',\n        'afterAdditionalDetails'\n    ]);\n\n    Object.keys(propsSetByMerchant).forEach((prop: keyof CoreConfiguration) => {\n        if (!possibleFields.includes(prop)) {\n            console.warn(\n                `AdyenCheckout - Configuration property \"${prop}\" is not a valid AdyenCheckout property. If it is a payment method configuration, make sure to pass it directly to the Component. If you are using Drop-in, make sure to pass it to \"paymentMethodsConfiguration\" object`\n            );\n        }\n    });\n}\n\n/**\n * TODO: Check if this is correct place\n * Type guard for enums, helpful to make sure strings keep enum value\n * Comes from this: https://github.com/microsoft/TypeScript/issues/30611#issuecomment-570773496\n * @param enumVariable\n */\nexport function createEnumChecker<T extends string, TEnumValue extends string>(enumVariable: { [key in T]: TEnumValue }) {\n    const enumValues = Object.values(enumVariable);\n    return (value: string): value is TEnumValue => enumValues.includes(value);\n}\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport PhoneInputFields from '../../internal/PhoneInput/PhoneInputFields';\nimport { Form } from '../../../utils/useForm/types';\nimport { PayIdFormData } from './PayIDInput';\nimport { getErrorMessage } from '../../../utils/getErrorMessage';\nimport { useCallback } from 'preact/hooks';\n\ninterface PayToPhoneProps {\n    form: Form<PayIdFormData>;\n    onChange: (value: string) => void;\n    data: any; // Data\n}\n\n// we have decided to hardcode phone prefix as it's going to be always +61 for now\nconst HARDCODED_USE_PHONE_PREFIXES = {\n    phonePrefixes: [\n        {\n            id: '+61',\n            name: '+61 (AU)',\n            selectedOptionName: '+61'\n        }\n    ]\n};\n\nexport default function PayToPhone({ form, onChange, data }: PayToPhoneProps) {\n    const { i18n } = useCoreContext();\n\n    const { phonePrefixes } = HARDCODED_USE_PHONE_PREFIXES;\n\n    const getError = useCallback((field: string) => getErrorMessage(i18n, form.errors[field]), [i18n, form]);\n\n    return (\n        <PhoneInputFields\n            phoneNumberKey={'mobileNumber'}\n            getError={getError}\n            items={phonePrefixes}\n            data={data}\n            onChange={onChange}\n            canSelectPrefix={false}\n            showNumber={true}\n            showPrefix={true}\n            form={form}\n        />\n    );\n}\n","import { ValidatorRule, ValidatorRules } from '../../../utils/Validator/types';\nimport { isEmpty } from '../../../utils/validator-utils';\nimport { ERROR_FIELD_INVALID, ERROR_FIELD_REQUIRED } from '../../../core/Errors/constants';\n\nconst abnRegex = /^((\\d{9})|(\\d{11}))$/;\n\nconst orgidRegex = /`^[!-@[-~][ -@[-~]{0,254}[!-@[-~]$`/;\n\nconst emailRegex =\n    /^(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?)$/;\n\n// full phone regex Phone: ^\\+[0-9]{1,3}-[1-9]{1,1}[0-9]{1,29}$\nconst phoneNumberRegex = /^[1-9]{1,1}[0-9]{1,29}$/;\n\nexport const validationFromRegex = (value: string, regex: RegExp, validationRule: ValidatorRule): boolean | null => {\n    // null is returned here for legacy reasons\n    // check comment on hasError() ValidatorRulesResult.ts:17\n    if (isEmpty(value)) {\n        validationRule.errorMessage = ERROR_FIELD_REQUIRED;\n        return null;\n    }\n    validationRule.errorMessage = ERROR_FIELD_INVALID;\n    return regex.test(value);\n};\n\nconst emailValidatorRule: ValidatorRule = {\n    validate: value => validationFromRegex(value, emailRegex, emailValidatorRule),\n    errorMessage: 'abn.invalid',\n    modes: ['blur']\n};\n\nconst abnValidatorRule: ValidatorRule = {\n    validate: value => validationFromRegex(value, abnRegex, abnValidatorRule),\n    errorMessage: 'abn.invalid',\n    modes: ['blur']\n};\n\nconst orgidValidatorRule: ValidatorRule = {\n    validate: value => validationFromRegex(value, orgidRegex, orgidValidatorRule),\n    errorMessage: 'orgid.invalid',\n    modes: ['blur']\n};\n\nexport const payIdValidationRules: ValidatorRules = {\n    default: {\n        validate: value => {\n            return value && value.length > 0;\n        },\n        errorMessage: ERROR_FIELD_REQUIRED,\n        modes: ['blur']\n    },\n    email: emailValidatorRule,\n    abn: abnValidatorRule,\n    orgid: orgidValidatorRule,\n    firstName: {\n        validate: value => (isEmpty(value) ? null : true), // valid, if there are chars other than spaces,\n        errorMessage: 'firstName.invalid',\n        modes: ['blur']\n    },\n    lastName: {\n        validate: value => (isEmpty(value) ? null : true),\n        errorMessage: 'lastName.invalid',\n        modes: ['blur']\n    },\n    phoneNumber: {\n        modes: ['blur'],\n        validate: value => {\n            return isEmpty(value) ? null : phoneNumberRegex.test(value);\n        },\n        errorMessage: 'mobileNumber.invalid'\n    },\n    phonePrefix: {\n        modes: ['blur'],\n        validate: phonePrefix => !!phonePrefix,\n        errorMessage: 'mobileNumber.invalid'\n    }\n};\n\n//original regex /^\\d{6}-[ -~]{1,28}$/\nconst bsbRegex = /^\\d{6}$/;\nconst bankAccountNumberRegex = /^[ -~]{1,28}$/;\n\nconst bsbValidatorRule: ValidatorRule = {\n    validate: value => validationFromRegex(value, bsbRegex, bsbValidatorRule),\n    errorMessage: 'bsb.invalid',\n    modes: ['blur']\n};\n\nconst bankAccountNumberValidatorRule: ValidatorRule = {\n    validate: value => validationFromRegex(value, bankAccountNumberRegex, bankAccountNumberValidatorRule),\n    errorMessage: 'bankAccountNumber.invalid',\n    modes: ['blur']\n};\n\nexport const bsbValidationRules: ValidatorRules = {\n    bsb: bsbValidatorRule,\n    bankAccountNumber: bankAccountNumberValidatorRule,\n    firstName: {\n        validate: value => (isEmpty(value) ? null : true), // valid, if there are chars other than spaces,\n        errorMessage: 'firstName.invalid',\n        modes: ['blur']\n    },\n    lastName: {\n        validate: value => (isEmpty(value) ? null : true),\n        errorMessage: 'lastName.invalid',\n        modes: ['blur']\n    }\n};\n","import { h, Fragment } from 'preact';\nimport Field from '../../internal/FormFields/Field';\nimport { getErrorMessage } from '../../../utils/getErrorMessage';\nimport InputText from '../../internal/FormFields/InputText';\nimport Language from '../../../language';\nimport { HandleChangeForModeType } from '../../../utils/useForm/types';\n\nexport interface PayToNameFieldsProps {\n    i18n: Language;\n    errors: {\n        [key: string]: any;\n    };\n    data: {\n        firstName: string;\n        lastName: string;\n    };\n    handleChangeFor: (key: string, mode?: HandleChangeForModeType) => (e: any) => void;\n    placeholders: {\n        firstName: string;\n        lastName: string;\n    };\n}\n\nexport default function PayToNameFields({ i18n, errors, data, handleChangeFor, placeholders }: PayToNameFieldsProps) {\n    return (\n        <Fragment>\n            <Field\n                label={i18n.get('payto.label.firstName')}\n                classNameModifiers={['col-50', 'firstName']}\n                errorMessage={getErrorMessage(i18n, errors.firstName, i18n.get('firstName'))}\n                name={'firstName'}\n                i18n={i18n}\n            >\n                <InputText\n                    name={'firstName'}\n                    value={data.firstName}\n                    classNameModifiers={['firstName']}\n                    onInput={handleChangeFor('firstName', 'input')}\n                    onBlur={handleChangeFor('firstName', 'input')}\n                    placeholder={placeholders?.firstName}\n                    spellCheck={false}\n                    required={true}\n                />\n            </Field>\n            <Field\n                label={i18n.get('payto.label.lastName')}\n                classNameModifiers={['col-50', 'lastName']}\n                errorMessage={getErrorMessage(i18n, errors.lastName, i18n.get('lastName'))}\n                name={'lastName'}\n                i18n={i18n}\n            >\n                <InputText\n                    name={'lastName'}\n                    value={data.lastName}\n                    classNameModifiers={['lastName']}\n                    onInput={handleChangeFor('lastName', 'input')}\n                    onBlur={handleChangeFor('lastName', 'blur')}\n                    placeholder={placeholders?.lastName}\n                    spellCheck={false}\n                    required={true}\n                />\n            </Field>\n        </Fragment>\n    );\n}\n","import { h } from 'preact';\nimport Fieldset from '../../internal/FormFields/Fieldset';\nimport IdentifierSelector, { PayToIdentifierEnum } from './IdentifierSelector';\nimport { useEffect, useRef } from 'preact/hooks';\nimport useForm from '../../../utils/useForm';\nimport PayToPhone from './PayToPhone';\nimport InputEmail from '../../internal/FormFields/InputEmail';\nimport { getErrorMessage } from '../../../utils/getErrorMessage';\nimport Field from '../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport InputText from '../../internal/FormFields/InputText';\nimport { payIdValidationRules } from './validate';\nimport './PayIDInput.scss';\nimport { phoneFormatters } from '../../internal/PhoneInput/validate';\nimport { ComponentMethodsRef, UIElementStatus } from '../../internal/UIElement/types';\nimport PayToNameFields from './PayToNameFields';\nimport { PayToPlaceholdersType } from '../types';\n\nexport interface PayIdFormData {\n    email: string;\n    phone: string;\n    abn: string;\n    orgid: string;\n    firstName: string;\n    lastName: string;\n    phoneNumber?: string;\n    phonePrefix?: string;\n    selectedIdentifier: PayToIdentifierEnum;\n}\n\nexport interface PayIDInputProps {\n    status: UIElementStatus;\n    setStatus: (status: UIElementStatus) => void;\n    defaultData: PayIdFormData;\n    placeholders: PayToPlaceholdersType;\n    onChange: (e) => void;\n    setComponentRef: (ref: ComponentMethodsRef) => void;\n}\n\nconst BASE_SCHEMA = ['selectedIdentifier', 'firstName', 'lastName'];\n\nconst IDENTIFIER_SCHEMA = {\n    [PayToIdentifierEnum.email]: ['email'],\n    [PayToIdentifierEnum.phone]: ['phoneNumber', 'phonePrefix'],\n    [PayToIdentifierEnum.abn]: ['abn'],\n    [PayToIdentifierEnum.orgid]: ['orgid']\n};\n\nexport default function PayIDInput({ setComponentRef, defaultData, placeholders, onChange, setStatus }: PayIDInputProps) {\n    const { i18n } = useCoreContext();\n\n    const form = useForm<PayIdFormData>({\n        schema: BASE_SCHEMA,\n        defaultData: { selectedIdentifier: PayToIdentifierEnum.phone, ...defaultData },\n        rules: payIdValidationRules,\n        formatters: phoneFormatters\n    });\n    const { handleChangeFor, triggerValidation, data, errors, valid, isValid, setSchema } = form;\n\n    // handle the changes of identifier, each identifier gets its own schema\n    useEffect(() => {\n        // get the correct schema for each identifier and merge it with the base\n        setSchema([...IDENTIFIER_SCHEMA[data.selectedIdentifier], ...BASE_SCHEMA]);\n    }, [data.selectedIdentifier]);\n\n    // standard onChange propagate to parent state\n    useEffect(() => {\n        onChange({ data, valid, errors, isValid });\n    }, [data, valid, errors, isValid]);\n\n    const payToRef = useRef<ComponentMethodsRef>({\n        setStatus: setStatus,\n        showValidation: triggerValidation\n    });\n\n    useEffect(() => {\n        setComponentRef(payToRef.current);\n    }, [setComponentRef]);\n\n    return (\n        <Fieldset classNameModifiers={['payto__payid_input']} label={'PayID'} description={'payto.payid.description'}>\n            <IdentifierSelector\n                classNameModifiers={['col-40']}\n                onSelectedIdentifier={handleChangeFor('selectedIdentifier')}\n                selectedIdentifier={data.selectedIdentifier}\n            />\n            {data.selectedIdentifier === PayToIdentifierEnum.phone && (\n                <PayToPhone onChange={handleChangeFor('phone', 'blur')} data={data} form={form} />\n            )}\n\n            {/* TODO probably worth refactoring this into  either re-usable components or builder */}\n            {data.selectedIdentifier === PayToIdentifierEnum.email && (\n                <Field\n                    label={i18n.get('shopperEmail')}\n                    classNameModifiers={['col-60', 'email']}\n                    errorMessage={getErrorMessage(i18n, errors.email, i18n.get('shopperEmail'))}\n                    dir={'ltr'}\n                    name={'email'}\n                    i18n={i18n}\n                >\n                    <InputEmail\n                        name={'email'}\n                        value={data.email}\n                        onInput={handleChangeFor('email', 'input')}\n                        onBlur={handleChangeFor('email', 'blur')}\n                        placeholder={placeholders?.email}\n                        required={true}\n                    />\n                </Field>\n            )}\n\n            {data.selectedIdentifier === PayToIdentifierEnum.abn && (\n                <Field\n                    label={i18n.get('ABN')}\n                    classNameModifiers={['col-60', 'abn']}\n                    errorMessage={getErrorMessage(i18n, errors.abn, i18n.get('ABN'))}\n                    name={'ABN'}\n                    i18n={i18n}\n                >\n                    <InputText\n                        name={'abn'}\n                        value={data.abn}\n                        onInput={handleChangeFor('abn', 'input')}\n                        onBlur={handleChangeFor('abn', 'blur')}\n                        placeholder={placeholders?.abn}\n                        required={true}\n                    />\n                </Field>\n            )}\n\n            {data.selectedIdentifier === PayToIdentifierEnum.orgid && (\n                <Field\n                    label={i18n.get('payto.payid.label.orgid')}\n                    classNameModifiers={['col-60', 'orgid']}\n                    errorMessage={getErrorMessage(i18n, errors.orgid, i18n.get('payto.payid.label.orgid'))}\n                    name={'orgid'}\n                    i18n={i18n}\n                >\n                    <InputText\n                        name={'orgid'}\n                        value={data.orgid}\n                        onInput={handleChangeFor('orgid', 'input')}\n                        onBlur={handleChangeFor('orgid', 'blur')}\n                        placeholder={placeholders?.orgid}\n                        required={true}\n                    />\n                </Field>\n            )}\n\n            <PayToNameFields i18n={i18n} data={data} handleChangeFor={handleChangeFor} errors={errors} placeholders={placeholders} />\n        </Fieldset>\n    );\n}\n","import { h } from 'preact';\nimport Fieldset from '../../internal/FormFields/Fieldset';\nimport { useEffect, useRef } from 'preact/hooks';\nimport useForm from '../../../utils/useForm';\nimport { getErrorMessage } from '../../../utils/getErrorMessage';\nimport Field from '../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport InputText from '../../internal/FormFields/InputText';\nimport { bsbValidationRules } from './validate';\nimport './PayIDInput.scss';\nimport { phoneFormatters } from '../../internal/PhoneInput/validate';\nimport { ComponentMethodsRef, UIElementStatus } from '../../internal/UIElement/types';\nimport PayToNameFields from './PayToNameFields';\nimport { PayToPlaceholdersType } from '../types';\n\nexport interface BSBFormData {\n    bsb: string;\n    bankAccountNumber: string;\n    firstName: string;\n    lastName: string;\n}\n\nexport interface BSBInputProps {\n    status: UIElementStatus;\n    setStatus: (status: UIElementStatus) => void;\n    defaultData: BSBFormData;\n    placeholders: PayToPlaceholdersType;\n    onChange: (e) => void;\n    setComponentRef: (ref: ComponentMethodsRef) => void;\n}\n\nconst BASE_SCHEMA = ['bankAccountNumber', 'bsb', 'firstName', 'lastName'];\n\nexport default function BSBInput({ setComponentRef, defaultData, placeholders, onChange, setStatus }: BSBInputProps) {\n    const { i18n } = useCoreContext();\n\n    const form = useForm<BSBFormData>({\n        schema: BASE_SCHEMA,\n        defaultData: defaultData,\n        rules: bsbValidationRules,\n        formatters: phoneFormatters\n    });\n    const { handleChangeFor, triggerValidation, data, errors, valid, isValid } = form;\n\n    // standard onChange propagate to parent state\n    useEffect(() => {\n        onChange({ data, valid, errors, isValid });\n    }, [data, valid, errors, isValid]);\n\n    const payToRef = useRef<ComponentMethodsRef>({\n        setStatus: setStatus,\n        showValidation: triggerValidation\n    });\n\n    useEffect(() => {\n        setComponentRef(payToRef.current);\n    }, [setComponentRef]);\n\n    return (\n        <Fieldset classNameModifiers={['payto__bsb_input']} label={'BSB'} description={'payto.bsb.description'}>\n            <Field\n                label={i18n.get('payto.bsb.label.bankAccountNumber')}\n                classNameModifiers={['col-60', 'bankAccountNumber']}\n                errorMessage={getErrorMessage(i18n, errors.bankAccountNumber, i18n.get('payto.bsb.label.bankAccountNumber'))}\n                name={'bankAccountNumber'}\n                i18n={i18n}\n            >\n                <InputText\n                    name={'bankAccountNumber'}\n                    value={data.bankAccountNumber}\n                    onInput={handleChangeFor('bankAccountNumber', 'input')}\n                    onBlur={handleChangeFor('bankAccountNumber', 'blur')}\n                    placeholder={placeholders?.bankAccountNumber}\n                    required={true}\n                />\n            </Field>\n\n            <Field\n                label={i18n.get('Bank State Branch')}\n                classNameModifiers={['col-40', 'bsb']}\n                errorMessage={getErrorMessage(i18n, errors.bsb, i18n.get('Bank State Branch'))}\n                name={'bsb'}\n                i18n={i18n}\n            >\n                <InputText\n                    name={'bsb'}\n                    value={data.bsb}\n                    onInput={handleChangeFor('bsb', 'input')}\n                    onBlur={handleChangeFor('bsb', 'blur')}\n                    placeholder={placeholders?.bsb}\n                    required={true}\n                />\n            </Field>\n\n            <PayToNameFields i18n={i18n} data={data} handleChangeFor={handleChangeFor} errors={errors} placeholders={placeholders} />\n        </Fieldset>\n    );\n}\n","import { h } from 'preact';\nimport SegmentedControl from '../../internal/SegmentedControl';\nimport { useMemo, useState } from 'preact/hooks';\nimport { SegmentedControlOptions } from '../../internal/SegmentedControl/SegmentedControl';\nimport PayIDInput from './PayIDInput';\nimport BSBInput from './BSBInput';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { ComponentMethodsRef, UIElementStatus } from '../../internal/UIElement/types';\nimport { PayToData, PayToPlaceholdersType } from '../types';\nimport { PayButtonProps } from '../../internal/PayButton/PayButton';\nimport classNames from 'classnames';\nimport './PayToComponent.scss';\n\nexport type PayToInputOption = 'payid-option' | 'bsb-option';\n\nexport type PayToComponentData = { selectedInput: PayToInputOption };\n\nexport interface PayToComponentProps {\n    showPayButton: boolean;\n    onChange: (e) => void;\n    setComponentRef: (ref: ComponentMethodsRef) => void;\n    data: PayToData;\n    placeholders: PayToPlaceholdersType;\n    payButton: (props: Partial<PayButtonProps>) => h.JSX.Element;\n}\n\nexport default function PayToComponent(props: PayToComponentProps) {\n    const { i18n } = useCoreContext();\n\n    const [status, setStatus] = useState<UIElementStatus>('ready');\n\n    const inputOptions: SegmentedControlOptions<PayToInputOption> = useMemo(\n        () => [\n            {\n                value: 'payid-option',\n                label: 'PayID',\n                id: 'payid-option',\n                controls: 'payid-input'\n            },\n            {\n                value: 'bsb-option',\n                label: i18n.get('payto.bsb.option.label'),\n                id: 'bsb-option',\n                controls: 'bsb-input'\n            }\n        ],\n        [i18n]\n    );\n\n    const defaultOption = inputOptions[0].value;\n    const [selectedInput, setSelectedInput] = useState<PayToInputOption>(defaultOption);\n\n    const onChange = ({ data, valid, errors, isValid }) => {\n        // merge selected input to as data, this keep the input layers untouched\n        props.onChange({ data: { selectedInput: selectedInput, ...data }, valid, errors, isValid });\n    };\n\n    return (\n        <div\n            className={classNames({\n                'adyen-checkout__payto-component': true,\n                'adyen-checkout__payto-component--loading': status === 'loading'\n            })}\n        >\n            <SegmentedControl selectedValue={selectedInput} options={inputOptions} onChange={setSelectedInput} />\n            {selectedInput === 'payid-option' && (\n                <PayIDInput\n                    status={status}\n                    setStatus={setStatus}\n                    setComponentRef={props.setComponentRef}\n                    onChange={onChange}\n                    defaultData={props.data}\n                    placeholders={props.placeholders}\n                />\n            )}\n            {selectedInput === 'bsb-option' && (\n                <BSBInput\n                    status={status}\n                    setStatus={setStatus}\n                    setComponentRef={props.setComponentRef}\n                    onChange={onChange}\n                    defaultData={props.data}\n                    placeholders={props.placeholders}\n                />\n            )}\n\n            {props.showPayButton && props.payButton({ status, label: i18n.get('continue') })}\n        </div>\n    );\n}\n","import { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { Timeline, TimelineWrapper } from '../../internal/Timeline';\nimport { h } from 'preact';\n\nexport const PayToInstructions = () => {\n    const { i18n } = useCoreContext();\n\n    const instructions = i18n.get('payto.instructions.steps').split('@');\n\n    return (\n        <TimelineWrapper>\n            <Timeline instructions={instructions} />\n        </TimelineWrapper>\n    );\n};\n","import DetailsTable from '../../internal/DetailsTable';\nimport { h } from 'preact';\nimport { MandateType } from '../types';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { DetailsTableData } from '../../internal/DetailsTable/DetailsTable';\nimport './MandateSummary.scss';\n\nexport interface MandateSummaryProps {\n    mandate: MandateType;\n    currencyCode: string;\n    payee?: string;\n}\n\n// this is the order the fields are going to be displayed in the UI\nconst orderedMandateTableFields = ['payee', 'remarks', 'amount', 'frequency', 'startsAt', 'endsAt'];\n\nexport default function MandateSummary({ mandate, currencyCode, payee }: MandateSummaryProps) {\n    const { i18n } = useCoreContext();\n    const tableFields: DetailsTableData = orderedMandateTableFields.map((key: keyof MandateType | 'payee') => {\n        // get the label for the key, like payto.mandate.amount.label, payto.mandate.frequency.label\n        const labelText = i18n.get(`payto.mandate.${key}.label`);\n        const amountValue = Number(mandate.amount);\n        switch (key) {\n            case 'amount': {\n                // it can be either show \"amount\" OR \"amount up to (max amount)\"\n                const formatedAmount = i18n.amount(amountValue, currencyCode);\n                if (mandate.amountRule === 'max') {\n                    return {\n                        label: labelText,\n                        value: i18n.get('payto.mandate.amount.max', { values: { amount: formatedAmount } })\n                    };\n                } else {\n                    return {\n                        label: labelText,\n                        value: i18n.amount(amountValue, currencyCode)\n                    };\n                }\n            }\n            case 'frequency': {\n                if (!mandate.count) {\n                    // if there's no count we just say 'adhoc'\n                    return {\n                        label: labelText,\n                        value: i18n.get(`payto.mandate.frequency.adhoc-no-count`)\n                    };\n                } else {\n                    // frequency can be: adhoc, daily, weekly, biWeekly, monthly, quarterly, halfYearly, yearly\n                    return {\n                        label: labelText,\n                        value: i18n.get(`payto.mandate.frequency.${mandate.frequency}`, { values: { count: mandate.count } })\n                    };\n                }\n            }\n            case 'remarks':\n                return {\n                    label: labelText,\n                    value: mandate.remarks\n                };\n            case 'startsAt':\n                return {\n                    label: labelText,\n                    value: i18n.date(mandate.startsAt)\n                };\n\n            case 'endsAt':\n                return {\n                    label: labelText,\n                    value: i18n.date(mandate.endsAt)\n                };\n\n            case 'payee':\n                return {\n                    label: labelText,\n                    value: payee\n                };\n        }\n    });\n\n    return <DetailsTable tableFields={tableFields}></DetailsTable>;\n}\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport Await from '../../components/internal/Await';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\nimport { TxVariants } from '../tx-variants';\nimport { PayToIdentifierEnum } from './components/IdentifierSelector';\nimport PayToComponent from './components/PayToComponent';\nimport { PayToInstructions } from './components/PayToInstructions';\nimport MandateSummary from './components/MandateSummary';\nimport { PayToConfiguration, PayToData } from './types';\nimport PayButton, { payAmountLabel } from '../internal/PayButton';\n\n/*\nAwait Config (previously in its own file)\n */\nconst COUNTDOWN_MINUTES = 15; // min\nconst THROTTLE_TIME = 60000; // ms\nconst THROTTLE_INTERVAL = 10000; // ms\n\nconst config = {\n    COUNTDOWN_MINUTES,\n    THROTTLE_TIME,\n    THROTTLE_INTERVAL,\n    showCountdownTimer: false\n};\n\nconst getAccountIdentifier = (state: PayToData) => {\n    // if it's BSB Input type merge bankAccount with BSB\n    if (state.selectedInput === 'bsb-option') {\n        return `${state.bsb}-${state.bankAccountNumber}`;\n    } else if (state.selectedInput === 'payid-option') {\n        // otherwise use the option in the dropdown\n        switch (state.selectedIdentifier) {\n            case PayToIdentifierEnum.email:\n                return state.email;\n            case PayToIdentifierEnum.abn:\n                return state.abn;\n            case PayToIdentifierEnum.orgid:\n                return state.orgid;\n            case PayToIdentifierEnum.phone:\n                // merge the phone prefix and number - see comment in ticket\n                return `${state.phonePrefix}-${state.phoneNumber}`;\n        }\n    }\n};\n/**\n *\n */\nexport class PayToElement extends UIElement<PayToConfiguration> {\n    public static readonly type = TxVariants.payto;\n\n    protected static defaultProps = {\n        placeholders: {}\n    };\n\n    formatProps(props) {\n        return {\n            ...props,\n            data: {\n                ...props.data,\n                phonePrefix: '+61' // hardcode +61\n            }\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        if (this.props.storedPaymentMethodId) {\n            return {\n                paymentMethod: {\n                    type: PayToElement.type,\n                    storedPaymentMethodId: this.props.storedPaymentMethodId\n                }\n            };\n        }\n\n        return {\n            paymentMethod: {\n                type: PayToElement.type,\n                shopperAccountIdentifier: getAccountIdentifier(this.state.data)\n            },\n            shopperName: {\n                firstName: this.state.data.firstName,\n                lastName: this.state.data.lastName\n            }\n        };\n    }\n\n    get isValid(): boolean {\n        if (this.props.storedPaymentMethodId) {\n            return true;\n        }\n\n        return !!this.state.isValid;\n    }\n\n    get displayName() {\n        if (this.props.storedPaymentMethodId && this.props.label) {\n            return this.props.label;\n        }\n        return this.props.name;\n    }\n\n    get additionalInfo() {\n        return this.props.storedPaymentMethodId ? this.props.name : '';\n    }\n\n    render() {\n        // Stored\n        if (this.props.storedPaymentMethodId) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    {this.props.showPayButton && (\n                        <PayButton\n                            {...this.props}\n                            classNameModifiers={['standalone']}\n                            amount={this.props.amount}\n                            label={payAmountLabel(this.props.i18n, this.props.amount)}\n                            onClick={this.submit}\n                        />\n                    )}\n                </CoreProvider>\n            );\n        }\n        // Await\n        if (this.props.paymentData) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                        <Await\n                            ref={ref => {\n                                this.componentRef = ref;\n                            }}\n                            amount={this.props.amount}\n                            showAmount={true}\n                            instructions={PayToInstructions}\n                            clientKey={this.props.clientKey}\n                            paymentData={this.props.paymentData}\n                            onError={this.props.onError}\n                            onComplete={this.onComplete}\n                            brandLogo={this.icon}\n                            type={this.constructor['type']}\n                            messageText={this.props.i18n.get('payto.confirmPayment')}\n                            awaitText={this.props.i18n.get('payto.await.waitForConfirmation')}\n                            showCountdownTimer={config.showCountdownTimer}\n                            throttleTime={config.THROTTLE_TIME}\n                            throttleInterval={config.THROTTLE_INTERVAL}\n                            onActionHandled={this.onActionHandled}\n                            endSlot={() =>\n                                !!this.props.mandate && (\n                                    <MandateSummary mandate={this.props.mandate} payee={this.props.payee} currencyCode={this.props.amount.currency} />\n                                )\n                            }\n                        />\n                    </SRPanelProvider>\n                </CoreProvider>\n            );\n        }\n        // Input\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <PayToComponent\n                    data={this.props.data}\n                    placeholders={this.props.placeholders}\n                    setComponentRef={this.setComponentRef}\n                    onChange={this.setState}\n                    payButton={this.payButton}\n                    showPayButton={this.props.showPayButton}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default PayToElement;\n","import { ComponentChildren, h } from 'preact';\nimport cx from 'classnames';\nimport './Alert.scss';\nimport Icon from '../Icon';\n\nconst ALERT_TYPES = ['error', 'warning', 'success'];\n\ninterface AlertProps {\n    children: ComponentChildren;\n    classNames?: string[];\n    icon?: string;\n    type?: (typeof ALERT_TYPES)[number];\n}\n\nexport default function Alert({ children, classNames = [], type = 'error', icon }: AlertProps) {\n    return (\n        <div className={cx('adyen-checkout__alert-message', `adyen-checkout__alert-message--${type}`, classNames)}>\n            {icon && <Icon className={'adyen-checkout__alert-message__icon'} type={icon} />}\n            {children}\n        </div>\n    );\n}\n","import { h } from 'preact';\nimport './GiftcardResult.scss';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { PaymentAmount } from '../../../types/global-types';\nimport { PayButtonProps } from '../../internal/PayButton/PayButton';\n\ninterface GiftcardResultProps {\n    amount: PaymentAmount;\n    balance: PaymentAmount;\n    transactionLimit: PaymentAmount;\n    status: string;\n    makePayment: () => void;\n    showPayButton: boolean;\n    payButton(props?: PayButtonProps): h.JSX.Element;\n}\n\nfunction GiftcardResult({ amount, balance, transactionLimit, status, makePayment, showPayButton, payButton }: GiftcardResultProps) {\n    const { i18n } = useCoreContext();\n    const transactionAmount = amount.value > transactionLimit?.value ? transactionLimit : amount;\n    const remainingBalance = balance?.value - transactionAmount?.value;\n\n    return (\n        <div className=\"adyen-checkout__giftcard-result\">\n            <ul className=\"adyen-checkout__giftcard-result__balance\">\n                <li className=\"adyen-checkout__giftcard-result__balance__item\">\n                    <span className=\"adyen-checkout__giftcard-result__balance__title\">{i18n.get('giftcardBalance')}</span>\n                    <span className=\"adyen-checkout__giftcard-result__balance__value adyen-checkout__giftcard-result__balance__value--amount\">\n                        {i18n.amount(balance.value, balance.currency)}\n                    </span>\n                </li>\n                {transactionLimit && transactionLimit.value && (\n                    <li className=\"adyen-checkout__giftcard-result__balance__item\">\n                        <span className=\"adyen-checkout__giftcard-result__balance__title adyen-checkout__giftcard-result__balance__title--transactionLimit\">\n                            {i18n.get('giftcardTransactionLimit', {\n                                values: { amount: i18n.amount(transactionLimit.value, transactionLimit.currency) }\n                            })}\n                        </span>\n                    </li>\n                )}\n            </ul>\n\n            {showPayButton &&\n                payButton({\n                    amount: transactionAmount,\n                    status: status,\n                    onClick: makePayment\n                })}\n\n            <p className=\"adyen-checkout__giftcard-result__remaining-balance\">\n                {i18n.get('partialPayment.remainingBalance', {\n                    values: { amount: i18n.amount(remainingBalance, balance.currency) }\n                })}\n            </p>\n        </div>\n    );\n}\n\nexport default GiftcardResult;\n","import DataSfSpan from '../../Card/components/CardInput/components/DataSfSpan';\nimport classNames from 'classnames';\nimport Field from '../../internal/FormFields/Field';\nimport { h } from 'preact';\nimport { GiftcardFieldProps } from './types';\nimport { alternativeLabelContent } from '../../Card/components/CardInput/components/FieldLabelAlternative';\n\nexport const GiftcardNumberField = ({ i18n, classNameModifiers, sfpState, getCardErrorMessage, focusedElement, setFocusOn }: GiftcardFieldProps) => {\n    return (\n        <Field\n            label={i18n.get('giftcard.cardNumber.label')}\n            classNameModifiers={['number', ...classNameModifiers]}\n            errorMessage={getCardErrorMessage(sfpState)}\n            focused={focusedElement === 'encryptedCardNumber'}\n            onFocusField={() => setFocusOn('encryptedCardNumber')}\n            dir={'ltr'}\n            name={'encryptedCardNumber'}\n            contextVisibleToScreenReader={false}\n            useLabelElement={false}\n            renderAlternativeToLabel={alternativeLabelContent}\n        >\n            <DataSfSpan\n                encryptedFieldType=\"encryptedCardNumber\"\n                data-info='{\"length\":\"15-32\", \"maskInterval\":4}'\n                className={classNames({\n                    'adyen-checkout__input': true,\n                    'adyen-checkout__input--large': true,\n                    'adyen-checkout__card__cardNumber__input': true,\n                    'adyen-checkout__input--error': getCardErrorMessage(sfpState),\n                    'adyen-checkout__input--focus': focusedElement === 'encryptedCardNumber'\n                })}\n            />\n        </Field>\n    );\n};\n","import DataSfSpan from '../../Card/components/CardInput/components/DataSfSpan';\nimport classNames from 'classnames';\nimport Field from '../../internal/FormFields/Field';\nimport { h } from 'preact';\nimport { GiftcardFieldProps } from './types';\nimport { alternativeLabelContent } from '../../Card/components/CardInput/components/FieldLabelAlternative';\n\nexport const GiftcardPinField = ({\n    i18n,\n    classNameModifiers,\n    sfpState,\n    focusedElement,\n    setFocusOn,\n    label = i18n.get('creditCard.pin.label')\n}: GiftcardFieldProps) => {\n    return (\n        <Field\n            label={label}\n            classNameModifiers={['pin', ...classNameModifiers]}\n            errorMessage={sfpState.errors.encryptedSecurityCode && i18n.get(sfpState.errors.encryptedSecurityCode)}\n            focused={focusedElement === 'encryptedSecurityCode'}\n            onFocusField={() => setFocusOn('encryptedSecurityCode')}\n            dir={'ltr'}\n            name={'encryptedSecurityCode'}\n            contextVisibleToScreenReader={false}\n            useLabelElement={false}\n            renderAlternativeToLabel={alternativeLabelContent}\n        >\n            <DataSfSpan\n                encryptedFieldType=\"encryptedSecurityCode\"\n                data-info='{\"length\":\"3-10\", \"maskInterval\": 0}'\n                className={classNames({\n                    'adyen-checkout__input': true,\n                    'adyen-checkout__input--large': true,\n                    'adyen-checkout__card__cvc__input': true,\n                    'adyen-checkout__input--error': sfpState.errors.encryptedSecurityCode,\n                    'adyen-checkout__input--focus': focusedElement === 'encryptedSecurityCode'\n                })}\n            />\n        </Field>\n    );\n};\n","import { Component, FunctionComponent, h } from 'preact';\nimport SecuredFieldsProvider from '../../internal/SecuredFields/SFP/SecuredFieldsProvider';\nimport Alert from '../../internal/Alert';\nimport GiftcardResult from './GiftcardResult';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { PaymentAmount } from '../../../types/global-types';\nimport { GIFT_CARD } from '../../internal/SecuredFields/lib/constants';\nimport { GiftCardFields } from './GiftcardFields';\nimport { GiftcardFieldsProps, Placeholders } from './types';\n\ninterface GiftcardComponentProps {\n    onChange: (state) => void;\n    onFocus: (event) => void;\n    onBlur: (event) => void;\n\n    makeBalanceCheck: (event) => void;\n    makePayment: (event) => void;\n\n    amount?: PaymentAmount;\n    showPayButton: boolean;\n    payButton: (config) => any;\n\n    pinRequired: boolean;\n    expiryDateRequired?: boolean;\n    fieldsLayoutComponent: FunctionComponent<GiftcardFieldsProps>;\n    placeholders?: Placeholders;\n    handleKeyPress?: (o: KeyboardEvent) => void;\n}\n\nclass Giftcard extends Component<GiftcardComponentProps> {\n    public state = {\n        status: 'ready',\n        data: {},\n        balance: null,\n        transactionLimit: null,\n        focusedElement: false,\n        isValid: false\n    };\n\n    public static defaultProps = {\n        pinRequired: true,\n        expiryDateRequired: false,\n        onChange: () => {},\n        onFocus: () => {},\n        onBlur: () => {},\n        fieldsLayoutComponent: GiftCardFields\n    };\n\n    public sfp;\n\n    public onChange = sfpState => {\n        this.props.onChange({\n            data: sfpState.data,\n            isValid: sfpState.isSfpValid\n        });\n    };\n\n    public showValidation = () => {\n        this.sfp.showValidation();\n    };\n\n    setStatus(status) {\n        this.setState({ status });\n    }\n\n    public handleFocus = e => {\n        this.setState({ focusedElement: e.currentFocusObject });\n\n        const isFocused = e.focus === true;\n        if (isFocused) {\n            this.props.onFocus(e);\n        } else {\n            this.props.onBlur(e);\n        }\n    };\n\n    public setBalance = ({ balance, transactionLimit }) => {\n        this.setState({ balance, transactionLimit });\n    };\n\n    render(props, { focusedElement, balance, transactionLimit }) {\n        const { i18n } = useCoreContext();\n\n        const transactionAmount = transactionLimit?.value < balance?.value ? transactionLimit : balance;\n        const hasEnoughBalance = transactionAmount?.value >= this.props.amount?.value;\n\n        if (transactionAmount && hasEnoughBalance) {\n            return (\n                <GiftcardResult\n                    amount={this.props.amount}\n                    balance={balance}\n                    transactionLimit={transactionLimit}\n                    makePayment={props.makePayment}\n                    status={this.state.status}\n                    showPayButton={this.props.showPayButton}\n                    payButton={this.props.payButton}\n                />\n            );\n        }\n\n        const getCardErrorMessage = sfpState => {\n            if (sfpState.errors.encryptedCardNumber) return i18n.get(sfpState.errors.encryptedCardNumber);\n\n            switch (this.state.status) {\n                case 'no-balance':\n                    return i18n.get('error.giftcard.no-balance');\n                case 'card-error':\n                    return i18n.get('error.giftcard.card-error');\n                case 'currency-error':\n                    return i18n.get('error.giftcard.currency-error');\n                default:\n                    return null;\n            }\n        };\n\n        return (\n            <div className=\"adyen-checkout__giftcard\">\n                {this.state.status === 'error' && <Alert icon={'cross'}>{i18n.get('error.message.unknown')}</Alert>}\n\n                <SecuredFieldsProvider\n                    {...this.props}\n                    ref={ref => {\n                        this.sfp = ref;\n                    }}\n                    onChange={this.onChange}\n                    onFocus={this.handleFocus}\n                    type={GIFT_CARD}\n                    render={({ setRootNode, setFocusOn }, sfpState) =>\n                        this.props.fieldsLayoutComponent({\n                            i18n: i18n,\n                            pinRequired: this.props.pinRequired,\n                            focusedElement: focusedElement,\n                            getCardErrorMessage: getCardErrorMessage,\n                            setRootNode: setRootNode,\n                            setFocusOn: setFocusOn,\n                            sfpState: sfpState\n                        })\n                    }\n                />\n\n                {this.props.showPayButton &&\n                    this.props.payButton({\n                        status: this.state.status,\n                        onClick: this.props.makeBalanceCheck,\n                        label: i18n.get('applyGiftcard')\n                    })}\n            </div>\n        );\n    }\n}\n\nexport default Giftcard;\n","import { h } from 'preact';\nimport { GiftcardNumberField } from './GiftcardNumberField';\nimport { GiftcardPinField } from './GiftcardPinField';\nimport { GiftcardFieldsProps } from './types';\n\nexport const GiftCardFields = (props: GiftcardFieldsProps) => {\n    const { setRootNode, pinRequired } = props;\n    return (\n        <div ref={setRootNode} className=\"adyen-checkout__field-wrapper\">\n            <GiftcardNumberField {...props} classNameModifiers={pinRequired ? ['70'] : ['100']} />\n\n            {pinRequired && <GiftcardPinField {...props} classNameModifiers={['30']} />}\n        </div>\n    );\n};\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport GiftcardComponent from './components/GiftcardComponent';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport PayButton from '../internal/PayButton';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { PaymentAmount } from '../../types/global-types';\nimport { GiftCardElementData, GiftCardConfiguration, balanceCheckResponseType } from './types';\nimport { TxVariants } from '../tx-variants';\n\nexport class GiftcardElement extends UIElement<GiftCardConfiguration> {\n    public static type = TxVariants.giftcard;\n\n    protected static defaultProps = {\n        brandsConfiguration: {}\n    };\n\n    formatProps(props) {\n        return {\n            ...props?.configuration,\n            ...props\n        };\n    }\n\n    formatData(): GiftCardElementData {\n        return {\n            paymentMethod: {\n                type: this.constructor['type'],\n                brand: this.props.brand,\n                encryptedCardNumber: this.state.data?.encryptedCardNumber,\n                encryptedSecurityCode: this.state.data?.encryptedSecurityCode\n            }\n        };\n    }\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    get icon() {\n        return this.props.brandsConfiguration[this.props.brand]?.icon || this.props.icon || this.resources.getImage()(this.props.brand);\n    }\n\n    get displayName() {\n        return this.props.brandsConfiguration[this.props.brand]?.name || this.props.name;\n    }\n\n    private handleBalanceCheck = (data: GiftCardElementData): Promise<balanceCheckResponseType> => {\n        if (this.props.onBalanceCheck) {\n            return new Promise((resolve, reject) => {\n                void this.props.onBalanceCheck(resolve, reject, data);\n            });\n        }\n\n        if (this.props.session) {\n            return this.props.session.checkBalance(data);\n        }\n    };\n\n    private onOrderRequest = data => {\n        if (this.props.onOrderRequest)\n            return new Promise((resolve, reject) => {\n                void this.props.onOrderRequest(resolve, reject, data);\n            });\n        if (this.props.session) {\n            return this.props.session.createOrder();\n        }\n    };\n\n    public balanceCheck() {\n        return this.onBalanceCheck();\n    }\n\n    private onBalanceCheck = (): void => {\n        // skip balance check if no onBalanceCheck event has been defined\n        const hasBalanceCheck = this.props.session || this.props.onBalanceCheck;\n        if (!hasBalanceCheck) return super.submit();\n\n        this.setStatus('loading');\n\n        this.handleBalanceCheck(this.formatData())\n            .then(({ balance, transactionLimit = {} as PaymentAmount }) => {\n                if (!balance) throw new Error('card-error'); // card doesn't exist\n                if (balance?.currency !== this.props.amount?.currency) throw new Error('currency-error');\n                if (balance?.value <= 0) throw new Error('no-balance');\n\n                if (this.props.amount.value > balance.value || this.props.amount.value > transactionLimit.value) {\n                    if (this.props.order) {\n                        return this.makeSubmitCall();\n                    }\n\n                    return this.onOrderRequest(this.data).then((order: { orderData: string; pspReference: string }) => {\n                        this.setState({ order: { orderData: order.orderData, pspReference: order.pspReference } });\n                        return this.makeSubmitCall();\n                    });\n                } else {\n                    return this.handleOnRequiringConfirmation(balance, transactionLimit);\n                }\n            })\n            .catch(error => {\n                this.setStatus(error?.message || 'error');\n                if (this.props.onError) {\n                    if (error instanceof AdyenCheckoutError) {\n                        this.handleError(error);\n                    } else {\n                        this.handleError(new AdyenCheckoutError('ERROR', error));\n                    }\n                }\n            });\n    };\n\n    /**\n     * Check if it should call onRequiringConfirmation\n     */\n    private handleOnRequiringConfirmation = (balance, transactionLimit): Promise<any> => {\n        this.componentRef.setBalance({ balance, transactionLimit });\n        this.setStatus('ready');\n\n        // 1. if we show pay button we don't need to ask for confirmation\n        if (this.props.showPayButton) {\n            return;\n        }\n        // 2. there's no callback, we throw error\n        if (!this.props.onRequiringConfirmation) {\n            throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'onRequiringConfirmation must be provided');\n        }\n        // 3. success case if in case of custom pay button\n        return (\n            new Promise<void>((resolve, reject) => {\n                void this.props.onRequiringConfirmation(resolve, reject);\n            })\n                //when this resolve passed to onRequiringConfirmation gets resolved make payments call\n                .then(() => this.makeSubmitCall())\n                //when it gets rejected handle cancellation\n                .catch(() => {})\n        );\n    };\n\n    public submit() {\n        // for simplicity of the merchant we always only expose .submit()\n        // however to make the actual payment call we call makeSubmitCall\n        if (!this.isValid) {\n            this.showValidation();\n            return false;\n        }\n\n        this.balanceCheck();\n    }\n\n    // this makes the payment, as .submit is used by the merchant to trigger the payButton action\n    private makeSubmitCall() {\n        super.submit();\n    }\n\n    // Giftcards override the regular payButton flow\n    public payButton = props => {\n        return <PayButton {...props} />;\n    };\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <GiftcardComponent\n                    ref={ref => {\n                        this.componentRef = ref;\n                    }}\n                    {...this.props}\n                    handleKeyPress={this.handleKeyPress}\n                    showPayButton={this.props.showPayButton}\n                    onChange={this.setState}\n                    makeBalanceCheck={() => this.onBalanceCheck()}\n                    makePayment={() => this.makeSubmitCall()}\n                    payButton={this.payButton}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default GiftcardElement;\n","import DataSfSpan from '../../Card/components/CardInput/components/DataSfSpan';\nimport classNames from 'classnames';\nimport Field from '../../internal/FormFields/Field';\nimport { h } from 'preact';\nimport { GiftcardFieldProps } from '../../Giftcard/components/types';\nimport { alternativeLabelContent } from '../../Card/components/CardInput/components/FieldLabelAlternative';\n\nexport const MealVoucherExpiryField = ({ i18n, sfpState, focusedElement, setFocusOn }: GiftcardFieldProps) => {\n    return (\n        <Field\n            label={i18n.get('giftcard.expiryDate.label')}\n            classNameModifiers={['expireDate', '50']}\n            errorMessage={sfpState.errors.encryptedExpiryDate && i18n.get(sfpState.errors.encryptedExpiryDate)}\n            focused={focusedElement === 'encryptedExpiryDate'}\n            onFocusField={() => setFocusOn('encryptedExpiryDate')}\n            dir={'ltr'}\n            name={'encryptedExpiryDate'}\n            contextVisibleToScreenReader={false}\n            useLabelElement={false}\n            renderAlternativeToLabel={alternativeLabelContent}\n        >\n            <DataSfSpan\n                encryptedFieldType={'encryptedExpiryDate'}\n                className={classNames('adyen-checkout__input', 'adyen-checkout__input--small', 'adyen-checkout__card__exp-date__input', {\n                    'adyen-checkout__input--error': sfpState.errors.encryptedExpiryDate,\n                    'adyen-checkout__input--focus': focusedElement === 'encryptedExpiryDate',\n                    'adyen-checkout__input--valid': !!sfpState.valid.encryptedExpiryMonth && !!sfpState.valid.encryptedExpiryYear\n                })}\n            />\n        </Field>\n    );\n};\n","import { h } from 'preact';\nimport { MealVoucherExpiryField } from './MealVoucherExpiryField';\nimport { GiftcardFieldsProps } from '../../Giftcard/components/types';\nimport { GiftcardPinField } from '../../Giftcard/components/GiftcardPinField';\nimport { GiftcardNumberField } from '../../Giftcard/components/GiftcardNumberField';\n\nexport const MealVoucherFields = (props: GiftcardFieldsProps) => {\n    const { setRootNode } = props;\n    const pinFieldProps = { ...props, label: props.i18n.get('creditCard.securityCode.label') };\n    return (\n        <div ref={setRootNode}>\n            <GiftcardNumberField {...props} classNameModifiers={['100']} />\n\n            <div className=\"adyen-checkout__field-wrapper\">\n                <MealVoucherExpiryField {...props} />\n\n                <GiftcardPinField {...pinFieldProps} classNameModifiers={['50']} />\n            </div>\n        </div>\n    );\n};\n","import GiftcardElement from '../Giftcard/Giftcard';\nimport { MealVoucherFields } from './components/MealVoucherFields';\nimport { TxVariants } from '../tx-variants';\nimport { GiftCardConfiguration } from '../Giftcard/types';\nimport type { ICore } from '../../core/types';\n\nexport class MealVoucherFRElement extends GiftcardElement {\n    public static type = TxVariants.mealVoucher_FR;\n    public static txVariants = [\n        TxVariants.mealVoucher_FR,\n        TxVariants.mealVoucher_FR_natixis,\n        TxVariants.mealVoucher_FR_sodexo,\n        TxVariants.mealVoucher_FR_groupeup\n    ];\n\n    constructor(checkout: ICore, props?: GiftCardConfiguration) {\n        super(checkout, {\n            ...props,\n            pinRequired: true,\n            expiryDateRequired: true,\n            fieldsLayoutComponent: MealVoucherFields\n        });\n    }\n\n    formatProps(props) {\n        return {\n            brand: props.type,\n            ...props\n        };\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        return {\n            paymentMethod: {\n                type: this.constructor['type'],\n                brand: this.props.brand,\n                encryptedCardNumber: this.state.data?.encryptedCardNumber,\n                encryptedSecurityCode: this.state.data?.encryptedSecurityCode,\n                encryptedExpiryMonth: this.state.data?.encryptedExpiryMonth,\n                encryptedExpiryYear: this.state.data?.encryptedExpiryYear\n            }\n        };\n    }\n}\n\nexport default MealVoucherFRElement;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport Address from '../internal/Address';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { TxVariants } from '../tx-variants';\n\nexport class AddressElement extends UIElement {\n    public static type = TxVariants.address;\n\n    get data() {\n        return this.state.data;\n    }\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <Address\n                    setComponentRef={this.setComponentRef}\n                    {...this.props}\n                    onChange={this.setState}\n                    {...(process.env.NODE_ENV !== 'production' && { payButton: this.payButton })}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default AddressElement;\n","import { h } from 'preact';\nimport Voucher from '../../../internal/Voucher';\n\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport useImage from '../../../../core/Context/useImage';\nimport { extractCommonPropsForVoucher } from '../../../internal/Voucher/utils';\n\nexport default function BankTransferResult(props) {\n    const { reference } = props;\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    return (\n        <Voucher\n            {...extractCommonPropsForVoucher({ props, i18n, introKey: 'bankTransfer.instructions', getImage: getImage() })}\n            reference={''} // Overwrite the passed reference, so it is not displayed in its own section (since it is already part of the voucherDetails)\n            voucherDetails={[\n                { label: i18n.get('bankTransfer.beneficiary'), value: props.beneficiary },\n                { label: i18n.get('bankTransfer.iban'), value: props.iban },\n                { label: i18n.get('bankTransfer.bic'), value: props.bic },\n                { label: i18n.get('bankTransfer.reference'), value: reference }\n            ]}\n        />\n    );\n}\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport './BankTransferInput.scss';\nimport SendCopyToEmail from '../../../internal/SendCopyToEmail/SendCopyToEmail';\nimport { useEffect, useState } from 'preact/hooks';\nimport useForm from '../../../../utils/useForm';\nimport { BankTransferSchema } from '../../types';\nimport { validationRules } from '../../../../utils/Validator/defaultRules';\n\nfunction BankTransferInput(props) {\n    const { i18n } = useCoreContext();\n    const [showingEmail, setShowingEmail] = useState(false);\n\n    const { handleChangeFor, triggerValidation, data, valid, errors, isValid, setSchema } = useForm<BankTransferSchema>({\n        schema: [],\n        defaultData: props.data,\n        rules: {\n            shopperEmail: validationRules.emailRule\n        }\n    });\n\n    const toggleEmailField = () => setShowingEmail(!showingEmail);\n\n    useEffect(() => {\n        const newSchema = showingEmail ? ['shopperEmail'] : [];\n        setSchema(newSchema);\n    }, [showingEmail]);\n\n    this.showValidation = triggerValidation;\n\n    useEffect(() => {\n        props.onChange({ data, errors, valid, isValid });\n    }, [data, valid, errors, showingEmail, isValid]);\n\n    return (\n        <div className=\"adyen-checkout__bankTransfer\">\n            <p className=\"adyen-checkout__bankTransfer__introduction\">{i18n.get('bankTransfer.introduction')}</p>\n            <SendCopyToEmail\n                classNames={'adyen-checkout__bankTransfer__emailField'}\n                value={data.shopperEmail}\n                errors={errors.shopperEmail}\n                onToggle={toggleEmailField}\n                onInput={handleChangeFor('shopperEmail', 'input')}\n                onBlur={handleChangeFor('shopperEmail', 'blur')}\n            />\n        </div>\n    );\n}\n\nexport default BankTransferInput;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport RedirectButton from '../internal/RedirectButton';\nimport { BankTransferConfiguration, BankTransferState } from './types';\nimport BankTransferResult from './components/BankTransferResult';\nimport BankTransferInput from './components/BankTransferInput';\nimport { TxVariants } from '../tx-variants';\n\nexport class BankTransferElement extends UIElement<BankTransferConfiguration> {\n    public static type = TxVariants.bankTransfer_IBAN;\n\n    public static defaultProps = {\n        showEmailAddress: true\n    };\n\n    // @ts-ignore Double check why state extends all props\n    public state: BankTransferState = {\n        isValid: !this.props.showEmailAddress,\n        data: {}\n    };\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    /**\n     * Formats the component data output\n     */\n    formatData() {\n        const { shopperEmail } = this.state.data;\n\n        return {\n            paymentMethod: {\n                type: BankTransferElement.type\n            },\n            ...(shopperEmail && { shopperEmail })\n        };\n    }\n\n    private handleRef = ref => {\n        this.componentRef = ref;\n    };\n\n    render() {\n        if (this.props.reference) {\n            return (\n                <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                    <BankTransferResult ref={this.handleRef} {...this.props} onActionHandled={this.onActionHandled} />\n                </CoreProvider>\n            );\n        }\n\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {this.props.showEmailAddress && <BankTransferInput ref={this.handleRef} {...this.props} onChange={this.setState} />}\n                <RedirectButton\n                    {...this.props}\n                    showPayButton={this.props.showPayButton}\n                    name={this.displayName}\n                    onSubmit={this.submit}\n                    payButton={this.payButton}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default BankTransferElement;\n","import { Fragment, h } from 'preact';\nimport Img from '../../internal/Img';\n\nexport interface CampaignInfoProps {\n    logoUrl?: string;\n    nonprofitName?: string;\n    causeName?: string;\n    bannerUrl?: string;\n}\n\nexport default function CampaignInfo({ logoUrl = '', nonprofitName = '', causeName = '', bannerUrl = '' }: CampaignInfoProps) {\n    const backgroundImage = `url(${bannerUrl})`;\n\n    return (\n        <Fragment>\n            <Img className=\"adyen-checkout__campaign-background-image\" style={{ backgroundImage }} backgroundUrl={bannerUrl} />\n\n            <div className=\"adyen-checkout__campaign-content\">\n                {logoUrl && <img src={logoUrl} className=\"adyen-checkout__campaign-logo\" alt={nonprofitName} />}\n                <div>\n                    {nonprofitName && <div className=\"adyen-checkout__campaign-title\">{nonprofitName}</div>}\n                    {causeName && <div className=\"adyen-checkout__campaign-cause\">{causeName}</div>}\n                </div>\n            </div>\n        </Fragment>\n    );\n}\n","import { h } from 'preact';\nimport CampaignInfo from './CampaignInfo';\n\nexport interface CampaignContentProps {\n    logoUrl?: string;\n    nonprofitDescription?: string;\n    nonprofitName?: string;\n    causeName?: string;\n    nonprofitUrl?: string;\n    bannerUrl?: string;\n}\n\nexport default function CampaignContent({\n    logoUrl = '',\n    nonprofitDescription = '',\n    nonprofitName = '',\n    causeName = '',\n    nonprofitUrl = '',\n    bannerUrl = ''\n}: CampaignContentProps) {\n    return (\n        <div className=\"adyen-checkout__campaign\">\n            {nonprofitUrl ? (\n                <a href={nonprofitUrl} className=\"adyen-checkout__campaign-link\" target=\"_blank\" rel=\"noopener noreferrer\">\n                    <CampaignInfo logoUrl={logoUrl} nonprofitName={nonprofitName} causeName={causeName} bannerUrl={bannerUrl} />\n                </a>\n            ) : (\n                <CampaignInfo logoUrl={logoUrl} nonprofitName={nonprofitName} causeName={causeName} bannerUrl={bannerUrl} />\n            )}\n\n            {nonprofitDescription && <div className=\"adyen-checkout__campaign-description\">{nonprofitDescription}</div>}\n        </div>\n    );\n}\n","import cx from 'classnames';\nimport './ButtonGroup.scss';\nimport { h } from 'preact';\n\nconst ButtonGroup = ({ options = [], name, onChange }) => (\n    <div className=\"adyen-checkout__button-group\">\n        {options.map(({ label, selected, value, disabled }, index) => (\n            <label\n                key={`${name}${index}`}\n                className={cx({\n                    'adyen-checkout__button': true,\n                    'adyen-checkout__button--selected': selected,\n                    'adyen-checkout__button--disabled': disabled\n                })}\n            >\n                <input\n                    type=\"radio\"\n                    className=\"adyen-checkout__button-group__input\"\n                    value={value}\n                    checked={selected}\n                    onChange={onChange}\n                    disabled={disabled}\n                />\n                <span className=\"adyen-checkout__button-text\">{label}</span>\n            </label>\n        ))}\n    </div>\n);\n\nexport default ButtonGroup;\n","import Language from '../../../language';\nimport { DonationAmount } from './types';\n\ninterface RoundupAmount {\n    maxRoundupAmount: number;\n    commercialTxAmount: number;\n    currency: string;\n}\n\nconst getRoundupAmount = (maxRoundupAmount: number, commercialTxAmount: number) => maxRoundupAmount - (commercialTxAmount % maxRoundupAmount);\n\nconst getAmountLabel = (i18n: Language, { value, currency }: DonationAmount) => i18n.amount(value, currency);\n\nconst getRoundupAmountLabel = (i18n: Language, { maxRoundupAmount, commercialTxAmount, currency }: RoundupAmount) =>\n    getAmountLabel(i18n, { value: getRoundupAmount(maxRoundupAmount, commercialTxAmount), currency });\n\nexport { getAmountLabel, getRoundupAmount, getRoundupAmountLabel };\n","import { h, Fragment } from 'preact';\nimport ButtonGroup from '../../internal/ButtonGroup';\nimport Button from '../../internal/Button';\nimport { getAmountLabel } from './utils';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { Status } from './types';\n\ninterface FixedAmountsProps {\n    selectedAmount: number;\n    currency: string;\n    values: Array<number>;\n    status: Status;\n    onAmountSelected: ({ target }) => void;\n    onDonateButtonClicked: (amount: number) => void;\n}\nexport default function FixedAmounts(props: FixedAmountsProps) {\n    const { currency, values, selectedAmount, status, onAmountSelected, onDonateButtonClicked } = props;\n    const { i18n } = useCoreContext();\n\n    return (\n        <Fragment>\n            <div className=\"adyen-checkout__amounts\">\n                <ButtonGroup\n                    options={values.map(value => ({\n                        value,\n                        label: getAmountLabel(i18n, { value, currency }),\n                        disabled: status === 'loading',\n                        selected: value === selectedAmount\n                    }))}\n                    name=\"amount\"\n                    onChange={onAmountSelected}\n                />\n            </div>\n            <Button\n                classNameModifiers={['donate']}\n                onClick={onDonateButtonClicked}\n                label={i18n.get('donateButton')}\n                disabled={selectedAmount === null}\n                status={status}\n            />\n        </Fragment>\n    );\n}\n","import { h, Fragment } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Button from '../../internal/Button';\n\ninterface RoundupProps {\n    status: string;\n    donationAmount: string;\n    originalPaymentAmount: string;\n    onDonateButtonClicked: () => void;\n}\n\nexport default function Roundup(props: RoundupProps) {\n    const { status, donationAmount, originalPaymentAmount, onDonateButtonClicked } = props;\n    const { i18n } = useCoreContext();\n\n    return (\n        <Fragment>\n            <Button\n                classNameModifiers={['donate']}\n                onClick={onDonateButtonClicked}\n                label={`${i18n.get('donateButton')} ${donationAmount}`}\n                status={status}\n            />\n            <span className=\"adyen-checkout-roundup-description\">\n                {i18n.get('donationRoundUpDescription', { values: { donationAmount, originalPaymentAmount } })}\n            </span>\n        </Fragment>\n    );\n}\n","import { h } from 'preact';\nimport { useEffect, useState } from 'preact/hooks';\nimport CampaignContent from './CampaignContent';\nimport Button from '../../internal/Button';\nimport Img from '../../internal/Img';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport '../Donation.scss';\nimport DisclaimerMessage from '../../internal/DisclaimerMessage';\nimport { DonationAmount, DonationComponentProps, Status } from './types';\nimport useImage from '../../../core/Context/useImage';\nimport FixedAmounts from './FixedAmounts';\nimport Roundup from './Roundup';\nimport { getAmountLabel, getRoundupAmount, getRoundupAmountLabel } from './utils';\n\nexport default function DonationComponent(props: DonationComponentProps) {\n    const { donation, commercialTxAmount, onCancel, onDonate, showCancelButton = true, termsAndConditionsUrl } = props;\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const { currency, type } = donation;\n    const isRoundupDonation = type === 'roundup';\n    const [status, setStatus] = useState<Status>('ready');\n    const [isValid, setIsValid] = useState<boolean>(isRoundupDonation);\n    const [amount, setAmount] = useState<DonationAmount>({\n        currency,\n        value: isRoundupDonation ? getRoundupAmount(donation.maxRoundupAmount, commercialTxAmount) : null\n    });\n\n    this.setStatus = (status: Status) => {\n        setStatus(status);\n    };\n\n    const handleAmountSelected = ({ target }) => {\n        const value = parseInt(target.value, 10);\n        setIsValid(true);\n        setAmount((amount: DonationAmount) => ({ ...amount, value }));\n    };\n\n    const handleDonate = () => {\n        setStatus('loading');\n        onDonate({ data: { amount } });\n    };\n\n    const handleDecline = () => {\n        setStatus('ready');\n        onCancel({ data: { amount }, isValid });\n    };\n\n    useEffect(() => {\n        props.onChange({ data: { amount }, isValid });\n    }, [amount, isValid]);\n\n    if (status === 'error') {\n        return (\n            <div className=\"adyen-checkout__adyen-giving\">\n                <Img\n                    className=\"adyen-checkout__status__icon adyen-checkout__status__icon--error\"\n                    src={getImage({ imageFolder: 'components/' })('error')}\n                    alt={i18n.get('error.message.unknown')}\n                />\n                <div className=\"adyen-checkout__status__text\">{i18n.get('error.message.unknown')}</div>\n            </div>\n        );\n    }\n\n    if (status === 'success') {\n        return (\n            <div className=\"adyen-checkout__adyen-giving\">\n                <Img\n                    className=\"adyen-checkout__status__icon adyen-checkout__status__icon--success\"\n                    src={getImage({ imageFolder: 'components/' })('heart')}\n                    alt={i18n.get('thanksForYourSupport')}\n                />\n\n                <div className=\"adyen-checkout__status__text\">{i18n.get('thanksForYourSupport')}</div>\n            </div>\n        );\n    }\n\n    return (\n        <div className=\"adyen-checkout__adyen-giving\">\n            <CampaignContent {...props} />\n\n            <div className=\"adyen-checkout__adyen-giving-actions\">\n                {termsAndConditionsUrl && <DisclaimerMessage message={i18n.get('donationTermsCondition')} urls={[termsAndConditionsUrl]} />}\n                {isRoundupDonation ? (\n                    <Roundup\n                        donationAmount={getRoundupAmountLabel(i18n, { maxRoundupAmount: donation.maxRoundupAmount, commercialTxAmount, currency })}\n                        originalPaymentAmount={getAmountLabel(i18n, { value: commercialTxAmount, currency })}\n                        status={status}\n                        onDonateButtonClicked={handleDonate}\n                    ></Roundup>\n                ) : (\n                    <FixedAmounts\n                        selectedAmount={amount.value}\n                        values={donation.values}\n                        currency={currency}\n                        status={status}\n                        onAmountSelected={handleAmountSelected}\n                        onDonateButtonClicked={handleDonate}\n                    ></FixedAmounts>\n                )}\n                {showCancelButton && (\n                    <Button\n                        classNameModifiers={['decline']}\n                        variant=\"ghost\"\n                        onClick={handleDecline}\n                        disabled={status === 'loading'}\n                        label={`${i18n.get('notNowButton')} ›`}\n                    />\n                )}\n            </div>\n        </div>\n    );\n}\n\nDonationComponent.defaultProps = {\n    onCancel: () => {},\n    onChange: () => {},\n    onDonate: () => {},\n    donation: {},\n    showCancelButton: true\n};\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport DonationComponent from './components/DonationComponent';\nimport { TxVariants } from '../tx-variants';\nimport type { ICore } from '../../core/types';\nimport type { DonationConfiguration } from './types';\n\nclass DonationElement extends UIElement<DonationConfiguration> {\n    public static type = TxVariants.donation;\n\n    constructor(checkout: ICore, props?: DonationConfiguration) {\n        super(checkout, props);\n        this.donate = this.donate.bind(this);\n    }\n\n    public static defaultProps = {\n        onCancel: () => {},\n        onDonate: () => {}\n    };\n\n    /**\n     * Returns the component payment data ready to submit to the Checkout API\n     */\n    get data() {\n        return this.state.data;\n    }\n\n    /**\n     * Returns whether the component state is valid or not\n     */\n    get isValid() {\n        return this.state.isValid;\n    }\n\n    setState(newState) {\n        this.state = { ...this.state, ...newState };\n    }\n\n    donate() {\n        const { data, isValid } = this;\n        this.props.onDonate({ data, isValid }, this);\n    }\n\n    public handleRef = ref => {\n        this.componentRef = ref;\n    };\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                {/*@ts-ignore ref*/}\n                <DonationComponent {...this.props} ref={this.handleRef} onChange={this.setState} onDonate={this.donate} />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default DonationElement;\n","import type { DropinConfiguration } from './types';\n\nconst props: DropinConfiguration = {\n    isDropin: true,\n    instantPaymentTypes: [],\n    paymentMethodComponents: [],\n    paymentMethodsConfiguration: {},\n    openFirstPaymentMethod: true,\n    openFirstStoredPaymentMethod: true,\n    showStoredPaymentMethods: true,\n    showPaymentMethods: true,\n    disableFinalAnimation: false\n};\n\nexport default props;\n","import { h } from 'preact';\nimport PaymentMethodIcon from './PaymentMethodIcon';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport useImage from '../../../../core/Context/useImage';\nimport './OrderPaymentMethods.scss';\nimport { Order, OrderStatus } from '../../../../types';\n\ntype OrderPaymentMethodsProps = {\n    order: Order;\n    orderStatus: OrderStatus;\n    onOrderCancel: (order) => void;\n    brandLogoConfiguration: any;\n};\n\nexport const OrderPaymentMethods = ({ order, orderStatus, onOrderCancel, brandLogoConfiguration }: OrderPaymentMethodsProps) => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    return (\n        <div>\n            <ul className={'adyen-checkout__order-payment-methods-list'}>\n                {orderStatus?.paymentMethods?.map((orderPaymentMethod, index) => (\n                    <li key={`${orderPaymentMethod.type}-${index}`} className=\"adyen-checkout__order-payment-method\">\n                        <div className=\"adyen-checkout__order-payment-method__header\">\n                            <div className=\"adyen-checkout__payment-method__header__title\">\n                                <PaymentMethodIcon\n                                    altDescription={orderPaymentMethod.name}\n                                    type={orderPaymentMethod.type}\n                                    src={brandLogoConfiguration[orderPaymentMethod.type] || getImage()(orderPaymentMethod.type)}\n                                />\n                                {orderPaymentMethod.label ? `${orderPaymentMethod.label}` : `•••• ${orderPaymentMethod.lastFour}`}\n                            </div>\n\n                            {onOrderCancel && (\n                                <button\n                                    type=\"button\"\n                                    className=\"adyen-checkout__button adyen-checkout__button--inline adyen-checkout__button--link\"\n                                    onClick={() => {\n                                        onOrderCancel({ order });\n                                    }}\n                                >\n                                    {i18n.get('storedPaymentMethod.disable.button')}\n                                </button>\n                            )}\n                        </div>\n                        <div className=\"adyen-checkout__order-payment-method__details\">\n                            <div className=\"adyen-checkout__order-payment-method__deducted-amount\">\n                                <div className=\"adyen-checkout__order-payment-method__deducted-amount__label\">{i18n.get('deductedBalance')}</div>\n                                <div className=\"adyen-checkout__order-payment-method__deducted-amount__value\">\n                                    {i18n.amount(orderPaymentMethod.amount.value, orderPaymentMethod.amount.currency)}\n                                </div>\n                            </div>\n                        </div>\n                    </li>\n                ))}\n            </ul>\n\n            {orderStatus.remainingAmount && (\n                <div className=\"adyen-checkout__order-remaining-amount\">\n                    {i18n.get('partialPayment.warning')}{' '}\n                    <strong>{i18n.amount(orderStatus.remainingAmount.value, orderStatus.remainingAmount.currency)}</strong>\n                </div>\n            )}\n        </div>\n    );\n};\n\nexport default OrderPaymentMethods;\n","import { h } from 'preact';\nimport UIElement from '../../../internal/UIElement/UIElement';\nimport './InstantPaymentMethods.scss';\n\ninterface InstantPaymentMethodsProps {\n    paymentMethods: UIElement[];\n    onSelect: (paymentMethod: UIElement) => void;\n}\n\nfunction InstantPaymentMethods({ paymentMethods, onSelect }: InstantPaymentMethodsProps) {\n    return (\n        <ul className=\"adyen-checkout__instant-payment-methods-list\">\n            {paymentMethods.map(pm => (\n                // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions\n                <li key={pm._id} data-testid={pm.type} onClick={() => onSelect(pm)}>\n                    {pm.render()}\n                </li>\n            ))}\n        </ul>\n    );\n}\n\nexport default InstantPaymentMethods;\n","import { useEffect, useState } from 'preact/hooks';\nimport UIElement from '../../../internal/UIElement/UIElement';\n\ntype BrandLogoConfiguration = {\n    [key: string]: string;\n};\n\nexport function useBrandLogoConfiguration(paymentMethods: UIElement[]): BrandLogoConfiguration {\n    const [brandLogoConfiguration, setBrandLogoConfiguration] = useState<BrandLogoConfiguration>({});\n\n    useEffect(() => {\n        setBrandLogoConfiguration(\n            paymentMethods.reduce(\n                (accumulator, paymentMethod) => ({\n                    ...accumulator,\n                    ...(paymentMethod.props['brand'] && paymentMethod.icon && { [paymentMethod.props['brand']]: paymentMethod.icon })\n                }),\n                {}\n            )\n        );\n    }, [paymentMethods]);\n\n    return brandLogoConfiguration;\n}\n","import { h } from 'preact';\n\nconst PaymentMethodDetails = ({ paymentMethodComponent, isLoaded }) => {\n    if (paymentMethodComponent && isLoaded) {\n        return <div className={'adyen-checkout__payment-method__details__content'}>{paymentMethodComponent}</div>;\n    }\n\n    return null;\n};\n\nexport default PaymentMethodDetails;\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport classNames from 'classnames';\nimport './DisableOneClickConfirmation.scss';\n\nconst DisableOneClickConfirmation = ({ id, open, onDisable, onCancel }) => {\n    const { i18n } = useCoreContext();\n    return (\n        <div\n            id={id}\n            aria-hidden={!open}\n            className={classNames({\n                'adyen-checkout__payment-method__disable-confirmation': true,\n                'adyen-checkout__payment-method__disable-confirmation--open': open\n            })}\n        >\n            <div className=\"adyen-checkout__payment-method__disable-confirmation__content\">\n                {i18n.get('storedPaymentMethod.disable.confirmation')}\n                <div className=\"adyen-checkout__payment-method__disable-confirmation__buttons\">\n                    <button\n                        type=\"button\"\n                        className={classNames(\n                            'adyen-checkout__button',\n                            'adyen-checkout__payment-method__disable-confirmation__button',\n                            'adyen-checkout__payment-method__disable-confirmation__button--remove'\n                        )}\n                        disabled={!open}\n                        onClick={onDisable}\n                    >\n                        {i18n.get('storedPaymentMethod.disable.confirmButton')}\n                    </button>\n                    <button\n                        type=\"button\"\n                        className={classNames(\n                            'adyen-checkout__button',\n                            'adyen-checkout__payment-method__disable-confirmation__button',\n                            'adyen-checkout__payment-method__disable-confirmation__button--cancel'\n                        )}\n                        disabled={!open}\n                        onClick={onCancel}\n                    >\n                        {i18n.get('storedPaymentMethod.disable.cancelButton')}\n                    </button>\n                </div>\n            </div>\n        </div>\n    );\n};\n\nexport default DisableOneClickConfirmation;\n","import { h } from 'preact';\nimport { BrandConfiguration } from '../../../../Card/types';\nimport PaymentMethodIcon from '../PaymentMethodIcon';\nimport { getFullBrandName } from '../../../../Card/components/CardInput/utils';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\n\nconst prepareVisibleBrands = (allowedBrands: Array<BrandConfiguration>) => {\n    const visibleBrands = allowedBrands.length <= 4 ? allowedBrands : allowedBrands.slice(0, 3);\n    return {\n        visibleBrands,\n        leftBrandsAmount: allowedBrands.length - visibleBrands.length\n    };\n};\n\ninterface PaymentMethodBrandsProps {\n    brands: Array<BrandConfiguration>;\n    excludedUIBrands?: Array<string>;\n    isPaymentMethodSelected: boolean;\n    keepBrandsVisible?: boolean;\n    showOtherInsteafOfNumber?: boolean;\n}\n\nconst PaymentMethodBrands = ({\n    brands,\n    excludedUIBrands = [],\n    isPaymentMethodSelected,\n    keepBrandsVisible = false,\n    showOtherInsteafOfNumber = false\n}: PaymentMethodBrandsProps) => {\n    const { i18n } = useCoreContext();\n\n    if (isPaymentMethodSelected && !keepBrandsVisible) {\n        return null;\n    }\n\n    const allowedBrands = brands.filter(brand => !excludedUIBrands?.includes(brand.name));\n    const { visibleBrands, leftBrandsAmount } = prepareVisibleBrands(allowedBrands);\n\n    return (\n        <span className=\"adyen-checkout__payment-method__brands\">\n            {visibleBrands.map(brand => (\n                <PaymentMethodIcon key={brand.name} altDescription={getFullBrandName(brand.name)} type={brand.name} src={brand.icon} />\n            ))}\n            {showOtherInsteafOfNumber ? (\n                <span className=\"adyen-checkout__payment-method__brand-number\">+ {i18n.get('paymentMethodBrand.other')}</span>\n            ) : (\n                leftBrandsAmount !== 0 && <span className=\"adyen-checkout__payment-method__brand-number\">+{leftBrandsAmount}</span>\n            )}\n        </span>\n    );\n};\n\nexport default PaymentMethodBrands;\n","import classNames from 'classnames';\nimport { h } from 'preact';\nimport './PaymentMethodName.scss';\n\nconst PaymentMethodName = ({ displayName, additionalInfo, isSelected }) => (\n    <span className={'adyen-checkout__payment-method__name_wrapper'}>\n        <span\n            className={classNames({\n                'adyen-checkout__payment-method__name': true,\n                'adyen-checkout__payment-method__name--selected': isSelected\n            })}\n        >\n            {displayName}\n        </span>\n\n        {additionalInfo && (\n            <span\n                className={classNames({\n                    'adyen-checkout__payment-method__additional-info': true,\n                    'adyen-checkout__payment-method__additional-info--selected': isSelected\n                })}\n            >\n                {additionalInfo}\n            </span>\n        )}\n    </span>\n);\n\nexport default PaymentMethodName;\n","import { Component, h } from 'preact';\nimport classNames from 'classnames';\nimport PaymentMethodDetails from '../PaymentMethodDetails';\nimport PaymentMethodIcon from '../PaymentMethodIcon';\nimport DisableOneClickConfirmation from '../DisableOneClickConfirmation';\nimport './PaymentMethodItem.scss';\nimport UIElement from '../../../../internal/UIElement/UIElement';\nimport PaymentMethodBrands from '../PaymentMethodBrands/PaymentMethodBrands';\nimport { BRAND_ICON_UI_EXCLUSION_LIST } from '../../../../internal/SecuredFields/lib/constants';\nimport PaymentMethodName from '../PaymentMethodName';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport ExpandButton from '../../../../internal/ExpandButton';\n\nexport interface PaymentMethodItemProps {\n    paymentMethod: UIElement;\n    isSelected?: boolean;\n    isLoaded?: boolean;\n    isLoading?: boolean;\n    isDisablingPaymentMethod: boolean;\n    showRemovePaymentMethodButton: boolean;\n    onDisableStoredPaymentMethod: (paymentMethod) => void;\n    onSelect: (paymentMethod: UIElement) => void;\n    standalone: boolean;\n    className?: string;\n    showRadioButton?: boolean;\n}\n\nclass PaymentMethodItem extends Component<PaymentMethodItemProps> {\n    public static defaultProps = {\n        paymentMethod: null,\n        isSelected: false,\n        isLoaded: false,\n        isLoading: false,\n        showDisableStoredPaymentMethodConfirmation: false,\n        showRadioButton: false\n    };\n\n    public state = {\n        showDisableStoredPaymentMethodConfirmation: false\n    };\n\n    public toggleDisableConfirmation = () => {\n        this.setState({ showDisableStoredPaymentMethodConfirmation: !this.state.showDisableStoredPaymentMethodConfirmation });\n    };\n\n    public onDisableStoredPaymentMethod = () => {\n        this.props.onDisableStoredPaymentMethod(this.props.paymentMethod);\n        this.toggleDisableConfirmation();\n    };\n\n    private handleOnListItemClick = (): void => {\n        const { onSelect, paymentMethod } = this.props;\n        onSelect(paymentMethod);\n    };\n\n    // @ts-ignore need to refine the type for paymentMethod\n    render({ paymentMethod, isSelected, isDisablingPaymentMethod, isLoaded, isLoading, standalone, showRadioButton }) {\n        const { i18n } = useCoreContext();\n\n        if (!paymentMethod) {\n            return null;\n        }\n\n        const isCard = paymentMethod.props.type === 'card' || paymentMethod.props.type === 'scheme';\n\n        const paymentMethodClassnames = classNames({\n            'adyen-checkout__payment-method': true,\n            [`adyen-checkout__payment-method--${paymentMethod.props.type}`]: true,\n            ...(isCard && { [`adyen-checkout__payment-method--${paymentMethod.props.fundingSource ?? 'credit'}`]: true }),\n            'adyen-checkout__payment-method--selected': isSelected,\n            'adyen-checkout__payment-method--loading': isLoading,\n            'adyen-checkout__payment-method--disabling': isDisablingPaymentMethod,\n            'adyen-checkout__payment-method--confirming': this.state.showDisableStoredPaymentMethodConfirmation,\n            'adyen-checkout__payment-method--standalone': standalone,\n            [paymentMethod._id]: true,\n            [this.props.className]: true\n        });\n\n        const showRemovePaymentMethodButton = this.props.showRemovePaymentMethodButton && paymentMethod.props.oneClick && isSelected;\n        const disableConfirmationId = `remove-${paymentMethod._id}`;\n        const containerId = `container-${paymentMethod._id}`;\n        const buttonId = `button-${paymentMethod._id}`;\n\n        const showBrands = !paymentMethod.props.oneClick && paymentMethod.brands && paymentMethod.brands.length > 0;\n\n        return (\n            // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n            <div key={paymentMethod._id} className={paymentMethodClassnames} onClick={this.handleOnListItemClick}>\n                <div className=\"adyen-checkout__payment-method__header\">\n                    <ExpandButton\n                        buttonId={buttonId}\n                        showRadioButton={showRadioButton}\n                        isSelected={isSelected}\n                        expandContentId={containerId}\n                        standalone={standalone}\n                    >\n                        <PaymentMethodIcon\n                            // Only add alt attribute to storedPaymentMethods (to avoid SR reading the PM name twice)\n                            {...(paymentMethod.props.oneClick && { altDescription: paymentMethod.props.name })}\n                            type={paymentMethod.type}\n                            src={paymentMethod.icon}\n                        />\n\n                        <PaymentMethodName\n                            displayName={paymentMethod.displayName}\n                            isSelected={isSelected}\n                            additionalInfo={paymentMethod.additionalInfo}\n                        />\n                    </ExpandButton>\n\n                    {showRemovePaymentMethodButton && (\n                        <button\n                            type=\"button\"\n                            className=\"adyen-checkout__button adyen-checkout__button--inline adyen-checkout__button--link\"\n                            onClick={this.toggleDisableConfirmation}\n                            aria-expanded={this.state.showDisableStoredPaymentMethodConfirmation}\n                            aria-controls={disableConfirmationId}\n                        >\n                            {i18n.get('storedPaymentMethod.disable.button')}\n                        </button>\n                    )}\n\n                    {showBrands && (\n                        <PaymentMethodBrands\n                            showOtherInsteafOfNumber={paymentMethod.props.showOtherInsteafOfNumber}\n                            keepBrandsVisible={paymentMethod.props.keepBrandsVisible}\n                            brands={paymentMethod.brands}\n                            excludedUIBrands={BRAND_ICON_UI_EXCLUSION_LIST}\n                            isPaymentMethodSelected={isSelected}\n                        />\n                    )}\n                </div>\n\n                <div className=\"adyen-checkout-pm-details-wrapper\" aria-hidden={!isSelected}>\n                    <div className=\"adyen-checkout__payment-method__details\" id={containerId}>\n                        {showRemovePaymentMethodButton && (\n                            <DisableOneClickConfirmation\n                                id={disableConfirmationId}\n                                open={this.state.showDisableStoredPaymentMethodConfirmation}\n                                onDisable={this.onDisableStoredPaymentMethod}\n                                onCancel={this.toggleDisableConfirmation}\n                            />\n                        )}\n\n                        <PaymentMethodDetails paymentMethodComponent={paymentMethod.render()} isLoaded={isLoaded} />\n                    </div>\n                </div>\n            </div>\n        );\n    }\n}\n\nexport default PaymentMethodItem;\n","import { h } from 'preact';\nimport PaymentMethodItem from './PaymentMethodItem/PaymentMethodItem';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { useMemo } from 'preact/hooks';\nimport uuid from '../../../../utils/uuid';\nimport classNames from 'classnames';\nimport UIElement from '../../../internal/UIElement';\n\nexport interface PaymentMethodsContainerProps {\n    label?: string;\n    classNameModifiers?: string[];\n    paymentMethods: UIElement[];\n    activePaymentMethod?: UIElement;\n    /**\n     * Map that keeps track of which Payment methods (UIElements) already got rendered in the UI\n     */\n    cachedPaymentMethods: Record<string, boolean>;\n    showRemovePaymentMethodButton?: boolean;\n    onSelect?: (paymentMethod: UIElement) => void;\n    onDisableStoredPaymentMethod?: (storedPaymentMethod) => void;\n    isDisablingPaymentMethod?: boolean;\n    isLoading: boolean;\n    showRadioButton?: boolean;\n}\n\nfunction PaymentMethodsContainer({\n    label,\n    classNameModifiers = [],\n    paymentMethods = [],\n    activePaymentMethod = null,\n    cachedPaymentMethods = {},\n    isLoading = false,\n    isDisablingPaymentMethod = false,\n    showRemovePaymentMethodButton,\n    onDisableStoredPaymentMethod = () => {},\n    onSelect,\n    showRadioButton\n}: Readonly<PaymentMethodsContainerProps>) {\n    const { i18n } = useCoreContext();\n    const selectListId: string = useMemo(() => `select-${uuid()}`, []);\n    const paymentMethodListClassnames = classNames([\n        'adyen-checkout__payment-methods-list',\n        { 'adyen-checkout__payment-methods-list--loading': isLoading },\n        ...classNameModifiers.map(m => `adyen-checkout__payment-methods-list--${m}`)\n    ]);\n\n    const standalone = paymentMethods.length === 1;\n\n    return (\n        <div className=\"adyen-checkout-payment-methods-container\">\n            {!!label && (\n                <label htmlFor={selectListId} className=\"adyen-checkout-payment-methods-list-label\">\n                    {label}\n                </label>\n            )}\n            <div\n                id={selectListId}\n                className={paymentMethodListClassnames}\n                role={standalone ? undefined : 'radiogroup'}\n                aria-label={standalone ? undefined : i18n.get('paymentMethodsList.aria.label')}\n                required\n            >\n                {paymentMethods.map((paymentMethod, index, paymentMethodsCollection) => {\n                    const isSelected = activePaymentMethod && activePaymentMethod._id === paymentMethod._id;\n                    const isLoaded = paymentMethod._id in cachedPaymentMethods;\n                    const isNextOneSelected =\n                        activePaymentMethod &&\n                        paymentMethodsCollection[index + 1] &&\n                        activePaymentMethod._id === paymentMethodsCollection[index + 1]._id;\n\n                    return (\n                        <PaymentMethodItem\n                            className={classNames({ 'adyen-checkout__payment-method--next-selected': isNextOneSelected })}\n                            standalone={standalone}\n                            paymentMethod={paymentMethod}\n                            isSelected={isSelected}\n                            isDisablingPaymentMethod={isSelected && isDisablingPaymentMethod}\n                            isLoaded={isLoaded}\n                            isLoading={isLoading}\n                            onSelect={onSelect}\n                            key={paymentMethod._id}\n                            showRemovePaymentMethodButton={showRemovePaymentMethodButton}\n                            showRadioButton={showRadioButton}\n                            onDisableStoredPaymentMethod={onDisableStoredPaymentMethod}\n                        />\n                    );\n                })}\n            </div>\n        </div>\n    );\n}\n\nexport default PaymentMethodsContainer;\n","import { Fragment, h } from 'preact';\nimport getProp from '../../../../utils/getProp';\nimport UIElement from '../../../internal/UIElement/UIElement';\nimport { Order, OrderStatus } from '../../../../types/global-types';\nimport OrderPaymentMethods from './OrderPaymentMethods';\nimport InstantPaymentMethods from './InstantPaymentMethods';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { useBrandLogoConfiguration } from './useBrandLogoConfiguration';\nimport PaymentMethodsContainer, { PaymentMethodsContainerProps } from './PaymentMethodsContainer';\nimport { useEffect } from 'preact/hooks';\n\ninterface PaymentMethodListProps extends Omit<PaymentMethodsContainerProps, 'label' | 'classNameModifiers'> {\n    instantPaymentMethods?: UIElement[];\n    storedPaymentMethods?: UIElement[];\n    openFirstStoredPaymentMethod?: boolean;\n    openFirstPaymentMethod?: boolean;\n    openPaymentMethod?: {\n        type: string;\n    };\n    order?: Order;\n    orderStatus?: OrderStatus;\n    onOrderCancel?: (order) => void;\n}\n\nconst PaymentMethodList = ({\n    paymentMethods,\n    instantPaymentMethods,\n    storedPaymentMethods,\n    openFirstStoredPaymentMethod,\n    openFirstPaymentMethod,\n    openPaymentMethod,\n    order,\n    orderStatus = null,\n    onOrderCancel,\n    onSelect = () => {},\n    ...rest\n}: PaymentMethodListProps) => {\n    const { i18n } = useCoreContext();\n    const brandLogoConfiguration = useBrandLogoConfiguration(paymentMethods);\n    const hasInstantPaymentMethods = instantPaymentMethods?.length > 0;\n    const hasStoredPaymentMethods = storedPaymentMethods?.length > 0;\n    const pmListLabel = hasInstantPaymentMethods || hasStoredPaymentMethods ? i18n.get('paymentMethodsList.otherPayments.label') : '';\n\n    useEffect(() => {\n        if (openPaymentMethod?.type) {\n            const paymentMethod = paymentMethods?.find(paymentMethod => paymentMethod.type === openPaymentMethod?.type);\n            if (!paymentMethod) {\n                console.warn(`Drop-in: payment method type \"${openPaymentMethod?.type}\" not found`);\n            } else {\n                onSelect(paymentMethod);\n                return;\n            }\n        }\n\n        // Open first PaymentMethodItem\n        const firstStoredPayment = storedPaymentMethods?.[0];\n        const firstNonStoredPayment = paymentMethods?.[0];\n\n        if (firstStoredPayment || firstNonStoredPayment) {\n            const shouldOpenFirstStored = openFirstStoredPaymentMethod && getProp(firstStoredPayment, 'props.oneClick') === true;\n            if (shouldOpenFirstStored) {\n                onSelect(firstStoredPayment);\n                return;\n            }\n\n            if (openFirstPaymentMethod) {\n                onSelect(firstNonStoredPayment);\n            }\n        }\n    }, [storedPaymentMethods, paymentMethods, openFirstStoredPaymentMethod, openFirstPaymentMethod, openPaymentMethod]);\n\n    return (\n        <Fragment>\n            {orderStatus && (\n                <OrderPaymentMethods\n                    order={order}\n                    orderStatus={orderStatus}\n                    onOrderCancel={onOrderCancel}\n                    brandLogoConfiguration={brandLogoConfiguration}\n                />\n            )}\n\n            {hasInstantPaymentMethods && <InstantPaymentMethods paymentMethods={instantPaymentMethods} onSelect={onSelect} />}\n\n            {hasStoredPaymentMethods && (\n                <PaymentMethodsContainer\n                    {...rest}\n                    label={i18n.get('paymentMethodsList.storedPayments.label')}\n                    classNameModifiers={['storedPayments']}\n                    paymentMethods={storedPaymentMethods}\n                    onSelect={onSelect}\n                ></PaymentMethodsContainer>\n            )}\n\n            {!!paymentMethods.length && (\n                <PaymentMethodsContainer\n                    {...rest}\n                    label={pmListLabel}\n                    classNameModifiers={['otherPayments']}\n                    paymentMethods={paymentMethods}\n                    onSelect={onSelect}\n                ></PaymentMethodsContainer>\n            )}\n        </Fragment>\n    );\n};\n\nexport default PaymentMethodList;\n","import Success from './Success';\nimport Error from './Error';\nimport './Status.scss';\n\nexport default {\n    Success,\n    Error\n};\n","import { h } from 'preact';\n\nimport Img from '../../../internal/Img';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport useImage from '../../../../core/Context/useImage';\nimport { useA11yReporter } from '../../../../core/Errors/useA11yReporter';\n\nconst Success = ({ message }) => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const status = i18n.get(message || 'creditCard.success');\n    useA11yReporter(status);\n    return (\n        <div className=\"adyen-checkout__status adyen-checkout__status--success\">\n            <Img\n                height=\"88\"\n                className=\"adyen-checkout__status__icon\"\n                src={getImage({ extension: 'gif', imageFolder: 'components/' })('success')}\n                alt={i18n.get(message || 'creditCard.success')}\n            />\n            <span className=\"adyen-checkout__status__text\">{status}</span>\n        </div>\n    );\n};\n\nexport default Success;\n","import { h } from 'preact';\n\nimport Img from '../../../internal/Img';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport useImage from '../../../../core/Context/useImage';\nimport { useA11yReporter } from '../../../../core/Errors/useA11yReporter';\n\nconst Error = ({ message }) => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const status = i18n.get(message || 'error.message.unknown');\n    useA11yReporter(status);\n\n    return (\n        <div className=\"adyen-checkout__status adyen-checkout__status--error\">\n            <Img\n                className=\"adyen-checkout__status__icon\"\n                src={getImage({ extension: 'gif', imageFolder: 'components/' })('error')}\n                alt={i18n.get(message || 'error.message.unknown')}\n                height=\"88\"\n            />\n            <span className=\"adyen-checkout__status__text\">{status}</span>\n        </div>\n    );\n};\n\nexport default Error;\n","import { Component, Fragment, h } from 'preact';\nimport PaymentMethodList from './PaymentMethod/PaymentMethodList';\nimport Status from './status';\nimport getOrderStatus from '../../../core/Services/order-status';\nimport './DropinComponent.scss';\nimport { sanitizeOrder } from '../../internal/UIElement/utils';\nimport { PaymentAmount } from '../../../types/global-types';\nimport { ANALYTICS_RENDERED_STR, InfoEventTypes } from '../../../core/Analytics/constants';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport Button from '../../internal/Button';\nimport type { DropinComponentProps, DropinComponentState, DropinStatus, DropinStatusProps, onOrderCancelData } from '../types';\nimport UIElement from '../../internal/UIElement';\nimport { AnalyticsInfoEvent } from '../../../core/Analytics/AnalyticsInfoEvent';\n\nexport class DropinComponent extends Component<DropinComponentProps, DropinComponentState> {\n    public state: DropinComponentState = {\n        elements: [],\n        fastlanePaymentElement: [],\n        instantPaymentElements: [],\n        storedPaymentElements: [],\n        orderStatus: null,\n        isDisabling: false,\n        status: { type: 'loading', props: undefined },\n        activePaymentMethod: null,\n        cachedPaymentMethods: {},\n        showDefaultPaymentMethodList: true\n    };\n\n    componentDidMount() {\n        this.prepareDropinData();\n    }\n\n    public prepareDropinData = () => {\n        const { order, clientKey, loadingContext } = this.props;\n        const [storedElementsPromises, elementsPromises, instantPaymentsPromises, fastlanePaymentElementPromise] = this.props.onCreateElements();\n        const orderStatusPromise = order ? getOrderStatus({ clientKey, loadingContext }, order) : null;\n\n        void Promise.all([storedElementsPromises, elementsPromises, instantPaymentsPromises, fastlanePaymentElementPromise, orderStatusPromise]).then(\n            ([storedPaymentElements, elements, instantPaymentElements, fastlanePaymentElement, orderStatus]) => {\n                this.setState({\n                    orderStatus,\n                    elements,\n                    instantPaymentElements,\n                    storedPaymentElements,\n                    fastlanePaymentElement,\n                    showDefaultPaymentMethodList: fastlanePaymentElement.length === 0\n                });\n\n                this.setStatus('ready');\n\n                const event = new AnalyticsInfoEvent({\n                    type: ANALYTICS_RENDERED_STR,\n                    component: 'dropin',\n                    configData: this.analyticConfigData\n                });\n\n                this.props.modules?.analytics.sendAnalytics(event);\n            }\n        );\n\n        this.onOrderCancel = this.getOnOrderCancel();\n    };\n\n    get analyticConfigData() {\n        return {\n            openFirstStoredPaymentMethod: this.props.openFirstStoredPaymentMethod,\n            showStoredPaymentMethods: this.props.showStoredPaymentMethods\n        };\n    }\n\n    public setStatus = (status: DropinStatus['type'], props: DropinStatusProps = {}) => {\n        this.setState({ status: { type: status, props } });\n    };\n\n    private setActivePaymentMethod = (paymentMethod: UIElement): void => {\n        if (paymentMethod === this.state.activePaymentMethod) {\n            return;\n        }\n\n        this.setState(prevState => ({\n            activePaymentMethod: paymentMethod,\n            cachedPaymentMethods: { ...prevState.cachedPaymentMethods, [paymentMethod._id]: true }\n        }));\n\n        if (this.state.cachedPaymentMethods[paymentMethod._id]) {\n            paymentMethod.activate();\n        }\n    };\n\n    componentDidUpdate(prevProps, prevState) {\n        if (prevState.status.type !== this.state.status.type && this.state.activePaymentMethod) {\n            // @ts-ignore TODO: Drop-in has its own 'status' values ('custom' for ex) which differs from regular UIElementStatus. Need to investigate best way to define/use this status variable\n            this.state.activePaymentMethod.setStatus(this.state.status.type);\n        }\n\n        if (this.state.status.type === 'ready' && prevState.status.type !== 'ready' && this.props.onReady) {\n            this.props.onReady();\n        }\n    }\n\n    private handleOnSelectPaymentMethod = paymentMethod => {\n        const { activePaymentMethod } = this.state;\n\n        this.setActivePaymentMethod(paymentMethod);\n\n        // onSelect event\n        if ((activePaymentMethod && activePaymentMethod._id !== paymentMethod._id) || !activePaymentMethod) {\n            this.props.onSelect?.(paymentMethod);\n\n            const event = new AnalyticsInfoEvent({\n                type: ANALYTICS_RENDERED_STR\n            });\n\n            paymentMethod.submitAnalytics(event);\n        }\n    };\n\n    private handleDisableStoredPaymentMethod = storedPaymentMethod => {\n        this.setState({ isDisabling: true });\n\n        new Promise((resolve, reject) => this.props.onDisableStoredPaymentMethod(storedPaymentMethod.props.storedPaymentMethodId, resolve, reject))\n            .then(() => {\n                this.setState(prevState => ({\n                    storedPaymentElements: prevState.storedPaymentElements.filter(pm => pm._id !== storedPaymentMethod._id)\n                }));\n                this.setState({ isDisabling: false });\n            })\n            .catch(() => {\n                this.setState({ isDisabling: false });\n            });\n    };\n\n    private readonly onShowDefaultPaymentMethodListClick = () => {\n        this.setState({\n            showDefaultPaymentMethodList: true\n        });\n\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventTypes.clicked,\n            target: 'otherpaymentmethod_button',\n            component: 'dropin'\n        });\n\n        this.props.modules?.analytics.sendAnalytics(event);\n    };\n\n    closeActivePaymentMethod() {\n        this.setState({ activePaymentMethod: null });\n    }\n\n    /**\n     * getOnOrderCancel decides which onOrderCancel logic should be used, manual or sessions\n     */\n    private getOnOrderCancel = () => {\n        if (this.props.onOrderCancel) {\n            return (data: onOrderCancelData) => {\n                const order = sanitizeOrder(data.order);\n                new Promise<{ amount: PaymentAmount }>((resolve, reject) => {\n                    this.props.onOrderCancel({ order }, { resolve, reject });\n                })\n                    .then(({ amount }) => this.props.elementRef.handleAdvanceFlowPaymentMethodsUpdate(null, amount))\n                    .catch(error => {\n                        throw new AdyenCheckoutError('NETWORK_ERROR', error);\n                    });\n            };\n        }\n        if (this.props.session) {\n            return (data: onOrderCancelData) =>\n                this.props.session\n                    .cancelOrder(data)\n                    .then(() => this.props.core.update({ order: null }))\n                    .catch(error => {\n                        console.error(error);\n                        this.setStatus(error?.message || 'error');\n                    });\n        }\n        return null;\n    };\n\n    private onOrderCancel: (data: onOrderCancelData) => void;\n\n    render() {\n        const {\n            elements,\n            fastlanePaymentElement,\n            instantPaymentElements,\n            storedPaymentElements,\n            status,\n            activePaymentMethod,\n            cachedPaymentMethods,\n            showDefaultPaymentMethodList\n        } = this.state;\n\n        const isLoading = status.type === 'loading';\n        const isRedirecting = status.type === 'redirect';\n        const hasPaymentMethodsToBeDisplayed = !!(elements?.length || instantPaymentElements?.length || storedPaymentElements?.length);\n\n        switch (status.type) {\n            case 'success':\n                return <Status.Success message={this.props?.amount?.value === 0 ? 'resultMessages.preauthorized' : status.props?.message} />;\n\n            case 'error':\n                return <Status.Error message={status.props?.message} />;\n\n            case 'custom':\n                return status.props?.component?.render();\n\n            default:\n                return (\n                    <div className={`adyen-checkout__dropin adyen-checkout__dropin--${status.type}`}>\n                        {isRedirecting && status.props.component && status.props.component.render()}\n                        {isLoading && status.props && status.props.component && status.props.component.render()}\n\n                        {!showDefaultPaymentMethodList && (\n                            <Fragment>\n                                <PaymentMethodList\n                                    isLoading={isLoading}\n                                    paymentMethods={fastlanePaymentElement}\n                                    activePaymentMethod={activePaymentMethod}\n                                    cachedPaymentMethods={cachedPaymentMethods}\n                                    onSelect={this.handleOnSelectPaymentMethod}\n                                    openFirstPaymentMethod\n                                    showRadioButton={this.props.showRadioButton}\n                                />\n\n                                {hasPaymentMethodsToBeDisplayed && (\n                                    <Button\n                                        classNameModifiers={['dropin-show-paymentmethods']}\n                                        variant=\"link\"\n                                        inline\n                                        label=\"Other payment methods\"\n                                        onClick={this.onShowDefaultPaymentMethodListClick}\n                                    />\n                                )}\n                            </Fragment>\n                        )}\n\n                        {hasPaymentMethodsToBeDisplayed && showDefaultPaymentMethodList && (\n                            <PaymentMethodList\n                                isLoading={isLoading || isRedirecting}\n                                isDisablingPaymentMethod={this.state.isDisabling}\n                                paymentMethods={elements}\n                                instantPaymentMethods={instantPaymentElements}\n                                storedPaymentMethods={storedPaymentElements}\n                                activePaymentMethod={activePaymentMethod}\n                                cachedPaymentMethods={cachedPaymentMethods}\n                                order={this.props.order}\n                                orderStatus={this.state.orderStatus}\n                                onOrderCancel={this.onOrderCancel}\n                                onSelect={this.handleOnSelectPaymentMethod}\n                                openPaymentMethod={this.props.openPaymentMethod}\n                                openFirstPaymentMethod={this.props.openFirstPaymentMethod}\n                                openFirstStoredPaymentMethod={this.props.openFirstStoredPaymentMethod}\n                                onDisableStoredPaymentMethod={this.handleDisableStoredPaymentMethod}\n                                showRemovePaymentMethodButton={this.props.showRemovePaymentMethodButton}\n                                showRadioButton={this.props.showRadioButton}\n                            />\n                        )}\n                    </div>\n                );\n        }\n    }\n}\n\nexport default DropinComponent;\n","import { httpPost } from './http';\nimport { OrderStatus } from '../../types/global-types';\n\n/**\n */\nfunction orderStatus(config, order): Promise<OrderStatus> {\n    const options = { path: `v1/order/status?clientKey=${config.clientKey}`, loadingContext: config.loadingContext };\n\n    return httpPost(options, { orderData: order.orderData });\n}\n\nexport default orderStatus;\n","import promiseTimeout from '../../../utils/promiseTimeout';\nimport type { PaymentMethod, StoredPaymentMethod, UIElement } from '../../../types';\n\nexport const UNSUPPORTED_PAYMENT_METHODS = ['androidpay', 'samsungpay', 'clicktopay'];\n\n/**\n * Filter out payment methods that are not supported by Drop-in\n * @param paymentMethod - Payment method object from /paymentMethods response\n */\nexport const filterUnsupportedPaymentMethod = (paymentMethod: PaymentMethod | StoredPaymentMethod) =>\n    !UNSUPPORTED_PAYMENT_METHODS.includes(paymentMethod.type);\n\n// filter payment methods that we support (that are in the paymentMethods/index dictionary)\nexport const filterPresent = paymentMethod => !!paymentMethod;\n\n// filter payment methods that are available to the user\nexport const filterAvailable = (elements: UIElement[]) => {\n    const elementIsAvailablePromises = elements.map(element => {\n        const { promise } = promiseTimeout(5000, element.isAvailable(), {});\n        return promise;\n    });\n\n    return Promise.allSettled(elementIsAvailablePromises).then(promiseResults => {\n        return elements.filter((element, i) => promiseResults[i].status === 'fulfilled');\n    });\n};\n\nexport const optionallyFilterUpiSubTxVariants = (paymentMethods: Array<PaymentMethod | StoredPaymentMethod>) => {\n    const hasUpiParent = paymentMethods.some(pm => pm?.type === 'upi');\n    // If we don't get the 'upi' parent, we render multiple upi components\n    if (!hasUpiParent) return paymentMethods;\n\n    // If we get the 'upi' parent, we remove upi sub tx_variant components\n    const UPI_SUB_TX_VARIANTS = ['upi_qr', 'upi_collect', 'upi_intent'];\n    return paymentMethods.filter(pm => !UPI_SUB_TX_VARIANTS.includes(pm?.type));\n};\n","import { TxVariants } from './tx-variants';\n\n/**\n * Maps each payment type with the string name of its Component element.\n *\n * It is used to give nicer error messages when creating components using Drop-in.\n * Example: paymentMethods response contains blik, but Blik component is not configured. So it warns that 'Blik' must be imported and added to the Drop-in configuration.\n */\nconst ComponentsNameMap = {\n    /** internal */\n    [TxVariants.address]: 'Address',\n    [TxVariants.bankTransfer_IBAN]: 'BankTransfer',\n    [TxVariants.donation]: 'Donation',\n    [TxVariants.personal_details]: 'PersonalDetails',\n    /** internal */\n\n    /** Card */\n    [TxVariants.bcmc]: 'Bancontact',\n    [TxVariants.card]: 'Card',\n    [TxVariants.scheme]: 'Card',\n    [TxVariants.storedCard]: 'Card',\n    [TxVariants.customCard]: 'CustomCard',\n    /** Card */\n\n    /** Direct debit */\n    [TxVariants.ach]: 'Ach',\n    [TxVariants.directdebit_GB]: 'BacsDirectDebit',\n    [TxVariants.sepadirectdebit]: 'SepaDirectDebit',\n    [TxVariants.eft_directdebit_CA]: 'PreAuthorizedDebitCanada',\n    /** Direct debit */\n\n    /** Open Invoice */\n    [TxVariants.affirm]: 'Affirm',\n    [TxVariants.afterpay]: 'AfterPay',\n    [TxVariants.afterpay_default]: 'AfterPay',\n    [TxVariants.afterpay_b2b]: 'AfterPayB2B',\n    [TxVariants.atome]: 'Atome',\n    [TxVariants.facilypay_3x]: 'FacilyPay3x',\n    [TxVariants.facilypay_4x]: 'FacilyPay4x',\n    [TxVariants.facilypay_6x]: 'FacilyPay6x',\n    [TxVariants.facilypay_10x]: 'FacilyPay10x',\n    [TxVariants.facilypay_12x]: 'FacilyPay12x',\n    [TxVariants.ratepay]: 'RatePay',\n    [TxVariants.ratepay_directdebit]: 'RatePayDirectDebit',\n    /** Open Invoice */\n\n    /** Wallets */\n    [TxVariants.amazonpay]: 'AmazonPay',\n    [TxVariants.applepay]: 'ApplePay',\n    [TxVariants.cashapp]: 'CashAppPay',\n    [TxVariants.clicktopay]: 'ClickToPay',\n    [TxVariants.googlepay]: 'GooglePay',\n    [TxVariants.paypal]: 'PayPal',\n    [TxVariants.fastlane]: 'Fastlane',\n    [TxVariants.paywithgoogle]: 'GooglePay',\n    /** Wallets */\n\n    /** Voucher */\n    [TxVariants.boletobancario]: 'Boleto',\n    [TxVariants.boletobancario_itau]: 'Boleto',\n    [TxVariants.boletobancario_santander]: 'Boleto',\n    [TxVariants.doku]: 'Doku',\n    [TxVariants.doku_alfamart]: 'Doku',\n    [TxVariants.doku_permata_lite_atm]: 'Doku',\n    [TxVariants.doku_indomaret]: 'Doku',\n    [TxVariants.doku_atm_mandiri_va]: 'Doku',\n    [TxVariants.doku_sinarmas_va]: 'Doku',\n    [TxVariants.doku_mandiri_va]: 'Doku',\n    [TxVariants.doku_cimb_va]: 'Doku',\n    [TxVariants.doku_danamon_va]: 'Doku',\n    [TxVariants.doku_bri_va]: 'Doku',\n    [TxVariants.doku_bni_va]: 'Doku',\n    [TxVariants.doku_bca_va]: 'Doku',\n    [TxVariants.doku_wallet]: 'Doku',\n    [TxVariants.oxxo]: 'Oxxo',\n    [TxVariants.primeiropay_boleto]: 'Boleto',\n    /** Voucher */\n\n    /** issuerList */\n    [TxVariants.billdesk_online]: 'BillDeskOnline',\n    [TxVariants.billdesk_wallet]: 'BillDeskWallet',\n    [TxVariants.dotpay]: 'Dotpay',\n    [TxVariants.eps]: 'Eps',\n    [TxVariants.molpay_ebanking_fpx_MY]: 'MolPayEBankingMY',\n    [TxVariants.molpay_ebanking_TH]: 'MolPayEBankingTH',\n    [TxVariants.molpay_ebanking_VN]: 'MolPayEBankingVN',\n    [TxVariants.onlineBanking_CZ]: 'OnlineBankingCZ',\n    [TxVariants.onlinebanking_IN]: 'OnlineBankingIN', // NOTE: the txVariant does have a lowercase \"b\"\n    [TxVariants.onlineBanking_PL]: 'OnlineBankingPL',\n    [TxVariants.onlineBanking_SK]: 'OnlineBankingSK',\n    [TxVariants.paybybank]: 'PayByBank',\n    [TxVariants.payu_IN_cashcard]: 'PayuCashcard',\n    [TxVariants.payu_IN_nb]: 'PayuNetBanking',\n    [TxVariants.wallet_IN]: 'WalletINElement',\n    /** issuerList */\n\n    /** Dragonpay */\n    [TxVariants.dragonpay_ebanking]: 'Dragonpay',\n    [TxVariants.dragonpay_otc_banking]: 'Dragonpay',\n    [TxVariants.dragonpay_otc_non_banking]: 'Dragonpay',\n    [TxVariants.dragonpay_otc_philippines]: 'Dragonpay',\n    /** Dragonpay */\n\n    /** Econtext */\n    [TxVariants.econtext_atm]: 'Econtext',\n    [TxVariants.econtext_online]: 'Econtext',\n    [TxVariants.econtext_seven_eleven]: 'Econtext',\n    [TxVariants.econtext_stores]: 'Econtext',\n    /** Econtext */\n\n    /** Redirect */\n    [TxVariants.giropay]: 'Giropay',\n    [TxVariants.multibanco]: 'Multibanco',\n    [TxVariants.redirect]: 'Redirect',\n    [TxVariants.twint]: 'Twint',\n    [TxVariants.vipps]: 'Vipps',\n    [TxVariants.trustly]: 'Trustly',\n    [TxVariants.paybybank_AIS_DD]: 'PayByBankUS',\n    [TxVariants.riverty]: 'Riverty',\n    [TxVariants.paybybank_pix]: 'PayByBankPix',\n    /** Redirect */\n\n    /** Klarna */\n    [TxVariants.klarna]: 'Klarna',\n    [TxVariants.klarna_account]: 'Klarna',\n    [TxVariants.klarna_paynow]: 'Klarna',\n    [TxVariants.klarna_b2b]: 'Klarna',\n    /** Klarna */\n\n    /** QRLoader */\n    [TxVariants.bcmc_mobile]: 'BcmcMobile',\n    [TxVariants.bcmc_mobile_QR]: 'BcmcMobile',\n    [TxVariants.pix]: 'Pix',\n    [TxVariants.swish]: 'Swish',\n    [TxVariants.wechatpay]: 'WeChat',\n    [TxVariants.wechatpayQR]: 'WeChat',\n    [TxVariants.promptpay]: 'PromptPay',\n    [TxVariants.paynow]: 'PayNow',\n    [TxVariants.duitnow]: 'DuitNow',\n    /** QRLoader */\n\n    /** Await */\n    [TxVariants.blik]: 'Blik',\n    [TxVariants.mbway]: 'MBWay',\n    [TxVariants.ancv]: 'ANCV',\n    [TxVariants.payto]: 'PayTo',\n    [TxVariants.upi]: 'UPI', // also QR\n    [TxVariants.upi_qr]: 'UPI', // also QR\n    [TxVariants.upi_collect]: 'UPI', // also QR\n    [TxVariants.upi_intent]: 'UPI',\n    /** Await */\n\n    /** Giftcard */\n    [TxVariants.giftcard]: 'Giftcard',\n    [TxVariants.mealVoucher_FR_natixis]: 'MealVoucherFR',\n    [TxVariants.mealVoucher_FR_sodexo]: 'MealVoucherFR',\n    [TxVariants.mealVoucher_FR_groupeup]: 'MealVoucherFR'\n    /** Giftcard */\n};\n\n/**\n * Returns the Component name based on the payment type\n * @param paymentType\n */\nfunction getComponentNameOfPaymentType(paymentType: string): string {\n    return ComponentsNameMap[paymentType];\n}\n\nexport default getComponentNameOfPaymentType;\n","import { filterUnsupportedPaymentMethod, filterPresent, filterAvailable, optionallyFilterUpiSubTxVariants } from './filters';\nimport { getComponentConfiguration } from './getComponentConfiguration';\nimport getComponentNameOfPaymentType from '../../components-name-map';\nimport UIElement from '../../internal/UIElement';\nimport type { PaymentMethod, StoredPaymentMethod } from '../../../types/global-types';\nimport type { PaymentMethodsConfiguration } from '../types';\nimport type { ICore } from '../../../core/types';\n\n/**\n * Returns a filtered (available) list of component Elements\n *\n * @param paymentMethods - Array of PaymentMethod objects from the /paymentMethods response\n * @param paymentMethodsConfiguration - Dropin paymentMethodsConfiguration object\n * @param commonProps - High level props to be passed through to every component\n * @param core - Reference to the checkout core object\n */\nconst createElements = (\n    paymentMethods: PaymentMethod[] | StoredPaymentMethod[],\n    paymentMethodsConfiguration: PaymentMethodsConfiguration,\n    commonProps,\n    core: ICore\n): Promise<UIElement[]> => {\n    const elements = optionallyFilterUpiSubTxVariants(paymentMethods)\n        .filter(filterUnsupportedPaymentMethod)\n        .map(paymentMethod => {\n            const isStoredPaymentMethod = 'isStoredPaymentMethod' in paymentMethod && paymentMethod.isStoredPaymentMethod;\n            const paymentMethodConfigurationProps = getComponentConfiguration(paymentMethod.type, paymentMethodsConfiguration, isStoredPaymentMethod);\n            const PaymentMethodElement = core.getComponent(paymentMethod.type);\n\n            if (!PaymentMethodElement) {\n                console.warn(\n                    `\\nDropin: You support the payment method '${\n                        paymentMethod.type\n                    }' but this component has not been configured. Make sure to import the Class  '${getComponentNameOfPaymentType(\n                        paymentMethod.type\n                    )}' and then pass it in the Dropin's 'paymentMethodComponents' config property if you wish to offer this payment method.`\n                );\n                return null;\n            }\n\n            const elementProps = { ...paymentMethod, ...commonProps, ...paymentMethodConfigurationProps };\n\n            return new PaymentMethodElement(core, elementProps);\n        })\n        .filter(filterPresent);\n\n    return filterAvailable(elements);\n};\n\nexport default createElements;\n","import { PaymentMethodsConfiguration } from '../types';\n\nexport const getComponentConfiguration = (type: string, paymentMethodsConfiguration: PaymentMethodsConfiguration = {}, isStoredCard = false) => {\n    const pmType = type === 'scheme' ? 'card' : type;\n\n    if (pmType === 'card' && isStoredCard) {\n        return paymentMethodsConfiguration['storedCard'] || {};\n    }\n\n    return paymentMethodsConfiguration[pmType] || {};\n};\n","import createElements from './createElements';\nimport UIElement from '../../internal/UIElement';\nimport type { StoredPaymentMethod } from '../../../types/global-types';\nimport type { ICore } from '../../../core/types';\nimport type { PaymentMethodsConfiguration } from '../types';\n\n/**\n * Returns a filtered (available) list of oneClick paymentMethod Elements\n *\n * @param paymentMethods - Array of PaymentMethod objects from the /paymentMethods response\n * @param paymentMethodsConfiguration - Dropin paymentMethodsConfiguration object\n * @param commonProps - High level props to be passed through to every component\n * @param core - Reference to the checkout core object\n */\nconst createStoredElements = (\n    paymentMethods: StoredPaymentMethod[] = [],\n    paymentMethodsConfiguration: PaymentMethodsConfiguration,\n    commonProps,\n    core: ICore\n): Promise<UIElement[]> => createElements(paymentMethods, paymentMethodsConfiguration, { ...commonProps, oneClick: true }, core);\n\nexport default createStoredElements;\n","import UIElement from '../../internal/UIElement';\nimport createElements from './createElements';\nimport type { PaymentMethod } from '../../../types/global-types';\nimport type { ICore } from '../../../core/types';\nimport type { PaymentMethodsConfiguration } from '../types';\n\n/**\n *  Returns a filtered (available) list of InstantPaymentMethods Elements\n *\n * @param instantPaymentMethods - Array of PaymentMethod objects from the /paymentMethods response\n * @param paymentMethodsConfiguration - Dropin paymentMethodsConfiguration object\n * @param commonProps - High level props to be passed through to every component\n * @param core - Reference to the checkout core object\n */\nconst createInstantPaymentElements = (\n    instantPaymentMethods: PaymentMethod[] = [],\n    paymentMethodsConfiguration: PaymentMethodsConfiguration,\n    commonProps,\n    core: ICore\n): Promise<UIElement[]> => {\n    if (instantPaymentMethods.length) {\n        return createElements(\n            instantPaymentMethods,\n            paymentMethodsConfiguration,\n            { ...commonProps, isInstantPayment: true, showPayButton: true },\n            core\n        );\n    }\n    return Promise.resolve([]);\n};\n\nexport default createInstantPaymentElements;\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport defaultProps from './defaultProps';\nimport DropinComponent from '../../components/Dropin/components/DropinComponent';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { getCommonProps } from './components/utils';\nimport { createElements, createStoredElements } from './elements';\nimport createInstantPaymentElements from './elements/createInstantPaymentElements';\nimport { hasOwnProperty } from '../../utils/hasOwnProperty';\nimport SRPanelProvider from '../../core/Errors/SRPanelProvider';\nimport splitPaymentMethods from './elements/splitPaymentMethods';\nimport { TxVariants } from '../tx-variants';\n\nimport type { DropinConfiguration, InstantPaymentTypes, PaymentMethodsConfiguration } from './types';\nimport type { PaymentAction, PaymentResponseData } from '../../types/global-types';\nimport type { ICore } from '../../core/types';\nimport type { IDropin } from './types';\n\nconst SUPPORTED_INSTANT_PAYMENTS = ['paywithgoogle', 'googlepay', 'applepay'];\n\nclass DropinElement extends UIElement<DropinConfiguration> implements IDropin {\n    public static type = TxVariants.dropin;\n\n    protected static defaultProps = defaultProps;\n\n    public dropinRef = null;\n\n    private paymentMethodsConfiguration: PaymentMethodsConfiguration;\n    /**\n     * Reference to the component created from `handleAction` (Ex.: ThreeDS2Challenge)\n     */\n    public componentFromAction?: UIElement;\n\n    constructor(checkout: ICore, props?: DropinConfiguration) {\n        super(checkout, props);\n        this.submit = this.submit.bind(this);\n        this.handleAction = this.handleAction.bind(this);\n\n        this.props.paymentMethodComponents.forEach(PaymentMethod => this.core.register(PaymentMethod));\n        this.paymentMethodsConfiguration = this.props.paymentMethodsConfiguration || {};\n    }\n\n    protected override storeElementRefOnCore() {\n        this.core.storeElementReference(this);\n    }\n\n    formatProps(props) {\n        return {\n            type: 'dropin', // for analytics\n            ...super.formatProps(props),\n            instantPaymentTypes: Array.from<InstantPaymentTypes>(new Set(props.instantPaymentTypes)).filter(value =>\n                SUPPORTED_INSTANT_PAYMENTS.includes(value)\n            )\n        };\n    }\n\n    get isValid() {\n        return !!this.dropinRef && !!this.dropinRef.state.activePaymentMethod && !!this.dropinRef.state.activePaymentMethod.isValid;\n    }\n\n    showValidation() {\n        if (this.dropinRef.state.activePaymentMethod) {\n            this.dropinRef.state.activePaymentMethod.showValidation();\n        }\n\n        return this;\n    }\n\n    public setStatus(status, props = {}): this {\n        this.dropinRef?.setStatus(status, props);\n        return this;\n    }\n\n    get activePaymentMethod() {\n        if (!this.dropinRef?.state && !this.dropinRef?.state.activePaymentMethod) {\n            return null;\n        }\n\n        return this.dropinRef.state.activePaymentMethod;\n    }\n\n    get data() {\n        if (!this.activePaymentMethod) {\n            return null;\n        }\n\n        return this.dropinRef.state.activePaymentMethod.data;\n    }\n\n    public displayFinalAnimation(type: 'success' | 'error') {\n        if (this.props.disableFinalAnimation) return;\n\n        this.dropinRef.setStatus(type);\n    }\n\n    /**\n     * Calls the onSubmit event with the state of the activePaymentMethod\n     */\n    public override submit(): void {\n        if (!this.activePaymentMethod) {\n            throw new Error('No active payment method.');\n        }\n\n        if (!this.activePaymentMethod.isValid) {\n            this.activePaymentMethod.showValidation();\n        }\n\n        if (this.activePaymentMethod.isInstantPayment) {\n            this.closeActivePaymentMethod();\n        }\n\n        this.activePaymentMethod.submit();\n    }\n\n    /**\n     * Creates the Drop-in elements\n     */\n    private handleCreate = () => {\n        const { paymentMethodsConfiguration, showStoredPaymentMethods, showPaymentMethods, instantPaymentTypes } = this.props;\n\n        const { paymentMethods, storedPaymentMethods, instantPaymentMethods, fastlanePaymentMethod } = splitPaymentMethods(\n            this.core.paymentMethodsResponse,\n            instantPaymentTypes\n        );\n\n        const commonProps = getCommonProps({ ...this.props, elementRef: this.elementRef });\n\n        const elements = showPaymentMethods ? createElements(paymentMethods, paymentMethodsConfiguration, commonProps, this.core) : [];\n        const instantPaymentElements = createInstantPaymentElements(instantPaymentMethods, paymentMethodsConfiguration, commonProps, this.core);\n        const storedElements = showStoredPaymentMethods\n            ? createStoredElements(\n                  this.props.filterStoredPaymentMethods?.(storedPaymentMethods) ?? storedPaymentMethods,\n                  paymentMethodsConfiguration,\n                  commonProps,\n                  this.core\n              )\n            : [];\n        const fastlanePaymentElement = fastlanePaymentMethod\n            ? createElements([fastlanePaymentMethod], paymentMethodsConfiguration, commonProps, this.core)\n            : [];\n\n        return [storedElements, elements, instantPaymentElements, fastlanePaymentElement];\n    };\n\n    public handleAction(action: PaymentAction, props = {}): this | null {\n        if (!action || !action.type) {\n            if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n                throw new Error(\n                    'handleAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n                        'a \"resultCode\": have you passed in the whole response object by mistake?'\n                );\n            }\n            throw new Error('handleAction::Invalid Action - the passed action object does not have a \"type\" property');\n        }\n\n        if (action.type !== 'redirect' && this.activePaymentMethod?.updateWithAction) {\n            return this.activePaymentMethod.updateWithAction(action);\n        }\n\n        if (this.elementRef instanceof DropinElement) {\n            props = {\n                ...this.elementRef.activePaymentMethod?.props,\n                ...props\n            };\n        }\n\n        const paymentAction: UIElement = this.core.createFromAction(action, {\n            ...props,\n            elementRef: this.elementRef, // maintain elementRef for 3DS2 flow\n            onAdditionalDetails: this.handleAdditionalDetails,\n            isDropin: true\n        });\n\n        if (paymentAction) {\n            this.setStatus(paymentAction.props.statusType, { component: paymentAction });\n            this.componentFromAction = paymentAction;\n            return this;\n        }\n\n        return null;\n    }\n\n    /**\n     * handleOrder is implemented so we don't trigger a callback like in the components\n     * @param response - PaymentResponse\n     */\n    protected handleOrder = ({ order }: PaymentResponseData): void => {\n        void this.updateParent({ order });\n    };\n\n    closeActivePaymentMethod() {\n        this.dropinRef.closeActivePaymentMethod();\n    }\n\n    protected handleKeyPress(e: h.JSX.TargetedKeyboardEvent<HTMLInputElement> | KeyboardEvent) {\n        if (e.key === 'Enter' || e.code === 'Enter') {\n            // If the active element has role=\"radio\", we're on a header in the PMList, in which case we don't want to validate the form, or, prevent the default behaviour\n            const isPMHeader = document?.activeElement?.getAttribute('role') === 'radio';\n            if (isPMHeader) {\n                return;\n            }\n            super.handleKeyPress(e);\n        }\n    }\n\n    protected onEnterKeyPressed(activeElement: Element, component: UIElement) {\n        // We want to have a ref to the activePM, if we can; not a ref to the Dropin\n        const pmComponent = this.activePaymentMethod ?? component;\n        this.activePaymentMethod?.onEnterKeyPressed(activeElement, pmComponent);\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <SRPanelProvider srPanel={this.props.modules.srPanel}>\n                    <DropinComponent\n                        {...this.props}\n                        core={this.core}\n                        elementRef={this.elementRef}\n                        onCreateElements={this.handleCreate}\n                        ref={dropinRef => {\n                            this.dropinRef = dropinRef;\n                        }}\n                    />\n                </SRPanelProvider>\n            </CoreProvider>\n        );\n    }\n}\n\nexport default DropinElement;\n","import PaymentMethods from '../../../core/ProcessResponse/PaymentMethods';\nimport type { InstantPaymentTypes } from '../types';\nimport type { PaymentMethod, StoredPaymentMethod } from '../../../types/global-types';\n\ninterface SplitPaymentMethods {\n    fastlanePaymentMethod: PaymentMethod | undefined;\n    storedPaymentMethods: StoredPaymentMethod[];\n    paymentMethods: PaymentMethod[];\n    instantPaymentMethods: PaymentMethod[];\n}\n\nfunction splitPaymentMethods(paymentMethods: PaymentMethods, instantPaymentTypes: InstantPaymentTypes[]): SplitPaymentMethods {\n    const isFastlane = ({ type }: PaymentMethod) => type === 'fastlane';\n    const isInstantPaymentMethod = ({ type }: PaymentMethod) => instantPaymentTypes.includes(type as InstantPaymentTypes);\n\n    return {\n        fastlanePaymentMethod: paymentMethods.paymentMethods.find(isFastlane),\n        instantPaymentMethods: paymentMethods.paymentMethods.filter(isInstantPaymentMethod),\n        paymentMethods: paymentMethods.paymentMethods.filter(pm => !isInstantPaymentMethod(pm) && !isFastlane(pm)),\n        storedPaymentMethods: paymentMethods.storedPaymentMethods\n    };\n}\n\nexport default splitPaymentMethods;\n","export function getCommonProps(props) {\n    return {\n        beforeSubmit: props.beforeSubmit,\n        onSubmit: props.onSubmit,\n        elementRef: props.elementRef,\n        showPayButton: props.showPayButton,\n        isDropin: true\n    };\n}\n","import { h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PersonalDetails from '../internal/PersonalDetails';\nimport { CoreProvider } from '../../core/Context/CoreProvider';\nimport { TxVariants } from '../tx-variants';\nimport FormInstruction from '../internal/FormInstruction';\nimport { UIElementProps } from '../internal/UIElement/types';\n\ninterface PersonalDetailsConfiguration extends UIElementProps {}\n\nexport class PersonalDetailsElement extends UIElement<PersonalDetailsConfiguration> {\n    public static type = TxVariants.personal_details;\n\n    get data() {\n        return this.state.data;\n    }\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources}>\n                <FormInstruction />\n                <PersonalDetails\n                    setComponentRef={this.setComponentRef}\n                    {...this.props}\n                    onChange={this.setState}\n                    {...(process.env.NODE_ENV !== 'production' && { payButton: this.payButton })}\n                />\n            </CoreProvider>\n        );\n    }\n}\n\nexport default PersonalDetailsElement;\n","import { resolveEnvironments } from '../../core/Environment';\nimport requestFastlaneToken from './services/request-fastlane-token';\nimport { convertAdyenLocaleToFastlaneLocale } from './utils/convert-locale';\nimport Script from '../../utils/Script';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport type {\n    FastlanePaymentMethodConfiguration,\n    FastlaneWindowInstance,\n    FastlaneAuthenticatedCustomerResult,\n    FastlaneShippingAddressSelectorResult,\n    FastlaneSDKConfiguration,\n    FastlaneConsentRenderState\n} from './types';\nimport type { FastlaneTokenData } from './services/request-fastlane-token';\n\nclass FastlaneSDK {\n    private readonly clientKey: string;\n    private readonly checkoutShopperURL: string;\n    private readonly locale: string;\n    private readonly forceConsentDetails: boolean;\n\n    private fastlaneSdk?: FastlaneWindowInstance;\n    private latestShopperDetails?: { email: string; customerId: string };\n    private fastlaneSessionId?: string;\n\n    constructor(configuration: FastlaneSDKConfiguration) {\n        if (!configuration?.environment) throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', \"FastlaneSDK: 'environment' property is required\");\n        if (!configuration?.clientKey) throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', \"FastlaneSDK: 'clientKey' property is required\");\n\n        if (configuration.forceConsentDetails && configuration.environment.includes('live'))\n            console.warn(\"Fastlane SDK: 'forceConsentDetails' should not be used on 'live' environment\");\n\n        const { apiUrl } = resolveEnvironments(configuration.environment);\n\n        this.checkoutShopperURL = apiUrl;\n        this.clientKey = configuration.clientKey;\n        this.forceConsentDetails = configuration.forceConsentDetails || false;\n        this.locale = convertAdyenLocaleToFastlaneLocale(configuration.locale || 'en-US');\n    }\n\n    /**\n     * Initializes the Fastlane SDK\n     */\n    public async initialize(): Promise<FastlaneSDK> {\n        const tokenData = await this.requestClientToken();\n        await this.fetchSdk(tokenData.value, tokenData.clientId);\n        await this.initializeFastlaneInstance();\n        return this;\n    }\n\n    /**\n     * Triggers the authentication for Fastlane using shopper's email.\n     * If shopper is recognized, the OTP flow is initialized.\n     *\n     * @param email\n     */\n    public async authenticate(email: string): Promise<FastlaneAuthenticatedCustomerResult> {\n        if (!this.fastlaneSdk) {\n            throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'authenticate(): Fastlane SDK is not initialized');\n        }\n\n        const { customerContextId } = await this.fastlaneSdk.identity.lookupCustomerByEmail(email);\n\n        if (customerContextId) {\n            this.latestShopperDetails = { email, customerId: customerContextId };\n            return this.fastlaneSdk.identity.triggerAuthenticationFlow(customerContextId);\n        } else {\n            return {\n                authenticationState: 'not_found',\n                profileData: undefined\n            };\n        }\n    }\n\n    /**\n     * Creates the Adyen Component configuration based on the Fastlane authentication result.\n     *\n     * In case the shopper authenticated successfully, it returns config to be used in the Fastlane component\n     * Otherwise, it returns the configuration to be used in the Card component\n     *\n     * @param authResult\n     */\n    public async getComponentConfiguration(authResult: FastlaneAuthenticatedCustomerResult): Promise<FastlanePaymentMethodConfiguration> {\n        if (!authResult) {\n            throw new AdyenCheckoutError(\n                'IMPLEMENTATION_ERROR',\n                'FastlaneSDK: you must pass the authentication result to get the component configuration'\n            );\n        }\n\n        if (authResult.authenticationState === 'succeeded') {\n            const hasCard = !!authResult.profileData?.card;\n\n            if (!hasCard) {\n                throw new AdyenCheckoutError('ERROR', 'getComponentConfiguration(): There is no card associated with the authenticated profile');\n            }\n\n            return {\n                paymentType: 'fastlane',\n                configuration: {\n                    fastlaneSessionId: this.fastlaneSessionId,\n                    email: this.latestShopperDetails.email,\n                    tokenId: authResult.profileData.card.id,\n                    lastFour: authResult.profileData.card.paymentSource.card.lastDigits,\n                    brand: authResult.profileData.card.paymentSource.card.brand.toLowerCase()\n                }\n            };\n        } else {\n            const consentDetails = await this.fetchConsentDetails();\n            return {\n                paymentType: 'card',\n                configuration: {\n                    ...(consentDetails && {\n                        fastlaneConfiguration: {\n                            fastlaneSessionId: this.fastlaneSessionId,\n                            ...consentDetails\n                        }\n                    })\n                }\n            };\n        }\n    }\n\n    /**\n     * Displays the Fastlane Shipping Address selector UI\n     */\n    public showShippingAddressSelector(): Promise<FastlaneShippingAddressSelectorResult> {\n        return this.fastlaneSdk.profile.showShippingAddressSelector();\n    }\n\n    /**\n     * Render the \"Fastlane by PayPal\" logo in the specified HTML container\n     */\n    public async mountWatermark(container: HTMLElement | string, options = { includeAdditionalInfo: true }): Promise<void> {\n        const component = await this.fastlaneSdk.FastlaneWatermarkComponent(options);\n        component.render(container);\n    }\n\n    private requestClientToken(): Promise<FastlaneTokenData> {\n        return requestFastlaneToken(this.checkoutShopperURL, this.clientKey);\n    }\n\n    private async fetchSdk(clientToken: string, clientId: string): Promise<void> {\n        const url = `https://www.paypal.com/sdk/js?client-id=${clientId}&components=buttons,fastlane`;\n        const script = new Script(url, 'body', {}, { sdkClientToken: clientToken });\n\n        await script.load();\n    }\n\n    /**\n     * Fetch the fastlane session ID used internally by PayPal for Network Token Usage event\n     * This ID is not critical for the payment processing part\n     *\n     * @private\n     */\n    private async fetchSessionIdAsync(): Promise<void> {\n        try {\n            const { sessionId } = await this.fastlaneSdk.identity.getSession();\n            this.fastlaneSessionId = sessionId;\n        } catch (error) {\n            console.warn('Fastlane SDK: Failed to fetch session ID', error);\n        }\n    }\n\n    /**\n     * Fetch object containing that details that will be used to display the sign-up UI\n     * inside the card component\n     * @private\n     */\n    private async fetchConsentDetails(): Promise<FastlaneConsentRenderState> {\n        try {\n            const consentComponent = await this.fastlaneSdk.ConsentComponent();\n            return await consentComponent.getRenderState();\n        } catch (error) {\n            throw new AdyenCheckoutError('ERROR', 'fetchConsentDetails(): failed to fetch consent details', { cause: error });\n        }\n    }\n\n    private async initializeFastlaneInstance(): Promise<void> {\n        try {\n            this.fastlaneSdk = await window.paypal.Fastlane({\n                intendedExperience: 'externalProcessorCustomConsent',\n                ...(this.forceConsentDetails && {\n                    metadata: {\n                        geoLocOverride: 'US'\n                    }\n                })\n            });\n            this.fastlaneSdk.setLocale(this.locale);\n\n            void this.fetchSessionIdAsync();\n        } catch (error) {\n            throw new AdyenCheckoutError('ERROR', 'Fastlane SDK: Failed to initialize fastlane using the window.paypal.Fastlane constructor', {\n                cause: error\n            });\n        }\n    }\n}\n\nexport default FastlaneSDK;\n","import { httpPost } from '../../../core/Services/http';\n\nexport interface FastlaneTokenData {\n    id: string;\n    clientId: string;\n    value: string;\n    expiresAt: string;\n    merchantId: string;\n}\n\nfunction requestFastlaneToken(url: string, clientKey: string): Promise<FastlaneTokenData> {\n    const path = `utility/v1/payPalFastlane/tokens?clientKey=${clientKey}`;\n    return httpPost<FastlaneTokenData>({ loadingContext: url, path, errorLevel: 'fatal' });\n}\n\nexport default requestFastlaneToken;\n","export function convertAdyenLocaleToFastlaneLocale(locale: string) {\n    return locale.replace('-', '_').toLowerCase();\n}\n","import { getTranslation } from './utils';\nimport { getLocalisedAmount } from '../utils/amount-util';\nimport AdyenCheckoutError from '../core/Errors/AdyenCheckoutError';\nimport type { CustomTranslations, LanguageOptions, Translations } from './types';\n\nexport class Language {\n    public readonly locale: string;\n    public readonly languageCode: string;\n\n    private readonly translations: Translations;\n    private readonly customTranslations: CustomTranslations;\n\n    public readonly timeFormatOptions: Intl.DateTimeFormatOptions = {\n        hour: 'numeric',\n        minute: 'numeric'\n    };\n    public readonly timeAndDateFormatOptions: Intl.DateTimeFormatOptions = {\n        year: 'numeric',\n        month: '2-digit',\n        day: '2-digit',\n        ...this.timeFormatOptions\n    };\n    public readonly timeAndDateFormatter: Intl.DateTimeFormat;\n\n    constructor(props: LanguageOptions) {\n        const { locale, translations, customTranslations } = props;\n\n        if (!locale) {\n            throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'Language: \"locale\" property is not defined');\n        }\n\n        this.locale = locale;\n        this.languageCode = this.locale.split('-')[0];\n        this.customTranslations = customTranslations || {};\n\n        this.timeAndDateFormatter = Intl.DateTimeFormat(this.locale, this.timeAndDateFormatOptions);\n\n        this.translations = {\n            ...translations,\n            ...(!!this.customTranslations[this.locale] && this.customTranslations[this.locale])\n        };\n    }\n\n    /**\n     * Returns a translated string from a key in the current {@link Language.locale}\n     * @param key - Translation key\n     * @param options - Translation options\n     * @returns Translated string\n     */\n    public get(key: string, options?): string {\n        const translation = getTranslation(this.translations, key, options);\n        if (translation !== null) {\n            return translation;\n        }\n\n        return key;\n    }\n\n    /**\n     * Returns a localized string for an amount\n     * @param amount - Amount to be converted\n     * @param currencyCode - Currency code of the amount\n     * @param options - Options for String.prototype.toLocaleString\n     */\n    public amount(amount: number, currencyCode: string, options?: object): string {\n        return getLocalisedAmount(amount, this.locale, currencyCode, options);\n    }\n\n    /**\n     * Returns a localized string for a date\n     * @param date - Date to be localized\n     * @param options - Options for {@link Date.toLocaleDateString}\n     */\n    public date(date: string, options: object = {}) {\n        if (date === undefined) return '';\n        const dateOptions: Intl.DateTimeFormatOptions = { year: 'numeric', month: '2-digit', day: '2-digit', ...options };\n        return new Date(date).toLocaleDateString(this.locale, dateOptions);\n    }\n\n    /**\n     * Returns a localized string for a date and time\n     * @param date - Date to be localized\n     */\n    public dateTime(date: string) {\n        if (date === undefined) return '';\n        return this.timeAndDateFormatter.format(new Date(date));\n    }\n}\n\nexport default Language;\n","export const RISK_DATA_VERSION = '1.0.0';\nexport const DF_VERSION = '1.0.0';\n\nexport const DEVICE_FINGERPRINT = 'deviceFingerprint';\nexport const DF_TIMEOUT = 20000;\n\nexport const FAILED_DFP_RESOLVE_OBJECT_TIMEOUT = {\n    result: {\n        type: DEVICE_FINGERPRINT,\n        value: 'df-timedOut'\n    },\n    errorCode: 'timeout'\n};\n\nexport const ERRORS = {\n    TIME_OUT: 'timeout',\n    WRONG_ORIGIN: 'wrongOrigin',\n    WRONG_DATA_TYPE: 'wrongDataType',\n    MISSING_PROPERTY: 'missingProperty',\n    UNKNOWN: 'unknownError'\n};\n\nexport const ERROR_MESSAGES = {\n    timeout: 'iframe loading timed out',\n    wrongOrigin: 'Result did not come from the expected origin',\n    wrongDataType: 'Result data was not of the expected type',\n    missingProperty: 'Result data did not contain the expected properties',\n    unknownError: 'An unknown error occurred'\n};\n","import { Component, h } from 'preact';\nimport Iframe from '../../../../components/internal/IFrame';\nimport promiseTimeout from '../../../../utils/promiseTimeout';\nimport { DEVICE_FINGERPRINT, DF_TIMEOUT, FAILED_DFP_RESOLVE_OBJECT_TIMEOUT } from '../../constants';\nimport getProcessMessageHandler from '../../../../utils/get-process-message-handler';\nimport { getOrigin } from '../../../../utils/getOrigin';\nimport { GetDeviceFingerprintProps } from './types';\n\nconst iframeName = 'dfIframe';\nconst allowProperties = 'geolocation; microphone; camera;';\n\nclass GetDeviceFingerprint extends Component<GetDeviceFingerprintProps> {\n    public postMessageDomain;\n    public processMessageHandler;\n    public deviceFingerPrintPromise;\n\n    constructor(props) {\n        super(props);\n\n        this.postMessageDomain = getOrigin(this.props.loadingContext) || this.props.loadingContext;\n    }\n\n    getDfpPromise(): Promise<any> {\n        return new Promise((resolve, reject) => {\n            /**\n             * Listen for postMessage responses from the notification url\n             */\n            this.processMessageHandler = getProcessMessageHandler(this.postMessageDomain, resolve, reject, DEVICE_FINGERPRINT);\n\n            window.addEventListener('message', this.processMessageHandler);\n        });\n    }\n\n    componentDidMount() {\n        // Get device fingerprint\n        this.deviceFingerPrintPromise = promiseTimeout(DF_TIMEOUT, this.getDfpPromise(), FAILED_DFP_RESOLVE_OBJECT_TIMEOUT);\n        this.deviceFingerPrintPromise.promise\n            .then(resolveObject => {\n                this.props.onCompleteFingerprint(resolveObject);\n                window.removeEventListener('message', this.processMessageHandler);\n            })\n            .catch(rejectObject => {\n                this.props.onErrorFingerprint(rejectObject);\n                window.removeEventListener('message', this.processMessageHandler);\n            });\n    }\n\n    render({ dfpURL }) {\n        return (\n            <div className=\"adyen-checkout-risk__device-fingerprint\">\n                <Iframe name={iframeName} src={dfpURL} allow={allowProperties} title=\"devicefingerprinting iframe\" />\n            </div>\n        );\n    }\n}\n\nexport default GetDeviceFingerprint;\n","import { Component, h } from 'preact';\nimport GetDeviceFingerprint from './GetDeviceFingerprint';\nimport handleErrorCode from './utils';\nimport { DF_VERSION } from '../../constants';\nimport { DeviceFingerprintProps, DeviceFingerprintState } from './types';\n\nclass DeviceFingerprint extends Component<DeviceFingerprintProps, DeviceFingerprintState> {\n    constructor(props) {\n        super(props);\n\n        if (props.clientKey) {\n            this.state = {\n                status: 'retrievingFingerPrint',\n                dfpURL: `${this.props.loadingContext}assets/html/${props.clientKey}/dfp.${DF_VERSION}.html`\n            };\n        }\n    }\n\n    public static defaultProps = {\n        onComplete: () => {},\n        onError: () => {}\n    };\n\n    setStatusComplete(fingerprintResult) {\n        this.setState({ status: 'complete' }, () => {\n            this.props.onComplete(fingerprintResult);\n        });\n    }\n\n    render({ loadingContext }, { dfpURL }) {\n        if (this.state.status === 'retrievingFingerPrint') {\n            return (\n                <div className=\"adyen-checkout-risk__device-fingerprint--wrapper\" style={{ position: 'absolute', width: 0, height: 0 }}>\n                    <GetDeviceFingerprint\n                        loadingContext={loadingContext}\n                        dfpURL={dfpURL}\n                        onCompleteFingerprint={fingerprintResult => {\n                            this.setStatusComplete(fingerprintResult);\n                        }}\n                        onErrorFingerprint={fingerprintError => {\n                            this.props.onError(handleErrorCode(fingerprintError.errorCode));\n                            this.setStatusComplete(fingerprintError.result);\n                        }}\n                    />\n                </div>\n            );\n        }\n\n        return null;\n    }\n}\n\nexport default DeviceFingerprint;\n","import { ERRORS, ERROR_MESSAGES, DEVICE_FINGERPRINT } from '../../constants';\n\nconst handleErrorCode = errorCode => ({\n    errorCode,\n    message: ERROR_MESSAGES[errorCode] || ERROR_MESSAGES[ERRORS.UNKNOWN],\n    type: DEVICE_FINGERPRINT\n});\n\nexport default handleErrorCode;\n","import { h } from 'preact';\nimport BaseElement from '../../components/internal/BaseElement/BaseElement';\nimport DeviceFingerprint from './components/DeviceFingerprint';\nimport base64 from '../../utils/base64';\nimport { RISK_DATA_VERSION, DEVICE_FINGERPRINT } from './constants';\nimport { BaseElementProps } from '../../components/internal/BaseElement/types';\nimport type { ICore } from '../types';\n\nexport interface RiskModuleOptions {\n    enabled: boolean;\n    onComplete?: (data) => void;\n    onError?: (error) => void;\n    node?: string;\n}\n\ninterface RiskModuleProps extends BaseElementProps {\n    risk: RiskModuleOptions;\n    loadingContext: string;\n}\n\nexport type RiskData = string | boolean;\n\nexport default class RiskElement extends BaseElement<RiskModuleProps> {\n    public static type = 'risk';\n    public static defaultProps = {\n        risk: {\n            enabled: true,\n            onComplete: () => {},\n            onError: () => {},\n            node: 'body'\n        }\n    };\n\n    private nodeRiskContainer = null;\n\n    constructor(checkout: ICore, props?) {\n        super(checkout, props);\n\n        // Populate state with null values\n        const riskElements = {\n            [DEVICE_FINGERPRINT]: null\n        };\n\n        this.setState({ data: riskElements });\n\n        if (this.props.risk.enabled === true) {\n            if (document.querySelector(this.props.risk.node)) {\n                this.nodeRiskContainer = document.createElement('div');\n                document.querySelector(this.props.risk.node).appendChild(this.nodeRiskContainer);\n                this.mount(this.nodeRiskContainer);\n            } else {\n                this.onError({ message: 'RiskModule node was not found' });\n            }\n        }\n    }\n\n    formatProps(props) {\n        return {\n            ...props,\n            risk: {\n                ...RiskElement.defaultProps.risk,\n                ...props.risk\n            }\n        };\n    }\n\n    public onComplete = result => {\n        const data = { ...this.state.data, [result.type]: result.value, persistentCookie: result.persistentCookie, components: result.components };\n        this.setState({ data, isValid: true });\n        this.props.risk.onComplete(this.data);\n        this.cleanUp();\n    };\n\n    public onError = error => {\n        this.props.risk.onError(error);\n        this.cleanUp();\n    };\n\n    get isValid() {\n        return this.state.isValid;\n    }\n\n    get data(): any {\n        if (this.isValid) {\n            const dataObj = { version: RISK_DATA_VERSION, ...this.state.data };\n            return base64.encode(JSON.stringify(dataObj));\n        }\n\n        return false;\n    }\n\n    public get enabled() {\n        return this.props.risk.enabled;\n    }\n\n    public cleanUp = () => {\n        if (this.nodeRiskContainer && this.nodeRiskContainer.parentNode) this.nodeRiskContainer.parentNode.removeChild(this.nodeRiskContainer);\n    };\n\n    componentWillUnmount() {\n        this.cleanUp();\n    }\n\n    render() {\n        return <DeviceFingerprint {...this.props} loadingContext={this.props.loadingContext} onComplete={this.onComplete} onError={this.onError} />;\n    }\n}\n","export function filterAllowedPaymentMethods(pm) {\n    return !this.length || this.indexOf(pm.type) > -1;\n}\n\nexport function filterRemovedPaymentMethods(pm) {\n    return !this.length || this.indexOf(pm.type) < 0;\n}\n\nexport function filterEcomStoredPaymentMethods(pm) {\n    return !!pm && !!pm.supportedShopperInteractions && pm.supportedShopperInteractions.includes('Ecommerce');\n}\n\nconst supportedStoredPaymentMethods = [\n    'scheme',\n    'blik',\n    'twint',\n    'ach',\n    'cashapp',\n    'paybybank_AIS_DD',\n    'payto',\n    'paybybank_pix',\n    'eft_directdebit_CA'\n];\n\nexport function filterSupportedStoredPaymentMethods(pm) {\n    return !!pm && !!pm.type && supportedStoredPaymentMethods.includes(pm.type);\n}\n","import { PaymentMethod, PaymentMethodsResponse, StoredPaymentMethod } from '../../../types/global-types';\nimport {\n    filterAllowedPaymentMethods,\n    filterEcomStoredPaymentMethods,\n    filterRemovedPaymentMethods,\n    filterSupportedStoredPaymentMethods\n} from './filters';\n\nconst processStoredPaymentMethod = (pm): StoredPaymentMethod => ({\n    ...pm,\n    storedPaymentMethodId: pm.id,\n    isStoredPaymentMethod: true\n});\n\nexport const processPaymentMethods = (paymentMethods: PaymentMethod[], { allowPaymentMethods = [], removePaymentMethods = [] }): PaymentMethod[] => {\n    if (!paymentMethods) return [];\n\n    return paymentMethods.filter(filterAllowedPaymentMethods, allowPaymentMethods).filter(filterRemovedPaymentMethods, removePaymentMethods);\n};\n\nexport const processStoredPaymentMethods = (\n    storedPaymentMethods: StoredPaymentMethod[],\n    { allowPaymentMethods = [], removePaymentMethods = [] }\n): StoredPaymentMethod[] => {\n    if (!storedPaymentMethods) return [];\n\n    return storedPaymentMethods\n        .filter(filterSupportedStoredPaymentMethods) // only display supported stored payment methods\n        .filter(filterAllowedPaymentMethods, allowPaymentMethods)\n        .filter(filterRemovedPaymentMethods, removePaymentMethods)\n        .filter(filterEcomStoredPaymentMethods) // Only accept Ecommerce shopper interactions\n        .map(processStoredPaymentMethod);\n};\n\nexport const checkPaymentMethodsResponse = (paymentMethodsResponse: PaymentMethodsResponse) => {\n    if (typeof paymentMethodsResponse === 'string') {\n        throw new Error(\n            'paymentMethodsResponse was provided but of an incorrect type (should be an object but a string was provided).' +\n                'Try JSON.parse(\"{...}\") your paymentMethodsResponse.'\n        );\n    }\n\n    if (paymentMethodsResponse instanceof Array) {\n        throw new Error(\n            'paymentMethodsResponse was provided but of an incorrect type (should be an object but an array was provided).' +\n                'Please check you are passing the whole response.'\n        );\n    }\n\n    if (paymentMethodsResponse && !paymentMethodsResponse?.paymentMethods?.length && !paymentMethodsResponse?.storedPaymentMethods?.length) {\n        console.warn('paymentMethodsResponse was provided but no payment methods were found.');\n    }\n};\n","import { PaymentMethod, PaymentMethodsResponse, StoredPaymentMethod } from '../../../types/global-types';\nimport { checkPaymentMethodsResponse, processPaymentMethods, processStoredPaymentMethods } from './utils';\n\nclass PaymentMethods {\n    public paymentMethods: PaymentMethod[] = [];\n    public storedPaymentMethods: StoredPaymentMethod[] = [];\n\n    constructor(response: PaymentMethodsResponse, options = {}) {\n        checkPaymentMethodsResponse(response);\n\n        this.paymentMethods = response ? processPaymentMethods(response.paymentMethods, options) : [];\n        this.storedPaymentMethods = response ? processStoredPaymentMethods(response.storedPaymentMethods, options) : [];\n    }\n\n    private mapCreatedComponentType(pmType: string): string {\n        // Components created as 'card' need to be matched with paymentMethod response objects with type 'scheme'\n        return pmType === 'card' ? 'scheme' : pmType;\n    }\n\n    has(paymentMethod: string): boolean {\n        return Boolean(this.paymentMethods.find(pm => pm.type === this.mapCreatedComponentType(paymentMethod)));\n    }\n\n    find(paymentMethod: string): PaymentMethod {\n        return this.paymentMethods.find(pm => pm.type === this.mapCreatedComponentType(paymentMethod));\n    }\n}\n\nexport default PaymentMethods;\n","import { get3DS2FlowProps } from '../../../components/ThreeDS2/components/utils';\nimport uuid from '../../../utils/uuid';\nimport UIElement from '../../../components/internal/UIElement';\nimport type { PaymentAction } from '../../../types/global-types';\nimport type { IRegistry } from '../../core.registry';\nimport type { ICore } from '../../types';\n\nconst createComponent = (core: ICore, registry: IRegistry, componentType, props): UIElement => {\n    const Element = registry.getComponent(componentType);\n\n    if (!Element) {\n        throw Error(`Action Element of type ${componentType} not found in the registry`);\n    }\n\n    return new Element(core, { ...props, id: `${componentType}-${uuid()}` });\n};\n\nconst getActionHandler = statusType => {\n    return (core: ICore, registry: IRegistry, action: PaymentAction, props) => {\n        const config = {\n            ...props,\n            ...action,\n            onComplete: props.onAdditionalDetails,\n            onError: props.onError,\n            statusType,\n            originalAction: action\n        };\n\n        return createComponent(core, registry, action.paymentMethodType, config);\n    };\n};\n\nconst actionTypes = {\n    redirect: (core: ICore, registry, action: PaymentAction, props) => {\n        const config = {\n            ...props,\n            ...action,\n            statusType: 'redirect',\n            originalAction: action\n        };\n\n        return createComponent(core, registry, 'redirect', config);\n    },\n\n    threeDS2: (core: ICore, registry, action: PaymentAction, props) => {\n        const componentType = action.subtype === 'fingerprint' ? 'threeDS2DeviceFingerprint' : 'threeDS2Challenge';\n\n        /**\n         * NOTE: the isMDFlow prop comes from the options object, added within the MDFlow when it calls createFromAction(action, options) to initiate a 3DS2 component\n         * It replaces the useOriginalFlow config prop that the MDFlow used to pass when directly initiating the threeDS2Fingerprint or threeDS2Challenge components\n         */\n        const paymentData = action.subtype === 'fingerprint' || props.isMDFlow ? action.paymentData : action.authorisationToken;\n\n        const config = {\n            // Props common to both flows\n            core: core,\n            token: action.token,\n            paymentData,\n            onActionHandled: props.onActionHandled,\n            onComplete: props.isMDFlow ? props.onComplete : props.onAdditionalDetails,\n            onError: props.onError,\n            isDropin: !!props.isDropin,\n            loadingContext: props.loadingContext,\n            clientKey: props.clientKey,\n            paymentMethodType: props.paymentMethodType,\n            challengeWindowSize: props.challengeWindowSize, // always pass challengeWindowSize in case it's been set directly in the handleAction config object\n            isMDFlow: props.isMDFlow,\n            modules: {\n                analytics: props.modules?.analytics,\n                resources: props.modules?.resources\n            },\n\n            // Props unique to a particular flow\n            ...get3DS2FlowProps(action.subtype, props)\n        };\n\n        return createComponent(core, registry, componentType, config);\n    },\n\n    voucher: getActionHandler('custom'),\n    qrCode: getActionHandler('custom'),\n    await: getActionHandler('custom'),\n    bankTransfer: getActionHandler('custom'),\n    sdk: getActionHandler('custom')\n} as const;\n\nexport default actionTypes;\n","class NonPersistentStorage {\n    private storage;\n\n    constructor() {\n        this.storage = {};\n    }\n\n    get length() {\n        return Object.keys(this.storage).length;\n    }\n\n    key(index) {\n        return Object.keys(this.storage)[index];\n    }\n    getItem(keyName) {\n        return this.storage[keyName] || null;\n    }\n    setItem(keyName, keyValue) {\n        return (this.storage[keyName] = keyValue);\n    }\n    removeItem(keyName) {\n        delete this.storage[keyName];\n    }\n    clear() {\n        this.storage = {};\n    }\n}\n\nclass Storage<T> {\n    private readonly prefix = 'adyen-checkout__';\n    private readonly key: string;\n    private storage: globalThis.Storage | NonPersistentStorage;\n\n    constructor(key: string, storageType: 'sessionStorage' | 'localStorage') {\n        try {\n            this.storage = storageType ? window[storageType] : window.localStorage;\n            if (!this.storage) {\n                throw new Error('storage does not exist');\n            }\n        } catch (e) {\n            this.storage = new NonPersistentStorage();\n        }\n        this.key = this.prefix + key;\n    }\n\n    public get(): T {\n        try {\n            return JSON.parse(this.storage.getItem(this.key));\n        } catch (err) {\n            return null;\n        }\n    }\n\n    public set(value: T) {\n        this.storage.setItem(this.key, JSON.stringify(value));\n    }\n\n    public remove() {\n        this.storage.removeItem(this.key);\n    }\n\n    public clear() {\n        this.storage.clear();\n    }\n\n    public keyByIndex(index) {\n        return this.storage.key(index);\n    }\n\n    get length() {\n        return this.storage.length;\n    }\n}\n\nexport default Storage;\n","import { httpPost } from '../http';\nimport Storage from '../../../utils/Storage';\nimport { CheckoutAttemptIdSession, CollectIdEvent, CollectIdProps, TelemetryEvent } from './types';\n\nexport const FAILURE_MSG =\n    'WARNING: Failed to retrieve \"checkoutAttemptId\". Consequently, analytics will not be available for this payment. The payment process, however, will not be affected.';\n\n/**\n * If the checkout attempt ID was stored more than fifteen minutes ago, then we should request a new ID.\n * More here: COWEB-1099\n */\nfunction confirmSessionDurationIsMaxFifteenMinutes(checkoutAttemptIdSession: CheckoutAttemptIdSession): boolean {\n    if (!checkoutAttemptIdSession?.id) return false;\n\n    const fifteenMinInMs = 1000 * 60 * 15;\n    const fifteenMinAgoTimestamp = Date.now() - fifteenMinInMs;\n    return checkoutAttemptIdSession.timestamp > fifteenMinAgoTimestamp;\n}\n\n/**\n * Send an event to Adyen with some basic telemetry info and receive a checkoutAttemptId in response\n * @param config - object containing values needed to calculate the url for the request; and also some that need to be serialized and included in the body of request\n * @returns a function returning a promise containing the response of the call (an object containing a checkoutAttemptId property)\n */\n// const collectId = ({ analyticsContext, clientKey, locale, amount }: CollectIdProps) => { // TODO - amount will be supported in the future\nconst collectId = ({ analyticsContext, clientKey, locale, analyticsPath, bundleType }: CollectIdProps) => {\n    let promise;\n\n    const options = {\n        errorLevel: 'fatal' as const, // ensure our catch block is called\n        loadingContext: analyticsContext,\n        path: `${analyticsPath}?clientKey=${clientKey}`\n    };\n\n    return (event: CollectIdEvent): Promise<string> => {\n        const telemetryEvent: TelemetryEvent = {\n            // amount,  // TODO will be supported in the future\n            version: process.env.VERSION,\n            // The data team want both platform & channel properties:\n            channel: 'Web',\n            platform: 'Web',\n            buildType: bundleType,\n            locale,\n            referrer: window.location.href,\n            screenWidth: window.screen.width,\n            ...event\n        };\n\n        if (promise) return promise; // Prevents multiple standalone components on the same page from making multiple calls to collect a checkoutAttemptId\n        if (!clientKey) return Promise.reject('no-client-key');\n\n        const storage = new Storage<CheckoutAttemptIdSession>('checkout-attempt-id', 'sessionStorage');\n        const checkoutAttemptIdSession = storage.get();\n\n        // In some cases, e.g. where the merchant has redirected the shopper and then returned them to checkout, we still have a valid checkoutAttemptId\n        // so there is no need for the re-initialised Checkout to generate another one\n        if (confirmSessionDurationIsMaxFifteenMinutes(checkoutAttemptIdSession)) {\n            return Promise.resolve(checkoutAttemptIdSession.id);\n        }\n\n        promise = httpPost(options, telemetryEvent)\n            .then(conversion => {\n                if (conversion?.checkoutAttemptId) {\n                    storage.set({ id: conversion.checkoutAttemptId, timestamp: Date.now() });\n                    return conversion.checkoutAttemptId;\n                }\n                return undefined;\n            })\n            .catch(() => {\n                return Promise.reject(FAILURE_MSG);\n            });\n\n        return promise;\n    };\n};\n\nexport default collectId;\n","import { HttpOptions, httpPost } from '../Services/http';\nimport { AnalyticsObject, EventQueueProps } from './types';\n\ninterface CAActions {\n    channel: 'Web';\n    platform: 'Web';\n    info: AnalyticsObject[];\n    errors: AnalyticsObject[];\n    logs: AnalyticsObject[];\n}\n\nexport interface EventsQueueModule {\n    add: (t: string, o: AnalyticsObject) => void;\n    run: (id: string) => Promise<any>;\n    getQueue: () => CAActions;\n}\n\nconst EventsQueue = ({ analyticsContext, clientKey, analyticsPath }: EventQueueProps): EventsQueueModule => {\n    const caActions: CAActions = {\n        channel: 'Web',\n        platform: 'Web',\n        info: [],\n        errors: [],\n        logs: []\n    };\n\n    const runQueue = (checkoutAttemptId: string): Promise<any> => {\n        if (!caActions.info.length && !caActions.logs.length && !caActions.errors.length) {\n            return Promise.resolve(null);\n        }\n\n        const options: HttpOptions = {\n            errorLevel: 'silent' as const,\n            loadingContext: analyticsContext,\n            path: `${analyticsPath}/${checkoutAttemptId}?clientKey=${clientKey}`\n        };\n\n        return httpPost(options, caActions)\n            .then(() => {\n                // Succeed, silently\n                return undefined;\n            })\n            .catch(() => {\n                // Caught, silently, at http level. We do not expect this catch block to ever fire, but... just in case...\n                console.debug('### EventsQueue:::: send has failed');\n            });\n    };\n\n    return {\n        add: (type, actionObj) => {\n            caActions[type].push(actionObj);\n        },\n\n        run: (checkoutAttemptId: string) => {\n            const promise = runQueue(checkoutAttemptId);\n\n            caActions.info = [];\n            caActions.errors = [];\n            caActions.logs = [];\n\n            return promise;\n        },\n\n        // Expose getter for testing purposes\n        getQueue: () => caActions\n    };\n};\n\nexport default EventsQueue;\n","import CollectId from '../Services/analytics/collect-id';\nimport EventsQueue, { EventsQueueModule } from './EventsQueue';\nimport { AnalyticsEventCategory, AnalyticsInitialEvent, AnalyticsObject, AnalyticsProps } from './types';\nimport { ANALYTIC_LEVEL, ANALYTICS_INFO_TIMER_INTERVAL, ANALYTICS_PATH, ANALYTICS_EVENT } from './constants';\nimport { debounce } from '../../utils/debounce';\nimport { AnalyticsModule } from '../../types/global-types';\nimport { processAnalyticsData } from './utils';\nimport { AnalyticsEvent } from './AnalyticsEvent';\n\nlet capturedCheckoutAttemptId = null;\nlet sendEventsTimerId = null;\n\nconst Analytics = ({ locale, clientKey, analytics, amount, analyticsContext, bundleType }: AnalyticsProps): AnalyticsModule => {\n    const defaultProps = {\n        enabled: true,\n        checkoutAttemptId: null,\n        analyticsData: {}\n    };\n\n    const props = { ...defaultProps, ...analytics };\n\n    const collectId = CollectId({ analyticsContext, clientKey, locale, amount, analyticsPath: ANALYTICS_PATH, bundleType });\n    const eventsQueue: EventsQueueModule = EventsQueue({ analyticsContext, clientKey, analyticsPath: ANALYTICS_PATH });\n\n    const sendAnalyticsEvents = () => {\n        if (capturedCheckoutAttemptId) {\n            return eventsQueue.run(capturedCheckoutAttemptId);\n        }\n        return Promise.resolve(null);\n    };\n\n    const addAnalyticsEvent = (eventCat: AnalyticsEventCategory, obj: AnalyticsObject) => {\n        const arrayName = eventCat === ANALYTICS_EVENT.info ? eventCat : `${eventCat}s`;\n        eventsQueue.add(`${arrayName}`, obj);\n\n        /**\n         * The logic is:\n         *  - info events are stored until a log or error comes along,\n         *  but, if after a set time, no other analytics event (log or error) has come along then we send the info events anyway\n         */\n        if (eventCat === ANALYTICS_EVENT.info) {\n            clearTimeout(sendEventsTimerId);\n            sendEventsTimerId = setTimeout(() => void sendAnalyticsEvents(), ANALYTICS_INFO_TIMER_INTERVAL);\n        }\n\n        /**\n         * The logic is:\n         *  - errors and logs get sent straightaway\n         *  ...but... tests with the 3DS2 process show that many logs can happen almost at the same time (or you can have an error followed immediately by a log),\n         *  so instead of making several sequential api calls we see if we can \"batch\" them using debounce\n         */\n        if (eventCat === ANALYTICS_EVENT.log || eventCat === ANALYTICS_EVENT.error) {\n            clearTimeout(sendEventsTimerId); // clear any timer that might be about to dispatch the info events array\n\n            debounce(sendAnalyticsEvents)();\n        }\n    };\n\n    return {\n        /**\n         * Make \"setup\" call, to pass containerWidth, buildType, channel etc, and receive a checkoutAttemptId in return\n         * @param initialEvent -\n         */\n        setUp: async (initialEvent: AnalyticsInitialEvent) => {\n            const { payload, enabled } = props; // TODO what is payload, is it ever used?\n            const level = enabled ? ANALYTIC_LEVEL.all : ANALYTIC_LEVEL.initial;\n            const analyticsData = processAnalyticsData(props.analyticsData);\n            if (!capturedCheckoutAttemptId) {\n                try {\n                    capturedCheckoutAttemptId = await collectId({\n                        ...initialEvent,\n                        ...(payload && { ...payload }),\n                        ...(Object.keys(analyticsData).length && { ...analyticsData }),\n                        ...{ level }\n                    });\n                } catch (e: any) {\n                    console.warn(`Fetching checkoutAttemptId failed.${e ? ` Error=${e}` : ''}`);\n                }\n            }\n        },\n\n        getCheckoutAttemptId: (): string => capturedCheckoutAttemptId,\n\n        // Expose getter for testing purposes\n        getEventsQueue: () => eventsQueue,\n\n        getEnabled: () => props.enabled,\n\n        sendAnalytics: (analyticsObj: AnalyticsEvent): boolean => {\n            if (!props.enabled) return false;\n\n            const eventCategory: AnalyticsEventCategory = analyticsObj.getEventCategory();\n\n            addAnalyticsEvent(eventCategory, analyticsObj);\n\n            return true;\n        }\n    } as AnalyticsModule;\n};\n\nexport default Analytics;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { CheckoutSessionPaymentResponse } from '../../CheckoutSession/types';\nimport { API_ERROR_CODE, API_VERSION } from './constants';\n\n/**\n */\nfunction makePayment(paymentRequest, session: Session): Promise<CheckoutSessionPaymentResponse> {\n    const path = `${API_VERSION}/sessions/${session.id}/payments?clientKey=${session.clientKey}`;\n    const data = {\n        sessionData: session.data,\n        ...paymentRequest\n    };\n\n    return httpPost({ loadingContext: session.loadingContext, path, errorLevel: 'fatal', errorCode: API_ERROR_CODE.makePayments }, data);\n}\n\nexport default makePayment;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { API_ERROR_CODE, API_VERSION } from './constants';\nimport { CheckoutSessionDetailsResponse } from '../../CheckoutSession/types';\n\n/**\n */\nfunction submitDetails(details, session: Session): Promise<CheckoutSessionDetailsResponse> {\n    const path = `${API_VERSION}/sessions/${session.id}/paymentDetails?clientKey=${session.clientKey}`;\n    const data = {\n        ...(session.data && { sessionData: session.data }),\n        ...details\n    };\n\n    return httpPost({ loadingContext: session.loadingContext, path, errorLevel: 'fatal', errorCode: API_ERROR_CODE.submitPaymentDetails }, data);\n}\n\nexport default submitDetails;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { CheckoutSessionSetupResponse, SetupSessionOptions } from '../../CheckoutSession/types';\nimport { API_VERSION } from './constants';\n\nfunction setupSession(session: Session, options: SetupSessionOptions): Promise<CheckoutSessionSetupResponse> {\n    const path = `${API_VERSION}/sessions/${session.id}/setup?clientKey=${session.clientKey}`;\n    const data = {\n        browserInfo: options.browserInfo,\n        sessionData: session.data,\n        ...(options.order\n            ? {\n                  order: { orderData: options.order.orderData, pspReference: options.order.pspReference }\n              }\n            : {})\n    };\n\n    return httpPost<CheckoutSessionSetupResponse>(\n        {\n            loadingContext: session.loadingContext,\n            path,\n            errorLevel: 'fatal'\n        },\n        data\n    );\n}\n\nexport default setupSession;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { CheckoutSessionBalanceResponse } from '../../CheckoutSession/types';\nimport { API_VERSION } from './constants';\n\n/**\n */\nfunction checkBalance(paymentRequest, session: Session): Promise<CheckoutSessionBalanceResponse> {\n    const path = `${API_VERSION}/sessions/${session.id}/paymentMethodBalance?clientKey=${session.clientKey}`;\n    const data = {\n        sessionData: session.data,\n        ...paymentRequest\n    };\n\n    return httpPost({ loadingContext: session.loadingContext, path, errorLevel: 'fatal' }, data);\n}\n\nexport default checkBalance;\n","import { CheckoutSession } from './types';\nimport AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nexport function sanitizeSession(session): Partial<CheckoutSession> {\n    if (!session || !session.id) {\n        throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'Invalid session');\n    }\n\n    const { shopperLocale, shopperEmail, telephoneNumber, id } = session;\n\n    return {\n        id,\n        ...(session.sessionData ? { sessionData: session.sessionData } : {}),\n        ...(shopperLocale && { shopperLocale }),\n        ...(shopperEmail && { shopperEmail }),\n        ...(telephoneNumber && { telephoneNumber })\n    };\n}\n","import makePayment from '../Services/sessions/make-payment';\nimport submitDetails from '../Services/sessions/submit-details';\nimport setupSession from '../Services/sessions/setup-session';\nimport checkBalance from '../Services/sessions/check-balance';\nimport Storage from '../../utils/Storage';\nimport createOrder from '../Services/sessions/create-order';\nimport { sanitizeSession } from './utils';\nimport {\n    CheckoutSession,\n    CheckoutSessionBalanceResponse,\n    CheckoutSessionDetailsResponse,\n    CheckoutSessionOrdersResponse,\n    CheckoutSessionPaymentResponse,\n    CheckoutSessionSetupResponse,\n    SessionConfiguration,\n    SetupSessionOptions\n} from './types';\nimport cancelOrder from '../Services/sessions/cancel-order';\nimport { onOrderCancelData } from '../../components/Dropin/types';\nimport type { AdditionalDetailsData } from '../types';\nimport collectBrowserInfo from '../../utils/browserInfo';\n\nclass Session {\n    private readonly session: CheckoutSession;\n    private readonly storage: Storage<CheckoutSession>;\n    public readonly clientKey: string;\n    public readonly loadingContext: string;\n    public configuration: SessionConfiguration;\n\n    constructor(rawSession: Partial<CheckoutSession>, clientKey: string, loadingContext: string) {\n        const session = sanitizeSession(rawSession) as CheckoutSession;\n\n        if (!clientKey) throw new Error('No clientKey available');\n        if (!loadingContext) throw new Error('No loadingContext available');\n\n        this.storage = new Storage('session', 'localStorage');\n        this.clientKey = clientKey;\n        this.loadingContext = loadingContext;\n        this.session = session;\n\n        if (!this.session.sessionData) {\n            this.session = this.getStoredSession();\n        } else {\n            this.storeSession();\n        }\n    }\n\n    get shopperLocale() {\n        return this.session.shopperLocale;\n    }\n\n    get id() {\n        return this.session.id;\n    }\n\n    get data() {\n        return this.session.sessionData;\n    }\n\n    /**\n     * Updates the session.data with the latest data blob\n     */\n    private updateSessionData(latestData: string): void {\n        this.session.sessionData = latestData;\n        this.storeSession();\n    }\n\n    /**\n     * Fetches data from a session\n     */\n    setupSession(options: SetupSessionOptions): Promise<CheckoutSessionSetupResponse> {\n        const mergedOptions = { ...options, browserInfo: collectBrowserInfo() };\n        return setupSession(this, mergedOptions).then(response => {\n            if (response.configuration) {\n                this.configuration = { ...response.configuration };\n            }\n\n            if (response.sessionData) {\n                this.updateSessionData(response.sessionData);\n            }\n\n            return response;\n        });\n    }\n\n    /**\n     * Submits a session payment\n     */\n    submitPayment(data): Promise<CheckoutSessionPaymentResponse> {\n        return makePayment(data, this).then(response => {\n            if (response.sessionData) {\n                this.updateSessionData(response.sessionData);\n            }\n\n            return response;\n        });\n    }\n\n    /**\n     * Submits session payment additional details\n     */\n    submitDetails(data: AdditionalDetailsData['data']): Promise<CheckoutSessionDetailsResponse> {\n        return submitDetails(data, this).then(response => {\n            if (response.sessionData) {\n                this.updateSessionData(response.sessionData);\n            }\n\n            return response;\n        });\n    }\n\n    /**\n     * Checks the balance for a payment method\n     */\n    checkBalance(data): Promise<CheckoutSessionBalanceResponse> {\n        return checkBalance(data, this).then(response => {\n            if (response.sessionData) {\n                this.updateSessionData(response.sessionData);\n            }\n\n            return response;\n        });\n    }\n\n    /**\n     * Creates an order for the current session\n     */\n    createOrder(): Promise<CheckoutSessionOrdersResponse> {\n        return createOrder(this).then(response => {\n            if (response.sessionData) {\n                this.updateSessionData(response.sessionData);\n            }\n\n            return response;\n        });\n    }\n\n    /**\n     * Cancels an order for the current session\n     */\n    cancelOrder(data: onOrderCancelData): Promise<CheckoutSessionOrdersResponse> {\n        return cancelOrder(data.order, this).then(response => {\n            if (response.sessionData) {\n                this.updateSessionData(response.sessionData);\n            }\n\n            return response;\n        });\n    }\n\n    /**\n     * Gets the stored session but only if the current id and the stored id match\n     */\n    getStoredSession(): CheckoutSession {\n        const storedSession = this.storage.get();\n        return this.id === storedSession?.id ? storedSession : this.session;\n    }\n\n    /**\n     * Stores the session\n     */\n    storeSession(): void {\n        this.storage.set({ id: this.session.id, sessionData: this.session.sessionData });\n    }\n\n    /**\n     * Clears the stored session\n     */\n    removeStoredSession(): void {\n        this.storage.remove();\n    }\n}\n\nexport default Session;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { CheckoutSessionOrdersResponse } from '../../CheckoutSession/types';\nimport { API_ERROR_CODE, API_VERSION } from './constants';\n\n/**\n */\nfunction createOrder(session: Session): Promise<CheckoutSessionOrdersResponse> {\n    const path = `${API_VERSION}/sessions/${session.id}/orders?clientKey=${session.clientKey}`;\n    const data = {\n        sessionData: session.data\n    };\n\n    return httpPost({ loadingContext: session.loadingContext, path, errorLevel: 'fatal', errorCode: API_ERROR_CODE.createOrder }, data);\n}\n\nexport default createOrder;\n","import { httpPost } from '../http';\nimport Session from '../../CheckoutSession';\nimport { CheckoutSessionOrdersResponse } from '../../CheckoutSession/types';\nimport { API_VERSION } from './constants';\nimport { Order } from '../../../types/global-types';\n\n/**\n */\nfunction cancelOrder(order: Order, session: Session): Promise<CheckoutSessionOrdersResponse> {\n    const path = `${API_VERSION}/sessions/${session.id}/orders/cancel?clientKey=${session.clientKey}`;\n\n    const data = {\n        sessionData: session.data,\n        order: order\n    };\n\n    return httpPost({ loadingContext: session.loadingContext, path, errorLevel: 'fatal' }, data);\n}\n\nexport default cancelOrder;\n","import AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nexport interface ImageOptions {\n    extension?: string;\n    imageFolder?: string;\n    resourceContext?: string;\n    name?: string;\n    parentFolder?: string;\n    size?: string;\n    subFolder?: string;\n    svgOptions?: string;\n    type?: string;\n}\n\nexport type GetImageFnType = (name) => string;\n\nexport class Resources {\n    private readonly resourceContext: string;\n\n    constructor(cdnContext: string) {\n        if (!cdnContext) {\n            throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'Resources module: \"environmentsUrls.cdn\" is not a valid URL');\n        }\n        this.resourceContext = cdnContext;\n    }\n\n    private returnImage = ({\n        name,\n        resourceContext,\n        imageFolder = '',\n        parentFolder = '',\n        extension,\n        size = '',\n        subFolder = ''\n    }: ImageOptions): string => `${resourceContext}images/${imageFolder}${subFolder}${parentFolder}${name}${size}.${extension}`;\n\n    private getImageUrl =\n        ({ resourceContext, extension = 'svg', ...options }: ImageOptions): GetImageFnType =>\n        (name: string): string => {\n            const imageOptions: ImageOptions = {\n                extension,\n                resourceContext,\n                imageFolder: 'logos/',\n                parentFolder: '',\n                name,\n                ...options\n            };\n\n            return this.returnImage(imageOptions);\n        };\n\n    public getImage(props = {} as ImageOptions) {\n        return this.getImageUrl({ ...props, resourceContext: this.resourceContext });\n    }\n}\n","import { h, Fragment } from 'preact';\nimport { useRef, useState } from 'preact/hooks';\nimport { SRMessagesProps } from './types';\n\n// An interface for the members exposed by SRMessages to its parent\nexport interface SRMessagesRef {\n    setMessages?: (who: string[]) => void;\n}\n\nexport function SRMessages({ setComponentRef }: SRMessagesProps) {\n    const messagesRef = useRef<SRMessagesRef>({});\n    // Just call once to create the object by which we expose the members expected by the parent comp\n    if (!Object.keys(messagesRef.current).length) {\n        setComponentRef?.(messagesRef.current);\n    }\n\n    const [messages, setMessages] = useState(null);\n\n    // Expose method expected by parent\n    messagesRef.current.setMessages = (msgs: string[]) => {\n        setMessages(msgs);\n    };\n\n    return messages ? (\n        <Fragment>\n            {messages.map(msg => {\n                return (\n                    <div key={msg} className=\"adyen-checkout-sr-panel__msg\" {...(process.env.NODE_ENV !== 'production' && { 'data-testid': msg })}>\n                        {msg}\n                    </div>\n                );\n            })}\n        </Fragment>\n    ) : null;\n}\n","import { h } from 'preact';\nimport './SRPanel.scss';\nimport { AriaAttributes, SRPanelProps } from './types';\nimport BaseElement from '../../components/internal/BaseElement/BaseElement';\nimport { SRMessages, SRMessagesRef } from './SRMessages';\nimport type { ICore } from '../types';\n\n/**\n * A panel meant to hold messages that will be read out by ScreenReaders on an aria-live=\"polite\" basis\n * Expects a string or string array of message to add to the panel to be read out\n * For testing purposes can be made visible\n */\nexport class SRPanel extends BaseElement<SRPanelProps> {\n    public static type = 'srPanel';\n\n    public static defaultProps: Partial<SRPanelProps> = {\n        enabled: true,\n        node: 'body',\n        showPanel: false,\n        id: 'ariaLiveSRPanel',\n        ariaAttributes: {\n            'aria-relevant': 'all',\n            'aria-live': 'polite',\n            'aria-atomic': 'true'\n        }\n    };\n\n    private readonly srPanelContainer = null;\n\n    private readonly id;\n    private readonly showPanel;\n    private readonly _enabled: boolean;\n    private readonly _moveFocus: boolean;\n\n    private componentRef: SRMessagesRef;\n\n    constructor(checkout: ICore, props?: SRPanelProps) {\n        super(checkout, props);\n\n        this.id = this.props.id;\n        this.showPanel = process.env.NODE_ENV !== 'production' ? this.props.showPanel : false;\n        this._enabled = false;\n        this._moveFocus = this.props.moveFocus ?? true;\n\n        if (this.props.enabled) {\n            this._enabled = true;\n\n            const panelParent = document.querySelector(this.props.node);\n\n            if (panelParent) {\n                const preExistingSRPanel = document.getElementById(this.id);\n                if (preExistingSRPanel) {\n                    panelParent.removeChild(preExistingSRPanel);\n                }\n\n                this.srPanelContainer = document.createElement('div');\n                this.srPanelContainer.className = 'sr-panel-holder';\n                this.srPanelContainer.id = this.id;\n\n                panelParent.appendChild(this.srPanelContainer);\n\n                this.mount(this.srPanelContainer);\n            } else {\n                throw new Error('Component could not mount. Root node was not found.');\n            }\n        }\n    }\n\n    public setComponentRef = ref => {\n        this.componentRef = ref;\n    };\n\n    public get enabled() {\n        return this._enabled;\n    }\n\n    public get moveFocus() {\n        return this._moveFocus;\n    }\n\n    public setAriaProps(ariaAttributes: AriaAttributes): void {\n        const firstPanel = document.querySelector('[class^=\"adyen-checkout-sr-panel\"]');\n        for (const [key, value] of Object.entries(ariaAttributes)) {\n            firstPanel.setAttribute(key, value);\n        }\n        this.props = { ...this.props, ariaAttributes: { ...this.props.ariaAttributes, ...ariaAttributes } };\n    }\n\n    // A method we can expose to allow comps to set messages in this panel\n    public setMessages = (messages: string[] | string): void => {\n        if (!this.props.enabled) return;\n\n        let panelMessages = null;\n        if (messages) {\n            // Ensure panelMessages is an array\n            panelMessages = Array.isArray(messages) ? messages : [messages];\n        }\n\n        this.componentRef.setMessages(panelMessages);\n    };\n\n    render() {\n        if (!this.props.enabled) return null;\n        return (\n            <div\n                className={this.showPanel ? 'adyen-checkout-sr-panel' : 'adyen-checkout-sr-panel--sr-only'}\n                role={'log'}\n                {...this.props.ariaAttributes}\n                {...(process.env.NODE_ENV !== 'production' && { 'data-testid': this.id })}\n            >\n                <SRMessages setComponentRef={this.setComponentRef} />\n            </div>\n        );\n    }\n}\n","import UIElement from '../components/internal/UIElement/UIElement';\nimport ThreeDS2Challenge from '../components/ThreeDS2/ThreeDS2Challenge';\nimport ThreeDS2DeviceFingerprint from '../components/ThreeDS2/ThreeDS2DeviceFingerprint';\nimport Redirect from '../components/Redirect';\nimport { TxVariants } from '../components/tx-variants';\nimport type { ICore } from './types';\n\nfunction assertClassHasType(Class: any): Class is typeof UIElement {\n    const hasValidType = typeof Class.type === 'string' && !!Class.type;\n    return hasValidType;\n}\n\nexport type NewableComponent = new (checkout: ICore, props?) => UIElement;\n\nexport interface IRegistry {\n    add(...items: NewableComponent[]): void;\n    getComponent(type: string): NewableComponent | undefined;\n}\n\nconst defaultComponents = {\n    [TxVariants.redirect]: Redirect,\n    [TxVariants.threeDS2Challenge]: ThreeDS2Challenge,\n    [TxVariants.threeDS2DeviceFingerprint]: ThreeDS2DeviceFingerprint\n};\n\nclass Registry implements IRegistry {\n    public componentsMap: Record<string, NewableComponent> = defaultComponents;\n\n    public supportedTxVariants: Set<string> = new Set(Object.values(TxVariants));\n\n    public add(...items: NewableComponent[]) {\n        this.componentsMap = {\n            ...this.componentsMap,\n            ...this.createComponentsMap(items)\n        };\n    }\n\n    public getComponent(type: string): NewableComponent | undefined {\n        const Component = this.componentsMap[type];\n        if (Component) {\n            return Component;\n        }\n\n        if (this.supportedTxVariants.has(type)) {\n            return;\n        }\n\n        return Redirect;\n    }\n\n    public createComponentsMap(components: NewableComponent[]) {\n        const componentsMap = components.reduce((memo, component) => {\n            const isValid = assertClassHasType(component);\n\n            if (!isValid) {\n                console.error('CoreRegistry: Attempt to register Class failed. The Class is not a valid UIElement');\n                return memo;\n            }\n            if (component.type === 'dropin') {\n                return memo;\n            }\n\n            const supportedTxVariants = [component.type, ...component.txVariants].filter(txVariant => txVariant);\n\n            supportedTxVariants.forEach(txVariant => {\n                memo = {\n                    ...memo,\n                    [txVariant]: component\n                };\n            });\n\n            return memo;\n        }, {});\n\n        return componentsMap;\n    }\n}\n\nexport default new Registry();\n","import type { CoreConfiguration } from './types';\n\nconst defaultProps: CoreConfiguration = {\n    exposeLibraryMetadata: true,\n    showPayButton: true\n};\n\nexport { defaultProps };\n","import Language from '../language';\nimport UIElement from '../components/internal/UIElement/UIElement';\nimport RiskModule from './RiskModule';\nimport PaymentMethods from './ProcessResponse/PaymentMethods';\nimport getComponentForAction from './ProcessResponse/PaymentAction';\nimport Analytics from './Analytics';\nimport { assertConfigurationPropertiesAreValid, processGlobalOptions } from './utils';\nimport Session from './CheckoutSession';\nimport { hasOwnProperty } from '../utils/hasOwnProperty';\nimport { Resources } from './Context/Resources';\nimport { SRPanel } from './Errors/SRPanel';\nimport registry, { NewableComponent } from './core.registry';\nimport { cleanupFinalResult, sanitizeResponse, verifyPaymentDidNotFail } from '../components/internal/UIElement/utils';\nimport AdyenCheckoutError, { IMPLEMENTATION_ERROR } from './Errors/AdyenCheckoutError';\nimport { ANALYTICS_ACTION_STR } from './Analytics/constants';\nimport { THREEDS2_FULL } from '../components/ThreeDS2/constants';\nimport { DEFAULT_LOCALE } from '../language/constants';\nimport getTranslations from './Services/get-translations';\nimport { defaultProps } from './core.defaultProps';\nimport { formatCustomTranslations, formatLocale } from '../language/utils';\nimport { resolveEnvironments } from './Environment';\n\nimport type { AnalyticsModule, PaymentAction, PaymentResponseData } from '../types/global-types';\nimport type { CoreConfiguration, ICore, AdditionalDetailsData } from './types';\nimport type { Translations } from '../language/types';\nimport type { UIElementProps } from '../components/internal/UIElement/types';\nimport { AnalyticsLogEvent } from './Analytics/AnalyticsLogEvent';\nimport CancelError from './Errors/CancelError';\n\nclass Core implements ICore {\n    public session?: Session;\n    public paymentMethodsResponse: PaymentMethods;\n    public modules: Readonly<{\n        risk: RiskModule;\n        analytics: AnalyticsModule;\n        resources: Resources;\n        i18n: Language;\n        srPanel: SRPanel;\n    }>;\n    public options: CoreConfiguration;\n\n    public analyticsContext: string;\n    public loadingContext: string;\n    public cdnImagesUrl: string;\n    public cdnTranslationsUrl: string;\n\n    private components: UIElement[] = [];\n\n    public static readonly metadata = {\n        version: process.env.VERSION,\n        bundleType: process.env.BUNDLE_TYPE\n    };\n\n    public static registry = registry;\n\n    public static setBundleType(type: string): void {\n        Core.metadata.bundleType = type;\n    }\n\n    public static register(...items: NewableComponent[]) {\n        registry.add(...items);\n    }\n\n    /**\n     * Used internally by the PaymentMethod components to auto-register themselves\n     * @internal\n     */\n    public register(...items: NewableComponent[]) {\n        registry.add(...items);\n    }\n\n    public getComponent(txVariant: string) {\n        return registry.getComponent(txVariant);\n    }\n\n    constructor(props: CoreConfiguration) {\n        assertConfigurationPropertiesAreValid(props);\n\n        this.createFromAction = this.createFromAction.bind(this);\n\n        this.setOptions({ ...defaultProps, ...props });\n\n        const { apiUrl, analyticsUrl, cdnImagesUrl, cdnTranslationsUrl } = resolveEnvironments(\n            this.options.environment,\n            this.options._environmentUrls\n        );\n\n        this.loadingContext = apiUrl;\n        this.analyticsContext = analyticsUrl;\n        this.cdnImagesUrl = cdnImagesUrl;\n        this.cdnTranslationsUrl = cdnTranslationsUrl;\n\n        this.session = this.options.session && new Session(this.options.session, this.options.clientKey, this.loadingContext);\n\n        const clientKeyType = this.options.clientKey?.substring(0, 4);\n        if ((clientKeyType === 'test' || clientKeyType === 'live') && !this.loadingContext.includes(clientKeyType)) {\n            throw new AdyenCheckoutError(\n                'IMPLEMENTATION_ERROR',\n                `Error: you are using a ${clientKeyType} clientKey against the ${this.options._environmentUrls?.api || this.options.environment} environment`\n            );\n        }\n        if (clientKeyType === 'pub.') {\n            console.debug(\n                `The value you are passing as your \"clientKey\" looks like an originKey (${this.options.clientKey?.substring(0, 12)}..). Although this is supported it is not the recommended way to integrate. To generate a clientKey, see the documentation (https://docs.adyen.com/development-resources/client-side-authentication/migrate-from-origin-key-to-client-key/) for more details.`\n            );\n        }\n\n        if (this.options.exposeLibraryMetadata) {\n            window['AdyenWebMetadata'] = Core.metadata;\n        }\n    }\n\n    public async initialize(): Promise<this> {\n        await this.initializeCore();\n        this.validateCoreConfiguration();\n        await this.createCoreModules();\n        return this;\n    }\n\n    private async initializeCore(): Promise<this> {\n        if (this.session) {\n            return this.session\n                .setupSession(this.options)\n                .then(sessionResponse => {\n                    const { amount, shopperLocale, countryCode, paymentMethods, ...rest } = sessionResponse;\n\n                    this.setOptions({\n                        ...rest,\n                        amount: this.options.order ? this.options.order.remainingAmount : amount,\n                        locale: this.options.locale || shopperLocale,\n                        countryCode: this.options.countryCode || countryCode\n                    });\n\n                    this.createPaymentMethodsList(paymentMethods);\n\n                    return this;\n                })\n                .catch(error => {\n                    if (this.options.onError) this.options.onError(error);\n                    return Promise.reject(error);\n                });\n        }\n\n        this.createPaymentMethodsList();\n        return Promise.resolve(this);\n    }\n\n    private async fetchLocaleTranslations(): Promise<Translations> {\n        try {\n            return await getTranslations(this.cdnTranslationsUrl, Core.metadata.version, this.options.locale);\n        } catch (error: unknown) {\n            if (error instanceof AdyenCheckoutError) this.options.onError?.(error);\n            else this.options.onError?.(new AdyenCheckoutError('ERROR', 'Failed to fetch translation', { cause: error }));\n        }\n    }\n\n    private validateCoreConfiguration(): void {\n        // @ts-ignore This property does not exist, although merchants might be using when migrating from v5 to v6\n        if (this.options.paymentMethodsConfiguration) {\n            console.warn('WARNING:  \"paymentMethodsConfiguration\" is supported only by Drop-in.');\n        }\n\n        if (!this.options.countryCode) {\n            throw new AdyenCheckoutError(IMPLEMENTATION_ERROR, 'You must specify a countryCode when initializing checkout.');\n        }\n\n        if (!this.options.locale) {\n            this.setOptions({ locale: DEFAULT_LOCALE });\n        }\n\n        this.options.locale = formatLocale(this.options.locale);\n        this.options.translations = formatCustomTranslations(this.options.translations);\n    }\n\n    /**\n     * Method used when handling redirects. It submits details using 'onAdditionalDetails' or the Sessions flow if available.\n     *\n     * @public\n     * @see {https://docs.adyen.com/online-payments/build-your-integration/?platform=Web&integration=Components&version=5.55.1#handle-the-redirect}\n     * @param details - Details object containing the redirectResult\n     */\n    public submitDetails(details: AdditionalDetailsData['data']): void {\n        let promise = null;\n\n        if (this.options.onAdditionalDetails) {\n            promise = new Promise((resolve, reject) => {\n                this.options.onAdditionalDetails({ data: details }, undefined, { resolve, reject });\n            });\n        }\n\n        if (this.session) {\n            promise = this.session.submitDetails(details).catch(error => {\n                this.options.onError?.(error);\n                return Promise.reject(error);\n            });\n        }\n\n        if (!promise) {\n            this.options.onError?.(\n                new AdyenCheckoutError(\n                    'IMPLEMENTATION_ERROR',\n                    'It can not submit the details. The callback \"onAdditionalDetails\" or the Session is not setup correctly.'\n                )\n            );\n            return;\n        }\n\n        promise\n            .then(sanitizeResponse)\n            .then(verifyPaymentDidNotFail)\n            .then(this.afterAdditionalDetails)\n            .then((response: PaymentResponseData) => {\n                cleanupFinalResult(response);\n                this.options.onPaymentCompleted?.(response);\n            })\n            .catch((e: PaymentResponseData | Error) => {\n                if (e instanceof CancelError) {\n                    return;\n                }\n\n                cleanupFinalResult(e as PaymentResponseData);\n                this.options.onPaymentFailed?.(e as PaymentResponseData);\n            });\n    }\n\n    private readonly afterAdditionalDetails = (response: PaymentResponseData): Promise<PaymentResponseData | Error> => {\n        /**\n         * After the user is redirected back, a request to `/details` or `/paymentDetails` will be made.\n         * Typically, the response will not include an action object, except for the case of `paybybank_pix` payment method.\n         * In terms of `paybybank_pix`, the action UIElement will be created and passed to the `afterAdditionalDetails` callback, allowing it to be mounted on the page.\n         */\n        if (this.options.afterAdditionalDetails && response?.action) {\n            const actionEle = this.createFromAction(response.action);\n            this.options.afterAdditionalDetails(actionEle);\n            return Promise.reject(new CancelError('Handled by afterAdditionalDetails'));\n        }\n        return Promise.resolve(response);\n    };\n\n    /**\n     * Instantiates a new element component ready to be mounted from an action object\n     *\n     * @param action - action defining the component with the component data\n     * @param options - options that will be merged to the global Checkout props\n     * @returns new UIElement\n     */\n    public createFromAction(action: PaymentAction, options = {}): UIElement {\n        if (!action || !action.type) {\n            if (hasOwnProperty(action, 'action') && hasOwnProperty(action, 'resultCode')) {\n                throw new Error(\n                    'createFromAction::Invalid Action - the passed action object itself has an \"action\" property and ' +\n                        'a \"resultCode\": have you passed in the whole response object by mistake?'\n                );\n            }\n            throw new Error('createFromAction::Invalid Action - the passed action object does not have a \"type\" property');\n        }\n\n        if (action.type) {\n            // 'threeDS2' OR 'qrCode', 'voucher', 'redirect', 'await', 'bankTransfer`\n            const component = action.type === THREEDS2_FULL ? `${action.type}${action.subtype}` : action.paymentMethodType;\n\n            const event = new AnalyticsLogEvent({\n                type: ANALYTICS_ACTION_STR,\n                subType: action.type,\n                message: `${component} action was handled by the SDK`,\n                component\n            });\n            this.modules.analytics.sendAnalytics(event);\n\n            const props = {\n                ...this.getCorePropsForComponent(),\n                ...options\n            };\n\n            return getComponentForAction(this, registry, action, props);\n        }\n\n        return this.handleCreateError();\n    }\n\n    /**\n     * Updates global configurations, resets the internal state and remounts each element.\n     *\n     * @param options - props to update\n     * @returns this - the element instance\n     */\n    public update = (options: Partial<CoreConfiguration> = {}): Promise<this> => {\n        this.setOptions(options);\n\n        return this.initialize().then(() => {\n            this.components.forEach(component => {\n                // We update only with the new options that have been received\n                const newProps: Partial<UIElementProps> = {\n                    ...options,\n                    ...(this.session && { session: this.session })\n                };\n                component.update(newProps);\n            });\n            return this;\n        });\n    };\n\n    /**\n     * Remove the reference of a component\n     * @param component - reference to the component to be removed\n     * @returns this - the element instance\n     * // TODO: Do we need this?\n     */\n    public remove = (component): this => {\n        this.components = this.components.filter(c => c._id !== component._id);\n        component.unmount();\n\n        return this;\n    };\n\n    /**\n     * @internal\n     * Create or update the config object passed when AdyenCheckout is initialised (environment, clientKey, etc...)\n     */\n    private setOptions = (options: CoreConfiguration): void => {\n        this.options = {\n            ...this.options,\n            ...options,\n            locale: options?.locale || this.options?.locale\n        };\n    };\n\n    /**\n     * @internal\n     * @returns props for a new UIElement\n     */\n    public getCorePropsForComponent(): any {\n        const globalOptions = processGlobalOptions(this.options);\n\n        return {\n            ...globalOptions,\n            core: this,\n            i18n: this.modules.i18n,\n            modules: this.modules,\n            session: this.session,\n            loadingContext: this.loadingContext,\n            cdnContext: this.cdnImagesUrl,\n            createFromAction: this.createFromAction\n        };\n    }\n\n    public storeElementReference(element: UIElement) {\n        if (element) {\n            this.components.push(element);\n        }\n    }\n\n    /**\n     * @internal\n     */\n    private handleCreateError(paymentMethod?): never {\n        const paymentMethodName = paymentMethod?.name ?? 'The passed payment method';\n        const errorMessage = paymentMethod\n            ? `${paymentMethodName} is not a valid Checkout Component. What was passed as a txVariant was: ${JSON.stringify(\n                  paymentMethod\n              )}. Check if this payment method is configured in the Backoffice or if the txVariant is a valid one`\n            : 'No Payment Method component was passed';\n\n        throw new Error(errorMessage);\n    }\n\n    private createPaymentMethodsList(paymentMethodsResponse?: PaymentMethods): void {\n        this.paymentMethodsResponse = new PaymentMethods(this.options.paymentMethodsResponse || paymentMethodsResponse, this.options);\n    }\n\n    private async createCoreModules(): Promise<void> {\n        if (this.modules) {\n            if (process.env.NODE_ENV === 'development') {\n                console.warn('Core: Core modules are already created.');\n            }\n            return;\n        }\n\n        const translations = await this.fetchLocaleTranslations();\n\n        this.modules = Object.freeze({\n            risk: new RiskModule(this, { ...this.options, loadingContext: this.loadingContext }),\n            analytics: Analytics({\n                loadingContext: this.loadingContext,\n                analyticsContext: this.analyticsContext,\n                clientKey: this.options.clientKey,\n                locale: this.options.locale,\n                analytics: this.options.analytics,\n                amount: this.options.amount,\n                bundleType: Core.metadata.bundleType\n            }),\n            resources: new Resources(this.cdnImagesUrl),\n            i18n: new Language({\n                locale: this.options.locale,\n                translations,\n                customTranslations: this.options.translations\n            }),\n            srPanel: new SRPanel(this, { ...this.options.srConfig })\n        });\n    }\n}\n\nexport default Core;\n","import { httpGet } from './http';\nimport type { Translations } from '../../language/types';\n\nexport default async function getTranslations(cdnTranslationsUrl: string, adyenWebVersion: string, locale: string): Promise<Translations> {\n    try {\n        return await httpGet({\n            loadingContext: cdnTranslationsUrl,\n            errorLevel: 'fatal',\n            errorMessage: `Translations: Failed to fetch translations for locale \"${locale}\"`,\n            path: `sdk/${adyenWebVersion}/translations/${locale}.json`\n        });\n    } catch (error) {\n        return await httpGet({\n            loadingContext: cdnTranslationsUrl,\n            errorLevel: 'fatal',\n            errorMessage: `Translations: Couldn't fetch translation for locale \"${locale}\" nor the fallback translation \"en-US\"`,\n            path: `sdk/${adyenWebVersion}/translations/en-US.json`\n        });\n    }\n}\n","export const DEFAULT_LOCALE = 'en-US';\n","import actionTypes from './actionTypes';\nimport type { PaymentAction } from '../../../types/global-types';\nimport type { IRegistry } from '../../core.registry';\nimport type { ICore } from '../../types';\nimport UIElement from '../../../components/internal/UIElement';\n\nexport function getComponentForAction(core: ICore, registry: IRegistry, action: PaymentAction, props = {}): UIElement {\n    const nextAction = actionTypes[action.type];\n\n    if (nextAction && typeof nextAction === 'function') {\n        return nextAction(core, registry, action, props);\n    }\n\n    throw new Error('Invalid Action');\n}\n\nexport default getComponentForAction;\n","import Core from './core';\nimport { UIElement } from '../types';\nimport type { CoreConfiguration, ICore } from './types';\n\nasync function AdyenCheckout(props: CoreConfiguration): Promise<Core> {\n    const checkout = new Core(props);\n    return await checkout.initialize();\n}\n\nAdyenCheckout.register = (...items: (new (checkout: ICore, props) => UIElement)[]) => {\n    Core.register(...items);\n};\n\n/**\n * Function used by the 'auto' package to insert its bundle type information in the Core.\n * We can't inject its bundle type when bundling with Rollup (as done with the other bundle types), since 'auto' uses ES-LEGACY bundle type under the hood.\n */\nAdyenCheckout.setBundleType = (type: string) => {\n    Core.setBundleType(type);\n};\n\nexport { AdyenCheckout, Core };\n","import FastlaneSDK from './FastlaneSDK';\nimport type { FastlaneSDKConfiguration } from './types';\n\nasync function initializeFastlane(configuration: FastlaneSDKConfiguration): Promise<FastlaneSDK> {\n    const fastlane = new FastlaneSDK(configuration);\n    return await fastlane.initialize();\n}\n\nexport default initializeFastlane;\n"],"names":["n","l","u","i","o","r","f","e","c","s","a","h","p","v","y","Array","isArray","d","w","parentNode","removeChild","_","t","arguments","length","children","call","defaultProps","g","type","props","key","ref","__k","__","__b","__e","__d","__c","constructor","__v","__i","__u","vnode","k","b","this","context","x","C","base","M","push","P","__r","debounceRendering","sort","shift","__P","O","__n","namespaceURI","j","S","$","N","contains","I","nextSibling","String","L","V","insertBefore","nodeType","H","some","T","setProperty","test","A","style","cssText","replace","toLowerCase","slice","addEventListener","removeEventListener","removeAttribute","setAttribute","F","event","m","prototype","render","contextType","value","__E","q","sub","state","__h","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","forEach","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","indexOf","z","diffed","localName","document","createTextNode","createElementNS","is","data","childNodes","attributes","name","__html","innerHTML","current","unmount","componentWillUnmount","B","firstChild","G","Consumer","Provider","splice","getDerivedStateFromError","setState","componentDidCatch","forceUpdate","Promise","then","bind","resolve","setTimeout","__H","D","__N","filter","every","__m","requestAnimationFrame","clearTimeout","cancelAnimationFrame","ENCRYPTED_CARD_NUMBER","ENCRYPTED_EXPIRY_DATE","ENCRYPTED_EXPIRY_MONTH","ENCRYPTED_EXPIRY_YEAR","ENCRYPTED_SECURITY_CODE","ENCRYPTED_PWD_FIELD","ENCRYPTED_SECURITY_CODE_3_DIGITS","ENCRYPTED_SECURITY_CODE_4_DIGITS","GIFT_CARD","DEFAULT_CARD_GROUP_TYPES","NON_CREDIT_CARD_TYPE_SECURED_FIELDS","CREDIT_CARD_SF_FIELDS","ALL_SECURED_FIELDS","DEDICATED_CARD_COMPONENTS","REQUIRED","OPTIONAL","HIDDEN","CVC_POLICY_REQUIRED","CVC_POLICY_OPTIONAL","CVC_POLICY_HIDDEN","DATE_POLICY_REQUIRED","DATE_POLICY_OPTIONAL","DATE_POLICY_HIDDEN","DATA_ENCRYPTED_FIELD_ATTR","DATA_INFO","DATA_UID","BRAND_ICON_UI_EXCLUSION_LIST","BRAND_READABLE_NAME_MAP","visa","mc","amex","discover","cup","jcb","diners","maestro","bcmc","bijcard","SF_FIELDS_MAP","getProp","object","path","split","reduce","xs","undefined","ARIA_ERROR_SUFFIX","ARIA_CONTEXT_SUFFIX","ERROR_ACTION_FOCUS_FIELD","ERROR_ACTION_BLUR_SCENARIO","ERROR_FIELD_REQUIRED","ERROR_FIELD_INVALID","ERROR_INVALID_FORMAT_EXPECTS","CREDITCARD_HOLDER_NAME_INVALID","CREDITCARD_TAX_NUMBER_INVALID","BOLETO_SOCIAL_SECURITY_NUMBER_INVALID","ErrorCodePrefixes","SF_ErrorCodes","EMPTY_FIELD_ERROR_MESSAGES","validFieldsReducer","acc","cur","getErrorReducer","numDateFields","field","val","valid","mapDateFields","fieldNames","isFieldOfType","fieldIsValid","fieldName","errors","policyType","policyOptional","policyHidden","skipOptionalFields","includes","AbstractCSF","setupObj","_define_property","callbacks","config","validateForm","handleBrandFromBinLookup","callbacksHandler","configHandler","createCardSecuredFields","createNonCardSecuredFields","createSecuredFields","destroySecuredFields","handleIOSTouchEvents","destroyTouchendListener","destroyTouchstartListener","handleBinValue","handleEncryption","handleFocus","handleIframeConfigFeedback","handleValidation","handleSFShiftTab","handleShiftTab","isConfigured","postMessageToAllIframes","processAutoComplete","processBrand","sendBrandToCardSF","sendExpiryDatePolicyToSF","setFocusOnFrame","setupSecuredField","touchendListener","touchstartListener","hasGenuineTouchEvents","encryptedAttrName","hasRedundantCVCField","isSingleBrandedCard","securityCode","obj","objToString","Object","toString","prop","existy","truthy","isObjectLike","falsy","Number","isNaN","isString","keys","notFalsy","pick","args","myArgs","from","map","res","_object_spread","reject","vkeys","error","window","console","info","log","warn","handleConfig","cardGroupTypes","loadingContext","logger","str","charAt","isCreditCardType","iframeUIConfig","autoFocus","showWarnings","trimTrailingSeparator","keypadFix","legacyInputMode","minimumExpiryDate","sfLogAtStart","_b$dl","sfBundleType","btoa","location","origin","bundleType","forceCompat","TextEncoder","iframeSrc","clientKey","noop","configureCallbacks","callbacksObj","onLoad","onConfigSuccess","onFieldValid","onAllValid","onBrand","onError","onFocus","onBinValue","onAutoComplete","onAdditionalSFConfig","onAdditionalSFRemoved","onTouchstartIOS","onKeyPressed","makeCallbackObj","fieldType","encryptedFieldName","uuid","isValid","txVariant","rootNode","uid","hasOwnProperty","processErrors","pFeedbackObj","securedField","callbackFn","dataObj","isError","hasError","errorType","callbackObjectsArr","cvcPolicy","securedFields","isEncrypted","isExpiryDateField","sepExpiryDateNames","encryptedType","totalFields","callbackObj","makeCallbackObjectsValidation","endDigits","len","postMessageToIframe","pDataObj","pIframeObj","pLoadingContext","dataObjStr","JSON","stringify","postMessage","getIframeContentWin","csfState","iframeContentWindow","encryptedObjArr","encryptedObj","encryptedBlob","blob","makeCallbackObjectsEncryption","code","numKey","issuerBin","expiryDate","select","root","selector","array","querySelectorAll","selectOne","querySelector","getAttribute","node","attribute","CardType","cards","cardType","startingRules","permittedLengths","pattern","expiryDatePolicy","pBrand","card","Error","__NO_BRAND","on","callback","useCapture","off","objectsDeepEqual","xType","partial","fn","args2","apply","concat","AbstractSecuredField","sfConfig","holderEl","iframeRef","loadToConfigTimeout","_isValid","_iframeContentWindow","_numKey","_isEncrypted","_hasError","_errorType","_cvcPolicy","_expiryDatePolicy","_iframeOnLoadListener","_postMessageListener","onIframeLoadedCallback","onConfigCallback","onEncryptionCallback","onValidationCallback","onFocusCallback","onBinValueCallback","onTouchstartCallback","onShiftTabCallback","onAutoCompleteCallback","onKeyPressedCallback","addErrorTranslationsToObject","originalObj","i18n","nuObj","errorCodeIdentifier","fieldTypeToErrorCodeIdentifier","values","get","getTranslatedErrors","getErrorMessageFromCode","errorCode","codeMap","errMsg","entries","CC_NUM","CC_DAT","CC_MTH","CC_YR","CC_CVC","KCP_PWD","setSRMessagesFromErrors","fieldTypeMappingFn","SRPanelRef","isValidating","layout","countrySpecificLabels","currentErrorsSortedByLayout","sortedErrors","errObj","TREAT_AS_SF_ERROR","ERROR_MSG_IS_OBJECT","errorMessage","errorMsg","translationKey","errorI18n","mappedLabel","countrySpecificFormat","translationObject","format","label","sortErrorsByLayout","errorMsgArr","setMessages","fieldListArr","action","fieldToFocus","enhanceErrorObjectKeys","errorObj","keyPrefix","enhancedObj","addContextTranslationsToObject","contextualTexts","translation","processAriaConfig","showContextuaElement","iframeTitle","lang","locale","enhancedAriaFieldConfigObj","_object_spread_props","SecuredField","init","placeholders","showContextualElement","processedAriaConfig","ariaConfig","_placeholders_SF_FIELDS_MAP_fieldType","_placeholders_securityCodeThreeDigits","_placeholders_securityCodeFourDigits","_placeholders_SF_FIELDS_MAP_fieldType1","securityCodeThreeDigits","securityCodeFourDigits","processPlaceholders","iframeEl","src","title","policy","createElement","classList","add","trim","noIframeElContent","appendChild","createIframe","iframe","contentWindow","iframeOnLoadListener","iframeOnLoadListenerFn","postMessageListener","postMessageListenerFn","configObj","pShowWarnings","isCheckoutUrl","adyenDomain","substring","lastCharIndex","originCheckPassed","feedbackObj","parse","isWebpackPostMsg","isChromeVoxPostMsg","destroy","removeAllChildren","isOptionalOrHidden","onIframeLoaded","onEncryption","onValidation","onConfig","onTouchstart","onShiftTab","pSetupObj","super","configVarsFromSetUpObj","crypto","Math","random","ranNum","Uint32Array","getRandomValues","generateRandomNumber","NETWORK_ERROR","IMPLEMENTATION_ERROR","API_ERROR","ERROR","SDK_ERROR","AdyenCheckoutError","message","options","cause","errorTypes","isValidType","async","catch","brand","cvcText","pItem","hasSeparateDateFields","sfInitObj","extraFieldData","maskSecurityCode","exposeExpiryDate","disableIOSArrowKeys","shouldDisableIOSArrowKeys","implementationType","sf","iframeCount","numIframes","failReason","originalNumIframes","iframesLoaded","fieldClick","rest","CANCEL","SCRIPT_ERROR","__IS_IE","navigator","ua","userAgent","msie","parseInt","rv","edge","isIE","__IS_IOS","__IS_FIREFOX","targetEl","target","HTMLInputElement","HTMLTextAreaElement","caretPos","pNode","selectionStart","adjFlag","setSelectionRange","focus","nuInput","width","height","opacity","fontSize","registerFieldForIos","HTMLSpanElement","_this_callbacks_onTouchstartIOS","_this_callbacks","checkoutTouchEvent","handleTouchend","bodyEl","cursor","getPreviousTabbableNonSFElement","passedFieldType","getPrevious","matchEl","allPotentialTabEls","actualTabEls","potentialTabEl","tabIndex","isValidTabEl","bounds","getBoundingClientRect","hasDimensions","matchElIndex","arr","testFn","getIndexThruTest","tabEl","getPreviousTabbableEl","handleTab","shiftTabObj","additionalField","shiftTabGiftCard","isKCP","shiftTabKCP","shiftTabCreditCard","pAdditionalField","blur","brandObj","expiryDateObj","binLookupResponse","resetObj","isGenericCard","binBrandObj","supportedBrands","passedBrand","showExpiryDate","showSocialSecurityNumber","cardObj","enableLuhnCheck","panLength","isDualBrandSelection","csfConfig","pFieldType","doLog","focusData","objKeys","pKey","checkForBrandChange","storedBrand","csfProps","csfCallbacks","newBrandObj","newBrand","treatAsGenericCard","brandInfoObj","ACFeedbackObj","dateValArr","acMonthVal","year","acYearVal","acDateVal","autoComplete","focusString","currentFocusObject","iframeConfigCount","additionalIframeConfigured","iframesConfigured","pSecuredFields","securedFieldKeys","checkFormIsValid","validityHasChanged","allValid","binValue","encryptedBin","notConfiguredWarning","CSF","createReturnObject","updateStyles","pStyleObject","styleObject","isValidated","externalValidation","hasUnsupportedCard","unsupportedCard","brandsFromBinLookup","addSecuredField","removeSecuredField","additionalIframeRemoved","setKCPStatus","sfIsOptionalOrHidden","thisObj","initCSF","isGenericCardType","findRootNode","pRootNode","getCardImageUrl","resources","imageOptions","extension","getImage","fieldTypeToSnakeCase","ENCRYPTED","fieldIsInError","numCharsObj","errorsObj","handlers","cbObj","numCharsInField","numChars","handleOnAllValid","status","detectedUnsupportedBrands","isSfpValid","onChange","handleOnAutoComplete","autoCompleteName","handleOnFieldValid","fieldObj","prevState","handleOnLoad","csfLoadFailTimeout","csfConfigFailTimeout","csfConfigFailTimeoutMS","handleOnConfigSuccess","handleOnBrand","cardInfo","cvcFieldInError","dateFieldInError","monthFieldInError","yearFieldInError","_this_props_brandsConfiguration_cardInfo_brand","_this_props_brandsConfiguration_cardInfo_brand_icon","brandImageUrl","brandsConfiguration","icon","handleOnError","handleOnNoDataRequired","handleOnTouchstartIOS","_this_props_disableIOSArrowKeys","_this_props","handleKeyPressed","_this_props_handleKeyPress","kb","KeyboardEvent","bubbles","cancelable","handleKeyPress","SecuredFieldsProvider","Component","setRootNode","fields","match","initializeCSF","_this_props_onStateUpdate","checkForKCPFields","onStateUpdate","csf","_this_props_placeholders","csfSetupObj","brands","sfStyles","styles","hasKoreanFields","csfLoadFailTimeoutMS","needsKoreanFields","koreanAuthenticationRequired","issuingCountryCode","countryCode","setRemovedFieldState","setAddedFieldState","handleUnsupportedCard","detectedBrands","setFocusOn","frame","stylesObj","showValidation","getErrorObject","mapErrorsToValidationRuleResult","processBinLookupResponse","resetObject","mustResetDedicatedBrand","input","stateObj","AddressModeOptions","CardInputDefaultProps","setComponentRef","billingAddressAllowedCountries","billingAddressMode","full","billingAddressRequired","billingAddressRequiredFields","configuration","socialSecurityNumberMode","billingAddress","enableStoreDetails","hasHolderName","holderNameRequired","hasCVC","hideCVC","installmentOptions","positionHolderNameOnTop","showBrandIcon","showInstallmentAmounts","isPayButtonPrimaryVariant","onBlur","cleanCPFCNPJ","formatCPFCNPJ","cleanValue","formattedValue","g1","g2","g3","g4","g5","maskCNPJ","maskCPF","ssn","getMaxLengthByFieldAndCountry","formattingRules","country","ignoreIfFormatterExists","formatterFn","maxLength","maxlength","MAX_LENGTH","isEmpty","SPECIAL_CHARS","getFormattingRegEx","specChars","flags","RegExp","cardInputFormatters","socialSecurityNumber","cardInputValidationRules","modes","validate","validateSSN","taxNumber","holderName","default","containsExcludedBrand","brandsArr","excludedBrands","cloneBrandsArr","item","removeExcludedBrand","mainBrand1","mainBrand2","clonedBrands","reverse","extensions","refs","states","hasPanLengthRef","sfp","dualBrandSelectElements","setDualBrandSelectElements","setSelectedBrandValue","setIssuingCountryCode","processBinLookup","isReset","issuingCode","brandToReset","hasExcludedBrand","switcherObj","brandObjArr","leadBrand","subBrand","id","brandObject","selectedBrandValue","createCardVariantSwitcher","handleDualBrandSelection","Event","ValidationRuleResult","isValidatingForm","shouldValidate","rule","mode","ValidationResult","validationResults","result","Boolean","getError","find","getAllErrors","results","Validator","setRules","newRules","rules","getRulesFor","_this_rules_field","fieldRules","validationRulesResult","omitKeys","omit","addKeys","initialValue","defaultData","pendingData","schema","processField","fieldProblems","getProcessedState","fieldKey","validationResult","formData","useForm","formatters","validator","useMemo","fieldContext","formatter","isFormatterObject","dispatch","useReducer","formValue","selectedSchema","validationSchema","validation","oldValue","mergedState","defaultState","removedSchemaFields","newSchemaFields","local","formValidation","getReducer","triggerValidation","useCallback","setErrors","setValid","setData","mergeData","setSchema","mergeForm","setFieldProblems","useEffect","handleChangeFor","getTargetValue","HOLDER_NAME","SSN_FIELD","CREDIT_CARD","CREDIT_CARD_NAME_TOP","CREDIT_CARD_NAME_BOTTOM","KCP_FIELDS","KCP_CARD","KCP_CARD_NAME_TOP","KCP_CARD_NAME_BOTTOM","SSN_CARD","SSN_CARD_NAME_TOP","SSN_CARD_NAME_BOTTOM","FALLBACK_VALUE","ADDRESS_SCHEMA","STREET","HOUSE_NUMBER_OR_NAME","POSTAL_CODE","CITY","STATE_OR_PROVINCE","COUNTRY","ADDRESS_SPECIFICATIONS","AU","hasDataset","labels","optionalFields","BR","CA","GB","US","PARTIAL_ADDRESS_SCHEMA","COUNTRIES_WITH_CUSTOM_SPECIFICATION","CoreContext","createContext","CoreProvider","toChildArray","useCoreContext","useContext","useImage","THREEDS2_FINGERPRINT","THREEDS2_FINGERPRINT_ERROR","THREEDS2_FINGERPRINT_SUBMIT","THREEDS2_CHALLENGE","THREEDS2_CHALLENGE_ERROR","THREEDS2_FULL","THREEDS2_NUM","MISSING_TOKEN_IN_ACTION_MSG","DEFAULT_CHALLENGE_WINDOW_SIZE","TIMEOUT","CHALLENGE_TIMEOUT_REJECT_OBJECT","transStatus","FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT","threeDSCompInd","CHALLENGE_WINDOW_SIZES","isValidHttpUrl","string","allowHttp","url","URL","protocol","VALID_KEYS","isConfigurationValid","showConsent","defaultToggleState","termsAndConditionsLink","privacyPolicyLink","termsAndConditionsVersion","mapFieldKey","handlePartialAddressMode","addressMode","getFullBrandName","mapDualBrandButtons","imageName","imageURL","localeBrand","altName","Specifications","countryHasDataset","_this_specifications_country","_this_specifications","specifications","countryHasOptionalField","_this_specifications_country_optionalFields","getAddressSchemaForCountry","getAddressLabelsForCountry","getOptionalFieldsForCountry","_this_specifications_default","getKeyForField","_this_specifications_country_labels","_this_specifications_default_labels","_this_specifications1","getPlaceholderKeyForField","_this_specifications_country_placeholders","_this_specifications_default_placeholders","getAddressSchemaForCountryFlat","flat","element","hasOwn","classNames","classes","arg","appendClass","parseValue","newClass","module","exports","Spinner","inline","size","div","data-testid","className","LoadingWrapper","wrapperClass","position","CVCHint","frontCVC","fieldLabel","onClick","span","svg","viewBox","fill","xmlns","aria-hidden","role","rect","rx","stroke","Icon","alt","iconUrl","imageFolder","img","cx","idCounter","Date","now","getUniqueId","prefix","PREFIX","uuidv4","Field","classNameModifiers","dir","disabled","readOnly","helper","inputWrapperModifiers","isLoading","labelEndAdornment","onFieldBlur","onFocusField","showValidIcon","useLabelElement","showErrorElement","staticValue","contextualText","filled","propsFilled","focused","propsFocused","contextVisibleToScreenReader","renderAlternativeToLabel","onInputContainerClick","contextVisibleToSR","showError","showContext","uniqueId","useRef","staticValueId","setFocused","useState","setFilled","onFocusHandler","onBlurHandler","renderLabelOrAlternativeContents","Fragment","data-id","renderInputRelatedElements","errorElem","contextualElem","child","cloneElement","isInvalid","LabelOrAlternative","isSecuredField","defaultWrapperProps","htmlFor","DataSfSpan","encryptedFieldType","alternativeLabelContent","CVC","fieldClassnames","cvcClassnames","imageDescription","InputBase","_param","setRef","_object_without_properties","autoCorrect","readonly","spellCheck","handleInput","onInput","onKeyPress","handleKeyUp","onKeyUp","handleBlur","trimOnBlur","inputClassNames","cnm","iiv","iv","addContextualElement","ace","newProps","aria-required","required","aria-describedby","aria-invalid","InputText","StoredCardFields","focusedElement","lastFour","expiryMonth","expiryYear","ariaLabel","isAmex","cvcContextualText","aria-label","encryptedSecurityCode","Fieldset","description","describedById","fieldset","legend","RadioGroup","items","uniqueIdBase","lastIndexOf","checked","Img","backgroundUrl","showOnError","loaded","setLoaded","imageRef","handleLoad","modifier","image","Image","onload","complete","SelectButtonElement","filterable","toggleButtonRef","strippedProps","button","ariaDescribedBy","SelectButton","active","selected","inputText","showList","isShowingPlaceholder","displayText","selectedOptionName","placeholder","displayInputText","onClickHandler","preventDefault","activeElement","filterInputRef","toggleList","currentSelectedItemId","onKeyDown","onButtonKeyDown","allowIdOnButton","aria-autocomplete","aria-controls","selectListId","aria-expanded","aria-owns","aria-activedescendant","secondaryText","classnames","SelectListItem","li","aria-disabled","aria-selected","data-disabled","data-value","onSelect","onMouseEnter","onHover","SelectList","filteredItems","ul","selectListRef","arrowDown","arrowUp","enter","escape","space","tab","simulateFocusScroll","parent","parentComputedStyle","getComputedStyle","parentBorderTopWidth","getPropertyValue","overTop","offsetTop","scrollTop","overBottom","clientHeight","Select","selectedValue","disableTextFilter","clearOnSelect","blurOnClose","onListToggle","selectContainerRef","textFilter","setTextFilter","setShowList","setInputText","activeOption","setActiveOption","selectedOption","scrollToItem","nextElement","getElementById","closeList","openList","extractItemFromEvent","currentTarget","listItem","handleSelect","valueToEmit","HTMLElement","handleNavigationKeys","possibleNextIndex","findIndex","nextIndex","nextItem","setNextActive","setPreviousActive","handleClickOutside","composedPath","shiftKey","Installments","amount","installmentAmount","setInstallmentAmount","preselectedValue","radioBtnValue","setRadioBtnValue","hasRadioButtonUI","plans","onSelectInstallment","selectedInstallments","onRadioSelect","selectedBtn","installmentItemsMapper","translationObj","divider","count","times","partialValue","currency","plan","formatLocale","localeParam","languageCode","fullLocale","toUpperCase","join","replaceTranslationValues","interpolateElement","renderFunctions","matches","floor","term","index","indexInFunctionArray","Link","to","href","rel","DisclaimerMessage","urls","LabelOnlyDisclaimerMessage","messageIsStr","validUrls","StoredCardFieldsWrapper","sfpState","hasInstallments","handleInstallments","showAmountsInInstallments","disclaimerMessage","linkText","link","BrandIcon","imageUrl","hasLoaded","setHasLoaded","DualBrandingIcon","dataValue","CardNumber","dualBrandingElements","handleIconClick","ExpirationDate","AvailableBrands","activeBrand","CardFields","brandsIcons","allowedBrands","encryptedCardNumber","encryptedExpiryMonth","encryptedExpiryYear","encryptedExpiryDate","InputTelephone","KCPAuthentication","taxNumberLabel","onFieldFocusAnalytics","onFieldBlurAnalytics","minLength","encryptedPasswordState","SocialSecurityNumberBrazil","autocorrect","spellcheck","Checkbox","StoreDetails","storeDetails","setValue","ReadOnlyAddress","street","houseNumberOrName","city","postalCode","stateOrProvince","br","createFormatByDigits","digits","specialCharsRegEx","formattingFn","trimStart","trimValWithOneSpace","addressFormatters","countrySpecificFormatters","specificRule","AT","BE","BG","nuVal","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GR","HR","HU","IE","IS","IT","LI","LT","LU","LV","MC","MT","MY","NL","NZ","NO","PL","PT","RO","SI","SE","SG","SK","JP","createPatternByDigits","validatePostalCode","validatorRules","postalCodePatterns","GE","getPartialAddressValidationRules","validationRules","getAddressValidationRules","addressValidationRules","selectedCountry","FALLBACK_CONTEXT","GENERIC_OPTIONS","DEFAULT_HTTP_TIMEOUT","http","AbortSignal","headers","errorLevel","method","timeout","request","cache","credentials","Accept","redirect","referrerPolicy","signal","body","fetch","response","json","ok","isAdyenApiErrorResponse","handleFetchError","level","httpGet","httpPost","getDataset","StateField","onDropdownChange","setStates","useLayoutEffect","newStates","formatCountries","countries","allowedCountries","applyMapper","CountryField","setCountries","setReadOnly","newCountries","FieldContainer","isOptional","labelKey","optionalLabel","getErrorMessage","debounce","ms","timeoutId","AddressSearch","onAddressLookup","onAddressSelected","onManualAddress","externalErrorMessage","hideManualButton","addressSearchDebounceMs","formattedData","setFormattedData","originalData","setOriginalData","setErrorMessage","handlePromiseReject","reason","onTextInput","inputValue","searchArray","debounceInputHandler","fullData","Address","requiredFields","visibility","iOSFocusedField","addressRef","requiredFieldsSchema","hasSelectedAddress","setHasSelectedAddress","useManualAddress","setUseManualAddress","searchErrorMessage","setSearchErrorMessage","showAddressSearch","ignoreCountryChange","setIgnoreCountryChange","showAddressFields","setSearchData","selectedAddress","newStateData","propKey","providedValue","enabledFields","newData","stateFieldIsRequired","countryHasStatesDataset","addressShouldHaveState","processedData","isRequired","newValue","getComponent","addressSchema","CardHolderName","autocomplete","RadioButtonIcon","showRadioIcon","RadioGroupExtended","showSelectedTick","invalidClassName","CardFieldsWrapper","formErrors","formValid","showKCP","showBrazilianSSN","handleOnStoreDetails","handleAddress","setAddressRef","partialAddressSchema","billingAddressValidationRules","showStoreDetailsCheckbox","cardHolderField","encryptedPassword","setFocusOnNonSF","nameVal","getArrayDifferences","currentArray","previousArray","comparisonKey","difference","compKey","id1","id2","FormInstruction","SRPanelContext","srPanel","setSRMessagesFromObjects","setSRMessagesFromStrings","clearSRPanel","shouldMoveFocusSR","useSRPanelContext","usePrevious","useSRPanelForCardInputErrors","retrieveLayout","setSRMessages","sortedErrorList","setSortedErrorList","previousSortedErrors","mergedErrors","extractedAddressErrors","errorsForPanel","srPanelResp","setFocusOnFirstField","latestErrorMsg","latestSRError","ERROR_MSG_UNSUPPORTED_CARD_ENTERED","ERROR_MSG_CARD_TOO_OLD","ERROR_MSG_CARD_TOO_FAR_IN_FUTURE","ERROR_MSG_CARD_EXPIRES_TOO_SOON","Toggle","labelPosition","descriptionId","computedAriaLabel","aria-readonly","mobileNumberFormatter","USOnlyPhoneInput","mobileNumber","inputRef","focusInput","replaceAll","useModal","modalElement","isOpen","isDismissible","focusFirst","focusAfterClose","onClose","rootElement","shouldTrap","firstFocusableEl","setFirstFocusableEl","focusableEl","lastFocusableEl","trapFocus","keyCode","useTrapFocus","closeModal","closeOnPressingEscape","Modal","labelledBy","describedBy","modalContainerRef","suppressKeyPress","stopPropagation","capture","aria-labelledby","aria-modal","onCloseModal","Button","variant","buttonRef","completed","buttonIcon","modifiers","buttonClasses","buttonStates","loading","buttonText","delay","_this_props_onKeyDown","FASTLANE_BENEFITS","headerKey","labelById","descriptionTextKey","altImage","InfoModal","focusFirstElement","benefit","ariaHidden","h1","InfoButton","isInfoModalOpen","setIsInfoModalOpen","handleOnClose","handleOnIconClick","ANALYTICS_PATH","ANALYTICS_SEARCH_DEBOUNCE_TIME","ANALYTICS_EVENT","ANALYTICS_ERROR_TYPE","ANALYTICS_ERROR_CODE","InfoEventTypes","ANALYTICS_SUBMIT_STR","ANALYTICS_SELECTED_STR","ANALYTICS_RENDERED_STR","ANALYTICS_DISPLAYED_STR","ANALYTICS_INPUT_STR","ANALYTICS_VALIDATION_ERROR_STR","ANALYTICS_FOCUS_STR","ANALYTICS_UNFOCUS_STR","ANALYTICS_CONFIGURED_STR","ANALYTICS_INSTANT_PAYMENT_BUTTON","ANALYTICS_FEATURED_ISSUER","ANALYTICS_LIST","ANALYTICS_LIST_SEARCH","Analytics3DS2Errors","Analytics3DS2Events","errorCodeMapping","ANALYTICS_EXPRESS_PAGES_ARRAY","ALLOWED_ANALYTICS_DATA","ANALYTIC_LEVEL","digitsOnlyFormatter","AnalyticsEvent","timestamp","component","AnalyticsInfoEvent","getEventCategory","analyticsObject","issuer","isExpress","expressPage","isStoredPaymentMethod","validationErrorCode","validationErrorMessage","configData","errCode","mapErrorCodesForAnalytics","SUPPORTED_BRANDS","FastlaneSignup","fastlaneSessionId","currentDetectedBrand","telephoneNumber","telephoneNumberFromProps","onSubmitAnalytics","shouldDisplaySignup","hasConsentFormBeenShown","setHasConsentFormBeenShown","isChecked","setIsChecked","setTelephoneNumber","isFastlaneConfigurationValid","handleToggleChange","clicked","isToggleOn","fastlaneData","consentShown","consentGiven","consentVersion","rendered","isFastlaneSignupRendered","DUAL_BRAND_BUTTON","CardInput","billingAddressRef","cardInputRef","isAutoJumping","setStatus","setFocusedElement","setIsSfpValid","setExpiryDatePolicy","setCvcPolicy","storedPaymentMethodId","showBillingAddress","none","partialAddressCountry","storePaymentMethod","setStorePaymentMethod","setBillingAddress","setShowSocialSecurityNumber","setSocialSecurityNumber","installments","setInstallments","setIOSFocusedField","internallyDetectedBrand","setInternallyDetectedBrand","showCardUIElements","setShowCardUIElements","setFormData","setFormValid","setFormErrors","fundingSource","isKorea","who","getFocusHandler","countrySpecificSchemas","hasRequiredHolderName","countrySpecificSchemasFlat","countryBasedAddressLayout","getLayout","handleTouchstartIOS","elementType","address","getAddressHandler","doPanAutoJump","panIndex","elem","subsequentFields","getAutoJumpHandler","handleSFPStateUpdate","mimicLoadingStatusChange","CIExtensions","newSchema","addressHasErrors","newErrors","errorItem","holderNameValid","sfpValid","addressValid","koreanAuthentication","socialSecurityNumberValid","sfStateErrorsObj","dualBrandsArr","dualBrands","previousSelectedBrandValue","FieldToRender","extractPropsForSFP","sfState","eventDetails","acHolderName","extractPropsForCardFields","fastlaneConfiguration","showPayButton","payButton","collectBrowserInfo","colorDepth","screenHeight","screenWidth","acceptHeader","language","javaEnabled","timeZoneOffset","getTimezoneOffset","currentRequestId","doBinLookup","requestId","mappedResponse","paymentMethodVariants","paymentMethodVariant","supported","onBinLookup","supportedBrandsRaw","SrciError","source","scheme","schemeError","errorFromCardSchemeSdk","Script","dataAttributes","isScriptLoadCalled","script","load","errorEvent","remove","scriptContainer","assign","dataset","AbstractSrcInitiator","loadSdkScript","isSdkIsAvailableOnWindow","scriptElement","sdkUrl","assignSdkReference","removeSdkScript","checkout","params","schemeSdk","schemeName","unbindAppInstance","isRecognized","initiateIdentityValidation","getSrcProfile","idTokens","customSdkConfiguration","IdentityTypeMap","email","isFulfilled","isRejected","sdkMap","vAdapters","VisaSRCI","srciTransactionId","sdkProps","dpaLocale","dpaPresentationName","dpaTransactionOptions","payloadTypeIndicator","customInputData","checkoutOrchestrator","dpaData","getVisaSetttings","err","identityLookup","identityValue","consumerIdentity","completeIdentityValidation","otp","environment","customSdkConfig","SRCSDK_MASTERCARD","paymentOptions","dynamicDataType","consumerNameRequested","confirmPayment","getMastercardSettings","identityType","validationData","SrcSdkLoader","schemes","sdks","customConfig","SchemeSdkClass","getSchemeSdk","loadScriptPromises","sdk","allSettled","loadScriptResponses","sdksLoaded","SchemeNames","ShopperCard","descriptorName","isDcfPopupEmbedded","confirmCardIsExpired","panExpirationYear","panExpirationMonth","currentMonth","currentYear","getMonth","getFullYear","maskedCard","srcCorrelationId","dateOfCardLastUsed","dateOfCardCreated","panLastFour","srcDigitalCardId","artUri","tokenId","isExpired","digitalCardData","CTP_IFRAME_NAME","createShopperMaskedCardsData","memo","srcProfile","profiles","profile","maskedCards","sortCardByLastTimeUsed","card1","card2","getTime","sortCardByLastTimeCreated","splitAvailableAndExpiredCards","expiredCards","availableCards","splitUnusedAndUsedCards","usedCards","unusedCards","isSrciError","TimeoutError","setCorrelationId","correlationId","isTimeoutTriggeredBySchemeSdk","executeWithTimeout","asyncFn","timer","race","seconds","CtpState","ClickToPayService","shopperAccountFound","sdkLoader","updateStoreCookiesConsent","shouldStore","storeCookies","initialize","initiateSdks","recognized","verifyIfShopperIsRecognized","getShopperProfile","shopperIdentity","isEnrolled","verifyIfShopperIsEnrolled","handleTimeout","subscribeOnStateChange","stateSubscriber","startIdentityValidation","validationSchemeSdk","maskedValidationChannel","identityValidationData","maskedShopperContact","selectedNetwork","finishIdentityValidation","otpCode","validationToken","idToken","checkoutSdk","checkoutResponse","windowRef","frames","complianceSettings","complianceResources","complianceType","uri","dcfActionCode","srciCheckoutResponse","srcScheme","srcTokenReference","srcCheckoutPayload","createCheckoutPayloadBasedOnScheme","logout","logoutPromises","all","shopperCards","shopperEmail","lookupPromises","consumerPresent","setSdkForPerformingShopperIdentityValidation","_this_stateSubscriber","_this_onTimeout","timeoutError","VISA_SDK","buildClientProfile","schemesConfig","srciDpaId","onTimeout","srcProfilesPromises","srcProfilesResponses","profilesWithScheme","promiseResult","srcProfiles","createShopperCardsList","promises","initPromises","cfg","createClickToPayService","clickToPayConfiguration","createSchemesInitConfiguration","createShopperIdentityObject","schemeNames","srcSdkLoader","merchantDisplayName","visaSrciDpaId","visaSrcInitiatorId","mcDpaId","mcSrcClientId","srcInitiatorId","ClickToPayContext","onSubmit","onSetStatus","onReady","isStandaloneComponent","isCtpPrimaryPaymentMethod","isStoringCookies","setIsCtpPrimaryPaymentMethod","logoutShopper","ctpState","otpMaskedContact","otpNetwork","ClickToPayProvider","clickToPayService","setClickToPayRef","ctpService","setCtpState","NotAvailable","clickToPayRef","isOnReadyInvoked","otpValue","useClickToPayContext","otpValidationRules","CtPResendOtpLink","onResendCode","counter","setCounter","showConfirmation","setShowConfirmation","handleResendCodeClick","CtPOneTimePasswordInput","disableOtpAutoFocus","resendOtpError","setResendOtpError","otpInputHandlersRef","validateInput","isOtpFielDirty","setIsOtpFieldDirty","onSetInputHandlers","handleOnResendOtp","handleOnResendOtpError","handleOnKeyPress","onPressEnter","isValidatingOtp","CtPBrand","ctpImageUrl","pipeImageUrl","idGenerator","CtPInfoModal","CtPInfo","CtPLogoutLink","Ready","OneTimePassword","CtPSection","onEnterKeyPress","Title","endAdornment","Text","CtPSaveCookiesCheckbox","isTextTruncated","setIsTextTruncated","matchMedia","handleOnChange","newChecked","CtPOneTimePassword","onDisplayCardComponent","setOtp","setIsValid","setIsValidatingOtp","setErrorCode","otpInputHandlers","setOtpInputHandlers","isAccountLocked","setIsAccountLocked","onSetOtpInputHandlers","onChangeOtpInput","onSubmitPassword","handleButtonKeyDown","subtitleParts","hideResendOtpButton","CtPSingleCard","amountLabel","currencyDisplay","payAmountLabel","SecondaryButtonLabel","PayButton","secondaryAmount","isZeroAuth","defaultLabel","secondaryLabel","convertedSecondaryAmount","secondaryAmountLabel","isMobile","CtPCardsList","cardSelected","onChangeCard","Iframe","iframeOnLoad","attachEvent","detachEvent","minWidth","minHeight","allow","validClassNameModifiers","frameBorder","referrerpolicy","min-width","min-height","getErrorLabel","errorLabel","getPayButtonLabel","checkoutCard","maskedData","CtPCards","setCheckoutCard","isEveryCardExpired","isShopperCheckingOutWithCtp","setIsShopperCheckingOutWithCtp","doCheckout","payload","handleOnChangeCard","displayNetworkDcf","displayCardCheckoutView","handlePayButtonKeyDown","CtPLoader","loginValidationRules","shopperLogin","InputEmail","autoCapitalize","CtPLoginInput","loginInputHandlersRef","isLoginInputDirty","setIsLoginInputDirty","CtPLogin","setShopperLogin","isLoggingIn","setIsLoggingIn","loginInputHandlers","setLoginInputHandlers","onSetLoginInputHandlers","handleOnLoginChange","handleOnLoginButtonClick","ClickToPayComponent","Login","ShopperIdentified","sendOneTimePassword","handleEnterKeyPress","Loading","ContentSeparator","ClickToPayHolder","isCardInputVisible","setIsCardInputVisible","areFieldsNotSet","handleOnShowCardButtonClick","ClickToPayWrapper","SRPanelProvider","moveFocus","strs","TxVariants","BaseElement","buildElementProps","componentProps","formatProps","formatData","setUpAnalytics","setUpAnalyticsObj","submitAnalytics","analyticsObj","newState","clientData","checkoutAttemptId","order","componentData","paymentMethod","riskData","orderData","pspReference","clientStateDataIndicator","activate","mount","domNode","setupAnalytics","_node","_this_constructor_analyticsType","_component","modules","analytics","containerWidth","offsetWidth","isDropin","flavor","update","core","_id","isCoreInstance","createFromAction","assertIsCoreInstance","ALLOWED_PROPERTIES","sanitizeResponse","removedProperties","sanitizedObject","cleanupFinalResult","paymentResponse","donationToken","verifyPaymentDidNotFail","resultCode","assertIsDropin","activePaymentMethod","closeActivePaymentMethod","CancelError","AnalyticsLogEvent","subType","AnalyticsErrorEvent","UIElement","finalProps","getCorePropsForComponent","getPaymentMethodFromPaymentMethodsResponse","openFirstPaymentMethod","openFirstStoredPaymentMethod","getRegulatoryDefaults","paymentMethodsResponse","storeElementRefOnCore","storeElementReference","isAvailable","componentRef","setElementStatus","_this_elementRef","elementRef","_this_componentRef","_this_props_onChange","_this_props_session","sessionId","session","setUp","sendAnalytics","submit","makePaymentsCall","handleResponse","handleFailedResult","submitUsingAdvancedFlow","beforeSubmitEvent","beforeSubmit","submitUsingSessionsFlow","handleError","submitPayment","onComplete","handleAdditionalDetails","makeAdditionalDetailsCall","onAdditionalDetails","submitAdditionalDetailsUsingSessionsFlow","submitDetails","handleAction","paymentAction","onActionHandled","actionHandledObj","_this_props_onActionHandled","originalAction","remainingAmount","handleOrder","handleSuccessResult","onEnterKeyPressed","updateParent","paymentMethodType","_this_props_icon","displayName","_this_core_paymentMethodsResponse_paymentMethods","_this_core_paymentMethodsResponse","paymentMethodFromResponse","paymentMethods","pm","accessibleName","additionalInfo","handleAdvanceFlowPaymentMethodsUpdate","onPaymentMethodsRequest","_this_props_onOrderUpdated","onOrderUpdated","_this_props_onPaymentFailed","displayFinalAnimation","onPaymentFailed","_this_props_onPaymentCompleted","onPaymentCompleted","register","txVariants","CardElement","_this_clickToPayRef","_this_core_options_session","_this_core_options","_this_core_options_session1","_this_core_options1","storedCardID","isEcommerceStoredCard","supportedShopperInteractions","cardBrand","_this_props_holderName","storePaymentMethodPayload","browserInfo","_this_props_onBinLookup","isInfoType","cardProps","challengeWindowSize","dataString","srPanelEnabled","enabled","srPanelMoveFocus","riskEnabled","risk","isFastlaneConfigValid","isFastlaneComponentConfigValid","billingAddressModeValue","showKCPType","hasBrandsConfiguration","hasData","hasDisclaimerMessage","hasInstallmentOptions","hasPlaceholders","hasStylesConfigured","hasOnAllValid","hasOnBinValue","hasOnBlur","hasOnBrand","hasOnConfigSuccess","hasOnFieldValid","hasOnFocus","hasOnLoad","hasOnBinLookup","hasOnEnterKeyPressed","hasFastlaneConfigured","isFastlaneConsentDefaultOn","getCardConfigData","_this_props_storedPaymentMethodId","_this_props_amount","renderCardInput","isCardPrimaryInput","handleClickToPaySubmit","_this_clickToPayService","_this_props_onBrand","_this_props_onConfigSuccess","_this_props_onFocus","_this_props_onFocus1","_this_props1","_this_props_onBlur","_this_props_onBlur1","triggerBinLookUp","isStoredCard","_disableClickToPay","showFormInstruction","BancontactElement","CustomCardInput","SFExtensions","dualBrandingChangeHandler","mappedErrors","_this_props_onValidationError","validationErrors","onValidationError","CustomCard","customCard","sfBrand","_this_props_brandsConfiguration_item_brand","_this_props_brandsConfiguration_item_brand_icon","_this_props_onEnterKeyPressed","analyticsType","ThreeDS2Form","formEl","onFormSubmit","inputName","form","display","getProcessMessageHandler","domain","expectedType","parseErrorObj","originalEvent","comment","extraInfo","eventDataRaw","debug","getOrigin","exec","separator","host","port","base64","decode","pData","isBase64","success","decodeURIComponent","atob","charCodeAt","encode","pDataStr","isErrorObject","decodeAndParseToken","token","decodedToken","encodeObject","validateChallengeWindowSize","sizeStr","sizeString","createFingerprintResolveData","dataKey","resultObj","paymentData","createOldFingerprintResolveData","details","createChallengeResolveData","authorisationToken","createOldChallengeResolveData","encodeBase64URL","dataStr","base64url","fingerprintFlowPropsDropin","fingerprintFlowProps","promiseTimeout","promise","timeOutObject","promiseTimer","cancel","iframeName","DoChallenge3DS2","get3DS2ChallengePromise","processMessageHandler","postMessageDomain","challengePromise","resolveObject","onCompleteChallenge","rejectObject","onErrorChallenge","acsURL","cReqData","iframeSizeArr","base64URLencodedData","iframeCallback","componentType","actionDescription","jsonStr","PrepareChallenge3DS2","challengeData","process","_this_props__environmentUrls_api","_this_props__environmentUrls","shouldAllowHttpDomains","_environmentUrls","api","setError","errorInfo","TOKEN_IS_MISSING_ACSURL","acsTransID","messageVersion","threeDSServerTransID","TOKEN_IS_MISSING_OTHER_PROPS","ACTION_IS_MISSING_TOKEN","TOKEN_DECODE_OR_PARSING_FAILED","setStatusComplete","errorCodeObject","isMDFlow","finalResObject","errorTypeAndCode","THREEDS2_TIMEOUT","NO_TRANSSTATUS","CHALLENGE_COMPLETED","errorInfoObj","isFatal","challenge","errorDescription","CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP","timeoutObject","msg","CHALLENGE_DATA_SENT","decodedChallengeToken","threeDSNotificationURL","notificationURLOrigin","messageType","prepareChallengeData","ThreeDS2Challenge","dataTypeForError","ACTION_IS_MISSING_PAYMENT_DATA","PrepareChallenge","aObj","rtnObj","CHALLENGE_IFRAME_LOADED","threeDS2Challenge","DoFingerprint3DS2","get3DS2MethodPromise","fingerPrintPromise","onCompleteFingerprint","onErrorFingerprint","threeDSMethodURL","showSpinner","threeDSMethodNotificationURL","PrepareFingerprint3DS2","fingerPrintData","TOKEN_IS_MISSING_THREEDSMETHODURL","hasValid3DSMethodNotificationURL","hasValidPostMessageDomain","hasTransServerID","FINGERPRINT_COMPLETED","fingerprint","FINGERPRINT_DATA_SENT","notificationURL","decodedFingerPrintToken","threeDSMethodUrl","receivedNotificationURL","prepareFingerPrintData","API_VERSION","API_ERROR_CODE","callSubmit3DS2Fingerprint","resData","NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED","NO_ACTION_FOR_CHALLENGE","_this_props_elementRef","actionHandler","NO_COMPONENT_FOR_ACTION","ThreeDS2DeviceFingerprint","PrepareFingerprint","FINGERPRINT_IFRAME_LOADED","RedirectButton","newStatus","threeDS2Fingerprint","SELECTOR_OPTIONS","nameKey","AccountTypeSelector","selectedAccountType","option","accountNumberRegex","routingNumberRegex","achValidationRules","ownerName","routingNumber","accountNumber","accountNumberVerification","achFormatters","setFocusOnField","holder","focusContextSelector","pdHolder","AchComponent","isFormDisabled","achRef","useSRPanelForAchErrors","onAccountNumberInput","accountTypeSelector","AchElement","_this_state_data_selectedAccountType","_this_state_data_selectedAccountType1","accountHolderType","bankAccountType","bankLocationId","bankAccountNumber","ConsentCheckbox","consentCheckbox","ach","checkDateInputSupport","formatDate","date","day","month","substr","unformatDate","phoneNumberRule","validationRule","isPhoneValid","emailRule","isEmailValid","dateOfBirthRule","rawValue","ageDiff","isDateOfBirthValid","bankAccountNumberRegEx","bankLocationIdRegEx","bacsValidationRules","amountConsentCheckbox","accountConsentCheckbox","bacsFormatters","errorKey","shouldBuildErrorMessage","ENTER_STATE","CONFIRM_STATE","BacsInput","copyToClipboard","copyInput","text","textArea","createInput","execCommand","DetailsTable","tableFields","dl","dt","dd","Voucher","voucherDetails","issuerImageUrl","introduction","instructionsUrl","surcharge","reference","barcode","downloadUrl","copyBtn","downloadButtonText","extractCommonPropsForVoucher","introKey","totalAmount","BacsResult","BacsElement","_this_state_data","_this_state_data1","_this_state_data2","_this_state_data3","directdebit_GB","AD","structure","example","AE","AL","AZ","BA","BH","CR","DO","FO","GI","GL","GT","IL","KW","KZ","LB","LC","MD","ME","MK","MR","MU","PK","PS","RS","SA","SM","ST","TL","TN","TR","VG","XK","AO","BF","BI","BJ","CI","CM","CV","DZ","IR","JO","MG","ML","MZ","QA","SN","UA","formatIban","iban","electronicFormat","regex","block","repeats","parseStructure","getCountryCode","electronicFormatIban","ValidationStatus","isValidIBAN","preparedIban","ibanInput","Z","iso13616Prepare","isValidISO","remainder","iso7064Mod97_10","ibanRegex","checkIbanStructure","checkIbanStatus","countrySpecification","getIbanCountrySpecification","isValidHolder","ibanHolderNameErrorObj","ibanErrorObj","IbanInput","validationStatus","holderStatus","holderErr","handleHolderInput","handleIbanBlur","ibanNumber","handleIbanInput","cb","previousIban","newCursorPosition","editLength","isAddition","isMaskChar","ibanValue","initialCursor","getNextCursorPosition","currentIban","SepaElement","sepadirectdebit","bankAccountNumberRegex","bankCodeRegex","bankLocationIdRegex","preAuthorizedDebitCanadaValidationRules","bankCode","preAuthorizedDebitCanadaFormatters","SettlementInfo","PreAuthorizedDebitCanadaComponent","PreAuthorizedDebitCanada","_this_resources","eft_directdebit_CA","ReadOnlyCompanyDetails","registrationNumber","companyDetailsValidationRules","ERROR_MSG_INCOMPLETE_FIELD","getFormattedData","company","COMPANY_DETAILS_SCHEMA","CompanyDetails","namePrefix","companyDetailsRef","generateFieldName","eventHandler","pop","inputEventHandler","ReadOnlyPersonalDetails","firstName","lastName","personalDetailsValidationRules","gender","dateOfBirth","shopperName","InputDate","PERSONAL_DETAILS_SCHEMA","PersonalDetails","personalDetailsRef","isDateInputSupported","fieldsetsSchema","getInitialActiveFieldsets","isVisible","isDeliveryAddress","billingAddressIsHidden","fieldsetData","isPrefilled","refKey","splitKey","hasSplitKey","addressKey","mapFieldKeyAddress","consentCBErrorObj","OpenInvoice","openInvoiceRef","initialActiveFieldsets","activeFieldsets","setActiveFieldsets","fieldsetsRefs","hasConsentCheckbox","consentCheckboxLabel","isStandAloneButton","showSeparateDeliveryAddressCheckbox","deliveryAddress","billingAddressSpecifications","deliveryAddressSpecifications","deliveryAddressSpecification","DELIVERY_ADDRESS_PREFIX","BILLING_ADDRESS_PREFIX","companyDetails","extractedCompanyDetailsErrors","personalDetails","extractedPersonalDetailsErrors","bankAccount","extractedBankAccountErrors","extractedBillingAddressErrors","extractedDeliveryAddressErrors","remainingErrors","enhancedBillingAddressErrors","enhancedDeliveryAddressErrors","companyDetailsLayout","personalDetailsReqFields","personalDetailsRequiredFields","personalDetailLayout","bankAccountLayout","billingAddressLayoutEnhanced","deliveryAddressLayoutEnhanced","fullLayout","countrySpecificLabels_billing","countrySpecificLabels_delivery","focusContext","useSRPanelForOpenInvoiceErrors","fieldsetsAreValid","consentCheckboxValid","getActiveFieldsData","handleFieldset","prevData","prevValid","prevErrors","billingAddressSpecification","prevActiveFields","deliveryAddressRequiredFields","OpenInvoiceContainer","ALLOWED_COUNTRIES","Affirm","ConsentCheckboxLabel","translationString","textBeforeLink","textAfterLink","affirm","rivertyConsentUrlMap","be","en","fr","nl","getConsentUrl","urlMap","consentLink","AfterPay","afterpay_default","afterpay","AfterPayB2B","afterpay_b2b","ATOME_ADDRESS_SPECIFICATION","ATOME_SUPPORTED_COUNTRIES","BILLING_ADDRESS_SPECIFICATION","Atome","atome","FacilyPay3x","facilypay_3x","FacilyPay4x","facilypay_4x","FacilyPay6x","facilypay_6x","FacilyPay10x","facilypay_10x","FacilyPay12x","facilypay_12x","RatePay","ratepay","RatePayDirectDebit","ratepay_directdebit","AMAZONPAY_SIGN_STRING_ENDPOINT","AMAZONPAY_UPDATE_CHECKOUT_SESSION_ENDPOINT","AMAZONPAY_URL_EU","AMAZONPAY_URL_US","FALLBACK_LOCALE_EU","FALLBACK_LOCALE_US","LEDGER_CURRENCIES_PER_REGION","EU","UK","SUPPORTED_LOCALES_EU","SUPPORTED_LOCALES_US","CURRENCY_DECIMALS","IDR","JPY","KRW","VND","BYR","CVE","DJF","GHC","GNF","KMF","PYG","RWF","UGX","VUV","XAF","XOF","XPF","MRO","BHD","IQD","JOD","KWD","OMR","LYD","TND","currencyMinorUnitsConfig","RSD","minimumFractionDigits","AFN","ALL","IRR","LAK","LBP","MMK","SOS","SYP","YER","getDecimalAmount","currencyCode","getDivider","getCheckoutLocale","region","supportedLocales","getSupportedLocales","checkoutLocale","getFallbackLocale","getDesignCode","design","getPayloadJSON","addressDetails","cancelUrl","checkoutMode","deliverySpecifications","returnUrl","merchantMetadata","chargePermissionType","recurringMetadata","storeId","isPayNow","getChargeAmount","webCheckoutDetails","checkoutResultReturnUrl","checkoutReviewReturnUrl","checkoutCancelUrl","paymentDetails","chargeAmount","paymentIntent","presentmentCurrency","totalOrderAmount","getCheckoutDetails","AmazonPayButton","amazonRef","signature","setSignature","payloadJSON","settings","buttonColor","checkoutLanguage","ledgerCurrency","merchantId","productType","placement","sandbox","getAmazonPaySettings","handleOnClick","initCheckout","checkoutSessionConfig","publicKeyId","Pay","createCheckoutSessionConfig","stringToSign","getAmazonSignature","renderButton","renderAmazonPayButton","ChangePaymentDetailsButton","amazonCheckoutSessionId","changeActionOptions","changeAction","bindChangeAction","OrderButton","createOrder","updateAmazonCheckoutSession","checkoutSessionId","SignOutButton","onSignOut","signout","AmazonPayComponent","amazonPayButtonRef","orderButtonRef","getSubmitFunction","amazon","showSignOutButton","showOrderButton","showChangePaymentDetailsButton","AmazonPayElement","hasExpressPage","getShopperDetails","getDeliveryAddress","handleDeclineFlow","getDeclineFlowUrl","declineFlowUrl","amazonComponentSubmit","amazonpay","ApplePayButton","buttonStyle","buttonType","buttonLocale","apple-pay-button","buttonstyle","onclick","ApplePayService","begin","onvalidatemerchant","onValidateMerchant","validationURL","completeMerchantValidation","abort","onpaymentauthorized","onPaymentAuthorized","completePayment","onpaymentmethodselected","onPaymentMethodSelected","paymentMethodUpdate","completePaymentMethodSelection","onshippingcontactselected","onShippingContactSelected","shippingContactUpdate","completeShippingContactSelection","onshippingmethodselected","onShippingMethodSelected","shippingMethodUpdate","completeShippingMethodSelection","oncancel","onCancel","paymentRequest","ApplePaySession","version","preparePaymentRequest","companyName","formattedAmount","formatAmount","total","totalPriceLabel","totalPriceStatus","lineItems","shippingContactEditingMode","shippingMethods","shippingType","recurringPaymentRequest","merchantCapabilities","supportedCountries","supportedNetworks","requiredShippingContactFields","requiredBillingContactFields","billingContact","shippingContact","applicationData","formatApplePayContactToAdyenAddressFormat","paymentContact","locality","addressLines","administrativeArea","givenName","familyName","ApplePaySdkLoader","crossOrigin","sdkLoadingPromise","isSdkLoaded","detectInIframe","self","top","ApplePayElement","brandMapping","elodebit","elo","interac","electron","girocard","cartebancaire","eftpos_australia","accumulator","mapBrands","merchantName","renderApplePayCodeAs","applePayToken","subtype","applePayCapabilities","merchantIdentifier","identifier","canMakePayments","defineApplePayVersionNumber","applePayVersionNumber","latestVersion","supportsVersion","resolveSupportedVersion","configureApplePayWebOptions","ApplePayWebOptions","onApplePayCodeClose","set","startSession","validateMerchant","payment","authorizedEvent","handleAuthorization","collectOrderTrackingDetailsIfNeeded","orderDetails","STATUS_SUCCESS","applePayError","STATUS_FAILURE","responseWithError","onAuthorized","onOrderTrackingRequest","hostname","domainName","initiative","decodedData","isInstantPayment","applepay","CashAppPayEvents","CashAppComponent","cashAppService","onChangeStoreDetails","onAuthorize","cashAppRef","subscriptions","initializeCashAppSdk","subscribeToEvent","CustomerDismissed","CustomerRequestDeclined","restart","CustomerRequestApproved","customerProfile","grants","cashAppPaymentData","customerId","cashtag","cashTag","grantId","onFile","onFileGrantId","CustomerRequestFailed","unsubscribeFn","aria-live","aria-busy","CashAppService","hasOneTimePayment","hasOnFilePayment","store","clientId","cashApp","pay","useCashAppButtonUi","manage","shape","startAuthorization","eventType","createCustomerRequest","referenceId","scopeId","redirectURL","customerRequest","actions","CashAppSdkLoader","CashApp","CashAppPay","shopperWantsToStore","storePaymentMethodSetByMerchant","includeStorePaymentMethod","handleOnChangeStoreDetails","handleAuthorize","_this_props_configuration","_this_props_configuration1","onClickPromiseRejected","storePayment","cashapp","ClickToPayElement","Idle","ctpConfiguration","clicktopay","config$4","getTransactionInfo","formattedPrice","totalPrice","transactionInfo","initiatePaymentRequest","apiVersion","apiVersionMinor","merchantInfo","merchantOrigin","authJwt","allowedPaymentMethods","tokenizationSpecification","parameters","gateway","gatewayMerchantId","allowedAuthMethods","allowedCardNetworks","assuranceDetailsRequired","allowPrepaidCards","allowCreditCards","billingAddressParameters","emailRequired","shippingAddressRequired","shippingAddressParameters","shippingOptionRequired","shippingOptionParameters","callbackIntents","formatGooglePayContactToAdyenAddressFormat","address1","address2","address3","GooglePayService","getGooglePaymentsClient","google","payments","PaymentsClient","isReadyToPay","paymentsClient","client","existingPaymentMethodRequired","isReadyToPayRequest","prefetchPaymentData","paymentDataRequest","initiatePayment","loadPaymentData","paymentDataCallbacks","googlePayEnvironment","env","resolveEnvironment","GooglePayButton","googlePayWrapperRef","buttonRadius","buttonSizeMode","buttonRootNode","createButton","googlePayButton","GooglePay","paywithgoogle","twoLetterLocale","getGooglePayLocale","googlePayCardNetwork","googlePayToken","showGooglePayPaymentSheet","googlePay","statusCode","googlePayError","paymentMethodPresent","paymentMethodData","shippingAddress","tokenizationData","cardNetwork","transactionState","fallbackMessage","intent","prefetch","onPaymentDataChanged","googlepay","SUPPORTED_COLORS_FOR_CREDIT","SUPPORTED_LOCALES","getStyle","PaypalButtons","onInit","onApprove","onShippingAddressChange","onShippingOptionsChange","isProcessingPayment","paypalRef","isTokenize","paypalButtonRef","creditButtonRef","payLaterButtonRef","venmoButtonRef","createBillingAgreement","Buttons","isEligible","PAYPAL","CREDIT","PAYLATER","VENMO","FUNDING","blockPayPalCreditButton","blockPayPalPayLaterButton","blockPayPalVenmoButton","isProcessingPaymentWithoutReviewPage","commit","getPaypalSettings","vault","enableMessages","shopperLocale","formattedLocale","supportedLocale","getSupportedLocale","isTestEnvironment","components","PaypalComponent","onScriptLoadFailure","handleOnApprove","handlePaypalLoad","handlePaypalLoadFailure","getPaypalUrl","cspNonce","nonce","paypal","ERRORS","formatPaypalOrderContactToAdyenFormat","addressPart1","addressPart2","getStreet","address_line_1","address_line_2","admin_area_1","admin_area_2","postal_code","country_code","full_name","PaypalElement","intentFromConfig","displayContinueToReviewPageButton","userAction","updatePaymentData","handleResolve","handleReject","handleSubmit","handleOnShippingAddressChange","handleOnShippingOptionsChange","updateWithAction","sdkData","paypalOrder","payer","purchase_units","shipping","FastlaneCardBrandIcon","mappedBrand","mapFastlaneCardBrandToAdyenBrand","FastlaneComponent","fastlaneRef","Fastlane","fastlane","keepBrandsVisible","boletoValidationRules","ERROR_MSG_INVALID_FIELD","boletoFormatters","SendCopyToEmail","sendCopyToEmail","setSendCopyToEmail","onToggle","BrazilPersonalDetail","BoletoInput","showingEmail","setShowingEmail","personalDetailsRequired","boletoRef","billingAddressValid","buttonModifiers","showEmailAddress","BoletoVoucherResult","expiresAt","barcodeUrl","BoletoElement","handleRef","DokuInput","dokuRef","boletobancario","boletobancario_itau","boletobancario_santander","primeiropay_boleto","DokuVoucherResult","DokuElement","doku","doku_alfamart","doku_permata_lite_atm","doku_indomaret","doku_atm_mandiri_va","doku_sinarmas_va","doku_mandiri_va","doku_cimb_va","doku_danamon_va","doku_bri_va","doku_bni_va","doku_bca_va","doku_wallet","OxxoVoucherResult","alternativeReference","merchantReference","OxxoElement","IssuerButton","aria-pressed","oxxo","IssuerButtonGroup","selectedIssuerId","handleClick","defineProperty","payButtonLabel","issuerName","IssuerList","highlightedIds","inputType","setInputType","handleInputChange","issuerObj","analyticsEvent","handleListToggle","debounceSearchAnalytics","handleSearch","highlightedItems","termsAndConditions","getIssuerImageUrl","parentFolder","IssuerListContainer","issuers","_this_state","showPaymentMethodItemImages","highlightedIssuers","showImage","getIssuerIcon","BillDeskOnlineElement","billdesk_online","BillDeskWalletElement","billdesk_wallet","DotpayElement","dotpay","EPSElement","eps","MolPayEBankingMYElement","molpay_ebanking_fpx_MY","MolPayEBankingTHElement","molpay_ebanking_TH","MolPayEbankingVNElement","molpay_ebanking_VN","OnlineBankingCZElement","onlineBanking_CZ","OnlineBankingINElement","onlinebanking_IN","OnlineBankingPL","onlineBanking_PL","disclaimerUrlsMap","regulation","obligation","OnlineBankingSKElement","onlineBanking_SK","OnlineBankingFI","PayByBank","paybybank","PayuNetCashcardElement","payu_IN_cashcard","PayuNetBankingElement","payu_IN_nb","WalletINElement","DragonpayInput","isIssuerRequired","DragonpayVoucherResult","dateTime","wallet_IN","DragonpayElement","detail","dragonpay","dragonpay_ebanking","dragonpay_otc_banking","dragonpay_otc_non_banking","dragonpay_otc_philippines","econtextValidationRules","EcontextInput","econtextRef","EcontextVoucherResult","maskedTelephoneNumber","collectionInstitutionNumber","EcontextElement","econtext","econtext_atm","econtext_online","econtext_seven_eleven","econtext_stores","detectInIframeInSameOrigin","RedirectShopper","dispatchEvent","beforeRedirect","postForm","redirectFromTopWhenInIframe","onRedirectError","RedirectElement","handleRedirectError","GiropayElement","giropay","MultibancoVoucherResult","entity","MultibancoElement","multibanco","TwintElement","twint","VippsElement","vipps","TrustlyElement","trustly","PayByBankUS","showOtherInsteafOfNumber","paybybank_AIS_DD","Riverty","riverty","API_ENVIRONMENTS","live","fallback","CDN_ENVIRONMENTS","ANALYTICS_ENVIRONMENTS","getUrlFromMap","environmentMap","environmentUrl","resolveEnvironments","environmentsUrls","apiUrl","analyticsUrl","cdnImagesUrl","cdn","images","cdnTranslationsUrl","translations","PasskeySdkLoader","AdyenPasskey","cdnUrl","PASSKEY_SDK_URL","PasskeyErrorTypes","PasskeyService","deviceId","passkeyServiceConfig","getWebAuthnUnsupportedReason","PublicKeyCredential","isUserVerifyingPlatformAuthenticatorAvailable","initialized","passkey","passkeySdk","captureRiskSignalsEnrollment","riskSignals","canUseStoredCredential","captureRiskSignalsAuthentication","createCredentialForEnrollment","registrationOptions","decodeJsonBase64","authenticateWithCredential","authenticationOptions","encoded","decoded","AwaitLogoContainer","logos","logo","checkPaymentStatus","processCompleteResponse","processResponse","zeroPad","strValue","repeat","getTimeDifference","startTime","endTime","diff","percentage","start","end","round","getProgressPercentage","minutes","CountdownA11yReporter","time","minutesLeft","secondsLeft","timeLeft","LONG_TIMEOUT","setInterval","MID_TIMEOUT","SHORT_TIMEOUT","tearDown","clearInterval","setAriaProps","ariaAttributes","setSrMessages","getSrMessages","srInterval","TRANSLATION_KEY","fns","useCountdownA11yReporter","reporter","calculateStartAndEndTime","minutesFromNow","secondsFromNow","nowTime","Countdown","onTick","onCompleted","startAndEndTime","setTime","interval","Await","setCompleted","expired","setExpired","setLoading","hasCalledActionHandled","setHasCalledActionHandled","setDelay","setPercentage","timePassed","setTimePassed","hasAdjustedTime","setHasAdjustedTime","storedTimeout","setStoredTimeout","checkStatus","throttleInterval","pollStatus","pollStatusFunction","redirectToApp","shouldRedirectAutomatically","statusInterval","actualTimePassed","throttleTime","finalState","brandLogo","timeToPayString","showAmount","messageText","awaitText","showCountdownTimer","countdownTime","instructions","endSlot","PayByBankPixAwait","StoredPayment","onPay","receiver","enrollmentId","initiationId","authorizationOptions","setAuthorizationOptions","getAuthorizationStatus","PaymentDetails","useIssuerWithLogo","issuersWithLogo","setIssuersWithLogo","LOGO","altI18nKey","IssuerListIntroduction","Enrollment","issuerListRef","setRegistrationOptions","onEnroll","isAwait","numberOfMin","getEnrollmentStatus","PayByBankPixElement","_isAdyenHosted","_this_props_payByBankPixDetails","payByBankPixDetails","ispb","unsupportedReason","passkeyService","paybybank_pix","isEnrollment","_this_props_payByBankPixDetails1","_this_props_paymentMethodData","_this_props_paymentMethodData1","_this_props_paymentMethodData2","payWithStoredPayment","authorizePayment","authorizeEnrollment","onIssuerSelected","_ref","fidoAssertion","enrollment","redirectResult","TIMEOUT_MINUTES","endsWith","isAdyenHosted","KLARNA_WIDGET_URL","KlarnaWidget","widgetInitializationTime","klarnaWidgetRef","initializeKlarnaWidget","Klarna","Payments","client_token","container","payment_method_category","show_form","onLoaded","authorizeKlarna","authorize","approved","authorization_token","klarnaAsyncCallback","KlarnaContainer","setWidgetInitializationTime","setAction","klarnaRef","reinitializeWidget","KlarnaPayments","useKlarnaWidget","klarna","klarna_account","klarna_paynow","klarna_b2b","useA11yReporter","statusMessage","QRLoader","performance","brandName","_this_props_introduction","_this_props_instructions","qrCodeImage","qrCodeData","timeToPay","qrSubtitleRef","useAutoFocus","redirectIntroduction","buttonLabel","onTimeUp","responseTime","previous","newDelay","throttledInterval","buttonStatus","QRLoaderContainer","renderQRCode","BCMCMobileElement","bcmc_mobile","bcmc_mobile_QR","pixValidationRules","pixFormatters","PixInput","dataProps","formSchema","PixElement","pix","SwishElement","swish","WeChatPayElement","wechatpayQR","wechatpay","PromptPayElement","promptpay","TimelineWrapper","Timeline","ol","isTabletWidthOrSmaller","useIsMobile","isMobileScreenSize","setIsMobileScreenSize","handleWindowResize","PayNowIntroduction","PayNowInstructions","PayNowElement","paynow","DuitNowElement","duitnow","PayMeInstructions","PayMeIntroduction","PayMeElement","defaultDelay","defaultCountdown","BlikInput","blikCode","inputMode","config$3","BlikElement","recurringPayment","blik","portugueseRegex","defaultRegex","phoneValidationRules","phoneNumber","testRegex","phonePrefix","phoneFormatters","PhoneInputFields","showNumber","showPrefix","canSelectPrefix","phoneNumberKey","PhoneInputForm","getPhoneFieldError","propsField","MBWayInput","phoneInputRef","loadingStatus","prefixLoadingStatus","phonePrefixes","setLoadingStatus","setPhonePrefixes","mappedCountries","usePhonePrefixes","phoneLabel","phoneNumberErrorKey","config$2","MBWayElement","mbway","vpaValidationRules","virtualPaymentAddress","VpaInput","vpaInputHandlersRef","A11Y","ButtonId","VPA","QR","INTENT","AreaId","SegmentedControl","controls","htmlProps","paymentMethodsWithoutBorder","PaymentMethodIcon","altDescription","ExpandButton","buttonId","showRadioButton","isSelected","expandContentId","standalone","aria-checked","UPIIntentAppItem","app","imgSrc","containerId","handleAppSelected","UPIIntentAppList","apps","selectedAppId","onAppSelect","onVpaInputChange","showUpiCollectInput","imgName","UPIComponent","defaultMode","onUpdateMode","setMode","vpa","setVpa","vpaInputHandlers","setVpaInputHandlers","selectedApp","setSelectedApp","segmentedControlOptions","intentOption","vpaOption","qrOption","shouldShowUpiIntent","positionOfQrOption","useUpiSegmentedControlOptions","onSetVpaInputHandlers","onChangeUpiMode","newMode","handleAppSelect","handleVpaInputChange","UPI","hasIntentApps","fallbackDefaultMode","allowedModes","upiCollectApp","upi_collect","upi_intent","paymentType","appId","_this_state_data_app","selectedMode","upi_qr","renderContent","encodeURIComponent","upi","ancvValidationRules","beneficiaryId","ANCVInput","config$1","ANCVElement","onOrderRequest","stateOrder","PayToIdentifierEnum","payToIdentifierEnumCheck","enumVariable","enumValues","createEnumChecker","PAYID_IDENTIFIER_OPTIONS","loadI18nForOptions","IdentifierSelector","selectedIdentifier","onSelectedIdentifier","hydratedOptions","valueStr","HARDCODED_USE_PHONE_PREFIXES","PayToPhone","abnRegex","orgidRegex","emailRegex","phoneNumberRegex","validationFromRegex","emailValidatorRule","abnValidatorRule","orgidValidatorRule","payIdValidationRules","abn","orgid","bsbRegex","bsbValidatorRule","bankAccountNumberValidatorRule","bsbValidationRules","bsb","PayToNameFields","BASE_SCHEMA","IDENTIFIER_SCHEMA","phone","PayIDInput","payToRef","BSBInput","PayToComponent","inputOptions","defaultOption","selectedInput","setSelectedInput","PayToInstructions","orderedMandateTableFields","MandateSummary","mandate","payee","labelText","amountValue","formatedAmount","amountRule","frequency","remarks","startsAt","endsAt","getAccountIdentifier","PayToElement","shopperAccountIdentifier","Alert","GiftcardResult","balance","transactionLimit","makePayment","transactionAmount","remainingBalance","payto","GiftcardNumberField","getCardErrorMessage","data-info","GiftcardPinField","Giftcard","hasEnoughBalance","fieldsLayoutComponent","pinRequired","makeBalanceCheck","setBalance","expiryDateRequired","GiftcardElement","_this_props_brandsConfiguration_this_props_brand","balanceCheck","onBalanceCheck","makeSubmitCall","GiftcardComponent","handleBalanceCheck","checkBalance","handleOnRequiringConfirmation","onRequiringConfirmation","giftcard","MealVoucherExpiryField","MealVoucherFields","pinFieldProps","MealVoucherFRElement","mealVoucher_FR","mealVoucher_FR_natixis","mealVoucher_FR_sodexo","mealVoucher_FR_groupeup","AddressElement","BankTransferResult","beneficiary","bic","BankTransferInput","BankTransferElement","CampaignInfo","logoUrl","nonprofitName","causeName","bannerUrl","backgroundImage","CampaignContent","nonprofitDescription","nonprofitUrl","bankTransfer_IBAN","ButtonGroup","getRoundupAmount","maxRoundupAmount","commercialTxAmount","getAmountLabel","getRoundupAmountLabel","FixedAmounts","selectedAmount","onAmountSelected","onDonateButtonClicked","Roundup","donationAmount","originalPaymentAmount","DonationComponent","donation","onDonate","showCancelButton","termsAndConditionsUrl","isRoundupDonation","setAmount","handleDonate","DonationElement","donate","OrderPaymentMethods","orderStatus","onOrderCancel","brandLogoConfiguration","orderPaymentMethod","strong","InstantPaymentMethods","useBrandLogoConfiguration","setBrandLogoConfiguration","PaymentMethodDetails","paymentMethodComponent","isLoaded","DisableOneClickConfirmation","open","onDisable","PaymentMethodBrands","excludedUIBrands","isPaymentMethodSelected","visibleBrands","leftBrandsAmount","prepareVisibleBrands","PaymentMethodName","PaymentMethodItem","isDisablingPaymentMethod","isCard","paymentMethodClassnames","showDisableStoredPaymentMethodConfirmation","showRemovePaymentMethodButton","oneClick","disableConfirmationId","showBrands","handleOnListItemClick","toggleDisableConfirmation","onDisableStoredPaymentMethod","PaymentMethodsContainer","cachedPaymentMethods","paymentMethodListClassnames","paymentMethodsCollection","isNextOneSelected","PaymentMethodList","instantPaymentMethods","storedPaymentMethods","openPaymentMethod","hasInstantPaymentMethods","hasStoredPaymentMethods","pmListLabel","firstStoredPayment","firstNonStoredPayment","Status","DropinComponent","prepareDropinData","analyticConfigData","showStoredPaymentMethods","prevProps","elements","fastlanePaymentElement","instantPaymentElements","storedPaymentElements","showDefaultPaymentMethodList","isRedirecting","hasPaymentMethodsToBeDisplayed","handleOnSelectPaymentMethod","onShowDefaultPaymentMethodListClick","isDisabling","handleDisableStoredPaymentMethod","storedElementsPromises","elementsPromises","instantPaymentsPromises","fastlanePaymentElementPromise","onCreateElements","orderStatusPromise","getOrderStatus","_this_props_modules","getOnOrderCancel","setActivePaymentMethod","_this_props_onSelect","storedPaymentMethod","sanitizeOrder","cancelOrder","UNSUPPORTED_PAYMENT_METHODS","filterUnsupportedPaymentMethod","filterPresent","ComponentsNameMap","personal_details","storedCard","ancv","createElements","paymentMethodsConfiguration","commonProps","UPI_SUB_TX_VARIANTS","optionallyFilterUpiSubTxVariants","paymentMethodConfigurationProps","pmType","getComponentConfiguration","PaymentMethodElement","elementProps","elementIsAvailablePromises","promiseResults","filterAvailable","createStoredElements","createInstantPaymentElements","SUPPORTED_INSTANT_PAYMENTS","DropinElement","instantPaymentTypes","Set","dropinRef","_this_dropinRef","_this_dropinRef1","disableFinalAnimation","_this_activePaymentMethod","_this_elementRef_activePaymentMethod","statusType","componentFromAction","_this_activePaymentMethod1","pmComponent","handleCreate","_this_props_filterStoredPaymentMethods","showPaymentMethods","fastlanePaymentMethod","isFastlane","isInstantPaymentMethod","splitPaymentMethods","getCommonProps","_this_props_filterStoredPaymentMethods1","filterStoredPaymentMethods","paymentMethodComponents","PaymentMethod","dropin","PersonalDetailsElement","FastlaneSDK","tokenData","requestClientToken","fetchSdk","initializeFastlaneInstance","authenticate","fastlaneSdk","customerContextId","identity","lookupCustomerByEmail","latestShopperDetails","triggerAuthenticationFlow","authenticationState","profileData","authResult","paymentSource","lastDigits","consentDetails","fetchConsentDetails","showShippingAddressSelector","mountWatermark","includeAdditionalInfo","FastlaneWatermarkComponent","checkoutShopperURL","clientToken","sdkClientToken","fetchSessionIdAsync","getSession","consentComponent","ConsentComponent","getRenderState","intendedExperience","forceConsentDetails","metadata","geoLocOverride","setLocale","Language","keyPlural","keyForCount","getTranslation","stringAmount","decimalAmount","modifiedOptions","localeOptions","toLocaleString","getLocalisedAmount","dateOptions","toLocaleDateString","timeAndDateFormatter","customTranslations","timeFormatOptions","hour","minute","timeAndDateFormatOptions","Intl","DateTimeFormat","DEVICE_FINGERPRINT","FAILED_DFP_RESOLVE_OBJECT_TIMEOUT","ERROR_MESSAGES","wrongOrigin","wrongDataType","missingProperty","unknownError","GetDeviceFingerprint","getDfpPromise","deviceFingerPrintPromise","dfpURL","DeviceFingerprint","fingerprintResult","fingerprintError","RiskElement","cleanUp","nodeRiskContainer","persistentCookie","riskElements","filterAllowedPaymentMethods","filterRemovedPaymentMethods","filterEcomStoredPaymentMethods","supportedStoredPaymentMethods","filterSupportedStoredPaymentMethods","processStoredPaymentMethod","PaymentMethods","mapCreatedComponentType","has","checkPaymentMethodsResponse","allowPaymentMethods","removePaymentMethods","processPaymentMethods","processStoredPaymentMethods","createComponent","registry","Element","getActionHandler","actionTypes","threeDS2","actionSubtype","get3DS2FlowProps","voucher","qrCode","await","bankTransfer","NonPersistentStorage","storage","getItem","keyName","setItem","keyValue","removeItem","clear","Storage","keyByIndex","storageType","localStorage","collectId","analyticsContext","analyticsPath","telemetryEvent","channel","platform","buildType","referrer","screen","checkoutAttemptIdSession","fifteenMinAgoTimestamp","confirmSessionDurationIsMaxFifteenMinutes","conversion","EventsQueue","caActions","logs","actionObj","run","runQueue","getQueue","capturedCheckoutAttemptId","sendEventsTimerId","Analytics","analyticsData","CollectId","eventsQueue","sendAnalyticsEvents","initialEvent","processAnalyticsData","getCheckoutAttemptId","getEventsQueue","getEnabled","eventCat","arrayName","ANALYTICS_INFO_TIMER_INTERVAL","addAnalyticsEvent","sessionData","setupSession","sanitizeSession","Session","updateSessionData","latestData","storeSession","getStoredSession","storedSession","removeStoredSession","rawSession","Resources","getImageUrl","resourceContext","cdnContext","returnImage","subFolder","SRMessages","messagesRef","messages","msgs","SRPanel","_enabled","_moveFocus","firstPanel","showPanel","_this_props_moveFocus","srPanelContainer","panelMessages","panelParent","preExistingSRPanel","defaultComponents","Redirect","threeDS2DeviceFingerprint","componentsMap","createComponentsMap","supportedTxVariants","Class","exposeLibraryMetadata","Core","setBundleType","initializeCore","validateCoreConfiguration","createCoreModules","sessionResponse","setOptions","createPaymentMethodsList","fetchLocaleTranslations","adyenWebVersion","getTranslations","_this_options_onError","_this_options","_this_options_onError1","_this_options1","customTranslationLocaleKey","formatCustomTranslations","afterAdditionalDetails","_this_options_onPaymentCompleted","_this_options_onPaymentFailed","nextAction","getComponentForAction","handleCreateError","globalOptions","processGlobalOptions","paymentMethodName","freeze","RiskModule","srConfig","_this_options_clientKey","actionEle","propsSetByMerchant","possibleFields","assertConfigurationPropertiesAreValid","clientKeyType","_this_options__environmentUrls","_this_options_clientKey1","AdyenCheckout"],"mappings":"aAAG,IAACA,EAAEC,EAAEC,EAAIC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAEC,EAAE,GAAGC,EAAE,GAAGC,EAAE,oEAAoEC,EAAEC,MAAMC,QAAQ,SAASC,EAAEjB,EAAEC,GAAG,IAAI,IAAIC,KAAKD,EAAED,EAAEE,GAAGD,EAAEC,GAAG,OAAOF,CAAC,CAAC,SAASkB,EAAElB,GAAG,IAAIC,EAAED,EAAEmB,WAAWlB,GAAGA,EAAEmB,YAAYpB,EAAE,CAAC,SAASqB,EAAEpB,EAAEC,EAAEoB,GAAG,IAAInB,EAAEC,EAAEC,EAAEC,EAAE,GAAG,IAAID,KAAKH,EAAE,OAAOG,EAAEF,EAAED,EAAEG,GAAG,OAAOA,EAAED,EAAEF,EAAEG,GAAGC,EAAED,GAAGH,EAAEG,GAAG,GAAGkB,UAAUC,OAAO,IAAIlB,EAAEmB,SAASF,UAAUC,OAAO,EAAExB,EAAE0B,KAAKH,UAAU,GAAGD,GAAG,mBAAmBrB,GAAG,MAAMA,EAAE0B,aAAa,IAAItB,KAAKJ,EAAE0B,kBAAa,IAASrB,EAAED,KAAKC,EAAED,GAAGJ,EAAE0B,aAAatB,IAAI,OAAOuB,EAAE3B,EAAEK,EAAEH,EAAEC,EAAE,KAAK,CAAC,SAASwB,EAAE5B,EAAEsB,EAAEnB,EAAEC,EAAEC,GAAG,IAAIC,EAAE,CA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