{"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/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/utils/uuid.ts","../../src/core/Analytics/events/AbstractAnalyticsEvent.ts","../../src/core/Analytics/events/AnalyticsErrorEvent.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/utils/textUtils.ts","../../src/components/internal/SecuredFields/utils.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/SFP/SecuredFieldsProviderHandlers.ts","../../src/components/tx-variants.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/Card/components/CardInput/layouts.ts","../../src/components/internal/Address/constants.ts","../../src/core/Context/CoreProvider.tsx","../../src/core/Context/useImage.ts","../../src/components/Card/components/CardInput/utils.ts","../../src/components/Card/constants.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/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/Img/Img.tsx","../../src/components/internal/Icon/Icon.tsx","../../src/utils/idGenerator.ts","../../src/components/internal/Icon/constants.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/internal/FormFields/Fieldset/Fieldset.tsx","../../src/components/Card/components/CardInput/components/StoredCardFields.tsx","../../src/components/internal/FormFields/RadioGroup/RadioGroup.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/Select/Select.tsx","../../src/components/internal/FormFields/utils.ts","../../src/core/Context/AmountProvider.tsx","../../src/components/Card/components/CardInput/components/Installments/Installments.tsx","../../src/utils/isValidURL.ts","../../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/internal/Brand/Brand.tsx","../../src/components/Card/components/CardInput/components/BrandIcon.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/utils/windowScrollTo.ts","../../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/components/Card/components/Fastlane/utils/validate-configuration.ts","../../src/core/Analytics/constants.ts","../../src/utils/Formatters/formatters.ts","../../src/core/Analytics/events/AnalyticsInfoEvent.ts","../../src/core/Analytics/utils.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/utils/getErrorMessage.ts","../../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/utils/constants/currency-decimals.ts","../../src/utils/constants/currency-minor-units.ts","../../src/utils/amount-util.ts","../../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/utils/base64.ts","../../src/utils/createSdkData.ts","../../src/components/internal/BaseElement/BaseElement.ts","../../src/components/internal/UIElement/utils.ts","../../src/core/Analytics/events/AnalyticsLogEvent.ts","../../src/core/Errors/CancelError.ts","../../src/core/Errors/SRPanelProvider.tsx","../../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/components/ThreeDS2/constants.ts","../../src/utils/getOrigin.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/components/BacsDD/components/BacsInput.tsx","../../src/utils/clipboard.ts","../../../../node_modules/preact/compat/dist/compat.mjs","../../src/components/internal/Tooltip/Tooltip.tsx","../../src/components/internal/Tooltip/TooltipController.ts","../../src/components/internal/Tooltip/SingletonTooltipProvider.tsx","../../src/components/internal/Button/stopPropagationForActionKeys.ts","../../src/components/internal/Button/CopyIconButton.tsx","../../src/components/internal/DetailsTable/DetailsTable.tsx","../../src/components/internal/Button/CopyButton.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/internal/Alert/Alert.tsx","../../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/CompanyDetails.tsx","../../src/components/internal/CompanyDetails/utils.ts","../../src/components/internal/PersonalDetails/ReadOnlyPersonalDetails.tsx","../../src/components/internal/PersonalDetails/validate.ts","../../src/components/internal/FormFields/InputDate/InputDate.tsx","../../src/components/internal/PersonalDetails/PersonalDetails.tsx","../../src/components/internal/PersonalDetails/utils.ts","../../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/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/core/Analytics/useAnalytics.ts","../../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/utils/map-adyen-brands-to-googlepay-brands.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/core/ProcessResponse/PaymentStatus/PaymentStatus.ts","../../src/hooks/usePaymentStatusTimer/constants.ts","../../src/hooks/usePaymentStatusTimer/usePaymentStatusTimer.tsx","../../src/core/Services/payment-status.ts","../../src/utils/useAutoFocus.ts","../../src/components/internal/QRLoader/components/QRImage.tsx","../../src/components/internal/QRLoader/components/QRProgressbar.tsx","../../src/components/internal/Countdown/utils.ts","../../src/components/internal/Countdown/CountdownA11yReporter.ts","../../src/components/internal/Countdown/index.tsx","../../src/components/internal/Countdown/useCountdownA11yReporter.ts","../../src/components/internal/QRLoader/components/QRCountdown.tsx","../../src/components/internal/QRLoader/components/QRIntructions.tsx","../../src/components/internal/QRLoader/components/QRCodeCopyButton.tsx","../../src/components/internal/QRLoader/QRLoaderDetailsProvider.tsx","../../src/components/internal/QRLoader/components/QRDetails.tsx","../../src/core/Errors/useA11yReporter.ts","../../src/components/internal/QRLoader/components/QRFinalState.tsx","../../src/utils/urls.ts","../../src/components/internal/QRLoader/QRLoader.tsx","../../src/components/Iris/types.ts","../../src/components/Iris/constants.ts","../../src/components/internal/SegmentedControl/SegmentedControl.tsx","../../src/components/internal/SegmentedControl/SegmentedControlRegion.tsx","../../src/components/Iris/components/IrisGenerateQRCode.tsx","../../src/components/Iris/components/IrisComponent.tsx","../../src/components/Iris/utils.ts","../../src/components/internal/Timeline/TimelineWrapper.tsx","../../src/components/internal/Timeline/Timeline.tsx","../../src/components/Iris/components/IrisQrCodeInstructions.tsx","../../src/components/Iris/Iris.tsx","../../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/components/internal/Await/components/AwaitFinalState.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/components/KlarnaWidget/KlarnaWidget.tsx","../../src/components/Klarna/constants.ts","../../src/components/Klarna/components/KlarnaContainer/KlarnaContainer.tsx","../../src/components/Klarna/KlarnaPayments.tsx","../../src/components/helpers/QRLoaderContainer/QRLoaderContainer.tsx","../../src/components/BcmcMobile/BcmcMobile.ts","../../src/components/BcmcMobile/config.ts","../../src/components/Pix/components/PixInput/validate.ts","../../src/components/Pix/components/PixInput/utils.ts","../../src/components/Pix/components/PixInput/PixInput.tsx","../../src/components/Pix/components/PixQRDetails.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/utils/useIsMobile.ts","../../src/components/PayNow/components/PayNowIntroduction.tsx","../../src/components/PayNow/components/PayNowInstructions.tsx","../../src/components/PayNow/PayNow.ts","../../src/components/PayNow/config.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/constants.ts","../../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/UPIMandate/UPIMandate.tsx","../../src/components/UPI/components/UPIComponent/UPIComponent.tsx","../../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/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/useSRPanelForGiftcardErrors.ts","../../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/BankTransferResultInstructions.tsx","../../src/components/BankTransfer/components/BankTransferResult/BankTransferVoucher.tsx","../../src/components/BankTransfer/components/BankTransferResult/BankTransferResult.tsx","../../src/components/BankTransfer/components/BankTransferInput/validationRule.ts","../../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/DropinSuccessState.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/PersonalDetails/PersonalDetails.tsx","../../src/utils/Storage.ts","../../src/core/Analytics/Analytics.ts","../../src/core/Analytics/AnalyticsEventQueue.ts","../../src/core/Analytics/AnalyticsService.ts","../../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/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,e,f,c,s,a,h,p={},v=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,d=Array.isArray;function w(n,l){for(var u in l)n[u]=l[u];return n}function g(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function _(l,u,t){var i,o,r,e={};for(r in u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:e[r]=u[r];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===e[r]&&(e[r]=l.defaultProps[r]);return m(l,e,i,o,null)}function m(n,t,i,o,r){var e={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(e),e}function b(){return{current:null}}function k(n){return n.children}function x(n,l){this.props=n,this.context=l}function S(n,l){if(null==l)return n.__?S(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?S(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)&&!$.__r++||o!=l.debounceRendering)&&((o=l.debounceRendering)||r)($)}function $(){for(var n,u,t,o,r,f,c,s=1;i.length;)i.length>s&&i.sort(e),n=i.shift(),s=i.length,n.__d&&(t=void 0,o=void 0,r=(o=(u=n).__v).__e,f=[],c=[],u.__P&&((t=w({},o)).__v=o.__v+1,l.vnode&&l.vnode(t),O(u.__P,t,o,u.__n,u.__P.namespaceURI,32&o.__u?[r]:null,f,null==r?S(o):r,!!(32&o.__u),c),t.__v=o.__v,t.__.__k[t.__i]=t,N(f,t,c),o.__e=o.__=null,t.__e!=r&&C(t)));$.__r=0}function I(n,l,u,t,i,o,r,e,f,c,s){var a,h,y,d,w,g,_,m=t&&t.__k||v,b=l.length;for(f=P(u,l,m,f,b),a=0;a<b;a++)null!=(y=u.__k[a])&&(h=-1==y.__i?p:m[y.__i]||p,y.__i=a,g=O(n,y,h,i,o,r,e,f,c,s),d=y.__e,y.ref&&h.ref!=y.ref&&(h.ref&&B(h.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),(_=!!(4&y.__u))||h.__k===y.__k?f=A(y,f,n,_):\"function\"==typeof y.type&&void 0!==g?f=g:d&&(f=d.nextSibling),y.__u&=-7);return u.__e=w,f}function P(n,l,u,t,i){var o,r,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),o=0;o<i;o++)null!=(r=l[o])&&\"boolean\"!=typeof r&&\"function\"!=typeof r?(\"string\"==typeof r||\"number\"==typeof r||\"bigint\"==typeof r||r.constructor==String?r=n.__k[o]=m(null,r,null,null,null):d(r)?r=n.__k[o]=m(k,{children:r},null,null,null):void 0===r.constructor&&r.__b>0?r=n.__k[o]=m(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):n.__k[o]=r,f=o+h,r.__=n,r.__b=n.__b+1,e=null,-1!=(c=r.__i=L(r,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),\"function\"!=typeof r.type&&(r.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,r.__u|=4))):n.__k[o]=null;if(a)for(o=0;o<s;o++)null!=(e=u[o])&&0==(2&e.__u)&&(e.__e==t&&(t=S(e)),D(e,e));return t}function A(n,l,u,t){var i,o;if(\"function\"==typeof n.type){for(i=n.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=n,l=A(i[o],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=S(n)),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||(d(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function L(n,l,u,t){var i,o,r,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==e||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,o=u+1;i>=0||o<l.length;)if(null!=(c=l[r=i>=0?i--:o++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return r;return-1}function T(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||y.test(l)?u:u+\"px\"}function j(n,l,u,t,i){var o,r;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(f,\"$1\")),r=l.toLowerCase(),l=r in n||\"onFocusOut\"==l||\"onFocusIn\"==l?r.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=c,n.addEventListener(l,o?a:s,o)):n.removeEventListener(l,o?a:s,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=c++;else if(u.t<t.u)return;return t(l.event?l.event(u):u)}}}function O(n,u,t,i,o,r,e,f,c,s){var a,h,p,v,y,_,m,b,S,C,M,$,P,A,H,L,T,j=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[f=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof j)try{if(b=u.props,S=\"prototype\"in j&&j.prototype.render,C=(a=j.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?m=(h=u.__c=t.__c).__=h.__E:(S?u.__c=h=new j(b,M):(u.__c=h=new x(b,M),h.constructor=j,h.render=E),C&&C.sub(h),h.state||(h.state={}),h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),S&&null==h.__s&&(h.__s=h.state),S&&null!=j.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=w({},h.__s)),w(h.__s,j.getDerivedStateFromProps(b,h.__s))),v=h.props,y=h.state,h.__v=u,p)S&&null==j.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),S&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(S&&null==j.getDerivedStateFromProps&&b!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(b,M),u.__v==t.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(b,h.__s,M)){for(u.__v!=t.__v&&(h.props=b,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(b,h.__s,M),S&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,_)})}if(h.context=M,h.props=b,h.__P=n,h.__e=!1,P=l.__r,A=0,S){for(h.state=h.__s,h.__d=!1,P&&P(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,P&&P(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=w(w({},i),h.getChildContext())),S&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(v,y)),L=a,null!=a&&a.type===k&&null==a.key&&(L=V(a.props.children)),f=I(n,d(L)?L:[L],u,t,i,o,r,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),m&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=r)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;r[r.indexOf(f)]=null,u.__e=f}else{for(T=r.length;T--;)g(r[T]);z(u)}else u.__e=t.__e,u.__k=t.__k,n.then||z(u);l.__e(n,u,t)}else null==r&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=q(t.__e,u,t,i,o,r,e,c,s);return(a=l.diffed)&&a(u),128&u.__u?void 0:f}function z(n){n&&n.__c&&(n.__c.__e=!0),n&&n.__k&&n.__k.forEach(z)}function N(n,u,t){for(var i=0;i<t.length;i++)B(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 V(n){return\"object\"!=typeof n||null==n||n.__b&&n.__b>0?n:d(n)?n.map(V):w({},n)}function q(u,t,i,o,r,e,f,c,s){var a,h,v,y,w,_,m,b=i.props||p,k=t.props,x=t.type;if(\"svg\"==x?r=\"http://www.w3.org/2000/svg\":\"math\"==x?r=\"http://www.w3.org/1998/Math/MathML\":r||(r=\"http://www.w3.org/1999/xhtml\"),null!=e)for(a=0;a<e.length;a++)if((w=e[a])&&\"setAttribute\"in w==!!x&&(x?w.localName==x:3==w.nodeType)){u=w,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(r,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)b===k||c&&u.data==k||(u.data=k);else{if(e=e&&n.call(u.childNodes),!c&&null!=e)for(b={},a=0;a<u.attributes.length;a++)b[(w=u.attributes[a]).name]=w.value;for(a in b)if(w=b[a],\"children\"==a);else if(\"dangerouslySetInnerHTML\"==a)v=w;else if(!(a in k)){if(\"value\"==a&&\"defaultValue\"in k||\"checked\"==a&&\"defaultChecked\"in k)continue;j(u,a,null,w,r)}for(a in k)w=k[a],\"children\"==a?y=w:\"dangerouslySetInnerHTML\"==a?h=w:\"value\"==a?_=w:\"checked\"==a?m=w:c&&\"function\"!=typeof w||b[a]===w||j(u,a,w,b[a],r);if(h)c||v&&(h.__html==v.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(v&&(u.innerHTML=\"\"),I(\"template\"==t.type?u.content:u,d(y)?y:[y],t,i,o,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":r,e,f,e?e[0]:i.__k&&S(i,0),c,s),null!=e)for(a=e.length;a--;)g(e[a]);c||(a=\"value\",\"progress\"==x&&null==_?u.removeAttribute(\"value\"):null!=_&&(_!==u[a]||\"progress\"==x&&!_||\"option\"==x&&_!=b[a])&&j(u,a,_,b[a],r),a=\"checked\",null!=m&&m!=u[a]&&j(u,a,m,b[a],r))}return u}function B(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function D(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||B(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]&&D(i[o],u,t||\"function\"!=typeof n.type);t||g(n.__e),n.__c=n.__=n.__e=void 0}function E(n,l,u){return this.constructor(n,u)}function G(u,t,i){var o,r,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),r=(o=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],O(t,u=(!o&&i||t).__k=_(k,null,[u]),r||p,p,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,e,!o&&i?i:r?r.__e:t.firstChild,o,f),N(e,u,f)}function J(n,l){G(n,l,J)}function K(l,u,t){var i,o,r,e,f=w({},l.props);for(r in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:f[r]=void 0===u[r]&&null!=e?e[r]:u[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),m(l.type,f,i||l.key,o||l.ref,null)}function Q(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,M(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+h++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=v.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&&void 0===n.constructor},x.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=w({},this.state),\"function\"==typeof n&&(n=n(w({},u),this.props)),n&&w(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this))},x.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this))},x.prototype.render=k,i=[],r=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},$.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=F(!1),a=F(!0),h=0;export{x as Component,k as Fragment,K as cloneElement,Q as createContext,_ as createElement,b as createRef,_ as h,J as hydrate,t as isValidElement,l as options,G 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 p(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 d(n){return o=1,h(D,n)}function h(n,u,i){var o=p(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.__f)){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=o.__c.props!==n;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),c&&c.call(this,n,t,r)||i};r.__f=!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=p(t++,3);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__H.__h.push(i))}function _(n,u){var i=p(t++,4);!c.__s&&C(i.__H,u)&&(i.__=n,i.u=u,r.__h.push(i))}function A(n){return o=5,T(function(){return{current:n}},[])}function F(n,t,r){o=6,_(function(){if(\"function\"==typeof n){var r=n(t());return function(){n(null),r&&\"function\"==typeof r&&r()}}if(n)return n.current=t(),function(){return n.current=null}},null==r?r:r.concat(n))}function T(n,r){var u=p(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=p(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=p(t++,10),i=d();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=p(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.u=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.u&&(n.__H=n.u),n.u=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,35);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,h as useReducer,A as useRef,d 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 = '6.1.0';\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] as const;\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","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 { EMPTY_FIELD_ERROR_MESSAGES } from '../../../../core/Errors/constants';\nimport type { SFPState } from './types';\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: string, rootNode: HTMLElement, state: SFPState) => {\n    // Get existing error OR field is empty in which case get field specific msg OR use default\n    const error: string | undefined = state.errors?.[fieldType] || EMPTY_FIELD_ERROR_MESSAGES[fieldType];\n\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     * Don't allow compat version on Live - it is only for if the merchant wants to *test* with a custom http url.\n     * Otherwise, set it passed on the config prop\n     */\n    const needsJWECompatVersion = this.config.loadingContext.includes('live') ? false : props.forceCompat;\n\n    const bundleModifier = !needsJWECompatVersion ? '' : 'Compat';\n\n    const bundleType = `${sfBundleType}${bundleModifier}`; // 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: string) {\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 = (\n    node: Window | HTMLElement | Document,\n    event: string,\n    callback: EventListenerOrEventListenerObject,\n    useCapture: boolean = false\n) => {\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 = (\n    node: Window | HTMLElement | Document,\n    event: string,\n    callback: EventListenerOrEventListenerObject,\n    useCapture: boolean = false\n) => {\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    SecuredFieldSetupObject\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 componentType: string;\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    protected submitAnalytics: SecuredFieldSetupObject['submitAnalytics'];\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 = ['giftcard'].includes(txVariant) ? txVariant : 'creditCard';\n\n    // Get translation for iframeTitle\n    let iframeTitle: string = i18n.get(`${type}.${fieldType}.aria.iframeTitle`);\n\n    /**\n     * Fix bug where, if iframeTitle was set to 'none', although we didn't add it to the iframe element, we still passed it through to the securedField\n     * where it got set as the title of the html page\n     */\n    if (iframeTitle === 'none') {\n        iframeTitle = '';\n    }\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","/* 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 uuid from '../../../utils/uuid';\n\nexport enum AnalyticsEventCategory {\n    info = 'info',\n    error = 'error',\n    log = 'log'\n}\n\nexport abstract class AbstractAnalyticsEvent {\n    private readonly timestamp: string;\n    private readonly id: string;\n\n    /**\n     * Component tx variant or identifier\n     * @private\n     */\n    private readonly component: string;\n\n    public abstract getEventCategory(): AnalyticsEventCategory;\n\n    protected constructor(component: string) {\n        this.component = component;\n        this.id = uuid();\n        this.timestamp = String(Date.now());\n    }\n}\n","import { AbstractAnalyticsEvent, AnalyticsEventCategory } from './AbstractAnalyticsEvent';\n\ntype AnalyticsErrorEventProps = {\n    component: string;\n    errorType: ErrorEventType;\n    code: string;\n    message?: string;\n};\n\nexport enum ErrorEventType {\n    network = 'Network',\n    implementation = 'Implementation',\n    internal = 'Internal',\n    apiError = 'ApiError',\n    sdkError = 'SdkError',\n    thirdParty = 'ThirdParty',\n    generic = 'Generic',\n    redirect = 'Redirect',\n    threeDS2 = 'ThreeDS2'\n}\n\nexport enum ErrorEventCode {\n    /** Trying to initialise a securedField iframe, but the iframe.contentWindow is undefined (meaning the containing element is not in the DOM */\n    SECURED_FIELDS_IFRAME_CONTENT_WINDOW_NOT_FOUND = '500',\n    /** */\n    REDIRECT = '600',\n    /**\n     * Key not present in served securedFields asset\n     */\n    SECURED_FIELDS_KEY_NOT_FOUND = '608',\n    /**\n     * Encryption key generation failed in securedField\n     */\n    SECURED_FIELDS_ENCRYPTION_KEY_GEN_FAILED = '609',\n    /**\n     * Encryption failed in securedField\n     */\n    SECURED_FIELDS_ENCRYPTION_ERROR = '610',\n\n    /**  Missing 'paymentData' property from threeDS2 action */\n    THREEDS2_ACTION_IS_MISSING_PAYMENT_DATA = '700',\n\n    /** Missing 'token' property from threeDS2 action */\n    THREEDS2_ACTION_IS_MISSING_TOKEN = '701',\n\n    /** Decoded token is missing a valid threeDSMethodURL property */\n    THREEDS2_TOKEN_IS_MISSING_THREEDSMETHODURL = '702',\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    THREEDS2_TOKEN_IS_MISSING_OTHER_PROPS = '703',\n\n    /** Token decoding or parsing has failed. ('not base64', 'malformed URI sequence' or 'Could not JSON parse token') */\n    THREEDS2_TOKEN_DECODE_OR_PARSING_FAILED = '704',\n\n    /** 3DS2 process has timed out */\n    THREEDS2_TIMEOUT = '710',\n\n    /** Decoded token is missing a valid acsURL property */\n    THREEDS2_TOKEN_IS_MISSING_ACSURL = '800',\n\n    /** Challenge has resulted in an error (no transStatus could be retrieved by the backend) */\n    THREEDS2_NO_TRANSSTATUS = '801',\n\n    /** callSubmit3DS2Fingerprint has received a response indicating either a \"frictionless\" flow, or a \"refused\" response, but without a details object */\n    THREEDS2_NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED = '802',\n\n    /** callSubmit3DS2Fingerprint cannot find a component to handle the action response */\n    THREEDS2_NO_COMPONENT_FOR_ACTION = '803',\n\n    /** callSubmit3DS2Fingerprint has received a response indicating a \"challenge\" but without an action object */\n    THREEDS2_NO_ACTION_FOR_CHALLENGE = '804',\n\n    /** 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    THREEDS2_CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP = '805'\n}\n\nexport class AnalyticsErrorEvent extends AbstractAnalyticsEvent {\n    private readonly errorType: ErrorEventType;\n    private readonly code: string;\n\n    private readonly message?: string;\n\n    constructor(props: AnalyticsErrorEventProps) {\n        super(props.component);\n\n        this.errorType = props.errorType;\n        this.code = props.code;\n\n        if (props.message) this.message = props.message;\n    }\n\n    public getEventCategory(): AnalyticsEventCategory {\n        return AnalyticsEventCategory.error;\n    }\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';\nimport { AnalyticsErrorEvent, ErrorEventCode, ErrorEventType } from '../../../../../core/Analytics/events/AnalyticsErrorEvent';\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        this.submitAnalytics = pSetupObj.submitAnalytics;\n        this.componentType = pSetupObj.componentType;\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            if (!iframe.contentWindow) {\n                // Warn the dev\n                console.error(\n                    'ERROR: Trying to initialise a securedField iframe, but the iframe.contentWindow is undefined. Are you sure the element into which the Card component is being mounted already exists in the DOM *before* the Card component is mounted?'\n                );\n                // Log the error\n                const event = new AnalyticsErrorEvent({\n                    component: this.componentType,\n                    code: ErrorEventCode.SECURED_FIELDS_IFRAME_CONTENT_WINDOW_NOT_FOUND,\n                    errorType: ErrorEventType.implementation,\n                    message: `Trying to initialise an iframe for ${this.sfConfig.fieldType}, but the iframe.contentWindow is undefined`\n                });\n\n                this.submitAnalytics?.(event);\n            }\n\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            case 'encryptionError': {\n                const event = new AnalyticsErrorEvent({\n                    component: this.componentType,\n                    code: feedbackObj.code,\n                    errorType: ErrorEventType.internal,\n                    message: `${feedbackObj.error}. Field= ${this.sfConfig.fieldType}`\n                });\n\n                this.submitAnalytics?.(event);\n                break;\n            }\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)\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, 'incorrectly filled 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\n    // Following a11y advice from LevelAccess, we always set the iframe to be role=presentation\n    iframeEl.setAttribute('role', 'presentation');\n\n    if (title !== '' && title.trim().length > 0) {\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 readonly 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","export const camelCaseToSnakeCase = (camelCaseString: string): string => {\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 { Resources } from '../../../core/Context/Resources';\nimport { camelCaseToSnakeCase } from '../../../utils/textUtils';\nimport { ALL_SECURED_FIELDS, ENCRYPTED } from './lib/constants';\nimport type { SFFieldType } from './lib/types';\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): string => {\n    let str = camelCaseToSnakeCase(fieldType);\n    // SFs need their fieldType mapped to what the endpoint expects\n    if (isSecuredField(fieldType)) {\n        str = str.substring(ENCRYPTED.length + 1); // strip 'encrypted_' off the string\n    }\n    return str;\n};\n\n/**\n * Type guard function to check if a string is a valid SFFieldType.\n * This is used to narrow down the type of a string to a valid SF field type.\n * If the string is a valid SF field, the function returns `true` and the type of the string becomes `SFFieldType`.\n * If the string is not a valid SF field, the function returns `false` and the type of the string remains `string`.\n * @param value - the string to check if it is a valid SF field\n * @returns `true` if the string is a valid SF field, `false` otherwise\n */\nexport function isSecuredField(value: string): value is SFFieldType {\n    return (ALL_SECURED_FIELDS as readonly string[]).includes(value);\n}\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    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';\nimport { isSecuredField } from '../../../utils';\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 = isSecuredField(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         */\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            submitAnalytics: this.props.onSubmitAnalytics,\n            componentType: this.props.componentType\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 { 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] ?? null }\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 || null },\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","export enum TxVariants {\n    /** internal */\n    address = 'address',\n    bankTransfer_IBAN = 'bankTransfer_IBAN',\n    bankTransfer_BE = 'bankTransfer_BE',\n    bankTransfer_NL = 'bankTransfer_NL',\n    bankTransfer_PL = 'bankTransfer_PL',\n    bankTransfer_FR = 'bankTransfer_FR',\n    bankTransfer_CH = 'bankTransfer_CH',\n    bankTransfer_IE = 'bankTransfer_IE',\n    bankTransfer_GB = 'bankTransfer_GB',\n    bankTransfer_DE = 'bankTransfer_DE',\n    bankTransfer_AE = 'bankTransfer_AE',\n    bankTransfer_AT = 'bankTransfer_AT',\n    bankTransfer_AU = 'bankTransfer_AU',\n    bankTransfer_BG = 'bankTransfer_BG',\n    bankTransfer_CA = 'bankTransfer_CA',\n    bankTransfer_EE = 'bankTransfer_EE',\n    bankTransfer_ES = 'bankTransfer_ES',\n    bankTransfer_FI = 'bankTransfer_FI',\n    bankTransfer_HK = 'bankTransfer_HK',\n    bankTransfer_HU = 'bankTransfer_HU',\n    bankTransfer_IT = 'bankTransfer_IT',\n    bankTransfer_JP = 'bankTransfer_JP',\n    bankTransfer_LU = 'bankTransfer_LU',\n    bankTransfer_NZ = 'bankTransfer_NZ',\n    bankTransfer_PT = 'bankTransfer_PT',\n    bankTransfer_SG = 'bankTransfer_SG',\n    bankTransfer_SK = 'bankTransfer_SK',\n    bankTransfer_US = 'bankTransfer_US',\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    iris = 'iris',\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_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 { 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';\nimport { TxVariants } from '../../../tx-variants';\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 readonly 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();\n            this.initializeCSF(this.rootNode);\n        } else {\n            if (this.props.componentType === TxVariants.customCard) {\n                console.debug(\n                    'You are trying to create a CustomCard component but the element into which you are trying to mount the CustomCard component does not contain any elements with a \"data-cse\" attribute e.g. <div data-cse=\"encryptedCardNumber\"></div>'\n                );\n            }\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            componentType: this.props.componentType,\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            onSubmitAnalytics: this.props.onSubmitAnalytics,\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]: null },\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 getRootNode(): HTMLElement {\n        return this.rootNode;\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]: null },\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 { ValidationResult } from '../../../internal/PersonalDetails/types';\nimport {\n    CardAllValidData,\n    CardAutoCompleteData,\n    CardBinValueData,\n    CardBrandData,\n    CardConfigSuccessData,\n    CardFieldValidData,\n    CardFocusData,\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 } from '../../../../types/global-types';\nimport type { FastlaneSignupConfiguration } from '../../../PayPalFastlane/types';\nimport type { AbstractAnalyticsEvent } from '../../../../core/Analytics/events/AbstractAnalyticsEvent';\nimport { IAnalytics } from '../../../../core/Analytics/Analytics';\nimport { PayButtonProps } from '../../../internal/PayButton/PayButton';\nimport { h } from 'preact';\nimport { InstallmentOptions } from './components/Installments/Installments';\nimport type { Form } from '../../../../utils/useForm/types';\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    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' | 'prepaid';\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: IAnalytics;\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: AbstractAnalyticsEvent) => void;\n    handleKeyPress?: (obj: KeyboardEvent) => void;\n    onAddressLookup?: OnAddressLookupType;\n    onAddressSelected?: OnAddressSelectedType;\n    addressSearchDebounceMs?: number;\n    payButton?: (props: PayButtonProps) => h.JSX.Element;\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\nexport type CardSetFormData = Form<CardInputDataState>['setData'];\nexport type CardSetFormValid = Form<CardInputDataState>['setValid'];\nexport type CardSetFormErrors = Form<CardInputDataState>['setErrors'];\n\nexport type OnFieldFocus = (who: string, e: Event | CardFocusData) => void;\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    trimTrailingSeparator: true,\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: string) => !!(input == null || /^[\\s]*$/.test(input));\n\nexport const isString = (input: unknown) => typeof input === 'string' || input instanceof String;\nexport const hasText = (input: string) => 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: string) => {\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 {\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 = Object.keys(ADDRESS_SPECIFICATIONS).reduce((acc, countryCode) => {\n    acc[countryCode] = {\n        labels: ADDRESS_SPECIFICATIONS[countryCode].labels,\n        schema: [POSTAL_CODE]\n    };\n    return acc;\n}, {} as AddressSpecifications);\n\nexport const COUNTRIES_WITH_CUSTOM_SPECIFICATION = Object.keys(ADDRESS_SPECIFICATIONS);\n","import { h, toChildArray, createContext, Fragment } from 'preact';\nimport { useContext, useEffect } from 'preact/hooks';\nimport { Resources } from './Resources';\nimport Language from '../../language';\n\nimport type { ComponentChildren } from 'preact';\nimport type { IAnalytics } from '../Analytics/Analytics';\n\ninterface CoreProviderProps {\n    loadingContext: string;\n    i18n: Language;\n    resources: Resources;\n    children: ComponentChildren;\n    analytics?: IAnalytics;\n}\n\ntype ContextValue = {\n    i18n: Language;\n    loadingContext: string;\n    resources: Resources;\n    analytics: IAnalytics;\n};\n\nconst CoreContext = createContext<ContextValue | undefined>(undefined);\n\nconst CoreProvider = ({ i18n, loadingContext, resources, analytics, children }: Readonly<CoreProviderProps>) => {\n    const coreContext = useContext(CoreContext);\n\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    if (coreContext) {\n        return <Fragment>{toChildArray(children)}</Fragment>;\n    }\n\n    return (\n        <CoreContext.Provider\n            value={{\n                i18n,\n                loadingContext,\n                resources,\n                analytics\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 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 type { InstallmentOptions, InstallmentsState } from './components/Installments/Installments';\nimport { SFPProps } from '../../../internal/SecuredFields/SFP/types';\nimport { BRAND_READABLE_NAME_MAP } from '../../../internal/SecuredFields/lib/constants';\nimport useImage, { UseImageHookType } from '../../../../core/Context/useImage';\nimport { SF_ErrorCodes } from '../../../../core/Errors/constants';\nimport { BrandObject, CardBrandsConfiguration, DualBrandSelectElement } from '../../types';\nimport { PaymentAmount } from '../../../../types';\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 * 'installments' should be added to the payload if it has plan as revolving or bonus\n * or value greater than 1.\n *\n * More about it here: COWEB-1070\n */\nexport const shouldIncludeInstallmentsInPaymentData = (installment?: InstallmentsState): boolean => {\n    return ['revolving', 'bonus'].includes(installment?.plan) || installment?.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 hasCVC, installmentOptions)\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 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\n/**\n *  Only if the brands in EU_BrandArray are present in the binLookup response should we handle dual branding based on EU regulations\n *\n * If the result from Array.some is true - then we are in a EU dual branding regulation scenario, i.e.\n * - Show the new dualBranding UI Buttons\n * - Preselect a card brand\n */\nexport const mustHandleDualBrandingAccordingToEURegulations = (\n    EU_BrandArray: readonly string[],\n    returnedDualBrandingObjects: DualBrandSelectElement[] | BrandObject[],\n    key: string\n) => returnedDualBrandingObjects.some(item => EU_BrandArray.includes(item[key]));\n\n/**\n * Determines whether the Installments component should be rendered.\n *\n * Installments Component is displayed when:\n * - installmentOptions is provided and not empty\n * - amount is provided and not zero\n * - fundingSource is not provided or is 'credit'\n *\n * @param params.installmentOptions - The installment configuration options\n * @param params.fundingSource - The card funding source (e.g. 'credit', 'debit')\n * @param params.amount - The payment amount\n * @returns Whether the Installments component should be rendered\n */\nexport const shouldShowInstallmentsComponent = ({\n    installmentOptions,\n    fundingSource,\n    amount\n}: {\n    installmentOptions?: InstallmentOptions;\n    fundingSource?: string;\n    amount?: PaymentAmount;\n}): boolean => {\n    if (!installmentOptions || Object.keys(installmentOptions).length === 0) return false;\n    if (!amount || amount.value === 0) return false;\n    if (fundingSource && fundingSource !== 'credit') return false;\n\n    return true;\n};\n","export const DUAL_BRANDS_THAT_NEED_SELECTION_MECHANISM = ['cartebancaire', 'bcmc', 'dankort'] as const;\n","import { SingleBrandResetObject } from '../SFP/types';\nimport { BrandObject } from '../../../Card/types';\nimport createCardVariantSwitcher from './createCardVariantSwitcher';\nimport { BRAND_ICON_UI_EXCLUSION_LIST } from '../lib/constants';\nimport { mustHandleDualBrandingAccordingToEURegulations } from '../../../Card/components/CardInput/utils';\nimport { DUAL_BRANDS_THAT_NEED_SELECTION_MECHANISM } from '../../../Card/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\n                    //  Only if the brands in DUAL_BRANDS_THAT_NEED_SELECTION_MECHANISM are present in the binLookup response should we handle dual branding based on EU regulations\n                    const preselectBrand = mustHandleDualBrandingAccordingToEURegulations(\n                        DUAL_BRANDS_THAT_NEED_SELECTION_MECHANISM,\n                        supportedBrands,\n                        'brand'\n                    );\n\n                    const switcherObj = createCardVariantSwitcher(supportedBrands, preselectBrand);\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[], preselectBrand: boolean) {\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: preselectBrand ? 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 { 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' }: Readonly<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 }: Readonly<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 }: Readonly<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        <span className={hintClassnames}>\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 { 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: Readonly<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 = (e: JSX.TargetedEvent<HTMLImageElement, Event>) => {\n        setLoaded(showOnError);\n        props?.onError?.(e);\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 } from 'preact';\nimport cx from 'classnames';\nimport useImage from '../../../core/Context/useImage';\nimport Img from '../Img';\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 }: Readonly<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","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<Readonly<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                        data-testid={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_black`} 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            data-testid=\"form-field\"\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: Readonly<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';\nimport './CVC.scss';\n\nexport default function CVC(props: Readonly<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            onInputContainerClick={handleIconClick}\n        >\n            <DataSfSpan encryptedFieldType={ENCRYPTED_SECURITY_CODE} className={cvcClassnames} />\n\n            <CVCHint frontCVC={frontCVC} fieldLabel={imageDescription} />\n        </Field>\n    );\n}\n","import {\n    h,\n    RefCallback,\n    InputHTMLAttributes,\n    GenericEventHandler,\n    TargetedInputEvent,\n    TargetedKeyboardEvent,\n    TargetedFocusEvent,\n    TargetedEvent\n} 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 InputHTMLAttributes {\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?: GenericEventHandler<HTMLInputElement>;\n    onFocusHandler?: GenericEventHandler<HTMLInputElement>;\n    maxlength?: number | null;\n    addContextualElement?: boolean;\n    type?: string;\n}\n\nexport default function InputBase({ setRef, ...props }: Readonly<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: 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: 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: TargetedKeyboardEvent<HTMLInputElement>) => {\n            if (props?.onKeyUp) props.onKeyUp(event);\n        },\n        [props?.onKeyUp]\n    );\n\n    const handleBlur = useCallback(\n        (event: 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: 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, ...restProps } = props;\n\n    return (\n        <input\n            id={uniqueId}\n            {...restProps}\n            aria-required={restProps.required}\n            type={type}\n            className={inputClassNames}\n            readOnly={readonly}\n            // eslint-disable-next-line react/no-unknown-property -- Preact uses lowercase 'spellcheck'\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: Readonly<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, ComponentChildren } from 'preact';\nimport cx from 'classnames';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport './Fieldset.scss';\nimport { getUniqueId } from '../../../../utils/idGenerator';\nimport { useMemo } from 'preact/hooks';\n\ninterface FieldsetProps {\n    children: ComponentChildren;\n    classNameModifiers?: string[];\n    classNamesFields?: string[];\n    label?: string;\n    description?: string;\n    readonly?: boolean;\n    id?: string;\n}\n\nexport default function Fieldset({\n    children,\n    classNameModifiers: classNameFieldsetModifiers = [],\n    classNamesFields = [],\n    label,\n    readonly = false,\n    description,\n    id\n}: Readonly<FieldsetProps>) {\n    const { i18n } = useCoreContext();\n\n    const describedById = useMemo(() => getUniqueId('fieldset-description'), []);\n\n    return (\n        <fieldset\n            id={id}\n            className={cx([\n                'adyen-checkout__fieldset',\n                ...classNameFieldsetModifiers.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={cx('adyen-checkout__fieldset__fields', classNamesFields)}>{children}</div>\n        </fieldset>\n    );\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';\nimport Fieldset from '../../../../internal/FormFields/Fieldset';\nimport './StoredCardFields.scss';\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}: Readonly<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            <Fieldset classNamesFields={['adyen-checkout__card__exp-cvc']}>\n                {expiryMonth && expiryYear && (\n                    <Field\n                        label={i18n.get('creditCard.expiryDate.label')}\n                        classNameModifiers={['col-50', '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                        classNameModifiers={[...(expiryMonth && expiryYear ? ['col-50', 'storedCard'] : ['storedCard'])]}\n                        frontCVC={isAmex}\n                        showContextualElement={showContextualElement}\n                        contextualText={cvcContextualText}\n                    />\n                )}\n            </Fieldset>\n        </div>\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: Readonly<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 { 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-expanded={props.showList} aria-disabled={props.readonly} 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\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            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                        ref={props.filterInputRef}\n                        role=\"combobox\"\n                        aria-activedescendant={currentSelectedItemId}\n                        type=\"text\"\n                        readOnly={props.readonly}\n                        aria-disabled={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 }: Readonly<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_black`} 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 }: Readonly<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","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';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\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    required\n}: Readonly<SelectProps>) {\n    const { i18n } = useCoreContext();\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 [statusMessage, setStatusMessage] = useState<string>(null);\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 and opens the dropdown\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\n        // Open the dropdown when user starts typing\n        if (!showList) {\n            openList();\n        }\n\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    /**\n     * Update status message for screen readers when no options are found\n     */\n    useEffect(() => {\n        if (showList && filteredItems.length === 0) {\n            setStatusMessage(i18n.get('select.noOptionsFound'));\n        } else {\n            setStatusMessage(null);\n        }\n    }, [showList, filteredItems.length, i18n]);\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                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                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                role=\"status\"\n                aria-live=\"polite\"\n                // aria-relevant seems to be needed here make make sure a second time we get\n                // \"No options found\" we still announce the status message.\n                // What happens otherwise is that just the first status message is announced\n                // tested on VoiceOver on Chrome\n                aria-relevant=\"all\"\n                className=\"adyen-checkout-sr-panel--sr-only\"\n            >\n                {statusMessage}\n            </div>\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","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, createContext, Fragment } from 'preact';\nimport { useContext, useEffect, useImperativeHandle, useMemo, useState } from 'preact/hooks';\nimport type { ComponentChildren, RefObject } from 'preact';\nimport type { PaymentAmount } from '../../types';\n\ninterface AmountContextValue {\n    amount?: PaymentAmount;\n    secondaryAmount?: PaymentAmount;\n}\n\nexport interface AmountProviderProps {\n    amount?: PaymentAmount;\n    secondaryAmount?: PaymentAmount;\n    providerRef: RefObject<AmountProviderRef>;\n    children: ComponentChildren;\n}\n\nexport interface AmountProviderRef {\n    update(newAmount: PaymentAmount, newSecondaryAmount?: PaymentAmount): void;\n}\n\nconst AmountContext = createContext<AmountContextValue | undefined>(undefined);\n\nconst useAmount = (): { amount?: PaymentAmount; isZeroAuth: boolean } => {\n    const context = useContext(AmountContext);\n    if (!context) {\n        throw new Error('useAmount must be used within an AmountProvider');\n    }\n\n    return {\n        amount: context.amount,\n        isZeroAuth: context.amount?.value === 0\n    };\n};\n\nconst useSecondaryAmount = (): { secondaryAmount: PaymentAmount | undefined } => {\n    const context = useContext(AmountContext);\n    if (!context) {\n        throw new Error('useAmount must be used within an AmountProvider');\n    }\n    return { secondaryAmount: context.secondaryAmount };\n};\n\nconst AmountProvider = ({ amount, secondaryAmount, providerRef, children }: Readonly<AmountProviderProps>) => {\n    const context = useContext(AmountContext);\n\n    const [updatedAmount, setUpdatedAmount] = useState<PaymentAmount>(amount);\n    const [updatedSecondaryAmount, setUpdatedSecondaryAmount] = useState<PaymentAmount | undefined>(secondaryAmount);\n\n    useEffect(() => {\n        setUpdatedAmount(amount);\n    }, [amount]);\n\n    useImperativeHandle(providerRef, () => ({\n        update: (newAmount: PaymentAmount, newSecondaryAmount?: PaymentAmount) => {\n            setUpdatedAmount(newAmount);\n            setUpdatedSecondaryAmount(newSecondaryAmount);\n        }\n    }));\n\n    const contextValue = useMemo(() => ({ amount: updatedAmount, secondaryAmount: updatedSecondaryAmount }), [updatedAmount, updatedSecondaryAmount]);\n\n    if (context) {\n        return <Fragment>{children}</Fragment>;\n    }\n\n    return <AmountContext.Provider value={contextValue}>{children}</AmountContext.Provider>;\n};\n\nexport { AmountProvider, useAmount, useSecondaryAmount };\n","import { h } from 'preact';\nimport { useState, useEffect, useMemo } from 'preact/hooks';\nimport Field from '../../../../../internal/FormFields/Field';\nimport { useCoreContext } from '../../../../../../core/Context/CoreProvider';\nimport { InstallmentsItem } 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 { useAmount } from '../../../../../../core/Context/AmountProvider';\n\nimport './Installments.scss';\n\nexport type InstallmentPlan = 'revolving' | 'bonus' | 'regular';\n\nexport interface InstallmentsState {\n    value: number | null;\n    plan?: InstallmentPlan;\n}\n\nexport interface InstallmentOption {\n    values: number[];\n    plans?: InstallmentPlan[];\n    preselectedValue?: number;\n}\n\nexport interface InstallmentOptions {\n    [key: string]: InstallmentOption;\n}\nexport interface InstallmentsProps {\n    brand?: string;\n    onChange?: (installmentObject: InstallmentsState) => void;\n    installmentOptions: InstallmentOptions;\n    type?: string;\n}\n\nfunction createRadioGroupItems(hasRadioButtonUI: boolean, plans?: InstallmentPlan[]): { id: string; name: string }[] {\n    if (!hasRadioButtonUI) {\n        return [];\n    }\n\n    return [\n        { id: 'onetime', name: 'installments.oneTime' },\n        { id: 'installments', name: 'installments.installments' },\n        ...(plans?.includes('revolving') ? [{ id: 'revolving', name: 'installments.revolving' }] : []),\n        ...(plans?.includes('bonus') ? [{ id: 'bonus', name: 'installments.bonus' }] : [])\n    ];\n}\n\nfunction Installments(props: Readonly<InstallmentsProps>) {\n    const { i18n } = useCoreContext();\n    const { amount } = useAmount();\n    const { 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    const hasRadioButtonUI = installmentOptions?.plans?.includes('revolving') || installmentOptions?.plans?.includes('bonus');\n    const radioGroupItems = useMemo(() => createRadioGroupItems(hasRadioButtonUI, installmentOptions?.plans), [hasRadioButtonUI, installmentOptions]);\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            const getPartialAmount = (divider: number): string => i18n.amount(amount.value / divider, amount.currency);\n\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 state: InstallmentsState = {\n            value: installmentAmount,\n            ...(hasRadioButtonUI && radioBtnValue === 'onetime' && { value: 1 }),\n            ...(hasRadioButtonUI && radioBtnValue === 'revolving' && { value: 1, plan: 'revolving' }),\n            ...(hasRadioButtonUI && radioBtnValue === 'bonus' && { value: 1, plan: 'bonus' })\n        };\n\n        onChange(installmentOptions ? state : { value: null });\n    }, [onChange, hasRadioButtonUI, installmentAmount, installmentOptions, radioBtnValue]);\n\n    if (!installmentOptions) return null;\n    if (!amount || amount.value === 0) return null;\n\n    if (hasRadioButtonUI) {\n        return (\n            <div className=\"adyen-checkout__installments adyen-checkout__installments--revolving-plan\">\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 items={radioGroupItems} onChange={onRadioSelect} value={radioBtnValue} ariaLabel={i18n.get('installments')} />\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                    disabled={readOnly}\n                />\n            </Field>\n        </div>\n    );\n}\n\nInstallments.defaultProps = {\n    brand: '',\n    onChange: () => {}\n};\n\nexport default Installments;\n","export const isValidHttpUrl = (httpUrl: string, allowHttp = false) => {\n    let url: URL;\n    try {\n        url = new URL(httpUrl);\n    } catch (_) {\n        return false;\n    }\n    return allowHttp ? url.protocol === 'http:' || url.protocol === 'https:' : url.protocol === 'https:';\n};\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 }: Readonly<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 = [] }: Readonly<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 }: Readonly<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    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                    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 { useState } from 'preact/hooks';\nimport cx from 'classnames';\nimport Img from '../Img';\nimport './Brand.scss';\n\ninterface BrandProps {\n    url: string;\n    alt: string;\n    wrapperClassName?: string;\n    imgClassName?: string;\n    showOnError?: boolean;\n}\n\nconst Brand = ({ url, alt, wrapperClassName = '', imgClassName = '', showOnError }: Readonly<BrandProps>) => {\n    const [hasError, setHasError] = useState(false);\n    const classesOnError = showOnError ? {} : { 'adyen-checkout-brand-wrapper--error': hasError };\n    const classes = cx('adyen-checkout-brand-wrapper', wrapperClassName, classesOnError);\n\n    return (\n        <span className={classes} data-testid=\"brand-image-wrapper\">\n            <Img className={imgClassName} src={url} alt={alt} onError={() => setHasError(true)} />\n        </span>\n    );\n};\n\nexport default Brand;\n","import { h } from 'preact';\nimport { getCardImageUrl, getFullBrandName } from '../utils';\nimport { BrandIconProps } from './types';\nimport useImage from '../../../../../core/Context/useImage';\nimport Brand from '../../../../internal/Brand';\n\nexport default function BrandIcon({ brand, brandsConfiguration = {} }: Readonly<BrandIconProps>) {\n    const getImage = useImage();\n    const imageName = brand === 'card' ? 'nocard' : brand;\n    const imageUrl = brandsConfiguration[brand]?.icon ?? getCardImageUrl(imageName, getImage);\n    const imgClassName = `adyen-checkout-card-input__icon adyen-checkout__card__cardNumber__brandIcon`;\n\n    return <Brand imgClassName={imgClassName} alt={getFullBrandName(brand)} url={imageUrl} />;\n}\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport BrandIcon from './BrandIcon';\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';\nimport './CardNumber.scss';\n\nexport default function CardNumber(props: Readonly<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            onInputContainerClick={handleIconClick}\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 && <BrandIcon brandsConfiguration={props.brandsConfiguration} brand={props.brand} />}\n\n            {dualBrandingElements && !error && (\n                <div className={classNames(['adyen-checkout__card__dual-branding__icons'])}>\n                    {dualBrandingElements.map(element => (\n                        <BrandIcon key={element.id} brand={element.id} brandsConfiguration={props.brandsConfiguration} />\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';\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';\nimport Brand from '../../../../internal/Brand';\nimport './ExpirationDate.scss';\n\nexport default function ExpirationDate(props: Readonly<ExpirationDateProps>) {\n    const {\n        label,\n        focused,\n        filled,\n        onFocusField,\n        className = '',\n        classNameModifiers = [],\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 imageDescription = `${fieldLabel} ${contextualText}`;\n\n    return (\n        <Field\n            label={fieldLabel}\n            classNameModifiers={[...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            onInputContainerClick={() => {\n                onFocusField(ENCRYPTED_EXPIRY_DATE);\n            }}\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            <Brand\n                wrapperClassName={\n                    error || isValid\n                        ? classNames('adyen-checkout__field__exp-date_hint_wrapper', 'adyen-checkout__field__exp-date_hint_wrapper--hidden')\n                        : 'adyen-checkout__field__exp-date_hint_wrapper'\n                }\n                imgClassName={'adyen-checkout__field__exp-date_hint'}\n                alt={imageDescription}\n                url={getImage({ imageFolder: 'components/' })('expiry_date_hint')}\n            />\n        </Field>\n    );\n}\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport './AvailableBrands.scss';\nimport { BrandConfiguration } from '../../../../types';\nimport { getFullBrandName } from '../../utils';\nimport Brand from '../../../../../internal/Brand';\n\ntype AvailableBrands = Array<BrandConfiguration>;\n\ninterface PaymentMethodBrandsProps {\n    brands: AvailableBrands;\n    activeBrand: string;\n}\n\nconst AvailableBrands = ({ brands, activeBrand }: Readonly<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                <Brand\n                    showOnError\n                    wrapperClassName={'adyen-checkout__card__brands__brand-wrapper'}\n                    key={name}\n                    url={icon}\n                    alt={getFullBrandName(name)}\n                ></Brand>\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';\nimport './CardFields.scss';\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}: Readonly<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', {\n                    'adyen-checkout__card__exp-cvc__exp-date__input--hidden': expiryDatePolicy === DATE_POLICY_HIDDEN\n                })}\n            >\n                <ExpirationDate\n                    classNameModifiers={['col-50']}\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                    expiryDatePolicy={expiryDatePolicy}\n                    showContextualElement={showContextualElement}\n                    contextualText={i18n.get('creditCard.expiryDate.contextualText')}\n                />\n\n                {hasCVC && (\n                    <CVC\n                        classNameModifiers={['col-50']}\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                        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: Readonly<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 }: Readonly<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 }: Readonly<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 }: Readonly<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 LIBRARY_VERSION = process.env.VERSION;\nexport const LIBRARY_BUNDLE_TYPE = process.env.BUNDLE_TYPE;\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, payload?: 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        ...(payload && { body: JSON.stringify(payload) })\n    };\n\n    const url = `${loadingContext}${path}`;\n\n    return (\n        fetch(url, request)\n            .then(async response => {\n                // Handle empty responses (e.g., 204 No Content)\n                if (response.status === 204) {\n                    return;\n                }\n\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: Readonly<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: Readonly<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: Readonly<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: AddressLookupItem,\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<AddressLookupItem[]>([]);\n    const [originalData, setOriginalData] = useState<AddressLookupItem[]>([]);\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';\nimport './Address.scss';\n\nexport default function Address(props: Readonly<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    // In partial address mode, country is not in the form schema but we need it for regionalized labels.\n    // Store the merchant's country config once at mount, then use it if form data doesn't have country.\n    const initialCountryRef = useRef<string | undefined>((props.data as AddressData)?.country);\n    const effectiveCountry = (data.country || initialCountryRef.current)?.toUpperCase();\n    const dataWithCountry = useMemo(() => ({ ...data, country: effectiveCountry }), [data, effectiveCountry]);\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        // In partial address mode, ensure country is included in output for regionalized labels/validation.\n        if (!(processedData as AddressData).country && initialCountryRef.current) {\n            (processedData as AddressData).country = initialCountryRef.current;\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={dataWithCountry}\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, effectiveCountry, 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}: Readonly<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 }: Readonly<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: Readonly<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\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_black`} 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, mustHandleDualBrandingAccordingToEURegulations } from '../utils';\nimport Fieldset from '../../../../internal/FormFields/Fieldset';\nimport { useCoreContext } from '../../../../../core/Context/CoreProvider';\nimport { DUAL_BRANDS_THAT_NEED_SELECTION_MECHANISM } from '../../../constants';\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    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    //  Only if the brands in DUAL_BRANDS_THAT_NEED_SELECTION_MECHANISM are present in the binLookup response should we handle dual branding based on EU regulations\n    const showDualBrandSelectElements = mustHandleDualBrandingAccordingToEURegulations(\n        DUAL_BRANDS_THAT_NEED_SELECTION_MECHANISM,\n        dualBrandSelectElements,\n        'id'\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            {showDualBrandSelectElements && 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                    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","const SCROLL_OFFSET_TOP = 100; // Leave some breathing room at the top\n\nexport const windowScrollTo = (container: HTMLElement) => {\n    if (container) {\n        const bodyRect = document.body.getBoundingClientRect().top;\n        const elementRect = container.getBoundingClientRect().top;\n        const elementPosition = elementRect - bodyRect;\n        const offsetPosition = elementPosition - SCROLL_OFFSET_TOP;\n\n        window.scrollTo({\n            top: offsetPosition,\n            behavior: 'smooth'\n        });\n    }\n};\n","import { ENCRYPTED_CARD_NUMBER } from '../../../internal/SecuredFields/lib/constants';\nimport { selectOne } from '../../../internal/SecuredFields/lib/utilities/dom';\nimport { CardFocusData } from '../../../internal/SecuredFields/lib/types';\nimport ua from '../../../internal/SecuredFields/lib/CSF/utils/userAgent';\nimport { windowScrollTo } from '../../../../utils/windowScrollTo';\nimport type { SecuredFieldsProviderRef } from '../../../internal/SecuredFields/SFP/types';\nimport { CardSetFormData, CardSetFormValid, CardSetFormErrors, OnFieldFocus } from './types';\nimport type { Dispatch, MutableRef, StateUpdater } from 'preact/hooks';\nimport { isSecuredField } from '../../../internal/SecuredFields/utils';\n\n/**\n * Helper for CardInput - gets a field name and sets focus on it\n */\nexport const setFocusOnFirstField = (isValidating: boolean, sfp: SecuredFieldsProviderRef, fieldToFocus: string) => {\n    if (isValidating) {\n        // Fix for iOS scrolling issues: can't programmatically set focus on a cross-origin element on iOS, so we scroll to it's label instead, so at least the element is in view\n        if (ua.__IS_IOS) {\n            const rootNode = sfp.current.getRootNode?.();\n            const elementToScrollTo: HTMLElement = rootNode?.querySelector(`[data-id=\"${fieldToFocus}\"]`);\n            windowScrollTo(elementToScrollTo);\n        }\n\n        // If not a cardInput related securedField - find field and set focus on it\n        if (!isSecuredField(fieldToFocus)) {\n            setFocusOnNonSF(fieldToFocus, sfp, ua.__IS_IOS);\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: CardSetFormData, setFormValid: CardSetFormValid, setFormErrors: CardSetFormErrors) => {\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: Dispatch<StateUpdater<string>>, onFocus: OnFieldFocus, onBlur: OnFieldFocus) => {\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: MutableRef<boolean>, sfp: SecuredFieldsProviderRef, layout: string[]) => {\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 (isSecuredField(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, false);\n                        break;\n                    }\n                }\n\n                isAutoJumping.current = false;\n            });\n        }\n    };\n};\n\nconst setFocusOnNonSF = (fieldName: string, sfp: SecuredFieldsProviderRef, shouldPreventScroll: boolean) => {\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 (fieldName === 'taxNumber') fieldName = 'kcpTaxNumberOrDOB';\n\n    const rootNode = sfp.current.getRootNode?.();\n\n    if (fieldName === 'country' || fieldName === 'stateOrProvince') {\n        // Set focus on dropdown\n        const field: HTMLElement = selectOne(rootNode, `.adyen-checkout__field--${fieldName} .adyen-checkout__filter-input`);\n        field?.focus({ preventScroll: shouldPreventScroll }); // Don't even attempt to allow the focus call to trigger a scroll on iOS\n    } else {\n        // Set focus on input\n        const field: HTMLElement = selectOne(rootNode, `[name=\"${fieldName}\"]`);\n        field?.focus({ preventScroll: shouldPreventScroll }); // Don't even attempt to allow the focus call to trigger a scroll on iOS\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) {\n                        setFocusOnFirstField(isValidating.current, sfp, srPanelResp?.fieldToFocus);\n                    }\n\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 = ({\n    label,\n    labelPosition = 'after',\n    ariaLabel,\n    description,\n    checked,\n    disabled = false,\n    readonly = false,\n    onChange\n}: Readonly<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 }: Readonly<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}: Readonly<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, TargetedMouseEvent } from 'preact';\nimport classNames from 'classnames';\nimport Spinner from '../Spinner';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { ButtonProps, ButtonState } from './types';\nimport './Button.scss';\n\nclass Button extends Component<ButtonProps, ButtonState> {\n    public static readonly defaultProps = {\n        status: 'default',\n        variant: 'primary',\n        disabled: false,\n        label: '',\n        inline: false,\n        target: '_self'\n    };\n\n    public onClick = (e: TargetedMouseEvent<HTMLButtonElement>) => {\n        e.preventDefault();\n\n        if (!this.props.disabled) {\n            this.props.onClick?.(e, { complete: this.complete });\n        }\n    };\n\n    public complete = (delay = 1_000) => {\n        this.setState({ completed: true });\n        setTimeout(() => {\n            this.setState({ completed: false });\n        }, delay);\n    };\n\n    private readonly buttonStatusSRLabel = (status: string): string => {\n        const srLabels: Record<string, string> = {\n            loading: 'loading',\n            redirect: 'payButton.redirecting'\n        };\n\n        return srLabels[status] || '';\n    };\n\n    render() {\n        const {\n            classNameModifiers = [],\n            disabled,\n            href,\n            icon,\n            onClickCompletedIcon,\n            inline,\n            label,\n            ariaLabel,\n            ariaDescribedBy,\n            status,\n            variant,\n            buttonRef,\n            onClickCompletedLabel,\n            onMouseEnter,\n            onMouseLeave,\n            onFocus,\n            onBlur,\n            onKeyDown,\n            onKeyPress\n        }: ButtonProps = this.props;\n        const { completed } = this.state;\n        const { i18n } = useCoreContext();\n\n        const buttonIcon =\n            onClickCompletedIcon || icon ? (\n                <img\n                    className=\"adyen-checkout__button__icon\"\n                    src={this.state.completed ? (onClickCompletedIcon ?? icon) : icon}\n                    alt=\"\"\n                    aria-hidden=\"true\"\n                />\n            ) : (\n                ''\n            );\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 aria-hidden=\"true\" className=\"adyen-checkout__button__content\">\n                    <Spinner size=\"medium\" inline />\n                </span>\n            ),\n            redirect: (\n                <span aria-hidden=\"true\" 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\">{this.state.completed ? (onClickCompletedLabel ?? label) : label}</span>\n                </span>\n            )\n        };\n\n        const buttonText = buttonStates[status] || buttonStates.default;\n\n        if (href) {\n            return (\n                <a\n                    className={buttonClasses}\n                    href={href}\n                    target={this.props.target}\n                    rel={this.props.rel}\n                    aria-disabled={disabled}\n                    onClick={(e: TargetedMouseEvent<HTMLAnchorElement>) => {\n                        if (disabled) {\n                            e.preventDefault();\n                        }\n                    }}\n                >\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                aria-label={ariaLabel}\n                aria-describedby={ariaDescribedBy}\n                onMouseEnter={onMouseEnter}\n                onMouseLeave={onMouseLeave}\n                onKeyDown={onKeyDown}\n                onFocus={onFocus}\n                onBlur={onBlur}\n                onKeyPress={onKeyPress}\n            >\n                {buttonText}\n                {status !== 'loading' && status !== 'redirect' && this.props.children}\n                <span role=\"status\" aria-live=\"polite\" className=\"adyen-checkout__button__text--sr-only\">\n                    {i18n.get(this.buttonStatusSRLabel(status))}\n                </span>\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 }: Readonly<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')} aria-hidden={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=\"\" aria-hidden={true} />}\n            />\n\n            <InfoModal isOpen={isInfoModalOpen} onClose={handleOnClose} focusAfterClose={buttonRef.current} />\n        </Fragment>\n    );\n};\n\nexport { InfoButton };\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 {\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_SEARCH_DEBOUNCE_TIME = 3000;\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 NO_CHECKOUT_ATTEMPT_ID = 'fetch-checkoutAttemptId-failed';\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 { AbstractAnalyticsEvent, AnalyticsEventCategory } from './AbstractAnalyticsEvent';\nimport { mapErrorCodesForAnalytics } from '../utils';\n\ntype AnalyticsInfoEventProps = {\n    type: InfoEventType;\n    component: string;\n    target?: UiTarget;\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, any>;\n    cdnUrl?: string;\n    selectedValue?: string;\n};\n\nexport enum UiTarget {\n    instantPaymentButton = 'instant_payment_button',\n    dualBrandButton = 'dual_brand_button',\n    fastlaneSignupConsentToggle = 'fastlane_signup_consent_toggle',\n    otherPaymentMethodButton = 'otherpaymentmethod_button',\n    featuredIssuer = 'featured_issuer',\n    list = 'list',\n    listSearch = 'list_search',\n    qrDownloadButton = 'qr_download_button',\n    segmentedControl = 'segmented_control',\n    cardNumber = 'card_number',\n    expiryDate = 'expiry_date',\n    expiryMonth = 'expiry_month',\n    expiryYear = 'expiry_year',\n    securityCode = 'security_code'\n}\n\nexport enum InfoEventType {\n    /** When a UI element is clicked */\n    clicked = 'clicked',\n    /** When a component is rendered in the browser (e.g. render() method is called) */\n    rendered = 'rendered',\n    /** When a list item is selected (e.g. issuer list) */\n    selected = 'selected',\n    /** When there is a validation issue with the input */\n    validationError = 'validationError',\n    /** When input gets focus */\n    focus = 'focus',\n    /** When input gets unfocus */\n    unfocus = 'unfocus',\n    /** When iframe fields are configured */\n    configured = 'configured',\n    /** When a dropdown list is displayed */\n    displayed = 'displayed',\n    /** When shopper utilizes an input field to search for values (e.g. issuer list) */\n    input = 'input',\n    /** When shopper clicks to download the image (e.g. QR code image) */\n    download = 'download',\n    sdkDownloadInitiated = 'sdkDownloadInitiated',\n    sdkDownloadFailed = 'sdkDownloadFailed',\n    sdkDownloadAborted = 'sdkDownloadAborted',\n    sdkDownloadCompleted = 'sdkDownloadCompleted',\n    Initialized = 'initialized',\n    LookupStarted = 'lookupStarted',\n    LookupUserNotFound = 'lookupUserNotFound',\n    OtpStarted = 'otpStarted',\n    OtpSucceeded = 'otpSucceeded',\n    OtpCanceled = 'otpCanceled',\n    OtpFailed = 'otpFailed',\n    AddressSelectorClicked = 'addressSelectorClicked',\n    AddressSelectorClosed = 'addressSelectorClosed',\n    AddressChanged = 'addressChanged'\n}\n\nexport class AnalyticsInfoEvent extends AbstractAnalyticsEvent {\n    /**\n     * Analytics event type\n     */\n    private readonly type: InfoEventType;\n\n    /**\n     * Component config data set by the merchant. Sent only in 'rendered' events\n     * @private\n     */\n    private readonly configData?: Record<string, string | boolean>;\n    private readonly target?: UiTarget;\n    private readonly issuer?: string;\n    private readonly isExpress?: boolean;\n    private readonly expressPage?: string;\n    private readonly isStoredPaymentMethod?: boolean;\n    private readonly brand?: string;\n    private readonly selectedValue?: string;\n    private readonly validationErrorCode?: string;\n    private readonly validationErrorMessage?: string;\n\n    /**\n     *  Third party script URL's (e.g. Apple Pay)\n     */\n    public cdnUrl?: string;\n\n    constructor(props: AnalyticsInfoEventProps) {\n        super(props.component);\n\n        this.type = props.type;\n\n        if (props.target) this.target = props.target;\n        if (props.issuer) this.issuer = props.issuer;\n        if (props.isStoredPaymentMethod !== undefined) this.isStoredPaymentMethod = props.isStoredPaymentMethod;\n        if (props.isExpress !== undefined) this.isExpress = props.isExpress;\n        if (props.expressPage) this.expressPage = props.expressPage;\n        if (props.brand) this.brand = props.brand;\n        if (props.cdnUrl) this.cdnUrl = props.cdnUrl;\n        if (props.selectedValue) this.selectedValue = props.selectedValue;\n        if (props.validationErrorCode) this.validationErrorCode = props.validationErrorCode;\n        if (props.validationErrorMessage) this.validationErrorMessage = props.validationErrorMessage;\n        if (this.type === InfoEventType.rendered) {\n            this.configData = this.createAnalyticsConfigData(props?.configData);\n        }\n\n        // Some of the more generic validation error codes required combination with target to retrieve a specific code\n        if (this.type === InfoEventType.validationError) {\n            this.validationErrorCode = mapErrorCodesForAnalytics(this.validationErrorCode, this.target);\n        }\n    }\n\n    /**\n     * Set of properties that must not be included when creating the configData for Analytics\n     * @private\n     */\n    private get configDataExcludedFields() {\n        const DROPIN_FIELDS = ['paymentMethodsConfiguration'];\n        const FIELDS_INJECTED_BY_DROPIN = [\n            'elementRef',\n            'isDropin',\n            'oneClick',\n            'storedPaymentMethodId',\n            'paymentMethodId',\n            'isInstantPayment',\n            'type'\n        ];\n        const PII_FIELDS = ['data', 'holderName', 'shopperEmail', 'email', 'telephoneNumber', 'clickToPayConfiguration'];\n\n        /**\n         * TODO: Many unit tests are passing 'modules' as props, which leads to circular structure issue\n         * The components must use the 'modules' from the core and not from the props\n         */\n        const UNIT_TEST_FIELDS = ['modules', 'i18n'];\n\n        return [...DROPIN_FIELDS, ...FIELDS_INJECTED_BY_DROPIN, ...PII_FIELDS, ...UNIT_TEST_FIELDS];\n    }\n\n    /**\n     * Creates a serializable analytics payload from the given config object.\n     * Functions are replaced with 'function', and objects/arrays are stringified.\n     */\n    private createAnalyticsConfigData(config: Record<string, any>) {\n        if (!config) return {};\n\n        const MAX_STRING_LENGTH = 128;\n        const result: Record<string, string> = {};\n\n        try {\n            for (const [key, value] of Object.entries(config)) {\n                if (!this.configDataExcludedFields.includes(key)) {\n                    if (typeof value === 'function') {\n                        result[key] = 'function';\n                    } else if (Array.isArray(value)) {\n                        result[key] = value.join(', ').substring(0, MAX_STRING_LENGTH);\n                    } else if (typeof value === 'object' && value !== null) {\n                        result[key] = JSON.stringify(value).substring(0, MAX_STRING_LENGTH);\n                    } else {\n                        result[key] = value;\n                    }\n                }\n            }\n\n            return result;\n        } catch (error: unknown) {\n            if (process.env.NODE_ENV === 'development') console.warn('AnalyticsInfoEvent: Error when creating configData\\n', error);\n            return result;\n        }\n    }\n\n    public getEventCategory(): AnalyticsEventCategory {\n        return AnalyticsEventCategory.info;\n    }\n}\n","import { errorCodeMapping } from './constants';\nimport { digitsOnlyFormatter } from '../../utils/Formatters/formatters';\nimport { ERROR_FIELD_REQUIRED, ERROR_INVALID_FORMAT_EXPECTS } from '../Errors/constants';\nimport type { AnalyticsOptions } from './types';\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?: AnalyticsOptions['analyticsData']): AnalyticsOptions['analyticsData'] => {\n    const ALLOWED_ANALYTICS_DATA: Array<keyof AnalyticsOptions['analyticsData']> = ['applicationInfo', 'checkoutAttemptId'];\n\n    if (!analyticsData) return {};\n\n    return ALLOWED_ANALYTICS_DATA.reduce<AnalyticsOptions['analyticsData']>((acc, prop) => {\n        if (prop === 'applicationInfo') {\n            if (analyticsData.applicationInfo !== undefined) acc.applicationInfo = analyticsData.applicationInfo;\n            return acc;\n        }\n\n        if (prop === 'checkoutAttemptId') {\n            if (analyticsData.checkoutAttemptId !== undefined) acc.checkoutAttemptId = analyticsData.checkoutAttemptId;\n        }\n\n        return acc;\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 type { FastlaneSignupConfiguration } from '../../../PayPalFastlane/types';\n\nimport './FastlaneSignup.scss';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../../../core/Analytics/events/AnalyticsInfoEvent';\nimport { AbstractAnalyticsEvent } from '../../../../core/Analytics/events/AbstractAnalyticsEvent';\n\ntype FastlaneSignupProps = FastlaneSignupConfiguration & {\n    currentDetectedBrand: string;\n    onChange(state: any): void;\n    onSubmitAnalytics(event: AbstractAnalyticsEvent): void;\n    // Component type (e.g. scheme, bcmc)\n    type: string;\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    type\n}: Readonly<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            component: type,\n            type: InfoEventType.clicked,\n            target: UiTarget.fastlaneSignupConsentToggle,\n            configData: {\n                isToggleOn: newValue\n            }\n        });\n        onSubmitAnalytics(event);\n    }, [isChecked, onSubmitAnalytics, type]);\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            component: type,\n            type: InfoEventType.rendered,\n            configData: {\n                isFastlaneSignupRendered: shouldDisplaySignup\n            }\n        });\n\n        onSubmitAnalytics(event);\n    }, [shouldDisplaySignup, isFastlaneConfigurationValid, onSubmitAnalytics, type]);\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, shouldShowInstallmentsComponent } 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 { InstallmentsState } 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 { 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, InfoEventType, UiTarget } from '../../../../core/Analytics/events/AnalyticsInfoEvent';\nimport { useAmount } from '../../../../core/Context/AmountProvider';\n\nconst CardInput = (props: Readonly<CardInputProps>) => {\n    const sfp = useRef<SecuredFieldsProvider>(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    const { amount } = useAmount();\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<InstallmentsState>({ 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 = shouldShowInstallmentsComponent({\n        installmentOptions: props.installmentOptions,\n        fundingSource: props.fundingSource,\n        amount\n    });\n\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 mapSfpErrorsToCardInputErrors = (sfpErrors: SFPState['errors']): Partial<CardInputErrorState> => {\n        if (!sfpErrors) return {};\n\n        return {\n            encryptedCardNumber: !!sfpErrors.encryptedCardNumber,\n            encryptedExpiryDate: !!sfpErrors.encryptedExpiryDate,\n            encryptedSecurityCode: !!sfpErrors.encryptedSecurityCode,\n            encryptedPassword: !!sfpErrors.encryptedPassword\n        };\n    };\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, ...mapSfpErrorsToCardInputErrors(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                    component: props.type,\n                    type: InfoEventType.validationError,\n                    target: fieldTypeToSnakeCase(errorItem.field) as UiTarget,\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                component: props.type,\n                type: InfoEventType.displayed,\n                target: UiTarget.dualBrandButton,\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({\n                component: props.type,\n                type: InfoEventType.selected,\n                target: UiTarget.dualBrandButton,\n                brand: selectedBrandValue\n            });\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                onSubmitAnalytics={props.onSubmitAnalytics}\n                onChange={handleSecuredFieldsChange}\n                onBrand={onBrand}\n                onFocus={handleFocus}\n                onStateUpdate={handleSFPStateUpdate}\n                type={props.brand}\n                componentType={props.type}\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                    type={props.type}\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 type { 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    if (typeof window === 'undefined') {\n        return;\n    }\n    const colorDepth = window.screen.colorDepth;\n    const screenHeight = window.screen.height;\n    const screenWidth = window.screen.width;\n    const userAgent = window.navigator.userAgent;\n\n    const language = window.navigator.language || 'en';\n    const timeZoneOffset = new Date().getTimezoneOffset();\n\n    return {\n        acceptHeader: '*/*',\n        javaEnabled: false,\n        colorDepth,\n        language,\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';\nimport { AnalyticsInfoEvent, InfoEventType } from '../core/Analytics/events/AnalyticsInfoEvent';\nimport type { IAnalytics } from '../core/Analytics/Analytics';\n\ninterface IScript {\n    load(): Promise<void>;\n    remove(): void;\n}\n\ninterface IScriptProps {\n    src: string;\n    component: string;\n    analytics: IAnalytics;\n    node?: string;\n    attributes?: Partial<HTMLScriptElement>;\n    dataAttributes?: Record<string, string | undefined>;\n}\n\n// Returns Base URL of the resource without any query parameters (e.g. merchant ID, token, etc). Used for Analytics\nfunction getBaseURL(src: string): string {\n    const url = new URL(src);\n    return url.origin + url.pathname;\n}\n\nclass Script implements IScript {\n    private readonly src: string;\n    private readonly component: string;\n    private readonly node: string;\n    private readonly attributes: Partial<HTMLScriptElement>;\n    private readonly dataAttributes: Record<string, string | undefined>;\n    private readonly analytics: IAnalytics;\n    private readonly baseUrl: string;\n\n    private script: HTMLScriptElement;\n    private loadPromise: Promise<void> | null = null;\n    private rejectLoadPromise: (reason?: any) => void | null = null;\n    private resolveLoadScript: (() => void) | null = null;\n    private rejectLoadScript: ((reason?: any) => void) | null = null;\n\n    private readonly handleOnLoad = () => {\n        this.script?.setAttribute('data-script-loaded', 'true');\n        this.cleanupListeners();\n        this.resolveLoadScript?.();\n    };\n\n    private readonly handleOnError = (errorEvent: ErrorEvent) => {\n        this.cleanupListeners();\n        const error = new AdyenCheckoutError(\n            'SCRIPT_ERROR',\n            `Unable to load script ${this.src}.${errorEvent?.message && `Message: ${errorEvent.message}`}`,\n            {\n                cause: errorEvent?.error || errorEvent\n            }\n        );\n        this.rejectLoadScript?.(error);\n    };\n\n    public static readonly RETRY_DELAY = 1000;\n    public static readonly MAX_NUMBER_OF_RETRIES = 3;\n\n    constructor({ src, component, node = 'body', attributes, dataAttributes, analytics }: IScriptProps) {\n        this.src = src;\n        this.component = component;\n        this.node = node;\n        this.attributes = attributes;\n        this.dataAttributes = dataAttributes;\n        this.analytics = analytics;\n        this.baseUrl = getBaseURL(this.src);\n    }\n\n    public load = (): Promise<void> => {\n        if (this.loadPromise !== null) {\n            if (process.env.NODE_ENV === 'development') console.warn(`[Warning] script.load called more than once for ${this.src}`);\n            return this.loadPromise;\n        }\n\n        this.loadPromise = new Promise((resolve, reject) => {\n            this.rejectLoadPromise = reject;\n            let attempts = 0;\n\n            this.trackEvent(InfoEventType.sdkDownloadInitiated);\n\n            const loadScriptWithRetry = async (): Promise<void> => {\n                try {\n                    attempts++;\n                    await this.loadScript();\n                    this.trackEvent(InfoEventType.sdkDownloadCompleted);\n                    resolve();\n                } catch (error: unknown) {\n                    if (this.loadPromise === null) {\n                        return;\n                    }\n\n                    this.trackEvent(InfoEventType.sdkDownloadFailed);\n\n                    this.removeScript();\n\n                    if (attempts < Script.MAX_NUMBER_OF_RETRIES) {\n                        setTimeout(() => void loadScriptWithRetry(), Script.RETRY_DELAY);\n                    } else {\n                        this.trackEvent(InfoEventType.sdkDownloadAborted);\n                        this.loadPromise = null;\n                        this.rejectLoadPromise = null;\n                        reject(error);\n                    }\n                }\n            };\n\n            void loadScriptWithRetry();\n        });\n\n        return this.loadPromise;\n    };\n\n    public remove = () => {\n        this.rejectLoadPromise?.(new AdyenCheckoutError('CANCEL', 'Script loading cancelled.'));\n        this.removeScript();\n        this.loadPromise = null;\n    };\n\n    private removeScript() {\n        this.cleanupListeners();\n        this.script?.parentNode?.removeChild(this.script);\n        this.script = null;\n    }\n\n    private cleanupListeners() {\n        if (!this.script) return;\n        this.script.removeEventListener('load', this.handleOnLoad);\n        this.script.removeEventListener('error', this.handleOnError);\n    }\n\n    private attachListeners() {\n        if (!this.script) return;\n        this.cleanupListeners();\n        this.script.addEventListener('load', this.handleOnLoad);\n        this.script.addEventListener('error', this.handleOnError);\n    }\n\n    private loadScript(): Promise<void> {\n        return new Promise((resolve, reject) => {\n            const scriptContainer = document.querySelector(this.node);\n\n            if (!scriptContainer) {\n                reject(new AdyenCheckoutError('SCRIPT_ERROR', `Unable to find script container node: ${this.node}`));\n                return;\n            }\n\n            this.resolveLoadScript = resolve;\n            this.rejectLoadScript = reject;\n\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?.getAttribute('data-script-loaded')) {\n                this.resolveLoadScript();\n                return;\n            }\n\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            if (this.script) {\n                this.attachListeners();\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\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.attachListeners();\n\n            scriptContainer.appendChild(this.script);\n        });\n    }\n\n    private trackEvent(eventType: InfoEventType) {\n        const event = new AnalyticsInfoEvent({\n            type: eventType,\n            component: this.component,\n            cdnUrl: this.baseUrl\n        });\n        this.analytics?.sendAnalytics(event);\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';\nimport { IAnalytics } from '../../../../../core/Analytics/Analytics';\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 analytics: IAnalytics;\n    private readonly sdkUrl: string;\n    private scriptElement: Script | null = null;\n\n    protected constructor(sdkUrl: string, customSdkConfiguration: CustomSdkConfiguration, analytics: IAnalytics) {\n        if (!sdkUrl) throw Error('AbstractSrcInitiator: Invalid SDK URL');\n\n        this.sdkUrl = sdkUrl;\n        this.customSdkConfiguration = customSdkConfiguration;\n        this.analytics = analytics;\n    }\n\n    public async loadSdkScript(): Promise<void> {\n        if (!this.isSdkIsAvailableOnWindow()) {\n            this.scriptElement = new Script({\n                src: this.sdkUrl,\n                component: 'clicktopay',\n                analytics: this.analytics\n            });\n\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';\nimport type { IAnalytics } from '../../../../../core/Analytics/Analytics';\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, analytics: IAnalytics) {\n        super(environment.toLowerCase().includes('live') ? VISA_SDK_PROD : VISA_SDK_TEST, customSdkConfig, analytics);\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';\nimport type { IAnalytics } from '../../../../../core/Analytics/Analytics';\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, analytics: IAnalytics) {\n        super(environment.toLowerCase().includes('live') ? MC_SDK_PROD : MC_SDK_TEST, customSdkConfig, analytics);\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';\nimport type { IAnalytics } from '../../../../../core/Analytics/Analytics';\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, analytics: IAnalytics): ISrcInitiator | null => {\n    const SchemeSdkClass = sdkMap[scheme] || sdkMap.default;\n    return SchemeSdkClass ? new SchemeSdkClass(environment, customConfig, analytics) : null;\n};\n\nexport interface ISrcSdkLoader {\n    load(environment: string, analytics: IAnalytics): Promise<ISrcInitiator[]>;\n    schemes: string[];\n}\n\nclass SrcSdkLoader implements ISrcSdkLoader {\n    public readonly schemes: string[];\n\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, analytics: IAnalytics): 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, analytics));\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 (!['ACTIVE', 'PENDING'].includes(this.status)) return true;\n\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';\nimport type { IAnalytics } from '../../../../core/Analytics/Analytics';\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    private readonly analytics: IAnalytics;\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        analytics: IAnalytics,\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        this.analytics = analytics;\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, this.analytics);\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';\nimport type { IAnalytics } from '../../../../core/Analytics/Analytics';\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    analytics: IAnalytics\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\n    return new ClickToPayService(schemesConfig, srcSdkLoader, environment, analytics, 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 AdyenCheckoutError from '../../../../core/Errors/AdyenCheckoutError';\nimport { UIElementStatus } from '../../UIElement/types';\n\nexport interface IClickToPayContext extends Pick<\n    IClickToPayService,\n    'checkout' | 'startIdentityValidation' | 'finishIdentityValidation' | 'verifyIfShopperIsEnrolled'\n> {\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    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    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 { 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    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    configuration,\n    children,\n    setClickToPayRef,\n    onSubmit,\n    onSetStatus,\n    onError\n}: Readonly<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                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: 'field.error.required',\n        modes: ['blur']\n    },\n    default: {\n        validate: value => !!value && value.length > 0,\n        errorMessage: 'field.error.required',\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 }: Readonly<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 role=\"alert\" className=\"adyen-checkout-ctp__otp-resend-code--confirmation\">\n                {i18n.get('ctp.otp.codeResent')}\n                <Icon type={`${PREFIX}checkmark_black`} height={14} width={14} />\n            </div>\n        );\n    }\n\n    if (counter > 0) {\n        return (\n            <div role=\"timer\" 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 { ERROR_FIELD_INVALID, ERROR_FIELD_REQUIRED } from '../core/Errors/constants';\nimport Language from '../language';\n\nexport const getErrorMessage = (\n    i18n: Language,\n    error?: { errorMessage: string },\n    label?: string,\n    lowerCaseLabel: boolean = true\n): 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: lowerCaseLabel ? label?.toLowerCase() : label } };\n        return shouldBuildErrorMessage ? i18n.get(errorKey, options) : i18n.get(errorKey);\n    }\n\n    return !!error;\n};\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';\nimport { getErrorMessage } from '../../../../../../utils/getErrorMessage';\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: Readonly<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    const getOtpErrorMessage = useCallback(() => {\n        if (!isOtpFielDirty) return null;\n\n        return resendOtpError || props.errorMessage || getErrorMessage(i18n, errors.otp, i18n.get('ctp.otp.fieldLabel'));\n    }, [isOtpFielDirty, resendOtpError, props.errorMessage, errors.otp, i18n]);\n\n    return (\n        <div className={'adyen-checkout-ctp__otp-field-wrapper'}>\n            <Field name=\"oneTimePassword\" label={i18n.get('ctp.otp.fieldLabel')} errorMessage={getOtpErrorMessage()} classNameModifiers={['otp']}>\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 = [] }: Readonly<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 }: Readonly<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\">\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} aria-hidden={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 }: Readonly<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 }: Readonly<{ 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 }: Readonly<{ 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 }: Readonly<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 }: Readonly<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 type { PaymentAmount } from '../../../types/global-types';\n\nexport const PAY_BTN_DIVIDER = '/ ';\n\nconst amountLabel = (i18n, amount: PaymentAmount) =>\n    !!amount?.value && !!amount?.currency ? i18n.amount(amount.value, amount.currency, { currencyDisplay: amount.currencyDisplay || 'symbol' }) : '';\n\nconst isAmountFirstFormat = (i18n: Language): boolean => {\n    const format = i18n.get('payAmountFormat');\n    const tokenIndex = format.indexOf('%@');\n    return tokenIndex >= 0 && format.substring(tokenIndex + 2).trim().length > 0;\n};\n\nconst payAmountLabel = (i18n: Language, amount: PaymentAmount, secondaryAmount?: PaymentAmount) => {\n    const amountLabelValue = amountLabel(i18n, amount);\n    if (!amountLabelValue) {\n        return i18n.get('payButton');\n    }\n\n    if (secondaryAmount && isAmountFirstFormat(i18n)) {\n        const secondaryAmountValue = formatSecondaryAmountLabel(i18n, secondaryAmount);\n        return i18n.get('payAmountFormat').replace('%@', `${amountLabelValue}${secondaryAmountValue}`);\n    }\n\n    return i18n.get('payAmountFormat').replace('%@', amountLabelValue);\n};\n\nconst formatSecondaryAmountLabel = (i18n: Language, secondaryAmount: PaymentAmount) => {\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\nfunction createButtonLabel(\n    i18n: Language,\n    customLabel: string,\n    amount: PaymentAmount,\n    isZeroAuth: boolean,\n    customAmount?: PaymentAmount,\n    secondaryAmount?: PaymentAmount\n): string {\n    if (customLabel) {\n        return customLabel;\n    }\n\n    if (customAmount) {\n        return payAmountLabel(i18n, customAmount);\n    }\n\n    return isZeroAuth ? i18n.get('confirmPreauthorization') : payAmountLabel(i18n, amount, secondaryAmount);\n}\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, and\n *  - the payAmountFormat is not amount-first (e.g. \"%@ betalen\"), since in that case the secondary\n *    amount is already embedded in the button label via createButtonLabel\n */\nfunction createSecondaryLabel(\n    i18n: Language,\n    secondaryAmount: PaymentAmount,\n    isAmountValid: boolean,\n    isZeroAuth: boolean,\n    customLabel: string\n): string | null {\n    if (isZeroAuth || customLabel || !isAmountValid || !secondaryAmount) {\n        return null;\n    }\n\n    if (isAmountFirstFormat(i18n)) {\n        return null;\n    }\n\n    return formatSecondaryAmountLabel(i18n, secondaryAmount);\n}\n\nexport { payAmountLabel, amountLabel, createButtonLabel, createSecondaryLabel };\n","import { h } from 'preact';\n\nconst SecondaryButtonLabel = ({ label }) => {\n    return <span className={'checkout-secondary-button__text'}>{label}</span>;\n};\n\nexport default SecondaryButtonLabel;\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: Record<string, { minimumFractionDigits: number }> = {\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 { PaymentAmount } from '../types';\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 => {\n    const divider = CURRENCY_DECIMALS[currencyCode as keyof typeof CURRENCY_DECIMALS];\n    return divider || 100;\n};\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\n    const localeOptions: Intl.NumberFormatOptions = {\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 * Validates a payment amount object.\n *\n * @param amount - The payment amount object to validate\n * @returns True if the amount has a valid numeric value, non-empty currency string,\n *          and optionally a valid currencyDisplay string\n */\nexport const isAmountValid = (amount: PaymentAmount): boolean => {\n    if (!amount || typeof amount !== 'object') {\n        return false;\n    }\n\n    const hasValidValue = typeof amount.value === 'number' && !Number.isNaN(amount.value);\n    const hasValidCurrency = typeof amount.currency === 'string' && amount.currency.length > 0;\n    const hasValidCurrencyDisplay = amount.currencyDisplay === undefined || typeof amount.currencyDisplay === 'string';\n\n    return hasValidValue && hasValidCurrency && hasValidCurrencyDisplay;\n};\n","import { h } from 'preact';\nimport Button from '../Button';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { ButtonProps } from '../Button/types';\nimport { createButtonLabel, createSecondaryLabel } from './utils';\nimport SecondaryButtonLabel from './components/SecondaryButtonLabel';\nimport { useAmount, useSecondaryAmount } from '../../../core/Context/AmountProvider';\nimport type { PaymentAmount } from '../../../types';\nimport { isAmountValid } from '../../../utils/amount-util';\n\nexport interface PayButtonProps extends ButtonProps {\n    /**\n     * Class name modifiers will be used as: `adyen-checkout__image--${modifier}`\n     */\n    classNameModifiers?: string[];\n    /**\n     * Custom amount that can be passed to the button.\n     * This is useful when the amount is not available in the amount provider, such as Giftcard scenario where\n     * we need to display the remaining amount\n     */\n    customAmount?: PaymentAmount;\n    label?: string;\n    status?: string;\n    disabled?: boolean;\n    icon?: string;\n}\n\nconst PayButton = ({ customAmount, classNameModifiers = [], label, ...props }: Readonly<PayButtonProps>) => {\n    const { amount, isZeroAuth } = useAmount();\n    const { secondaryAmount } = useSecondaryAmount();\n    const { i18n } = useCoreContext();\n\n    const buttonLabel = createButtonLabel(i18n, label, amount, isZeroAuth, customAmount, secondaryAmount);\n    const secondaryAmountLabel = createSecondaryLabel(i18n, secondaryAmount, isAmountValid(amount), isZeroAuth, label);\n\n    const isDisabled = props.disabled || props.status === 'loading';\n\n    return (\n        <Button {...props} disabled={isDisabled} classNameModifiers={[...classNameModifiers, 'pay']} label={buttonLabel}>\n            {secondaryAmountLabel && <SecondaryButtonLabel label={secondaryAmountLabel} />}\n        </Button>\n    );\n};\n\nexport default PayButton;\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 }: Readonly<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\n            name=\"clickToPayCards\"\n            className=\"adyen-checkout-ctp__cards-list-field\"\n            errorMessage={errorMessage}\n            readOnly={status === 'loading'}\n            label={i18n.get('ctp.cards.subtitle')}\n        >\n            <Select\n                items={items}\n                selectedValue={data['srcDigitalCardId']}\n                name={'clickToPayCards'}\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<Readonly<IframeProps>> {\n    public static readonly 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';\nimport { useAmount } from '../../../../../core/Context/AmountProvider';\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 }: Readonly<CtPCardsProps>) => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const { 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    const { amount } = useAmount();\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                    {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                        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: Readonly<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: Readonly<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 }: Readonly<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 = [] }: Readonly<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 }: Readonly<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    configuration,\n    clickToPayService,\n    setClickToPayRef,\n    onSetStatus,\n    onSubmit,\n    onError,\n    isStandaloneComponent,\n    ...props\n}: Readonly<ClickToPayProviderProps>) => {\n    return (\n        <ClickToPayProvider\n            isStandaloneComponent={isStandaloneComponent}\n            configuration={configuration}\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 { 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 base64 from './base64';\n\nexport interface SdkDataObject {\n    schemaVersion: number;\n    createdAt: number;\n    analytics: {\n        checkoutAttemptId: string;\n    };\n    riskData: {\n        clientData: string;\n    };\n}\n\n/**\n * Creates the sdkData object with analytics and risk information\n * @param checkoutAttemptId - The checkout attempt ID from analytics\n * @param clientData - The client data from risk module\n * @returns Base64 encoded JSON string of the SDK data object\n */\nexport function createSdkData(checkoutAttemptId: string, clientData: string | null): string {\n    const sdkDataObject: SdkDataObject = {\n        schemaVersion: 1,\n        createdAt: Date.now(),\n        analytics: {\n            checkoutAttemptId\n        },\n        ...(clientData && { riskData: { clientData } })\n    };\n\n    return base64.encode(JSON.stringify(sdkDataObject));\n}\n","import { ComponentChild, h, render } from 'preact';\nimport uuid from '../../../utils/uuid';\nimport AdyenCheckoutError from '../../../core/Errors/AdyenCheckoutError';\nimport { NO_CHECKOUT_ATTEMPT_ID } from '../../../core/Analytics/constants';\nimport type { ICore } from '../../../core/types';\nimport type { BaseElementProps, IBaseElement } from './types';\nimport type { PaymentData } from '../../../types/global-types';\nimport { off, on } from '../../../utils/listenerUtils';\nimport { AbstractAnalyticsEvent } from '../../../core/Analytics/events/AbstractAnalyticsEvent';\nimport { createSdkData } from '../../../utils/createSdkData';\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 readonly 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 submitAnalytics(analyticsObj?: AbstractAnalyticsEvent) {\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 order = this.state.order || this.props.order;\n        const componentData = this.formatData();\n\n        const clientData = this.core.modules.risk.data;\n        const checkoutAttemptId = this.core.modules.analytics.checkoutAttemptId ?? NO_CHECKOUT_ATTEMPT_ID;\n\n        const sdkData = createSdkData(checkoutAttemptId, clientData);\n\n        if (componentData.paymentMethod && checkoutAttemptId) {\n            componentData.paymentMethod.checkoutAttemptId = checkoutAttemptId;\n        }\n\n        if (componentData.paymentMethod && sdkData) {\n            componentData.paymentMethod.sdkData = sdkData;\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        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        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, isDropinInstance: 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 isDropinInstance\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","import { AbstractAnalyticsEvent, AnalyticsEventCategory } from './AbstractAnalyticsEvent';\nimport type { PaymentAction } from '../../../types/global-types';\n\ntype AnalyticsLogEventProps = {\n    type: LogEventType;\n    subType?: LogEventSubtype;\n    component: string;\n    message: string;\n    result?: string;\n};\n\nexport enum LogEventType {\n    action = 'action',\n    submit = 'submit',\n    redirect = 'redirect',\n    threeDS2 = 'threeDS2',\n    closed = 'closed'\n}\n\nexport enum LogEventSubtype {\n    challengeIframeLoaded = 'challengeIframeLoaded',\n    challengeDataSentWeb = 'challengeDataSentWeb',\n    challengeCompleted = 'challengeCompleted',\n    fingerprintDataSentWeb = 'fingerprintDataSentWeb',\n    fingerprintCompleted = 'fingerprintCompleted',\n    fingerprintIframeLoaded = 'fingerprintIframeLoaded',\n    threeDS2 = 'threeDS2',\n    redirect = 'redirect',\n    voucher = 'voucher',\n    await = 'awat',\n    qrCode = 'qrCode',\n    bankTransfer = 'bankTransfer',\n    sdk = 'sdk'\n}\n\nexport class AnalyticsLogEvent extends AbstractAnalyticsEvent {\n    private readonly type: LogEventType;\n    private readonly subType: LogEventSubtype;\n\n    private readonly message?: string;\n    private readonly result?: string;\n\n    constructor(props: AnalyticsLogEventProps) {\n        super(props.component);\n\n        this.type = props.type;\n        this.message = props.message;\n\n        if (props.subType) this.subType = props.subType;\n        if (props.result) this.result = props.result;\n    }\n\n    public getEventCategory(): AnalyticsEventCategory {\n        return AnalyticsEventCategory.log;\n    }\n\n    public static getSubtypeFromActionType(type: PaymentAction['type']): LogEventSubtype {\n        return LogEventSubtype[type];\n    }\n}\n","class CancelError extends Error {\n    constructor(message?: string) {\n        super(message);\n    }\n}\n\nexport default CancelError;\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 }: Readonly<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","import { createRef, h, RefObject } from 'preact';\nimport { Resources } from '../../../core/Context/Resources';\nimport AdyenCheckoutError, { NETWORK_ERROR } from '../../../core/Errors/AdyenCheckoutError';\nimport { hasOwnProperty } from '../../../utils/hasOwnProperty';\nimport BaseElement from '../BaseElement/BaseElement';\nimport PayButton from '../PayButton';\nimport { assertIsDropin, cleanupFinalResult, getRegulatoryDefaults, sanitizeResponse, verifyPaymentDidNotFail } from './utils';\n\nimport { AbstractAnalyticsEvent } from '../../../core/Analytics/events/AbstractAnalyticsEvent';\nimport { AnalyticsErrorEvent, ErrorEventType } from '../../../core/Analytics/events/AnalyticsErrorEvent';\nimport { AnalyticsInfoEvent, InfoEventType } from '../../../core/Analytics/events/AnalyticsInfoEvent';\nimport { AnalyticsLogEvent, LogEventType } from '../../../core/Analytics/events/AnalyticsLogEvent';\nimport type { CheckoutSessionDetailsResponse, CheckoutSessionPaymentResponse } from '../../../core/CheckoutSession/types';\nimport type { NewableComponent } from '../../../core/core.registry';\nimport CancelError from '../../../core/Errors/CancelError';\nimport type { AdditionalDetailsData, CoreConfiguration, ICore } from '../../../core/types';\nimport type {\n    ActionHandledReturnObject,\n    CheckoutAdvancedFlowResponse,\n    Order,\n    PaymentAction,\n    PaymentAmount,\n    PaymentData,\n    PaymentMethodsResponse,\n    PaymentResponseData,\n    RawPaymentMethod\n} from '../../../types/global-types';\nimport type { IDropin } from '../../Dropin/types';\nimport type { ComponentMethodsRef, UIElementProps, UIElementStatus } from './types';\nimport type { IAnalytics } from '../../../core/Analytics/Analytics';\n\nimport { CoreProvider } from '../../../core/Context/CoreProvider';\nimport { SRPanel } from '../../../core/Errors/SRPanel';\nimport './UIElement.scss';\nimport SRPanelProvider from '../../../core/Errors/SRPanelProvider';\nimport { AmountProvider, AmountProviderRef } from '../../../core/Context/AmountProvider';\nimport { PayButtonProps } from '../PayButton/PayButton';\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 readonly type = undefined;\n\n    /**\n     * Reference to the methods exposed by the AmountProvider context\n     */\n    protected amountProviderRef: RefObject<AmountProviderRef> = createRef();\n\n    /**\n     * Defines all txVariants that the Component supports (in case it support multiple ones besides the 'type' one)\n     */\n    public static readonly 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        this.updateAmount = this.updateAmount.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        this.createBeforeRenderHook(props);\n        this.reportIntegrationFlavor();\n    }\n\n    /**\n     * Creates a hook tied to render() method. This hook is called every time render() is invoked.\n     * Currently useful for Analytics\n     *\n     * @param configSetByMerchant\n     * @private\n     */\n    private createBeforeRenderHook(configSetByMerchant: P): void {\n        const originalRender = this.render;\n\n        this.render = (...args: any[]) => {\n            this.beforeRender(configSetByMerchant);\n            return originalRender.apply(this, args);\n        };\n    }\n\n    protected beforeRender(configSetByMerchant?: P): void {\n        // We don't send 'rendered' events when rendering actions\n        if (configSetByMerchant?.originalAction) {\n            return;\n        }\n\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventType.rendered,\n            component: this.type,\n            configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n            ...(configSetByMerchant?.oneClick && { isStoredPaymentMethod: true })\n        });\n\n        this.analytics.sendAnalytics(event);\n    }\n\n    protected reportIntegrationFlavor(): void {\n        void this.analytics.sendFlavor('components');\n    }\n\n    get analytics(): IAnalytics {\n        return this.core.modules.analytics;\n    }\n\n    get srPanel(): SRPanel {\n        return this.core.modules.srPanel;\n    }\n\n    protected getPaymentMethodConfigFromResponse(componentProps: P) {\n        if (componentProps?.storedPaymentMethodId) return this.getStoredPaymentMethodDetails(componentProps.storedPaymentMethodId);\n        return this.getPaymentMethodFromPaymentMethodsResponse(componentProps?.type, componentProps?.paymentMethodId);\n    }\n\n    protected override buildElementProps(componentProps?: P) {\n        const globalCoreProps = this.core.getCorePropsForComponent();\n\n        const paymentMethodFromResponse = this.getPaymentMethodConfigFromResponse(componentProps);\n\n        const finalProps = {\n            showPayButton: true,\n            ...globalCoreProps,\n            ...paymentMethodFromResponse,\n            ...componentProps\n        };\n\n        const isDropinInstance = assertIsDropin(this as unknown as IDropin);\n\n        this.props = this.formatProps({\n            ...this.constructor['defaultProps'], // component defaults\n            ...getRegulatoryDefaults(this.core.options.countryCode, isDropinInstance), // regulatory defaults\n            ...finalProps // the rest (inc. merchant defined config)\n        });\n    }\n\n    protected getStoredPaymentMethodDetails(storedPaymentMethodId: string) {\n        return this.core.paymentMethodsResponse.findStoredPaymentMethod(storedPaymentMethodId);\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     * @param paymentMethodId - Unique internal payment method ID\n     */\n    protected getPaymentMethodFromPaymentMethodsResponse(type?: string, paymentMethodId?: string): RawPaymentMethod {\n        if (paymentMethodId) return this.core.paymentMethodsResponse.findById(paymentMethodId);\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     * Updates the amount in the props and propagates it to the AmountProvider.\n     * This allows children components to access the updated amount via context.\n     *\n     * @param amount - Primary payment amount object\n     * @param secondaryAmount - Optional secondary amount for display purposes (e.g., converted currency)\n     * @internal\n     */\n    public updateAmount(amount: PaymentAmount, secondaryAmount?: PaymentAmount): void {\n        this.props = {\n            ...this.props,\n            ...(amount && { amount }),\n            ...(secondaryAmount && { secondaryAmount })\n        };\n        this.amountProviderRef.current?.update(amount, secondaryAmount);\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    protected override submitAnalytics(event: AbstractAnalyticsEvent) {\n        this.analytics.sendAnalytics(event);\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                      void 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        const event = new AnalyticsLogEvent({\n            component: this.type,\n            type: LogEventType.submit,\n            message: 'Shopper clicked pay'\n        });\n        this.submitAnalytics(event);\n\n        return new Promise<CheckoutAdvancedFlowResponse>((resolve, reject) => {\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            component: this.type,\n            type: LogEventType.submit,\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+gfnW89DdJZAhxe74Tv0T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sCaEJ5LcnsqIUtmNxjm8HtfQ8gZW8JewEU3wHz4qg='\n        // };\n    }\n\n    protected onComplete(state): void {\n        this.handleAdditionalDetails(state);\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                component: this.type,\n                errorType: ErrorEventType.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        });\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\n            ? this.core.update({\n                  order\n              })\n            : 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: PayButtonProps) => {\n        return <PayButton {...props} 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    protected abstract componentToRender(): h.JSX.Element;\n\n    render() {\n        return (\n            <CoreProvider i18n={this.props.i18n} loadingContext={this.props.loadingContext} resources={this.resources} analytics={this.analytics}>\n                <SRPanelProvider srPanel={this.srPanel}>\n                    <AmountProvider amount={this.props.amount} secondaryAmount={this.props.secondaryAmount} providerRef={this.amountProviderRef}>\n                        {this.componentToRender()}\n                    </AmountProvider>\n                </SRPanelProvider>\n            </CoreProvider>\n        );\n    }\n}\n\nexport default UIElement;\n","import { h } from 'preact';\nimport CardInput from './components/CardInput';\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, isSecuredField } from '../internal/SecuredFields/utils';\nimport { reject } from '../../utils/commonUtils';\nimport { shouldIncludeInstallmentsInPaymentData } 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 { TxVariants } from '../tx-variants';\nimport type { UIElementStatus } from '../internal/UIElement/types';\nimport UIElement from '../internal/UIElement';\nimport PayButton from '../internal/PayButton';\nimport type { ICore } from '../../core/types';\nimport AdyenCheckoutError, { IMPLEMENTATION_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport CardInputDefaultProps from './components/CardInput/defaultProps';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nexport class CardElement extends UIElement<CardConfiguration> {\n    public static readonly type: TxVariants = 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 && this.props.fundingSource !== 'prepaid') {\n            this.clickToPayService = createClickToPayService(\n                this.props.configuration,\n                this.props.clickToPayConfiguration,\n                this.props.environment,\n                this.analytics\n            );\n\n            void this.clickToPayService?.initialize();\n        }\n    }\n\n    protected static readonly 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    // This is the most self contained way of handling funding source matching\n    // Alternatives would be to override getPaymentMethodConfigFromResponse and change it's signature\n    protected override getPaymentMethodConfigFromResponse(componentProps: CardConfiguration) {\n        if (componentProps?.fundingSource) {\n            return this.core.paymentMethodsResponse?.findByFundingSource(componentProps.type, componentProps.fundingSource);\n        }\n\n        return super.getPaymentMethodConfigFromResponse(componentProps);\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            ...(shouldIncludeInstallmentsInPaymentData(this.state.installments) && { installments: this.state.installments }),\n            browserInfo: this.browserInfo,\n            origin: !!window && window.location.origin\n        };\n    }\n\n    protected override beforeRender(configSetByMerchant?: CardConfiguration): void {\n        // We don't send 'rendered' events when rendering actions\n        if (configSetByMerchant?.originalAction) {\n            return;\n        }\n\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventType.rendered,\n            component: this.type,\n            configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n            ...(configSetByMerchant?.oneClick && {\n                isStoredPaymentMethod: true,\n                brand: configSetByMerchant.brand\n            })\n        });\n\n        this.analytics.sendAnalytics(event);\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    private onConfigSuccess = (obj: CardConfigSuccessData) => {\n        const event = new AnalyticsInfoEvent({ component: this.type, type: InfoEventType.configured });\n        this.submitAnalytics(event);\n\n        this.props.onConfigSuccess?.(obj);\n    };\n\n    private onFocus = (obj: ComponentFocusObject) => {\n        const event = new AnalyticsInfoEvent({\n            component: this.type,\n            type: InfoEventType.focus,\n            target: fieldTypeToSnakeCase(obj.fieldType) as UiTarget\n        });\n        this.submitAnalytics(event);\n\n        // Call merchant defined callback\n        if (isSecuredField(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({\n            component: this.type,\n            type: InfoEventType.unfocus,\n            target: fieldTypeToSnakeCase(obj.fieldType) as UiTarget\n        });\n        this.submitAnalytics(event);\n\n        // Call merchant defined callback\n        if (isSecuredField(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: PayButtonProps): h.JSX.Element => {\n        const isZeroAuth = this.props.amount?.value === 0;\n        const isStoredCard = this.props.storedPaymentMethodId?.length > 0;\n        return <PayButton {...props} label={isZeroAuth && !isStoredCard ? this.props.i18n.get('payButton.saveDetails') : ''} onClick={this.submit} />;\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    protected override componentToRender(): h.JSX.Element {\n        return (\n            <ClickToPayWrapper\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        );\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 override readonly type: TxVariants = TxVariants.bcmc;\n\n    constructor(checkout: ICore, props?: CardConfiguration) {\n        super(checkout, props);\n    }\n\n    protected static readonly 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';\nimport type { AbstractAnalyticsEvent } from '../../../core/Analytics/events/AbstractAnalyticsEvent';\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    onSubmitAnalytics?: (event: AbstractAnalyticsEvent) => 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: Readonly<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            componentType={props.type}\n            onChange={handleSecuredFieldsChange}\n            onSubmitAnalytics={props.onSubmitAnalytics}\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 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 { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nexport class CustomCard extends UIElement<CustomCardConfiguration> {\n    public static readonly type = TxVariants.customCard;\n\n    protected static readonly 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            component: this.type,\n            type: obj.focus === true ? InfoEventType.focus : InfoEventType.unfocus,\n            target: fieldTypeToSnakeCase(obj.fieldType) as UiTarget\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    protected override componentToRender(): h.JSX.Element {\n        return (\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                onSubmitAnalytics={this.submitAnalytics}\n            />\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<Readonly<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","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","/**\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 { CHALLENGE_WINDOW_SIZES, DEFAULT_CHALLENGE_WINDOW_SIZE } from '../constants';\nimport { getOrigin } from '../../../utils/getOrigin';\nimport base64 from '../../../utils/base64';\nimport type {\n    ChallengeData,\n    ThreeDS2Token,\n    FingerPrintData,\n    ResultObject,\n    FingerprintResolveData,\n    ChallengeResolveData,\n    ThreeDS2FlowProps,\n    ThreeDS2ActionProps\n} from '../types';\nimport type { DecodeObject } from '../../../types/global-types';\nimport type { 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\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: string, props: ThreeDS2ActionProps): ThreeDS2FlowProps => {\n    if (actionSubtype === 'fingerprint') {\n        return {\n            showSpinner: !props.isDropin,\n            statusType: 'loading',\n            // elementRef exists when the fingerprint component is created from the Dropin\n            ...(props.elementRef && { elementRef: props.elementRef })\n        };\n    }\n\n    // Challenge\n    return {\n        statusType: 'custom',\n        i18n: props.i18n,\n        elementRef: props.elementRef\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: NodeJS.Timeout | null;\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, LegacyChallengeResolveData, ChallengeResolveData } 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_NUM, MISSING_TOKEN_IN_ACTION_MSG } from '../../constants';\nimport { isValidHttpUrl } from '../../../../utils/isValidURL';\nimport { ErrorObject } from '../../../../core/Errors/types';\nimport { AnalyticsLogEvent, LogEventSubtype, LogEventType } from '../../../../core/Analytics/events/AnalyticsLogEvent';\nimport { AnalyticsErrorEvent, ErrorEventCode, ErrorEventType } from '../../../../core/Analytics/events/AnalyticsErrorEvent';\nimport { AbstractAnalyticsEvent } from '../../../../core/Analytics/events/AbstractAnalyticsEvent';\n\nclass PrepareChallenge3DS2 extends Component<PrepareChallenge3DS2Props, PrepareChallenge3DS2State> {\n    public static readonly 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            component: this.props.type,\n            type: LogEventType.threeDS2,\n            subType: LogEventSubtype.challengeDataSentWeb,\n            message: msg\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: `${ErrorEventCode.THREEDS2_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                    component: this.props.type,\n                    code: ErrorEventCode.THREEDS2_TOKEN_IS_MISSING_ACSURL,\n                    errorType: ErrorEventType.threeDS2,\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: `${ErrorEventCode.THREEDS2_TOKEN_IS_MISSING_OTHER_PROPS}: ${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                    component: this.props.type,\n                    code: ErrorEventCode.THREEDS2_TOKEN_IS_MISSING_OTHER_PROPS,\n                    errorType: ErrorEventType.threeDS2,\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                    ? ErrorEventCode.THREEDS2_ACTION_IS_MISSING_TOKEN\n                    : ErrorEventCode.THREEDS2_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                            ? `${ErrorEventCode.THREEDS2_ACTION_IS_MISSING_TOKEN}: ${this.props.i18n.get('err.gen.9102')}`\n                            : `${ErrorEventCode.THREEDS2_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                component: this.props.type,\n                code: errorCode,\n                errorType: ErrorEventType.threeDS2,\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: LegacyChallengeResolveData | ChallengeResolveData = resolveDataFunction(\n                this.props.dataKey,\n                resultObj.transStatus,\n                this.props.paymentData\n            );\n\n            if (errorCodeObject) {\n                console.debug('### PrepareChallenge3DS2::errorCodeObject::', errorCodeObject);\n            }\n\n            let event: AbstractAnalyticsEvent;\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' ? ErrorEventCode.THREEDS2_TIMEOUT : ErrorEventCode.THREEDS2_NO_TRANSSTATUS,\n                    errorType: ErrorEventType.threeDS2\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                    component: this.props.type,\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                component: this.props.type,\n                type: LogEventType.threeDS2,\n                subType: LogEventSubtype.challengeCompleted,\n                message: `${THREEDS2_NUM} challenge has 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                                component: this.props.type,\n                                code: ErrorEventCode.THREEDS2_CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP,\n                                errorType: ErrorEventType.threeDS2,\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 } from './constants';\nimport { existy } from '../../utils/commonUtils';\nimport { hasOwnProperty } from '../../utils/hasOwnProperty';\nimport { TxVariants } from '../tx-variants';\nimport { ChallengeResolveData, LegacyChallengeResolveData, ThreeDS2ChallengeConfiguration } from './types';\nimport AdyenCheckoutError, { API_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { ActionHandledReturnObject } from '../../types/global-types';\nimport { AnalyticsLogEvent, LogEventSubtype, LogEventType } from '../../core/Analytics/events/AnalyticsLogEvent';\nimport { AnalyticsErrorEvent, ErrorEventCode, ErrorEventType } from '../../core/Analytics/events/AnalyticsErrorEvent';\n\nclass ThreeDS2Challenge extends UIElement<ThreeDS2ChallengeConfiguration> {\n    public static readonly type = TxVariants.threeDS2Challenge;\n\n    public static readonly defaultProps = {\n        dataKey: 'threeDSResult',\n        size: DEFAULT_CHALLENGE_WINDOW_SIZE,\n        type: THREEDS2_CHALLENGE\n    };\n\n    protected override beforeRender() {\n        /* Do not send rendered events for ThreeDS2Challenge - it will have the same timestamp as the \"creq sent\" event */\n    }\n\n    protected onActionHandled = (rtnObj: ActionHandledReturnObject) => {\n        const event = new AnalyticsLogEvent({\n            component: this.type,\n            type: LogEventType.threeDS2,\n            subType: LogEventSubtype.challengeIframeLoaded,\n            message: rtnObj.actionDescription\n        });\n\n        this.submitAnalytics(event);\n\n        super.onActionHandled(rtnObj);\n    };\n\n    onComplete(state: LegacyChallengeResolveData | ChallengeResolveData) {\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 (this.props.onComplete) {\n            this.props.onComplete(state, this.elementRef);\n        } else {\n            super.onComplete(state);\n        }\n\n        this.unmount(); // re. fixing issue around back to back challenge calls\n    }\n\n    protected override componentToRender(): h.JSX.Element {\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                component: this.type,\n                code: ErrorEventCode.THREEDS2_ACTION_IS_MISSING_PAYMENT_DATA,\n                errorType: ErrorEventType.threeDS2,\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            <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        );\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 readonly 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, LegacyFingerprintResolveData, FingerprintResolveData } from '../../types';\nimport { ErrorObject } from '../../../../core/Errors/types';\nimport { isValidHttpUrl } from '../../../../utils/isValidURL';\nimport { THREEDS2_FINGERPRINT, THREEDS2_FINGERPRINT_ERROR, THREEDS2_NUM, MISSING_TOKEN_IN_ACTION_MSG, TIMEOUT } from '../../constants';\nimport { AnalyticsLogEvent, LogEventSubtype, LogEventType } from '../../../../core/Analytics/events/AnalyticsLogEvent';\nimport { AbstractAnalyticsEvent } from '../../../../core/Analytics/events/AbstractAnalyticsEvent';\nimport { AnalyticsErrorEvent, ErrorEventCode, ErrorEventType } from '../../../../core/Analytics/events/AnalyticsErrorEvent';\n\nclass PrepareFingerprint3DS2 extends Component<PrepareFingerprint3DS2Props, PrepareFingerprint3DS2State> {\n    public static readonly type = 'scheme';\n\n    public static readonly defaultProps = {\n        onComplete: () => {},\n        onError: () => {},\n        paymentData: '',\n        showSpinner: true,\n        isMDFlow: false\n    };\n\n    constructor(props) {\n        super(props);\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            component: this.props.type,\n            type: LogEventType.threeDS2,\n            subType: LogEventSubtype.fingerprintDataSentWeb,\n            message: msg\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: ErrorEventCode.THREEDS2_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: ErrorEventCode.THREEDS2_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                    ? ErrorEventCode.THREEDS2_ACTION_IS_MISSING_TOKEN\n                    : ErrorEventCode.THREEDS2_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: LegacyFingerprintResolveData | FingerprintResolveData = resolveDataFunction(\n                this.props.dataKey,\n                resultObj,\n                this.props.paymentData\n            );\n\n            let event: AbstractAnalyticsEvent;\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 ? ErrorEventCode.THREEDS2_TIMEOUT : finalResObject.errorCode,\n                    errorType: ErrorEventType.threeDS2\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                    component: this.props.type,\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                component: this.props.type,\n                type: LogEventType.threeDS2,\n                subType: LogEventSubtype.fingerprintCompleted,\n                message: `${THREEDS2_NUM} fingerprinting has 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 { API_ERROR_CODE } from '../../core/Services/sessions/constants';\nimport { AbstractAnalyticsEvent } from '../../core/Analytics/events/AbstractAnalyticsEvent';\nimport { AnalyticsErrorEvent, ErrorEventCode, ErrorEventType } from '../../core/Analytics/events/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: AbstractAnalyticsEvent;\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                        component: 'threeDS2Fingerprint',\n                        code: ErrorEventCode.THREEDS2_NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED,\n                        errorType: ErrorEventType.threeDS2,\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                    component: 'threeDS2Fingerprint',\n                    code: ErrorEventCode.THREEDS2_NO_ACTION_FOR_CHALLENGE,\n                    errorType: ErrorEventType.threeDS2,\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                    component: 'threeDS2Fingerprint',\n                    code: ErrorEventCode.THREEDS2_NO_COMPONENT_FOR_ACTION,\n                    errorType: ErrorEventType.threeDS2,\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 { FingerprintResolveData, LegacyFingerprintResolveData, ThreeDS2DeviceFingerprintConfiguration } from './types';\nimport AdyenCheckoutError, { API_ERROR } from '../../core/Errors/AdyenCheckoutError';\nimport { THREEDS2_FINGERPRINT, THREEDS2_FINGERPRINT_ERROR } from './constants';\nimport { ActionHandledReturnObject } from '../../types/global-types';\nimport { AnalyticsLogEvent, LogEventSubtype, LogEventType } from '../../core/Analytics/events/AnalyticsLogEvent';\nimport { AnalyticsErrorEvent, ErrorEventCode, ErrorEventType } from '../../core/Analytics/events/AnalyticsErrorEvent';\n\nclass ThreeDS2DeviceFingerprint extends UIElement<ThreeDS2DeviceFingerprintConfiguration> {\n    public static readonly type = TxVariants.threeDS2Fingerprint;\n\n    public static readonly defaultProps = {\n        dataKey: 'fingerprintResult',\n        type: THREEDS2_FINGERPRINT\n    };\n\n    private callSubmit3DS2Fingerprint = callSubmit3DS2Fingerprint.bind(this); // New 3DS2 flow\n\n    protected override beforeRender() {\n        /* Do not send rendered events for ThreeDS2DeviceFingerprint - it will have the same timestamp as the \"threeDSMethodData sent\" event */\n    }\n\n    protected onActionHandled = (rtnObj: ActionHandledReturnObject) => {\n        const event = new AnalyticsLogEvent({\n            component: this.type,\n            type: LogEventType.threeDS2,\n            subType: LogEventSubtype.fingerprintIframeLoaded,\n            message: rtnObj.actionDescription\n        });\n\n        this.submitAnalytics(event);\n\n        super.onActionHandled(rtnObj);\n    };\n\n    onComplete(state: LegacyFingerprintResolveData | FingerprintResolveData) {\n        if (this.props.onComplete) {\n            this.props.onComplete(state, this.elementRef);\n        } else {\n            super.onComplete(state);\n        }\n\n        this.unmount(); // re. fixing issue around back to back fingerprinting calls\n    }\n\n    protected override componentToRender(): h.JSX.Element {\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                component: this.type,\n                code: ErrorEventCode.THREEDS2_ACTION_IS_MISSING_PAYMENT_DATA,\n                errorType: ErrorEventType.threeDS2,\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 { useAmount } from '../../../core/Context/AmountProvider';\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    name: string;\n    showPayButton: boolean;\n    ref?: any;\n}\n\nfunction RedirectButton({ label = null, icon = null, payButton, onSubmit, name, showPayButton, ...props }: Readonly<RedirectButtonProps>) {\n    const { i18n } = useCoreContext();\n    const [status, setStatus] = useState('ready');\n    const { amount } = useAmount();\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, SelectTargetObject } 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 }: Readonly<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: { target: SelectTargetObject }) => {\n            const value = event.target.value as string;\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';\nimport { windowScrollTo } from './windowScrollTo';\nimport ua from '../components/internal/SecuredFields/lib/CSF/utils/userAgent';\n\n/**\n * Generic function to set focus on named element\n * @param holder - DOM element or CSS selector string to search within\n * @param fieldToFocus - Name of the field to focus on\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: Element | string, fieldToFocus: string, focusContextSelector = '') => {\n    // If holder is already a DOM element, use it directly; otherwise query for it\n    const pdHolder = holder instanceof Element ? holder : selectOne(document, holder);\n\n    let field: HTMLElement;\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        field = selectOne(pdHolder, `${focusContextSelector}.adyen-checkout__field--${fieldToFocus} .adyen-checkout__filter-input`);\n    } else {\n        // Set focus on input\n        field = selectOne(pdHolder, `${focusContextSelector} [name=\"${fieldToFocus}\"]`);\n    }\n\n    // Fix for iOS scrolling issues: can't programmatically set focus on an element on iOS, so we scroll to it instead, so at least it is in view\n    if (ua.__IS_IOS) {\n        windowScrollTo(field);\n    }\n\n    field?.focus({ preventScroll: ua.__IS_IOS }); // Don't even attempt to allow the focus call to trigger a scroll on iOS\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';\nimport useSRPanelForAchErrors from './useSRPanelForACHErrors';\nimport useImage from '../../../core/Context/useImage';\nimport { PREFIX } from '../../internal/Icon/constants';\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';\n\ntype AchForm = {\n    selectedAccountType: string;\n    ownerName: string;\n    routingNumber: string;\n    accountNumber: string;\n    accountNumberVerification: string;\n};\n\nexport type AchFormPrefillData = Partial<Pick<AchForm, 'ownerName'>>;\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: PayButtonProps) => h.JSX.Element;\n    setComponentRef: (ref: ComponentMethodsRef) => void;\n    hasHolderName: boolean;\n    showPayButton: boolean;\n    enableStoreDetails: boolean;\n    placeholders?: AchPlaceholders;\n    data?: AchFormPrefillData;\n}\n\nfunction AchComponent({\n    onChange,\n    payButton,\n    showPayButton,\n    placeholders,\n    data: defaultData,\n    hasHolderName,\n    setComponentRef,\n    enableStoreDetails\n}: Readonly<AchComponentProps>) {\n    const getImage = useImage();\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        defaultData,\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, icon: getImage({ imageFolder: 'components/' })(`${PREFIX}lock`) })}\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, RefObject } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport AchComponent from './components/AchComponent';\nimport defaultProps from './defaultProps';\n\nimport type { AchConfiguration } from './types';\n\nexport class AchElement extends UIElement<AchConfiguration> {\n    public static readonly type = TxVariants.ach;\n\n    protected static readonly 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    protected override componentToRender(): h.JSX.Element {\n        return this.props.storedPaymentMethodId ? (\n            <RedirectButton\n                showPayButton={this.props.showPayButton}\n                name={this.displayName}\n                payButton={this.payButton}\n                onSubmit={this.submit}\n                ref={(ref: RefObject<typeof RedirectButton>) => {\n                    this.componentRef = ref;\n                }}\n            />\n        ) : (\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                data={this.props.data}\n                setComponentRef={this.setComponentRef}\n                enableStoreDetails={this.props.enableStoreDetails}\n            />\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 { 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';\nimport { useAmount } from '../../../core/Context/AmountProvider';\n\nconst ENTER_STATE = 'enter-data';\nconst CONFIRM_STATE = 'confirm-data';\n\nfunction BacsInput(props: Readonly<BacsInputProps>) {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const { amount } = useAmount();\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                                  !!amount?.value && !!amount?.currency ? i18n.amount(amount.value, 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","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\nexport async function copyToClipboard(value) {\n    if (navigator?.clipboard?.writeText) {\n        try {\n            await navigator.clipboard.writeText(value);\n            return;\n        } catch (err) {\n            // swallow it, continue to fallback\n        }\n    }\n\n    let copyInput: HTMLInputElement;\n    try {\n        copyInput = createInput(value);\n        copyInput.select();\n        const successful = document.execCommand('copy');\n        if (!successful) {\n            console.warn('Fallback: Copy command was unsuccessful');\n        }\n    } catch (err) {\n        console.error('Fallback: Unable to copy', err);\n    } finally {\n        document.body.removeChild(copyInput);\n    }\n}\n\nexport default copyToClipboard;\n","import{Component as n,createElement as t,options as e,toChildArray as r,Fragment as u,render as o,hydrate as i,createContext as l,createRef as c,cloneElement as f}from\"preact\";export{Component,Fragment,createContext,createElement,createRef}from\"preact\";import{useState as a,useLayoutEffect as s,useEffect as h,useCallback as v,useContext as d,useDebugValue as m,useId as p,useImperativeHandle as y,useMemo as _,useReducer as b,useRef as S}from\"preact/hooks\";export*from\"preact/hooks\";function g(n,t){for(var e in t)n[e]=t[e];return n}function E(n,t){for(var e in n)if(\"__source\"!==e&&!(e in t))return!0;for(var r in t)if(\"__source\"!==r&&n[r]!==t[r])return!0;return!1}function C(n,t){var e=t(),r=a({t:{__:e,u:t}}),u=r[0].t,o=r[1];return s(function(){u.__=e,u.u=t,R(u)&&o({t:u})},[n,e,t]),h(function(){return R(u)&&o({t:u}),n(function(){R(u)&&o({t:u})})},[n]),e}function R(n){var t,e,r=n.u,u=n.__;try{var o=r();return!((t=u)===(e=o)&&(0!==t||1/t==1/e)||t!=t&&e!=e)}catch(n){return!0}}function x(n){n()}function w(n){return n}function k(){return[!1,x]}var I=s;function N(n,t){this.props=n,this.context=t}function M(n,e){function r(n){var t=this.props.ref,r=t==n.ref;return!r&&t&&(t.call?t(null):t.current=null),e?!e(this.props,n)||!r:E(this.props,n)}function u(e){return this.shouldComponentUpdate=r,t(n,e)}return u.displayName=\"Memo(\"+(n.displayName||n.name)+\")\",u.prototype.isReactComponent=!0,u.__f=!0,u.type=n,u}(N.prototype=new n).isPureReactComponent=!0,N.prototype.shouldComponentUpdate=function(n,t){return E(this.props,n)||E(this.state,t)};var T=e.__b;e.__b=function(n){n.type&&n.type.__f&&n.ref&&(n.props.ref=n.ref,n.ref=null),T&&T(n)};var A=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.forward_ref\")||3911;function D(n){function t(t){var e=g({},t);return delete e.ref,n(e,t.ref||null)}return t.$$typeof=A,t.render=n,t.prototype.isReactComponent=t.__f=!0,t.displayName=\"ForwardRef(\"+(n.displayName||n.name)+\")\",t}var L=function(n,t){return null==n?null:r(r(n).map(t))},O={map:L,forEach:L,count:function(n){return n?r(n).length:0},only:function(n){var t=r(n);if(1!==t.length)throw\"Children.only\";return t[0]},toArray:r},U=e.__e;e.__e=function(n,t,e,r){if(n.then)for(var u,o=t;o=o.__;)if((u=o.__c)&&u.__c)return null==t.__e&&(t.__e=e.__e,t.__k=e.__k),u.__c(n,t);U(n,t,e,r)};var F=e.unmount;function V(n,t,e){return n&&(n.__c&&n.__c.__H&&(n.__c.__H.__.forEach(function(n){\"function\"==typeof n.__c&&n.__c()}),n.__c.__H=null),null!=(n=g({},n)).__c&&(n.__c.__P===e&&(n.__c.__P=t),n.__c.__e=!0,n.__c=null),n.__k=n.__k&&n.__k.map(function(n){return V(n,t,e)})),n}function W(n,t,e){return n&&e&&(n.__v=null,n.__k=n.__k&&n.__k.map(function(n){return W(n,t,e)}),n.__c&&n.__c.__P===t&&(n.__e&&e.appendChild(n.__e),n.__c.__e=!0,n.__c.__P=e)),n}function P(){this.__u=0,this.o=null,this.__b=null}function j(n){if(!n.__)return null;var t=n.__.__c;return t&&t.__a&&t.__a(n)}function z(n){var e,r,u,o=null;function i(i){if(e||(e=n()).then(function(n){n&&(o=n.default||n),u=!0},function(n){r=n,u=!0}),r)throw r;if(!u)throw e;return o?t(o,i):null}return i.displayName=\"Lazy\",i.__f=!0,i}function B(){this.i=null,this.l=null}e.unmount=function(n){var t=n.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&n.__u&&(n.type=null),F&&F(n)},(P.prototype=new n).__c=function(n,t){var e=t.__c,r=this;null==r.o&&(r.o=[]),r.o.push(e);var u=j(r.__v),o=!1,i=function(){o||r.__z||(o=!0,e.__R=null,u?u(c):c())};e.__R=i;var l=e.__P;e.__P=null;var c=function(){if(!--r.__u){if(r.state.__a){var n=r.state.__a;r.__v.__k[0]=W(n,n.__c.__P,n.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.__P=l,t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),n.then(i,i)},P.prototype.componentWillUnmount=function(){this.o=[]},P.prototype.render=function(n,e){if(this.__b){if(this.__v.__k){var r=document.createElement(\"div\"),o=this.__v.__k[0].__c;this.__v.__k[0]=V(this.__b,r,o.__O=o.__P)}this.__b=null}var i=e.__a&&t(u,null,n.fallback);return i&&(i.__u&=-33),[t(u,null,e.__a?null:n.children),i]};var H=function(n,t,e){if(++e[1]===e[0]&&n.l.delete(t),n.props.revealOrder&&(\"t\"!==n.props.revealOrder[0]||!n.l.size))for(e=n.i;e;){for(;e.length>3;)e.pop()();if(e[1]<e[0])break;n.i=e=e[2]}};function Z(n){return this.getChildContext=function(){return n.context},n.children}function Y(n){var e=this,r=n.h;if(e.componentWillUnmount=function(){o(null,e.v),e.v=null,e.h=null},e.h&&e.h!==r&&e.componentWillUnmount(),!e.v){for(var u=e.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;e.h=r,e.v={nodeType:1,parentNode:r,childNodes:[],__k:{__m:u.__m},contains:function(){return!0},namespaceURI:r.namespaceURI,insertBefore:function(n,t){this.childNodes.push(n),e.h.insertBefore(n,t)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),e.h.removeChild(n)}}}o(t(Z,{context:e.context},n.__v),e.v)}function $(n,e){var r=t(Y,{__v:n,h:e});return r.containerInfo=e,r}(B.prototype=new n).__a=function(n){var t=this,e=j(t.__v),r=t.l.get(n);return r[0]++,function(u){var o=function(){t.props.revealOrder?(r.push(u),H(t,n,r)):u()};e?e(o):o()}},B.prototype.render=function(n){this.i=null,this.l=new Map;var t=r(n.children);n.revealOrder&&\"b\"===n.revealOrder[0]&&t.reverse();for(var e=t.length;e--;)this.l.set(t[e],this.i=[1,0,this.i]);return n.children},B.prototype.componentDidUpdate=B.prototype.componentDidMount=function(){var n=this;this.l.forEach(function(t,e){H(n,e,t)})};var q=\"undefined\"!=typeof Symbol&&Symbol.for&&Symbol.for(\"react.element\")||60103,G=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,J=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,K=/[A-Z0-9]/g,Q=\"undefined\"!=typeof document,X=function(n){return(\"undefined\"!=typeof Symbol&&\"symbol\"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(n)};function nn(n,t,e){return null==t.__k&&(t.textContent=\"\"),o(n,t),\"function\"==typeof e&&e(),n?n.__c:null}function tn(n,t,e){return i(n,t),\"function\"==typeof e&&e(),n?n.__c:null}n.prototype.isReactComponent={},[\"componentWillMount\",\"componentWillReceiveProps\",\"componentWillUpdate\"].forEach(function(t){Object.defineProperty(n.prototype,t,{configurable:!0,get:function(){return this[\"UNSAFE_\"+t]},set:function(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})});var en=e.event;function rn(){}function un(){return this.cancelBubble}function on(){return this.defaultPrevented}e.event=function(n){return en&&(n=en(n)),n.persist=rn,n.isPropagationStopped=un,n.isDefaultPrevented=on,n.nativeEvent=n};var ln,cn={enumerable:!1,configurable:!0,get:function(){return this.class}},fn=e.vnode;e.vnode=function(n){\"string\"==typeof n.type&&function(n){var t=n.props,e=n.type,u={},o=-1===e.indexOf(\"-\");for(var i in t){var l=t[i];if(!(\"value\"===i&&\"defaultValue\"in t&&null==l||Q&&\"children\"===i&&\"noscript\"===e||\"class\"===i||\"className\"===i)){var c=i.toLowerCase();\"defaultValue\"===i&&\"value\"in t&&null==t.value?i=\"value\":\"download\"===i&&!0===l?l=\"\":\"translate\"===c&&\"no\"===l?l=!1:\"o\"===c[0]&&\"n\"===c[1]?\"ondoubleclick\"===c?i=\"ondblclick\":\"onchange\"!==c||\"input\"!==e&&\"textarea\"!==e||X(t.type)?\"onfocus\"===c?i=\"onfocusin\":\"onblur\"===c?i=\"onfocusout\":J.test(i)&&(i=c):c=i=\"oninput\":o&&G.test(i)?i=i.replace(K,\"-$&\").toLowerCase():null===l&&(l=void 0),\"oninput\"===c&&u[i=c]&&(i=\"oninputCapture\"),u[i]=l}}\"select\"==e&&u.multiple&&Array.isArray(u.value)&&(u.value=r(t.children).forEach(function(n){n.props.selected=-1!=u.value.indexOf(n.props.value)})),\"select\"==e&&null!=u.defaultValue&&(u.value=r(t.children).forEach(function(n){n.props.selected=u.multiple?-1!=u.defaultValue.indexOf(n.props.value):u.defaultValue==n.props.value})),t.class&&!t.className?(u.class=t.class,Object.defineProperty(u,\"className\",cn)):(t.className&&!t.class||t.class&&t.className)&&(u.class=u.className=t.className),n.props=u}(n),n.$$typeof=q,fn&&fn(n)};var an=e.__r;e.__r=function(n){an&&an(n),ln=n.__c};var sn=e.diffed;e.diffed=function(n){sn&&sn(n);var t=n.props,e=n.__e;null!=e&&\"textarea\"===n.type&&\"value\"in t&&t.value!==e.value&&(e.value=null==t.value?\"\":t.value),ln=null};var hn={ReactCurrentDispatcher:{current:{readContext:function(n){return ln.__n[n.__c].props.value},useCallback:v,useContext:d,useDebugValue:m,useDeferredValue:w,useEffect:h,useId:p,useImperativeHandle:y,useInsertionEffect:I,useLayoutEffect:s,useMemo:_,useReducer:b,useRef:S,useState:a,useSyncExternalStore:C,useTransition:k}}},vn=\"18.3.1\";function dn(n){return t.bind(null,n)}function mn(n){return!!n&&n.$$typeof===q}function pn(n){return mn(n)&&n.type===u}function yn(n){return!!n&&!!n.displayName&&(\"string\"==typeof n.displayName||n.displayName instanceof String)&&n.displayName.startsWith(\"Memo(\")}function _n(n){return mn(n)?f.apply(null,arguments):n}function bn(n){return!!n.__k&&(o(null,n),!0)}function Sn(n){return n&&(n.base||1===n.nodeType&&n)||null}var gn=function(n,t){return n(t)},En=function(n,t){return n(t)},Cn=u,Rn=mn,xn={useState:a,useId:p,useReducer:b,useEffect:h,useLayoutEffect:s,useInsertionEffect:I,useTransition:k,useDeferredValue:w,useSyncExternalStore:C,startTransition:x,useRef:S,useImperativeHandle:y,useMemo:_,useCallback:v,useContext:d,useDebugValue:m,version:\"18.3.1\",Children:O,render:nn,hydrate:tn,unmountComponentAtNode:bn,createPortal:$,createElement:t,createContext:l,createFactory:dn,cloneElement:_n,createRef:c,Fragment:u,isValidElement:mn,isElement:Rn,isFragment:pn,isMemo:yn,findDOMNode:Sn,Component:n,PureComponent:N,memo:M,forwardRef:D,flushSync:En,unstable_batchedUpdates:gn,StrictMode:Cn,Suspense:P,SuspenseList:B,lazy:z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:hn};export{O as Children,N as PureComponent,Cn as StrictMode,P as Suspense,B as SuspenseList,hn as __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_n as cloneElement,dn as createFactory,$ as createPortal,xn as default,Sn as findDOMNode,En as flushSync,D as forwardRef,tn as hydrate,Rn as isElement,pn as isFragment,yn as isMemo,mn as isValidElement,z as lazy,M as memo,nn as render,x as startTransition,bn as unmountComponentAtNode,gn as unstable_batchedUpdates,w as useDeferredValue,I as useInsertionEffect,C as useSyncExternalStore,k as useTransition,vn as version};\n//# sourceMappingURL=compat.module.js.map\n","import { h } from 'preact';\nimport { useRef, useEffect, useState, useLayoutEffect } from 'preact/hooks';\nimport { createPortal } from 'preact/compat';\nimport cx from 'classnames';\nimport './Tooltip.scss';\nimport { TooltipPosition, TooltipProps } from './types';\n\n// 8px space between the target and the tooltip\nconst OFFSET = 8;\n\nexport function Tooltip(props: Readonly<TooltipProps>) {\n    const tooltipRef = useRef<HTMLDivElement>(null);\n    const [position, setPosition] = useState<TooltipPosition>('top');\n    const [isAnchorVisible, setIsAnchorVisible] = useState<boolean>(true);\n    const [style, setStyle] = useState({});\n\n    useLayoutEffect(() => {\n        if (!props?.visible || !props?.anchorRef?.current || !tooltipRef.current) return;\n\n        const updatePosition = () => {\n            const anchorEl = props.anchorRef.current;\n            const tooltipEl = tooltipRef.current;\n            const anchorRect = anchorEl.getBoundingClientRect();\n\n            const offsetTop = anchorRect.top + window.scrollY;\n            const offsetLeft = anchorRect.left + window.scrollX;\n            const spaceAbove = anchorRect.top;\n            const spaceBelow = window.innerHeight - anchorRect.bottom;\n\n            let newPosition: TooltipPosition;\n            if (spaceAbove >= tooltipEl.offsetHeight + OFFSET) {\n                newPosition = 'top';\n            } else if (spaceBelow >= tooltipEl.offsetHeight + OFFSET) {\n                newPosition = 'bottom';\n            } else {\n                newPosition = spaceBelow > spaceAbove ? 'bottom' : 'top';\n            }\n\n            const newStyle: any = {\n                position: 'absolute',\n                left: offsetLeft + anchorRect.width / 2,\n                transform: 'translateX(-50%)',\n                willChange: 'transform'\n            };\n            newStyle.top = newPosition === 'top' ? offsetTop - tooltipEl.offsetHeight - OFFSET : offsetTop + anchorRect.height + OFFSET;\n\n            setStyle(newStyle);\n            setPosition(newPosition);\n        };\n\n        // We need {capture: true}, if the tooltip is placed inside scrollable containers because:\n        // Scroll does not bubble. So if an element inside your page scrolls (like a <div> with overflow: scroll),\n        // and you attach a scroll listener on the window without capture: true, it won’t catch those inner scrolls.\n        window.addEventListener('scroll', updatePosition, { capture: true });\n        window.addEventListener('resize', updatePosition);\n\n        updatePosition();\n\n        return () => {\n            window.removeEventListener('scroll', updatePosition, { capture: true });\n            window.removeEventListener('resize', updatePosition);\n        };\n    }, [props?.visible, props?.anchorRef]);\n\n    // Hide the tooltip if it's not in the viewport.\n    useEffect(() => {\n        const anchor = props?.anchorRef?.current;\n        if (!anchor) return;\n\n        if ('IntersectionObserver' in window) {\n            const observer = new IntersectionObserver(\n                ([entry]) => {\n                    setIsAnchorVisible(entry.isIntersecting);\n                },\n                { threshold: 0.1 }\n            );\n            observer.observe(anchor);\n\n            return () => {\n                observer.disconnect();\n            };\n        }\n    }, [props?.anchorRef]);\n\n    return createPortal(\n        <div\n            id={props.id}\n            role=\"tooltip\"\n            aria-live={'polite'}\n            className={cx({\n                'adyen-checkout-tooltip': true,\n                'adyen-checkout-tooltip--hidden': !props.visible || !isAnchorVisible,\n                [`adyen-checkout-tooltip--${position}`]: true\n            })}\n            ref={tooltipRef}\n            style={style}\n        >\n            {props.text}\n            <div className={`adyen-checkout-tooltip-arrow adyen-checkout-tooltip-arrow--${position}`} />\n        </div>,\n        document.body\n    );\n}\n","import { TooltipProps } from './types';\nimport { getUniqueId } from '../../../utils/idGenerator';\n\ntype setTooltipState = (state: TooltipProps | null) => void;\n\nexport class TooltipController {\n    public static readonly tooltipId = getUniqueId('adyen-checkout-tooltip');\n    private static readonly DEFAULT_TIMEOUT = 100;\n    private static readonly PRIMARY_TOOLTIP_RESET_EVENT = 'primary-tooltip-reset';\n    private static timeoutId: ReturnType<typeof setTimeout> | null = null;\n    private static registered = false;\n    private static updateGlobalTooltip: setTooltipState = () => {};\n    private static readonly eventTarget = new EventTarget();\n\n    public static registerTooltipHandler(fn: setTooltipState): void {\n        this.updateGlobalTooltip = fn;\n        this.registered = true;\n    }\n\n    public static canRegisterTooltipHandler(): boolean {\n        return !this.registered;\n    }\n\n    public static showTooltip(state?: TooltipProps) {\n        clearTimeout(this.timeoutId);\n        this.timeoutId = setTimeout(() => this.updateGlobalTooltip({ ...state, visible: true }), this.DEFAULT_TIMEOUT);\n    }\n\n    public static hideTooltip(state?: TooltipProps) {\n        clearTimeout(this.timeoutId);\n        this.timeoutId = setTimeout(() => this.updateGlobalTooltip({ ...state, visible: false }), this.DEFAULT_TIMEOUT);\n    }\n\n    public static reset() {\n        this.registered = false;\n        this.updateGlobalTooltip = () => {};\n        this.notifyPrimaryReset();\n    }\n\n    private static notifyPrimaryReset() {\n        this.eventTarget.dispatchEvent(new Event(TooltipController.PRIMARY_TOOLTIP_RESET_EVENT));\n    }\n\n    public static onPrimaryReset(callback: () => void) {\n        this.eventTarget.addEventListener(TooltipController.PRIMARY_TOOLTIP_RESET_EVENT, callback);\n        return () => this.eventTarget.removeEventListener(TooltipController.PRIMARY_TOOLTIP_RESET_EVENT, callback);\n    }\n}\n","import { createContext, h, ComponentChildren } from 'preact';\nimport { useState, useEffect, useContext, useRef, useMemo } from 'preact/hooks';\nimport { Tooltip } from './Tooltip';\nimport { TooltipProps } from './types';\nimport { TooltipController } from './TooltipController';\n\ntype TooltipContextValue = {\n    id: string;\n    showTooltip: (state?: TooltipProps) => void;\n    hideTooltip: () => void;\n};\n\nconst TooltipContext = createContext<TooltipContextValue | null>(null);\n\nconst SingletonTooltipProvider = ({ children }: Readonly<{ children?: ComponentChildren }>) => {\n    const [tooltipProps, setTooltipProps] = useState<TooltipProps | null>(null);\n    const tooltipId = useRef(TooltipController.tooltipId);\n    /**\n     * We use `useRef` instead of `useState` to avoid triggering the `useEffect` again\n     * (which would happen if `isPrimary` were a state value in the `useEffect` dependency list).\n     * Because we need `TooltipController.onPrimaryReset` to add an event listener ONCE, we don't want\n     * to re-run `useEffect` and register it again on every state update.\n     *\n     * However, we do need a way to re-render, hence added `forceUpdate`.\n     */\n    const isPrimaryInstanceRef = useRef(false);\n    const [, forceUpdate] = useState(0);\n\n    useEffect(() => {\n        const tryRegister = () => {\n            if (TooltipController.canRegisterTooltipHandler()) {\n                TooltipController.registerTooltipHandler(setTooltipProps);\n                isPrimaryInstanceRef.current = true;\n                forceUpdate(r => r + 1);\n            } else {\n                isPrimaryInstanceRef.current = false;\n                forceUpdate(r => r + 1);\n            }\n        };\n\n        tryRegister();\n\n        const unsubscribe = TooltipController.onPrimaryReset(() => {\n            tryRegister();\n        });\n\n        return () => {\n            // When the primary instance is unmounted, the only tooltip component is gone.\n            // So we need to notify other instances, one of the instances should\n            // become the primary instance to mount the tooltip component again.\n            unsubscribe();\n            if (isPrimaryInstanceRef.current) {\n                TooltipController.reset();\n            }\n        };\n    }, []);\n\n    const contextValue = useMemo(\n        () => ({\n            showTooltip: (state?: TooltipProps) => TooltipController.showTooltip(state),\n            hideTooltip: (state?: TooltipProps) => TooltipController.hideTooltip(state),\n            id: tooltipId.current\n        }),\n        []\n    );\n\n    return (\n        <TooltipContext.Provider value={contextValue}>\n            {children}\n            {isPrimaryInstanceRef.current && <Tooltip id={tooltipId.current} {...tooltipProps} />}\n        </TooltipContext.Provider>\n    );\n};\n\nconst useTooltip = () => {\n    const ctx = useContext(TooltipContext);\n    if (!ctx) {\n        throw new Error('useTooltip must be used within a TooltipProvider');\n    }\n    return ctx;\n};\n\nexport { SingletonTooltipProvider, useTooltip };\n","export const stopPropagationForActionKeys = (event: KeyboardEvent): void => {\n    if (event.key === 'Enter' || event.code === 'Enter' || event.key === ' ' || event.code === 'Space') {\n        event.stopPropagation();\n    }\n};\n","import { h } from 'preact';\nimport { useCallback, useRef } from 'preact/hooks';\nimport Button from './Button';\nimport { ButtonProps } from './types';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport copyToClipboard from '../../../utils/clipboard';\nimport { SingletonTooltipProvider, useTooltip } from '../Tooltip/SingletonTooltipProvider';\nimport './CopyIconButton.scss';\nimport { stopPropagationForActionKeys } from './stopPropagationForActionKeys';\n\nexport interface CopyIconButtonProps extends ButtonProps {\n    /**\n     * String that will get copied to the clipboard\n     */\n    text: string;\n}\n\nconst CopyIconButton = (props: Readonly<CopyIconButtonProps>) => {\n    const { i18n } = useCoreContext();\n    const anchorRef = useRef<HTMLButtonElement>(null);\n    const { showTooltip, hideTooltip } = useTooltip();\n\n    const onClick = useCallback(() => {\n        void copyToClipboard(props.text);\n        showTooltip({ anchorRef, text: i18n.get('button.copied') });\n    }, [props.text, i18n, showTooltip]);\n\n    // We need it because onKeyPress does not trigger for Esc key\n    const onKeyDown = useCallback(\n        (event: KeyboardEvent) => {\n            stopPropagationForActionKeys(event);\n\n            if (event.key === 'Escape' || event.code === 'Escape') {\n                event.stopPropagation();\n                hideTooltip();\n            }\n        },\n        [hideTooltip]\n    );\n\n    const handleShowTooltip = useCallback(() => {\n        showTooltip({ anchorRef, text: i18n.get('button.copy') });\n    }, [anchorRef, i18n, showTooltip]);\n\n    return (\n        <Button\n            {...props}\n            variant=\"iconOnly\"\n            buttonRef={anchorRef}\n            ariaLabel={props.ariaLabel ?? i18n.get('button.copy')}\n            onMouseEnter={handleShowTooltip}\n            onMouseLeave={hideTooltip}\n            onFocus={handleShowTooltip}\n            onBlur={hideTooltip}\n            onClick={onClick}\n            // It's ok to have both, browsers will fire only one click event for enter/space key pressed.\n            onKeyPress={stopPropagationForActionKeys}\n            onKeyDown={onKeyDown}\n        >\n            <svg\n                className=\"adyen-checkout__button--iconOnly__icon\"\n                xmlns=\"http://www.w3.org/2000/svg\"\n                width=\"16\"\n                height=\"16\"\n                viewBox=\"0 0 16 16\"\n                fill=\"none\"\n            >\n                <path d=\"M3.5 1.25C2.25736 1.25 1.25 2.25736 1.25 3.5V8.5C1.25 9.74264 2.25736 10.75 3.5 10.75H5.25V12.5C5.25 13.7426 6.25736 14.75 7.5 14.75H12.5C13.7426 14.75 14.75 13.7426 14.75 12.5V7.5C14.75 6.25736 13.7426 5.25 12.5 5.25H10.75V3.5C10.75 2.25736 9.74264 1.25 8.5 1.25H3.5ZM9.25 5.25H7.5C6.25736 5.25 5.25 6.25736 5.25 7.5V9.25H3.5C3.08579 9.25 2.75 8.91421 2.75 8.5V3.5C2.75 3.08579 3.08579 2.75 3.5 2.75H8.5C8.91421 2.75 9.25 3.08579 9.25 3.5V5.25ZM6.75 12.5V7.5C6.75 7.08579 7.08579 6.75 7.5 6.75H12.5C12.9142 6.75 13.25 7.08579 13.25 7.5V12.5C13.25 12.9142 12.9142 13.25 12.5 13.25H7.5C7.08579 13.25 6.75 12.9142 6.75 12.5Z\" />\n            </svg>\n        </Button>\n    );\n};\n\nconst withTooltip = (props: Readonly<CopyIconButtonProps>) => {\n    return (\n        <SingletonTooltipProvider>\n            <CopyIconButton {...props} />\n        </SingletonTooltipProvider>\n    );\n};\n\nexport { withTooltip as CopyIconButton };\n","import { h } from 'preact';\nimport './DetailsTable.scss';\nimport { CopyIconButton } from '../Button/CopyIconButton';\n\nexport interface DetailsTableData\n    extends Array<{\n        label: string;\n        value: string;\n    }> {}\n\nexport interface DetailsTableProps {\n    tableFields: DetailsTableData;\n    shouldShowCopyButton?: boolean;\n}\n\nexport default function DetailsTable({ tableFields, shouldShowCopyButton }: Readonly<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\">\n                            {value}\n                            {shouldShowCopyButton && <CopyIconButton text={value}></CopyIconButton>}\n                        </dd>\n                    </div>\n                ))}\n        </dl>\n    );\n}\n","import { h } from 'preact';\nimport { useCallback } from 'preact/hooks';\nimport Button from './Button';\nimport { ButtonProps } from './types';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport copyToClipboard from '../../../utils/clipboard';\nimport { PREFIX } from '../Icon/constants';\nimport useImage from '../../../core/Context/useImage';\nimport { stopPropagationForActionKeys } from './stopPropagationForActionKeys';\n\nexport interface CopyButtonProps extends Omit<ButtonProps, 'variant' | 'onClickCompletedLabel'> {\n    /**\n     * String that will get copied to the clipboard\n     */\n    text: string;\n    copiedLabel?: string;\n    onClick?: (e: h.JSX.TargetedMouseEvent<HTMLButtonElement>) => void;\n}\n\nconst CopyButton = (props: Readonly<CopyButtonProps>) => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    const onClick = useCallback(\n        (e, { complete }) => {\n            void copyToClipboard(props.text);\n            complete();\n            props.onClick?.(e);\n        },\n        [props.text, props.onClick]\n    );\n\n    return (\n        <Button\n            {...props}\n            variant=\"action\"\n            onClick={onClick}\n            // Workaround: See ADR-0001-uielement-keyboard-event-propagation-workaround\n            onKeyPress={stopPropagationForActionKeys}\n            onKeyDown={stopPropagationForActionKeys}\n            icon={props.icon ?? getImage({ imageFolder: 'components/' })(`${PREFIX}copy`)}\n            label={props.label ?? i18n.get('button.copy')}\n            onClickCompletedLabel={props.copiedLabel ?? i18n.get('button.copied')}\n        />\n    );\n};\n\nexport { CopyButton };\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport Button from '../Button';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { VoucherProps } from './types';\nimport useImage from '../../../core/Context/useImage';\nimport { PREFIX } from '../Icon/constants';\nimport DetailsTable from '../DetailsTable';\nimport { CopyButton } from '../Button/CopyButton';\nimport './Voucher.scss';\n\nexport default function Voucher(props: Readonly<VoucherProps>) {\n    const { voucherDetails = [], className = '', showReferenceValue = true } = props;\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                    {Boolean(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                    {Boolean(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\">\n                            {props.paymentReferenceLabel ?? i18n.get('voucher.paymentReferenceLabel')}\n                        </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                        {showReferenceValue && <span>{props.reference}</span>}\n                    </div>\n                )}\n\n                {(Boolean(props.downloadUrl) || Boolean(props.copyBtn)) && (\n                    <ul className=\"adyen-checkout__voucher-result__actions\">\n                        {Boolean(props.copyBtn) && (\n                            <li className=\"adyen-checkout__voucher-result__actions__item\">\n                                <CopyButton inline text={props.reference} />\n                            </li>\n                        )}\n\n                        {Boolean(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 { GetImageFnType } from '../../../core/Context/Resources';\nimport Language from '../../../language';\nimport { PaymentAmount } from '../../../types';\nimport { CommonVoucherProps, VoucherConfiguration } from './types';\n\nexport const extractCommonPropsForVoucher = ({\n    props,\n    i18n,\n    introKey,\n    getImage\n}: {\n    props: VoucherConfiguration & { totalAmount?: PaymentAmount };\n    i18n: Language;\n    introKey: string;\n    getImage: GetImageFnType;\n}): 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 BacsResult from './components/BacsResult';\nimport PayButton from '../internal/PayButton';\nimport { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\nimport { BacsElementData } from './types';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nclass BacsElement extends UIElement<VoucherConfiguration> {\n    public static readonly 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    protected override payButton = (props: PayButtonProps) => {\n        return <PayButton onClick={this.submit} {...props} />;\n    };\n\n    protected override componentToRender(): h.JSX.Element {\n        return 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    }\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<Readonly<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 readonly 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 { Fragment, h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport IbanInput from '../internal/IbanInput';\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 readonly 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    protected override componentToRender(): h.JSX.Element {\n        return (\n            <Fragment>\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            </Fragment>\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 { ComponentChildren, h } from 'preact';\nimport cx from 'classnames';\nimport './Alert.scss';\nimport Icon from '../Icon';\n\nconst ALERT_TYPES = ['error', 'warning', 'info', '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 }: Readonly<AlertProps>) {\n    const role = type === 'error' || type === 'warning' ? 'alert' : 'status';\n\n    return (\n        <div role={role} 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 { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Alert from '../../internal/Alert';\n\nexport const SettlementInfo = () => {\n    const { i18n } = useCoreContext();\n\n    return (\n        <Alert classNames={['adyen-checkout__eftpad-canada-info']} icon=\"info_black\" type=\"info\">\n            <div>{i18n.get('eftpad-canada.settlement-info')}</div>\n        </Alert>\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: 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 { TxVariants } from '../tx-variants';\nimport PreAuthorizedDebitCanadaComponent from './components/PreAuthorizedDebitCanadaComponent';\nimport { SettlementInfo } from './components/SettlementInfo';\nimport RedirectButton from '../internal/RedirectButton';\nimport { payAmountLabel } from '../internal/PayButton/utils';\n\nimport type { PreAuthorizedDebitCanadaConfiguration } from './types';\n\nexport class PreAuthorizedDebitCanada extends UIElement<PreAuthorizedDebitCanadaConfiguration> {\n    public static readonly 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    protected override componentToRender(): h.JSX.Element {\n        return 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                    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    }\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","import { h, FocusEventHandler, InputEventHandler } 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: Readonly<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): 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): 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","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, 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    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 { 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: Readonly<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 { GenericEventHandler, 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 InputText from '../FormFields/InputText';\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';\nimport './PersonalDetails.scss';\n\nexport const PERSONAL_DETAILS_SCHEMA = ['firstName', 'lastName', 'dateOfBirth', 'shopperEmail', 'telephoneNumber'];\n\nexport default function PersonalDetails(props: Readonly<PersonalDetailsProps>) {\n    const { label = '', namePrefix, placeholders, requiredFields, visibility } = props;\n\n    const { i18n } = useCoreContext();\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    const personalDetailsRef = useRef<ComponentMethodsRef>({\n        showValidation: () => {\n            triggerValidation();\n        }\n    });\n\n    useEffect(() => {\n        props.setComponentRef(personalDetailsRef.current);\n    }, [props.setComponentRef]);\n\n    const eventHandler =\n        (mode: HandleChangeForModeType): 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        <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('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    );\n}\n\nPersonalDetails.defaultProps = {\n    data: {},\n    onChange: () => {},\n    placeholders: {},\n    requiredFields: PERSONAL_DETAILS_SCHEMA,\n    validationRules: personalDetailsValidationRules,\n    visibility: 'editable'\n};\n","import { unformatDate } from '../FormFields/InputDate/utils';\nimport { PersonalDetailsSchema } from '../../../types/global-types';\n\nexport const getFormattedData = (data: PersonalDetailsSchema) => {\n    const { firstName, lastName, dateOfBirth, shopperEmail, telephoneNumber } = data;\n\n    return {\n        ...((firstName || lastName) && {\n            shopperName: {\n                ...(firstName && { firstName }),\n                ...(lastName && { lastName })\n            }\n        }),\n        ...(dateOfBirth && { dateOfBirth: unformatDate(dateOfBirth) }),\n        ...(shopperEmail && { shopperEmail }),\n        ...(telephoneNumber && { telephoneNumber })\n    };\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: Readonly<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 { OpenInvoiceConfiguration } from './types';\n\nexport default class OpenInvoiceContainer extends UIElement<OpenInvoiceConfiguration> {\n    protected static readonly 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    protected override componentToRender(): h.JSX.Element {\n        return (\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        );\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';\nimport type { OpenInvoiceConfiguration } from '../types';\n\nexport default class Affirm extends OpenInvoiceContainer {\n    public static readonly type = TxVariants.affirm;\n\n    formatProps(props: OpenInvoiceConfiguration) {\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: Readonly<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';\nimport type { OpenInvoiceConfiguration } from '../types';\n\nexport default class AfterPay extends OpenInvoiceContainer {\n    public static readonly type = TxVariants.afterpay_default;\n    public static readonly txVariants = [TxVariants.afterpay_default, TxVariants.afterpay];\n\n    formatProps(props: OpenInvoiceConfiguration) {\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 { ALLOWED_COUNTRIES } from './config';\nimport type { OpenInvoiceConfiguration } from '../helpers/OpenInvoiceContainer/types';\n\nexport default class AfterPayB2B extends OpenInvoiceContainer {\n    public static readonly type = TxVariants.afterpay_b2b;\n\n    protected static readonly 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: OpenInvoiceConfiguration) {\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';\nimport type { OpenInvoiceConfiguration } from '../types';\n\nexport default class Atome extends OpenInvoiceContainer {\n    public static readonly type = TxVariants.atome;\n\n    formatProps(props: OpenInvoiceConfiguration) {\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 readonly 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 readonly 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 readonly 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 readonly 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 readonly 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 readonly 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 readonly 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","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, amount?: PaymentAmount): 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 || (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, amount: PaymentAmount): 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 finalAmount = isPayNow ? getChargeAmount(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: finalAmount,\n                paymentIntent: 'Confirm',\n                presentmentCurrency: finalAmount.currencyCode,\n                totalOrderAmount: finalAmount\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';\nimport { useAmount } from '../../../core/Context/AmountProvider';\n\nexport default function AmazonPayButton(props: Readonly<AmazonPayButtonProps>) {\n    const { amount } = useAmount();\n    const { loadingContext } = useCoreContext();\n    const { amazonRef, configuration = {} } = props;\n    const [signature, setSignature] = useState<string>(null);\n    const payloadJSON: PayloadJSON = getPayloadJSON(props, amount);\n    const settings = getAmazonPaySettings(props, amount);\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: Readonly<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';\nimport { useAmount } from '../../../core/Context/AmountProvider';\n\nexport default function OrderButton(props: Readonly<OrderButtonProps>) {\n    const { i18n, loadingContext } = useCoreContext();\n    const { amount } = useAmount();\n\n    this.createOrder = () => {\n        const { amazonCheckoutSessionId, clientKey, chargePermissionType, publicKeyId, region, recurringMetadata, returnUrl } = props;\n\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: Readonly<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 { useCoreContext } from '../Context/CoreProvider';\nimport AdyenCheckoutError from '../Errors/AdyenCheckoutError';\n\nconst useAnalytics = () => {\n    const { analytics } = useCoreContext();\n\n    if (analytics === undefined) {\n        throw new AdyenCheckoutError('SDK_ERROR', 'useAnalytics(): analytics module is not defined');\n    }\n\n    return {\n        analytics\n    };\n};\n\nexport default useAnalytics;\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';\nimport useAnalytics from '../../../core/Analytics/useAnalytics';\n\nexport default function AmazonPayComponent(props: Readonly<AmazonPayComponentProps>) {\n    const [status, setStatus] = useState('pending');\n    const amazonPayButtonRef = useRef(null);\n    const orderButtonRef = useRef(null);\n    const { analytics } = useAnalytics();\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({\n            src,\n            component: 'amazonpay',\n            analytics\n        });\n\n        if (window.amazon) {\n            handleLoad();\n        } else {\n            void script.load().then(handleLoad);\n        }\n\n        return () => {\n            script.remove();\n        };\n    }, [analytics]);\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                        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 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 { AnalyticsInfoEvent, InfoEventType } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nexport class AmazonPayElement extends UIElement<AmazonPayConfiguration> {\n    public static readonly type = TxVariants.amazonpay;\n\n    protected static readonly 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 override beforeRender(configSetByMerchant?: AmazonPayConfiguration) {\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventType.rendered,\n            component: this.type,\n            configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n            ...(configSetByMerchant?.isExpress && { isExpress: configSetByMerchant.isExpress }),\n            ...(configSetByMerchant?.expressPage && { expressPage: configSetByMerchant.expressPage })\n        });\n\n        this.analytics.sendAnalytics(event);\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    protected override componentToRender(): h.JSX.Element {\n        return (\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        );\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 }: Readonly<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 { ApplePayConfiguration, ApplePayPaymentAuthorizationResult } from '../types';\n\nexport interface ApplePayServiceOptions {\n    version: number;\n    onError: (error?: unknown) => void;\n    onCancel?: (event: ApplePayJS.Event) => void;\n    onValidateMerchant: ApplePayConfiguration['onValidateMerchant'];\n    onCouponCodeChanged?: ApplePayConfiguration['onCouponCodeChanged'];\n    onPaymentMethodSelected?: ApplePayConfiguration['onPaymentMethodSelected'];\n    onShippingMethodSelected?: ApplePayConfiguration['onShippingMethodSelected'];\n    onShippingContactSelected?: ApplePayConfiguration['onShippingContactSelected'];\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        if (typeof options.onCouponCodeChanged === 'function') {\n            this.session.oncouponcodechanged = event => {\n                void this.oncouponcodechanged(event, options.onCouponCodeChanged);\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/applepayontheweb/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/applepayontheweb/apple_pay_js_api/providing_merchant_validation}\n     */\n    onvalidatemerchant(event: ApplePayJS.ApplePayValidateMerchantEvent, onValidateMerchant: ApplePayConfiguration['onValidateMerchant']) {\n        return new Promise((resolve, reject) => {\n            void onValidateMerchant(resolve, reject, event.validationURL);\n        })\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/applepayontheweb/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/applepayontheweb/applepaysession/1778013-onpaymentmethodselected}\n     */\n    onpaymentmethodselected(\n        event: ApplePayJS.ApplePayPaymentMethodSelectedEvent,\n        onPaymentMethodSelected: ApplePayServiceOptions['onPaymentMethodSelected']\n    ) {\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/applepayontheweb/applepaysession/1778009-onshippingcontactselected}\n     */\n    onshippingcontactselected(\n        event: ApplePayJS.ApplePayShippingContactSelectedEvent,\n        onShippingContactSelected: ApplePayConfiguration['onShippingContactSelected']\n    ) {\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/applepayontheweb/applepaysession/1778009-onshippingcontactselected}\n     */\n    onshippingmethodselected(\n        event: ApplePayJS.ApplePayShippingMethodSelectedEvent,\n        onShippingMethodSelected: ApplePayConfiguration['onShippingMethodSelected']\n    ) {\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    oncouponcodechanged(event: ApplePayJS.ApplePayCouponCodeChangedEvent, onCouponCodeChanged: ApplePayConfiguration['onCouponCodeChanged']) {\n        return new Promise((resolve, reject) => onCouponCodeChanged(resolve, reject, event))\n            .then((couponCodeUpdate: ApplePayJS.ApplePayCouponCodeUpdate) => {\n                this.session.completeCouponCodeChange(couponCodeUpdate);\n            })\n            .catch((couponCodeUpdate: ApplePayJS.ApplePayCouponCodeUpdate) => {\n                this.session.completeCouponCodeChange(couponCodeUpdate);\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/applepayontheweb/applepaysession/1778029-oncancel}\n     */\n    oncancel(event: ApplePayJS.Event, onCancel: (event: ApplePayJS.Event) => void): void {\n        onCancel(event);\n    }\n}\n\nexport default ApplePayService;\n","import { getDecimalAmount } from '../../../utils/amount-util';\nimport { PaymentAmount } from '../../../types/global-types';\nimport { ApplePayConfiguration } from '../types';\n\nconst formatAmount = (amount: PaymentAmount) => String(getDecimalAmount(amount.value, amount.currency));\n\nexport const preparePaymentRequest = (\n    paymentRequest: ApplePayConfiguration & {\n        countryCode: string;\n        companyName: string;\n    }\n): 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        couponCode: props.couponCode,\n        supportsCouponCode: props.supportsCouponCode\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';\nimport { IAnalytics } from '../../../core/Analytics/Analytics';\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    private readonly analytics: IAnalytics;\n\n    constructor({ analytics }: { analytics: IAnalytics }) {\n        this.analytics = analytics;\n    }\n\n    public async load(): Promise<ApplePaySession> {\n        try {\n            const scriptElement = new Script({\n                src: APPLE_PAY_SDK_URL,\n                component: 'applepay',\n                attributes: { crossOrigin: 'anonymous' },\n                analytics: this.analytics\n            });\n\n            this.sdkLoadingPromise = scriptElement.load();\n            await this.sdkLoadingPromise;\n\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 { 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 { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nconst LATEST_APPLE_PAY_VERSION = 14;\n\nclass ApplePayElement extends UIElement<ApplePayConfiguration> {\n    public static readonly type = TxVariants.applepay;\n\n    protected static readonly 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({ analytics: this.analytics });\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 override beforeRender(configSetByMerchant?: ApplePayConfiguration) {\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventType.rendered,\n            component: this.type,\n            configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n            ...(configSetByMerchant?.isExpress && { isExpress: configSetByMerchant.isExpress }),\n            ...(configSetByMerchant?.expressPage && { expressPage: configSetByMerchant.expressPage })\n        });\n\n        this.analytics.sendAnalytics(event);\n    }\n\n    public override submit = (): void => {\n        if (this.props.isInstantPayment) {\n            const event = new AnalyticsInfoEvent({ component: this.type, type: InfoEventType.selected, target: UiTarget.instantPaymentButton });\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/applepayontheweb/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, onCouponCodeChanged } = 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            onCouponCodeChanged,\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<void>((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: (merchantSession: any) => void, reject: (error: string) => void) {\n        const { hostname } = window.location;\n        const { clientKey, configuration, loadingContext, initiative, domainName } = 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: domainName || hostname,\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    protected override componentToRender(): h.JSX.Element {\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: string[]) {\n    const brandMapping: Record<string, string> = {\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 (typeof ApplePaySession?.supportsVersion === 'function' && 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';\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(amount: PaymentAmount): 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    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}: Readonly<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';\nimport { PaymentAmount } 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    private isOneTimePayment(amount: PaymentAmount): boolean {\n        return amount?.value > 0;\n    }\n\n    private isOnFilePayment(): boolean {\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(amount: PaymentAmount): Promise<void> {\n        try {\n            const { referenceId, scopeId, redirectURL = window.location.href } = this.configuration;\n\n            const customerRequest = {\n                referenceId,\n                redirectURL,\n                actions: {\n                    ...(this.isOneTimePayment(amount) && {\n                        payment: {\n                            amount,\n                            scopeId\n                        }\n                    }),\n                    ...(this.isOnFilePayment() && {\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';\nimport type { IAnalytics } from '../../../core/Analytics/Analytics';\n\nexport interface ICashAppSdkLoader {\n    load(environment: string): Promise<ICashAppWindowObject>;\n}\n\nclass CashAppSdkLoader implements ICashAppSdkLoader {\n    private readonly analytics: IAnalytics;\n    private readonly environment: string;\n\n    constructor({ analytics, environment }: { analytics: IAnalytics; environment: string }) {\n        this.analytics = analytics;\n        this.environment = environment;\n    }\n\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(): Promise<ICashAppWindowObject> {\n        const src = this.environment.toLowerCase().includes('live') ? CASHAPPPAY_PROD_SDK : CASHAPPPAY_SANDBOX_SDK;\n\n        if (!this.isSdkIsAvailableOnWindow()) {\n            const scriptElement = new Script({\n                src,\n                component: 'cashapppay',\n                analytics: this.analytics\n            });\n\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 { 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/utils';\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 readonly type = TxVariants.cashapp;\n\n    private readonly cashAppService: ICashAppService | undefined;\n\n    protected static readonly 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        const sdkLoader = new CashAppSdkLoader({\n            environment: this.props.environment,\n            analytics: this.analytics\n        });\n\n        this.cashAppService = new CashAppService(sdkLoader, {\n            storePaymentMethod: this.props.storePaymentMethod,\n            useCashAppButtonUi: this.props.showPayButton,\n            environment: this.props.environment,\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(this.props.amount);\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    protected override componentToRender(): h.JSX.Element {\n        return 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                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    }\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 { 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 readonly 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, this.analytics);\n\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    protected override componentToRender(): h.JSX.Element {\n        return (\n            <ClickToPayProvider\n                isStandaloneComponent={true}\n                configuration={this.ctpConfiguration}\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        );\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                    allowedIssuerCountryCodes: props.allowedIssuerCountryCodes,\n                    blockedIssuerCountryCodes: props.blockedIssuerCountryCodes,\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 * Use same logic as Environment.ts where fallback is live (production)\n */\nexport function resolveEnvironment(env = 'PRODUCTION'): google.payments.api.Environment {\n    switch (env) {\n        case 'beta':\n        case 'test':\n            return 'TEST';\n        default:\n            return 'PRODUCTION';\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';\nimport type { IAnalytics } from '../../core/Analytics/Analytics';\n\nclass GooglePayService {\n    private readonly analytics: IAnalytics;\n\n    public readonly paymentsClient: Promise<google.payments.api.PaymentsClient>;\n\n    constructor(environment: string, analytics: IAnalytics, paymentDataCallbacks: google.payments.api.PaymentDataCallbacks) {\n        const googlePayEnvironment = resolveEnvironment(environment);\n\n        this.analytics = analytics;\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({ src: config.URL, component: 'googlepay', analytics: this.analytics });\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: Readonly<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    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","const brandMapping: Record<string, google.payments.api.CardNetwork> = Object.freeze({\n    mc: 'MASTERCARD',\n    amex: 'AMEX',\n    visa: 'VISA',\n    elodebit: 'ELO_DEBIT',\n    elo: 'ELO',\n    interac: 'INTERAC',\n    discover: 'DISCOVER',\n    jcb: 'JCB',\n    electron: 'ELECTRON',\n    maestro: 'MAESTRO'\n});\n\nexport function mapGooglePayBrands(brands: string[]): google.payments.api.CardNetwork[] {\n    const mappedBrands = brands.map(brand => brandMapping[brand]).filter((brand): brand is google.payments.api.CardNetwork => !!brand);\n    return [...new Set(mappedBrands)];\n}\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';\n\nimport type { AddressData, BrowserInfo, RawPaymentMethod, PaymentResponseData, RawPaymentResponse } from '../../types/global-types';\nimport type { GooglePayConfiguration } from './types';\nimport type { ICore } from '../../core/types';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../core/Analytics/events/AnalyticsInfoEvent';\nimport { mapGooglePayBrands } from './utils/map-adyen-brands-to-googlepay-brands';\n\nconst DEFAULT_ALLOWED_CARD_NETWORKS: google.payments.api.CardNetwork[] = ['AMEX', 'DISCOVER', 'JCB', 'MASTERCARD', 'VISA'];\n\nclass GooglePay extends UIElement<GooglePayConfiguration> {\n    public static readonly type = TxVariants.googlepay;\n    public static readonly txVariants = [TxVariants.googlepay, TxVariants.paywithgoogle];\n    public static readonly 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, this.analytics, {\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     * @param paymentMethodId - Unique internal payment method ID\n     * @returns\n     */\n    protected override getPaymentMethodFromPaymentMethodsResponse(type?: string, paymentMethodId?: string): RawPaymentMethod {\n        if (paymentMethodId) return this.core.paymentMethodsResponse.findById(paymentMethodId);\n\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): 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        const allowedCardNetworks = this.createAllowedCardNetworksValues({\n            allowedCardNetworks: props.allowedCardNetworks,\n            brands: props.brands\n        });\n\n        return {\n            ...props,\n            allowedCardNetworks,\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    /**\n     * Generate the 'allowedCardNetworks' value used by Google Pay\n     *\n     * If the 'allowedCardNetworks' is defined in the Component configuration, it will be used. Otherwise we fallback\n     * to use the 'brands' returned by the backoffice. It can be that 'brands' is not returned, which in this case we\n     * set default values\n     *\n     * @param {object} brandsConfig\n     * @param brandsConfig.allowedCardNetworks - Brands set in the component config\n     * @param brandsConfig.brands - Brands returned by backend\n     * @private\n     */\n    private createAllowedCardNetworksValues({\n        allowedCardNetworks,\n        brands\n    }: {\n        allowedCardNetworks?: google.payments.api.CardNetwork[];\n        brands?: string[];\n    }): google.payments.api.CardNetwork[] {\n        if (allowedCardNetworks?.length > 0) return allowedCardNetworks;\n        if (brands?.length > 0) return mapGooglePayBrands(brands);\n\n        return DEFAULT_ALLOWED_CARD_NETWORKS;\n    }\n\n    protected override beforeRender(configSetByMerchant?: GooglePayConfiguration) {\n        // We don't send 'rendered' events when rendering actions\n        if (configSetByMerchant?.originalAction) {\n            return;\n        }\n\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventType.rendered,\n            component: this.type,\n            configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n            ...(configSetByMerchant?.isExpress && { isExpress: configSetByMerchant.isExpress }),\n            ...(configSetByMerchant?.expressPage && { expressPage: configSetByMerchant.expressPage })\n        });\n\n        this.analytics.sendAnalytics(event);\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                component: this.type,\n                type: InfoEventType.selected,\n                target: UiTarget.instantPaymentButton\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    protected override componentToRender(): h.JSX.Element {\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, RefObject } 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}: Readonly<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: RefObject<HTMLDivElement>) => {\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\n        if (!props.blockPayPalButton) createButton(PAYPAL, paypalButtonRef);\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';\nimport useAnalytics from '../../../core/Analytics/useAnalytics';\n\nexport default function PaypalComponent({\n    onApprove,\n    onCancel,\n    onChange,\n    onError,\n    onSubmit,\n    onScriptLoadFailure,\n    ...props\n}: Readonly<PayPalComponentProps>) {\n    const [status, setStatus] = useState('pending');\n    const { analytics } = useAnalytics();\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({\n            src,\n            component: 'paypal',\n            attributes,\n            dataAttributes,\n            analytics\n        });\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    blockPayPalButton: false,\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 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 { AnalyticsInfoEvent, InfoEventType } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\nclass PaypalElement extends UIElement<PayPalConfiguration> {\n    public static readonly type = TxVariants.paypal;\n    public static readonly subtype = 'sdk';\n\n    public paymentData: string = null;\n\n    private resolve = null;\n    private reject = null;\n\n    protected static readonly 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 override beforeRender(configSetByMerchant?: PayPalConfiguration) {\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventType.rendered,\n            component: this.type,\n            configData: { ...configSetByMerchant, showPayButton: this.props.showPayButton },\n            ...(configSetByMerchant?.isExpress && { isExpress: configSetByMerchant.isExpress }),\n            ...(configSetByMerchant?.expressPage && { expressPage: configSetByMerchant.expressPage })\n        });\n\n        this.analytics.sendAnalytics(event);\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    protected override componentToRender(): h.JSX.Element {\n        if (!this.props.showPayButton) return null;\n\n        const { onShippingAddressChange, onShippingOptionsChange, ...rest } = this.props;\n\n        return (\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        );\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 }: Readonly<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, UIElementStatus } from '../../internal/UIElement/types';\n\nimport './Fastlane.scss';\nimport { PayButtonProps } from '../../internal/PayButton/PayButton';\n\ninterface FastlaneComponentProps {\n    lastFour: string;\n    brand: string;\n    showPayButton: boolean;\n    setComponentRef(ref: ComponentMethodsRef): void;\n    payButton(props: PayButtonProps): h.JSX.Element;\n}\n\nconst FastlaneComponent = ({ lastFour, brand, payButton, setComponentRef, showPayButton }: Readonly<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 { 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 readonly 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    /**\n     *\n     * Fastlane works differently than other payment methods: Merchant needs to pass to the payment method\n     * configuration the values received from PayPal SDK to perform the payment (tokenId, etc). There is no\n     * point in tracking these values, so we just omit them all in the analytics by calling the\n     * 'beforeRender' without the props\n     *\n     * @protected\n     */\n    protected override beforeRender() {\n        super.beforeRender();\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    protected override componentToRender(): h.JSX.Element {\n        return (\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        );\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';\nimport Fieldset from '../FormFields/Fieldset';\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            <Fieldset>\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                <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            </Fieldset>\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';\nimport type { PayButtonProps } from '../../../internal/PayButton/PayButton';\n\ninterface BoletoInputProps {\n    onChange(data: any): void;\n    payButton: (props: PayButtonProps) => h.JSX.Element;\n    [key: string]: any;\n}\n\nfunction BoletoInput(props: Readonly<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 { TxVariants } from '../tx-variants';\n\nimport type { BoletoConfiguration } from './types';\n\nexport class BoletoElement extends UIElement<BoletoConfiguration> {\n    public static readonly type = TxVariants.boletobancario;\n\n    public static readonly 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    protected override componentToRender(): h.JSX.Element {\n        return 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    }\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: Readonly<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 { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\n\nexport class DokuElement extends UIElement<VoucherConfiguration> {\n    public static readonly type = TxVariants.doku;\n    public static readonly 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    protected override componentToRender(): h.JSX.Element {\n        return 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    }\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: Readonly<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 { TxVariants } from '../tx-variants';\nimport { VoucherConfiguration } from '../internal/Voucher/types';\n\nexport class OxxoElement extends UIElement<VoucherConfiguration> {\n    public static readonly type = TxVariants.oxxo;\n\n    protected static readonly 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    protected override componentToRender(): h.JSX.Element {\n        return 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    }\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 }: Readonly<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 }: Readonly<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 { ANALYTICS_SEARCH_DEBOUNCE_TIME } from '../../../core/Analytics/constants';\nimport { debounce } from '../../../utils/debounce';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../../core/Analytics/events/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({\n    items,\n    placeholder,\n    issuer,\n    highlightedIds = [],\n    showContextualElement,\n    contextualText,\n    selectFieldLabel,\n    ...props\n}: Readonly<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 containerRef = useRef<HTMLDivElement>(null);\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 ? UiTarget.list : UiTarget.featuredIssuer;\n            const issuerObj = items.find(issuer => issuer.id === (event.target as SelectTargetObject).value);\n\n            const analyticsEvent = new AnalyticsInfoEvent({\n                component: props.type,\n                type: InfoEventType.selected,\n                target,\n                issuer: issuerObj.name\n            });\n            props.onSubmitAnalytics(analyticsEvent);\n\n            setInputType(type);\n            handleChangeFor('issuer')(event);\n        },\n        [handleChangeFor, props.type]\n    );\n\n    const handleListToggle = useCallback(\n        (isOpen: boolean) => {\n            if (isOpen) {\n                const event = new AnalyticsInfoEvent({\n                    component: props.type,\n                    type: InfoEventType.displayed,\n                    target: UiTarget.list\n                });\n                props.onSubmitAnalytics(event);\n            }\n        },\n        [props.type, props.onSubmitAnalytics]\n    );\n\n    const debounceSearchAnalytics = useRef(debounce(props.onSubmitAnalytics, ANALYTICS_SEARCH_DEBOUNCE_TIME));\n\n    const handleSearch = useCallback(() => {\n        debounceSearchAnalytics.current({ type: InfoEventType.input, target: UiTarget.listSearch });\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(containerRef.current, '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 ref={containerRef} 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={selectFieldLabel ?? 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 RedirectButton from '../../internal/RedirectButton';\nimport { IssuerListConfiguration, IssuerListData } from './types';\nimport type { ICore } from '../../../core/types';\n\nclass IssuerListContainer<TProps extends IssuerListConfiguration = IssuerListConfiguration, TData = IssuerListData> extends UIElement<TProps> {\n    protected static readonly defaultProps = {\n        showImage: true,\n        issuers: [],\n        highlightedIssuers: [],\n        loadingContext: FALLBACK_CONTEXT,\n        showPaymentMethodItemImages: false\n    };\n\n    constructor(checkout: ICore, props?: TProps) {\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(): TData {\n        return {\n            paymentMethod: {\n                type: this.type,\n                issuer: this.state?.data?.issuer\n            }\n        } as TData;\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    protected override componentToRender(): h.JSX.Element {\n        return this.props.issuers.length > 0 ? (\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        ) : (\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    }\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 readonly 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 readonly 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 readonly 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 readonly 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 { ProcessedPaymentStatusResponse, RawPaymentStatusResponse } 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 processPaymentStatusCompleteResponse = (response: RawPaymentStatusResponse): ProcessedPaymentStatusResponse => {\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 processPaymentStatusResponse = (response: RawPaymentStatusResponse): ProcessedPaymentStatusResponse => {\n    if (!response.type && response.resultCode) {\n        return processPaymentStatusCompleteResponse(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 processPaymentStatusCompleteResponse(response);\n        case 'validation':\n            return { type: 'error', props: response };\n        default:\n            return { type: 'error', props: response };\n    }\n};\n","export const DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS = 2_000;\nexport const DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS = 60_000;\nexport const DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS = 10_000;\nexport const DEFAULT_PAYMENT_STATUS_TIMER_COUNTDOWN_TIME_MIN = 15;\n","import { useState, useEffect, useRef } from 'preact/hooks';\nimport checkPaymentStatus from '../../core/Services/payment-status';\nimport { processPaymentStatusResponse } from '../../core/ProcessResponse/PaymentStatus';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { CountdownTime } from '../../components/internal/Countdown/types';\nimport { PaymentStatusTimerActions, PaymentStatusTimerState, UsePaymentStatusTimerProps } from './types';\nimport {\n    DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS,\n    DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS,\n    DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS\n} from './constants';\nimport { AdditionalDetailsData, ProcessedPaymentStatusResponse } from '../../types';\n\nexport function usePaymentStatusTimer(props: Readonly<UsePaymentStatusTimerProps>): {\n    state: PaymentStatusTimerState;\n    actions: PaymentStatusTimerActions;\n} {\n    const [completed, setCompleted] = useState(false);\n    const [expired, setExpired] = useState(false);\n    const [loading, setLoading] = useState(true);\n    const [delay, setDelay] = useState(props.delay ?? DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS);\n    const [percentage, setPercentage] = useState(100);\n    const [timePassed, setTimePassed] = useState(0);\n    const [onPollingStartedActionHandled, setOnPollingStartedActionHandled] = useState(false);\n    const timeoutRef = useRef<NodeJS.Timeout | number | null>(null);\n\n    const onTick = (time: CountdownTime): void => {\n        setPercentage(time.percentage);\n    };\n\n    const onTimeUp = (): void => {\n        setExpired(true);\n        props.onError(new AdyenCheckoutError('ERROR', 'Payment Expired'));\n    };\n\n    const onComplete = (status: ProcessedPaymentStatusResponse): void => {\n        setCompleted(true);\n        setLoading(false);\n\n        if (status.props.payload) {\n            const additionalDetailsData: AdditionalDetailsData = {\n                data: {\n                    details: { payload: status.props.payload },\n                    paymentData: props.paymentData\n                }\n            };\n            props.onComplete(additionalDetailsData);\n        } else {\n            setExpired(true);\n            props.onError(new AdyenCheckoutError('ERROR', 'successful result, but no payload in response'));\n        }\n    };\n\n    const onError = (status: ProcessedPaymentStatusResponse): void => {\n        setExpired(true);\n        setLoading(false);\n\n        if (status.props.payload) {\n            const additionalDetailsData: AdditionalDetailsData = {\n                data: {\n                    details: { payload: status.props.payload },\n                    paymentData: props.paymentData\n                }\n            };\n            props.onComplete(additionalDetailsData);\n        } else {\n            const error = new AdyenCheckoutError('ERROR', 'error result with no payload in response');\n            props.onError(error);\n        }\n    };\n\n    const checkStatus = async (): Promise<void> => {\n        const { paymentData, clientKey, throttleInterval, pollStatus } = props;\n\n        const pollStatusFunction = pollStatus ?? (() => checkPaymentStatus(paymentData, clientKey, props.loadingContext, throttleInterval));\n\n        if (!onPollingStartedActionHandled) {\n            props.onActionHandled?.({ componentType: props.type, actionDescription: 'polling-started' });\n            setOnPollingStartedActionHandled(true);\n        }\n\n        return pollStatusFunction()\n            .then(processPaymentStatusResponse)\n            .catch(\n                (error: unknown) =>\n                    ({\n                        type: 'network-error',\n                        props: error\n                    }) as ProcessedPaymentStatusResponse\n            )\n            .then((status: ProcessedPaymentStatusResponse) => {\n                switch (status.type) {\n                    case 'success':\n                        onComplete(status);\n                        break;\n                    case 'error':\n                        onError(status);\n                        break;\n                    default:\n                        setLoading(false);\n                }\n            });\n    };\n\n    useEffect(() => {\n        void checkStatus();\n    }, []);\n\n    useEffect(() => {\n        if (expired || completed || loading) {\n            return;\n        }\n\n        const statusInterval = async (): Promise<void> => {\n            const start = performance.now();\n            await checkStatus();\n            const end = performance.now();\n            const responseTime = Math.round(end - start);\n\n            const actualTimePassed = timePassed + responseTime + delay;\n            setTimePassed(actualTimePassed);\n\n            if (\n                actualTimePassed >= (props.throttleTime ?? DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS) &&\n                delay !== (props.throttleInterval ?? DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS)\n            ) {\n                setDelay(props.throttleInterval ?? DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS);\n            }\n        };\n\n        timeoutRef.current = setTimeout(() => {\n            void statusInterval();\n        }, delay);\n\n        return () => {\n            clearTimeout(timeoutRef.current);\n        };\n    }, [expired, completed, loading, delay, props.throttleTime, props.throttleInterval, timePassed]);\n\n    const state: PaymentStatusTimerState = {\n        completed,\n        expired,\n        loading,\n        percentage,\n        timePassed\n    };\n\n    const actions: PaymentStatusTimerActions = {\n        onTick,\n        onTimeUp\n    };\n\n    return { state, actions };\n}\n","import { RawPaymentStatusResponse } from '../../types';\nimport { 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): Promise<RawPaymentStatusResponse> {\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 { 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 { QRImageProps } from '../types';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\n\nexport const QRImage = ({ type, onLoad, src }: Readonly<QRImageProps>) => {\n    const { i18n } = useCoreContext();\n\n    return <img src={src} alt={i18n.get('wechatpay.scanqrcode')} onLoad={onLoad} data-testid={`${type}-qr-image`} />;\n};\n","import { h } from 'preact';\n\nexport const QRProgressbar = ({ percentage }: Readonly<{ percentage: number }>) => {\n    return (\n        <div className=\"adyen-checkout__qr-loader__progress\">\n            <span className=\"adyen-checkout__qr-loader__percentage\" style={{ width: `${percentage}%` }} />\n        </div>\n    );\n};\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, percentage } = 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, percentage };\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: number): 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: number) => (time !== 0 ? (translation: string) => `${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 { 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 = () => {} }: Readonly<CountdownProps>) {\n    const startAndEndTime = useRef(calculateStartAndEndTime(minutesFromNow));\n    const { startTime, endTime } = startAndEndTime.current;\n    const [time, setTime] = useState<CountdownTime>({\n        minutes: '--',\n        seconds: '--',\n        percentage: 0\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 { 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 Countdown from '../../Countdown';\nimport { QRCountdownProps } from '../types';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\n\nexport const QRCountdown = ({ countdownTime, timeToPay, onTick, onCompleted }: Readonly<QRCountdownProps>) => {\n    const { i18n } = useCoreContext();\n\n    const timeToPayString = i18n.get(timeToPay).split('%@');\n\n    return (\n        <span className=\"adyen-checkout__qr-loader__countdown\">\n            {timeToPayString[0]}&nbsp;\n            <Countdown minutesFromNow={countdownTime} onTick={onTick} onCompleted={onCompleted} />\n            &nbsp;{timeToPayString[1]}\n        </span>\n    );\n};\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\n\nexport const QRInstructions = ({ instructions }: Readonly<{ instructions: string | (() => h.JSX.Element) }>) => {\n    const { i18n } = useCoreContext();\n\n    return <p className=\"adyen-checkout__qr-loader__instructions\">{typeof instructions === 'string' ? i18n.get(instructions) : instructions()}</p>;\n};\n","import { h } from 'preact';\nimport { CopyButton } from '../../Button/CopyButton';\n\ninterface QRCodeCopyButtonProps {\n    text: string;\n    copyLabel?: string;\n    copiedLabel?: string;\n    handleCopy?: (e: h.JSX.TargetedMouseEvent<HTMLButtonElement>) => void;\n}\n\nexport const QRCodeCopyButton = ({ text, copyLabel, copiedLabel, handleCopy }: Readonly<QRCodeCopyButtonProps>) => {\n    return <CopyButton onClick={handleCopy} text={text} label={copyLabel} copiedLabel={copiedLabel} />;\n};\n","import { h, createContext } from 'preact';\nimport type { ComponentChildren } from 'preact';\nimport { useContext } from 'preact/hooks';\nimport { CountdownTime } from '../Countdown/types';\n\ninterface QRLoaderDetailsProviderProps {\n    type: string;\n    qrCodeImage: string;\n    qrCodeData: string;\n    countdownTime: number;\n    percentage: number;\n    timeToPay: string;\n    instructions?: string | (() => h.JSX.Element);\n    copyBtn: boolean;\n    onTick: (time: CountdownTime) => void;\n    onQRCodeLoad: () => void;\n    onTimeUp: () => void;\n    handleCopy?: (e: h.JSX.TargetedMouseEvent<HTMLButtonElement>) => void;\n    children: ComponentChildren;\n}\n\ntype QRLoaderDetailsContextValue = Omit<QRLoaderDetailsProviderProps, 'children'>;\n\nconst QRLoaderDetailsContext = createContext<QRLoaderDetailsContextValue | undefined>(undefined);\n\nconst QRLoaderDetailsProvider = ({ children, ...props }: Readonly<QRLoaderDetailsProviderProps>) => {\n    return <QRLoaderDetailsContext.Provider value={{ ...props }}>{children}</QRLoaderDetailsContext.Provider>;\n};\n\nconst useQRLoaderDetails = (): QRLoaderDetailsContextValue => {\n    const context = useContext(QRLoaderDetailsContext);\n\n    if (context === undefined) {\n        throw new Error('\"useQRLoaderDetails\" must be used within a QRLoaderDetailsContext');\n    }\n\n    return context;\n};\n\nexport { QRLoaderDetailsProvider, useQRLoaderDetails };\n","import { h, Fragment } from 'preact';\nimport { QRImage } from './QRImage';\nimport { QRProgressbar } from './QRProgressbar';\nimport { QRCountdown } from './QRCountdown';\nimport { QRInstructions } from './QRIntructions';\nimport { QRCodeCopyButton } from './QRCodeCopyButton';\nimport { useQRLoaderDetails } from '../QRLoaderDetailsProvider';\n\nexport const QRDetails = () => {\n    const { type, qrCodeData, qrCodeImage, percentage, timeToPay, copyBtn, instructions, onTick, countdownTime, onQRCodeLoad, onTimeUp, handleCopy } =\n        useQRLoaderDetails();\n\n    return (\n        <Fragment>\n            <QRImage type={type} src={qrCodeImage} onLoad={onQRCodeLoad} />\n\n            <QRProgressbar percentage={percentage} />\n\n            <QRCountdown countdownTime={countdownTime} timeToPay={timeToPay} onTick={onTick} onCompleted={onTimeUp} />\n\n            {instructions && <QRInstructions instructions={instructions} />}\n\n            {copyBtn && (\n                <div className=\"adyen-checkout__qr-loader__actions\">\n                    <QRCodeCopyButton text={qrCodeData} handleCopy={handleCopy} />\n                </div>\n            )}\n        </Fragment>\n    );\n};\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 { h } from 'preact';\nimport useImage from '../../../../core/Context/useImage';\nimport { useA11yReporter } from '../../../../core/Errors/useA11yReporter';\n\nexport const QRFinalState = ({ image, message }: Readonly<{ image: string; message: string }>) => {\n    const getImage = useImage();\n\n    useA11yReporter(message);\n\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={message}\n            />\n            <p className=\"adyen-checkout__qr-loader__subtitle\">{message}</p>\n        </div>\n    );\n};\n","export const redirectToApp = (url: string | URL): void => {\n    window.location.assign(url);\n};\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport {\n    usePaymentStatusTimer,\n    DEFAULT_PAYMENT_STATUS_TIMER_COUNTDOWN_TIME_MIN,\n    DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS,\n    DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS,\n    DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS\n} from '../../../hooks/usePaymentStatusTimer';\nimport useAutoFocus from '../../../utils/useAutoFocus';\nimport Button from '../Button';\nimport ContentSeparator from '../ContentSeparator';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../../core/Analytics/events/AnalyticsInfoEvent';\nimport { CountdownTime } from '../Countdown/types';\nimport Spinner from '../Spinner';\nimport { QRDetails } from './components/QRDetails';\nimport { QRFinalState } from './components/QRFinalState';\nimport { QRLoaderDetailsProvider } from './QRLoaderDetailsProvider';\nimport { QRLoaderProps } from './types';\nimport { redirectToApp } from '../../../utils/urls';\nimport './QRLoader.scss';\nimport { useAmount } from '../../../core/Context/AmountProvider';\n\nconst QRCODE_URL = 'utility/v1/barcode.png?type=qrCode&data=';\n\nexport function QRLoader(props: Readonly<QRLoaderProps>) {\n    const { i18n, loadingContext } = useCoreContext();\n\n    const { state: timerState, actions: timerActions } = usePaymentStatusTimer({\n        loadingContext,\n        paymentData: props.paymentData,\n        clientKey: props.clientKey,\n        delay: props.delay,\n        throttleTime: props.throttleTime,\n        throttleInterval: props.throttledInterval,\n        type: props.type,\n        onError: props.onError,\n        onComplete: props.onComplete,\n        onActionHandled: props.onActionHandled\n    });\n\n    const { completed, expired, loading, percentage } = timerState;\n    const { onTick, onTimeUp } = timerActions;\n\n    const { showAmount, url, brandLogo, brandName, countdownTime, type, onActionHandled } = props;\n    const { amount } = useAmount();\n\n    const qrCodeImage = props.qrCodeData ? `${loadingContext}${QRCODE_URL}${props.qrCodeData}&clientKey=${props.clientKey}` : props.qrCodeImage;\n\n    const handleCopy = () => {\n        const event = new AnalyticsInfoEvent({\n            component: props.type,\n            type: InfoEventType.download,\n            target: UiTarget.qrDownloadButton\n        });\n        props.onSubmitAnalytics(event);\n    };\n\n    const onQrCodeLoad = () => {\n        onActionHandled?.({\n            componentType: props.type,\n            actionDescription: 'qr-code-loaded'\n        });\n    };\n\n    const qrSubtitleRef = useAutoFocus();\n\n    if (expired) {\n        return <QRFinalState image=\"error\" message={i18n.get('error.subtitle.payment')} />;\n    }\n\n    if (completed) {\n        return <QRFinalState image=\"success\" message={i18n.get('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 classnames = 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(' ')}`} data-testid={`${type}-qr-loader`}>\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            {showAmount && amount && amount.value !== null && !!amount.currency && (\n                <h1 className=\"adyen-checkout__qr-loader__payment_amount\">{i18n.amount(amount.value, amount.currency)}</h1>\n            )}\n\n            {url && (\n                <div className=\"adyen-checkout__qr-loader__app-link\">\n                    {props.redirectIntroduction && <p className=\"adyen-checkout__qr-loader__subtitle\">{i18n.get(props.redirectIntroduction)}</p>}\n                    <Button classNameModifiers={['qr-loader']} onClick={() => redirectToApp(url)} label={i18n.get(props.buttonLabel)} />\n                    <ContentSeparator />\n                </div>\n            )}\n\n            {/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */}\n            <p ref={qrSubtitleRef} tabIndex={0} className=\"adyen-checkout__qr-loader__subtitle\">\n                {typeof props.introduction === 'string' ? i18n.get(props.introduction) : props.introduction?.()}\n            </p>\n\n            <QRLoaderDetailsProvider\n                type={type}\n                qrCodeImage={qrCodeImage}\n                qrCodeData={props.qrCodeData}\n                percentage={percentage}\n                timeToPay={props.timeToPay}\n                copyBtn={props.copyBtn}\n                instructions={props.instructions}\n                countdownTime={countdownTime}\n                onTick={(time: CountdownTime) => onTick(time)}\n                onQRCodeLoad={onQrCodeLoad}\n                onTimeUp={() => onTimeUp()}\n                handleCopy={handleCopy}\n            >\n                {props.children ? props.children : <QRDetails />}\n            </QRLoaderDetailsProvider>\n        </div>\n    );\n}\n\nQRLoader.defaultProps = {\n    countdownTime: DEFAULT_PAYMENT_STATUS_TIMER_COUNTDOWN_TIME_MIN,\n    delay: DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS,\n    throttleTime: DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS,\n    throttledInterval: DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS,\n    onError: () => {},\n    onComplete: () => {},\n    classNameModifiers: [],\n    introduction: 'wechatpay.scanqrcode',\n    timeToPay: 'wechatpay.timetopay',\n    buttonLabel: 'openApp',\n    showAmount: true\n};\n","import { IssuerListConfiguration, QRLoaderConfiguration } from '../types';\n\nexport type IrisConfiguration = IssuerListConfiguration & Pick<QRLoaderConfiguration, 'countdownTime' | 'qrCodeData' | 'paymentData' | 'delay'>;\n\n/**\n * Iris data format for /payment request\n * @internal\n */\nexport interface IrisData {\n    paymentMethod: {\n        type: string;\n        issuer?: string;\n    };\n}\n\n/**\n * Iris component display modes\n * @internal\n */\nexport enum IrisMode {\n    QR_CODE = 'qrCode',\n    BANK_LIST = 'bankList'\n}\n","export const IRIS_ALLY_LABELS = {\n    ButtonId: {\n        BANK_LIST: 'iris-button-bank-list',\n        QR_CODE: 'iris-button-qrCode'\n    },\n    AreaId: {\n        BANK_LIST: 'iris-area-bank-list',\n        QR_CODE: 'iris-area-qrCode'\n    }\n};\n\nexport const DEFAULT_IRIS_COUNTDOWN_TIME = 10;\n","import { h } from 'preact';\nimport cx from 'classnames';\nimport './SegmentedControl.scss';\nimport { stopPropagationForActionKeys } from '../Button/stopPropagationForActionKeys';\n\nexport interface SegmentedControlOption<T> {\n    readonly label: string;\n    readonly value: T;\n    readonly id: string;\n    readonly controls: string;\n    readonly htmlProps?: {};\n}\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 */\nexport const SegmentedControl = <T,>({\n    classNameModifiers = [],\n    selectedValue,\n    disabled = false,\n    options,\n    onChange\n}: Readonly<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 }: SegmentedControlOption<T>) => (\n                <button\n                    disabled={disabled}\n                    key={value}\n                    onClick={(event: MouseEvent) => onChange(value, event)}\n                    // Workaround: See ADR-0001-uielement-keyboard-event-propagation-workaround\n                    onKeyPress={stopPropagationForActionKeys}\n                    onKeyDown={stopPropagationForActionKeys}\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                    {label}\n                </button>\n            ))}\n        </div>\n    );\n};\n","import { h } from 'preact';\n\nexport interface SegmentedControlRegionProps {\n    id: string;\n    ariaLabelledBy: string;\n    className?: string;\n    children: h.JSX.Element | h.JSX.Element[];\n}\n\nexport const SegmentedControlRegion = ({ id, ariaLabelledBy, className, children }: Readonly<SegmentedControlRegionProps>) => {\n    return (\n        <div id={id} aria-labelledby={ariaLabelledBy} className={className} role=\"region\">\n            {children}\n        </div>\n    );\n};\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport useImage from '../../../core/Context/useImage';\nimport { UIElementStatus } from '../../types';\nimport { PayButtonProps } from '../../internal/PayButton/PayButton';\nimport styles from './IrisGenerateQRCode.module.scss';\n\ninterface IrisGenerateQRCodeProps {\n    showPayButton?: boolean;\n    payButton: (props: Partial<PayButtonProps>) => h.JSX.Element;\n    status: UIElementStatus;\n}\n\nexport default function IrisGenerateQRCode(props: Readonly<IrisGenerateQRCodeProps>) {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    return (\n        <div data-testid=\"iris-generate-qr-code\">\n            <p className={styles.instruction}>{i18n.get('iris.instructions.generateQrCode')}</p>\n            {props.showPayButton &&\n                props.payButton({\n                    label: i18n.get('generateQRCode'),\n                    icon: getImage({ imageFolder: 'components/' })('qr'),\n                    status: props.status\n                })}\n        </div>\n    );\n}\n","import { h } from 'preact';\nimport { PayButtonProps } from '../../internal/PayButton/PayButton';\nimport { IrisMode } from '../types';\nimport { useEffect, useMemo, useRef, useState } from 'preact/hooks';\nimport { IRIS_ALLY_LABELS } from '../constants';\nimport { getIrisSegmentedControlOptions } from '../utils';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport { SegmentedControl, SegmentedControlRegion } from '../../internal/SegmentedControl';\nimport { ComponentMethodsRef, UIElementStatus } from '../../types';\nimport { IssuerItem } from '../../internal/IssuerList/types';\nimport IrisGenerateQRCode from './IrisGenerateQRCode';\nimport styles from './IrisComponent.module.scss';\nimport { AnalyticsInfoEvent, InfoEventType, UiTarget } from '../../../core/Analytics/events/AnalyticsInfoEvent';\nimport { TxVariants } from '../../tx-variants';\nimport useAnalytics from '../../../core/Analytics/useAnalytics';\n\ninterface IrisComponentProps {\n    defaultMode: IrisMode;\n    showPayButton?: boolean;\n    issuers: IssuerItem[];\n    issuerListUI: h.JSX.Element;\n    onUpdateMode: (mode: IrisMode) => void;\n    payButton: (props: Partial<PayButtonProps>) => h.JSX.Element;\n    setComponentRef: (ref: ComponentMethodsRef) => void;\n}\n\nexport default function IrisComponent(props: Readonly<IrisComponentProps>) {\n    const { i18n } = useCoreContext();\n    const { analytics } = useAnalytics();\n\n    const [mode, setMode] = useState<IrisMode>(props.defaultMode);\n    const [status, setStatus] = useState<UIElementStatus>('ready');\n    const segmentedControlOptions = useMemo(() => getIrisSegmentedControlOptions(i18n, props.defaultMode), [i18n, props.defaultMode]);\n\n    const issuersAvailable = props.issuers.length > 0;\n\n    const handleModeChange = (mode: IrisMode, sendAnalytics = false) => {\n        setMode(mode);\n        props.onUpdateMode(mode);\n        if (sendAnalytics) {\n            const event = new AnalyticsInfoEvent({\n                type: InfoEventType.selected,\n                target: UiTarget.segmentedControl,\n                component: TxVariants.iris,\n                selectedValue: mode\n            });\n            analytics.sendAnalytics(event);\n        }\n    };\n\n    const irisRef = useRef<ComponentMethodsRef>({\n        setStatus: setStatus\n    });\n\n    useEffect(() => {\n        props.setComponentRef(irisRef.current);\n    }, [props.setComponentRef]);\n\n    useEffect(() => {\n        if (issuersAvailable) {\n            const event = new AnalyticsInfoEvent({\n                type: InfoEventType.displayed,\n                target: UiTarget.segmentedControl,\n                component: TxVariants.iris,\n                selectedValue: props.defaultMode\n            });\n            analytics.sendAnalytics(event);\n        }\n    }, []);\n\n    useEffect(() => {\n        if (!issuersAvailable) {\n            handleModeChange(IrisMode.QR_CODE);\n        }\n    }, [issuersAvailable]);\n\n    if (!issuersAvailable) {\n        return <IrisGenerateQRCode showPayButton={props.showPayButton} payButton={props.payButton} status={status} />;\n    }\n\n    return (\n        <div>\n            <SegmentedControl\n                onChange={mode => handleModeChange(mode, true)}\n                selectedValue={mode}\n                disabled={status === 'loading'}\n                options={segmentedControlOptions}\n            />\n            {mode === IrisMode.BANK_LIST && (\n                <SegmentedControlRegion\n                    id={IRIS_ALLY_LABELS.AreaId.BANK_LIST}\n                    ariaLabelledBy={IRIS_ALLY_LABELS.ButtonId.BANK_LIST}\n                    className={styles.bankList}\n                >\n                    {props.issuerListUI}\n                </SegmentedControlRegion>\n            )}\n            {mode === IrisMode.QR_CODE && (\n                <SegmentedControlRegion id={IRIS_ALLY_LABELS.AreaId.QR_CODE} ariaLabelledBy={IRIS_ALLY_LABELS.ButtonId.QR_CODE}>\n                    <IrisGenerateQRCode showPayButton={props.showPayButton} payButton={props.payButton} status={status} />\n                </SegmentedControlRegion>\n            )}\n        </div>\n    );\n}\n","import Language from '../../language';\nimport { SegmentedControlOption } from '../internal/SegmentedControl/SegmentedControl';\nimport { IRIS_ALLY_LABELS } from './constants';\nimport { IrisMode } from './types';\n\nexport const getIrisSegmentedControlOptions = (i18n: Language, defaultMode: IrisMode): SegmentedControlOption<IrisMode>[] => {\n    const options = [\n        {\n            label: i18n.get('qrCode'),\n            value: IrisMode.QR_CODE,\n            id: IRIS_ALLY_LABELS.ButtonId.QR_CODE,\n            controls: IRIS_ALLY_LABELS.AreaId.QR_CODE\n        },\n        {\n            label: i18n.get('bankList'),\n            value: IrisMode.BANK_LIST,\n            id: IRIS_ALLY_LABELS.ButtonId.BANK_LIST,\n            controls: IRIS_ALLY_LABELS.AreaId.BANK_LIST\n        }\n    ];\n\n    return options.sort((a, b) => {\n        if (a.value === defaultMode) return -1;\n        if (b.value === defaultMode) return 1;\n        return 0;\n    });\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 }: Readonly<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 }: Readonly<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 { h } from 'preact';\n\nimport { Timeline, TimelineWrapper } from '../../internal/Timeline';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\n\nexport const IrisQrCodeInstructions = () => {\n    const { i18n } = useCoreContext();\n    return (\n        <TimelineWrapper>\n            <Timeline\n                instructions={[\n                    i18n.get('iris.instructions.payment.step1'),\n                    i18n.get('iris.instructions.payment.step2'),\n                    i18n.get('iris.instructions.payment.step3')\n                ]}\n            />\n        </TimelineWrapper>\n    );\n};\n","import { h } from 'preact';\nimport { ICore } from '../../types';\nimport isMobile from '../../utils/isMobile';\nimport IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { QRLoader } from '../internal/QRLoader';\nimport { TxVariants } from '../tx-variants';\nimport IrisComponent from './components/IrisComponent';\nimport { IrisQrCodeInstructions } from './components/IrisQrCodeInstructions';\nimport { IrisConfiguration, IrisData, IrisMode } from './types';\nimport { DEFAULT_IRIS_COUNTDOWN_TIME } from './constants';\n\nexport class Iris extends IssuerListContainer<IrisConfiguration, IrisData> {\n    public static readonly type = TxVariants.iris;\n\n    private mode: IrisMode;\n\n    constructor(checkout: ICore, props: IrisConfiguration) {\n        super(checkout, props);\n        this.mode = isMobile() ? IrisMode.BANK_LIST : IrisMode.QR_CODE;\n    }\n\n    private readonly onUpdateMode = (mode: IrisMode): void => {\n        this.mode = mode;\n    };\n\n    private renderIssuerList(): h.JSX.Element {\n        return super.componentToRender();\n    }\n\n    formatData(): IrisData {\n        if (this.mode === IrisMode.BANK_LIST) {\n            return {\n                paymentMethod: {\n                    type: this.type,\n                    issuer: this.state?.data?.issuer\n                }\n            };\n        }\n\n        return {\n            paymentMethod: {\n                type: this.type\n            }\n        };\n    }\n\n    formatProps(props: IrisConfiguration): IrisConfiguration {\n        return {\n            ...super.formatProps(props),\n            countdownTime: props.countdownTime ?? DEFAULT_IRIS_COUNTDOWN_TIME\n        };\n    }\n\n    get isValid() {\n        if (this.mode === IrisMode.BANK_LIST) {\n            return super.isValid;\n        }\n\n        return true;\n    }\n\n    protected override componentToRender(): h.JSX.Element {\n        if (this.props.type === 'qrCode') {\n            return (\n                <QRLoader\n                    type={TxVariants.iris}\n                    brandLogo={this.icon}\n                    clientKey={this.props.clientKey}\n                    qrCodeData={this.props.qrCodeData ? encodeURIComponent(this.props.qrCodeData) : null}\n                    countdownTime={this.props.countdownTime}\n                    paymentData={this.props.paymentData}\n                    delay={this.props.delay}\n                    onActionHandled={this.onActionHandled}\n                    onError={this.props.onError}\n                    onComplete={this.onComplete}\n                    introduction={IrisQrCodeInstructions}\n                    showAmount\n                    copyBtn={false}\n                />\n            );\n        }\n\n        return (\n            <IrisComponent\n                setComponentRef={this.setComponentRef}\n                defaultMode={this.mode}\n                onUpdateMode={this.onUpdateMode}\n                issuerListUI={this.renderIssuerList()}\n                showPayButton={this.props.showPayButton}\n                payButton={this.payButton}\n                issuers={this.props.issuers}\n            />\n        );\n    }\n}\n\nexport default Iris;\n","import IssuerListContainer from '../helpers/IssuerListContainer/IssuerListContainer';\nimport { TxVariants } from '../tx-variants';\n\nclass MolPayEBankingMYElement extends IssuerListContainer {\n    public static readonly 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 readonly 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 readonly 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 readonly type = TxVariants.onlineBanking_CZ;\n\n    private static readonly 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 readonly 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 readonly type = TxVariants.onlineBanking_PL;\n\n    private static readonly disclaimerUrlsMap = {\n        regulation: 'https://www.przelewy24.pl/regulamin',\n        obligation: 'https://www.przelewy24.pl/obowiazek-informacyjny-rodo-platnicy'\n    };\n\n    private static readonly 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 readonly type = TxVariants.onlineBanking_SK;\n\n    private static readonly 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 readonly 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 readonly 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 readonly 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 readonly 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 readonly 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: Readonly<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: Readonly<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 { DragonpayConfiguraton } from './types';\nimport { TxVariants } from '../tx-variants';\n\nexport class DragonpayElement extends UIElement<DragonpayConfiguraton> {\n    public static readonly type = TxVariants.dragonpay;\n\n    public static readonly 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    protected override componentToRender(): h.JSX.Element {\n        return 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    }\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 } from 'preact';\nimport { useEffect, 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 FormInstruction from '../../../internal/FormInstruction';\nimport { ComponentMethodsRef } from '../../../internal/UIElement/types';\nimport { PayButtonProps } from '../../../internal/PayButton/PayButton';\nimport './EcontextInput.scss';\n\ninterface EcontextInputProps {\n    setComponentRef: (ref: ComponentMethodsRef) => void;\n    personalDetailsRequired?: boolean;\n    data?: PersonalDetailsSchema;\n    showPayButton: boolean;\n    payButton: (props: PayButtonProps) => h.JSX.Element;\n    onChange?(data: any): void;\n    onSubmit?(state: any, component: any): void;\n}\n\nexport default function EcontextInput({\n    data,\n    onChange,\n    showPayButton,\n    payButton,\n    setComponentRef,\n    personalDetailsRequired = true\n}: Readonly<EcontextInputProps>) {\n    const { i18n } = useCoreContext();\n\n    const [status, setStatus] = useState('ready');\n\n    const econtextRef = useRef<ComponentMethodsRef>({\n        setStatus\n    });\n\n    useEffect(() => {\n        setComponentRef(econtextRef.current);\n    }, [setComponentRef]);\n\n    const personalDetailsRef = useRef<ComponentMethodsRef | null>(null);\n    const setPersonalDetailsRef = (ref: ComponentMethodsRef) => {\n        personalDetailsRef.current = ref;\n        econtextRef.current = {\n            setStatus: econtextRef.current?.setStatus,\n            showValidation: ref.showValidation\n        };\n        setComponentRef(econtextRef.current);\n    };\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 { useMemo } from 'preact/hooks';\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: Readonly<EcontextVoucherResultProps>) => {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    const { expiresAt, maskedTelephoneNumber, instructionsUrl, collectionInstitutionNumber, alternativeReference, reference } = props;\n\n    const hasAlternativeReference = Boolean(alternativeReference);\n\n    const alternativeReferenceDetails = useMemo(\n        () => [\n            { label: i18n.get('voucher.collectionInstitutionNumber'), value: collectionInstitutionNumber },\n            { label: i18n.get('econtext.customerNumber'), value: reference },\n            { label: i18n.get('econtext.confirmationNumber'), value: alternativeReference },\n            { label: i18n.get('econtext.useBefore'), value: i18n.date(expiresAt) }\n        ],\n        [i18n, collectionInstitutionNumber, reference, alternativeReference, expiresAt]\n    );\n\n    const standardVoucherDetails = useMemo(\n        () => [\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        [i18n, collectionInstitutionNumber, expiresAt, maskedTelephoneNumber]\n    );\n\n    const voucherDetails = hasAlternativeReference ? alternativeReferenceDetails : standardVoucherDetails;\n\n    return (\n        <Voucher\n            {...extractCommonPropsForVoucher({ props, i18n, introKey: 'voucher.introduction.econtext', getImage: getImage() })}\n            instructionsUrl={instructionsUrl}\n            paymentReferenceLabel={hasAlternativeReference ? i18n.get('econtext.paymentInformation') : undefined}\n            voucherDetails={voucherDetails}\n            copyBtn={!hasAlternativeReference}\n            showReferenceValue={!hasAlternativeReference}\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 { TxVariants } from '../tx-variants';\nimport { EcontextConfiguration } from './types';\n\nexport class EcontextElement extends UIElement<EcontextConfiguration> {\n    public static readonly type = TxVariants.econtext;\n    public static readonly 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 readonly 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    protected override componentToRender(): h.JSX.Element {\n        return this.props.reference ? (\n            <EcontextVoucherResult\n                reference={this.props.reference}\n                totalAmount={this.props.totalAmount}\n                expiresAt={this.props.expiresAt}\n                paymentMethodType={this.props.paymentMethodType}\n                maskedTelephoneNumber={this.props.maskedTelephoneNumber}\n                instructionsUrl={this.props.instructionsUrl}\n                alternativeReference={this.props.alternativeReference}\n                collectionInstitutionNumber={this.props.collectionInstitutionNumber}\n                onActionHandled={this.onActionHandled}\n            />\n        ) : (\n            <EcontextInput\n                setComponentRef={this.setComponentRef}\n                data={this.props.data}\n                personalDetailsRequired={this.props.personalDetailsRequired}\n                showPayButton={this.props.showPayButton}\n                onChange={this.setState}\n                onSubmit={this.submit}\n                payButton={this.payButton}\n            />\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<Readonly<RedirectShopperProps>> {\n    private postForm;\n    public static readonly 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 RedirectShopper from './components/RedirectShopper';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\nimport { RedirectConfiguration } from './types';\nimport collectBrowserInfo from '../../utils/browserInfo';\nimport { AnalyticsErrorEvent, ErrorEventCode, ErrorEventType } from '../../core/Analytics/events/AnalyticsErrorEvent';\n\nclass RedirectElement extends UIElement<RedirectConfiguration> {\n    public static readonly type: TxVariants = TxVariants.redirect;\n\n    public static readonly 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: ErrorEventType.redirect,\n            code: ErrorEventCode.REDIRECT\n        });\n        super.submitAnalytics(event);\n    };\n\n    get isRedirecting() {\n        return !!this.props.url && !!this.props.method;\n    }\n\n    get isValid() {\n        return true;\n    }\n\n    get browserInfo() {\n        return collectBrowserInfo();\n    }\n\n    protected override componentToRender(): h.JSX.Element {\n        if (this.isRedirecting) {\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                <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        }\n\n        return null;\n    }\n}\n\nexport default RedirectElement;\n","import { h } from 'preact';\nimport RedirectElement from '../Redirect';\nimport RedirectButton from '../internal/RedirectButton';\nimport { TxVariants } from '../tx-variants';\n\nclass GiropayElement extends RedirectElement {\n    public static override readonly type: TxVariants = TxVariants.giropay;\n\n    public override get displayName() {\n        return this.props.name || this.constructor['type'];\n    }\n\n    protected override componentToRender(): h.JSX.Element {\n        if (this.props.showPayButton) {\n            return (\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        }\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: Readonly<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 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 readonly 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    protected override componentToRender(): h.JSX.Element {\n        if (this.props.reference) {\n            return <MultibancoVoucherResult ref={this.handleRef} {...this.props} onActionHandled={this.onActionHandled} />;\n        }\n\n        if (this.props.showPayButton) {\n            return (\n                <RedirectButton\n                    showPayButton={this.props.showPayButton}\n                    name={this.displayName}\n                    payButton={this.payButton}\n                    onSubmit={this.submit}\n                    ref={ref => {\n                        this.componentRef = ref;\n                    }}\n                />\n            );\n        }\n\n        return null;\n    }\n}\n\nexport default MultibancoElement;\n","import RedirectElement from '../Redirect';\nimport PayButton from '../internal/PayButton';\nimport { payAmountLabel } from '../internal/PayButton/utils';\nimport { h } from 'preact';\nimport { TxVariants } from '../tx-variants';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nclass TwintElement extends RedirectElement {\n    public static override readonly type: TxVariants = TxVariants.twint;\n\n    public static readonly 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    protected override payButton = (props: PayButtonProps): h.JSX.Element => {\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 override readonly type: TxVariants = TxVariants.vipps;\n\n    public static readonly defaultProps = {\n        type: VippsElement.type,\n        name: 'Vipps'\n    };\n}\n\nexport default VippsElement;\n","import { Fragment, h } from 'preact';\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 override readonly type: TxVariants = TxVariants.trustly;\n\n    override get displayName() {\n        return this.props.name || this.constructor['type'];\n    }\n\n    protected override componentToRender(): h.JSX.Element {\n        return (\n            <Fragment>\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            </Fragment>\n        );\n    }\n}\n\nexport default TrustlyElement;\n","import { Fragment, h } from 'preact';\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 from '../internal/PayButton';\nimport { payAmountLabel } from '../internal/PayButton/utils';\nexport default class PayByBankUS extends RedirectElement {\n    public static override readonly type: TxVariants = TxVariants.paybybank_AIS_DD;\n\n    protected formatProps(props) {\n        return {\n            // paymentMethodBrands configuration\n            keepBrandsVisible: true,\n            showOtherInsteadOfNumber: 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    protected override componentToRender(): h.JSX.Element {\n        return this.props.storedPaymentMethodId ? (\n            this.props.showPayButton && (\n                <PayButton\n                    {...this.props}\n                    classNameModifiers={['standalone']}\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\">{this.props.i18n.get('payByBankAISDD.disclaimer.header')}</p>\n                    <p className=\"adyen-checkout-paybybank_AIS_DD__description-body\">{this.props.i18n.get('payByBankAISDD.disclaimer.body')}</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    }\n}\n","import { TxVariants } from '../tx-variants';\nimport RedirectElement from '../Redirect';\n\nclass Riverty extends RedirectElement {\n    public static override 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    'live-nea': 'https://checkoutshopper-live-nea.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    'live-nea': 'https://checkoutshopper-live-nea.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    'live-nea': 'https://checkoutanalytics-live-nea.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] || 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 = 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';\nimport { IAnalytics } from '../../../core/Analytics/Analytics';\n\nexport interface IPasskeySdkLoader {\n    load(environment: CoreConfiguration['environment'], analytics: IAnalytics): Promise<IAdyenPasskey>;\n}\n\nclass PasskeySdkLoader implements IPasskeySdkLoader {\n    public static readonly PASSKEY_SDK_URL = 'js/adyenpasskey/1.2.0/adyen-passkey.js';\n    private AdyenPasskey: IAdyenPasskey;\n\n    private readonly analytics: IAnalytics;\n    private readonly environment: string;\n\n    constructor({ analytics, environment }: { analytics: IAnalytics; environment: string }) {\n        this.analytics = analytics;\n        this.environment = environment;\n    }\n\n    private isAvailable(): boolean {\n        return this.AdyenPasskey != null;\n    }\n\n    public async load(): Promise<IAdyenPasskey> {\n        if (this.isAvailable()) {\n            return this.AdyenPasskey;\n        }\n\n        try {\n            const cdnUrl = getUrlFromMap(this.environment as CoreConfiguration['environment'], CDN_ENVIRONMENTS);\n            const url = `${cdnUrl}${PasskeySdkLoader.PASSKEY_SDK_URL}`;\n\n            const scriptElement = new Script({\n                src: url,\n                component: 'paybybank_pix',\n                analytics: this.analytics\n            });\n\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';\nimport type { IAnalytics } from '../../../core/Analytics/Analytics';\n\nexport class PasskeyService implements IPasskeyService {\n    private readonly passkeyServiceConfig: PasskeyServiceConfig;\n    private readonly analytics: IAnalytics;\n\n    private passkeySdk: IAdyenPasskey;\n    private riskSignals: RiskSignalsEnrollment | RiskSignalsAuthentication;\n    private initialized: Promise<void>;\n\n    constructor(configuration: PasskeyServiceConfig, analytics: IAnalytics) {\n        this.analytics = analytics;\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({ environment: this.passkeyServiceConfig.environment, analytics: this.analytics })\n                .load()\n                .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 { h } from 'preact';\nimport useImage from '../../../../core/Context/useImage';\n\nexport const AwaitFinalState = ({ image, message }: Readonly<{ image: string; message: string }>) => {\n    const getImage = useImage();\n\n    return (\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={message}\n            />\n            <p className=\"adyen-checkout__await__subtitle adyen-checkout__await__subtitle--result\">{message}</p>\n        </div>\n    );\n};\n","import classnames from 'classnames';\nimport { h } from 'preact';\nimport { useEffect } from 'preact/hooks';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport {\n    usePaymentStatusTimer,\n    DEFAULT_PAYMENT_STATUS_TIMER_COUNTDOWN_TIME_MIN,\n    DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS,\n    DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS,\n    DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS\n} from '../../../hooks/usePaymentStatusTimer';\nimport Spinner from '../../internal/Spinner';\nimport Button from '../Button';\nimport ContentSeparator from '../ContentSeparator';\nimport Countdown from '../Countdown';\nimport { AwaitFinalState } from './components/AwaitFinalState';\nimport { AwaitComponentProps } from './types';\nimport { redirectToApp } from '../../../utils/urls';\nimport './Await.scss';\nimport { useAmount } from '../../../core/Context/AmountProvider';\n\nexport function Await(props: Readonly<AwaitComponentProps>) {\n    const { i18n, loadingContext } = useCoreContext();\n\n    const { state: timerState, actions: timerActions } = usePaymentStatusTimer({\n        loadingContext,\n        paymentData: props.paymentData,\n        clientKey: props.clientKey,\n        delay: props.delay,\n        throttleTime: props.throttleTime,\n        throttleInterval: props.throttleInterval,\n        type: props.type,\n        onError: props.onError,\n        onComplete: props.onComplete,\n        pollStatus: props.pollStatus,\n        onActionHandled: props.onActionHandled\n    });\n\n    const { completed, expired, loading, percentage } = timerState;\n    const { onTick, onTimeUp } = timerActions;\n    const { amount } = useAmount();\n\n    useEffect(() => {\n        if (props.shouldRedirectAutomatically && props.url) {\n            redirectToApp(props.url);\n        }\n    }, [props.shouldRedirectAutomatically, props.url]);\n\n    if (expired) {\n        return <AwaitFinalState image=\"error\" message={i18n.get('error.subtitle.payment')} />;\n    }\n\n    if (completed) {\n        return <AwaitFinalState image=\"success\" message={i18n.get('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 !== null && 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: DEFAULT_PAYMENT_STATUS_TIMER_COUNTDOWN_TIME_MIN,\n    delay: DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS,\n    throttleTime: DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS,\n    throttleInterval: DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS,\n    onError: () => {},\n    onComplete: () => {},\n    showCountdownTimer: true,\n    classNameModifiers: [],\n    url: null\n};\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: Readonly<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            />\n        </div>\n    );\n}\n\nexport default PayByBankPixAwait;\n","import { h } from 'preact';\nimport { useState, useEffect, useRef, useCallback } from 'preact/hooks';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { PaymentProps } from './types';\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    txVariant,\n    setComponentRef,\n    enrollmentId,\n    initiationId,\n    clientKey,\n    onAuthorize,\n    onError\n}: Readonly<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\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        <PayButton classNameModifiers={buttonModifiers} label={i18n.get('paybybankpix.redirectBtn.label')} status={status} onClick={onPay} />\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>\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';\nimport { TxVariants } from '../../../tx-variants';\n\nconst TERMS_CONDITIONS_URL = 'https://www.adyen.com/pt_BR/legal/termo-de-consentimento-br';\n\nfunction Enrollment(props: Readonly<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                        selectFieldLabel={i18n.get('paybybankpix.issuerList.selectField.label')}\n                        onSubmitAnalytics={props.onSubmitAnalytics}\n                        onChange={props.onChange}\n                        payButton={props.payButton}\n                        showPayButton={true}\n                        ref={issuerListRef}\n                        type={TxVariants.paybybank_pix}\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 { PayByBankPixData, PayByBankPixConfiguration } from './types';\nimport { TxVariants } from '../tx-variants';\nimport UIElement from '../internal/UIElement';\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\n        this.passkeyService = new PasskeyService(\n            {\n                environment: this.props.environment,\n                deviceId\n            },\n            this.analytics\n        );\n\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    protected override componentToRender(): h.JSX.Element {\n        // Always render the redirect button on the merchant's page\n        if (!this.props._isAdyenHosted) {\n            return (\n                <RedirectButton\n                    showPayButton={this.props.showPayButton}\n                    name={this.displayName}\n                    label={this.props.i18n.get('paybybankpix.redirectBtn.label')}\n                    payButton={this.payButton}\n                    onSubmit={this.submit}\n                    ref={ref => {\n                        this.componentRef = ref;\n                    }}\n                />\n            );\n        }\n\n        return this.props.storedPaymentMethodId != null ? (\n            <StoredPayment\n                txVariant={PayByBankPixElement.type}\n                type={this.props.type}\n                clientKey={this.props.clientKey}\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    }\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","import { h } from 'preact';\nimport { useEffect, useRef, useState, useCallback } from 'preact/hooks';\nimport Script from '../../../../utils/Script';\nimport { KLARNA_WIDGET_URL, KLARNA_REFUSED_RESULT_CODE } from '../../constants';\nimport type { KlarnaWidgetAuthorizeResponse, KlarnaWidgetProps } from '../../types';\nimport './KlarnaWidget.scss';\nimport useAnalytics from '../../../../core/Analytics/useAnalytics';\n\nexport function KlarnaWidget({ sdkData, paymentMethodType, widgetInitializationTime, payButton, ...props }: Readonly<KlarnaWidgetProps>) {\n    const klarnaWidgetRef = useRef(null);\n    const [status, setStatus] = useState('ready');\n    const { analytics } = useAnalytics();\n\n    const handleError = useCallback(() => {\n        setStatus('error');\n        props.onComplete({\n            data: {\n                paymentData: props.paymentData,\n                details: { resultCode: KLARNA_REFUSED_RESULT_CODE }\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: { show_form: boolean; error: unknown }) {\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    // Workaround: See ADR-0001-uielement-keyboard-event-propagation-workaround\n    const handleKeyDown = (e: h.JSX.TargetedKeyboardEvent<HTMLButtonElement>) => {\n        if (e.key === 'Enter' || e.code === 'Enter') {\n            e.preventDefault();\n            authorizeKlarna();\n        }\n    };\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({\n            src: KLARNA_WIDGET_URL,\n            component: 'klarna',\n            analytics\n        });\n\n        void script.load();\n\n        return () => {\n            script.remove();\n        };\n    }, [initializeKlarnaWidget, analytics]);\n\n    if (status !== 'error' && status !== 'success') {\n        return (\n            <div className=\"adyen-checkout__klarna-widget\">\n                <div ref={klarnaWidgetRef} />\n                {payButton({\n                    status,\n                    disabled: status === 'loading',\n                    onClick: authorizeKlarna,\n                    onKeyDown: handleKeyDown\n                })}\n            </div>\n        );\n    }\n\n    return null;\n}\n","import { ResultCode } from '../../types/global-types';\n\nexport const KLARNA_WIDGET_URL = 'https://x.klarnacdn.net/kp/lib/v1/api.js';\n\nexport const KLARNA_REFUSED_RESULT_CODE: ResultCode = 'Refused';\n","import { h } from 'preact';\nimport { useEffect, useRef, useState } from 'preact/hooks';\nimport { KlarnaWidget } from '../KlarnaWidget/KlarnaWidget';\nimport type { ComponentMethodsRef, UIElementStatus } from '../../../internal/UIElement/types';\nimport type { ActionHandledReturnObject } from '../../../../types/global-types';\nimport type { AdyenCheckoutError, KlarnaAction, KlarnaAdditionalDetailsData, KlarnaComponentRef } from '../../../../types';\nimport { PayButtonProps } from '../../../internal/PayButton/PayButton';\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: PayButtonProps): h.JSX.Element;\n    onLoaded(): void;\n    onActionHandled(actionHandled: ActionHandledReturnObject): void;\n}\n\nexport function KlarnaContainer({ setComponentRef, ...props }: Readonly<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 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';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nclass KlarnaPayments extends UIElement<KlarnaConfiguration> {\n    public static readonly type = TxVariants.klarna;\n    public static readonly txVariants = [TxVariants.klarna, TxVariants.klarna_account, TxVariants.klarna_paynow, TxVariants.klarna_b2b];\n\n    public componentRef: KlarnaComponentRef;\n\n    protected static readonly 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: PayButtonProps) => {\n        return <PayButton 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    protected override componentToRender(): h.JSX.Element {\n        return (\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        );\n    }\n}\n\nexport default KlarnaPayments;\n","import { h } from 'preact';\nimport UIElement from '../../internal/UIElement/UIElement';\nimport { QRLoader } from '../../internal/QRLoader';\nimport RedirectButton from '../../internal/RedirectButton';\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 readonly defaultProps = {\n        qrCodeImage: '',\n        amount: null,\n        paymentData: null,\n        onError: () => {}\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            <QRLoader\n                {...this.props}\n                delay={this.props.delay}\n                countdownTime={this.props.countdownTime}\n                instructions={this.props.instructions}\n                type={this.constructor['type']}\n                brandLogo={this.props.brandLogo || this.icon}\n                onComplete={this.onComplete}\n                onActionHandled={this.onActionHandled}\n                brandName={this.displayName}\n                onSubmitAnalytics={this.submitAnalytics}\n            />\n        );\n    }\n\n    protected override componentToRender(): h.JSX.Element {\n        if (this.props.paymentData) {\n            return this.renderQRCode();\n        }\n\n        if (this.props.showPayButton) {\n            return (\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            );\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 readonly type = TxVariants.bcmc_mobile;\n    public static readonly 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 }: Readonly<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 { QRImage, QRProgressbar, QRCountdown, QRCodeCopyButton, useQRLoaderDetails } from '../../internal/QRLoader';\nimport { useCoreContext } from '../../../core/Context/CoreProvider';\nimport Field from '../../internal/FormFields/Field';\nimport InputText from '../../internal/FormFields/InputText';\nimport { TxVariants } from '../../tx-variants';\n\nconst PixQRDetails = () => {\n    const { i18n } = useCoreContext();\n    const { qrCodeData, qrCodeImage, percentage, timeToPay, onTick, countdownTime, onQRCodeLoad, onTimeUp, handleCopy } = useQRLoaderDetails();\n\n    return (\n        <div className=\"adyen-checkout__qr-loader--pix__qr_details\">\n            <QRImage type={TxVariants.pix} src={qrCodeImage} onLoad={onQRCodeLoad} />\n            <div className=\"adyen-checkout__qr-loader--pix__qr_details__timer\">\n                <QRProgressbar percentage={percentage} />\n                <QRCountdown countdownTime={countdownTime} timeToPay={timeToPay} onTick={onTick} onCompleted={onTimeUp} />\n            </div>\n            <Field name=\"pix-code\" useLabelElement={false}>\n                <InputText\n                    className=\"adyen-checkout__qr-loader--pix__qr_details__code\"\n                    value={qrCodeData}\n                    readonly\n                    aria-label={i18n.get('pix.code.label')}\n                />\n            </Field>\n            <QRCodeCopyButton\n                text={qrCodeData}\n                copyLabel={i18n.get('pix.code.copy.label')}\n                copiedLabel={i18n.get('pix.code.copied.label')}\n                handleCopy={handleCopy}\n            />\n        </div>\n    );\n};\n\nexport default PixQRDetails;\n","import { h } from 'preact';\nimport QRLoaderContainer from '../helpers/QRLoaderContainer/QRLoaderContainer';\nimport PixInput from './components/PixInput';\nimport { cleanCPFCNPJ } from '../internal/SocialSecurityNumberBrazil/utils';\nimport { PixElementData, PixConfiguration } from './types';\nimport { TxVariants } from '../tx-variants';\nimport { QRLoader } from '../internal/QRLoader';\nimport PixQRDetails from './components/PixQRDetails';\nimport './Pix.scss';\n\nclass PixElement extends QRLoaderContainer<PixConfiguration> {\n    public static readonly type = TxVariants.pix;\n\n    public static readonly 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): 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    renderQRCode() {\n        return (\n            <QRLoader\n                {...this.props}\n                type={this.type}\n                brandLogo={this.props.brandLogo || this.icon}\n                onComplete={this.onComplete}\n                onActionHandled={this.onActionHandled}\n                brandName={this.displayName}\n                onSubmitAnalytics={this.submitAnalytics}\n            >\n                <PixQRDetails />\n            </QRLoader>\n        );\n    }\n\n    protected override componentToRender(): h.JSX.Element {\n        if (this.props.paymentData) {\n            return this.renderQRCode();\n        }\n\n        return (\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        );\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 readonly 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 readonly type = TxVariants.wechatpayQR;\n    public static readonly txVariants = [TxVariants.wechatpay];\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 readonly 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","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 readonly 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","export const countdownTime = 3; // 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 DuitNowElement extends QRLoaderContainer {\n    public static readonly 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 readonly type = 'payme';\n    private static readonly defaultCountdown = 10; // min\n    private static readonly 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: Readonly<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 config from './config';\nimport RedirectButton from '../../components/internal/RedirectButton';\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 readonly 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    protected override componentToRender(): h.JSX.Element {\n        if (this.props.paymentData) {\n            return (\n                <Await\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            );\n        }\n\n        return this.props.storedPaymentMethodId ? (\n            <RedirectButton\n                showPayButton={this.props.showPayButton}\n                name={this.displayName}\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    }\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    form: Form<PhoneInputSchema>;\n    getError: (key: string) => string | boolean;\n    phoneNumberKey?: string;\n    phonePrefixErrorKey?: string;\n    phoneNumberErrorKey?: string;\n    placeholders?: PhoneInputSchema;\n    showPrefix?: boolean;\n    showNumber?: boolean;\n    canSelectPrefix?: boolean;\n}\n/**\n *\n * @param PhoneInputFormProps\n * @constructor\n */\nexport default function PhoneInputFields({\n    getError,\n    showNumber,\n    showPrefix,\n    form,\n    canSelectPrefix = true,\n    ...props\n}: Readonly<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: Readonly<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 } 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: Readonly<MBWayInputProps>) {\n    const { i18n, loadingContext } = useCoreContext();\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 setComponentRef={props.setComponentRef} {...props} items={phonePrefixes} onChange={onChange} data={props.data} />\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 config from './components/MBWayAwait/config';\nimport { Await } from '../../components/internal/Await';\nimport { TxVariants } from '../tx-variants';\nimport { AwaitConfiguration } from '../internal/Await/types';\n\nexport class MBWayElement extends UIElement<AwaitConfiguration> {\n    public static readonly 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    protected override componentToRender(): h.JSX.Element {\n        if (this.props.paymentData) {\n            return (\n                <Await\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            );\n        }\n\n        return (\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        );\n    }\n}\n\nexport default MBWayElement;\n","import { UpiMode } from './types';\n\nexport const UPI_MODE = {\n    QR_CODE: 'qrCode' as UpiMode,\n    INTENT: 'intent' as UpiMode\n} as const;\n\nexport const A11Y = {\n    ButtonId: {\n        QR: 'upi-button-qrCode',\n        INTENT: 'upi-button-intent'\n    },\n    AreaId: {\n        QR: 'upi-area-qrCode',\n        INTENT: 'upi-area-intent'\n    }\n};\n","import { h } from 'preact';\nimport classNames from 'classnames';\nimport Brand from '../../../internal/Brand';\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\nconst paymentMethodsWithoutBorder = ['googlepay', 'paywithgoogle'];\n\nconst PaymentMethodIcon = ({ src, altDescription, type }: Readonly<PaymentMethodIconProps>) => {\n    const classes = paymentMethodsWithoutBorder.includes(type)\n        ? 'adyen-checkout__payment-method__image__wrapper'\n        : classNames('adyen-checkout__payment-method__image__wrapper', 'adyen-checkout__payment-method__image__wrapper--outline');\n\n    return <Brand wrapperClassName={classes} imgClassName={'adyen-checkout__payment-method__image'} url={src} alt={altDescription} />;\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 { 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}\n\nconst UPIIntentAppItem = ({ app, imgSrc, isSelected, onSelect = () => {} }: Readonly<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 && <span className=\"adyen-checkout-upi-app-item__checkmark\" />}\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 useImage from '../../../../core/Context/useImage';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport './UPIIntentAppList.scss';\n\ninterface UPIIntentAppListProps {\n    apps: Array<App>;\n    selectedAppId?: string;\n    disabled?: boolean;\n    onAppSelect?: (app: App) => void;\n}\n\nconst UPIIntentAppList = ({ apps, selectedAppId, disabled, onAppSelect = () => {} }: Readonly<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        >\n            {apps.map(app => {\n                const key = `adyen-checkout-upi-app-item-${app.id}`;\n                const isSelected = selectedAppId === app.id;\n                const imgName = `upi/${app.id}`;\n                const imgSrc = getImage()(imgName.toLowerCase());\n                return <UPIIntentAppItem key={key} app={app} imgSrc={imgSrc} isSelected={isSelected} onSelect={onAppSelect} />;\n            })}\n        </ul>\n    );\n};\n\nexport default UPIIntentAppList;\n","import { h } from 'preact';\nimport { useMemo } from 'preact/hooks';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport Alert from '../../../internal/Alert';\nimport type { PaymentAmount } from '../../../../types/global-types';\n\nexport type Mandate = { amount: string; frequency: 'monthly' | 'weekly' | 'adhoc'; amountRule: 'max' | 'exact' };\n\nexport interface UPIMandateProps {\n    mandate: Mandate;\n    amount?: PaymentAmount;\n}\n\nconst UPIMandate = ({ mandate, amount }: Readonly<UPIMandateProps>): h.JSX.Element => {\n    const { i18n } = useCoreContext();\n\n    const mandateContent = useMemo((): h.JSX.Element => {\n        const { amount: mandateAmount, frequency, amountRule } = mandate;\n        const { value: paymentAmount, currency } = amount || {};\n\n        if (!frequency || !amountRule || !mandateAmount || !currency) {\n            console.warn('No mandate information because of missing one of the following: frequency, amountRule, amount or currency');\n            return null;\n        }\n\n        const formattedMandateAmount = i18n.amount(Number(mandateAmount), currency);\n        const formattedTransactionAmount = paymentAmount ? i18n.amount(paymentAmount, currency) : null;\n\n        const frequencyText = i18n.get(`upi.mandate.frequency.${frequency}`);\n        const introText = i18n.get('upi.mandate.intro');\n        const recurringAmount = `${formattedMandateAmount}${frequencyText}`;\n\n        if (amountRule === 'exact') {\n            return (\n                <span>\n                    {introText} (<strong>{recurringAmount}</strong>).\n                </span>\n            );\n        }\n\n        // amountRule === 'max'\n        const maxAmountText = i18n.get('upi.mandate.upTo', { values: { amount: recurringAmount } });\n\n        if (formattedTransactionAmount) {\n            const extraText = i18n.get('upi.mandate.max.extraText');\n            return (\n                <span>\n                    {introText} (<strong>{formattedTransactionAmount}</strong>). {extraText} (<strong>{maxAmountText}</strong>).\n                </span>\n            );\n        }\n\n        return (\n            <span>\n                {introText} (<strong>{maxAmountText}</strong>).\n            </span>\n        );\n    }, [mandate, amount, i18n]);\n\n    if (!mandateContent) return null;\n\n    return (\n        <Alert icon=\"info_black\" type=\"info\">\n            {mandateContent}\n        </Alert>\n    );\n};\n\nexport default UPIMandate;\n","import { Fragment, h, RefObject } from 'preact';\nimport { useCallback, useEffect, useState } from 'preact/hooks';\nimport { UIElementStatus } from '../../../types';\nimport { App, UpiMode } from '../../types';\nimport useImage from '../../../../core/Context/useImage';\nimport { A11Y, UPI_MODE } from '../../constants';\nimport './UPIComponent.scss';\nimport { SegmentedControlRegion } from '../../../internal/SegmentedControl';\nimport UPIIntentAppList from '../UPIIntentAppList';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport Alert from '../../../internal/Alert';\nimport UPIMandate, { Mandate } from '../UPIMandate/UPIMandate';\nimport { PayButtonProps } from '../../../internal/PayButton/PayButton';\nimport { useAmount } from '../../../../core/Context/AmountProvider';\n\ntype UpiData = { app?: App };\n\ntype OnChangeProps = { data: UpiData; valid?: { [key: string]: boolean }; errors?: { [key: string]: any }; isValid: boolean };\n\ninterface UPIComponentProps {\n    mode: UpiMode;\n    showPayButton: boolean;\n    apps?: Array<App>;\n    mandate?: Mandate;\n    ref?(ref: RefObject<typeof UPIComponent>): void;\n    payButton(props: PayButtonProps): h.JSX.Element;\n    onChange({ data, valid, errors, isValid }: OnChangeProps): void;\n}\n\nexport default function UPIComponent({ mode, onChange, payButton, showPayButton, mandate, apps = [] }: Readonly<UPIComponentProps>): h.JSX.Element {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n    const [status, setStatus] = useState<UIElementStatus>('ready');\n    const [selectedApp, setSelectedApp] = useState<App>(null);\n    const { amount } = useAmount();\n    const [isValid, setIsValid] = useState<boolean>(mode === UPI_MODE.QR_CODE);\n    const mandateComponent = mandate && <UPIMandate mandate={mandate} amount={amount} />;\n\n    this.setStatus = (status: UIElementStatus) => {\n        setStatus(status);\n    };\n\n    this.showValidation = () => {\n        if (mode === UPI_MODE.INTENT) {\n            validateIntentApp();\n        }\n    };\n\n    const handleAppSelect = useCallback(\n        (app: App) => {\n            if (app?.id === selectedApp?.id) return;\n\n            setSelectedApp(app);\n            setIsValid(true);\n            setStatus('ready');\n        },\n        [selectedApp]\n    );\n\n    const validateIntentApp = useCallback(() => {\n        if (!selectedApp) {\n            setStatus('error');\n            setIsValid(false);\n        } else {\n            setStatus('ready');\n            setIsValid(true);\n        }\n    }, [selectedApp]);\n\n    useEffect(() => {\n        if (mode === UPI_MODE.QR_CODE) {\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            return;\n        }\n        onChange({\n            data: { ...(selectedApp && { app: selectedApp }) },\n            isValid\n        });\n    }, [selectedApp, isValid, mode, onChange]);\n\n    return (\n        <Fragment>\n            {mode === UPI_MODE.INTENT && (\n                <SegmentedControlRegion id={A11Y.AreaId.INTENT} ariaLabelledBy={A11Y.ButtonId.INTENT} className=\"adyen-checkout-upi-area-intent\">\n                    <span className=\"adyen-checkout-upi-instruction-label\">{i18n.get('upi.intent.instruction')}</span>\n                    {status === 'error' && <Alert icon={'cross'}>{i18n.get('upi.error.noAppSelected')}</Alert>}\n                    <UPIIntentAppList disabled={status === 'loading'} apps={apps} selectedAppId={selectedApp?.id} onAppSelect={handleAppSelect} />\n                    {mandateComponent}\n                    {showPayButton &&\n                        payButton({\n                            label: i18n.get('continue'),\n                            status\n                        })}\n                </SegmentedControlRegion>\n            )}\n            {mode === UPI_MODE.QR_CODE && (\n                <SegmentedControlRegion id={A11Y.AreaId.QR} ariaLabelledBy={A11Y.ButtonId.QR} className=\"adyen-checkout-upi-area-qr-code\">\n                    <span className=\"adyen-checkout-upi-instruction-label\">{i18n.get('upi.qrCode.instruction')}</span>\n                    {mandateComponent}\n                    {showPayButton &&\n                        payButton({\n                            label: i18n.get('generateQRCode'),\n                            icon: getImage({ imageFolder: 'components/' })('qr'),\n                            status\n                        })}\n                </SegmentedControlRegion>\n            )}\n        </Fragment>\n    );\n}\n","import { h, RefObject } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport UPIComponent from './components/UPIComponent';\nimport { Await } from '../internal/Await';\nimport { QRLoader } from '../internal/QRLoader';\nimport { UPIConfiguration, UpiMode, UpiPaymentData, UpiType } from './types';\nimport { TxVariants } from '../tx-variants';\nimport isMobile from '../../utils/isMobile';\nimport { UPI_MODE } from './constants';\nimport { ICore } from '../../types';\n\n/**\n * For mobile:\n * We should show upi_intent depending on if `apps` are returned in /paymentMethods response.\n *\n * For non-mobile:\n * We should never show the upi_intent (ignore `apps` in /paymentMethods response)\n * Show upi_qr as default\n */\n\nclass UPI extends UIElement<UPIConfiguration> {\n    public static readonly type = TxVariants.upi;\n    public static readonly txVariants = [TxVariants.upi, TxVariants.upi_qr, TxVariants.upi_intent];\n    private mode: UpiMode;\n    constructor(checkout: ICore, props: UPIConfiguration) {\n        super(checkout, props);\n        // @ts-ignore: Accessing deprecated prop to provide migration warning\n        const { defaultMode: deprecatedDefaultMode } = props;\n        if (deprecatedDefaultMode) {\n            console.warn('[Adyen Checkout] UPI configuration property \"defaultMode\" is deprecated and will be removed in a future version.');\n        }\n        this.mode = isMobile() ? UPI_MODE.INTENT : UPI_MODE.QR_CODE;\n    }\n\n    formatProps(props: UPIConfiguration): UPIConfiguration {\n        const { apps = [] } = props;\n        const hasIntentApps = apps.length > 0;\n        if (isMobile() && hasIntentApps) {\n            // Mobile with UPI apps\n            return {\n                ...super.formatProps(props),\n                apps\n            };\n        }\n\n        this.mode = UPI_MODE.QR_CODE;\n        return {\n            ...super.formatProps(props),\n            apps: []\n        };\n    }\n\n    public get isValid(): boolean {\n        return this.state.isValid;\n    }\n\n    public formatData(): UpiPaymentData {\n        const { app } = this.state.data || {};\n\n        return {\n            paymentMethod: {\n                type: this.paymentType,\n                ...(this.paymentType === TxVariants.upi_intent && app?.id && { appId: app.id })\n            }\n        };\n    }\n\n    get paymentType(): UpiType {\n        if (this.mode === UPI_MODE.QR_CODE) {\n            return TxVariants.upi_qr;\n        }\n        return TxVariants.upi_intent;\n    }\n\n    protected override componentToRender(): h.JSX.Element {\n        const { type, url, paymentMethodType } = this.props;\n\n        const isAutoPay = !!this.props.mandate;\n\n        switch (type) {\n            case 'qrCode':\n                return (\n                    <QRLoader\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={this.props.countdownTime ?? 5}\n                        onActionHandled={this.onActionHandled}\n                        showAmount={!isAutoPay}\n                    />\n                );\n            case 'await':\n                return (\n                    <Await\n                        url={url}\n                        type={paymentMethodType}\n                        showCountdownTimer\n                        shouldRedirectAutomatically\n                        showAmount={!isAutoPay}\n                        countdownTime={this.props.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                        apps={this.props.apps}\n                        mode={this.mode}\n                        showPayButton={this.props.showPayButton}\n                        mandate={this.props.mandate}\n                    />\n                );\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 }: Readonly<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 config from './components/ANCVAwait/config';\nimport { Await } from '../../components/internal/Await';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport PayButton from '../internal/PayButton';\nimport { ANCVConfiguration } from './types';\nimport { sanitizeResponse, verifyPaymentDidNotFail } from '../internal/UIElement/utils';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nexport class ANCVElement extends UIElement<ANCVConfiguration> {\n    public static readonly 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                if (error instanceof AdyenCheckoutError) {\n                    this.handleError(error);\n                } else {\n                    this.handleError(new AdyenCheckoutError('ERROR', error));\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    protected override payButton = (props: PayButtonProps): h.JSX.Element => {\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    protected override componentToRender(): h.JSX.Element {\n        if (this.props.paymentData) {\n            return (\n                <Await\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            );\n        }\n\n        return (\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        );\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 }: Readonly<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}\n\n// we have decided to hardcode phone prefix as it's going to be always +61 for now\nconst AUSTRALIAN_PHONE_PREFIXES = [\n    {\n        id: '+61',\n        name: '+61 (AU)',\n        selectedOptionName: '+61'\n    }\n];\n\nexport default function PayToPhone({ form }: Readonly<PayToPhoneProps>) {\n    const { i18n } = useCoreContext();\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={AUSTRALIAN_PHONE_PREFIXES}\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 number regex with country code: ^+\\[0-9\\]{1,3}-\\[1-9\\]{1,1}\\[0-9\\]{1,29}$\nconst phoneNumberRegexWithoutCountryCode = /^[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 : phoneNumberRegexWithoutCountryCode.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 }: Readonly<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    id?: string;\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, id }: Readonly<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 id={id} 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 && <PayToPhone form={form} />}\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    id?: string;\n}\n\nconst BASE_SCHEMA = ['bankAccountNumber', 'bsb', 'firstName', 'lastName'];\n\nexport default function BSBInput({ setComponentRef, defaultData, placeholders, onChange, setStatus, id }: Readonly<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 id={id} 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 { getUniqueId } from '../../../utils/idGenerator';\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: PayButtonProps) => h.JSX.Element;\n}\n\nexport default function PayToComponent(props: Readonly<PayToComponentProps>) {\n    const { i18n } = useCoreContext();\n\n    const [status, setStatus] = useState<UIElementStatus>('ready');\n\n    // Generate unique IDs for the input sections\n    const payidInputId = useMemo(() => getUniqueId('payid-input'), []);\n    const bsbInputId = useMemo(() => getUniqueId('bsb-input'), []);\n\n    const inputOptions: SegmentedControlOptions<PayToInputOption> = useMemo(\n        () => [\n            {\n                value: 'payid-option',\n                label: 'PayID',\n                id: 'payid-option',\n                controls: payidInputId\n            },\n            {\n                value: 'bsb-option',\n                label: i18n.get('payto.bsb.option.label'),\n                id: 'bsb-option',\n                controls: bsbInputId\n            }\n        ],\n        [i18n, payidInputId, bsbInputId]\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                    id={payidInputId}\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                    id={bsbInputId}\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 }: Readonly<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 { Fragment, h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport { Await } from '../../components/internal/Await';\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 from '../internal/PayButton';\nimport { payAmountLabel } from '../internal/PayButton/utils';\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 readonly defaultProps = {\n        placeholders: {}\n    };\n\n    formatProps(props: PayToConfiguration) {\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    protected override componentToRender(): h.JSX.Element {\n        // Stored\n        if (this.props.storedPaymentMethodId) {\n            return (\n                <Fragment>\n                    {this.props.showPayButton && (\n                        <PayButton\n                            {...this.props}\n                            classNameModifiers={['standalone']}\n                            label={payAmountLabel(this.props.i18n, this.props.amount)}\n                            onClick={this.submit}\n                        />\n                    )}\n                </Fragment>\n            );\n        }\n        // Await\n        if (this.props.paymentData) {\n            return (\n                <Await\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            );\n        }\n        // Input\n        return (\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        );\n    }\n}\n\nexport default PayToElement;\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';\nimport { useAmount } from '../../../core/Context/AmountProvider';\n\ninterface GiftcardResultProps {\n    balance: PaymentAmount;\n    transactionLimit: PaymentAmount;\n    status: string;\n    makePayment: () => void;\n    makeBalanceCheck: () => void;\n    showPayButton: boolean;\n    payButton(props: PayButtonProps): h.JSX.Element;\n}\n\nfunction GiftcardResult({ balance, transactionLimit, status, makePayment, showPayButton, payButton }: Readonly<GiftcardResultProps>) {\n    const { i18n } = useCoreContext();\n    const { amount } = useAmount();\n\n    // Calculate the transaction amount based on balance and transaction limit\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                    customAmount: 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 = ({\n    i18n,\n    classNameModifiers,\n    sfpState,\n    getCardErrorMessage,\n    focusedElement,\n    setFocusOn\n}: Readonly<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}: Readonly<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 { GIFT_CARD } from '../../internal/SecuredFields/lib/constants';\nimport { GiftCardFields } from './GiftcardFields';\nimport { GiftcardFieldsProps, Placeholders } from './types';\nimport { useSRPanelForGiftcardErrors } from './useSRPanelForGiftcardErrors';\nimport { GiftCardBalanceCheckErrorType } from '../types';\nimport { PayButtonProps } from '../../internal/PayButton/PayButton';\nimport { useAmount } from '../../../core/Context/AmountProvider';\nimport type { AbstractAnalyticsEvent } from '../../../core/Analytics/events/AbstractAnalyticsEvent';\n\ninterface GiftcardComponentProps {\n    onChange: (state) => void;\n    onFocus: (event) => void;\n    onBlur: (event) => void;\n    makeBalanceCheck: (event) => void;\n    makePayment: (event) => void;\n    showPayButton: boolean;\n    payButton: (props: PayButtonProps) => h.JSX.Element;\n    pinRequired: boolean;\n    expiryDateRequired?: boolean;\n    fieldsLayoutComponent: FunctionComponent<GiftcardFieldsProps>;\n    placeholders?: Placeholders;\n    handleKeyPress?: (o: KeyboardEvent) => void;\n    onSubmitAnalytics?: (event: AbstractAnalyticsEvent) => void;\n}\n\nclass Giftcard extends Component<Readonly<GiftcardComponentProps>> {\n    public state = {\n        status: 'ready',\n        data: {},\n        balance: null,\n        transactionLimit: null,\n        focusedElement: false,\n        isValid: false,\n        sfpState: {},\n        isValidating: false,\n        transformedErrors: {}\n    };\n\n    public static readonly defaultProps = {\n        pinRequired: true,\n        expiryDateRequired: false,\n        onChange: () => {},\n        onFocus: () => {},\n        onBlur: () => {},\n        fieldsLayoutComponent: GiftCardFields\n    };\n\n    public sfp: SecuredFieldsProvider;\n\n    /**\n     * Maps string error codes from SecuredFields to validation rule objects\n     */\n    public mapErrorsToValidationObjects = () => {\n        // Use the sfp reference to call mapErrorsToValidationRuleResult\n        if (!this.sfp) return {};\n        return this.sfp.mapErrorsToValidationRuleResult();\n    };\n\n    private updateTransformedErrors = (balanceCheckErrors?: Record<string, any>) => {\n        const transformedErrors = this.mapErrorsToValidationObjects();\n\n        const mergedErrors = { ...transformedErrors, ...balanceCheckErrors };\n\n        this.setState({ transformedErrors: mergedErrors });\n    };\n\n    public onChange = sfpState => {\n        this.setState({ sfpState }, () => this.updateTransformedErrors());\n\n        this.props.onChange({\n            data: sfpState.data,\n            isValid: sfpState.isSfpValid\n        });\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    /**\n     * Generates balance check errors in the same format as SFP errors\n     * Compatible with the transformedErrors structure\n     */\n    private generateBalanceCheckErrors(errorType?: GiftCardBalanceCheckErrorType | null): Record<string, any> {\n        const balanceCheckErrors: Record<string, any> = {};\n\n        // This is the field that the error is associated with, only used for SR logic\n        const fieldToAnnounce = 'encryptedCardNumber';\n\n        // If errorType is null, clear errors\n        if (errorType === null) {\n            return balanceCheckErrors;\n        }\n\n        // Create error in the same format as SFP errors for consistency\n        balanceCheckErrors[fieldToAnnounce] = {\n            isValid: false,\n            errorMessage: `error.giftcard.${errorType}`,\n            error: errorType\n        };\n\n        return balanceCheckErrors;\n    }\n\n    /**\n     * Checks if a status represents a balance check error\n     */\n    private isBalanceCheckError(status: string): boolean {\n        return ['no-balance', 'card-error', 'currency-error'].includes(status);\n    }\n\n    /**\n     * Method called by GiftcardElement to set balance check errors only\n     */\n    public setBalanceCheckErrors = (errorType: GiftCardBalanceCheckErrorType | null): void => {\n        // Check if the errors should be displayed\n        if (this.isBalanceCheckError(errorType)) {\n            // Generate balance check errors in the style of useForm\n            // This is usefull because then we can use the same logic for SF and balance check errors\n            // Also we can use the same logic for SRPanel errors\n            const balanceCheckErrors = this.generateBalanceCheckErrors(errorType);\n            this.updateTransformedErrors(balanceCheckErrors);\n        }\n    };\n\n    public showValidation = () => {\n        this.setState({ isValidating: true });\n\n        // Validate SecuredFields\n        this.sfp?.showValidation();\n    };\n\n    public setIsValidating = (val: boolean) => {\n        this.setState({ isValidating: val });\n    };\n\n    render(props, { focusedElement, balance, transactionLimit, isValidating, transformedErrors }) {\n        const { i18n } = useCoreContext();\n        const { amount } = useAmount();\n\n        // Handle SRPanel errors in render with transformed error objects\n        useSRPanelForGiftcardErrors({\n            errors: transformedErrors,\n            isValidating,\n            setIsValidating: this.setIsValidating,\n            sfp: this.sfp\n        });\n\n        const transactionAmount = transactionLimit?.value < balance?.value ? transactionLimit : balance;\n        const hasEnoughBalance = transactionAmount?.value >= amount?.value;\n\n        if (transactionAmount && hasEnoughBalance) {\n            return (\n                <GiftcardResult\n                    balance={balance}\n                    transactionLimit={transactionLimit}\n                    makePayment={props.makePayment}\n                    status={this.state.status}\n                    makeBalanceCheck={props.makeBalanceCheck}\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            // This logic is a bit of a hack, but it's the only way to get the error message for balance check errors\n            // In the future we should move this logic to useForm\n            if (transformedErrors.encryptedCardNumber) {\n                return i18n.get(transformedErrors.encryptedCardNumber.errorMessage);\n            }\n\n            return null;\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                    onSubmitAnalytics={props.onSubmitAnalytics}\n                    type={GIFT_CARD}\n                    componentType={props.type}\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 { useEffect, useState } from 'preact/hooks';\nimport { SetSRMessagesReturnObject } from '../../../core/Errors/types';\nimport useSRPanelContext from '../../../core/Errors/useSRPanelContext';\nimport { usePrevious } from '../../../utils/hookUtils';\nimport { ERROR_ACTION_BLUR_SCENARIO, ERROR_ACTION_FOCUS_FIELD } from '../../../core/Errors/constants';\nimport { getArrayDifferences } from '../../../utils/arrayUtils';\nimport { SetSRMessagesReturnFn } from '../../../core/Errors/SRPanelProvider';\nimport SecuredFieldsProvider from '../../internal/SecuredFields/SFP/SecuredFieldsProvider';\nimport ua from '../../internal/SecuredFields/lib/CSF/utils/userAgent';\nimport { windowScrollTo } from '../../../utils/windowScrollTo';\n\n/**\n * Interface for transformed error objects returned from mapErrorsToValidationRuleResult\n */\ninterface TransformedError {\n    isValid: boolean;\n    errorMessage: string;\n    errorI18n: string;\n    error: string;\n    rootNode: HTMLElement;\n}\n\n/**\n * Interface for errors object with transformed error entries\n */\ninterface TransformedErrorsObj {\n    [key: string]: TransformedError | null;\n}\n\n/**\n * Props interface for the error handling hook\n */\ninterface UseSRPanelForGiftcardErrorsProps {\n    errors: TransformedErrorsObj;\n    isValidating: boolean;\n    setIsValidating: (val: boolean) => void;\n    sfp: SecuredFieldsProvider;\n}\n\n/**\n * Interface for sorted error objects used for comparison\n */\ninterface SortedErrorObject {\n    field: string;\n    errorMessage: string;\n}\n\n/**\n * Custom hook for handling gift card component errors and screen reader announcements\n *\n * This hook manages both visual and screen reader error announcements for the gift card component,\n * handling both blur-based validation errors and form-wide validation errors.\n */\nconst useSRPanelForGiftcardErrors = ({ errors, isValidating, setIsValidating, sfp }: UseSRPanelForGiftcardErrorsProps) => {\n    // Track sorted list of errors for comparison with previous state\n    const [sortedErrorList, setSortedErrorList] = useState<SortedErrorObject[]>(null);\n    // Track previous error list for detecting changes\n    const previousSortedErrors = usePrevious(sortedErrorList);\n\n    // Get SRPanel context for managing screen reader messages\n    const { setSRMessagesFromObjects, setSRMessagesFromStrings, clearSRPanel, shouldMoveFocusSR } = useSRPanelContext();\n\n    // Fixed layout array defining the order of fields for error sorting\n    // Assume fields in this order, and adds encryptedExpiryDate for MealVoucher, this is ignored in giftcard\n    const layout = ['encryptedCardNumber', 'encryptedExpiryDate', 'encryptedSecurityCode'];\n\n    useEffect(() => {\n        try {\n            // Create a partial function for setting SR messages with fixed configuration\n            const setMessages: SetSRMessagesReturnFn = setSRMessagesFromObjects?.({});\n            // Set messages with current errors and layout\n\n            // Unlike Card SR Panel, isValidating is a boolean\n            const srPanelResp: SetSRMessagesReturnObject = setMessages?.({\n                errors,\n                isValidating,\n                layout\n            });\n\n            // Store the sorted list of errors for comparison\n            const currentErrorsSortedByLayout = srPanelResp?.currentErrorsSortedByLayout;\n            setSortedErrorList(currentErrorsSortedByLayout);\n\n            // Handle different error scenarios based on the action type\n            switch (srPanelResp?.action) {\n                case ERROR_ACTION_FOCUS_FIELD:\n                    // When a field needs to be focused due to validation error\n                    if (shouldMoveFocusSR && isValidating) {\n                        // Fix for iOS scrolling issues: can't programmatically set focus on a cross-origin element on iOS, so we scroll to it's label instead, so at least the element is in view\n                        if (ua.__IS_IOS) {\n                            const rootNode = sfp?.getRootNode();\n                            const elementToScrollTo: HTMLElement = rootNode?.querySelector(`[data-id=\"${srPanelResp?.fieldToFocus}\"]`);\n                            windowScrollTo(elementToScrollTo);\n                        }\n\n                        sfp?.setFocusOn(srPanelResp?.fieldToFocus);\n                    }\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                        // Need to reset isValidating on the *state* of the Giftcard component (which is where isValidating comes from),\n                        // - otherwise it remains true and any subsequent click, *anywhere* in the UI, will trigger a second \"focus field\" event\n                        setIsValidating(false);\n                    }, 300);\n                    break;\n\n                case ERROR_ACTION_BLUR_SCENARIO: {\n                    // Handle blur-based validation errors\n                    const difference = getArrayDifferences(currentErrorsSortedByLayout, previousSortedErrors, 'field');\n                    const latestErrorMsg = difference?.[0];\n\n                    if (latestErrorMsg) {\n                        // Only announce blur-based errors to screen reader\n                        const isBlurBasedError = true;\n                        const latestSRError = isBlurBasedError ? latestErrorMsg.errorMessage : null;\n                        setSRMessagesFromStrings(latestSRError);\n                    } else {\n                        // Clear SR panel if there are no more errors\n                        clearSRPanel();\n                    }\n                    break;\n                }\n            }\n        } catch (_) {\n            // Fail silently - we don't want to break the component if SRPanel fails\n        }\n    }, [errors]);\n};\n\n// Export all interfaces and the hook\nexport type { TransformedError, TransformedErrorsObj };\n\nexport { useSRPanelForGiftcardErrors };\n","import { h } from 'preact';\nimport { GiftcardNumberField } from './GiftcardNumberField';\nimport { GiftcardPinField } from './GiftcardPinField';\nimport { GiftcardFieldsProps } from './types';\n\nexport const GiftCardFields = (props: Readonly<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 PayButton from '../internal/PayButton';\nimport AdyenCheckoutError from '../../core/Errors/AdyenCheckoutError';\nimport { PaymentAmount } from '../../types/global-types';\nimport { GiftCardElementData, GiftCardConfiguration, balanceCheckResponseType, GiftCardBalanceCheckErrorType } from './types';\nimport { TxVariants } from '../tx-variants';\nimport { PayButtonProps } from '../internal/PayButton/PayButton';\n\nexport class GiftcardElement extends UIElement<GiftCardConfiguration> {\n    public static readonly type: TxVariants = TxVariants.giftcard;\n\n    protected componentRef: GiftcardComponent | undefined;\n\n    protected static readonly 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 setBalanceCheckError(errorMessage: GiftCardBalanceCheckErrorType | null): void {\n        this.componentRef?.setBalanceCheckErrors?.(errorMessage);\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        if (!this.isValid) {\n            this.showValidation();\n            return;\n        }\n\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                // Clear any previous balance check errors on success\n                this.setBalanceCheckError(null);\n\n                // We still need to throw these errors, otherwise it would be a breaking changing\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                // Simply pass the raw error message to setBalanceCheckError\n                this.setBalanceCheckError(error?.message);\n\n                // Still call handleError for other side effects (analytics, onError callback)\n                if (error instanceof AdyenCheckoutError) {\n                    this.handleError(error);\n                } else {\n                    this.handleError(new AdyenCheckoutError('ERROR', error));\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        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    protected override payButton = (props: PayButtonProps) => {\n        return <PayButton {...props} />;\n    };\n\n    protected override componentToRender(): h.JSX.Element {\n        return (\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                onSubmitAnalytics={this.submitAnalytics}\n            />\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 }: Readonly<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: Readonly<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 override readonly type: TxVariants = TxVariants.mealVoucher_FR;\n    public static readonly 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 { TxVariants } from '../tx-variants';\nimport { AnalyticsInfoEvent, InfoEventType } from '../../core/Analytics/events/AnalyticsInfoEvent';\nimport { AddressProps } from '../internal/Address/types';\nimport { UIElementProps } from '../internal/UIElement/types';\n\nexport type AddressConfiguration = AddressProps & UIElementProps;\n\nexport class AddressElement extends UIElement<AddressConfiguration> {\n    public static readonly type = TxVariants.address;\n\n    protected override beforeRender(configSetByMerchant?: AddressConfiguration): void {\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventType.rendered,\n            component: this.type,\n            configData: configSetByMerchant\n        });\n\n        this.analytics.sendAnalytics(event);\n    }\n\n    get data() {\n        return this.state.data;\n    }\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    protected override componentToRender(): h.JSX.Element {\n        return (\n            <Address\n                setComponentRef={this.setComponentRef}\n                {...this.props}\n                onChange={this.setState}\n                {...(process.env.NODE_ENV !== 'production' && { payButton: this.payButton })}\n            />\n        );\n    }\n}\n\nexport default AddressElement;\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport { Timeline, TimelineWrapper } from '../../../internal/Timeline';\n\nconst BankTransferResultInstructions = () => {\n    const { i18n } = useCoreContext();\n\n    return (\n        <TimelineWrapper>\n            <Timeline\n                instructions={[\n                    i18n.get('bankTransfer.instruction.step1'),\n                    i18n.get('bankTransfer.instruction.step2'),\n                    i18n.get('bankTransfer.instruction.step3'),\n                    i18n.get('bankTransfer.instruction.step4')\n                ]}\n            />\n        </TimelineWrapper>\n    );\n};\n\nexport { BankTransferResultInstructions };\n","import { h, Fragment } from 'preact';\nimport classNames from 'classnames';\nimport { BankTransferVoucherProps } from './types';\nimport './BankTransferVoucher.scss';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\n\nexport default function BankTransferVoucher({ voucherDetails, className = '', ...props }: Readonly<BankTransferVoucherProps>) {\n    const { i18n } = useCoreContext();\n    props.onActionHandled?.({ componentType: props.paymentMethodType, actionDescription: 'voucher-presented' });\n\n    return (\n        <div\n            className={classNames(\n                'adyen-checkout__voucher-result',\n                'adyen-checkout__voucher-result--bankTransfer',\n                `adyen-checkout__voucher-result--${props.paymentMethodType}`,\n                className\n            )}\n        >\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                </div>\n                {props.amount && <div className=\"adyen-checkout__voucher-result__amount\">{props.amount}</div>}\n                {props.instructions && (\n                    <Fragment>\n                        <div className=\"adyen-checkout__voucher-result-title\">{i18n.get('bankTransfer.instruction.title')}</div>\n                        {props.instructions}\n                    </Fragment>\n                )}\n            </div>\n\n            <div className=\"adyen-checkout__voucher-result__bottom\">\n                {voucherDetails && (\n                    <Fragment>\n                        <div className=\"adyen-checkout__voucher-result-title\">{i18n.get('bankTransfer.details.title')}</div>\n                        {voucherDetails}\n                    </Fragment>\n                )}\n            </div>\n        </div>\n    );\n}\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport useImage from '../../../../core/Context/useImage';\nimport DetailsTable from '../../../internal/DetailsTable';\nimport { BankTransferResultInstructions } from './BankTransferResultInstructions';\nimport BankTransferVoucher from './BankTransferVoucher';\nimport type { ActionHandledReturnObject } from '../../../../types/global-types';\n\nexport interface BankTransferResultProps {\n    paymentMethodType?: string;\n    reference?: string;\n    totalAmount?: { value: number; currency: string };\n    beneficiary?: string;\n    iban?: string;\n    bic?: string;\n    accountNumber?: string;\n    sortCode?: string;\n    routingNumber?: string;\n    branchCode?: string;\n    bankCode?: string;\n    onActionHandled?: (actionHandledObj: ActionHandledReturnObject) => void;\n}\n\nexport default function BankTransferResult(props: Readonly<BankTransferResultProps>) {\n    const { i18n } = useCoreContext();\n    const getImage = useImage();\n\n    // we don't have to filter these values here, they get filtered inside the DetailsTable component\n    const tableFields = [\n        { label: i18n.get('bankTransfer.beneficiary'), value: props.beneficiary },\n        { label: i18n.get('bankTransfer.accountNumber'), value: props.accountNumber },\n        { label: i18n.get('bankTransfer.sortCode'), value: props.sortCode },\n        { label: i18n.get('bankTransfer.routingNumber'), value: props.routingNumber },\n        { label: i18n.get('bankTransfer.iban'), value: props.iban },\n        { label: i18n.get('bankTransfer.branchCode'), value: props.branchCode },\n        { label: i18n.get('bankTransfer.bankCode'), value: props.bankCode },\n        { label: i18n.get('bankTransfer.reference'), value: props.reference },\n        { label: i18n.get('bankTransfer.bic'), value: props.bic }\n    ];\n\n    return (\n        <BankTransferVoucher\n            paymentMethodType={props.paymentMethodType}\n            imageUrl={getImage()(props.paymentMethodType)}\n            onActionHandled={props.onActionHandled}\n            amount={i18n.amount(props.totalAmount.value, props.totalAmount.currency)}\n            instructions={<BankTransferResultInstructions />}\n            voucherDetails={<DetailsTable shouldShowCopyButton tableFields={tableFields} />}\n        />\n    );\n}\n","import { ValidatorRule } from '../../../../utils/Validator/types';\nimport { isEmpty } from '../../../../utils/validator-utils';\nimport { email } from '../../../../utils/regex';\nimport { ERROR_FIELD_INVALID } from '../../../../core/Errors/constants';\n\nexport const optionalEmailValidationRule: ValidatorRule = {\n    validate: value => {\n        if (isEmpty(value)) {\n            return true;\n        }\n        return value.length >= 6 && value.length <= 320 && email.test(value);\n    },\n    errorMessage: ERROR_FIELD_INVALID,\n    modes: ['blur']\n};\n","import { h } from 'preact';\nimport { useCoreContext } from '../../../../core/Context/CoreProvider';\nimport './BankTransferInput.scss';\nimport { useEffect, useRef } from 'preact/hooks';\nimport useForm from '../../../../utils/useForm';\nimport { BankTransferSchema } from '../../types';\nimport { getErrorMessage } from '../../../../utils/getErrorMessage';\nimport InputEmail from '../../../internal/FormFields/InputEmail';\nimport Field from '../../../internal/FormFields/Field';\nimport { optionalEmailValidationRule } from './validationRule';\nimport { BankTransferInputProps } from './types';\n\nfunction BankTransferInput(props: Readonly<BankTransferInputProps>) {\n    const { i18n } = useCoreContext();\n    const emailOptionalLabel = `${i18n.get('shopperEmail')} ${i18n.get('field.title.optional')}`;\n\n    const { handleChangeFor, triggerValidation, data, valid, errors, isValid } = useForm<BankTransferSchema>({\n        schema: ['shopperEmail'],\n        defaultData: props.data,\n        rules: {\n            shopperEmail: optionalEmailValidationRule\n        }\n    });\n\n    const self = useRef({\n        showValidation: () => {\n            triggerValidation();\n        }\n    });\n\n    useEffect(() => {\n        props.onChange({ data, errors, valid, isValid });\n    }, [data, valid, errors, isValid]);\n\n    useEffect(() => {\n        props.setComponentRef(self.current);\n    }, [props.setComponentRef]);\n\n    return (\n        <div className=\"adyen-checkout__bankTransfer\">\n            <p className=\"adyen-checkout__bankTransfer__introduction\">{i18n.get('bankTransfer.introduction')}</p>\n            <div className=\"adyen-checkout__fieldset adyen-checkout__fieldset--sendCopyToEmail adyen-checkout__bankTransfer__emailField\">\n                <Field\n                    label={emailOptionalLabel}\n                    classNameModifiers={['shopperEmail']}\n                    errorMessage={!!errors.shopperEmail && getErrorMessage(i18n, errors.shopperEmail, i18n.get('shopperEmail'))}\n                    isValid={valid.shopperEmail}\n                    name={'shopperEmail'}\n                    showContextualElement={props.showContextualElement}\n                    contextualText={i18n.get('bankTransfer.shopperEmail.contextualText')}\n                >\n                    <InputEmail\n                        name={'shopperEmail'}\n                        autoCorrect={'off'}\n                        spellcheck={false}\n                        required={false}\n                        value={data.shopperEmail}\n                        onInput={handleChangeFor('shopperEmail', 'input')}\n                        onBlur={handleChangeFor('shopperEmail', 'blur')}\n                    />\n                </Field>\n            </div>\n        </div>\n    );\n}\n\nexport default BankTransferInput;\n","import { Fragment, h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\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 readonly type = TxVariants.bankTransfer_IBAN;\n    public static readonly txVariants = [\n        TxVariants.bankTransfer_IBAN,\n        TxVariants.bankTransfer_BE,\n        TxVariants.bankTransfer_NL,\n        TxVariants.bankTransfer_PL,\n        TxVariants.bankTransfer_FR,\n        TxVariants.bankTransfer_CH,\n        TxVariants.bankTransfer_IE,\n        TxVariants.bankTransfer_GB,\n        TxVariants.bankTransfer_DE,\n        TxVariants.bankTransfer_AE,\n        TxVariants.bankTransfer_AT,\n        TxVariants.bankTransfer_AU,\n        TxVariants.bankTransfer_BG,\n        TxVariants.bankTransfer_CA,\n        TxVariants.bankTransfer_EE,\n        TxVariants.bankTransfer_ES,\n        TxVariants.bankTransfer_FI,\n        TxVariants.bankTransfer_HK,\n        TxVariants.bankTransfer_HU,\n        TxVariants.bankTransfer_IT,\n        TxVariants.bankTransfer_JP,\n        TxVariants.bankTransfer_LU,\n        TxVariants.bankTransfer_NZ,\n        TxVariants.bankTransfer_PT,\n        TxVariants.bankTransfer_SG,\n        TxVariants.bankTransfer_SK,\n        TxVariants.bankTransfer_US\n    ];\n\n    public static readonly defaultProps = {\n        showEmailAddress: true,\n        showContextualElement: true,\n        data: { shopperEmail: '' }\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        const subtype = this.type !== (TxVariants.bankTransfer_IBAN as string) ? { subtype: 'embedded' } : {};\n\n        return {\n            paymentMethod: {\n                type: this.type,\n                ...subtype\n            },\n            ...(shopperEmail && { shopperEmail })\n        };\n    }\n\n    protected override componentToRender(): h.JSX.Element {\n        if (this.props.reference) {\n            return <BankTransferResult {...this.props} onActionHandled={this.onActionHandled} />;\n        }\n\n        return (\n            <Fragment>\n                {this.props.showEmailAddress && <BankTransferInput setComponentRef={this.setComponentRef} {...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            </Fragment>\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 = '' }: Readonly<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}: Readonly<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: () => void;\n}\nexport default function FixedAmounts(props: Readonly<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: Readonly<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: Readonly<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 { Fragment, h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\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 readonly 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 readonly 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    protected override componentToRender(): h.JSX.Element {\n        return (\n            <Fragment>\n                {/*@ts-ignore ref*/}\n                <DonationComponent {...this.props} ref={this.handleRef} onChange={this.setState} onDonate={this.donate} />\n            </Fragment>\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 }: Readonly<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                                <span className=\"adyen-checkout__order-payment-method__deducted-amount__label\">{i18n.get('deductedBalance')}</span>\n                                <span className=\"adyen-checkout__order-payment-method__deducted-amount__value\">\n                                    {i18n.amount(orderPaymentMethod.amount.value, orderPaymentMethod.amount.currency)}\n                                </span>\n                            </div>\n                        </div>\n                    </li>\n                ))}\n            </ul>\n\n            {orderStatus.remainingAmount && (\n                <p className=\"adyen-checkout__order-remaining-amount\">\n                    {i18n.get('partialPayment.warning')}{' '}\n                    <strong>{i18n.amount(orderStatus.remainingAmount.value, orderStatus.remainingAmount.currency)}</strong>\n                </p>\n            )}\n        </div>\n    );\n};\n\nexport default OrderPaymentMethods;\n","import { h } from 'preact';\nimport { memo } from 'preact/compat';\nimport UIElement from '../../../internal/UIElement/UIElement';\nimport './InstantPaymentMethods.scss';\n\ninterface InstantPaymentMethodsProps {\n    paymentMethods: UIElement[];\n    onSelect: (paymentMethod: UIElement) => void;\n}\n\nconst InstantPaymentMethods = memo(({ paymentMethods, onSelect }: Readonly<InstantPaymentMethodsProps>) => {\n    return (\n        <ul className=\"adyen-checkout__instant-payment-methods-list\">\n            {paymentMethods.map(pm => (\n                /**\n                 * Apple Pay button click event does not bubble up, therefore we need to use 'onClickCapture' here\n                 * to capture the button interaction\n                 */\n                <li key={pm._id} data-testid={pm.type} onClickCapture={() => onSelect(pm)}>\n                    {pm.render()}\n                </li>\n            ))}\n        </ul>\n    );\n});\n\nexport { 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';\nimport { memo } from 'preact/compat';\nimport UIElement from '../../../internal/UIElement';\n\ninterface PaymentMethodDetailsProps {\n    paymentMethodComponent: UIElement;\n    isSelected: boolean;\n}\n\n/**\n * The payment method 'render()' trigger analytics. If a Component is removed from the DOM, the state is reset.\n * In order to preserve the state and also trigger analytics when a Component is selected, we cache renders when\n * the 'isSelect' changes from true -> false\n */\nfunction isComponentCached(oldProps: PaymentMethodDetailsProps, newProps: PaymentMethodDetailsProps) {\n    const isInitialRender = oldProps.isSelected === null;\n\n    if (isInitialRender) return false;\n\n    const componentIsDeselected = oldProps.isSelected === true && newProps.isSelected === false;\n    return componentIsDeselected;\n}\n\nconst PaymentMethodDetails = memo(({ paymentMethodComponent, isSelected }: Readonly<PaymentMethodDetailsProps>) => {\n    if (!isSelected) {\n        return null;\n    }\n\n    return <div className={'adyen-checkout__payment-method__details__content'}>{paymentMethodComponent.render()}</div>;\n}, isComponentCached);\n\nexport { 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    showOtherInsteadOfNumber?: boolean;\n}\n\nconst PaymentMethodBrands = ({\n    brands,\n    excludedUIBrands = [],\n    isPaymentMethodSelected,\n    keepBrandsVisible = false,\n    showOtherInsteadOfNumber = false\n}: Readonly<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            {showOtherInsteadOfNumber ? (\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';\nimport { getFullBrandName } from '../../../../Card/components/CardInput/utils';\n\nexport interface PaymentMethodItemProps {\n    paymentMethod: UIElement;\n    isSelected?: 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<Readonly<PaymentMethodItemProps>> {\n    public static readonly 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, 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: getFullBrandName(paymentMethod.props.brand) })}\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                            showOtherInsteadOfNumber={paymentMethod.props.showOtherInsteadOfNumber}\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} isSelected={isSelected} />\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    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    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            >\n                {paymentMethods.map((paymentMethod, index, paymentMethodsCollection) => {\n                    const isSelected = activePaymentMethod && activePaymentMethod._id === paymentMethod._id;\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                            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 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}: Readonly<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 && 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 { h } from 'preact';\nimport { useAmount } from '../../../core/Context/AmountProvider';\nimport Status from './status';\n\ninterface Props {\n    message?: string;\n}\n\nconst DropinSuccessState = ({ message }: Readonly<Props>) => {\n    const { amount } = useAmount();\n    return <Status.Success message={amount?.value === 0 ? 'resultMessages.preauthorized' : message} />;\n};\n\nexport { DropinSuccessState };\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 type { PaymentAmount } from '../../../types/global-types';\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, InfoEventType, UiTarget } from '../../../core/Analytics/events/AnalyticsInfoEvent';\nimport { DropinSuccessState } from './DropinSuccessState';\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                this.setStatus('ready');\n\n                this.props.onElementsCreated([...instantPaymentElements, ...storedPaymentElements, ...elements, ...fastlanePaymentElement]);\n            }\n        );\n\n        this.onOrderCancel = this.getOnOrderCancel();\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        if ((activePaymentMethod && activePaymentMethod._id !== paymentMethod._id) || !activePaymentMethod) {\n            this.props.onSelect?.(paymentMethod);\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: InfoEventType.clicked,\n            target: UiTarget.otherPaymentMethodButton,\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            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 <DropinSuccessState message={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                                    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                                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 } from '../../../core/ProcessResponse/PaymentMethods/PaymentMethods';\nimport type { 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.donation]: 'Donation',\n    [TxVariants.personal_details]: 'PersonalDetails',\n    /** internal */\n\n    /** Bank Transfer */\n    [TxVariants.bankTransfer_IBAN]: 'BankTransfer',\n    [TxVariants.bankTransfer_BE]: 'BankTransfer',\n    [TxVariants.bankTransfer_NL]: 'BankTransfer',\n    [TxVariants.bankTransfer_PL]: 'BankTransfer',\n    [TxVariants.bankTransfer_FR]: 'BankTransfer',\n    [TxVariants.bankTransfer_CH]: 'BankTransfer',\n    [TxVariants.bankTransfer_IE]: 'BankTransfer',\n    [TxVariants.bankTransfer_GB]: 'BankTransfer',\n    [TxVariants.bankTransfer_DE]: 'BankTransfer',\n    /** Bank Transfer */\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.iris]: 'Iris',\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_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';\n\nimport type { PaymentMethodsConfiguration } from '../types';\nimport type { ICore } from '../../../core/types';\nimport type { PaymentMethod, StoredPaymentMethod } from '../../../core/ProcessResponse/PaymentMethods/PaymentMethods';\n\nfunction isStoredPaymentMethod(paymentMethod: PaymentMethod | StoredPaymentMethod): paymentMethod is StoredPaymentMethod {\n    return 'isStoredPaymentMethod' in paymentMethod && paymentMethod.isStoredPaymentMethod === true;\n}\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 dropinProps - 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    dropinProps,\n    core: ICore\n): Promise<UIElement[]> => {\n    const elements = optionallyFilterUpiSubTxVariants(paymentMethods)\n        .filter(filterUnsupportedPaymentMethod)\n        .map(paymentMethod => {\n            const paymentMethodConfigFromDropin = getComponentConfiguration(\n                paymentMethod.type,\n                paymentMethodsConfiguration,\n                isStoredPaymentMethod(paymentMethod)\n            );\n\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 requiredPropsWhenUsingDropin = {\n                ...(isStoredPaymentMethod(paymentMethod)\n                    ? { storedPaymentMethodId: paymentMethod.storedPaymentMethodId }\n                    : { paymentMethodId: paymentMethod._id }),\n                ...dropinProps\n            };\n\n            const elementProps = {\n                ...requiredPropsWhenUsingDropin,\n                ...paymentMethodConfigFromDropin\n            };\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 { RawStoredPaymentMethod } 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 dropinProps - High level props to be passed through to every component\n * @param core - Reference to the checkout core object\n */\nconst createStoredElements = (\n    paymentMethods: RawStoredPaymentMethod[] = [],\n    paymentMethodsConfiguration: PaymentMethodsConfiguration,\n    dropinProps,\n    core: ICore\n): Promise<UIElement[]> => createElements(paymentMethods, paymentMethodsConfiguration, { ...dropinProps, oneClick: true }, core);\n\nexport default createStoredElements;\n","import UIElement from '../../internal/UIElement';\nimport createElements from './createElements';\nimport type { ICore } from '../../../core/types';\nimport type { PaymentMethodsConfiguration } from '../types';\nimport type { PaymentMethod } from '../../../core/ProcessResponse/PaymentMethods/PaymentMethods';\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 dropinProps - 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    dropinProps,\n    core: ICore\n): Promise<UIElement[]> => {\n    if (instantPaymentMethods.length) {\n        return createElements(instantPaymentMethods, paymentMethodsConfiguration, { ...dropinProps, isInstantPayment: true }, core);\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 { createElements, createStoredElements } from './elements';\nimport createInstantPaymentElements from './elements/createInstantPaymentElements';\nimport { hasOwnProperty } from '../../utils/hasOwnProperty';\nimport splitPaymentMethods from './elements/splitPaymentMethods';\nimport { TxVariants } from '../tx-variants';\n\nimport type { DropinConfiguration, InstantPaymentTypes, PaymentMethodsConfiguration } from './types';\nimport type { PaymentAction, PaymentAmount, 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 readonly type = TxVariants.dropin;\n\n    protected static readonly 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    /**\n     * Reference to all payment method elements being rendered by Drop-in\n     */\n    public paymentMethodElements: 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        this.handleElementsCreated = this.handleElementsCreated.bind(this);\n\n        this.props.paymentMethodComponents.forEach(PaymentMethod => this.core.register(PaymentMethod));\n        this.paymentMethodsConfiguration = this.props.paymentMethodsConfiguration || {};\n    }\n\n    protected override reportIntegrationFlavor(): void {\n        void this.analytics.sendFlavor('dropin');\n    }\n\n    protected override storeElementRefOnCore() {\n        this.core.storeElementReference(this);\n    }\n\n    formatProps(props) {\n        return {\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     * Updates the amount in the props and propagates it to the AmountProvider. That way the children components can use the updated amount.\n     *\n     * This method **overrides** the parent one to specifically propagate the changes to all payment method elements.\n     *\n     * @param amount - Primary payment amount object\n     * @param secondaryAmount - Optional secondary amount for display purposes (e.g., converted currency)\n     * @internal\n     */\n    public override updateAmount(amount: PaymentAmount, secondaryAmount?: PaymentAmount): void {\n        this.props = {\n            ...this.props,\n            ...(amount && { amount }),\n            ...(secondaryAmount && { secondaryAmount })\n        };\n\n        this.amountProviderRef.current?.update(amount, secondaryAmount);\n\n        this.paymentMethodElements.forEach(element => {\n            element.updateAmount(amount, secondaryAmount);\n        });\n    }\n\n    /**\n     * Assign all elements created in the Component to the paymentMethodElements property\n     * @param elements\n     */\n    private handleElementsCreated(elements: UIElement[]) {\n        if (!elements || elements.length === 0) this.paymentMethodElements = [];\n        this.paymentMethodElements = elements;\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 dropinProps = {\n            elementRef: this.elementRef,\n            isDropin: true\n        };\n\n        const elements = showPaymentMethods ? createElements(paymentMethods, paymentMethodsConfiguration, dropinProps, this.core) : [];\n        const instantPaymentElements = createInstantPaymentElements(instantPaymentMethods, paymentMethodsConfiguration, dropinProps, this.core);\n        const storedElements = showStoredPaymentMethods\n            ? createStoredElements(\n                  this.props.filterStoredPaymentMethods?.(storedPaymentMethods) ?? storedPaymentMethods,\n                  paymentMethodsConfiguration,\n                  dropinProps,\n                  this.core\n              )\n            : [];\n        const fastlanePaymentElement = fastlanePaymentMethod\n            ? createElements([fastlanePaymentMethod], paymentMethodsConfiguration, dropinProps, 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            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    protected override componentToRender(): h.JSX.Element {\n        return (\n            <DropinComponent\n                {...this.props}\n                core={this.core}\n                elementRef={this.elementRef}\n                onCreateElements={this.handleCreate}\n                onElementsCreated={this.handleElementsCreated}\n                ref={dropinRef => {\n                    this.dropinRef = dropinRef;\n                }}\n            />\n        );\n    }\n}\n\nexport default DropinElement;\n","import PaymentMethods from '../../../core/ProcessResponse/PaymentMethods';\nimport type { InstantPaymentTypes } from '../types';\nimport type { PaymentMethod, StoredPaymentMethod } from '../../../core/ProcessResponse/PaymentMethods/PaymentMethods';\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","import { Fragment, h } from 'preact';\nimport UIElement from '../internal/UIElement/UIElement';\nimport PersonalDetails from '../internal/PersonalDetails';\nimport { TxVariants } from '../tx-variants';\nimport FormInstruction from '../internal/FormInstruction';\nimport { UIElementProps } from '../internal/UIElement/types';\nimport { AnalyticsInfoEvent, InfoEventType } from '../../core/Analytics/events/AnalyticsInfoEvent';\n\ninterface PersonalDetailsConfiguration extends UIElementProps {}\n\nexport class PersonalDetailsElement extends UIElement<PersonalDetailsConfiguration> {\n    public static readonly type = TxVariants.personal_details;\n\n    protected override beforeRender(configSetByMerchant?: PersonalDetailsConfiguration): void {\n        const event = new AnalyticsInfoEvent({\n            type: InfoEventType.rendered,\n            component: this.type,\n            configData: configSetByMerchant\n        });\n\n        this.analytics.sendAnalytics(event);\n    }\n\n    get data() {\n        return this.state.data;\n    }\n\n    get isValid() {\n        return !!this.state.isValid;\n    }\n\n    protected override componentToRender(): h.JSX.Element {\n        return (\n            <Fragment>\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            </Fragment>\n        );\n    }\n}\n\nexport default PersonalDetailsElement;\n","class NonPersistentStorage {\n    private storage: Record<string, string>;\n\n    constructor() {\n        this.storage = {};\n    }\n\n    public get length(): number {\n        return Object.keys(this.storage).length;\n    }\n\n    public key(index: number): string | null {\n        return Object.keys(this.storage)[index] ?? null;\n    }\n\n    public getItem(keyName: string): string | null {\n        return this.storage[keyName] || null;\n    }\n\n    public setItem(keyName: string, keyValue: string): void {\n        this.storage[keyName] = keyValue;\n    }\n\n    public removeItem(keyName: string): void {\n        delete this.storage[keyName];\n    }\n\n    public clear(): void {\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 | null {\n        try {\n            const item = this.storage.getItem(this.key);\n            return item ? JSON.parse(item) : null;\n        } catch (err) {\n            return null;\n        }\n    }\n\n    public set(value: T): void {\n        this.storage.setItem(this.key, JSON.stringify(value));\n    }\n\n    public remove(): void {\n        this.storage.removeItem(this.key);\n    }\n\n    public clear(): void {\n        this.storage.clear();\n    }\n\n    public keyByIndex(index: number): string | null {\n        return this.storage.key(index);\n    }\n\n    public get length(): number {\n        return this.storage.length;\n    }\n}\n\nexport default Storage;\n","import { debounce, DEFAULT_DEBOUNCE_TIME_MS } from '../../utils/debounce';\nimport { processAnalyticsData } from './utils';\nimport { AbstractAnalyticsEvent, AnalyticsEventCategory } from './events/AbstractAnalyticsEvent';\nimport Storage from '../../utils/Storage';\nimport { LIBRARY_BUNDLE_TYPE, LIBRARY_VERSION } from '../config';\nimport { AnalyticsEventQueue } from './AnalyticsEventQueue';\nimport type { AnalyticsOptions } from './types';\nimport type { AnalyticsEventPayload, IAnalyticsService, RequestAttemptIdPayload } from './AnalyticsService';\n\nexport interface AnalyticsProps {\n    service: IAnalyticsService;\n    eventQueue: AnalyticsEventQueue;\n    enabled?: boolean;\n    analyticsData?: AnalyticsOptions['analyticsData'];\n}\n\nexport interface IAnalytics {\n    checkoutAttemptId?: string;\n    setUp({ sessionId, checkoutStage, locale }: { sessionId?: string; checkoutStage?: 'precheckout' | 'checkout'; locale?: string }): Promise<void>;\n    sendFlavor(flavor: 'dropin' | 'components'): Promise<void>;\n    sendAnalytics(event: AbstractAnalyticsEvent): void;\n    flush(): void;\n}\n\nexport interface CheckoutAttemptIdSessionStorage {\n    id: string;\n    timestamp: number;\n}\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 isSessionCreatedUnderFifteenMinutes(session: CheckoutAttemptIdSessionStorage | null): boolean {\n    const FIFTEEN_MINUTES_IN_MS = 15 * 60 * 1000;\n    if (!session?.timestamp) return false;\n    const fifteenMinutesAgo = Date.now() - FIFTEEN_MINUTES_IN_MS;\n    return session.timestamp > fifteenMinutesAgo;\n}\n\nconst ANALYTICS_INFO_DEBOUNCE_DELAY = process.env.NODE_ENV === 'development' ? 5_000 : 10_000;\nconst ANALYTICS_ERROR_AND_LOGS_DEBOUNCE_DELAY = DEFAULT_DEBOUNCE_TIME_MS;\n\nclass Analytics implements IAnalytics {\n    private readonly analyticsData?: AnalyticsOptions['analyticsData'];\n    private readonly service: IAnalyticsService;\n    private readonly eventsQueue: AnalyticsEventQueue;\n    private readonly storage = new Storage<CheckoutAttemptIdSessionStorage>('checkout-attempt-id', 'sessionStorage');\n    private readonly debouncedSendInfoEvents: () => void;\n    private readonly debouncedSendEvents: () => void;\n\n    private enabled: boolean = true;\n    private capturedCheckoutAttemptId?: string;\n    private isFlavorReported = false;\n\n    constructor({ service, eventQueue, enabled, analyticsData }: AnalyticsProps) {\n        this.service = service;\n        this.eventsQueue = eventQueue;\n\n        this.debouncedSendInfoEvents = debounce(this.sendEvents.bind(this), ANALYTICS_INFO_DEBOUNCE_DELAY);\n        this.debouncedSendEvents = debounce(this.sendEvents.bind(this), ANALYTICS_ERROR_AND_LOGS_DEBOUNCE_DELAY);\n\n        if (enabled !== undefined) this.enabled = enabled;\n        if (analyticsData) this.analyticsData = analyticsData;\n    }\n\n    public get checkoutAttemptId(): string {\n        return this.capturedCheckoutAttemptId;\n    }\n\n    public async setUp({\n        sessionId,\n        checkoutStage,\n        locale\n    }: { sessionId?: string; locale?: string; checkoutStage?: 'precheckout' | 'checkout' } = {}): Promise<void> {\n        try {\n            const checkoutAttemptIdSession = this.storage.get();\n            const isSessionReusable = isSessionCreatedUnderFifteenMinutes(checkoutAttemptIdSession);\n\n            const { applicationInfo, checkoutAttemptId: checkoutAttemptIdFromPayByLink } = processAnalyticsData(this.analyticsData);\n\n            const availableCheckoutAttemptId: string | undefined = isSessionReusable ? checkoutAttemptIdSession.id : checkoutAttemptIdFromPayByLink;\n\n            const payload: RequestAttemptIdPayload = {\n                version: LIBRARY_VERSION,\n                buildType: LIBRARY_BUNDLE_TYPE,\n                channel: 'Web',\n                platform: 'Web',\n                locale,\n                referrer: window.location.href,\n                screenWidth: window.screen.width,\n                checkoutStage: checkoutStage || 'checkout',\n                level: this.enabled ? 'all' : 'initial',\n                ...(applicationInfo && { applicationInfo }),\n                ...(sessionId && { sessionId }),\n                ...(availableCheckoutAttemptId && { checkoutAttemptId: availableCheckoutAttemptId })\n            };\n\n            this.capturedCheckoutAttemptId = await this.service.requestCheckoutAttemptId(payload);\n\n            this.storage.set({\n                id: this.capturedCheckoutAttemptId,\n                timestamp: isSessionReusable ? checkoutAttemptIdSession.timestamp : Date.now()\n            });\n        } catch (error: unknown) {\n            this.enabled = false;\n            console.warn('Analytics: Error setting up', error);\n        }\n    }\n\n    public sendAnalytics(event: AbstractAnalyticsEvent): void {\n        if (!this.enabled) {\n            return;\n        }\n\n        try {\n            this.addEventToQueue(event);\n        } catch (error: unknown) {\n            console.warn('Analytics: Error adding event to queue', error);\n        }\n    }\n\n    public async sendFlavor(flavor: 'dropin' | 'components'): Promise<void> {\n        if (!this.capturedCheckoutAttemptId) return;\n        if (this.isFlavorReported) return;\n\n        this.isFlavorReported = true;\n\n        try {\n            await this.service.reportIntegrationFlavor(flavor, this.capturedCheckoutAttemptId);\n        } catch (error) {\n            console.warn('Analytics: Error reporting flavor', error);\n        }\n    }\n\n    public flush(): void {\n        void this.sendEvents();\n    }\n\n    /**\n     * Info events don't have high priority, therefore  we add a delay in order to dispatch a batch of events\n     * Log/Error events are sent almost immediately. There is a debounce mechanism in place but the delay is very minimal\n     *\n     * @param event\n     * @private\n     */\n    private addEventToQueue(event: AbstractAnalyticsEvent): void {\n        this.eventsQueue.add(event);\n\n        if (event.getEventCategory() === AnalyticsEventCategory.info) {\n            this.debouncedSendInfoEvents();\n        } else {\n            this.debouncedSendEvents();\n        }\n    }\n\n    private async sendEvents(): Promise<void> {\n        if (!this.capturedCheckoutAttemptId || !this.enabled) {\n            return;\n        }\n\n        const payload: AnalyticsEventPayload = {\n            channel: 'Web',\n            platform: 'Web',\n            info: this.eventsQueue.infoEvents,\n            errors: this.eventsQueue.errorEvents,\n            logs: this.eventsQueue.logEvents\n        };\n\n        this.eventsQueue.clear();\n\n        try {\n            await this.service.sendEvents(payload, this.capturedCheckoutAttemptId);\n        } catch (error) {\n            console.warn('Analytics: Error sending events', error);\n        }\n    }\n}\n\nexport default Analytics;\n","import { AbstractAnalyticsEvent, AnalyticsEventCategory } from './events/AbstractAnalyticsEvent';\n\nclass AnalyticsEventQueue {\n    private info: AbstractAnalyticsEvent[] = [];\n    private errors: AbstractAnalyticsEvent[] = [];\n    private logs: AbstractAnalyticsEvent[] = [];\n\n    public add(event: AbstractAnalyticsEvent) {\n        const category = event.getEventCategory();\n\n        if (category === AnalyticsEventCategory.info) this.info.push(event);\n        if (category === AnalyticsEventCategory.error) this.errors.push(event);\n        if (category === AnalyticsEventCategory.log) this.logs.push(event);\n    }\n\n    public get infoEvents(): AbstractAnalyticsEvent[] {\n        return this.info;\n    }\n\n    public get errorEvents(): AbstractAnalyticsEvent[] {\n        return this.errors;\n    }\n\n    public get logEvents(): AbstractAnalyticsEvent[] {\n        return this.logs;\n    }\n\n    public clear(): void {\n        this.info = [];\n        this.errors = [];\n        this.logs = [];\n    }\n}\n\nexport { AnalyticsEventQueue };\n","import AdyenCheckoutError from '../Errors/AdyenCheckoutError';\nimport { AbstractAnalyticsEvent } from './events/AbstractAnalyticsEvent';\nimport { HttpOptions, httpPost } from '../Services/http';\nimport type { ApplicationInfo } from './types';\n\nexport interface IAnalyticsService {\n    requestCheckoutAttemptId(payload: RequestAttemptIdPayload): Promise<string>;\n    sendEvents(payload: AnalyticsEventPayload, checkoutAttemptId: string): Promise<void>;\n    reportIntegrationFlavor(flavor: 'dropin' | 'components', checkoutAttemptId: string): Promise<void>;\n}\n\nexport interface RequestAttemptIdPayload {\n    version: string;\n    channel: 'Web';\n    platform: 'Web';\n    locale: string;\n    checkoutStage: 'precheckout' | 'checkout';\n    referrer: string;\n    screenWidth: number;\n    buildType: string;\n    level: 'initial' | 'all';\n    sessionId?: string;\n    checkoutAttemptId?: string;\n    applicationInfo?: ApplicationInfo;\n}\n\nexport interface AnalyticsEventPayload {\n    channel: 'Web';\n    platform: 'Web';\n    info: Array<AbstractAnalyticsEvent>;\n    errors: Array<AbstractAnalyticsEvent>;\n    logs: Array<AbstractAnalyticsEvent>;\n}\n\nexport interface AnalyticsFlavorPayload {\n    flavor: 'dropin' | 'components';\n    checkoutAttemptId: string;\n}\n\nconst ANALYTICS_PATH = 'v3/analytics';\n\nclass AnalyticsService implements IAnalyticsService {\n    private readonly clientKey: string;\n    private readonly analyticsContext: string;\n\n    constructor({ clientKey, analyticsContext }: { clientKey: string; analyticsContext: string }) {\n        this.clientKey = clientKey;\n        this.analyticsContext = analyticsContext;\n    }\n\n    public async requestCheckoutAttemptId(payload: RequestAttemptIdPayload) {\n        const httpOptions: HttpOptions = {\n            loadingContext: this.analyticsContext,\n            path: `${ANALYTICS_PATH}?clientKey=${this.clientKey}`\n        };\n\n        try {\n            const { checkoutAttemptId } = await httpPost<{ checkoutAttemptId: string }>(httpOptions, payload);\n            return checkoutAttemptId;\n        } catch (error: unknown) {\n            throw new AdyenCheckoutError('NETWORK_ERROR', 'requestCheckoutAttemptId() - failed to get checkout attempt ID', { cause: error });\n        }\n    }\n\n    public async sendEvents(payload: AnalyticsEventPayload, checkoutAttemptId: string): Promise<void> {\n        if (!checkoutAttemptId) {\n            throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'sendEvents() - checkoutAttemptId is required');\n        }\n\n        // No events to be sent\n        if (!payload.info.length && !payload.errors.length && !payload.logs.length) {\n            return Promise.resolve();\n        }\n\n        const httpOptions: HttpOptions = {\n            loadingContext: this.analyticsContext,\n            path: `${ANALYTICS_PATH}/${checkoutAttemptId}?clientKey=${this.clientKey}`\n        };\n\n        try {\n            await httpPost(httpOptions, payload);\n        } catch (error: unknown) {\n            throw new AdyenCheckoutError('NETWORK_ERROR', 'sendEvents() - failed to send events', { cause: error });\n        }\n    }\n\n    public async reportIntegrationFlavor(flavor: 'dropin' | 'components', checkoutAttemptId: string): Promise<void> {\n        if (!flavor || !checkoutAttemptId) {\n            throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'reportIntegrationFlavor() - flavor or checkoutAttemptId is required');\n        }\n\n        const httpOptions: HttpOptions = {\n            loadingContext: this.analyticsContext,\n            path: `${ANALYTICS_PATH}?clientKey=${this.clientKey}`\n        };\n\n        const payload: AnalyticsFlavorPayload = {\n            flavor,\n            checkoutAttemptId\n        };\n\n        try {\n            await httpPost(httpOptions, payload);\n        } catch (error: unknown) {\n            throw new AdyenCheckoutError('NETWORK_ERROR', 'reportIntegrationFlavor() - failed to send flavor', { cause: error });\n        }\n    }\n}\n\nexport { AnalyticsService };\n","import { resolveEnvironments } from '../../core/Environment';\nimport type { FastlaneTokenData } from './services/request-fastlane-token';\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 {\n    FastlaneAuthenticatedCustomerResult,\n    FastlaneConsentRenderState,\n    FastlanePaymentMethodConfiguration,\n    FastlaneSDKConfiguration,\n    FastlaneShippingAddressSelectorResult,\n    FastlaneSignupConfiguration,\n    FastlaneWindowInstance\n} from './types';\n\nimport Analytics from '../../core/Analytics';\nimport { AnalyticsInfoEvent, InfoEventType } from '../../core/Analytics/events/AnalyticsInfoEvent';\nimport type { IAnalytics } from '../../core/Analytics/Analytics';\nimport { AnalyticsEventQueue } from '../../core/Analytics/AnalyticsEventQueue';\nimport { AnalyticsService } from '../../core/Analytics/AnalyticsService';\n\nclass FastlaneSDK {\n    private readonly clientKey: string;\n    private readonly checkoutShopperURL: string;\n    private readonly fastlaneLocale: string;\n    private readonly forceConsentDetails: boolean;\n\n    private readonly analytics: IAnalytics;\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, analyticsUrl } = resolveEnvironments(configuration.environment);\n\n        this.checkoutShopperURL = apiUrl;\n        this.clientKey = configuration.clientKey;\n        this.forceConsentDetails = configuration.forceConsentDetails || false;\n        this.fastlaneLocale = convertAdyenLocaleToFastlaneLocale(configuration.locale || 'en-US');\n\n        this.analytics = new Analytics({\n            eventQueue: new AnalyticsEventQueue(),\n            service: new AnalyticsService({\n                analyticsContext: analyticsUrl,\n                clientKey: this.clientKey\n            }),\n            enabled: configuration.analytics?.enabled\n        });\n\n        document.addEventListener('visibilitychange', this.handlePageVisibilityChanges);\n    }\n\n    /**\n     * Initializes the Fastlane SDK\n     */\n    public async initialize(): Promise<FastlaneSDK> {\n        void this.analytics.setUp({\n            checkoutStage: 'precheckout'\n        });\n\n        const tokenData = await this.requestClientToken();\n        await this.fetchSdk(tokenData.value, tokenData.clientId);\n        await this.initializeFastlaneInstance();\n        this.trackEvent(InfoEventType.Initialized);\n        return this;\n    }\n\n    public destroy(): void {\n        document.removeEventListener('visibilitychange', this.handlePageVisibilityChanges);\n        this.analytics.flush();\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        this.trackEvent(InfoEventType.LookupStarted);\n\n        try {\n            const { customerContextId } = await this.fastlaneSdk.identity.lookupCustomerByEmail(email);\n\n            if (customerContextId) {\n                this.latestShopperDetails = { email, customerId: customerContextId };\n                this.trackEvent(InfoEventType.OtpStarted);\n\n                const authResult = await this.fastlaneSdk.identity.triggerAuthenticationFlow(customerContextId);\n                this.trackEvent(this.getOtpAnalyticsSubtype(authResult.authenticationState));\n\n                return authResult;\n            }\n\n            this.trackEvent(InfoEventType.LookupUserNotFound);\n            return {\n                authenticationState: 'not_found',\n                profileData: undefined\n            };\n        } catch (error: unknown) {\n            throw new AdyenCheckoutError('ERROR', 'Fastlane SDK: An error occurred during the authentication flow.', { cause: error });\n        }\n    }\n\n    /**\n     * Creates the 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        this.analytics.flush();\n\n        const isAuthSuccess = authResult.authenticationState === 'succeeded';\n        const hasCardData = !!authResult.profileData?.card;\n        const hasShopperDetails = !!this.latestShopperDetails?.email;\n\n        if (isAuthSuccess && hasCardData && hasShopperDetails) {\n            return this.createFastlaneComponentConfiguration(authResult);\n        }\n\n        return this.createCardComponentConfiguration();\n    }\n\n    /**\n     * Displays the Fastlane Shipping Address selector UI\n     */\n    public async showShippingAddressSelector(): Promise<FastlaneShippingAddressSelectorResult> {\n        if (!this.fastlaneSdk) {\n            throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'showShippingAddressSelector(): Fastlane SDK is not initialized');\n        }\n\n        this.trackEvent(InfoEventType.AddressSelectorClicked);\n\n        try {\n            const addressSelectorResult = await this.fastlaneSdk.profile.showShippingAddressSelector();\n            if (addressSelectorResult.selectionChanged) {\n                this.trackEvent(InfoEventType.AddressChanged);\n            }\n            this.trackEvent(InfoEventType.AddressSelectorClosed);\n\n            return addressSelectorResult;\n        } catch (error: unknown) {\n            throw new AdyenCheckoutError('ERROR', 'Fastlane SDK: An error occurred when showing the shipping address selector', { cause: error });\n        }\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        if (!this.fastlaneSdk) {\n            throw new AdyenCheckoutError('IMPLEMENTATION_ERROR', 'mountWatermark(): Fastlane SDK is not initialized');\n        }\n\n        try {\n            const component = await this.fastlaneSdk.FastlaneWatermarkComponent(options);\n            component.render(container);\n        } catch (error: unknown) {\n            throw new AdyenCheckoutError('ERROR', 'Fastlane SDK: An error occurred when rendering the watermark', { cause: error });\n        }\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 sdkUrl = new URL('https://www.paypal.com/sdk/js');\n        sdkUrl.searchParams.set('client-id', clientId);\n        sdkUrl.searchParams.set('components', 'buttons,fastlane');\n\n        const script = new Script({\n            src: sdkUrl.href,\n            component: 'fastlane',\n            dataAttributes: { sdkClientToken: clientToken },\n            analytics: this.analytics\n        });\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.fastlaneLocale);\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    /**\n     * Creates the configuration for the Fastlane component\n     *\n     * @param authResult\n     * @private\n     */\n    private createFastlaneComponentConfiguration(authResult: FastlaneAuthenticatedCustomerResult): FastlanePaymentMethodConfiguration {\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    }\n\n    /**\n     * Creates the configuration for the Card component, including Fastlane sign-up details if available\n     *\n     * @private\n     */\n    private async createCardComponentConfiguration(): Promise<FastlanePaymentMethodConfiguration> {\n        const consentDetails = await this.fetchConsentDetails();\n        const configuration: { fastlaneConfiguration?: FastlaneSignupConfiguration } = {};\n\n        if (consentDetails) {\n            configuration.fastlaneConfiguration = {\n                fastlaneSessionId: this.fastlaneSessionId,\n                ...consentDetails\n            };\n        }\n\n        return {\n            paymentType: 'card',\n            configuration\n        };\n    }\n\n    private trackEvent(eventType: InfoEventType): void {\n        const event = new AnalyticsInfoEvent({ type: eventType, component: 'fastlane' });\n        this.analytics.sendAnalytics(event);\n    }\n\n    private handlePageVisibilityChanges = (): void => {\n        if (document.visibilityState === 'hidden') {\n            this.analytics.flush();\n        }\n    };\n\n    /**\n     * Returns the Info event subtype based on the 'authenticationState'\n     * @param authenticationState\n     * @private\n     */\n    private getOtpAnalyticsSubtype(authenticationState: FastlaneAuthenticatedCustomerResult['authenticationState']) {\n        switch (authenticationState) {\n            case 'succeeded':\n                return InfoEventType.OtpSucceeded;\n            case 'canceled':\n                return InfoEventType.OtpCanceled;\n            case 'failed':\n                return InfoEventType.OtpFailed;\n            case 'not_found':\n                return InfoEventType.LookupUserNotFound;\n            default:\n                return InfoEventType.OtpFailed;\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 Intl.DateTimeFormatOptions}\n     */\n    public date(date: string, options: Intl.DateTimeFormatOptions = {}) {\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 readonly 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 readonly type = 'risk';\n    public static readonly 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 { RawPaymentMethod, PaymentMethodsResponse, RawStoredPaymentMethod } from '../../../types/global-types';\nimport {\n    filterAllowedPaymentMethods,\n    filterEcomStoredPaymentMethods,\n    filterRemovedPaymentMethods,\n    filterSupportedStoredPaymentMethods\n} from './filters';\nimport uuidv4 from '../../../utils/uuid';\nimport type { PaymentMethod, StoredPaymentMethod } from './PaymentMethods';\n\n/**\n * Finds the fundingSource for a stored payment method by matching its brand\n * against the available payment methods.\n */\nfunction getFundingSourceForStoredCard(\n    storedPaymentMethod: RawStoredPaymentMethod,\n    paymentMethods: RawPaymentMethod[]\n): RawPaymentMethod['fundingSource'] {\n    if (storedPaymentMethod.type !== 'scheme') {\n        return undefined;\n    }\n\n    const storedBrand = storedPaymentMethod.brand;\n    if (!storedBrand) {\n        return undefined;\n    }\n\n    const matchingPaymentMethod = paymentMethods.find(pm => pm.type === 'scheme' && pm.brands?.includes(storedBrand));\n\n    return matchingPaymentMethod?.fundingSource;\n}\n\nconst processStoredPaymentMethod = (storedPM: RawStoredPaymentMethod, paymentMethods: RawPaymentMethod[]): StoredPaymentMethod => {\n    const fundingSource = getFundingSourceForStoredCard(storedPM, paymentMethods);\n    return {\n        ...storedPM,\n        storedPaymentMethodId: storedPM.id,\n        isStoredPaymentMethod: true,\n        ...(fundingSource && { fundingSource })\n    };\n};\n\n/**\n * Generate unique ID per payment method. Useful to fetch the correct payment method properties from the response\n * @param paymentMethod\n */\nfunction generatePaymentMethodId(paymentMethod: RawPaymentMethod): PaymentMethod {\n    return {\n        ...paymentMethod,\n        _id: uuidv4()\n    };\n}\n\nexport const processPaymentMethods = (\n    paymentMethods: RawPaymentMethod[],\n    { allowPaymentMethods = [], removePaymentMethods = [] }\n): PaymentMethod[] => {\n    if (!paymentMethods) return [];\n\n    return paymentMethods\n        .filter(filterAllowedPaymentMethods, allowPaymentMethods)\n        .filter(filterRemovedPaymentMethods, removePaymentMethods)\n        .map(generatePaymentMethodId);\n};\n\nexport const processStoredPaymentMethods = (\n    storedPaymentMethods: RawStoredPaymentMethod[],\n    { allowPaymentMethods = [], removePaymentMethods = [] },\n    paymentMethods: RawPaymentMethod[] = []\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(storedPM => processStoredPaymentMethod(storedPM, paymentMethods));\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 { RawPaymentMethod, PaymentMethodsResponse, RawStoredPaymentMethod } from '../../../types/global-types';\nimport { checkPaymentMethodsResponse, processPaymentMethods, processStoredPaymentMethods } from './utils';\n\nexport type PaymentMethod = RawPaymentMethod & {\n    /**\n     * Internal ID generated when parsing the payment method list\n     */\n    _id: string;\n};\n\nexport type StoredPaymentMethod = RawStoredPaymentMethod & {\n    /**\n     * A unique identifier of this stored payment method. Mapped from 'storedPaymentMethod.id'\n     * @internal\n     */\n    storedPaymentMethodId?: string;\n    /**\n     * Internal flag\n     * @internal\n     */\n    isStoredPaymentMethod?: boolean;\n};\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\n            ? processStoredPaymentMethods(response.storedPaymentMethods, options, response.paymentMethods || [])\n            : [];\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    /**\n     * Finds a payment method matching both type and funding source.\n     * Used when `splitCardFundingSources` is enabled, which results in multiple payment methods\n     * of the same type but with different fundingSource values (e.g. credit, debit, prepaid).\n     * Falls back to the first match by type if no funding source match is found.\n     */\n    findByFundingSource(paymentMethod: string, fundingSource: string): PaymentMethod {\n        const mappedType = this.mapCreatedComponentType(paymentMethod);\n        return this.paymentMethods.find(pm => pm.type === mappedType && pm.fundingSource === fundingSource);\n    }\n\n    findById(paymentMethodId: string): PaymentMethod {\n        return this.paymentMethods.find(pm => pm._id === paymentMethodId);\n    }\n\n    findStoredPaymentMethod(storedPaymentMethodId: string): StoredPaymentMethod {\n        return this.storedPaymentMethods.find(pm => pm.id === storedPaymentMethodId);\n    }\n}\n\nexport default PaymentMethods;\n","import { get3DS2FlowProps } from '../../../components/ThreeDS2/components/utils';\nimport uuid from '../../../utils/uuid';\nimport type { StatusFromAction, ThreeDS2ActionProps, UIElement, UIElementProps } from '../../../types';\nimport type { PaymentAction } from '../../../types/global-types';\nimport type { IRegistry } from '../../core.registry';\nimport type { ICore } from '../../types';\nimport type { ThreeDS2ConfigProps } from '../../../types';\nimport type { ActionHandlerConfig } from './types';\n\nconst createComponent = (core: ICore, registry: IRegistry, componentType: string, props: ActionHandlerConfig | ThreeDS2ConfigProps): 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    const element = new Element(core, { ...props, id: `${componentType}-${uuid()}` });\n    return element;\n};\n\nconst getActionHandler = (statusType: StatusFromAction) => {\n    return (core: ICore, registry: IRegistry, action: PaymentAction, props: UIElementProps): UIElement => {\n        const config: ActionHandlerConfig = {\n            ...props,\n            ...action,\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: UIElementProps): UIElement => {\n        const config: ActionHandlerConfig = {\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: ThreeDS2ActionProps): UIElement => {\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: ThreeDS2ConfigProps = {\n            // Props common to both flows\n            core,\n            token: action.token,\n            paymentData,\n            onActionHandled: props.onActionHandled,\n            onComplete: props.onComplete, // NOTE: We only ever expect props.onComplete to be defined for the MDFlow\n            onAdditionalDetails: props.onAdditionalDetails, // Needed to prevent regression in v6.24.0 re. supporting onAdditionalDetails being directly set on Card component (in v7 we will *not* allow this, & this line can be removed)\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","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 storage: Storage<CheckoutSession>;\n\n    public readonly session: 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 }: Readonly<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 { AriaAttributes, SRPanelProps } from './types';\nimport BaseElement from '../../components/internal/BaseElement/BaseElement';\nimport { SRMessages, SRMessagesRef } from './SRMessages';\nimport type { ICore } from '../types';\nimport './SRPanel.scss';\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 readonly type = 'srPanel';\n\n    public static readonly 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        if (!this.props.enabled) return;\n\n        const firstPanel = document.querySelector('[class^=\"adyen-checkout-sr-panel\"]');\n\n        if (!firstPanel) {\n            console.error('SRPanel: Failed to set aria props because no panel was found');\n            return;\n        }\n\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 { 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';\nimport { LIBRARY_BUNDLE_TYPE, LIBRARY_VERSION } from './config';\n\nimport type { PaymentAction, PaymentAmount, PaymentResponseData } from '../types/global-types';\nimport type { CoreConfiguration, ICore, AdditionalDetailsData, CoreModules } from './types';\nimport type { Translations } from '../language/types';\nimport type { UIElementProps } from '../components/internal/UIElement/types';\nimport { AnalyticsLogEvent, LogEventType } from './Analytics/events/AnalyticsLogEvent';\nimport CancelError from './Errors/CancelError';\nimport { AnalyticsService } from './Analytics/AnalyticsService';\nimport { AnalyticsEventQueue } from './Analytics/AnalyticsEventQueue';\nimport { isAmountValid } from '../utils/amount-util';\n\nclass Core implements ICore {\n    public session?: Session;\n    public paymentMethodsResponse: PaymentMethods;\n    public modules: CoreModules;\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: LIBRARY_VERSION,\n        bundleType: LIBRARY_BUNDLE_TYPE\n    };\n\n    public static readonly 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        this.update = this.update.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        await this.requestAnalyticsAttemptId();\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: LogEventType.action,\n                subType: AnalyticsLogEvent.getSubtypeFromActionType(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 props - props to update\n     * @param options - Can be used to avoid remounting the elements\n     * @returns this - the Core instance\n     */\n    public update(props: Partial<Omit<CoreConfiguration, 'session'>> = {}, { shouldReinitializeCheckout = true } = {}): Promise<this> {\n        if (shouldReinitializeCheckout) {\n            this.setOptions(props);\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                        ...(props.order?.remainingAmount ? { amount: props.order.remainingAmount } : { amount: this.options.amount }),\n                        ...(this.session && { session: this.session }),\n                        ...props\n                    };\n                    component.update(newProps);\n                });\n                return this;\n            });\n        }\n\n        const { amount, secondaryAmount } = props;\n\n        if (amount || secondaryAmount) {\n            this.triggerAmountUpdate(amount, secondaryAmount);\n        }\n\n        return Promise.resolve(this);\n    }\n\n    /**\n     * Validates and propagates amount updates to all mounted components.\n     *\n     * @param amount - Primary payment amount object (required)\n     * @param secondaryAmount - Optional secondary amount for display purposes (e.g., converted currency)\n     * @internal\n     */\n    private triggerAmountUpdate(amount: PaymentAmount, secondaryAmount?: PaymentAmount): void {\n        if (!isAmountValid(amount)) {\n            console.warn('Core update(): Update canceled. Invalid amount object');\n            return;\n        }\n\n        if (secondaryAmount && !isAmountValid(secondaryAmount)) {\n            console.warn('Core update(): Update canceled. Invalid secondary amount object');\n            return;\n        }\n\n        this.setOptions({\n            amount,\n            ...(secondaryAmount && { secondaryAmount })\n        });\n\n        this.components.forEach(component => {\n            component.updateAmount(amount, secondaryAmount);\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            // Make environment lowercase to ensure consistency\n            environment: String.prototype.toLowerCase.apply(options?.environment || this.options?.environment)\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: new Analytics({\n                eventQueue: new AnalyticsEventQueue(),\n                service: new AnalyticsService({\n                    analyticsContext: this.analyticsContext,\n                    clientKey: this.options.clientKey\n                }),\n                enabled: this.options.analytics?.enabled,\n                analyticsData: this.options.analytics?.analyticsData\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    private async requestAnalyticsAttemptId(): Promise<void> {\n        await this.modules.analytics.setUp({\n            locale: this.options.locale,\n            ...(this.session?.id && { sessionId: this.session.id })\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","e","f","c","s","a","h","p","v","y","d","Array","isArray","w","g","parentNode","removeChild","_","t","arguments","length","children","call","defaultProps","m","type","props","key","ref","__k","__","__b","__e","__c","constructor","__v","__i","__u","vnode","k","x","this","context","S","C","base","M","__d","push","$","__r","debounceRendering","sort","shift","__P","O","__n","namespaceURI","N","I","b","String","L","D","P","B","A","nextSibling","insertBefore","nodeType","H","some","T","setProperty","test","j","style","cssText","replace","toLowerCase","slice","addEventListener","removeEventListener","removeAttribute","setAttribute","F","event","prototype","render","contextType","value","__E","E","sub","state","__h","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","V","then","indexOf","z","q","diffed","forEach","map","localName","document","createTextNode","createElementNS","is","__m","data","childNodes","attributes","name","__html","innerHTML","content","current","unmount","componentWillUnmount","G","documentElement","firstChild","Q","Set","add","delete","Provider","__l","Consumer","getDerivedStateFromError","setState","componentDidCatch","forceUpdate","Promise","bind","resolve","setTimeout","__H","__N","__f","filter","every","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","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","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","reduce","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","objToString","Object","toString","prop","existy","truthy","isObjectLike","falsy","Number","isNaN","isString","keys","pick","args","myArgs","from","obj","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","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","componentType","holderEl","iframeRef","loadToConfigTimeout","_isValid","_iframeContentWindow","_numKey","_isEncrypted","_hasError","_errorType","_cvcPolicy","_expiryDatePolicy","_iframeOnLoadListener","_postMessageListener","submitAnalytics","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","addContextTranslationsToObject","contextualTexts","translation","processAriaConfig","showContextuaElement","iframeTitle","lang","locale","enhancedAriaFieldConfigObj","_object_spread_props","uuidv4","Math","random","AnalyticsEventCategory","AbstractAnalyticsEvent","component","timestamp","id","Date","now","ErrorEventType","ErrorEventCode","AnalyticsErrorEvent","getEventCategory","super","message","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","trim","noIframeElContent","appendChild","createIframe","iframe","contentWindow","_this_submitAnalytics","SECURED_FIELDS_IFRAME_CONTENT_WINDOW_NOT_FOUND","implementation","iframeOnLoadListener","iframeOnLoadListenerFn","postMessageListener","postMessageListenerFn","configObj","pShowWarnings","isCheckoutUrl","adyenDomain","substring","lastCharIndex","originCheckPassed","feedbackObj","parse","isWebpackPostMsg","isChromeVoxPostMsg","internal","destroy","removeAllChildren","isOptionalOrHidden","onIframeLoaded","onEncryption","onValidation","onConfig","onTouchstart","onShiftTab","pSetupObj","configVarsFromSetUpObj","crypto","ranNum","Uint32Array","getRandomValues","generateRandomNumber","NETWORK_ERROR","IMPLEMENTATION_ERROR","API_ERROR","ERROR","SDK_ERROR","AdyenCheckoutError","options","cause","errorTypes","CANCEL","SCRIPT_ERROR","getCardImageUrl","brand","resources","imageOptions","extension","getImage","fieldTypeToSnakeCase","isSecuredField","ENCRYPTED","isValidType","async","catch","cvcText","pItem","hasSeparateDateFields","sfInitObj","extraFieldData","maskSecurityCode","exposeExpiryDate","disableIOSArrowKeys","shouldDisableIOSArrowKeys","implementationType","onSubmitAnalytics","sf","iframeCount","numIframes","failReason","originalNumIframes","iframesLoaded","fieldClick","rest","__IS_ANDROID","navigator","userAgent","__IS_IE","ua","msie","parseInt","rv","edge","isIE","__IS_IOS","__IS_FIREFOX","__IS_SAFARI","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","contains","getPreviousTabbableEl","handleTab","shiftTabObj","additionalField","shiftTabGiftCard","isKCP","shiftTabKCP","shiftTabCreditCard","pAdditionalField","blur","brandObj","expiryDateObj","binLookupResponse","resetObj","binBrandObj","isGenericCard","supportedBrands","passedBrand","showExpiryDate","showSocialSecurityNumber","cardObj","enableLuhnCheck","panLength","isDualBrandSelection","csfConfig","pFieldType","doLog","focusData","objKeys","pKey","checkForBrandChange","storedBrand","csfProps","csfCallbacks","newBrandObj","newBrand","treatAsGenericCard","brandInfoObj","ACFeedbackObj","dateValArr","split","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","undefined","thisObj","initCSF","isGenericCardType","findRootNode","pRootNode","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","brandImageUrl","brandsConfiguration","icon","_ref","handleOnError","handleOnNoDataRequired","handleOnTouchstartIOS","_this_props_disableIOSArrowKeys","_this_props","handleKeyPressed","_this_props_handleKeyPress","kb","KeyboardEvent","bubbles","cancelable","handleKeyPress","TxVariants","SecuredFieldsProvider","Component","setRootNode","fields","match","initializeCSF","customCard","debug","_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","getRootNode","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","validateSSN","ssn","getMaxLengthByFieldAndCountry","formattingRules","country","ignoreIfFormatterExists","formatterFn","maxLength","maxlength","isEmpty","SPECIAL_CHARS","getFormattingRegEx","specChars","flags","RegExp","cardInputFormatters","socialSecurityNumber","cardInputValidationRules","modes","validate","taxNumber","holderName","default","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","schema","BR","CA","GB","US","PARTIAL_ADDRESS_SCHEMA","COUNTRIES_WITH_CUSTOM_SPECIFICATION","CoreContext","createContext","CoreProvider","analytics","coreContext","useContext","useEffect","Fragment","toChildArray","useCoreContext","useImage","useCallback","mapFieldKey","handlePartialAddressMode","addressMode","getFullBrandName","mapDualBrandButtons","dualBrandSelectElements","item","imageName","imageURL","brandObject","localeBrand","altName","mustHandleDualBrandingAccordingToEURegulations","EU_BrandArray","returnedDualBrandingObjects","DUAL_BRANDS_THAT_NEED_SELECTION_MECHANISM","cloneBrandsArr","brandsArr","extensions","refs","states","hasPanLengthRef","sfp","setDualBrandSelectElements","setSelectedBrandValue","setIssuingCountryCode","processBinLookup","isReset","issuingCode","brandToReset","hasExcludedBrand","excludedBrands","mainBrand1","mainBrand2","clonedBrands","reverse","removeExcludedBrand","switcherObj","brandObjArr","preselectBrand","leadBrand","subBrand","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","processField","fieldProblems","getProcessedState","fieldKey","validationResult","_ref1","formData","useForm","formatters","validator","useMemo","fieldContext","formatter","isFormatterObject","dispatch","useReducer","formValue","selectedSchema","validationSchema","validation","oldValue","mergedState","defaultState","removedSchemaFields","newSchemaFields","local","formValidation","getReducer","triggerValidation","setErrors","setValid","setData","mergeData","setSchema","mergeForm","setFieldProblems","handleChangeFor","getTargetValue","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","span","svg","viewBox","fill","xmlns","aria-hidden","role","path","rect","rx","stroke","Img","backgroundUrl","classNameModifiers","alt","showOnError","loaded","setLoaded","useState","imageRef","useRef","handleLoad","cx","modifier","image","Image","onload","complete","img","Icon","iconUrl","imageFolder","idCounter","getUniqueId","prefix","PREFIX","Field","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","staticValueId","setFocused","setFilled","onFocusHandler","onBlurHandler","renderLabelOrAlternativeContents","data-id","renderInputRelatedElements","errorElem","contextualElem","onClick","child","cloneElement","isInvalid","LabelOrAlternative","defaultWrapperProps","htmlFor","DataSfSpan","encryptedFieldType","alternativeLabelContent","CVC","fieldClassnames","cvcClassnames","imageDescription","InputBase","_0","setRef","autoCorrect","readonly","spellcheck","handleInput","onInput","onKeyPress","handleKeyUp","onKeyUp","handleBlur","trimOnBlur","inputClassNames","cnm","iiv","iv","addContextualElement","ace","restProps","aria-required","required","aria-describedby","aria-invalid","InputText","Fieldset","classNameFieldsetModifiers","classNamesFields","description","describedById","fieldset","legend","StoredCardFields","focusedElement","lastFour","expiryMonth","expiryYear","ariaLabel","isAmex","cvcContextualText","aria-label","encryptedSecurityCode","RadioGroup","items","uniqueIdBase","lastIndexOf","checked","SelectButtonElement","filterable","toggleButtonRef","strippedProps","button","aria-expanded","showList","aria-disabled","ariaDescribedBy","SelectButton","active","selected","inputText","isShowingPlaceholder","displayText","selectedOptionName","placeholder","displayInputText","onClickHandler","preventDefault","activeElement","filterInputRef","toggleList","currentSelectedItemId","onKeyDown","onButtonKeyDown","aria-autocomplete","aria-controls","selectListId","aria-owns","aria-activedescendant","secondaryText","classnames","SelectListItem","li","aria-selected","data-disabled","data-value","onSelect","onMouseEnter","onHover","SelectList","filteredItems","ul","selectListRef","arrowDown","arrowUp","enter","escape","space","tab","Select","selectedValue","disableTextFilter","clearOnSelect","blurOnClose","onListToggle","selectContainerRef","textFilter","setTextFilter","setShowList","statusMessage","setStatusMessage","setInputText","activeOption","setActiveOption","selectedOption","scrollToItem","parent","parentComputedStyle","getComputedStyle","parentBorderTopWidth","getPropertyValue","overTop","offsetTop","scrollTop","overBottom","clientHeight","simulateFocusScroll","getElementById","closeList","openList","extractItemFromEvent","currentTarget","listItem","handleSelect","valueToEmit","HTMLElement","handleNavigationKeys","possibleNextIndex","findIndex","nextIndex","nextItem","setNextActive","setPreviousActive","handleClickOutside","composedPath","shiftKey","aria-live","aria-relevant","AmountContext","useAmount","amount","isZeroAuth","AmountProvider","secondaryAmount","providerRef","updatedAmount","setUpdatedAmount","updatedSecondaryAmount","setUpdatedSecondaryAmount","useImperativeHandle","update","newAmount","newSecondaryAmount","contextValue","Installments","installmentAmount","setInstallmentAmount","preselectedValue","radioBtnValue","setRadioBtnValue","hasRadioButtonUI","plans","radioGroupItems","createRadioGroupItems","onSelectInstallment","selectedInstallments","onRadioSelect","selectedBtn","installmentItemsMapper","translationObj","count","times","partialValue","divider","currency","getPartialAmount","plan","isValidHttpUrl","httpUrl","allowHttp","url","URL","protocol","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","Brand","wrapperClassName","imgClassName","setHasError","BrandIcon","imageUrl","CardNumber","dualBrandingElements","ExpirationDate","AvailableBrands","activeBrand","CardFields","brandsIcons","allowedBrands","encryptedCardNumber","encryptedExpiryMonth","encryptedExpiryYear","encryptedExpiryDate","InputTelephone","KCPAuthentication","taxNumberLabel","onFieldFocusAnalytics","onFieldBlurAnalytics","minLength","encryptedPasswordState","SocialSecurityNumberBrazil","autocorrect","Checkbox","newProps","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","LIBRARY_VERSION","LIBRARY_BUNDLE_TYPE","GENERIC_OPTIONS","DEFAULT_HTTP_TIMEOUT","http","payload","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","initialCountryRef","_props_data","effectiveCountry","_this","dataWithCountry","setSearchData","selectedAddress","newStateData","propKey","providedValue","enabledFields","newData","stateFieldIsRequired","countryHasStatesDataset","addressShouldHaveState","processedData","isRequired","newValue","getComponent","addressSchema","CardHolderName","autocomplete","RadioButtonIcon","dataValue","showRadioIcon","hasLoaded","setHasLoaded","RadioGroupExtended","showSelectedTick","invalidClassName","CardFieldsWrapper","formErrors","formValid","showKCP","showBrazilianSSN","handleOnStoreDetails","handleAddress","setAddressRef","partialAddressSchema","billingAddressValidationRules","showStoreDetailsCheckbox","cardHolderField","showDualBrandSelectElements","encryptedPassword","windowScrollTo","container","bodyRect","top","offsetPosition","scrollTo","behavior","setFocusOnNonSF","shouldPreventScroll","preventScroll","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","errorsWithoutAddress","srPanelResp","elementToScrollTo","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","onClickCompletedIcon","variant","buttonRef","onClickCompletedLabel","onMouseLeave","completed","buttonIcon","modifiers","buttonClasses","buttonStates","loading","buttonText","buttonStatusSRLabel","_this_props_onClick","delay","FASTLANE_BENEFITS","headerKey","labelById","descriptionTextKey","altImage","InfoModal","focusFirstElement","benefit","h1","InfoButton","isInfoModalOpen","setIsInfoModalOpen","handleOnClose","handleOnIconClick","VALID_KEYS","errorCodeMapping","digitsOnlyFormatter","UiTarget","InfoEventType","AnalyticsInfoEvent","configDataExcludedFields","createAnalyticsConfigData","configData","issuer","isExpress","expressPage","isStoredPaymentMethod","validationErrorCode","validationErrorMessage","cdnUrl","errCode","mapErrorCodesForAnalytics","SUPPORTED_BRANDS","FastlaneSignup","showConsent","defaultToggleState","termsAndConditionsLink","privacyPolicyLink","termsAndConditionsVersion","fastlaneSessionId","currentDetectedBrand","telephoneNumber","telephoneNumberFromProps","shouldDisplaySignup","hasConsentFormBeenShown","setHasConsentFormBeenShown","isChecked","setIsChecked","setTelephoneNumber","isFastlaneConfigurationValid","isConfigurationValid","handleToggleChange","clicked","fastlaneSignupConsentToggle","isToggleOn","fastlaneData","consentShown","consentGiven","consentVersion","rendered","isFastlaneSignupRendered","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","shouldShowInstallmentsComponent","isKorea","who","getFocusHandler","countrySpecificSchemas","hasRequiredHolderName","countrySpecificSchemasFlat","countryBasedAddressLayout","getLayout","handleTouchstartIOS","elementType","address","getAddressHandler","doPanAutoJump","panIndex","elem","subsequentFields","getAutoJumpHandler","handleSFPStateUpdate","mimicLoadingStatusChange","CIExtensions","newSchema","addressHasErrors","newErrors","errorItem","validationError","holderNameValid","sfpValid","addressValid","koreanAuthentication","socialSecurityNumberValid","sfStateErrorsObj","dualBrandsArr","dualBrands","displayed","dualBrandButton","previousSelectedBrandValue","FieldToRender","extractPropsForSFP","sfState","eventDetails","acHolderName","sfpErrors","extractPropsForCardFields","fastlaneConfiguration","showPayButton","payButton","collectBrowserInfo","colorDepth","screen","screenHeight","screenWidth","acceptHeader","javaEnabled","language","timeZoneOffset","getTimezoneOffset","triggerBinLookUp","currentRequestId","doBinLookup","requestId","mappedResponse","paymentMethodVariants","paymentMethodVariant","supported","onBinLookup","supportedBrandsRaw","SrciError","source","scheme","schemeError","errorFromCardSchemeSdk","Script","removeScript","_this_script_parentNode","_this_script","cleanupListeners","script","attachListeners","loadScript","scriptContainer","resolveLoadScript","rejectLoadScript","assign","dataset","dataAttributes","trackEvent","eventType","_this_analytics","baseUrl","sendAnalytics","loadPromise","rejectLoadPromise","_this_resolveLoadScript","errorEvent","_this_rejectLoadScript","load","attempts","sdkDownloadInitiated","loadScriptWithRetry","sdkDownloadCompleted","sdkDownloadFailed","MAX_NUMBER_OF_RETRIES","RETRY_DELAY","sdkDownloadAborted","remove","_this_rejectLoadPromise","pathname","getBaseURL","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","lowerCaseLabel","errorKey","shouldBuildErrorMessage","CtPOneTimePasswordInput","disableOtpAutoFocus","resendOtpError","setResendOtpError","otpInputHandlersRef","validateInput","isOtpFielDirty","setIsOtpFieldDirty","onSetInputHandlers","handleOnResendOtp","handleOnResendOtpError","handleOnKeyPress","onPressEnter","getOtpErrorMessage","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","isAmountFirstFormat","tokenIndex","payAmountLabel","amountLabelValue","secondaryAmountValue","formatSecondaryAmountLabel","convertedSecondaryAmount","SecondaryButtonLabel","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","isAmountValid","hasValidValue","hasValidCurrency","hasValidCurrencyDisplay","PayButton","customAmount","useSecondaryAmount","buttonLabel","customLabel","createButtonLabel","secondaryAmountLabel","createSecondaryLabel","isDisabled","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","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","base64","decode","pData","isBase64","success","decodeURIComponent","atob","charCodeAt","encode","pDataStr","createSdkData","checkoutAttemptId","clientData","sdkDataObject","schemaVersion","createdAt","riskData","BaseElement","buildElementProps","componentProps","formatProps","formatData","analyticsObj","newState","_this_core_modules_analytics_checkoutAttemptId","order","componentData","core","modules","risk","sdkData","paymentMethod","orderData","pspReference","clientStateDataIndicator","activate","mount","domNode","_node","_component","_id","isCoreInstance","createFromAction","assertIsCoreInstance","ALLOWED_PROPERTIES","sanitizeResponse","removedProperties","sanitizedObject","cleanupFinalResult","paymentResponse","donationToken","verifyPaymentDidNotFail","resultCode","assertIsDropin","activePaymentMethod","closeActivePaymentMethod","LogEventType","LogEventSubtype","AnalyticsLogEvent","getSubtypeFromActionType","subType","CancelError","SRPanelProvider","moveFocus","strs","UIElement","createBeforeRenderHook","configSetByMerchant","originalRender","beforeRender","originalAction","oneClick","reportIntegrationFlavor","sendFlavor","getPaymentMethodConfigFromResponse","getStoredPaymentMethodDetails","getPaymentMethodFromPaymentMethodsResponse","paymentMethodId","finalProps","getCorePropsForComponent","isDropinInstance","openFirstPaymentMethod","openFirstStoredPaymentMethod","getRegulatoryDefaults","paymentMethodsResponse","findStoredPaymentMethod","_this_core_paymentMethodsResponse","findById","storeElementRefOnCore","isDropin","storeElementReference","isAvailable","componentRef","updateAmount","_this_amountProviderRef_current","amountProviderRef","setElementStatus","_this_elementRef","elementRef","_this_componentRef","_this_props_onChange","submit","makePaymentsCall","handleResponse","handleFailedResult","submitUsingAdvancedFlow","session","beforeSubmitEvent","beforeSubmit","submitUsingSessionsFlow","handleError","submitPayment","onComplete","handleAdditionalDetails","makeAdditionalDetailsCall","onAdditionalDetails","submitAdditionalDetailsUsingSessionsFlow","submitDetails","handleAction","paymentAction","onActionHandled","actionHandledObj","_this_props_onActionHandled","remainingAmount","handleOrder","handleSuccessResult","onEnterKeyPressed","updateParent","_this_props_icon","paymentMethodType","displayName","_this_core_paymentMethodsResponse_paymentMethods","paymentMethodFromResponse","paymentMethods","pm","accessibleName","additionalInfo","handleAdvanceFlowPaymentMethodsUpdate","onPaymentMethodsRequest","componentToRender","apiError","_this_props_onOrderUpdated","onOrderUpdated","_this_props_onPaymentFailed","displayFinalAnimation","onPaymentFailed","_this_props_onPaymentCompleted","onPaymentCompleted","register","txVariants","CardElement","_this_clickToPayRef","findByFundingSource","_this_core_options_session","_this_core_options","_this_core_options_session1","_this_core_options1","storedCardID","isEcommerceStoredCard","supportedShopperInteractions","_this_props_holderName","cardBrand","storePaymentMethodPayload","installment","browserInfo","_this_props_onBinLookup","_this_props_storedPaymentMethodId","_this_props_amount","renderCardInput","isCardPrimaryInput","handleClickToPaySubmit","_this_clickToPayService","_this_props_onBrand","_this_props_onConfigSuccess","configured","_this_props_onFocus","_this_props_onFocus1","_this_props1","unfocus","_this_props_onBlur","_this_props_onBlur1","isStoredCard","_disableClickToPay","showFormInstruction","BancontactElement","CustomCardInput","SFExtensions","dualBrandingChangeHandler","mappedErrors","_this_props_onValidationError","validationErrors","onValidationError","CustomCard","sfBrand","_this_props_brandsConfiguration_item_brand","_this_props_onEnterKeyPressed","ThreeDS2Form","formEl","onFormSubmit","inputName","form","display","getProcessMessageHandler","domain","expectedType","parseErrorObj","originalEvent","comment","extraInfo","eventDataRaw","THREEDS2_FINGERPRINT","THREEDS2_FINGERPRINT_ERROR","THREEDS2_FINGERPRINT_SUBMIT","THREEDS2_CHALLENGE","THREEDS2_CHALLENGE_ERROR","THREEDS2_NUM","MISSING_TOKEN_IN_ACTION_MSG","TIMEOUT","CHALLENGE_TIMEOUT_REJECT_OBJECT","transStatus","FAILED_METHOD_STATUS_RESOLVE_OBJECT_TIMEOUT","threeDSCompInd","CHALLENGE_WINDOW_SIZES","getOrigin","exec","separator","host","port","isErrorObject","decodeAndParseToken","token","decodedToken","encodeObject","validateChallengeWindowSize","sizeStr","sizeString","createFingerprintResolveData","dataKey","resultObj","paymentData","createOldFingerprintResolveData","details","createChallengeResolveData","authorisationToken","createOldChallengeResolveData","encodeBase64URL","dataStr","base64url","get3DS2FlowProps","actionSubtype","showSpinner","statusType","promiseTimeout","promise","timeOutObject","promiseTimer","cancel","iframeName","DoChallenge3DS2","get3DS2ChallengePromise","processMessageHandler","postMessageDomain","challengePromise","resolveObject","onCompleteChallenge","rejectObject","onErrorChallenge","acsURL","cReqData","iframeSizeArr","base64URLencodedData","challengeWindowSize","iframeCallback","actionDescription","jsonStr","PrepareChallenge3DS2","challengeData","process","_this_props__environmentUrls_api","_this_props__environmentUrls","shouldAllowHttpDomains","_environmentUrls","api","setError","errorInfo","THREEDS2_TOKEN_IS_MISSING_ACSURL","threeDS2","acsTransID","messageVersion","threeDSServerTransID","THREEDS2_TOKEN_IS_MISSING_OTHER_PROPS","THREEDS2_ACTION_IS_MISSING_TOKEN","THREEDS2_TOKEN_DECODE_OR_PARSING_FAILED","setStatusComplete","errorCodeObject","isMDFlow","finalResObject","errorTypeAndCode","THREEDS2_TIMEOUT","THREEDS2_NO_TRANSSTATUS","challengeCompleted","errorInfoObj","isFatal","challenge","errorDescription","THREEDS2_CHALLENGE_RESOLVED_WITHOUT_RESULT_PROP","timeoutObject","msg","challengeDataSentWeb","decodedChallengeToken","threeDSNotificationURL","notificationURLOrigin","messageType","prepareChallengeData","ThreeDS2Challenge","dataTypeForError","THREEDS2_ACTION_IS_MISSING_PAYMENT_DATA","PrepareChallenge","rtnObj","challengeIframeLoaded","threeDS2Challenge","DoFingerprint3DS2","get3DS2MethodPromise","fingerPrintPromise","onCompleteFingerprint","onErrorFingerprint","threeDSMethodURL","threeDSMethodNotificationURL","PrepareFingerprint3DS2","fingerPrintData","THREEDS2_TOKEN_IS_MISSING_THREEDSMETHODURL","hasValid3DSMethodNotificationURL","hasValidPostMessageDomain","hasTransServerID","fingerprintCompleted","fingerprint","fingerprintDataSentWeb","notificationURL","decodedFingerPrintToken","threeDSMethodUrl","receivedNotificationURL","prepareFingerPrintData","API_VERSION","API_ERROR_CODE","callSubmit3DS2Fingerprint","resData","_this_props_elementRef","THREEDS2_NO_DETAILS_FOR_FRICTIONLESS_OR_REFUSED","THREEDS2_NO_ACTION_FOR_CHALLENGE","actionHandler","THREEDS2_NO_COMPONENT_FOR_ACTION","ThreeDS2DeviceFingerprint","PrepareFingerprint","fingerprintIframeLoaded","RedirectButton","newStatus","threeDS2Fingerprint","SELECTOR_OPTIONS","nameKey","AccountTypeSelector","selectedAccountType","option","accountNumberRegex","routingNumberRegex","achValidationRules","ownerName","routingNumber","accountNumber","accountNumberVerification","achFormatters","setFocusOnField","holder","focusContextSelector","pdHolder","Element","AchComponent","isFormDisabled","achRef","useSRPanelForAchErrors","onAccountNumberInput","accountTypeSelector","AchElement","_this_state_data_selectedAccountType","_this_state_data_selectedAccountType1","accountHolderType","bankAccountType","bankLocationId","bankAccountNumber","ConsentCheckbox","consentCheckbox","ach","checkDateInputSupport","unformatDate","day","month","phoneNumberRule","validationRule","isPhoneValid","emailRule","isEmailValid","dateOfBirthRule","rawValue","ageDiff","isDateOfBirthValid","bankAccountNumberRegEx","bankLocationIdRegEx","bacsValidationRules","amountConsentCheckbox","accountConsentCheckbox","bacsFormatters","ENTER_STATE","CONFIRM_STATE","BacsInput","copyToClipboard","clipboard","writeText","copyInput","text","textArea","createInput","execCommand","isReactComponent","isPureReactComponent","U","W","__a","__z","__R","__O","pop","fallback","revealOrder","Z","Y","splice","Map","set","Symbol","for","J","K","X","defineProperty","configurable","writable","en","rn","un","cancelBubble","defaultPrevented","persist","isPropagationStopped","isDefaultPrevented","nativeEvent","cn","enumerable","class","multiple","defaultValue","$$typeof","an","sn","Tooltip","tooltipRef","setPosition","isAnchorVisible","setIsAnchorVisible","setStyle","visible","anchorRef","updatePosition","anchorEl","tooltipEl","anchorRect","scrollY","offsetLeft","left","scrollX","spaceAbove","spaceBelow","innerHeight","bottom","newPosition","offsetHeight","newStyle","transform","willChange","anchor","observer","IntersectionObserver","entry","isIntersecting","threshold","observe","disconnect","containerInfo","createPortal","TooltipController","registerTooltipHandler","updateGlobalTooltip","registered","canRegisterTooltipHandler","showTooltip","DEFAULT_TIMEOUT","hideTooltip","reset","notifyPrimaryReset","eventTarget","dispatchEvent","PRIMARY_TOOLTIP_RESET_EVENT","onPrimaryReset","tooltipId","EventTarget","TooltipContext","SingletonTooltipProvider","tooltipProps","setTooltipProps","isPrimaryInstanceRef","tryRegister","unsubscribe","stopPropagationForActionKeys","CopyIconButton","ctx","useTooltip","handleShowTooltip","withTooltip","DetailsTable","tableFields","shouldShowCopyButton","dl","dt","dd","CopyButton","copiedLabel","Voucher","voucherDetails","showReferenceValue","issuerImageUrl","introduction","instructionsUrl","surcharge","reference","paymentReferenceLabel","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","substr","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","Alert","SettlementInfo","PreAuthorizedDebitCanadaComponent","PreAuthorizedDebitCanada","_this_resources","eft_directdebit_CA","ReadOnlyCompanyDetails","registrationNumber","companyDetailsValidationRules","ERROR_MSG_INCOMPLETE_FIELD","COMPANY_DETAILS_SCHEMA","CompanyDetails","namePrefix","companyDetailsRef","generateFieldName","eventHandler","inputEventHandler","company","getFormattedData","ReadOnlyPersonalDetails","firstName","lastName","personalDetailsValidationRules","dateOfBirth","InputDate","date","formatDate","PERSONAL_DETAILS_SCHEMA","PersonalDetails","isDateInputSupported","personalDetailsRef","shopperName","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","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","LEDGER_CURRENCIES_PER_REGION","EU","UK","SUPPORTED_LOCALES_EU","SUPPORTED_LOCALES_US","getCheckoutLocale","region","supportedLocales","getSupportedLocales","checkoutLocale","getFallbackLocale","getDesignCode","design","getPayloadJSON","addressDetails","cancelUrl","checkoutMode","deliverySpecifications","returnUrl","merchantMetadata","chargePermissionType","recurringMetadata","storeId","isPayNow","finalAmount","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","ChangePaymentDetailsButton","amazonCheckoutSessionId","changeActionOptions","changeAction","bindChangeAction","OrderButton","createOrder","updateAmazonCheckoutSession","checkoutSessionId","SignOutButton","onSignOut","signout","useAnalytics","AmazonPayComponent","amazonPayButtonRef","orderButtonRef","getSubmitFunction","amazon","showSignOutButton","showOrderButton","showChangePaymentDetailsButton","AmazonPayElement","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","oncouponcodechanged","onCouponCodeChanged","couponCodeUpdate","completeCouponCodeChange","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","couponCode","supportsCouponCode","formatApplePayContactToAdyenAddressFormat","paymentContact","locality","addressLines","administrativeArea","givenName","familyName","ApplePaySdkLoader","crossOrigin","sdkLoadingPromise","isSdkLoaded","detectInIframe","self","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","startSession","validateMerchant","payment","authorizedEvent","handleAuthorization","collectOrderTrackingDetailsIfNeeded","orderDetails","STATUS_SUCCESS","applePayError","STATUS_FAILURE","responseWithError","onAuthorized","onOrderTrackingRequest","hostname","initiative","domainName","decodedData","isInstantPayment","instantPaymentButton","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-busy","CashAppService","isOneTimePayment","isOnFilePayment","store","clientId","cashApp","pay","useCashAppButtonUi","manage","shape","startAuthorization","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","allowedIssuerCountryCodes","blockedIssuerCountryCodes","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","freeze","DEFAULT_ALLOWED_CARD_NETWORKS","GooglePay","paywithgoogle","twoLetterLocale","getGooglePayLocale","createAllowedCardNetworksValues","googlePayCardNetwork","googlePayToken","mappedBrands","mapGooglePayBrands","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","blockPayPalButton","blockPayPalCreditButton","blockPayPalPayLaterButton","blockPayPalVenmoButton","isProcessingPaymentWithoutReviewPage","commit","getPaypalSettings","vault","enableMessages","shopperLocale","formattedLocale","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","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","payButtonLabel","issuerName","IssuerList","highlightedIds","selectFieldLabel","inputType","setInputType","containerRef","handleInputChange","list","featuredIssuer","issuerObj","analyticsEvent","handleListToggle","debounceSearchAnalytics","handleSearch","listSearch","highlightedItems","termsAndConditions","getIssuerImageUrl","parentFolder","IssuerListContainer","issuers","_this_state","showPaymentMethodItemImages","highlightedIssuers","showImage","getIssuerIcon","BillDeskOnlineElement","billdesk_online","BillDeskWalletElement","billdesk_wallet","DotpayElement","dotpay","EPSElement","eps","processPaymentStatusCompleteResponse","processPaymentStatusResponse","DEFAULT_PAYMENT_STATUS_TIMER_DELAY_MS","DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_TIME_MS","DEFAULT_PAYMENT_STATUS_TIMER_THROTTLE_INTERVAL_MS","usePaymentStatusTimer","setCompleted","expired","setExpired","setLoading","setDelay","percentage","setPercentage","timePassed","setTimePassed","onPollingStartedActionHandled","setOnPollingStartedActionHandled","timeoutRef","checkStatus","throttleInterval","pollStatus","pollStatusFunction","checkPaymentStatus","additionalDetailsData","start","performance","end","responseTime","round","actualTimePassed","throttleTime","statusInterval","onTick","time","onTimeUp","QRImage","QRProgressbar","zeroPad","strValue","repeat","getTimeDifference","startTime","endTime","diff","getProgressPercentage","minutes","CountdownA11yReporter","minutesLeft","secondsLeft","timeLeft","LONG_TIMEOUT","setInterval","MID_TIMEOUT","SHORT_TIMEOUT","tearDown","clearInterval","setAriaProps","ariaAttributes","setSrMessages","getSrMessages","srInterval","TRANSLATION_KEY","fns","Countdown","minutesFromNow","onCompleted","startAndEndTime","secondsFromNow","nowTime","calculateStartAndEndTime","setTime","reporter","useCountdownA11yReporter","interval","QRCountdown","countdownTime","timeToPay","timeToPayString","QRInstructions","instructions","QRCodeCopyButton","copyLabel","handleCopy","QRLoaderDetailsContext","QRLoaderDetailsProvider","useQRLoaderDetails","QRDetails","qrCodeData","qrCodeImage","onQRCodeLoad","useA11yReporter","QRFinalState","redirectToApp","QRLoader","timerState","timerActions","throttledInterval","showAmount","brandLogo","brandName","qrSubtitleRef","useAutoFocus","redirectIntroduction","download","qrDownloadButton","IrisMode","IRIS_ALLY_LABELS","BANK_LIST","QR_CODE","SegmentedControl","controls","htmlProps","SegmentedControlRegion","ariaLabelledBy","IrisGenerateQRCode","IrisComponent","setMode","defaultMode","segmentedControlOptions","getIrisSegmentedControlOptions","issuersAvailable","handleModeChange","onUpdateMode","segmentedControl","iris","irisRef","issuerListUI","TimelineWrapper","Timeline","ol","IrisQrCodeInstructions","Iris","renderIssuerList","encodeURIComponent","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","hasAlternativeReference","alternativeReferenceDetails","standardVoucherDetails","EcontextElement","econtext","econtext_atm","econtext_online","econtext_seven_eleven","econtext_stores","detectInIframeInSameOrigin","RedirectShopper","beforeRedirect","postForm","redirectFromTopWhenInIframe","onRedirectError","RedirectElement","isRedirecting","handleRedirectError","REDIRECT","GiropayElement","giropay","MultibancoVoucherResult","entity","MultibancoElement","multibanco","TwintElement","twint","VippsElement","vipps","TrustlyElement","trustly","PayByBankUS","showOtherInsteadOfNumber","paybybank_AIS_DD","Riverty","riverty","API_ENVIRONMENTS","live","CDN_ENVIRONMENTS","ANALYTICS_ENVIRONMENTS","getUrlFromMap","environmentMap","environmentUrl","resolveEnvironments","environmentsUrls","apiUrl","analyticsUrl","cdnImagesUrl","cdn","images","cdnTranslationsUrl","translations","PasskeySdkLoader","AdyenPasskey","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","AwaitFinalState","Await","shouldRedirectAutomatically","messageText","awaitText","showCountdownTimer","endSlot","PayByBankPixAwait","StoredPayment","onPay","enrollmentId","initiationId","authorizationOptions","setAuthorizationOptions","getAuthorizationStatus","useIssuerWithLogo","issuersWithLogo","setIssuersWithLogo","LOGO","IssuerListIntroduction","Enrollment","issuerListRef","setRegistrationOptions","onEnroll","isAwait","numberOfMin","getEnrollmentStatus","paybybank_pix","PayByBankPixElement","_isAdyenHosted","_this_props_payByBankPixDetails","receiver","payByBankPixDetails","ispb","unsupportedReason","passkeyService","isEnrollment","_this_props_paymentMethodData","_this_props_paymentMethodData1","_this_props_paymentMethodData2","payWithStoredPayment","authorizePayment","authorizeEnrollment","onIssuerSelected","fidoAssertion","enrollment","redirectResult","TIMEOUT_MINUTES","endsWith","isAdyenHosted","KlarnaWidget","widgetInitializationTime","klarnaWidgetRef","initializeKlarnaWidget","Klarna","Payments","client_token","payment_method_category","show_form","onLoaded","authorizeKlarna","authorize","approved","authorization_token","handleKeyDown","klarnaAsyncCallback","KlarnaContainer","setWidgetInitializationTime","setAction","klarnaRef","reinitializeWidget","KlarnaPayments","useKlarnaWidget","klarna","klarna_account","klarna_paynow","klarna_b2b","QRLoaderContainer","renderQRCode","BCMCMobileElement","bcmc_mobile","bcmc_mobile_QR","pixValidationRules","pixFormatters","PixInput","dataProps","formSchema","PixQRDetails","pix","PixElement","SwishElement","swish","WeChatPayElement","wechatpayQR","wechatpay","PromptPayElement","promptpay","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","loadingStatus","prefixLoadingStatus","phonePrefixes","setLoadingStatus","setPhonePrefixes","mappedCountries","usePhonePrefixes","phoneLabel","phoneNumberErrorKey","config$2","MBWayElement","mbway","UPI_MODE","A11Y","QR","INTENT","paymentMethodsWithoutBorder","PaymentMethodIcon","altDescription","ExpandButton","buttonId","showRadioButton","isSelected","expandContentId","standalone","aria-checked","UPIIntentAppItem","app","imgSrc","containerId","handleAppSelected","UPIIntentAppList","apps","selectedAppId","onAppSelect","imgName","UPIMandate","mandate","mandateContent","mandateAmount","frequency","amountRule","paymentAmount","formattedMandateAmount","formattedTransactionAmount","frequencyText","introText","recurringAmount","strong","maxAmountText","extraText","UPIComponent","selectedApp","setSelectedApp","mandateComponent","validateIntentApp","handleAppSelect","UPI","hasIntentApps","paymentType","upi_intent","appId","upi_qr","isAutoPay","_this_props_countdownTime","_this_props_countdownTime1","deprecatedDefaultMode","upi","ancvValidationRules","beneficiaryId","ANCVInput","config$1","ANCVElement","onOrderRequest","stateOrder","PayToIdentifierEnum","payToIdentifierEnumCheck","enumVariable","enumValues","createEnumChecker","PAYID_IDENTIFIER_OPTIONS","IdentifierSelector","selectedIdentifier","onSelectedIdentifier","hydratedOptions","loadI18nForOptions","valueStr","AUSTRALIAN_PHONE_PREFIXES","PayToPhone","abnRegex","orgidRegex","emailRegex","phoneNumberRegexWithoutCountryCode","validationFromRegex","emailValidatorRule","abnValidatorRule","orgidValidatorRule","payIdValidationRules","abn","orgid","bsbRegex","bsbValidatorRule","bankAccountNumberValidatorRule","bsbValidationRules","bsb","PayToNameFields","BASE_SCHEMA","IDENTIFIER_SCHEMA","phone","PayIDInput","payToRef","BSBInput","PayToComponent","payidInputId","bsbInputId","inputOptions","defaultOption","selectedInput","setSelectedInput","PayToInstructions","orderedMandateTableFields","MandateSummary","payee","labelText","amountValue","formatedAmount","remarks","startsAt","endsAt","getAccountIdentifier","PayToElement","shopperAccountIdentifier","GiftcardResult","balance","transactionLimit","makePayment","transactionAmount","remainingBalance","payto","GiftcardNumberField","getCardErrorMessage","data-info","GiftcardPinField","Giftcard","generateBalanceCheckErrors","balanceCheckErrors","isBalanceCheckError","transformedErrors","setIsValidating","useSRPanelForGiftcardErrors","hasEnoughBalance","makeBalanceCheck","fieldsLayoutComponent","pinRequired","mapErrorsToValidationObjects","updateTransformedErrors","setBalance","setBalanceCheckErrors","_this_sfp","expiryDateRequired","GiftcardElement","_this_props_brandsConfiguration_this_props_brand","setBalanceCheckError","_this_componentRef_setBalanceCheckErrors","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","BankTransferResultInstructions","BankTransferVoucher","BankTransferResult","beneficiary","sortCode","branchCode","bic","optionalEmailValidationRule","BankTransferInput","emailOptionalLabel","BankTransferElement","bankTransfer_IBAN","CampaignInfo","logoUrl","nonprofitName","causeName","bannerUrl","backgroundImage","CampaignContent","nonprofitDescription","nonprofitUrl","bankTransfer_BE","bankTransfer_NL","bankTransfer_PL","bankTransfer_FR","bankTransfer_CH","bankTransfer_IE","bankTransfer_GB","bankTransfer_DE","bankTransfer_AE","bankTransfer_AT","bankTransfer_AU","bankTransfer_BG","bankTransfer_CA","bankTransfer_EE","bankTransfer_ES","bankTransfer_FI","bankTransfer_HK","bankTransfer_HU","bankTransfer_IT","bankTransfer_JP","bankTransfer_LU","bankTransfer_NZ","bankTransfer_PT","bankTransfer_SG","bankTransfer_SK","bankTransfer_US","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","InstantPaymentMethods","onClickCapture","useBrandLogoConfiguration","setBrandLogoConfiguration","PaymentMethodDetails","paymentMethodComponent","oldProps","DisableOneClickConfirmation","open","onDisable","PaymentMethodBrands","excludedUIBrands","isPaymentMethodSelected","visibleBrands","leftBrandsAmount","prepareVisibleBrands","PaymentMethodName","PaymentMethodItem","isDisablingPaymentMethod","isCard","paymentMethodClassnames","showDisableStoredPaymentMethodConfirmation","showRemovePaymentMethodButton","disableConfirmationId","showBrands","handleOnListItemClick","toggleDisableConfirmation","onDisableStoredPaymentMethod","PaymentMethodsContainer","paymentMethodListClassnames","paymentMethodsCollection","isNextOneSelected","isLoaded","PaymentMethodList","instantPaymentMethods","storedPaymentMethods","openPaymentMethod","hasInstantPaymentMethods","hasStoredPaymentMethods","pmListLabel","firstStoredPayment","firstNonStoredPayment","Status","DropinSuccessState","DropinComponent","prepareDropinData","prevProps","elements","fastlanePaymentElement","instantPaymentElements","storedPaymentElements","showDefaultPaymentMethodList","hasPaymentMethodsToBeDisplayed","handleOnSelectPaymentMethod","onShowDefaultPaymentMethodListClick","isDisabling","handleDisableStoredPaymentMethod","cachedPaymentMethods","storedElementsPromises","elementsPromises","instantPaymentsPromises","fastlanePaymentElementPromise","onCreateElements","orderStatusPromise","getOrderStatus","onElementsCreated","getOnOrderCancel","setActivePaymentMethod","_this_props_onSelect","storedPaymentMethod","_this_props_modules","otherPaymentMethodButton","sanitizeOrder","cancelOrder","UNSUPPORTED_PAYMENT_METHODS","filterUnsupportedPaymentMethod","filterPresent","ComponentsNameMap","personal_details","storedCard","ancv","createElements","paymentMethodsConfiguration","dropinProps","UPI_SUB_TX_VARIANTS","optionallyFilterUpiSubTxVariants","paymentMethodConfigFromDropin","pmType","getComponentConfiguration","PaymentMethodElement","requiredPropsWhenUsingDropin","elementProps","elementIsAvailablePromises","promiseResults","filterAvailable","createStoredElements","createInstantPaymentElements","SUPPORTED_INSTANT_PAYMENTS","DropinElement","instantPaymentTypes","dropinRef","_this_dropinRef","_this_dropinRef1","disableFinalAnimation","paymentMethodElements","handleElementsCreated","_this_activePaymentMethod","_this_elementRef_activePaymentMethod","componentFromAction","_this_activePaymentMethod1","pmComponent","handleCreate","_this_props_filterStoredPaymentMethods","showStoredPaymentMethods","showPaymentMethods","fastlanePaymentMethod","isFastlane","isInstantPaymentMethod","splitPaymentMethods","filterStoredPaymentMethods","paymentMethodComponents","PaymentMethod","dropin","PersonalDetailsElement","NonPersistentStorage","storage","getItem","keyName","setItem","keyValue","removeItem","clear","Storage","keyByIndex","storageType","localStorage","Analytics","capturedCheckoutAttemptId","setUp","sessionId","checkoutStage","checkoutAttemptIdSession","isSessionReusable","fifteenMinutesAgo","isSessionCreatedUnderFifteenMinutes","applicationInfo","checkoutAttemptIdFromPayByLink","analyticsData","availableCheckoutAttemptId","buildType","channel","platform","referrer","enabled","service","requestCheckoutAttemptId","addEventToQueue","flavor","isFlavorReported","flush","sendEvents","eventsQueue","debouncedSendInfoEvents","debouncedSendEvents","infoEvents","errorEvents","logs","logEvents","eventQueue","AnalyticsEventQueue","category","ANALYTICS_PATH","AnalyticsService","httpOptions","analyticsContext","FastlaneSDK","tokenData","requestClientToken","fetchSdk","initializeFastlaneInstance","Initialized","handlePageVisibilityChanges","authenticate","fastlaneSdk","LookupStarted","customerContextId","identity","lookupCustomerByEmail","latestShopperDetails","OtpStarted","authResult","triggerAuthenticationFlow","getOtpAnalyticsSubtype","authenticationState","LookupUserNotFound","profileData","_this_latestShopperDetails","isAuthSuccess","hasCardData","hasShopperDetails","createFastlaneComponentConfiguration","createCardComponentConfiguration","showShippingAddressSelector","AddressSelectorClicked","addressSelectorResult","selectionChanged","AddressChanged","AddressSelectorClosed","mountWatermark","includeAdditionalInfo","FastlaneWatermarkComponent","checkoutShopperURL","clientToken","searchParams","sdkClientToken","fetchSessionIdAsync","getSession","fetchConsentDetails","consentComponent","ConsentComponent","getRenderState","intendedExperience","forceConsentDetails","metadata","geoLocOverride","setLocale","fastlaneLocale","paymentSource","lastDigits","consentDetails","OtpSucceeded","OtpCanceled","OtpFailed","visibilityState","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","generatePaymentMethodId","processStoredPaymentMethods","allowPaymentMethods","removePaymentMethods","storedPM","matchingPaymentMethod","getFundingSourceForStoredCard","processStoredPaymentMethod","PaymentMethods","mapCreatedComponentType","has","mappedType","checkPaymentMethodsResponse","processPaymentMethods","createComponent","registry","getActionHandler","actionTypes","voucher","qrCode","await","bankTransfer","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","requestAnalyticsAttemptId","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","shouldReinitializeCheckout","triggerAmountUpdate","globalOptions","processGlobalOptions","paymentMethodName","_this_options_analytics","_this_options_analytics1","RiskModule","srConfig","_this_session","_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,EAAEC,EAAE,CAAA,EAAGC,EAAE,GAAGC,EAAE,oEAAoEC,EAAEC,MAAMC,QAAQ,SAASC,EAAElB,EAAEC,GAAG,IAAI,IAAIC,KAAKD,EAAED,EAAEE,GAAGD,EAAEC,GAAG,OAAOF,CAAC,CAAC,SAASmB,EAAEnB,GAAGA,GAAGA,EAAEoB,YAAYpB,EAAEoB,WAAWC,YAAYrB,EAAE,CAAC,SAASsB,EAAErB,EAAEC,EAAEqB,GAAG,IAAIpB,EAAEC,EAAEC,EAAEC,EAAE,CAAA,EAAG,IAAID,KAAKH,EAAE,OAAOG,EAAEF,EAAED,EAAEG,GAAG,OAAOA,EAAED,EAAEF,EAAEG,GAAGC,EAAED,GAAGH,EAAEG,GAAG,GAAGmB,UAAUC,OAAO,IAAInB,EAAEoB,SAASF,UAAUC,OAAO,EAAEzB,EAAE2B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