@adyen/kyc-components 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";var e=require("whatwg-fetch"),t=require("preact"),a=require("classnames"),r=require("phone");function n(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a}function i(e,t,a,r){return new(a||(a=Promise))((function(n,i){function o(e){try{d(r.next(e))}catch(e){i(e)}}function s(e){try{d(r.throw(e))}catch(e){i(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,s)}d((r=r.apply(e,t||[])).next())}))}const o="en-US",s={close:"Close",individual:"Individual",payoutAccount:"Payout account",payinAccount:"Payin account",firstName:"First name",lastName:"Last name",country:"Country",street:"Street",houseNumber:"House number",houseNumberOptional:"House number (optional)",houseNumberOrName:"House number or name",postalCode:"Postal code",city:"City",cityTown:"City / Town",state:"State",provinceOrTerritory:"Province or territory",selectProvinceOrTerritory:"Select a province or territory",zipCode:"ZIP code",apartmentSuite:"Apartment / Suite",apartmentSuiteOptional:"Apartment / Suite (optional)",phoneNumber:"Phone number",email:"Email address",birthdate:"Date of birth",code:"Code",invalidEmail:"Please enter a valid email",invalidPhoneNumber:"Please enter a valid phone number",invalidCountryCode:"Please select a country code",birthDate:"Date of birth",idNumber:"Identity number",selectState:"Select a state",selectCountry:"Select a country",search:"Search",noOptionsFound:"No options found",SSNFormatUS:"*** \u2014 ** \u2014 XXXX",SSNFormatUS9Digits:"XXXXXXXXX",SINFormatCA:"XXXXXXXXX",useSSNFormatUS:"Please provide last 4 digits",use9DigitsSSNFormatUS:"Please use the SSN format: XXXXXXXXX",useSSNFormatCA:"Please use the SIN format: XXXXXXXXX",invalidFormat:"Invalid format",fieldIsRequired:"Field is required",tooManyFiles:"Too many files",duplicatedFiles:"Duplicated files",unsupportedFiletype:"Unsupported filetype",maximumFileSizeExceeded:"Maximum file size exceeded",personalDetails:"Personal details",invalidBirthDate:"Enter a valid birth date (TODO - explain why this is invalid)",address:"Address",contactDetails:"Contact Details",uploadDocument:"Upload Document",individualDetails:"Individual details",socialSecurityNumber:"Last 4 digits of Social Security Number (SSN)",socialSecurityNumber9Digits:"Social Security Number (SSN)",codiceFiscale:"Codice fiscale",personnummer:"Personnummer (PIN)",dniNumber:"DNI Number",cadastroDePessoasFisicas:"Cadastro de Pessoas F\xedsicas (CFP)",invalidFormatExpects:"Invalid format. Expected format: %{format}",invalidFormatForAuPassportNumber:"This isn't a valid Australian passport number. Expected format: 1-2 letters followed by 7 numbers.",invalidFormatForAuDriversLicenseNumber:"This isn't a valid Australian driver's license number. Expected format: 6-11 alphanumeric characters.",invalidFormatForAuDriversLicenseCardNumber:"This isn't a valid Australian driver's license card number. Expected format: 6-10 alphanumeric characters.",invalidFormatForAuProofOfIdentityCardNumber:"This isn't a valid Australian proof of identity card number. Expected format: 6-10 alphanumeric characters.",residencyCountry:"Country of residence",stateOrProvince:"State or province",selectStateOrProvince:"Select a state or province",dragYourFilesHereOr:"Drag your files here, or",browse:"Browse",supports:"Supports: %{fileTypes}. Size up to %{maxSize}. Maximum %{maxFiles} page.",complete:"Complete",summary:"Summary",selectDocument:"Select a document",passport:"Passport",passportNumber:"Passport number",id:"ID",driversLicense:"Driver's license",issuerState:"Issuing state",licenseNumber:"Driver license number",licenseCardNumber:"Card number",documents:"Documents",idDocument:"ID Document",documentType:"Document type",frontPage:"Front page",backPage:"Back page",fileName:"File name",proofOfNationality:"Proof of nationality",uploadDocumentForSsn:"Upload an ID document instead of SSN",operationalAddressHeader:"Additional address",operationalAddressHeaderDescription:"Is there a different address for your company\u2019s main business operations?",operationalAddressIsSame:"Is there a different address for your company\u2019s main business operations?",operationalAddressIsSameItemName:"No, the registered address is where we operate",operationalAddressIsNotSameItemName:"Yes, our headquarters are at a different location",verifyPrefilledInfoIsCorrect:"Verify if your prefilled information is correct",legalStructureHeader:"Tell us your legal structure",whatTypeOfCompanyDoYouHave:"What type of company do you have?",privateCompanyTitle:"Private company",privateCompanyDescription:"Owned privately. The shareholders don\u2019t necessarily trade on public exchanges (like the stock market).",publicCompanyTitle:"Public company",publicCompanyDescription:"Owned by public shareholders. They\u2019re also required to disclose financial information to the public regularly.",incorporatedPartnershipTitle:"Incorporated partnership",incorporatedPartnershipDescription:"An agreement between two or more people who run a business together.",nonProfitOrCharitableOrgTitle:"Non-profit or charitable organization",nonProfitOrCharitableOrgDescription:"An organization that has an official status as not for profit or tax exempt, sometimes called an NGO.",governmentalOrganizationTitle:"Governmental organization",governmentalOrganizationDescription:"Owned by the government or state.",associationIncorporatedTitle:"Incorporated association",associationIncorporatedDescription:"A registered entity without profit that's organized around a purpose such as recreation, culture, or charity.",jobTitle:"Job title",legalStructure:"Legal structure",entityType:"Entity type",registrationDetails:"Registration details",registeredAddress:"Registered address",registrationAddress:"Registration address",registeredAddressHeaderDescription:"The address registered to your company with the Chamber of Commerce.",registeredAddressTrustHeaderDescription:"The address registered to your trust",operationalAddress:"Operational address",provideRegistrationDetails:"Provide registration details",companyStructure:"Company structure",providePersonalDetails:"Provide personal details",providePersonalAddress:"Provide personal address",provideContactDetails:"Provide contact details",correctErrorsResubmit:"Correct the following errors and resubmit the form",registrationDocument:"Registration document",taxDocument:"Tax document",provideCompanyDetails:"Provide company details",companyDetails:"Company details",invalidRegistrationNumber:"Invalid registration number",tradingName:"Trading name",chamberOfCommerceRegistrationNumber:"Chamber of Commerce registration number",taxId:"Tax ID",exemptedFromTax:"Exempted from tax",doNotHaveEIN:"I do not have an Employer Identification Number",doNotHaveFirmenbuchnummer:"I do not have a Firmenbuchnummer",doNotHaveOrganisationsnummer:"I do not have an Organisationsnummer",doNotHaveYTunnus:"I do not have a Y-TUNNUS",doNotHaveLtRegistrationNumber:"I do not have a Juridini\u0173 asmen\u0173 registro kodas",doNotHaveLuRegistrationNumber:"I do not have a Num\xe9ro registre de commerce et des soci\xe9t\xe9s (RCS)",doNotHaveChRegistrationNumber:"I do not have a Unternehmens-Identifikationsnummer (UID), Num\xe9ro d\u2019identification des entreprises (IDE), Numero d\u2019identificazione delle imprese (IDI), or CH-number",taxIdAbsenceReason:"Tax ID absence reason",vatNumberExempted:"Exempted from VAT",vatNumberAbsenceReason:"VAT number absence reason",belowTaxThreshold:"Below tax threshold",industryExemption:"Industry exemption",validationPleaseEnterAValidRegistrationNumber:"Please enter a valid company registration number",validationPleaseEnterAValidRegistrationNumberWithFormat:"Please enter a valid company registration number. Expected format: %{format}",validationPleaseEnterAValidVatNumber:"Please enter a valid Tax id number",validationPleaseEnterAValidVatNumberWithFormat:"Please enter a valid Tax id number. Expected format: %{format}",validationPleaseEnterAValidTaxIdNumber:"Please enter a valid Tax id number",validationPleaseEnterAValidTaxIdNumberWithFormat:"Please enter a valid Tax id number. Expected format: %{format}",aValidAbnShouldBe11Digits:"A valid ABN should be 11 digits.",validationPleaseEnterAValidIban:"Please enter a valid IBAN",validation8Or11Characters:"Please enter either 8 or 11 characters.",validationCharacters:"Please enter %{length} characters.",validationDigitsBetween:"Please enter a number between %{start} and %{end} digits",validationDigits:"Please enter %{length} digits",enterValidRegistrationNumber:"Please enter a valid registration number",stockExchangeMIC:"Stock Exchange MIC",stockExchangeMICHelper:"Market Identifier Code, as defined in ISO 10383",stockISINHelper:"International Securities Identification Number, as defined in ISO 10383",stockISIN:"Stock ISIN",validationPleaseEnterAValidMarketIdentifier:"Please enter a valid Market identifier code",validationPleaseEnterAValidStockISIN:"Please enter a valid International Securities Identification Number",shareholderDocument:"Shareholder document",role:"Role",rolePlaceholder:"Select the applicable role(s)",back:"Back",next:"Next",submit:"Submit",nameAndCountry:"Name and country",companyCountry:"Where is your business located?",legalCompanyName:"Legal name of the company",legalCompanyNameHelper:"Enter the name exactly as it is on your Chamber of Commerce registration",accountDetailsDescription:"Provide few details about you to start accepting live payments.",provideDetails:"Provide details",payoutAccountsDescription:"To set up your account, let us know where to send your payouts.",payinAccountsDescription:"To complete your account, let us know where to send your payins.",providePayoutDetails:"Provide payout details",providePayinDetails:"Provide payin details",addExtraPayoutAccount:"Add extra payout account",addExtraPayinAccount:"Add extra payin account",payoutDetails:"Payout details",payinDetails:"Payin details",addPayoutAccount:"Add a payout account",addPayinAccount:"Add a payin account",failedToFetchPayoutAccount:"failed to fetch payout account",toCompleteProcessReviewAndSignOfficialDocumentation:"To complete this process, review and sign the official documentation.",sign:"Sign",signer:"Signer",selectSigner:"Select signer",pciSignedSuccessfully:"PCI signed successfully",pciSignFailed:"PCI signing failed",byClickingSignIAcknowledgeAndAgree:"By clicking the Sign button, I acknowledge and agree to the following: ",acknowledgePciRequirements:"We hereby acknowledge that we must remain compliant with the aforementioned PCI DSS requirements at all times as long as we want to receive payments. Consequently, we must continuously reassess our environment and implement any additional PCI DSS requirements if our environment changes.",basedOnTheAboveSignatory:"Based on the above, the signatory above asserts that the information within this attestation form fairly represents the results of the assessment.",failedToGetPciStatus:"Failed to get the PCI status",failedToGetPciTemplate:"Failed to get PCI template",failedToGetPciTemplateInSelectedLanguageFallbackToEn:"Failed to get the PCI template in the selected language. Falling back to English.",failedToDownloadPci:"Failed to download PCI document(s)",signServiceAgreement:"Sign services agreement",pciDssQuestionnaire:"PCI DSS questionnaire",serviceAgreementSignedSuccessfully:"Service agreement signed successfully",serviceAgreementSignFailed:"Service agreement signing failed",failedToGetServiceAgreementStatus:"Failed to get the service agreement status",failedToGetServiceAgreement:"Failed to get the service agreement",failedToGetServiceAgreementInSelectedLanguageFallbackToEn:"Failed to get the service agreement in the selected language. Falling back to English.",iHaveReadAndIAcceptTheseTerms:"I have read and I accept these terms and confirm that I am a legal representative authorized to accept these terms on behalf of the company. I have taken notice of the privacy statement (www.adyen.com/privacy) and I consent to my (personal) data being used for the purposes described therein.",finished:"Finished",invalidRole:"Please select a role",unableToVerifyTheIdNumber:"Unable to verify the Id number for the given country",download:"Download",accountHolder:"Account holder",accountHolderDescriptionCompany:"The bank account holder has to have the same name as your company.",accountHolderDescriptionIndividual:"This should be you, since the bank account has to be in your name",accountHolderDescriptionSoleProp:" The bank account holder has to have the same name as your sole proprietorship",bankCountry:"Bank country",bankAccountCountry:"Bank account country",currencyCode:"Currency code",currencyPlaceholder:"Select a currency code",bankAccountNumber:"Account number",iban:"IBAN",swiftCode:"Swift code",bsbNumber:"BSB Number",branchCode:"Branch code",transitNumber:"Transit number",listitemVoidedChequeBankLetterBankStatementOnline:"Voided cheque/Bank letter/Bank statement/Online banking environment",instructionNumber:"Instruction number",institutionNumber:"Institution number",sortCode:"Sort code",bankCityTown:"Bank city/town",clearingCode:"Clearing code",bankCode:"Bank code",bankName:"Bank name",achRoutingNumber:"ACH routing number",decisionMaker:"Decision-makers",decisionMakerDescription:"Provide the information of the owners, controlling persons, and signatories in your company. Keep in mind that one person may hold multiple roles. The requirements are as follows:",owner:"Owner",ownerDescription:"Someone who owns 25% or more of the company(directly or indirectly)",controllingPerson:"Controlling person",controllingPersonDescription:"Not an owner, but with authority to make major business decisions",signatory:"Signatory",signatoryDescription:"Authorized to sign the contracts on behalf of the company",director:"Director",directorDescription:"Someone appointed to manage a company's business and affairs",provideAllDirectorsYouShouldHaveAtLeastOne:"Provide <strong>all directors</strong>. You should have at least one.",provideAllDirectorsYouShouldHaveAtLeastThree:"Provide <strong>all directors</strong>. You should have at least three.",provideAllDirectorsYouShouldHaveAtLeast3AndAtMost15:"Provide <strong>all directors</strong>. You should have at least 3, and at most 15",addDecisionMaker:"Add decision maker",addDecisionMakers:"Add decision makers",goToOverview:"Go to overview",saveAndGoToOverview:"Save and go to overview",edit:"Edit",remove:"Remove",toggleAssociationMenu:"toggle menu of %{name} ",editDecisionMakerDetails:"edit details of %{decisionMaker}",removeDecisionMaker:"remove %{decisionMaker}",verifyDecisionMakerDetails:"verify details of %{decisionMaker}",goToMenu:"Go to Menu",confirm:"Confirm",goToDecisionMakers:"Go to list of decision makers",theSubmitWasSuccessful:"The submit was successful",thereWasAnErrorTryAgain:"There was an error, please try again",proofOfIdentityCard:"State-issued proof of identity card",proofOfIdentityCardNumber:"Identity card number",proofOfResidence:"Proof of residency",proofOfNationalId:"Proof of national ID",backToTaskList:"Back to task list",proofOfResidenceDocumentTypeLabel:"Upload a document as proof of address for %{name}. We need to see this document so we can more accurately verify their identity.",utilityBill:"Utility bill",governmentIssuedCorrespondence:"Government-issued correspondence",taxationDocument:"Taxation document",extractFromMunicipalPersonalRecordsDatabase:"Extract from Municipal Personal Records database",salarySlip:"Salary slip",mortgageStatement:"Mortgage statement",certificateOfVoterRegistration:"Certificate of voter registration",businessAccountDetailsDescription:"To prepare your account, we need information about your business.",documentAddressedToName:"The document has to be addressed to %{name}",showAddressStateCountry:"Shows address, state, and country of residence",dateOnDocumentNoOlderThanXMonths:"The date on the document is no older than %{numberOfMonths} months",fullDocumentVisibleWithReadableText:"The full document needs to be visible, with all text readable",documentCannotBeDamaged:"The document cannot be damaged",verify:"Verify",go:"Go",idUploadDocumentSubtitle:"So that we can verify the identity of <strong>%{name}</strong>, we need to see their government issued ID. Choose the method most convenient to you.",documentNotExpiredOrDamaged:"The document cannot be expired or damaged",weAccept:"We accept:",includeFrontAndBack:"Include both the front and back side, each in separate file",fullDocumentVisible:"The full document needs to be visible, with all text readable",imagesInColor:"Images have to be in color",birthDatePlaceholder:"dd/mm/yyyy",onlyEnterNormalCharacters:"Please only enter normal characters",verifyCompanyInfoIsUpToDate:"You need to verify that your company information is up to date",failedToFetchRelevantDocuments:"Failed to fetch relevant documents",failedToFetchRelevantAccounts:"Failed to fetch relevant accounts",processing:"Processing",unsuccessful:"Unsuccessful",invalidDateOfBirth:"Please enter a valid date of birth",successfullyUpdatedDetails:"Successfully updated details",failedToUpdateDetails:"Failed to update details",successfullyVerifiedIdNumber:"Successfully verified %{idNumber}",failedFetchingDecisionMaker:"Failed to get decision maker details",fileUpload:"File upload",bankStatement:"Bank statement",bankStatementOptional:"Bank statement (optional)",bankAccountVerification:"Bank account verification",bankStatementDocumentTypeLabel:"Upload a document to confirm your bank account information. We need to see this document so we can set up your payouts.",requirements:"Requirements:",accountHolderNameMatchesWithBusinessOrTradingName:"The account holder name on the document has to match the legal business or trading name of your company",accountNumberOrIbanVisible:"The account number or IBAN needs to be visible",showsCountryOfBankAccount:"Shows the country where the bank account is located (for banks in the EU, the country is included in the IBAN)",hasTobeOfficialDocumentFromBank:"It has to be official document from a bank, demonstrated by a bank logo, the bank name, or a bank-specific font",ifDocumentMoreThan12months:"If your document is older than 12 months, then it should contain a statement with the company\u2019s assets and liabilities. You will need to have it signed and dated by someone with decision-making or signing power within the company. Make sure the date, title, and legal entity name are included.",whyDoINeedToFillInThisInformation:"Why do I need to fill in this information?",reasonForFillingCompanyRegistrationDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingCompanyAddressDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingIndividualPersonalDetails:"We have to make sure that everyone who uses our services is who they say they are. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingIndividualAddressDetails:"We have to make sure that everyone who uses our services is who they say they are. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingPayoutAccountDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingPayoutDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",whatIsTheDifferenceBetweenTheseRoles:"What is the difference between these roles?",ownerGuideDescription:"An <strong>owner</strong> is someone who owns 25% or more of the company, through voting rights, equity, or similar.",controllingPersonGuideDescription:"A <strong>controlling person</strong> is not an owner, but has the authority to make major business decisions.",signatoryGuideDescription:"A <strong>signatory</strong> has been given authority to sign official documents on behalf of the company. Usually a signatory is also an owner or a controlling person.",directorGuideDescription:"A <strong>director</strong> is someone appointed to manage a company's business and affairs. Who your directors are can be found on the companies register.",someoneAppointedToManageACompanysBusinessAndAffairs:"Someone appointed to manage a company's business and affairs.",whatIfDocumentIsMoreThan12MonthsOld:"What if my document is more than 12 months old?",description:"Description (optional)",descriptionHelper:"Attach description to this payout account",depositTicket:"Deposit ticket / deposit form",screenshotOfOnlineBankingEnviroment:"Screenshot of online banking environment",officialEmailOrALetterFromYourBank:"Official email or a letter from your bank",cheques:"Cheques",releveDidentiteBancaire:"Relev\xe9 d'Identit\xe9 Bancaire (RIB)",successFullyRemovedDecisionMaker:"Successfully removed a decision maker",failedToRemoveDecisionMaker:"Failed to remove a decision maker",chamberOfCommerceExtract:"Chamber of Commerce extract",taxNumberCorporateNumber:"Tax Number / Corporate Number",companyLegalName:"Company legal name",companyName:"Company name",companyType:"Company type",taxReferenceNumber:"Tax reference number",SST:"SST",companyProfile:"Company profile",companyNumber:"Company number",RfcDocument:"RFC Document",RFC:"RFC",companyRegistrationDocument:"Company registration document",businessName:"Business name",typeOfCompany:"Type of company",typeOfIdentity:"Type of identity",typeOfIdentitySubtitle:"We need to see a government-issued photo ID document that belongs to the person mentioned above.",CNPJ:"CNPJ",businessNumber:"Business number",doingBusinessAs:"Doing business as",taxIdentificationNumber:"Tax identification number",irdDocument:"IRD document",irdNumber:"IRD number",australianBusinessNumberAbn:"Australian business number (ABN)",australianBusinessNumberAcn:"Australian company number (ACN)",enterpriseNumber:"Enterprise Number",NIP:"NIP (Numer identyfikacji podatkowej)",NIPC:"NIPC (N\xfamero de Identifica\xe7\xe3o de Pessoa Colectiva)",numerodeIVA:"N\xfamero de IVA",NIF:"NIF (N\xfamero de Identificaci\xf3n Fiscal)",NIFdeIVA:"N\xfamero de Identificaci\xf3n a efectos de IVA",partitaIVA:"Partita IVA",organisationsnummer:"Organisationsnummer",momsregistreringsnummer:"Momsregistreringsnummer",codiceFiscaleOrCCIAA:"Codice fiscale or CCIAA","UST-ID":"UST-ID (Umsatzsteuer-Identifikationsnummer)",DIC:"DI\u010c (Da\u0148ov\xe9 identifika\u010dn\xed \u010d\xedslo)",ICO:"IC\u030cO (Identifikac\u030cni\u0301 c\u030ci\u0301slo)","USt-IdNr":"USt-IdNr. (Umsatzsteuer-Identifikationsnummer)",handelsregisternummer:"Handelsregisternummer",NumeroDeTVA:"Num\xe9ro de TVA",organisasjonsnummer:"Organisasjonsnummer",skattenummer:"Skattenummer",verificationErrorMessage:"Some information couldn\u2019t be verified. Click to see what needs to be adjusted.",remediationFormErrorMessage:"Some information couldn\u2019t be verified. Information in this form may need to be adjusted.",youHaveUnsavedChanges:"You have unsaved changes",areYouSureToLeave:"Are you sure you want to leave?",cancel:"Cancel","save&Leave":"Save & leave",leave:"Leave",employerIdentificationNumber:"Employer identification number",companyRegistrationNumber:"Company registration number",euVatNumber:"EU VAT number",vatNumber:"VAT number",regonKrsNumber:"REGON / KRS number",registrationNumber:"Registration number",charityNumber:"Charity number",SIRETOrSIREN:"SIRET or SIREN","RNA/SIREN/SIRETNumber":"RNA number/SIREN number/SIRET number",firmenbuchnummer:"Firmenbuchnummer",firmenbuchnummerOrZVR:"Firmenbuchnummer or ZVR number","stepsX/YofForm":"Step %{activeFormIndex}/ %{totalForms} of %{taskName}",areYouPartOfTrust:"Are you part of a trust?",isBusinessPartOfTrust:"Is your business part of a trust?",no:"No",yes:"Yes",isPartOfTrust:"Is part of a trust",informationCouldNotBeSubmitted:"Information couldn\u2019t be submitted",fieldHasUnsupportedFormats:"%{fieldName} has an unsupported format.",updateTheInformation:"Update the information",andResubmit:"and submit again.",someFieldsHaveUnsupportedFormatedUpdateInfoAndResubmit:"Some fields have unsupported formats. Update the information and submit again.",trustType:"Type of trust agreement",cashManagementTrust:"Cash management trust",corporateUnitTrust:"Corporate unit trust",deceasedEstate:"Deceased estate",discretionaryInvestmentTrust:"Discretionary investment trust",discretionaryServicesManagementTrust:"Discretionary services management trust",discretionaryTradingTrust:"Discretionary trading trust",firstHomeSaverAccountsTrust:"First home saver accounts trust",fixedTrust:"Fixed trust",fixedUnitTrust:"Fixed unit trust",hybridTrust:"Hybrid trust",listedPublicUnitTrust:"Listed public unit trust",otherTrust:"Other trust",pooledSuperannuationTrust:"Pooled superannuation trust",publicTradingTrust:"Public trading trust",unlistedPublicUnitTrust:"Unlisted public unit trust",countryOfEstablishment:"Country of establishment",nameOfTrustAgreement:"Name of trust agreement",typeOfTrustAgreement:"Type of trust agreement",weFoundTheFollowingIssues:"We found the following issues:",reviewTheInformationBelowAndCorrectMistakesOr:"Review the information below and correct any mistakes, or",uploadTheRequestedDocuments:"upload the requested documents",uploadTheFollowingDocuments:"upload the following documents:",uploadDocumentAndDocument:"%{uploadDocumentOne} and %{documentTwo}",thenResubmit:"Then resubmit.",isTrustOperationAddressSame:"Is there a different address for your trust's operations?",trustDetails:"Trust Details",trustDetailsDescription:"To prepare your account, we need information about your trust.",provideTrustDetails:"Enter trust details",addTrustMembers:"Add trust members",trustDocument:"Trust document",trustDocumentDescription:"We won\u2019t be able to verify your trust without all required information. Make sure the following information is visible on your document:",nameOfTrust:"Name of trust",fullLegalNamesOfAnyAppointers:"Full legal name of any appointers included in the deed",dateDeedWasSigned:"Date deed was signed",settlerDetailsIncl:"Settlor details including their full legal name and home address",trusteeDetailsIncl:"Trustee details including full legal name, CAN or ABN, and address",beneficiariesDetailsIncl:"Beneficiaries details including number of beneficiaries, full legal names, and any default beneficiaries",trustMembers:"Trust members",trustMembersDescription:"Provide information for the secondary trustee, settlor, protector and beneficiary associated with the trust contract.",trustee:"Trustee",beneficiary:"Beneficiary",protector:"Protector",settlor:"Settlor",ultimateBeneficialOwner:"Ultimate beneficial owner",addTrustMember:"Add trust member",beneficialOwnersOfTrustProperty:"The beneficial owners of the trust property.",personAppointmentUnderTrustInstrument:"The person appointed under the trust instrument to direct or restrain the trustees in relation to their administration of the trust.",legalOwnerOfProperty:"The legal owner of the property in trust.",entityEstablishingTrust:"The entity that establishes a trust.",entityOwning25OrMoreOfTrust:"The entity who owns 25% or more of the property in trust.",failedToFetchTrustDetails:"Failed to fetch the trust details",failedToFetchTrustMemberDetails:"Failed to fetch the trust member details",failedToFetchLegalEntityDetails:"Failed to fetch the legal entity's details",editTrustMember:"Edit details of %{trustMember} ",removeTrustMember:"Remove %{trustMember}",successFullyRemovedTrustMember:"Successfully removed trust member",failedToRemoveTrustMember:"Failed to remove trust member",editEntityDetails:"Edit entity details",editOwnerOfTrustMember:"Edit owner of %{trustMember}",editEntityOwner:"Edit owner details",addEntityOwner:"Add owner details",addOwnerToTrustMember:"Add owner of %{trustMember}",whatTypeOfYourMembersEntity:"What\u2019s the type of your member\u2019s entity?",naturalPersonTitle:"Natural person",naturalPersonDescription:"He/she doesn\u2019t have any business.",businessEntityTitle:"Business entity",businessEntityDescription:"This is usually a sole proprietor, private company, public corporation, partnership, or non profit.",roleAndEntityType:"Role and entity type",helpUsVerifyCompany:"Help us verify this company.",providePersonalDetailsOfOwner:"Please provide the personal details of the owner.",memberDetails:"Member details",good:"Good",notCutOff:"Not cut off",notBlurry:"Not blurry",notExpired:"Not Expired",noGlare:"No glare",selectDocumentType:"Select document type",registrationDocumentSubTitle:"Upload your company\u2019s business registration document. We need to see this document so we can verify your company.",documentIssuedByGovernmentAuthority:"The document has to be issued by a government authority. It\u2019s usually given when a business is created at the local commercial register",uploadTaxationDocument:"Upload a a tax return or taxation registration document. We need to see this document so we can verify that your tax ID number belongs to your company.",containsNameOfCompany:"Contains the name of your company or organization",documentShowsTaxIdOfCompany:"The document shows the tax ID number of the company",issuedByTheTaxAuthority:"Issued by the tax authority or government of the country where the company is registered",providePageWithPhotoAndCode:"Provide the page with the photo, including the code on the bottom",constitutionalDocument:"Constitutional document",solePropDetails:"Sole proprietor details",enterSoleProprietorDetails:"Enter sole proprietor details",selectAccountHolder:"Select account holder",nameOfBankAccountHolder:"We need to know about the bank account where you want to receive your payouts. What is the name of the account holder of that bank account?",myName:"My name",myNameDescription:"It\u2019s a personal bank account held in my own name",mySoleTraderName:"My sole trader name",mySoleTraderNameDescription:"The account is in my name, but I am registered as a sole trader, sole proprietor, or freelancer",theCompanyIWorkFor:"The company I work for",theCompanyIWorkForDescription:"It is a company bank account for a private, public, or non-profit organization",aTrust:"A trust",aTrustDescription:"The account belongs to a trust, a trustee controls the account for the benefit of a beneficiary",aPartnership:"A partnership",aPartnershipDescription:"The account belongs to a jointly owned business where two or more people operate and share profits",anAssociation:"An association",anAssociationDescription:"The account belongs to a group of people acting together for a specific non-commercial purpose",legalNameOfSoleProprietor:"Legal name of sole proprietor",failedToFetchSoleProp:"Failed to fetch the sole propietor",uniqueIdentificationCode:"Unique identification code (\u0415\u0418\u041a/UIC)",identifikacionenNomerDDS:"VAT number (\u0414\u0414\u0421)",MBS:"Mati\u010dni broj subjekta trgova\u010dkog suda (MBS)",PDVIdBrojOIB:"PDV Id. Broj OIB",cyRegistrationNumber:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u0395\u03b3\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2",arithmosEngraphes:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u0395\u03b3\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2 \u03a6.\u03a0.\u0391.","CVR-nummer":"CVR-nummer",momsregistreringsnummerOrStamregister:"Momsregistreringsnummer (CVR) or Stamregister erhverv (SE-nummer)",registrikood:"Registrikood",kaibemaksukohustuslaseNumber:"K\xe4ibemaksukohustuslase number",YTunnus:"Y-TUNNUS",arvonlisaveronumeroMervardesskattenummer:"Arvonlis\xe4veronumero Merv\xe4rdesskattenummer","GEMI-number":"GEMI number or \u0391\u03a1\u0399\u0398\u039c\u039f\u03a3 \u0393.\u0395.\u039c\u0397 (\u0393\u03b5\u03bd\u03b9\u03ba\u03bf\u03c5\u0301 \u0395\u03bc\u03c0\u03bf\u03c1\u03b9\u03ba\u03bf\u03c5\u0301 \u039c\u03b7\u03c4\u03c1\u03c9\u0301\u03bf\u03c5)",grTaxId:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03a6\u03bf\u03c1\u03bf\u03bb\u03bf\u03b3\u03b9\u03ba\u03bf\u03cd \u039c\u03b7\u03c4\u03c1\u03ce\u03bf\u03c5 Arithm\xf3s Forologikou M\u0113tr\u1e53ou (\u0391\u03a6\u039c)",huRegistrationNumber:"Ce\u0301gjegyze\u0301ksza\u0301m",huTaxId:"K\xf6z\xf6ss\xe9gi ad\xf3sz\xe1m",valueAddedTaxIdentificationNumber:"Value added tax identification number (VAT)",lvRegistrationNumber:"Komersanta re\u0123istr\u0101cijas numurs (NBR)",lvTaxId:"Pievienot\u0101s v\u0113rt\u012bbas nodok\u013ca re\u0123istr\u0101cijas numurs (PVN)",ltRegistrationNumber:"Juridini\u0173 asmen\u0173 registro kodas",PVMmoketojoKodas:"PVM mok\u0117tojo kodas",luRegistrationNumber:"Num\xe9ro registre de commerce et des soci\xe9t\xe9s (RCS)",numeroDIdentificationALATaxe:"Num\xe9ro d'identification \xe0 la taxe sur la valeur ajout\xe9e (No. TVA)",numarOrdineRegistrulComertului:"Numar de ordine in registrul comertului",codulDeIdentificareFiscala:"Codul de identificare fiscal\u0103 (CIF)",skRegistrationNumber:"Identifikac\u030cne\u0301 c\u030ci\u0301slo (I\u010cO)",skTaxId:"Identifika\u010dn\xe9 \u010d\xedslo pre da\u0148 z pridanej hodnoty (I\u010c DPH)",siRegistrationNumber:"Mati\u010dna \u0161tevilka",siTaxId:"Identifikacijska \u0161tevilka za DDV (ID za DDV)",chRegistrationNumber:"Unternehmens-Identifikationsnummer (UID), Num\xe9ro d\u2019identification des entreprises (IDE), Numero d\u2019identificazione delle imprese (IDI), or CH-number",Mehrwertsteuernummer:"Mehrwertsteuernummer (MwST), Num\xe9ro de TVA, Numero dell\u2019imposta sul valore aggiunto (IVA), VAT number",Xdigits:"%{digits} digits",XtoYdigits:"%{x} to %{y} digits",XorYdigits:"%{x} or %{y} digits",Xcharacters:"%{x} characters","9digitsOr14digits":"9 digits or 14 digits","1character5to7digits":"1 letter + 5-7 digits",Wchar9or14digits:"W123456789, 9 or 14 digits","1char8digits":"X99999999","2characteres6or7digits":"11 digits, XX123456 or XX1234567","7or8or12characteres":"7, 8 or 12 digits or characters",Cchar5digits:"C99999",cop1to8digits:"C, O, or P, followed by a number from 1 up to 8 digits",selectAccountHolderDescription:"We need to know about the bank account where you want to receive your payouts. What is the name of the account holder of that bank account?","8digitsOptional-":'8 digits; last digit can be preceded by an optional "-"',provideAllOwners:"Provide <strong>all owners</strong> holding 25% or more of your company.",ifNoOwnersSpecifyControllingPersons:"If you don\u2019t have any owners holding 25% or more, then specify <strong>all controlling persons</strong>. Otherwise you can skip this.",provideAtLeastOneSignatory:"Provide at least <strong>1 signatory</strong>.",provideOneControllingPerson:"Provide <strong>1 controlling person</strong>.",textToVerifyAccount:"For you to receive your payouts, we need a verified bank account.",mobileApplication:"Mobile Application",onOnlineBankingEnvironment:"Or web version of online banking environment",dontHaveAccessOnlineBanking:"Don\u2019t have access to online banking environment?",confirmPayoutManually:"Confirm the payout account manually",noteManualTakesLonger:"Note that manual review takes longer.",accountVerification:"Account Verification",verifyWith:"Verify with",documentVerification:"Document verification",youHaveSuccessfullyProvidedTheIdDocument:"You\u2019ve successfully provided the ID document.",submitIdDocumentsAgain:"Submit ID documents again",madeAMistake:"Made a mistake?",canNotCompleteInstantVerification:"Can not complete instant verification?",goBackAndProvideDocumentScans:"Go back and provide document scans",identityCard:"Identity card",uploadOneOfTheFollowing:"Upload one of the following so we can verify your information:",documentIssuedWithinLastYear:"Note! The document needs to be issued within the last year. If it is older, make sure it contains a signature and a state of affair not older than a year.",learnMore:"Learn more.",doingBusinessAsNameFiling:"Doing business as-name filling",taxFiling:"Tax-filling",continueAsCompany:"Continue as a company?",continueAsIndividual:"Continue as an individual?",indicatedPayoutToCompany:"You indicated that you want to be paid out to a bank account that is owned by a company, such as a private company, public company, partnership, or non-profit organization. This means that we need to collect some information about your company too.",continueSigningUpAsCompany:"Do you want to continue signing up with your company information?",indicatedPayoutToPersonalAccount:"You indicated that you want to be paid out to a bank account that is owned by you personally. This means you will continue as an individual, not a company. However, if you operate as a private company, public company, partnership, or non-profit organization, then you cannot continue as an individual.",continueSigningUpAsIndividual:"Do you want to continue signing up as an individual?",continue:"Continue",noGoBack:"No, go back",continueCompany:"Continue as company",continueIndividual:"Continue as individual",addManually:"Add manually",searchAddress:"Search address",startTypingTheAddress:"Start typing the address",addresses:"Addresses",loading:"Loading",businessIncorporationNumber:"Business incorporation number",doNotHaveBusinessIncorporationNumber:"I do not have a Business incorporation number",socialInsuranceNumber:"Social insurance number",verificationMethod:"Verification Method",verifyViaMobileBankAppOrBankWebsite:"Verify the account via mobile bank app or bank website",provideAccountDetailsAndUploadBankStatement:"Provide account details and upload a scan of a bank statement",instantVerificationDescription:"To quickly and safely verify the account you need access to the online banking environment associated with this account holder.",manualVerificationDescription:"Manually provide your account details and upload a bank statement.",poweredBy:"Powered by",youSuccessfullyVerifiedAccount:"You\u2019ve successfully verified your bank account.",verifyBankAccountAgain:"Verify bank account again",accountName:"Account name",mayTakeAFewHoursOrDays:"May take a few hours or days",instant:"Instant",tink:"Tink",trustly:"Trustly",isOurTrustedPartnerHelpingSpeedUpSetup:"%{provider} is our trusted partner helping speed up your account setup by instantly verifying your bank account.",howDoesVerificationWithOurPartnerWorks:"How does verification with our partner %{provider} work?",selectTheBankToReceivePayouts:"After this page, you can select the bank where you would like to receive the payouts.",loginIntoYourBankingEnvironment:"Log into your banking environment via mobile app or internet browser.",yourBankWillConfirmYourAccountDetails:"Your bank will confirm your account details to us.",adyenWillOnlyGetTemporaryAccess:"Adyen will only gain temporary access to your bank details, and your data is never shared with third parties.",instantVerification:"Instant verification",xCharactersLeft:"%{charactersLeft} characters left",goBack:"Go back",doNotHaveABN:"I do not have an ABN","doNotHaveUEN/GST":"I do not have an/a UEN/GST","doNotHaveIRD/GST":"I do not have an/a IRD/GST",businessRegistrationNumber:"Business registration number",doNotHaveBusinessRegistrationNumber:"I do not have a Business registration number",doNotHaveBusinessNumber:"I do not have a Business number","UEN/GST":"Unique Entity Number (UEN)/Goods and Services Tax (GST)","IRD/GST":"Inland Revenue Department Number (IRD No)/Goods and Services Tax (GST)",enterNameExactlyAsAppearInID:"Enter your first name(s) exactly as it appears on your identity document",enterLastNameExactlyAsAppearInID:"Enter your last name(s) exactly as it appears on your identity document",takePhotoOriginalDocumentWithPhone:"Take a photo of the original ID document with your phone",instantIDVerificationDescription:"With access to a physical ID document and a phone you can go through verification instantly!",manualIDVerificationDescription:"Upload a good quality copy of your ID so we can verify it offline. Make sure it is clear with all corners and letters visible.",uploadScanOriginalIDDocument:"Upload a scan of the original ID document",takesLonger:"Takes longer",howVerificationWithOnfidoWorks:"How does verification with our partner Onfido works?",onfidoIsOurTrustedPartner:"Onfido is our trusted partner helping speed up your account setup by verifying your identity in real-time. ",usePhoneToScanId:"Use your phone to scan the ID",onfidoWillGiveFeedbackInRealTime:"Onfido will give you feedback in real-time",theIdCheckWillBeAutomaticallyValidated:"With the right capture, the ID check will be automatically validated",adyenKeepsDataAsLongAsLegallyRequired:"Adyen only keeps your data for as long as we\u2019re legally required to. It won\u2019t be used for any other purposes or by other third parties than those stated.",errorMessage_1_10:"Information couldn\u2019t be verified",errorMessage_1_11:"Document didn\u2019t meet requirements",errorMessage_1_12:"Legal entity declined",errorMessage_1_30:"Individual details couldn't be verified",errorMessage_1_31:"ID document is needed",errorMessage_1_32:"ID document couldn\u2019t be processed",errorMessage_1_33:"ID document didn\u2019t meet requirements",errorMessage_1_34:"Image of the ID document didn\u2019t meet requirements",errorMessage_1_35:"Individual details didn't match the ID document",errorMessage_1_36:"Proof of residency didn\u2019t meet requirements",errorMessage_1_37:"Image of the proof of residency didn't meet the requirements",errorMessage_1_38:"Individual details didn't match the proof of residency",errorMessage_1_39:"Proof of national ID number didn't meet requirements",errorMessage_1_40:"Image of the proof of national ID number didn't meet the requirements",errorMessage_1_41:"Individual details didn't match the proof of national ID number",errorMessage_1_50:"Organization details couldn\u2019t be verified",errorMessage_1_51:"Organization details didn't match the document",errorMessage_1_52:"Registration document didn\u2019t meet requirements",errorMessage_1_53:"Tax document didn't meet requirements",errorMessage_1_54:"Proof of address didn't meet requirements",errorMessage_1_55:"Proof of ownership is needed",errorMessage_1_56:"Organization ownership couldn't be verified",errorMessage_1_57:"Submitted affiliation document didn't meet the requirements",errorMessage_1_60:"Legal entity details couldn't be verified",errorMessage_1_61:"Constitutional document didn't meet requirements",errorMessage_1_62:"Legal entity details didn't match the constitutional document",errorMessage_1_70:"Bank account couldn't be verified",errorMessage_1_71:"Bank account details couldn't be verified",errorMessage_1_72:"Verification could not be completed",errorMessage_1_73:"Bank account access could not be authenticated",errorMessage_1_74:"Bank statement is needed",errorMessage_1_75:"Bank statement didn\u2019t meet requirements",errorMessage_1_76:"Bank details didn't match the bank statement",errorMessage_1_1000:"Verification failed. Legal entity declined",errorMessage_1_1001:"There were some technical issues in the verification process.",errorMessage_1_1002:"There are more questions about the submitted information.",errorMessage_1_1003:"The document contained sensitive data.",errorMessage_1_3000:"The user couldn't be verified.",errorMessage_1_3001:"The name and date of birth couldn't be verified.",errorMessage_1_3002:"The name and national ID number couldn't be verified.",errorMessage_1_3003:"The name and residence state couldn't be verified.",errorMessage_1_3004:"The name and residence country couldn't be verified.",errorMessage_1_3005:"The national ID number was entered incorrectly.",errorMessage_1_3006:"The name didn't match the national ID number.",errorMessage_1_3007:"An incorrect national ID number was entered.",errorMessage_1_3008:"The ID document image was incomplete.",errorMessage_1_3009:"The photo on the ID document couldn\u2019t be recognized.",errorMessage_1_3010:"The ID document image was incomplete or too blurry.",errorMessage_1_3011:"The ID document image was in black and white.",errorMessage_1_3012:"The image couldn\u2019t be recognized as a supported ID document.",errorMessage_1_3013:"The ID document wasn't a supported document type.",errorMessage_1_3014:"The ID document image didn\u2019t contain the MRZ code.",errorMessage_1_3015:"The ID document was expired.",errorMessage_1_3016:"The ID document image was of too low quality.",errorMessage_1_3017:"The ID document image was a scan.",errorMessage_1_3018:"The ID document image was too blurry.",errorMessage_1_3019:"The ID document was expired.",errorMessage_1_3020:"The ID document wasn't a supported document type.",errorMessage_1_3021:"The ID document MRZ code is unreadable.",errorMessage_1_3022:"The ID document image only showed one side of the ID document.",errorMessage_1_3023:"The ID document image only showed parts of the ID document.",errorMessage_1_3024:"The ID document wasn't valid.",errorMessage_1_3025:"The state didn\u2019t match the one on the ID document.",errorMessage_1_3026:"The ID document didn\u2019t show an issuing state.",errorMessage_1_3027:"The ID document wasn't valid.",errorMessage_1_3028:"The ID number didn\u2019t match the one on the document.",errorMessage_1_3029:"The ID document didn\u2019t show a document number.",errorMessage_1_3030:"The ID document wasn't valid.",errorMessage_1_3031:"The ID document wasn't valid.",errorMessage_1_3032:"The first name didn\u2019t match the one on the ID document.",errorMessage_1_3033:"The last name didn\u2019t match the one on the ID document.",errorMessage_1_3034:"The date of birth didn\u2019t match the one on the ID document.",errorMessage_1_3035:"The country didn\u2019t match the one on the ID document.",errorMessage_1_3036:"The ID document image was too low quality.",errorMessage_1_3037:"The last name didn't match the one on the proof of residential address.",errorMessage_1_3038:"The first name didn\u2019t match the one on the proof of residential address.",errorMessage_1_3039:"The date of birth didn\u2019t match the one on the proof of residential address.",errorMessage_1_3040:"The proof of residential address didn\u2019t show the date it was issued.",errorMessage_1_3041:"The proof of residential address didn\u2019t show a name.",errorMessage_1_3042:"The proof of residential address didn't show an issuing country.",errorMessage_1_3043:"The proof of residential address wasn't a supported document type.",errorMessage_1_3044:"The proof of residential address was too old.",errorMessage_1_3045:"The proof of residential address image was of too low quality.",errorMessage_1_3046:"The address on the proof of residential address was a PO box.",errorMessage_1_3047:"The proof of national ID number wasn't a supported document type.",errorMessage_1_3048:"The last name didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3049:"The first name didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3050:"The date of birth didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3051:"The proof of national ID number image was of too low quality.",errorMessage_1_3062:"The name and 4 digit SSN couldn't be verified.",errorMessage_1_5000:"The legal business name couldn't be verified.",errorMessage_1_5001:"The tax ID number couldn't be verified.",errorMessage_1_5002:"The state couldn't be verified.",errorMessage_1_5003:"The legal name didn't match the one on the registry.",errorMessage_1_5004:"The legal name didn't match the one on the registry.",errorMessage_1_5005:"The legal name didn't match the one on the registry.",errorMessage_1_5006:"The country didn't match the one on the registry.",errorMessage_1_5007:"The registration number didn't match the one on the registry.",errorMessage_1_5008:"The tax ID didn't match the one on the registry.",errorMessage_1_5009:"The registration number was provided as tax ID.",errorMessage_1_5010:"The company details couldn't be verified. ",errorMessage_1_5011:"The trade name (doing business as) was entered.",errorMessage_1_5012:"The submitted company type didn\u2019t match the one on the registry.",errorMessage_1_5013:"The company was not found in the database.",errorMessage_1_5014:"The registration number couldn't be verified. ",errorMessage_1_5015:"The registration number didn't match the legal business name.",errorMessage_1_5016:"The tax ID number couldn't be verified.",errorMessage_1_5017:"The tax ID number didn't match the legal business name.",errorMessage_1_5018:"The business address couldn't be verified.",errorMessage_1_5019:"The trade name (doing business as) was entered instead of the legal name.",errorMessage_1_5020:"Registration document is missing.",errorMessage_1_5021:"The registration document was too low quality.",errorMessage_1_5022:"The registration document was too old.",errorMessage_1_5023:"The submitted company type didn't match the one on the registration document.",errorMessage_1_5024:"The registration document did not show the company type.",errorMessage_1_5025:"The address on the company registration document was a residential address.",errorMessage_1_5026:"The address on the company registration document was a PO box.",errorMessage_1_5027:"The business address didn't match the one on the company registration document.",errorMessage_1_5028:"The registration number didn't match the one on the company registration document.",errorMessage_1_5029:"The legal business name didn't match the one on the company registration document.",errorMessage_1_5030:"The country didn't match the one on the company registration document.",errorMessage_1_5031:"The company registration document didn't show a legal business name.",errorMessage_1_5032:"The company registration document didn't show a registration number.",errorMessage_1_5033:"The state didn't match the one on the company registration document.",errorMessage_1_5034:"The company registration document wasn't a supported document type.",errorMessage_1_5035:"The company registration document is not supported.",errorMessage_1_5036:"Tax document is missing.",errorMessage_1_5037:"The country didn't match the one on the tax document.",errorMessage_1_5038:"The tax document wasn't a supported document type.",errorMessage_1_5039:"The tax document was too low quality.",errorMessage_1_5040:"The tax document was too old.",errorMessage_1_5041:"The legal name didn't match the one on the tax document.",errorMessage_1_5042:"The tax ID number didn't match the legal business name.",errorMessage_1_5043:"The tax document didn't show a tax ID number.",errorMessage_1_5044:"The tax document didn't show a legal business name.",errorMessage_1_5045:"The state didn't match the one on the proof of address.",errorMessage_1_5046:"Ownership data seems incorrect.",errorMessage_1_5047:"Ownership data seems to be missing.",errorMessage_1_5048:"Provide official ownership documentation.",errorMessage_1_5049:"The affiliation document was not sufficient to prove the 100% affiliation.",errorMessage_1_5050:"The affiliation document was not official.",errorMessage_1_5051:"Signing person on the affiliation document could not be verified",errorMessage_1_5052:"The affiliation document verifies the payout entity is not 100% affiliated with the company. Setup can't be continued.",errorMessage_1_5053:"The affiliation document was not issued within the last 6 months",errorMessage_1_6000:"The legal name couldn't be verified.",errorMessage_1_6001:"The legal name didn't match the registration number.",errorMessage_1_6002:"The registration number couldn't be verified.",errorMessage_1_6003:"Legal entity type couldn't be verified.",errorMessage_1_6004:"The country of governing law couldn't be verified.",errorMessage_1_6005:"Constitutional document is missing.",errorMessage_1_6006:"The constitutional document was too old.",errorMessage_1_6007:"Legal name didn't match the constitutional document.",errorMessage_1_6008:"Country of governing law didn't match the constitutional document.",errorMessage_1_6009:"The constitutional document didn't show a legal name.",errorMessage_1_6010:"The constitutional document didn't show a registration number.",errorMessage_1_6011:"The legal entity type didn't match the one on the constitutional document.",errorMessage_1_7000:"The bank account couldn't be verified.",errorMessage_1_7001:"The routing number wasn't valid.",errorMessage_1_7002:"The bank account number wasn't valid.",errorMessage_1_7003:"The bank account couldn't be verified.",errorMessage_1_7004:"The bank account entered was invalid.",errorMessage_1_7005:"The verification code wasn't valid.",errorMessage_1_7006:"There were too many attempts to request the verification code.",errorMessage_1_7007:"The verification code wasn't entered.",errorMessage_1_7008:"There is no bank document to verify.",errorMessage_1_7009:"The bank document didn't show a bank account number.",errorMessage_1_7010:"The bank document didn't show the account owner name.",errorMessage_1_7011:"The bank account number didn't match the one on the bank document.",errorMessage_1_7012:"The bank account owner name appearing in the document does not match the verified legal name.",errorMessage_1_7013:"The bank document was too low quality.",errorMessage_1_7014:"The bank document wasn't a supported document type.",errorMessage_1_7015:"The bank account country didn't match the one on the bank document.",errorMessage_1_7016:"The branch code didn\u2019t match the one on the bank document.",errorMessage_1_7017:"The bank account currency didn't match the one on the bank document.",errorMessage_1_7018:"The bank document wasn't officially issued by the bank.",errorMessage_1_7019:"The bank document wasn't issued in the past 12 months.",errorMessage_1_7020:"The bank name didn't match the one on the bank document.",errorMessage_1_7021:"The bank document didn't show an official bank logo.",errorMessage_1_7022:"The bank document didn't show an official bank stamp.",remediationMessage_1_100:"No remediation possible",remediationMessage_1_101:"Contact Support",remediationMessage_1_102:"Upload a different document",remediationMessage_1_300:"Update individual details",remediationMessage_1_301:"Upload an ID document",remediationMessage_1_302:"Upload a different ID document",remediationMessage_1_303:"Upload a different image of the ID document",remediationMessage_1_304:"Upload proof of residency",remediationMessage_1_305:"Upload a different proof of residency",remediationMessage_1_306:"Upload a different image of the proof of residency",remediationMessage_1_307:"Upload a proof of national ID number",remediationMessage_1_308:"Upload a different proof of national ID number",remediationMessage_1_309:"Upload a different image of the proof of national ID number",remediationMessage_1_316:"Provide complete 9-digits Social Security Number number or upload an ID document if you don\u2019t have SSN.",remediationMessage_1_500:"Update organization details",remediationMessage_1_501:"Upload a registration document",remediationMessage_1_502:"Upload a different registration document",remediationMessage_1_503:"Upload a tax document",remediationMessage_1_504:"Upload a different tax document",remediationMessage_1_505:"Upload a proof of address",remediationMessage_1_506:"Upload a different proof of address",remediationMessage_1_507:"Update organization ownership details",remediationMessage_1_508:"Upload a proof of ownership",remediationMessage_1_509:"Upload a different affiliation document",remediationMessage_1_510:"Ensure signing person has the rights to represent the organization or is a listed professional member (lawyer, accountant) in your country of business and upload the right document",remediationMessage_1_511:"Upload a document that proves the payout entity is 100% affiliated with the legal entity",remediationMessage_1_600:"Update legal entity details",remediationMessage_1_601:"Upload a constitutional document",remediationMessage_1_602:"Upload a different constitutional document",remediationMessage_1_700:"Update bank account details",remediationMessage_1_701:"Use different bank account",remediationMessage_1_702:"Use other means of bank account verification",remediationMessage_1_703:"Upload a bank statement",remediationMessage_1_704:"Upload a different bank statement",remediationMessage_1_705:"Upload an official bank statement",sameNameAsLegalName:"Same as legal name of the company",whereCanIFindTheseNumbersOnMyDriversLicense:"Where can I find these numbers on my driver's license?",whereToFindNumbersOnDriversLicense:"Depending on the issuing state the position of these numbers might differ, but the license number is always on the front side of the card and the card number is in most cases located on the back of the license.",iStillCantFindIt:"I still can't find it.",patriotActDisclosureTitle:"Important Information You Need to Know About Opening An Account",patriotActDisclosureTextParagraph1:"To help the government fight the funding of terrorism and money laundering activities, Federal law requires financial institutions to obtain, verify, and record information that identifies each person (individual or entity) who opens an account and certain individuals who are associated with an account.",patriotActDisclosureTextParagraph2:"What this means: when you open an account, we will ask for your name, address, taxpayer identification number and other information that will allow us to identify you."},d={},l={},c="countries",u=e=>`states/${e}`,m="phone-prefixes",p="translations";function g(e){return{getCountryName:t=>{const a=b(c,e);return y(a,t)},getStateName:(t,a)=>{const r=b(u(a),e);return y(r,t)},getPhonePrefix:t=>{const a=b(m,e);return y(a,t)},setDataset:(t,a)=>{const r=b(t,e);l[r]=a},getDataset:t=>{const a=b(t,e);return l[a]},getDatasetKey:t=>b(t,e)}}const y=(e,t)=>{if(l[e]){const a=(e=>(d[e]||(d[e]={},l[e].forEach((({id:t,name:a})=>{d[e][t]=a}))),d[e]))(e);return a[t]}return null},b=(e,t)=>`${e}_${t}`.toLowerCase(),f="fetch"in window?window.fetch:e.fetch;function h(e,t){switch(t){case"silent":return null;case"info":case"warn":case"error":return console[t](e);default:throw new Error(e)}}function v(e,t,a="json"){const{errorLevel:r="warn",loadingContext:n,path:i,clientKey:o=""}=e,s=function(e,t){const{headers:a=[],method:r="GET"}=e;return Object.assign({method:r,mode:"cors",cache:"default",credentials:"same-origin",headers:Object.assign({Accept:"application/json, text/plain, */*","Content-Type":"POST"===r?"application/json":"text/plain"},a),redirect:"follow",referrerPolicy:"no-referrer-when-downgrade"},t&&{body:JSON.stringify(t)})}(e,t),d=function(e,t,a){let r=`${e}${t}`;return a&&(r+=`?clientKey=${a}`),r}(n,i,o);return f(d,s).then((t=>{if(t.ok)return t[a]();const n=e.errorMessage||`Service at ${d} is not available`;return e.errorHandler?e.errorHandler(t[a]()):h(n,r)})).catch((t=>h(e.errorMessage||`Call to ${d} failed. Error= ${t}`,r)))}function _(e,t){return v(Object.assign(Object.assign({},e),{method:"GET"}),t)}function N(e,t){return v(Object.assign(Object.assign({},e),{method:"POST"}),t)}function O(e,t,a,r){const n=g(a),i=n.getDataset(e);if(i)return new Promise((e=>e(i)));return _({loadingContext:t,errorLevel:"warn",errorMessage:`Dataset ${e} is not available`,path:a?`datasets/${e}/${a}`:`datasets/${e}`,clientKey:r}).then((t=>(n.setDataset(e,t),t)))}const I=e=>e.toLowerCase().substring(0,2);function E(e){const t=e.replace("_","-");if(new RegExp("([a-z]{2})([-])([A-Z]{2})").test(t))return t;const[a,r]=t.split("-");if(!a||!r)return null;const n=[a.toLowerCase(),r.toUpperCase()].join("-");return 5===n.length?n:null}function T(e,t=[]){if(!e||e.length<1||e.length>5)return o;const a=E(e);return t.indexOf(a)>-1?a:function(e,t){return e&&"string"==typeof e&&t.find((t=>I(t)===I(e)))||null}(a||e,t)}const A=(e,t)=>e.replace(/%{(\w+)}/g,((e,a)=>{var r,n;return null!==(n=null===(r=t[a])||void 0===r?void 0:r.toString())&&void 0!==n?n:""}));class S{constructor(){this.translations=s}get(e,t){const a=((e,t,a={values:{},count:0})=>{const r=`${t}__plural`,n=e=>`${t}__${e}`;return Object.prototype.hasOwnProperty.call(e,n(a.count))?A(e[n(a.count)],a.values):Object.prototype.hasOwnProperty.call(e,r)&&a.count>1?A(e[r],a.values):Object.prototype.hasOwnProperty.call(e,t)?A(e[t],a.values):null})(this.translations,e,t);return null!==a?a:e}date(e,t={}){return new Date(e).toLocaleDateString(this.locale,Object.assign({year:"numeric",month:"2-digit",day:"2-digit"},t))}initialize({customTranslations:e={},locale:t=o,allowedLocales:a=[],loadingContext:r,clientKey:n}){return i(this,void 0,void 0,(function*(){this.customTranslations=function(e={},t){return Object.keys(e).reduce(((a,r)=>{const n=E(r)||T(r,t);return n&&(a[n]=e[r]),a}),{})}(e,a);const i=Object.keys(this.customTranslations);this.supportedLocales=[...a,...i].filter(((e,t,a)=>a.indexOf(e)===t)),this.locale=E(t)||T(t,this.supportedLocales),yield this.loadTranslations({locale:this.locale,loadingContext:r,clientKey:n})}))}loadTranslations({locale:e=this.locale,loadingContext:t,clientKey:a}){return i(this,void 0,void 0,(function*(){let r;!this.supportedLocales.includes(e)&&(e=o),r=e===o?Object.assign(Object.assign({},s),!!this.customTranslations[e]&&this.customTranslations[e]):yield(({locale:e,loadingContext:t,clientKey:a,customTranslations:r={}})=>i(void 0,void 0,void 0,(function*(){let n={};try{n=yield O(p,t,e,a)}catch(e){console.error(e)}return Object.assign(Object.assign(Object.assign({},s),n),!!r[e]&&r[e])})))({locale:e,loadingContext:t,clientKey:a,customTranslations:this.customTranslations});const n=(e=>{if(!e)return"";const[t]=e.split("-");return t})(e);return this.locale=e,this.translations=r,this.languageCode=n,r}))}}var R=0;function C(e,a,r,n,i){var o,s,d={};for(s in a)"ref"==s?o=a[s]:d[s]=a[s];var l={type:e,props:d,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--R,__source:i,__self:n};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===d[s]&&(d[s]=o[s]);return t.options.vnode&&t.options.vnode(l),l}class D{constructor(){this.events={},this.on=(e,t)=>{this.events[e]=this.events[e]||[],this.events[e].push(t)},this.off=(e,t)=>{this.events[e]&&(this.events[e]=this.events[e].reduce(((e,a)=>(a!==t&&e.push(a),e)),[]))},this.emit=(e,t)=>{this.events[e]&&this.events[e].forEach((e=>{e(t)}))}}}function k(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}class L{constructor(e){this._id=`${this.constructor.type}-${k()}`,this.eventEmitter=new D,this._resizeObserver=null,this.props=this.formatProps(Object.assign(Object.assign({},this.constructor.defaultProps),e)),this._parentInstance=this.props._parentInstance,this._node=null,this.state={}}formatProps(e){return e}formatData(){return{}}setState(e){this.state=Object.assign(Object.assign({},this.state),e)}get data(){return Object.assign({},this.formatData())}render(){throw new Error("Kyc Forms cannot be rendered")}observeContainerSize(e){window.ResizeObserver&&(this._resizeObserver=new ResizeObserver((t=>{this.assignLayout(t,e)})),this._resizeObserver.observe(e))}assignLayout(e,t){return null}mount(e){const a="string"==typeof e?document.querySelector(e):e;if(!a)throw new Error("Component could not mount. Root node was not found.");if(this._node)throw new Error("Component is already mounted.");return this._node=a,this._component=this.render(),this.observeContainerSize(a),t.render(this._component,a),this}update(e){return this.props=this.formatProps(Object.assign(Object.assign({},this.props),e)),this.state={},this.unmount().remount()}updateLocale(e){this.eventEmitter.emit("updateLocale",e)}remount(e){if(!this._node)throw new Error("Component is not mounted.");const a=e||this.render();return t.render(a,this._node,null),this}unmount(){return this._node&&t.render(null,this._node),this._resizeObserver&&(this._resizeObserver=this._resizeObserver.disconnect()),this}remove(){this.unmount(),this._parentInstance&&this._parentInstance.remove(this)}}L.defaultProps={};var w=new class{constructor(){return this.queue=[],this.subscriptions=new Set,this}add(...e){this.queue.push(...e)}notifySubscribers(){for(;this.queue.length>0;){const e=this.queue.pop();this.subscriptions.forEach((t=>t(e)))}}addEvent(e,t){this.add(["add_event",Object.assign({key:e},t)]),this.notifySubscribers()}addPageView(e){this.add(["track_pageview",e]),this.notifySubscribers()}startEvent(e){this.add(["start_event",e]),this.notifySubscribers()}endEvent(e,t){this.add(["end_event",t?Object.assign({key:e},t):e]),this.notifySubscribers()}subscribe(e){this.subscriptions.add(e)}unsubscribe(e){this.subscriptions.has(e)&&this.subscriptions.delete(e)}};class P extends L{constructor(e){super(e),e.onUserEvent&&w.subscribe(e.onUserEvent),this.submit=this.submit.bind(this),this.setState=this.setState.bind(this),this.onValid=this.onValid.bind(this),this.onComplete=this.onComplete.bind(this),this.elementRef=e&&e.elementRef||this}setState(e){this.state=Object.assign(Object.assign({},this.state),e),this.onChange()}onChange(){const e=this.isValid,t={data:this.data,errors:this.state.errors,valid:this.state.valid,isValid:e};return this.props.onChange&&this.props.onChange(t,this.elementRef),e&&this.onValid(),t}onValid(){const e={data:this.data};return this.props.onValid&&this.props.onValid(e,this.elementRef),e}submit(){const{onSubmit:e=(()=>{})}=this.props,{data:t,isValid:a}=this;return a?e({data:t,isValid:a},this.elementRef):(this.showValidation(),!1)}onComplete(e){this.props.onComplete&&this.props.onComplete(e,this.elementRef)}showValidation(){return this.componentRef&&this.componentRef.showValidation&&this.componentRef.showValidation(),this}setStatus(e){return this.componentRef&&this.componentRef.setStatus&&this.componentRef.setStatus(e),this}get isValid(){return!1}get displayName(){return this.props.name||this.constructor.type}}const j=t.createContext({i18n:new S,translations:null,setLocale:null,loadingContext:"",clientKey:"",setContextCountry:null,contextCountry:"",setPayoutDefaultCurrency:null,payoutDefaultCurrency:"",commonProps:{},isReview:!1,isLegalEntityPartOfTrust:!1,setIsLegalEntityPartOfTrust:null,setAccountHolder:null,accountHolder:""}),x=e=>{const t=`${`${e}static/fonts`}/adyen-kyc-icons`;((e,t,a,r,n)=>{const i=document.createElement("style");i.setAttribute("type","text/css"),i.innerText=((e,t,a,r,n)=>{const i=[`font-family: '${e}'`,`font-style: ${t}`,`font-weight: ${a}`,`src: url(${r})`],o=[];return n.eot&&o.push(`url(${n.eot}) format('embedded-opentype')`),n.woff&&o.push(`url(${n.woff}) format('woff')`),n.woff2&&o.push(`url(${n.woff2}) format('woff2')`),n.ttf&&o.push(`url(${n.ttf}) format('truetype')`),n.otf&&o.push(`url(${n.otf}) format('opentype')`),o.length>0&&i.push("src: "+o.join(",")+";"),`@font-face {${i.join(";")}}`})(e,t,a,r,n),document.body.insertBefore(i,document.body.firstChild)})("adyen-kyc-icons","normal","normal",`${t}.eot`,{eot:`${t}.eot`,woff:`${t}.woff`,woff2:`${t}.woff2`,ttf:`${t}.ttf`,otf:`${t}.otf`})};function M(e){return"object"==typeof e&&null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function F(...e){const t=M(e[0])?e[0]:e;return{from:e=>t.map((t=>t in e?{[t]:e[t]}:{})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}}function V(...e){const t=M(e[0])?e[0]:e;return{from:e=>{const a=Object.keys(e).filter((e=>!t.includes(e)));return F(...a).from(e)}}}function U(e,t){return e.length===t.length&&e.every((function(e){return t.includes(e)}))}const B=(e,t)=>{const a=typeof e;return e&&t&&"object"===a&&a===typeof t?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every((a=>B(e[a],t[a]))):e===t};function W(e){return structuredClone(e)}function H(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e])))}function q(e,{type:t="conjunction",style:a="long",stringify:r=(e=>e.toString())}={}){const n=e.map((e=>r(e)));return new Intl.ListFormat("en",{style:a,type:t}).format(n)}const G=()=>{};function $({loadingContext:e,clientKey:t,country:a,capabilities:r,legalEntityType:n}){return N({loadingContext:e,errorLevel:"warn",errorMessage:"Configuration is not available",path:"v1/configuration",clientKey:t},{capabilities:r,country:a,legalEntityType:n})}class X extends t.Component{constructor(){super(...arguments),this.state={loaded:!1,contextCountry:this.props.contextCountry,payoutDefaultCurrency:"",i18n:this.props.i18n,isLegalEntityPartOfTrust:!1,accountHolder:""},this.setContextCountry=e=>{this.setState({contextCountry:e})},this.setPayoutDefaultCurrency=e=>{this.setState({payoutDefaultCurrency:e})},this.setLocale=({locale:e})=>{var t;this.setState({loaded:!1});const a=null===(t=this.state.i18n)||void 0===t?void 0:t.locale;this.props.i18n.loadTranslations({locale:e,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey}).then((()=>{w.addEvent("Changed page language",{segmentation:{originalLanguage:a,newLanguage:e}}),this.setState({loaded:!0})}))},this.setIsLegalEntityPartOfTrust=e=>this.setState({isLegalEntityPartOfTrust:e}),this.setAccountHolder=e=>{this.setState({accountHolder:e})}}componentDidMount(){return i(this,void 0,void 0,(function*(){const{contextCountry:e,locale:t,loadingContext:a,clientKey:r}=this.props;x(a);try{let n=t;const{locales:i=[]}=yield function({loadingContext:e,clientKey:t}){return _({loadingContext:e,errorLevel:"warn",errorMessage:"Locales configuration is not available",path:"v1/configuration/locales",clientKey:t})}({loadingContext:a,clientKey:r}),{countries:s=[]}=yield function({loadingContext:e,clientKey:t}){return _({loadingContext:e,errorLevel:"warn",errorMessage:"Countries configuration is not available",path:"v1/configuration/countries",clientKey:t})}({loadingContext:a,clientKey:r});if(s&&!s.includes(e))throw new Error(`\n\n"${e}" isn't a supported country. Please use one of the following:\n- ${q(s)}.\n `);i&&!i.includes(t)&&(console.error(`\n"${t}" isn't a supported locale. Please use one of the following:\n- ${q(i)}. falling back to "${o}"`),n=o),this.props.i18n?(yield this.props.i18n.initialize({locale:n,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,customTranslations:this.props.translations,allowedLocales:i}),this.setState({loaded:!0})):this.setState({loaded:!0})}catch(e){console.log(e)}}))}shouldComponentUpdate(e,t){return this.state.contextCountry!==t.contextCountry||this.state.payoutDefaultCurrency!==t.payoutDefaultCurrency||!1===this.state.loaded||this.state.isLegalEntityPartOfTrust!==t.isLegalEntityPartOfTrust||this.state.accountHolder!==t.accountHolder}render({children:e}){return this.state.loaded?C(j.Provider,Object.assign({value:{i18n:this.state.i18n,setLocale:this.setLocale,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations,setContextCountry:this.setContextCountry,contextCountry:this.state.contextCountry,setPayoutDefaultCurrency:this.setPayoutDefaultCurrency,payoutDefaultCurrency:this.state.payoutDefaultCurrency,commonProps:this.props.commonProps||{},isReview:this.props.isReview,isLegalEntityPartOfTrust:this.state.isLegalEntityPartOfTrust,setIsLegalEntityPartOfTrust:this.setIsLegalEntityPartOfTrust,setAccountHolder:this.setAccountHolder,accountHolder:this.state.accountHolder}},{children:t.toChildArray(e)})):null}}var Y,K,z,Z,Q=0,J=[],ee=[],te=t.options.__b,ae=t.options.__r,re=t.options.diffed,ne=t.options.__c,ie=t.options.unmount;function oe(e,a){t.options.__h&&t.options.__h(K,e,Q||a),Q=0;var r=K.__H||(K.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:ee}),r.__[e]}function se(e){return Q=1,de(Ne,e)}function de(e,t,a){var r=oe(Y++,2);if(r.t=e,!r.__c&&(r.__=[a?a(t):Ne(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],a=r.t(t,e);t!==a&&(r.__N=[a,r.__[1]],r.__c.setState({}))}],r.__c=K,!K.u)){K.u=!0;var n=K.shouldComponentUpdate;K.shouldComponentUpdate=function(e,t,a){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!n||n.call(this,e,t,a);var o=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&r.__c.props===e)&&(!n||n.call(this,e,t,a))}}return r.__N||r.__}function le(e,a){var r=oe(Y++,3);!t.options.__s&&_e(r.__H,a)&&(r.__=e,r.i=a,K.__H.__h.push(r))}function ce(e,a){var r=oe(Y++,4);!t.options.__s&&_e(r.__H,a)&&(r.__=e,r.i=a,K.__h.push(r))}function ue(e){return Q=5,me((function(){return{current:e}}),[])}function me(e,t){var a=oe(Y++,7);return _e(a.__H,t)?(a.__V=e(),a.i=t,a.__h=e,a.__V):a.__}function pe(e,t){return Q=8,me((function(){return e}),t)}function ge(e){var t=K.context[e.__c],a=oe(Y++,9);return a.c=e,t?(null==a.__&&(a.__=!0,t.sub(K)),t.props.value):e.__}function ye(){for(var e;e=J.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(he),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(a){e.__H.__h=[],t.options.__e(a,e.__v)}}t.options.__b=function(e){K=null,te&&te(e)},t.options.__r=function(e){ae&&ae(e),Y=0;var t=(K=e.__c).__H;t&&(z===K?(t.__h=[],K.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ee,e.__N=e.i=void 0}))):(t.__h.forEach(he),t.__h.forEach(ve),t.__h=[])),z=K},t.options.diffed=function(e){re&&re(e);var a=e.__c;a&&a.__H&&(a.__H.__h.length&&(1!==J.push(a)&&Z===t.options.requestAnimationFrame||((Z=t.options.requestAnimationFrame)||fe)(ye)),a.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ee&&(e.__=e.__V),e.i=void 0,e.__V=ee}))),z=K=null},t.options.__c=function(e,a){a.some((function(e){try{e.__h.forEach(he),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(r){a.some((function(e){e.__h&&(e.__h=[])})),a=[],t.options.__e(r,e.__v)}})),ne&&ne(e,a)},t.options.unmount=function(e){ie&&ie(e);var a,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{he(e)}catch(e){a=e}})),r.__H=void 0,a&&t.options.__e(a,r.__v))};var be="function"==typeof requestAnimationFrame;function fe(e){var t,a=function(){clearTimeout(r),be&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(a,100);be&&(t=requestAnimationFrame(a))}function he(e){var t=K,a=e.__c;"function"==typeof a&&(e.__c=void 0,a()),K=t}function ve(e){var t=K;e.__c=e.__(),K=t}function _e(e,t){return!e||e.length!==t.length||t.some((function(t,a){return t!==e[a]}))}function Ne(e,t){return"function"==typeof t?t(e):t}const Oe=["street","houseNumberOrName","postalCode","city","stateOrProvince","country"],[Ie,Ee,Te,Ae,Se,Re]=Oe,Ce=["BR","CA","US","AU"],De=["US","GB"],ke={CA:[Re,Ie,Ee,Ae,Te,Se],GB:[Re,Ee,Ie,Ae,Te,Se],US:[Re,Ie,Ee,Ae,Se,Te],AU:[Re,Ie,Ae,Se,Te],default:[Re,Ie,Ee,Te,Ae,Se]},Le={city:{GB:"cityTown",default:Ae},country:{default:Re},houseNumberOrName:{CA:"apartmentSuite",US:"apartmentSuiteOptional",GB:"houseNumberOptional",default:"houseNumber"},postalCode:{US:"zipCode",default:Te},stateOrProvince:{BR:"state",CA:"provinceOrTerritory",US:"state",AU:"state",default:Se},stateOrProvincePlaceholder:{BR:"selectState",CA:"selectProvinceOrTerritory",US:"selectState",AU:"selectState",default:"selectStateOrProvince"},street:{CA:"address",US:"address",AU:"address",default:Ie}},we=(e,t)=>Le[e][t]||Le[e].default,Pe=(e,t)=>{const a=e.country;return a?Object.entries(e).reduce(((e,[r,n])=>{const i=we(r,a);return e[i]="country"===r?t.getCountryName(n):"stateOrProvince"===r?t.getStateName(n,a):n,e}),{}):e},je=({inline:e=!1,size:t="large"})=>C("div",Object.assign({className:"adyen-kyc-spinner__wrapper "+(e?"adyen-kyc-spinner__wrapper--inline":"")},{children:C("div",{className:`adyen-kyc-spinner adyen-kyc-spinner--${t}`,role:"progressbar"})})),xe=({className:e="",name:t})=>C("i",{className:a("adyen-kyc-icon",`adyen-kyc-icon-${t}`,e),role:"img","aria-hidden":!0}),Me="-ariaError";let Fe=Date.now();const Ve=(e="id")=>(Fe+=1,`${e}-${Fe}`);class Ue extends t.Component{constructor(e){super(e),this.state={focused:!1},this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.uniqueId=Ve(`adyen-kyc-${this.props.name}`)}onFocus(e){this.setState({focused:!0},(()=>{this.props.onFocus&&this.props.onFocus(e)}))}onBlur(e){this.setState({focused:!1},(()=>{this.props.onBlur&&this.props.onBlur(e),this.props.onFieldBlur&&this.props.onFieldBlur(e)}))}static getDerivedStateFromProps(e,t){return void 0!==e.focused&&e.focused!==t.focused?{focused:e.focused}:void 0!==e.filled&&e.filled!==t.filled?{filled:e.filled}:null}renderContent({name:e,children:r,errorMessage:n,helper:i,inputWrapperModifiers:o,isLoading:s,isValid:d,label:l}){return C(t.Fragment,{children:["string"==typeof l&&C("span",Object.assign({className:a({"adyen-kyc-label__text":!0,"adyen-kyc-label__text--error":n})},{children:l})),"function"==typeof l&&l(),i&&C("span",Object.assign({className:"adyen-kyc-helper-text"},{children:i})),C("div",Object.assign({className:a(["adyen-kyc-input-wrapper",...o.map((e=>`adyen-kyc-input-wrapper--${e}`))])},{children:[t.toChildArray(r).map((a=>{const r=Object.assign({isValid:d,onFocusHandler:this.onFocus,onBlurHandler:this.onBlur,isInvalid:!!n},e&&{uniqueId:this.uniqueId});return t.cloneElement(a,r)})),s&&C("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--loading"},{children:C(je,{size:"small"})})),d&&C("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--valid"},{children:C(xe,{name:"check"})})),n&&C("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--invalid"},{children:C(xe,{name:"field-error"})}))]})),n&&n.length&&C("span",Object.assign({className:"adyen-kyc-error-text","aria-live":"polite",id:`${this.uniqueId}${Me}`},{children:n}))]})}render({name:e,className:t="",classNameModifiers:r=[],children:n,errorMessage:i,helper:o,inputWrapperModifiers:s=[],isLoading:d,isValid:l,label:c,useLabelElement:u=!0,dataPlaceholder:m}){return C("div",Object.assign({className:a("adyen-kyc-field",t,r.map((e=>`adyen-kyc-field--${e}`)),{"adyen-kyc-field--error":i,"adyen-kyc-field--valid":l}),"data-placeholder":m},{children:C(Be,Object.assign({onFocusField:this.props.onFocusField,name:e,disabled:this.props.disabled,filled:this.state.filled,focused:this.state.focused,useLabelElement:u,uniqueId:this.uniqueId},{children:this.renderContent({name:e,children:n,errorMessage:i,helper:o,inputWrapperModifiers:s,isLoading:d,isValid:l,label:c})}))}))}}const Be=({onFocusField:e,focused:t,filled:r,disabled:n,name:i,uniqueId:o,useLabelElement:s,children:d})=>{const l={onClick:e,className:a({"adyen-kyc-label":!0,"adyen-kyc-label--focused":t,"adyen-kyc-label--filled":r,"adyen-kyc-label--disabled":n})};return s?C("label",Object.assign({},l,{htmlFor:i&&o},{children:d})):C("div",Object.assign({},l,{role:"form"},{children:d}))},We=()=>ge(j);var He="Select-module_adyen-kyc-dropdown__e1hdP",qe="Select-module_adyen-kyc-dropdown-button__FdX-b",Ge="Select-module_adyen-kyc-dropdown-button--active__AGNoA",$e="Select-module_adyen-kyc-filter-input__4JVhc",Xe="Select-module_adyen-kyc-dropdown-list__9PypK",Ye="Select-module_adyen-kyc-dropdown-list--active__lE-9R",Ke="Select-module_adyen-kyc-dropdown-element__v4sS7";const ze=({className:e,isBasic:t=!1,children:r})=>{const n=a("adl-tag",e,{"adl-tag--basic":t});return C("span",Object.assign({className:n},{children:r}))},Ze=({inline:e=!1,size:t="large",dot:r=!1})=>C("div",Object.assign({className:"adl-loader__wrapper "+(e?"adl-loader__wrapper--inline":"")},{children:C("div",{className:a("adl-loading-indicator",`adl-loading-indicator--${t}`,{"adl-loading-indicator--dot":r})})}));function Qe(e){var{filterable:t,isMulti:a,toggleButtonRef:r,isSearch:i}=e,o=n(e,["filterable","isMulti","toggleButtonRef","isSearch"]);return C(t||a||i?"div":"button",Object.assign({},o,{ref:r}))}function Je({active:e,readonly:t,showList:r,isInvalid:n,isValid:i,toggleList:o,onButtonKeyDown:s,filterable:d,placeholder:l,toggleButtonRef:c,ariaDescribedBy:u,selectListId:m,filterInputRef:p,onInput:g,isMulti:y,id:b,isSearch:f,loading:h,textFilter:v}){return C(Qe,Object.assign({"aria-disabled":t,"aria-expanded":r,"aria-haspopup":"listbox",className:a({"adyen-kyc-dropdown-button":!0,[qe]:!0,"adyen-kyc-dropdown-button--readonly":t,"adyen-kyc-dropdown-button--active":r,[Ge]:r,"adyen-kyc-dropdown-button--invalid":n,"adyen-kyc-dropdown-field--valid":i,"adyen-kyc-dropdown-button-search":f}),filterable:d,onClick:t?null:o,onKeyDown:t?null:s,role:d||y?"button":null,tabIndex:"0",title:e.join(",")||l,toggleButtonRef:c,type:d||y?null:"button","aria-describedby":u,isMulti:y,id:b,isSearch:f},{children:y?C(tt,{active:e,placeholder:l}):C(et,{active:e,placeholder:l,selectListId:m,showList:r,filterInputRef:p,filterable:d,onInput:g,isSearch:f,loading:h,textFilter:v})}))}const et=({active:e,placeholder:r,selectListId:n,showList:i,filterInputRef:o,filterable:s,onInput:d,isSearch:l,loading:c,textFilter:u})=>{const m=e.pop();return C(t.Fragment,i&&s?{children:[l&&C(xe,{name:"search",className:"adyen-kyc-dropdown-button-search__icon"}),C("input",{"aria-autocomplete":"list","aria-controls":n,"aria-expanded":i,"aria-owns":n,autoComplete:"off",className:a("adyen-kyc-filter-input",[$e]),onInput:d,placeholder:r,ref:o,role:"combobox",type:"text",value:u}),l&&c&&C(Ze,{size:"xsmall",dot:!0})]}:{children:[(null==m?void 0:m.sprite)&&C("svg",Object.assign({className:"adyen-kyc-dropdown-button__icon",role:"img"},{children:C("use",{href:m.sprite})})),l&&C(xe,{name:"search",className:"adyen-kyc-dropdown-button-search__icon"}),C("span",Object.assign({className:a("adyen-kyc-dropdown-button__text",{"adyen-kyc-dropdown-button__text--placeholder":!m})},{children:(null==m?void 0:m.selectedOptionName)||(null==m?void 0:m.name)||u||r}))]})},tt=({active:e,placeholder:t})=>e&&e.length>0?C("div",Object.assign({className:"adyen-kyc-dropdown-selected-items"},{children:e.map(((e,a)=>C(ze,Object.assign({className:e.className,isBasic:!0},{children:(null==e?void 0:e.selectedOptionName)||(null==e?void 0:e.name)||t}),a)))})):C("span",Object.assign({className:"adyen-kyc-dropdown-button__text"},{children:t}));function at(e){var{classNameModifiers:t=[],label:r,isInvalid:i,onChange:o,helper:s}=e,d=n(e,["classNameModifiers","label","isInvalid","onChange","helper"]);return C("label",Object.assign({className:"adyen-kyc-checkbox"},{children:[C("input",Object.assign({},d,{className:a(["adyen-kyc-checkbox__input",[d.className],{"adyen-kyc-checkbox__input--invalid":i},t.map((e=>`adyen-kyc-input--${e}`))]),type:"checkbox",onChange:o})),C("span",Object.assign({className:"adyen-kyc-checkbox__label"},{children:r})),s&&C("span",Object.assign({className:"adyen-kyc-checkbox__helper-text"},{children:s}))]}))}at.defaultProps={onChange:()=>{}};const rt=e=>{var{item:r,selected:i,isMulti:o,isSearch:s,children:d}=e,l=n(e,["item","selected","isMulti","isSearch","children"]);return C("li",Object.assign({"aria-disabled":!!r.disabled,"aria-selected":i,className:a(["adyen-kyc-dropdown-element",Ke,{"adyen-kyc-dropdown-element--active":i,"adyen-kyc-dropdown-element--disabled":!!r.disabled,"adyen-kyc-dropdown-multi-element":o,"adyen-kyc-dropdown-element-description":!o&&!s&&r.description,"adyen-kyc-dropdown-search-element":s}]),"data-disabled":!!r.disabled,"data-value":r.id,onClick:l.onSelect,onKeyDown:l.onKeyDown,role:"option",tabIndex:-1},{children:o?C(at,{label:r.name,helper:null==r?void 0:r.description,checked:i,name:`adyen-kyc-dropdown-element__checkbox adyen-kyc-dropdown-element__checkbox--${r.id}`}):d?[d]:C(t.Fragment,{children:[r.sprite?C("svg",Object.assign({className:"adyen-kyc-dropdown-element__icon",role:"img"},{children:C("use",{href:r.sprite})})):r.icon&&C("img",{className:"adyen-kyc-dropdown-element__icon",alt:r.name,src:r.icon}),r.description?C(t.Fragment,{children:[C("span",Object.assign({className:"adyen-kyc-dropdown-element__label adl-u-font-weight-semi-bold"},{children:r.name})),C("span",Object.assign({className:"adyen-kyc-dropdown-element-description__text"},{children:r.description}))]}):C("span",Object.assign({className:"adyen-kyc-dropdown-element__label"},{children:r.name}))]})}))};function nt(e){var{active:t,items:r,showList:i,textFilter:o,isMulti:s,showAbove:d,isSearch:l,loading:c,getSearchItem:u}=e,m=n(e,["active","items","showList","textFilter","isMulti","showAbove","isSearch","loading","getSearchItem"]);const{i18n:p}=We(),g=r.filter((e=>{var t;return l?e:!o||(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes(o))})),[y,b]=se([]);return le((()=>{b(g.map((e=>C(rt,Object.assign({item:e,onKeyDown:m.onKeyDown,onSelect:m.onSelect,selected:!!t.find((t=>t.id===e.id)),isMulti:s,isSearch:l},{children:u&&u(e)}),e.id))))}),[g.length,null==t?void 0:t.length,r]),C("ul",Object.assign({className:a({test:!0,"adyen-kyc-dropdown-list--above":d,"adyen-kyc-dropdown-list":!0,[Xe]:!0,"adyen-kyc-dropdown-list--active":i,[Ye]:i}),id:m.selectListId,ref:m.selectListRef,role:"listbox"},{children:c?C("div",Object.assign({className:"adyen-kyc-dropdown-element adyen-kyc-dropdown-element--no-options"},{children:p.get("loading")})):l&&(!o||o.length<3)?null:y.length?y:C("div",Object.assign({className:"adyen-kyc-dropdown-element adyen-kyc-dropdown-element--no-options"},{children:p.get("noOptionsFound")}))}))}const it=e=>{const t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return e?"visible"!==t&&"hidden"!==t?e:it(e.parentNode)||document.body:-1},ot={arrowDown:"ArrowDown",arrowUp:"ArrowUp",enter:"Enter",escape:"Escape",space:" ",tab:"Tab"},st="30_102";function dt(e,t=20){let a;return(...r)=>{clearTimeout(a),a=setTimeout((()=>e(...r)),t)}}const lt=({items:e=[],className:t="",classNameModifiers:r=[],filterable:n=!0,readonly:i=!1,onChange:o,selected:s,name:d,isInvalid:l=!1,isValid:c,placeholder:u,showInlineErrors:m,isMulti:p,uniqueId:g,showSelectedItemsAsTags:y=!1,isSearch:b=!1,onSearch:f=(()=>{}),resetSearch:h=!1,loading:v=!1,getSearchItem:_,searchText:N,showSearchList:O})=>{const I=ue(null),E=ue(null),T=ue(null),A=ue(null),[S,R]=se(null),[D,L]=se(!1),w=me((()=>`select-${k()}`),[]),P=e.filter((e=>p?null==s?void 0:s.includes(e.id):e.id===s))||[],[j,x]=se(!1),[M,F]=se(null),V=()=>{R(null),L(!1),T.current&&T.current.focus()},U=e=>{e.preventDefault();const t=A.current.contains(e.currentTarget)?e.currentTarget:A.current.firstElementChild,a="true"===t.getAttribute("data-disabled");if(!i&&!a){const e=t.getAttribute("data-value");if(p){const t=P.find((t=>t.id===e))?[...P.filter((t=>t.id!==e)).map((e=>e.id))]:[...P.map((e=>e.id)),e];o({target:{value:t,name:d}})}else V(),o({target:{value:e,name:d}})}},B=()=>{let e=M;if(e||(e=it(T.current),F(e)),-1!==e){const{bottom:t}=e.getBoundingClientRect(),{bottom:a}=T.current.getBoundingClientRect();x(!(t-a>145))}L(!0)},W=e=>{E.current.contains(e.target)||L(!1)};return le((()=>{h&&R("")}),[h]),le((()=>{R(N)}),[N]),le((()=>{D&&n&&I.current&&I.current.focus()}),[D]),le((()=>{L(O)}),[O]),le((()=>(document.addEventListener("click",W,!0),()=>{document.removeEventListener("click",W,!0)})),[]),C("div",Object.assign({className:a(["adyen-kyc-dropdown",He,t,...r.map((e=>`adyen-kyc-dropdown--${e}`))]),ref:E},{children:[C(Je,{id:null!=g?g:null,active:P,filterInputRef:I,filterable:n,isInvalid:l,isValid:c,onButtonKeyDown:e=>{var t;if(e.key===ot.enter&&n&&D&&S){const t=e.target.value;(b&&t.length>2||!b)&&(U(e),B())}else e.key===ot.escape?V():![ot.arrowUp,ot.arrowDown,ot.enter].includes(e.key)&&(e.key!==ot.space||n&&D)?(e.shiftKey&&e.key===ot.tab||e.key===ot.tab)&&V():(e.preventDefault(),B(),(null===(t=A.current)||void 0===t?void 0:t.firstElementChild)&&A.current.firstElementChild.focus())},onInput:e=>{const t=e.target.value;b&&t.length>2&&dt(f(t),500),R(t.toLowerCase())},placeholder:u,readonly:i,selectListId:w,showList:D,toggleButtonRef:T,toggleList:e=>{e.preventDefault(),D?L(!1):B()},ariaDescribedBy:m&&g?`${g}${Me}`:null,isMulti:p,showSelectedItemsAsTags:y,isSearch:b,loading:v,textFilter:S}),C(nt,{active:P,items:e,onKeyDown:e=>{const t=e.target;switch(e.key){case ot.escape:e.preventDefault(),V();break;case ot.space:case ot.enter:U(e);break;case ot.arrowDown:e.preventDefault(),t.nextElementSibling&&t.nextElementSibling.focus();break;case ot.arrowUp:e.preventDefault(),t.previousElementSibling?t.previousElementSibling.focus():n&&I.current&&I.current.focus();break;case ot.tab:V()}},onSelect:U,selectListId:w,selectListRef:A,showList:D,textFilter:S,isMulti:p,showAbove:j,isSearch:b,getSearchItem:_,loading:v})]}))},ct=e=>{const{i18n:a}=We(),[r,n]=se([]),[o,s]=se(!1),{handleChangeFor:d,data:l,autocompleteAddressForm:c}=e,[u,m]=se(!1),[p,g]=se(null),[y,b]=se(!1);le((()=>{n([]),m(!0)}),[l.country]);const f=(e,t)=>{const a=[];let r=0;return""===e[0]?[t]:(e.forEach((e=>{const n=e.split("-"),i=parseInt(n[0]),o=parseInt(n[1]);if(r<i){const e=t.substring(r,i);a.push(`${e}`)}const s=t.substring(i,o);a.push(C("span",Object.assign({className:"adyen-kyc-dropdown-search-element__description--highlight"},{children:s}))),r=o})),r<t.length&&a.push(`${t.substring(r)}`),a)},h=e=>{const{text:t,highlight:a,description:r}=e;let n=[];if(""===a)r?n.push(`${t}, ${r}`):n.push(t);else{const e=a.split(";");n=f(e[0].split(","),t),e.length>1?(n.push(", "),n.push(f(e[1].split(","),r))):r&&n.push(`, ${r}`)}return n};return C(Ue,Object.assign({name:"searchAddress",className:"adl-u-margin-bottom-8",label:a.get("searchAddress")},{children:C(lt,{onChange:t=>{const a=t.target.value;d("searchAddress","blur")(a),m(!1),s(!0);const o=r.filter((e=>e.id===a))[0];"Address"===o.type?((t=>{i(void 0,void 0,void 0,(function*(){try{const a=yield e.handleFindAddress(t);c(a)}catch(e){console.error(e)}}))})(o.id),g(`${o.text} ${o.description}`),b(!1)):((t=>{i(void 0,void 0,void 0,(function*(){try{const a=yield e.handleAddressSearch({text:t.text,country:l.country,container:t.id},e.legalEntityId);n((null==a?void 0:a.results)||[])}catch(e){console.error(e)}}))})(o),g(`${o.text}`),b(!0)),s(!1)},name:"searchAddress",placeholder:a.get("startTypingTheAddress"),selected:l.searchAddress,items:r,isSearch:!0,resetSearch:u,onSearch:t=>i(void 0,void 0,void 0,(function*(){if(t){s(!0);try{const a=yield e.handleAddressSearch({text:t,country:l.country},e.legalEntityId);if(null==a?void 0:a.results){const e=a.results.map((e=>(e=>{if(e.description.includes("Addresses")){const t=e.description.split(" - ");return 1===t.length?Object.assign(Object.assign({},e),{description:void 0,addressAmount:t[0].replace("Addresses","")}):Object.assign(Object.assign({},e),{description:t[0],addressAmount:t[1].replace("Addresses","")})}return e})(e)));n(e)}else n([])}catch(e){console.error(e)}s(!1)}else n([])})),loading:o,getSearchItem:e=>C(t.Fragment,{children:[C("span",Object.assign({className:"adyen-kyc-dropdown-search-element__description"},{children:h(e)})),e.addressAmount&&C("div",Object.assign({className:"adyen-kyc-dropdown-search-element__addresses"},{children:[e.addressAmount," ",C("span",Object.assign({className:"adyen-kyc-dropdown-search-element__addresses--text"},{children:[" ",a.get("addresses")]})),C(xe,{name:"arrow-right",className:"adyen-kyc-dropdown-search-element__addresses--icon"})]}))]}),isInvalid:!1,searchText:p,showSearchList:y})}))},ut=e=>e.replace(/[\uff01-\uff5e]/g,(e=>String.fromCharCode(e.charCodeAt(0)-65248)));function mt(e,t){for(var a in t)e[a]=t[a];return e}function pt(e,t){for(var a in e)if("__source"!==a&&!(a in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function gt(e){this.props=e}function yt(e,a){function r(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),a?!a(this.props,e)||!r:pt(this.props,e)}function n(a){return this.shouldComponentUpdate=r,t.createElement(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(gt.prototype=new t.Component).isPureReactComponent=!0,gt.prototype.shouldComponentUpdate=function(e,t){return pt(this.props,e)||pt(this.state,t)};var bt=t.options.__b;t.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),bt&&bt(e)};var ft="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ht(e){function t(t){var a=mt({},t);return delete a.ref,e(a,t.ref||null)}return t.$$typeof=ft,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var vt=t.options.__e;t.options.__e=function(e,t,a,r){if(e.then)for(var n,i=t;i=i.__;)if((n=i.__c)&&n.__c)return null==t.__e&&(t.__e=a.__e,t.__k=a.__k),n.__c(e,t);vt(e,t,a,r)};var _t=t.options.unmount;function Nt(e,t,a){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=mt({},e)).__c&&(e.__c.__P===a&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Nt(e,t,a)}))),e}function Ot(e,t,a){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ot(e,t,a)})),e.__c&&e.__c.__P===t&&(e.__e&&a.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=a)),e}function It(){this.__u=0,this.t=null,this.__b=null}function Et(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Tt(){this.u=null,this.o=null}t.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),_t&&_t(e)},(It.prototype=new t.Component).__c=function(e,t){var a=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(a);var n=Et(r.__v),i=!1,o=function(){i||(i=!0,a.__R=null,n?n(s):s())};a.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Ot(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},d=!0===t.__h;r.__u++||d||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},It.prototype.componentWillUnmount=function(){this.t=[]},It.prototype.render=function(e,a){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Nt(this.__b,r,n.__O=n.__P)}this.__b=null}var i=a.__a&&t.createElement(t.Fragment,null,e.fallback);return i&&(i.__h=null),[t.createElement(t.Fragment,null,a.__a?null:e.children),i]};var At=function(e,t,a){if(++a[1]===a[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(a=e.u;a;){for(;a.length>3;)a.pop()();if(a[1]<a[0])break;e.u=a=a[2]}};(Tt.prototype=new t.Component).__a=function(e){var t=this,a=Et(t.__v),r=t.o.get(e);return r[0]++,function(n){var i=function(){t.props.revealOrder?(r.push(n),At(t,e,r)):n()};a?a(i):i()}},Tt.prototype.render=function(e){this.u=null,this.o=new Map;var a=t.toChildArray(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&a.reverse();for(var r=a.length;r--;)this.o.set(a[r],this.u=[1,0,this.u]);return e.children},Tt.prototype.componentDidUpdate=Tt.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,a){At(e,a,t)}))};var St="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Rt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ct="undefined"!=typeof document,Dt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};t.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(t.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var kt=t.options.event;function Lt(){}function wt(){return this.cancelBubble}function Pt(){return this.defaultPrevented}t.options.event=function(e){return kt&&(e=kt(e)),e.persist=Lt,e.isPropagationStopped=wt,e.isDefaultPrevented=Pt,e.nativeEvent=e};var jt={configurable:!0,get:function(){return this.class}},xt=t.options.vnode;t.options.vnode=function(e){var a=e.type,r=e.props,n=r;if("string"==typeof a){var i=-1===a.indexOf("-");for(var o in n={},r){var s=r[o];Ct&&"children"===o&&"noscript"===a||"value"===o&&"defaultValue"in r&&null==s||("defaultValue"===o&&"value"in r&&null==r.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+a)&&!Dt(r.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&Rt.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),n[o]&&(o="oninputCapture")),n[o]=s)}"select"==a&&n.multiple&&Array.isArray(n.value)&&(n.value=t.toChildArray(r.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==a&&null!=n.defaultValue&&(n.value=t.toChildArray(r.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),e.props=n,r.class!=r.className&&(jt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",jt))}e.$$typeof=St,xt&&xt(e)};var Mt=t.options.__r;t.options.__r=function(e){Mt&&Mt(e),e.__c};const Ft=ht(((e,t)=>{const{autoCorrect:r,classNameModifiers:i=[],isInvalid:o,isValid:s,readonly:d=null,spellCheck:l,type:c="text",disabled:u,showInlineErrors:m,uniqueId:p}=e,g=a("adyen-kyc-input",[`adyen-kyc-input--${c}`],e.className,{"adyen-kyc-input--invalid":o,"adyen-kyc-field--valid":s,"adyen-kyc-input--disabled":u},i.map((e=>`adyen-kyc-input--${e}`))),y=n(e,["classNameModifiers","uniqueId","showInlineErrors"]);return C("input",Object.assign({ref:t,id:p},y,{type:c,className:g,readOnly:d,spellCheck:l,autoCorrect:r},u&&{"aria-disabled":!0},{"aria-describedby":m?`${p}${Me}`:null,onInput:t=>{var a;t.target.value=ut(t.target.value),null===(a=null==e?void 0:e.onInput)||void 0===a||a.call(e,t)},onBlur:t=>{var a,r;null===(a=null==e?void 0:e.onBlurHandler)||void 0===a||a.call(e,t),e.trimOnBlur&&(t.target.value=t.target.value.trim()),null===(r=null==e?void 0:e.onBlur)||void 0===r||r.call(e,t)},onFocus:t=>{var a;null===(a=null==e?void 0:e.onFocusHandler)||void 0===a||a.call(e,t)}}))}));Ft.displayName="InputBase";const Vt=ht(((e,t)=>{var{transformInput:a,onInput:r}=e,i=n(e,["transformInput","onInput"]);const[o,s]=se(),d=ue(null),l=null!=t?t:d,c=pe(a?e=>{const t=e.target,n=a(t.value);s(t.selectionStart);const i=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{value:n})});r(i)}:r,[a,r]);return ce((()=>{var e;null===(e=l.current)||void 0===e||e.setSelectionRange(o,o,"none")}),[o]),C(Ft,Object.assign({classNameModifiers:["large"]},i,{type:"text",onInput:r?c:void 0,ref:l}))}));Vt.displayName="InputText";const Ut=()=>{const e=document.createElement("input");return e.setAttribute("type","date"),"date"===e.type};function Bt(e){const t=me(Ut,[]);return C(Ft,t?Object.assign({},e,{type:"date"}):Object.assign({},e,{onInput:t=>{const{value:a}=t.target;t.target.value=(e=>{const t=e.replace(/\D|\s/g,"").replace(/^(00)(.*)?/,"01$2").replace(/^(3[2-9])(.*)?/,"0$1$2").replace(/^([4-9])(.*)?/,"0$1").replace(/^([0-9]{2})(00)(.*)?/,"$101").replace(/^(3[01])(02)(.*)?/,"29$2").replace(/^([0-9]{2})([2-9]|1[3-9])(.*)?/,"$10$2").replace(/^([0-9]{2})([0-9]{2})([0-9])/,"$1/$2/$3").replace(/^([0-9]{2})([0-9])/,"$1/$2"),[a="",r="",n=""]=t.split("/");return 4===n.length&&"29"===a&&"02"===r&&(Number(n)%4!=0||"00"===n.substr(2,2)&&Number(n)%400!=0)?t.replace(/^29/,"28"):t})(a),e.onInput(t)},maxLength:10}))}function Wt(e){return C(Ft,Object.assign({},e,{type:"tel"}))}function Ht(e){return C(Ft,Object.assign({},e,{type:"email",autoCapitalize:"off"}))}const qt=e=>C("input",Object.assign({},e,{className:a("adl-input-radio__input",e.className)}));function Gt(e){const{items:t,i18n:r,name:n,onChange:i,value:o,isInvalid:s,uniqueId:d,disabled:l=!1}=e,c=null==d?void 0:d.replace(/[0-9]/g,"").substring(0,d.lastIndexOf("-"));return C("div",Object.assign({className:"adyen-kyc-radio-group"},{children:t.map((t=>{const d=Ve(c);return C("label",Object.assign({htmlFor:d,className:"adl-input-radio"},{children:[C(qt,{id:d,type:"radio",checked:o===t.id,"aria-checked":o===t.id,className:"adyen-kyc-radio-group__input",name:n,onChange:i,onClick:i,value:t.id,disabled:l}),C("span",Object.assign({className:a(["adl-input-radio__label","adyen-kyc-label__text",e.className,{"adyen-kyc-radio-group__label--invalid":s}])},{children:r.get(t.name)}))]}),t.id)}))}))}function $t(e){return C(Ft,Object.assign({classNameModifiers:["large"]},e,{type:"file"}))}Gt.defaultProps={onChange:()=>{},items:[]};const Xt=()=>null,Yt=()=>null,Kt=()=>null,zt=({item:e,name:t,uniqueId:r,i18n:n,isInvalid:i,value:o,onChange:s=(()=>{}),labelClassName:d,className:l,children:c})=>{let u,m,p;if(c)if(Array.isArray(c))u=c.find((e=>(null==e?void 0:e.type)===Xt)),m=c.find((e=>(null==e?void 0:e.type)===Yt)),p=c.find((e=>(null==e?void 0:e.type)===Kt));else switch(c.type){case Xt:u=c;break;case Yt:m=c;break;case Kt:p=c}return C("label",Object.assign({htmlFor:r,className:a(["adl-radio-card",d])},{children:[u&&C("div",Object.assign({className:"adl-u-margin-bottom-16 adl-radio-card__icon","aria-hidden":"true"},{children:u.props.children})),C("div",Object.assign({className:"adl-radio-card__content"},{children:[C("div",Object.assign({className:"adl-radio-card__header adl-u-display-flex adl-u-align-items-center"},{children:[C("div",Object.assign({className:a(["adl-label","adyen-kyc-radio-group-card__label","adl-u-margin-bottom-16",l,{"adyen-kyc-radio-group-card__label--invalid":i}])},{children:[e.subtitle&&C("div",Object.assign({className:"adyen-kyc-radio-group-card__subtitle"},{children:n.get(e.subtitle)})),n.get(e.name)]})),C(qt,{id:r,type:"radio",checked:o===e.id,className:"adyen-kyc-radio-group-card__input",name:t,onChange:s,onClick:s,value:e.id,"aria-checked":o===e.id})]})),C("div",m?Object.assign({className:"adl-radio-card__body adl-u-margin-bottom-16"},{children:m.props.children}):Object.assign({className:"adl-radio-card__body adl-u-margin-bottom-16"},{children:n.get(e.description)})),p&&C("div",Object.assign({className:"adl-u-margin-bottom-16"},{children:p.props.children}))]}))]}),e.id)};function Zt(e){const{items:t,i18n:a,name:r,onChange:n,value:i,isInvalid:o,uniqueId:s}=e,d=null==s?void 0:s.replace(/[0-9]/g,"").substring(0,s.lastIndexOf("-"));return C("div",Object.assign({className:"adyen-kyc-radio-group-card"},{children:t.map((e=>{const t=Ve(d);return C(zt,{item:e,uniqueId:t,i18n:a,isInvalid:o,value:i,onChange:n,name:r},e.id)}))}))}function Qt(e){const{autoCorrect:t,classNameModifiers:r,isInvalid:i,isValid:o,readonly:s=null,spellCheck:d,disabled:l,showInlineErrors:c,uniqueId:u,maxLength:m}=e,{i18n:p}=We(),[g,y]=se("");Object.prototype.hasOwnProperty.call(e,"onChange")&&console.error("Error: Form fields that rely on InputBase may not have an onChange property");const b=a("adyen-kyc-input","adyen-kyc-input--textarea",e.className,{"adyen-kyc-input--invalid":i,"adyen-kyc-field--valid":o,"adyen-kyc-input--disabled":l},r.map((e=>`adyen-kyc-input--${e}`))),f=n(e,["classNameModifiers","uniqueId","showInlineErrors"]),h=m-g.length;return C("div",Object.assign({className:"adyen-kyc-input-wrapper"},{children:[C("textarea",Object.assign({id:u},f,{className:b,readOnly:s,spellCheck:d,autoCorrect:t},l&&{"aria-disabled":!0},{"aria-describedby":c?`${u}${Me}`:null,onInput:t=>{var a;t.target.value=ut(t.target.value),y(t.target.value),null===(a=null==e?void 0:e.onInput)||void 0===a||a.call(e,t)},onBlur:t=>{var a,r;null===(a=null==e?void 0:e.onBlurHandler)||void 0===a||a.call(e,t),e.trimOnBlur&&(t.target.value=t.target.value.trim()),null===(r=null==e?void 0:e.onBlur)||void 0===r||r.call(e,t)},onFocus:t=>{var a;null===(a=null==e?void 0:e.onFocusHandler)||void 0===a||a.call(e,t)}})),m&&h>=0?C("span",Object.assign({className:"adyen-kyc-input__counter"},{children:p.get("xCharactersLeft",{values:{charactersLeft:h}})})):null]}))}zt.Icon=Xt,zt.Body=Yt,zt.Footer=Kt,Zt.defaultProps={onChange:()=>{},items:[]};const Jt=(e,t)=>{const a={boolean:at,radio:Gt,select:lt,radioCard:Zt,date:Bt,emailAddress:Ht,email:Ht,tel:Wt,text:Vt,file:$t,textArea:Qt,default:Vt};return C(a[e]||a.default,Object.assign({},t))};function ea(e,t){const{i18n:a,loadingContext:r,clientKey:n}=We(),[i,o]=se([]),[s,d]=se(!1);return le((()=>{t||O(e,r,a.locale,n).then((e=>{const t=e&&e.length?e:[];o(t),d(!0)})).catch((()=>{o([]),d(!0)}))}),[e,r,a.locale,n,t]),{dataset:i,loaded:s}}function ta(e){const{classNameModifiers:t,selectedCountry:a,onDropdownChange:r,value:n,readOnly:i}=e,{i18n:o,commonProps:s}=We(),d=we("stateOrProvince",a),l=we("stateOrProvincePlaceholder",a),{dataset:c,loaded:m}=ea(u(a),!a||!Ce.includes(a));return m&&c.length?C(Ue,Object.assign({name:"stateOrProvince",label:o.get(d),classNameModifiers:t,errorMessage:e.errorMessage,isValid:!!n,showInlineErrors:s.showInlineErrors},{children:Jt("select",{name:"stateOrProvince",onChange:r,selected:n,placeholder:o.get(l),items:c,readonly:i&&!!n,showInlineErrors:s.showInlineErrors})})):null}function aa({allowedCountries:e=[],classNameModifiers:t=[],errorMessage:a,onDropdownChange:r,value:n,readOnly:i,label:o}){const{i18n:s,commonProps:d}=We(),{dataset:l}=ea(c),u=l.filter((t=>!e.length||e.includes(t.id))).map((e=>Object.assign(Object.assign({},e),{sprite:`#adl-flag-${e.id.toLowerCase()}`})));return C(Ue,Object.assign({name:"country",label:o||s.get("country"),errorMessage:a,classNameModifiers:t,isValid:!!n,showInlineErrors:d.showInlineErrors},{children:Jt("select",{onChange:r,name:"country",placeholder:s.get("selectCountry"),selected:n,items:u,readonly:(1===u.length||i)&&!!n,showInlineErrors:d.showInlineErrors})}))}var ra=(e,t)=>({getPlaceholder:(a,r=null)=>{var n,i,o;const s=null!==(o=null!==(i=null===(n=e.placeholders)||void 0===n?void 0:n[a])&&void 0!==i?i:r)&&void 0!==o?o:a;return t.get(s)},getLabel:(a,r=null)=>{var n,i,o;const s=null!==(o=null!==(i=null===(n=e.labels)||void 0===n?void 0:n[a])&&void 0!==i?i:r)&&void 0!==o?o:a;return t.get(s)},isRequiredField:(t,a=!0)=>e.requiredFields?e.requiredFields.includes(t)&&("role"!==t||"role"===t&&"individual"!==e.taskType):a,isOptionalField:t=>{var a;return null===(a=e.optionalFields)||void 0===a?void 0:a.includes(t)},isVisibleField:function(e,t=!0){return this.isRequiredField(e,t)||this.isOptionalField(e)},isReadOnly:t=>e.readOnly||!!e.readOnlyFields&&e.readOnlyFields.includes(t),getVal:e=>{if("string"==typeof e)return t.get(e);let a="error";if(e&&"object"==typeof e){const{translationKey:r,translationObject:n}=e;a=t.get(r,n)}return a},getErrorMessage:(e,a,r)=>{var n;const i=null===(n=null==a?void 0:a[e])||void 0===n?void 0:n.errorMessage;if("object"==typeof i){const{translationKey:e,translationObject:a}=i;return t.get(e,a)}return i?t.get(i):Boolean(null==r?void 0:r[e])}});function na(e){const{i18n:t,commonProps:a}=We(),{classNameModifiers:r=[],data:n,valid:i,errors:o,fieldProblems:s,fieldName:d,onInput:l,onBlur:c,trimOnBlur:u}=e,m=ra(e,t).getErrorMessage(d,o,s),p=n[d],g=we(d,n.country),y=o=>{switch(o){case"country":return C(aa,{classNameModifiers:r,allowedCountries:e.allowedCountries,errorMessage:m,onDropdownChange:e.onDropdownChange,value:p,className:e.hideField?"adl-u-display-none":""});case"stateOrProvince":return C(ta,{classNameModifiers:r,selectedCountry:n.country,errorMessage:m,onDropdownChange:e.onDropdownChange,value:p});default:return C(Ue,Object.assign({name:o,label:t.get(g),classNameModifiers:r,errorMessage:m,isValid:i[o],showInlineErrors:a.showInlineErrors},{children:Jt("text",{classNameModifiers:r,name:o,value:p,onInput:l,onBlur:c,maxlength:e.maxlength,"aria-required":!0,"aria-label":e["aria-label"],"aria-invalid":!i[o],showInlineErrors:a.showInlineErrors,trimOnBlur:u})}))}};return e.hideField?C("div",Object.assign({className:"adl-u-display-none"},{children:y(d)})):y(d)}class ia{constructor(e){this.validationResults=e}get isValid(){return this.validationResults.reduce(((e,t)=>e&&t.isValid),!0)}hasError(){return Boolean(this.getError())}getError(){return this.validationResults.find((e=>e.hasError))}getAllErrors(){return this.validationResults.filter((e=>e.hasError))}}const oa={validate:()=>!0,modes:["blur","input"]};class sa{constructor(e){this.setRules(e)}setRules(e){this.rules=Object.assign(Object.assign({},this.rules),e)}getRulesFor(e){var t;const a=null!==(t=this.rules[e])&&void 0!==t?t:[oa];return Array.isArray(a)?a:[a]}validate({key:e,value:t,mode:a="blur"},r){const n=this.getRulesFor(e).map((e=>((e,t,a,r)=>{const n=e.validate(t,r),i=e.modes.includes(a);return{isValid:n,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t,r):e.errorMessage,hasError:i&&!n}})(e,t,a,r)));return new ia(n)}}const da=(e,t)=>Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,a)=>(t[a]=e[a],t)),{}),la=(e,t,a,r,n)=>t.reduce(((e,t)=>{var i,o,s;return Object.assign(Object.assign({},e),{[t]:null!==(s=null!==(o=null!==(i=e[t])&&void 0!==i?i:null==n?void 0:n[t])&&void 0!==o?o:null==r?void 0:r[t])&&void 0!==s?s:a})}),e);function ca({schema:e,defaultData:t,processField:a,fieldProblems:r,maskedFields:n}){const i=e=>{var i,o;if(void 0===t[e])return{valid:!1,errors:null,data:null,fieldProblems:null!==(i=null==r?void 0:r[e])&&void 0!==i?i:null};const[s,d]=a({key:e,value:t[e],mode:"blur",defaultData:t,maskedFields:n},{state:{data:t}});return{valid:d.isValid&&!(null==r?void 0:r[e])||!1,errors:d.hasError()?d.getError():null,data:s,fieldProblems:null!==(o=null==r?void 0:r[e])&&void 0!==o?o:null}},o=e.reduce(((e,t)=>{const{valid:a,errors:r,data:n,fieldProblems:o}=i(t);return{valid:Object.assign(Object.assign({},e.valid),{[t]:a}),errors:Object.assign(Object.assign({},e.errors),{[t]:r}),data:Object.assign(Object.assign({},e.data),{[t]:n}),fieldProblems:Object.assign(Object.assign({},e.fieldProblems),{[t]:o})}}),{data:{},valid:{},errors:{},fieldProblems:{}});return{schema:e,data:o.data,valid:o.valid,errors:o.errors,fieldProblems:o.fieldProblems,maskedFields:n}}function ua({rules:e,schema:t,formatters:a,defaultData:r={},fieldProblems:n,maskedFields:i}){var o;const s=me((()=>new sa(e)),[e]),d=pe("function"==typeof t?t:()=>t,[t]),l=({key:e,value:t,mode:r,defaultData:n,maskedFields:i},o)=>{var d;const l=(null===(d=null==a?void 0:a[e])||void 0===d?void 0:d.formatter)?a[e].formatter:null==a?void 0:a[e],c=l&&"function"==typeof l?l(null!=t?t:"",o):t;return[c,!((null==i?void 0:i.includes(e))&&n[e]===t&&n[e])?s.validate({key:e,value:c,mode:r},o):{isValid:!0,hasError:()=>null}]},[c,u]=de(function(e){return function(t,{type:a,key:r,value:n,mode:i,schema:o,defaultData:s,formValue:d,selectedSchema:l,maskedFields:c,fieldProblems:u}){var m,p,g,y,b;const f=l||t.schema;switch(a){case"setData":return Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{[r]:n})});case"setValid":return Object.assign(Object.assign({},t),{valid:Object.assign(Object.assign({},t.valid),{[r]:n})});case"setErrors":return Object.assign(Object.assign({},t),{errors:Object.assign(Object.assign({},t.errors),{[r]:n})});case"setFieldProblems":return null!==(p=null===(m=null==t?void 0:t.schema)||void 0===m?void 0:m.reduce(((e,a)=>{var r,n;return Object.assign(Object.assign({},e),{fieldProblems:Object.assign(Object.assign({},t.fieldProblems),{[a]:null!==(r=null==u?void 0:u[a])&&void 0!==r?r:null}),valid:Object.assign(Object.assign({},t.valid),{[a]:(null===(n=t.valid)||void 0===n?void 0:n[a])&&!u[a]})})}),t))&&void 0!==p?p:t;case"updateField":{const[a,o]=e({key:r,value:n,mode:i,defaultData:s,maskedFields:c},{state:t}),d=t.data[r],l=Object.assign({},t.fieldProblems);return d!==a&&(l[r]=null),Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{[r]:a}),errors:Object.assign(Object.assign({},t.errors),{[r]:o.hasError()?o.getError():null}),valid:Object.assign(Object.assign({},t.valid),{[r]:o.isValid&&!l[r]||!1}),fieldProblems:l})}case"mergeForm":{const e=Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),d.data),errors:Object.assign(Object.assign({},t.errors),d.errors),valid:Object.assign(Object.assign({},t.valid),d.valid),fieldProblems:Object.assign(Object.assign({},t.fieldProblems),d.fieldProblems)});return e.valid&&(e.isValid=Object.values(e.valid).every((e=>e))),e}case"setSchema":{const a=ca({schema:o,defaultData:s,processField:e,fieldProblems:u,maskedFields:c}),r=t.schema.filter((e=>!o.includes(e))),n=o.filter((e=>!t.schema.includes(e))),i={data:da(t.data,n),errors:da(t.errors,n),valid:da(t.valid,n)},d=la(da(t.data,r),n,null,a.data,null===(g=t.local)||void 0===g?void 0:g.data),l=la(da(t.valid,r),n,!1,a.valid,null===(y=t.local)||void 0===y?void 0:y.valid),m=la(da(t.errors,r),n,null,a.errors,null===(b=t.local)||void 0===b?void 0:b.errors);return Object.assign(Object.assign({},t),{schema:o,data:d,valid:l,errors:m,local:i})}case"validateForm":{const a=f.reduce(((a,r)=>{const[,n]=e({key:r,value:t.data[r],mode:"blur",defaultData:s,maskedFields:c},{state:t});return{valid:Object.assign(Object.assign({},a.valid),{[r]:n.isValid&&!t.fieldProblems[r]||!1}),errors:Object.assign(Object.assign({},a.errors),{[r]:n.hasError()?n.getError():null})}}),{valid:t.valid,errors:t.errors});return Object.assign(Object.assign({},t),{valid:a.valid,errors:a.errors})}default:throw new Error("Undefined useForm action")}}}(l),{defaultData:r,schema:null!==(o=d(r))&&void 0!==o?o:[],processField:l,fieldProblems:n,maskedFields:i},ca),m=me((()=>c.schema.reduce(((e,t)=>e&&c.valid[t]),!0)),[c.schema,c.valid]),p=pe(((e=null)=>{u({type:"validateForm",selectedSchema:e,defaultData:r,maskedFields:i})}),[]),g=pe(((e,t)=>u({type:"setErrors",key:e,value:t})),[]),y=pe(((e,t)=>u({type:"setValid",key:e,value:t})),[]),b=pe(((e,t)=>u({type:"setData",key:e,value:t})),[]),f=pe((e=>u({type:"setSchema",schema:e,defaultData:r})),[c.schema]),h=pe((e=>u({type:"mergeForm",formValue:e})),[]),v=pe((e=>u({type:"setFieldProblems",fieldProblems:e})),[c.schema]);return le((()=>{const e=d(c.data);U(c.schema,e)||f(e)}),[c.schema,c.data,f,d]),le((()=>{v(null!=n?n:{})}),[JSON.stringify(n)]),{handleChangeFor:(e,t="blur")=>a=>{const n=((e,t)=>t.target?"checkbox"===t.target.type?!c.data[e]:t.target.value:t)(e,a);u({type:"updateField",key:e,value:n,mode:t,defaultData:r,maskedFields:i})},triggerValidation:p,setData:b,setValid:y,setErrors:g,isValid:m,mergeForm:h,setFieldProblems:v,schema:c.schema,valid:c.valid,errors:c.errors,data:c.data,fieldProblems:c.fieldProblems}}var ma="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},pa={},ga={get exports(){return pa},set exports(e){pa=e}},ya=function(e){return e&&e.Math==Math&&e},ba=ya("object"==typeof globalThis&&globalThis)||ya("object"==typeof window&&window)||ya("object"==typeof self&&self)||ya("object"==typeof ma&&ma)||function(){return this}()||Function("return this")(),fa={},ha=function(e){try{return!!e()}catch(e){return!0}},va=!ha((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),_a=!ha((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Na=_a,Oa=Function.prototype.call,Ia=Na?Oa.bind(Oa):function(){return Oa.apply(Oa,arguments)},Ea={},Ta={}.propertyIsEnumerable,Aa=Object.getOwnPropertyDescriptor,Sa=Aa&&!Ta.call({1:2},1);Ea.f=Sa?function(e){var t=Aa(this,e);return!!t&&t.enumerable}:Ta;var Ra,Ca,Da=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ka=_a,La=Function.prototype,wa=La.call,Pa=ka&&La.bind.bind(wa,wa),ja=ka?Pa:function(e){return function(){return wa.apply(e,arguments)}},xa=ja,Ma=xa({}.toString),Fa=xa("".slice),Va=function(e){return Fa(Ma(e),8,-1)},Ua=ha,Ba=Va,Wa=Object,Ha=ja("".split),qa=Ua((function(){return!Wa("z").propertyIsEnumerable(0)}))?function(e){return"String"==Ba(e)?Ha(e,""):Wa(e)}:Wa,Ga=function(e){return null==e},$a=Ga,Xa=TypeError,Ya=function(e){if($a(e))throw Xa("Can't call method on "+e);return e},Ka=qa,za=Ya,Za=function(e){return Ka(za(e))},Qa="object"==typeof document&&document.all,Ja={all:Qa,IS_HTMLDDA:void 0===Qa&&void 0!==Qa},er=Ja.all,tr=Ja.IS_HTMLDDA?function(e){return"function"==typeof e||e===er}:function(e){return"function"==typeof e},ar=tr,rr=Ja.all,nr=Ja.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:ar(e)||e===rr}:function(e){return"object"==typeof e?null!==e:ar(e)},ir=ba,or=tr,sr=function(e){return or(e)?e:void 0},dr=function(e,t){return arguments.length<2?sr(ir[e]):ir[e]&&ir[e][t]},lr=ja({}.isPrototypeOf),cr=ba,ur=dr("navigator","userAgent")||"",mr=cr.process,pr=cr.Deno,gr=mr&&mr.versions||pr&&pr.version,yr=gr&&gr.v8;yr&&(Ca=(Ra=yr.split("."))[0]>0&&Ra[0]<4?1:+(Ra[0]+Ra[1])),!Ca&&ur&&(!(Ra=ur.match(/Edge\/(\d+)/))||Ra[1]>=74)&&(Ra=ur.match(/Chrome\/(\d+)/))&&(Ca=+Ra[1]);var br=Ca,fr=ha,hr=!!Object.getOwnPropertySymbols&&!fr((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&br&&br<41})),vr=hr&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_r=dr,Nr=tr,Or=lr,Ir=Object,Er=vr?function(e){return"symbol"==typeof e}:function(e){var t=_r("Symbol");return Nr(t)&&Or(t.prototype,Ir(e))},Tr=String,Ar=tr,Sr=function(e){try{return Tr(e)}catch(e){return"Object"}},Rr=TypeError,Cr=function(e){if(Ar(e))return e;throw Rr(Sr(e)+" is not a function")},Dr=Ga,kr=Ia,Lr=tr,wr=nr,Pr=TypeError,jr={},xr={get exports(){return jr},set exports(e){jr=e}},Mr=ba,Fr=Object.defineProperty,Vr=function(e,t){try{Fr(Mr,e,{value:t,configurable:!0,writable:!0})}catch(a){Mr[e]=t}return t},Ur=Vr,Br="__core-js_shared__",Wr=ba[Br]||Ur(Br,{}),Hr=Wr;(xr.exports=function(e,t){return Hr[e]||(Hr[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var qr=Ya,Gr=Object,$r=function(e){return Gr(qr(e))},Xr=ja({}.hasOwnProperty),Yr=Object.hasOwn||function(e,t){return Xr($r(e),t)},Kr=ja,zr=0,Zr=Math.random(),Qr=Kr(1..toString),Jr=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Qr(++zr+Zr,36)},en=ba,tn=Yr,an=Jr,rn=hr,nn=vr,on=jr("wks"),sn=en.Symbol,dn=sn&&sn.for,ln=nn?sn:sn&&sn.withoutSetter||an,cn=function(e){if(!tn(on,e)||!rn&&"string"!=typeof on[e]){var t="Symbol."+e;rn&&tn(sn,e)?on[e]=sn[e]:on[e]=nn&&dn?dn(t):ln(t)}return on[e]},un=Ia,mn=nr,pn=Er,gn=function(e,t){var a=e[t];return Dr(a)?void 0:Cr(a)},yn=function(e,t){var a,r;if("string"===t&&Lr(a=e.toString)&&!wr(r=kr(a,e)))return r;if(Lr(a=e.valueOf)&&!wr(r=kr(a,e)))return r;if("string"!==t&&Lr(a=e.toString)&&!wr(r=kr(a,e)))return r;throw Pr("Can't convert object to primitive value")},bn=TypeError,fn=cn("toPrimitive"),hn=function(e,t){if(!mn(e)||pn(e))return e;var a,r=gn(e,fn);if(r){if(void 0===t&&(t="default"),a=un(r,e,t),!mn(a)||pn(a))return a;throw bn("Can't convert object to primitive value")}return void 0===t&&(t="number"),yn(e,t)},vn=Er,_n=function(e){var t=hn(e,"string");return vn(t)?t:t+""},Nn=nr,On=ba.document,In=Nn(On)&&Nn(On.createElement),En=function(e){return In?On.createElement(e):{}},Tn=!va&&!ha((function(){return 7!=Object.defineProperty(En("div"),"a",{get:function(){return 7}}).a})),An=va,Sn=Ia,Rn=Ea,Cn=Da,Dn=Za,kn=_n,Ln=Yr,wn=Tn,Pn=Object.getOwnPropertyDescriptor;fa.f=An?Pn:function(e,t){if(e=Dn(e),t=kn(t),wn)try{return Pn(e,t)}catch(e){}if(Ln(e,t))return Cn(!Sn(Rn.f,e,t),e[t])};var jn={},xn=va&&ha((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Mn=nr,Fn=String,Vn=TypeError,Un=function(e){if(Mn(e))return e;throw Vn(Fn(e)+" is not an object")},Bn=va,Wn=Tn,Hn=xn,qn=Un,Gn=_n,$n=TypeError,Xn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Kn="enumerable",zn="configurable",Zn="writable";jn.f=Bn?Hn?function(e,t,a){if(qn(e),t=Gn(t),qn(a),"function"==typeof e&&"prototype"===t&&"value"in a&&Zn in a&&!a[Zn]){var r=Yn(e,t);r&&r[Zn]&&(e[t]=a.value,a={configurable:zn in a?a[zn]:r[zn],enumerable:Kn in a?a[Kn]:r[Kn],writable:!1})}return Xn(e,t,a)}:Xn:function(e,t,a){if(qn(e),t=Gn(t),qn(a),Wn)try{return Xn(e,t,a)}catch(e){}if("get"in a||"set"in a)throw $n("Accessors not supported");return"value"in a&&(e[t]=a.value),e};var Qn=jn,Jn=Da,ei=va?function(e,t,a){return Qn.f(e,t,Jn(1,a))}:function(e,t,a){return e[t]=a,e},ti={},ai={get exports(){return ti},set exports(e){ti=e}},ri=va,ni=Yr,ii=Function.prototype,oi=ri&&Object.getOwnPropertyDescriptor,si=ni(ii,"name"),di={EXISTS:si,PROPER:si&&"something"===function(){}.name,CONFIGURABLE:si&&(!ri||ri&&oi(ii,"name").configurable)},li=tr,ci=Wr,ui=ja(Function.toString);li(ci.inspectSource)||(ci.inspectSource=function(e){return ui(e)});var mi,pi,gi,yi=ci.inspectSource,bi=tr,fi=ba.WeakMap,hi=bi(fi)&&/native code/.test(String(fi)),vi=Jr,_i=jr("keys"),Ni={},Oi=hi,Ii=ba,Ei=nr,Ti=ei,Ai=Yr,Si=Wr,Ri=function(e){return _i[e]||(_i[e]=vi(e))},Ci=Ni,Di="Object already initialized",ki=Ii.TypeError,Li=Ii.WeakMap;if(Oi||Si.state){var wi=Si.state||(Si.state=new Li);wi.get=wi.get,wi.has=wi.has,wi.set=wi.set,mi=function(e,t){if(wi.has(e))throw ki(Di);return t.facade=e,wi.set(e,t),t},pi=function(e){return wi.get(e)||{}},gi=function(e){return wi.has(e)}}else{var Pi=Ri("state");Ci[Pi]=!0,mi=function(e,t){if(Ai(e,Pi))throw ki(Di);return t.facade=e,Ti(e,Pi,t),t},pi=function(e){return Ai(e,Pi)?e[Pi]:{}},gi=function(e){return Ai(e,Pi)}}var ji={set:mi,get:pi,has:gi,enforce:function(e){return gi(e)?pi(e):mi(e,{})},getterFor:function(e){return function(t){var a;if(!Ei(t)||(a=pi(t)).type!==e)throw ki("Incompatible receiver, "+e+" required");return a}}},xi=ha,Mi=tr,Fi=Yr,Vi=va,Ui=di.CONFIGURABLE,Bi=yi,Wi=ji.enforce,Hi=ji.get,qi=Object.defineProperty,Gi=Vi&&!xi((function(){return 8!==qi((function(){}),"length",{value:8}).length})),$i=String(String).split("String"),Xi=ai.exports=function(e,t,a){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(t="get "+t),a&&a.setter&&(t="set "+t),(!Fi(e,"name")||Ui&&e.name!==t)&&(Vi?qi(e,"name",{value:t,configurable:!0}):e.name=t),Gi&&a&&Fi(a,"arity")&&e.length!==a.arity&&qi(e,"length",{value:a.arity});try{a&&Fi(a,"constructor")&&a.constructor?Vi&&qi(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Wi(e);return Fi(r,"source")||(r.source=$i.join("string"==typeof t?t:"")),e};Function.prototype.toString=Xi((function(){return Mi(this)&&Hi(this).source||Bi(this)}),"toString");var Yi=tr,Ki=jn,zi=ti,Zi=Vr,Qi={},Ji=Math.ceil,eo=Math.floor,to=Math.trunc||function(e){var t=+e;return(t>0?eo:Ji)(t)},ao=to,ro=function(e){var t=+e;return t!=t||0===t?0:ao(t)},no=ro,io=Math.max,oo=Math.min,so=ro,lo=Math.min,co=function(e){return e>0?lo(so(e),9007199254740991):0},uo=Za,mo=function(e,t){var a=no(e);return a<0?io(a+t,0):oo(a,t)},po=function(e){return co(e.length)},go=function(e){return function(t,a,r){var n,i=uo(t),o=po(i),s=mo(r,o);if(e&&a!=a){for(;o>s;)if((n=i[s++])!=n)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===a)return e||s||0;return!e&&-1}},yo={includes:go(!0),indexOf:go(!1)},bo=Yr,fo=Za,ho=yo.indexOf,vo=Ni,_o=ja([].push),No=function(e,t){var a,r=fo(e),n=0,i=[];for(a in r)!bo(vo,a)&&bo(r,a)&&_o(i,a);for(;t.length>n;)bo(r,a=t[n++])&&(~ho(i,a)||_o(i,a));return i},Oo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Qi.f=Object.getOwnPropertyNames||function(e){return No(e,Oo)};var Io={};Io.f=Object.getOwnPropertySymbols;var Eo=dr,To=Qi,Ao=Io,So=Un,Ro=ja([].concat),Co=Eo("Reflect","ownKeys")||function(e){var t=To.f(So(e)),a=Ao.f;return a?Ro(t,a(e)):t},Do=Yr,ko=Co,Lo=fa,wo=jn,Po=ha,jo=tr,xo=/#|\.prototype\./,Mo=function(e,t){var a=Vo[Fo(e)];return a==Bo||a!=Uo&&(jo(t)?Po(t):!!t)},Fo=Mo.normalize=function(e){return String(e).replace(xo,".").toLowerCase()},Vo=Mo.data={},Uo=Mo.NATIVE="N",Bo=Mo.POLYFILL="P",Wo=Mo,Ho=ba,qo=fa.f,Go=ei,$o=function(e,t,a,r){r||(r={});var n=r.enumerable,i=void 0!==r.name?r.name:t;if(Yi(a)&&zi(a,i,r),r.global)n?e[t]=a:Zi(t,a);else{try{r.unsafe?e[t]&&(n=!0):delete e[t]}catch(e){}n?e[t]=a:Ki.f(e,t,{value:a,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Xo=Vr,Yo=function(e,t,a){for(var r=ko(t),n=wo.f,i=Lo.f,o=0;o<r.length;o++){var s=r[o];Do(e,s)||a&&Do(a,s)||n(e,s,i(t,s))}},Ko=Wo,zo=function(e,t){var a,r,n,i,o,s=e.target,d=e.global,l=e.stat;if(a=d?Ho:l?Ho[s]||Xo(s,{}):(Ho[s]||{}).prototype)for(r in t){if(i=t[r],n=e.dontCallGetSet?(o=qo(a,r))&&o.value:a[r],!Ko(d?r:s+(l?".":"#")+r,e.forced)&&void 0!==n){if(typeof i==typeof n)continue;Yo(i,n)}(e.sham||n&&n.sham)&&Go(i,"sham",!0),$o(a,r,i,e)}},Zo={};Zo[cn("toStringTag")]="z";var Qo="[object z]"===String(Zo),Jo=tr,es=Va,ts=cn("toStringTag"),as=Object,rs="Arguments"==es(function(){return arguments}()),ns=Qo?es:function(e){var t,a,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(t=as(e),ts))?a:rs?es(t):"Object"==(r=es(t))&&Jo(t.callee)?"Arguments":r},is=String,os="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff",ss=Ya,ds=function(e){if("Symbol"===ns(e))throw TypeError("Cannot convert a Symbol value to a string");return is(e)},ls=os,cs=ja("".replace),us="["+ls+"]",ms=RegExp("^"+us+us+"*"),ps=RegExp(us+us+"*$"),gs=function(e){return function(t){var a=ds(ss(t));return 1&e&&(a=cs(a,ms,"")),2&e&&(a=cs(a,ps,"")),a}},ys={start:gs(1),end:gs(2),trim:gs(3)},bs=di.PROPER,fs=ha,hs=os,vs=ys.start,_s=function(e){return fs((function(){return!!hs[e]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[e]()||bs&&hs[e].name!==e}))}("trimStart")?function(){return vs(this)}:"".trimStart;zo({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==_s},{trimLeft:_s});zo({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==_s},{trimStart:_s});var Ns=ba,Os=ja,Is=function(e,t){return Os(Ns[e].prototype[t])}("String","trimLeft");ga.exports=Is;const Es=(e,t,a,r)=>{var n,i,o,s;if(r&&(null===(i=null===(n=e[a])||void 0===n?void 0:n[t])||void 0===i?void 0:i.formatter))return null;const d=null===(s=null===(o=e[a])||void 0===o?void 0:o[t])||void 0===s?void 0:s.maxlength;return d||30};function Ts(e,t,a){if(!a||!t[a])return e;const r={};return Object.entries(e).forEach((([e,n])=>{const i=t[a][e];if(i){const t=Array.isArray(n)?[...n]:[n],a=Array.isArray(i)?[...i]:[i];r[e]=[...a],t.forEach((t=>{const n=t.modes;let i=!1;a.every((e=>(i=U(e.modes,n),!i))),i||r[e].unshift(t)}))}else r[e]=n})),Object.entries(t[a]).forEach((([e,t])=>{r[e]||(r[e]=t)})),r}const As=e=>!(null!=e),Ss=e=>!!(As(e)||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&/^[\s]*$/.test(e)),Rs=e=>"string"==typeof e||e instanceof String,Cs=e=>Rs(e)&&!Ss(e),Ds="?\\-\\+_=!@#$%^&*(){}~<>\\[\\]\\/\\\\",ks=(e,t="g")=>new RegExp(`[${e}]`,t),Ls={digitsHyphen:/^[\d-]+$/,noHtml:/^[^<>&]+$/,alphaNum:/^\d[a-zA-Z0-9]{6,11}$/,noSpecialChars:(ws=Ds,Ps=!0,new RegExp(`^[${Ps?"^":""}${ws}]+$`))};var ws,Ps;const js=(e,t)=>!!Ss(e)||e.length===t,xs=e=>e.trimStart().replace(/\s+/g," ");function Ms({heading:e,description:t,headingComponent:a,descriptionComponent:r,classNames:n}){const i=e?C("h2",Object.assign({className:"adyen-kyc-form-header__heading"},{children:e})):a,o=t?C("div",Object.assign({className:"adyen-kyc-form-header__description"},{children:t})):r;return i||o?C("div",Object.assign({className:`adyen-kyc-form-header ${n}`},{children:[i,o]})):null}const Fs=e=>({formatter:t=>t.replace(ks("^\\d","g"),"").substr(0,e),format:new Array(e).fill("9").join(""),maxlength:e}),Vs=ks(Ds),Us=ks(Ds.replace("-","")),Bs={postalCode:{formatter:(e,t)=>{var a;const r=t.state.data.country,n=null===(a=Ws[r])||void 0===a?void 0:a.postalCode.formatter;return n?n(e):e}},street:{formatter:e=>xs(e).replace(Us,"")},houseNumberOrName:{formatter:e=>xs(e).replace(Us,"")},city:{formatter:e=>xs(e).replace(Vs,"")}},Ws={AT:{postalCode:Fs(4)},AU:{postalCode:Fs(4)},BE:{postalCode:Fs(4)},BG:{postalCode:Fs(4)},BR:{postalCode:Fs(8)},CA:{postalCode:{format:"A9A 9A9 or A9A9A9",maxlength:7}},CH:{postalCode:Fs(4)},CY:{postalCode:Fs(4)},CZ:{postalCode:{format:"999 99",maxlength:6}},DE:{postalCode:Fs(5)},DK:{postalCode:{format:"9999",maxlength:7}},EE:{postalCode:Fs(5)},ES:{postalCode:Fs(5)},FI:{postalCode:Fs(5)},FR:{postalCode:Fs(5)},GB:{postalCode:{formatter:e=>e.replace(ks(Ds),"").substr(0,8),format:"AA99 9AA or A99 9AA or A9 9AA",maxlength:8}},GR:{postalCode:{format:"999 99",maxlength:6}},HR:{postalCode:{format:"[1-5]9999",maxlength:5}},HU:{postalCode:Fs(4)},IE:{postalCode:{format:"A99 A999",maxlength:8}},IS:{postalCode:Fs(3)},IT:{postalCode:Fs(5)},LI:{postalCode:Fs(4)},LT:{postalCode:{format:"9999 or 99999 or LT-99999",maxlength:8}},LU:{postalCode:Fs(4)},LV:{postalCode:{format:"9999 or LV-9999",maxlength:7}},MC:{postalCode:{format:"980NN",maxlength:5}},MT:{postalCode:{format:"AA99 or AAA99 or AA9999 or AAA9999",maxlength:8}},MY:{postalCode:Fs(5)},NL:{postalCode:{format:"9999AA",maxlength:7}},NZ:{postalCode:Fs(4)},NO:{postalCode:Fs(4)},PL:{postalCode:{formatter:e=>{const t=e.replace(ks("^\\d-","g"),""),a=t.indexOf("-")>-1?6:5;return t.substr(0,a)},format:"99-999",maxlength:6}},PT:{postalCode:{formatter:e=>e.replace(ks("^\\d-","g"),"").substr(0,8),format:"9999-999",maxlength:8}},RO:{postalCode:Fs(6)},SI:{postalCode:{format:"9999 or SI-9999",maxlength:7}},SE:{postalCode:Fs(5)},SG:{postalCode:Fs(6)},SK:{postalCode:{format:"99999 or SK-99999",maxlength:8}},JP:{postalCode:{format:"999-9999",maxlength:8}},US:{postalCode:{formatter:e=>{const t=e.replace(ks("^\\d-","g"),""),a=t.indexOf("-")>-1?10:5;return t.substr(0,a)},format:"99999 or 99999-9999"}}},Hs=e=>({pattern:new RegExp(`\\d{${e}}`)}),qs={AT:Hs(4),AU:Hs(4),BE:{pattern:/(?:(?:[1-9])(?:\d{3}))/},BG:Hs(4),BR:Hs(8),CA:{pattern:/(?:[ABCEGHJ-NPRSTVXY]\d[A-Z][ -]?\d[A-Z]\d)/},CH:{pattern:/[1-9]\d{3}/},CY:Hs(4),CZ:{pattern:/\d{3}\s?\d{2}/},DE:Hs(5),DK:{pattern:/^(DK-)?[0-9]{4}$/},EE:Hs(5),ES:{pattern:/(?:0[1-9]|[1-4]\d|5[0-2])\d{3}/},FI:Hs(5),FR:Hs(5),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})$/},GE:Hs(4),GR:{pattern:/^\d{3}\s{0,1}\d{2}$/},HR:{pattern:/^([1-5])[0-9]{4}$/},HU:Hs(4),IE:{pattern:/(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}/},IS:Hs(3),IT:Hs(5),LI:Hs(4),LT:{pattern:/^(LT-)?[0-9]{4,5}$/},LU:Hs(4),LV:{pattern:/^(LV-)?[0-9]{4}$/},MC:{pattern:/^980\d{2}$/},MT:{pattern:/^[A-Za-z]{2,3}[ ]?\d{2}(?:\d{2})?$/},MY:Hs(5),NZ:Hs(4),NL:{pattern:/(?:NL-)?(?:[1-9]\d{3} ?(?:[A-EGHJ-NPRTVWXZ][A-EGHJ-NPRSTVWXZ]|S[BCEGHJ-NPRTVWXZ]))/},NO:Hs(4),PL:{pattern:/^\d{2}[-]\d{3}$/},PT:{pattern:/^([1-9]\d{3})([- ]?(\d{3})? *)$/},RO:Hs(6),SI:{pattern:/^(SI-)?[0-9]{4}$/},SE:Hs(5),SG:Hs(6),SK:{pattern:/^(SK-)?[0-9]{5}$/},JP:{pattern:/^\d{3}[-]\d{4}$/},US:{pattern:/^(\d{5})([-]?(\d{4})? *)$/}},Gs=["US","GB"],$s={street:{modes:["blur"],validate:e=>Cs(e),errorMessage:"fieldIsRequired"},houseNumberOrName:{modes:["blur"],validate:(e,t)=>{const a=t.state.data.country;return!(!a||!Gs.includes(a))||Cs(e)},errorMessage:"fieldIsRequired"},postalCode:{modes:["blur"],validate:(e,t)=>{var a,r;const n=t.state.data.country;if(n){$s.postalCode.errorMessage={translationKey:"invalidFormatExpects",translationObject:{values:{format:(null===(a=Ws[n])||void 0===a?void 0:a.postalCode.format)||null}}};const t=null===(r=qs[n])||void 0===r?void 0:r.pattern;return t?t.test(e):!!e}return!!e},errorMessage:"fieldIsRequired"},city:{modes:["blur"],validate:Cs,errorMessage:"fieldIsRequired"},stateOrProvince:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},country:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},Xs=t.createContext(null);function Ys({stateRef:e}){return e.current.setState?null:C(Xs.Consumer,{children:({dispatch:t,setActiveForms:a})=>(e.current.setState=dt(t,200),e.current.setActiveForms=a,null)})}var Ks;!function(e){e[e.BASIC=0]="BASIC",e[e.INFO=1]="INFO",e[e.ERROR=2]="ERROR",e[e.WARNING=3]="WARNING",e[e.SUCCESS=4]="SUCCESS"}(Ks||(Ks={}));const zs=({className:e,title:t,type:r=Ks.BASIC,children:n,hasCloseButton:i=!0})=>{const{i18n:o}=We(),[s,d]=se(!1);if(s)return null;const l=a("adl-alert",e,{"adl-alert--basic":r===Ks.BASIC,"adl-alert--information":r===Ks.INFO,"adl-alert--error":r===Ks.ERROR,"adl-alert--warning":r===Ks.WARNING,"adl-alert--success":r===Ks.SUCCESS});return C("div",Object.assign({className:l,role:"alert"},{children:[C("div",Object.assign({className:"adl-alert__header"},{children:[C("span",Object.assign({className:"adl-alert__icon"},{children:C(Zs,{type:r})})),t&&C("span",Object.assign({className:a("adl-alert__title",{"adl-alert__title--no-content":!n})},{children:t})),i&&C("button",Object.assign({className:"adl-alert__dismiss",onClick:()=>d(!0),"aria-label":o.get("close")},{children:C(xe,{name:"cross",className:"adl-alert__dismiss__icon"})}))]})),n]}))},Zs=({type:e})=>{switch(e){case Ks.SUCCESS:return C(xe,{name:"check"});case Ks.ERROR:return C(xe,{name:"warning"});case Ks.WARNING:return C(xe,{name:"field-error"});case Ks.INFO:case Ks.BASIC:default:return C(xe,{name:"info-circle",className:"adl-alert__icon__info"})}},Qs=t.createContext(null);const Js=(e,t)=>t?"adl-link__icon adyen-kyc-icon-external-link":e?"adl-link__icon":null,ed=({className:e,children:t,href:r,external:n,icon:i,underline:o,inheritStyles:s,showAsButton:d,iconLeft:l=!1,onClick:c})=>{if(!(e=>"#"!==e||(console.error('Links must include a valid href. If your href is "#", consider using a Button instead'),!1))(r))return null;const u=n?"_blank":"_self",m=n?"external noopener noreferrer ":null,p=i||n,g=d?a("adl-button",e,{"adl-button--icon":p&&!l,"adl-button--icon-left":p&&l}):a("adl-link",e,{"adl-link--with-icon":p,"adl-link--underline":o,"adl-link--inherit":s,"adl-link--icon-left":l});return C("a",Object.assign({href:r,className:g,target:u,rel:m,onClick:c},{children:[C("span",Object.assign({className:"adl-link__text"},{children:t})),p&&C(xe,{name:i,className:Js(i,n)})]}))},td=({fieldName:e,label:t})=>{const{goToFormByFieldName:a}=function(){const e=ge(Qs);if(void 0===e)throw new Error("useFormRouterContext must be used within a FormRouterProvider");return e}();return C(ed,Object.assign({onClick:t=>{t.preventDefault(),a(e)},href:"to-field-link"},{children:t}))},ad=({validationErrors:e,formUtils:t})=>{const a=Object.keys(e);return C(zs,Object.assign({title:t.getVal("informationCouldNotBeSubmitted"),type:Ks.ERROR,hasCloseButton:!1},{children:C("div",Object.assign({className:"adl-alert__explanation adyen-kyc-error-panel__validation-errors"},{children:1===(null==a?void 0:a.length)?C("div",Object.assign({"data-testid":"validation-error--case-1"},{children:[t.getVal({translationKey:"fieldHasUnsupportedFormats",translationObject:{values:{fieldName:t.getLabel(a[0])}}}).toString()," ",C(td,{fieldName:a[0],label:t.getVal("updateTheInformation")})," ",t.getVal("andResubmit")]})):C("div",Object.assign({"data-testid":"validation-error--case-2"},{children:[t.getVal("someFieldsHaveUnsupportedFormatedUpdateInfoAndResubmit"),C("ul",{children:a.map((e=>C("li",Object.assign({className:"adyen-kyc-error-panel__validation-error"},{children:C(td,{fieldName:e,label:t.getLabel(e)})}),e)))})]}))}))}))};var rd;!function(e){e.DATA_MISSING="dataMissing",e.INVALID_INPUT="invalidInput",e.PENDING_STATUS="pendingStatus"}(rd||(rd={}));const nd={"1_100":[],"1_101":[],"1_102":[{key:"documents"}],"1_300":[{key:"individual.birthData.dateOfBirth"},{key:"individual.identificationData.number"},{key:"individual.name.firstName"},{key:"individual.name.lastName"},{key:"individual.residentialAddress"}],"1_301":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_302":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_303":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_304":[{key:"documents",type:["proofOfResidency"]}],"1_305":[{key:"documents",type:["proofOfResidency"]}],"1_306":[{key:"documents",type:["proofOfResidency"]}],"1_307":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_308":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_309":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_313":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_314":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_315":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_316":[{key:"individual.identificationData.number"}],"1_500":[{key:"organization.legalName"},{key:"organization.registrationNumber"},{key:"organization.taxId"},{key:"organization.registeredAddress"}],"1_501":[{key:"documents",type:["registrationDocument"]}],"1_502":[{key:"documents",type:["registrationDocument"]}],"1_503":[{key:"documents",type:["taxDocument"]}],"1_504":[{key:"documents",type:["taxDocument"]}],"1_505":[{key:"documents",type:["proofOfAddress"]}],"1_506":[{key:"documents",type:["proofOfAddress"]}],"1_507":[],"1_508":[],"1_512":[{key:"documents",type:["taxDocument"]}],"1_513":[{key:"documents",type:["taxDocument"]}],"1_600":[{key:"soleProprietorship.name"},{key:"soleProprietorship.registeredAddress"}],"1_601":[{key:"documents",type:["solePropConstitutionalDocument"]}],"1_602":[{key:"documents",type:["solePropConstitutionalDocument"]}],"1_700":[{key:"bankAccount"}],"1_701":[{key:"bankAccount"}],"1_702":[{key:"bankAccount"}],"1_703":[{key:"documents",type:["bankStatementDocument"]}],"1_704":[{key:"documents",type:["bankStatementDocument"]}],"1_705":[{key:"documents",type:["bankStatementDocument"]}]};var id,od;!function(e){e.INDIVIDUAL="individual",e.ORGANIZATION="organization",e.TRUST="trust",e.SOLE_PROPRIETORSHIP="soleProprietorship"}(id||(id={})),function(e){e.BANK_ACCOUNT="bankAccount",e.RECURRING_DETAIL="recurringDetail"}(od||(od={}));const sd={INDIVIDUAL:["personalDetails.firstName","personalDetails.lastName","personalDetails.residencyCountry"],DECISIONMAKER:["personalDetails.firstName","personalDetails.lastName","personalDetails.residencyCountry","personalDetails.role","personalDetails.jobTitle"],ORGANIZATION:["companyNameAndCountry.legalCompanyName","companyNameAndCountry.companyCountry"],SOLE_PROPRIETORSHIP:["solePropNameAndCountry.legalCompanyName","solePropNameAndCountry.companyCountry"]},dd={"personalDetails.firstName":"individual.name.firstName","personalDetails.lastName":"individual.name.lastName","personalDetails.birthDate":"individual.birthData.dateOfBirth","personalDetails.idNumber":"individual.identificationData.number","personalDetails.phoneNumber":"individual.phone.number","personalDetails.email":"individual.email","personalDetails.idNumberExempt":"individual.identificationData.nationalIdExempt","personalDetails.typeOfIdentity":"individual.identificationData.type","personalDetails.issuerState":"individual.identificationData.issuerState","personalDetails.licenseCardNumber":"individual.identificationData.cardNumber","address.city":"individual.residentialAddress.city","address.country":"individual.residentialAddress.country","address.postalCode":"individual.residentialAddress.postalCode","address.stateOrProvince":"individual.residentialAddress.stateOrProvince","address.street":"individual.residentialAddress.street","address.houseNumberOrName":"individual.residentialAddress.street2"},ld=Object.assign(Object.assign({},dd),{"personalDetails.residencyCountry":"individual.residentialAddress.country"}),cd=Object.assign({},H(dd)),ud={"payoutAccountDetails.transferInstrumentId":"id","payoutAccountDetails.accountType":"bankAccount.accountType","payoutAccountDetails.bankAccountNumber":"bankAccount.accountNumber","payoutAccountDetails.bankBicSwift":"bankAccount.bankBicSwift","payoutAccountDetails.bankCity":"bankAccount.bankCity","payoutAccountDetails.bankCode":"bankAccount.bankCode","payoutAccountDetails.bankName":"bankAccount.bankName","payoutAccountDetails.branchCode":"bankAccount.branchCode","payoutAccountDetails.checkCode":"bankAccount.checkCode","payoutAccountDetails.bankCountry":"bankAccount.countryCode","payoutAccountDetails.currency":"bankAccount.currencyCode","payoutAccountDetails.iban":"bankAccount.iban"},md={"companyNameAndCountry.legalCompanyName":"organization.legalName","companyType.entityType":"organization.type","companyDetails.tradingName":"organization.doingBusinessAs","companyDetails.registrationNumber":"organization.registrationNumber","companyDetails.vatNumber":"organization.vatNumber","companyDetails.exemptedFromVat":"organization.vatAbsenceReason","companyDetails.vatAbsenceReason":"organization.vatAbsenceReason","companyDetails.taxInformation":"organization.taxInformation","companyDetails.stockExchangeMIC":"organization.stockData.marketIdentifier","companyDetails.stockISIN":"organization.stockData.stockNumber","companyRegistrationDetails.registrationAddress.city":"organization.registeredAddress.city","companyRegistrationDetails.registrationAddress.country":"organization.registeredAddress.country","companyRegistrationDetails.registrationAddress.postalCode":"organization.registeredAddress.postalCode","companyRegistrationDetails.registrationAddress.stateOrProvince":"organization.registeredAddress.stateOrProvince","companyRegistrationDetails.registrationAddress.street":"organization.registeredAddress.street","companyRegistrationDetails.registrationAddress.houseNumberOrName":"organization.registeredAddress.street2","companyRegistrationDetails.operationalAddress.city":"organization.principalPlaceOfBusiness.city","companyRegistrationDetails.operationalAddress.country":"organization.principalPlaceOfBusiness.country","companyRegistrationDetails.operationalAddress.postalCode":"organization.principalPlaceOfBusiness.postalCode","companyRegistrationDetails.operationalAddress.stateOrProvince":"organization.principalPlaceOfBusiness.stateOrProvince","companyRegistrationDetails.operationalAddress.street":"organization.principalPlaceOfBusiness.street","companyRegistrationDetails.operationalAddress.houseNumberOrName":"organization.principalPlaceOfBusiness.street2"},pd={"trustRegistrationDetails.trustType":"trust.type","trustRegistrationDetails.vatNumber":"trust.vatNumber","trustRegistrationDetails.legalName":"trust.name","trustRegistrationDetails.country":"trust.countryOfGoverningLaw","trustRegistrationAddress.registrationAddress.city":"trust.registeredAddress.city","trustRegistrationAddress.registrationAddress.country":"trust.registeredAddress.country","trustRegistrationAddress.registrationAddress.postalCode":"trust.registeredAddress.postalCode","trustRegistrationAddress.registrationAddress.stateOrProvince":"trust.registeredAddress.stateOrProvince","trustRegistrationAddress.registrationAddress.street":"trust.registeredAddress.street","trustRegistrationAddress.registrationAddress.houseNumberOrName":"trust.registeredAddress.street2","trustRegistrationAddress.operationalAddress.city":"trust.principalPlaceOfBusiness.city","trustRegistrationAddress.operationalAddress.country":"trust.principalPlaceOfBusiness.country","trustRegistrationAddress.operationalAddress.postalCode":"trust.principalPlaceOfBusiness.postalCode","trustRegistrationAddress.operationalAddress.stateOrProvince":"trust.principalPlaceOfBusiness.stateOrProvince","trustRegistrationAddress.operationalAddress.street":"trust.principalPlaceOfBusiness.street","trustRegistrationAddress.operationalAddress.houseNumberOrName":"trust.principalPlaceOfBusiness.street2"},gd={"solePropNameAndCountry.legalCompanyName":"soleProprietorship.name","solePropNameAndCountry.companyCountry":"soleProprietorship.countryOfGoverningLaw","solePropRegistrationDetails.tradingName":"soleProprietorship.doingBusinessAs","solePropRegistrationDetails.vatNumber":"soleProprietorship.vatNumber","solePropRegistrationDetails.registrationNumber":"soleProprietorship.registrationNumber","solePropRegistrationDetails.exemptedFromVat":"soleProprietorship.vatAbsenceReason","solePropRegistrationDetails.vatAbsenceReason":"soleProprietorship.vatAbsenceReason","solePropRegistrationDetails.taxInformation":"soleProprietorship.taxInformation","solePropRegistrationAddress.registrationAddress.city":"soleProprietorship.registeredAddress.city","solePropRegistrationAddress.registrationAddress.country":"soleProprietorship.registeredAddress.country","solePropRegistrationAddress.registrationAddress.postalCode":"soleProprietorship.registeredAddress.postalCode","solePropRegistrationAddress.registrationAddress.stateOrProvince":"soleProprietorship.registeredAddress.stateOrProvince","solePropRegistrationAddress.registrationAddress.street":"soleProprietorship.registeredAddress.street","solePropRegistrationAddress.registrationAddress.houseNumberOrName":"soleProprietorship.registeredAddress.street2","solePropRegistrationAddress.operationalAddress.city":"soleProprietorship.principalPlaceOfBusiness.city","solePropRegistrationAddress.operationalAddress.country":"soleProprietorship.principalPlaceOfBusiness.country","solePropRegistrationAddress.operationalAddress.postalCode":"soleProprietorship.principalPlaceOfBusiness.postalCode","solePropRegistrationAddress.operationalAddress.stateOrProvince":"soleProprietorship.principalPlaceOfBusiness.stateOrProvince","solePropRegistrationAddress.operationalAddress.street":"soleProprietorship.principalPlaceOfBusiness.street","solePropRegistrationAddress.operationalAddress.houseNumberOrName":"soleProprietorship.principalPlaceOfBusiness.street2"},yd=Object.assign({"companyNameAndCountry.companyCountry":"organization.registeredAddress.country"},md),bd=Object.assign({},H(md)),fd=Object.assign({},ud),hd=Object.assign({},H(ud)),vd=Object.assign(Object.assign({},bd),{"organization.registeredAddress":"companyRegistrationDetails.registrationAddress"}),_d=Object.assign(Object.assign({},cd),{"individual.residentialAddress":"address.address"}),Nd=Object.assign({bankAccount:"payoutAccountDetails"},hd),Od=Object.assign({},pd),Id=Object.assign({},H(pd)),Ed=Object.assign({},gd),Td=Object.assign({},H(gd)),Ad={passport:"idDocument.idDocument",driversLicense:"idDocument.idDocument",identityCard:"idDocument.idDocument",proofOfNationalIdNumber:"proofOfNationalId.proofOfNationalId",proofOfResidency:"proofOfResidence.proofOfResidence",proofOfIndividualTaxId:"",registrationDocument:"companyRegistrationDocument.registrationDocument",taxDocument:"companyTaxDocument.taxDocument",proofOfAddress:"",bankStatementDocument:"payoutAccountDocuments.bankStatementDocument",trustDocument:"trustDocument.trustDocument",solePropConstitutionalDocument:"solePropConstitutionalDocument.constitutionalDocument"};var Sd,Rd;function Cd(e,t){var a,r,n,i,o,s,d,l,c,u,m,p,g,y,b,f,h,v,_,N,O,I;if(t){const E={placeholders:{},labels:{},data:{},formVerificationErrors:{},requiredFields:[],optionalFields:[],maskedFields:[],validators:null};return E.placeholders=Object.assign({},null===(a=e.placeholders)||void 0===a?void 0:a[t]),E.labels=Object.assign({},null===(r=e.labels)||void 0===r?void 0:r[t]),E.data=Object.assign({},null===(n=e.data)||void 0===n?void 0:n[t]),(null===(i=e.readOnlyFields)||void 0===i?void 0:i[t])&&(E.readOnlyFields=null===(o=e.readOnlyFields)||void 0===o?void 0:o[t]),(null===(s=e.requiredFields)||void 0===s?void 0:s[t])&&(E.requiredFields=null===(d=e.requiredFields)||void 0===d?void 0:d[t]),(null===(l=e.optionalFields)||void 0===l?void 0:l[t])&&(E.optionalFields=null===(c=e.optionalFields)||void 0===c?void 0:c[t]),(null===(u=e.validators)||void 0===u?void 0:u[t])&&(E.validators=Object.assign({},null===(m=e.validators)||void 0===m?void 0:m[t])),(null===(p=e.verifyFields)||void 0===p?void 0:p[t])&&(E.verifyFields=null===(g=e.verifyFields)||void 0===g?void 0:g[t]),(null===(b=null===(y=e.problems)||void 0===y?void 0:y.verificationErrors)||void 0===b?void 0:b[t])&&(E.formVerificationErrors=null===(h=null===(f=e.problems)||void 0===f?void 0:f.verificationErrors)||void 0===h?void 0:h[t]),(null===(_=null===(v=e.problems)||void 0===v?void 0:v.validationErrors)||void 0===_?void 0:_[t])&&(E.fieldValidationErrors=null===(O=null===(N=e.problems)||void 0===N?void 0:N.validationErrors)||void 0===O?void 0:O[t]),(null===(I=e.maskedFields)||void 0===I?void 0:I[t])&&(E.maskedFields=e.maskedFields[t]),E}return null}function Dd(e,t){if(t){const a={placeholders:{},labels:{},data:{},requiredFields:[],maskedFields:[],optionalFields:[],readOnlyFields:[],verifyFields:[],fieldValidationErrors:{}};return t.forEach((t=>{var r,n,i,o,s,d,l,c,u,m,p;a.placeholders[t]=null===(r=e.placeholders)||void 0===r?void 0:r[t],a.labels[t]=null===(n=e.labels)||void 0===n?void 0:n[t],a.data[t]=null===(i=e.data)||void 0===i?void 0:i[t],(null===(o=e.readOnlyFields)||void 0===o?void 0:o.includes(t))&&a.readOnlyFields.push(t),(null===(s=e.requiredFields)||void 0===s?void 0:s.includes(t))&&a.requiredFields.push(t),(null===(d=e.optionalFields)||void 0===d?void 0:d.includes(t))&&a.optionalFields.push(t),(null===(l=e.verifyFields)||void 0===l?void 0:l.includes(t))&&a.verifyFields.push(t),(null===(c=e.fieldValidationErrors)||void 0===c?void 0:c[t])&&(a.fieldValidationErrors[t]=e.fieldValidationErrors[t]),(null===(u=e.maskedFields)||void 0===u?void 0:u.includes(t))&&a.maskedFields.push(t),(null===(m=e.validators)||void 0===m?void 0:m[t])&&((null==a?void 0:a.validators)||(a.validators={}),a.validators[t]=null===(p=e.validators)||void 0===p?void 0:p[t])})),a}return null}!function(e){e[e.EMPTY=0]="EMPTY",e[e.FINISHED=1]="FINISHED",e[e.PROCESSING=2]="PROCESSING",e[e.DETAILS_REQUIRED=3]="DETAILS_REQUIRED",e[e.DOWNLOAD=4]="DOWNLOAD",e[e.ERROR=5]="ERROR"}(Sd||(Sd={})),function(e){e.TASKS_OVERVIEW="TASKS_OVERVIEW",e.INDIVIDUAL="INDIVIDUAL",e.COMPANY="COMPANY",e.PAYOUT="PAYOUT",e.PAYIN="PAYIN",e.SERVICE_AGREEMENT="SERVICE_AGREEMENT",e.PCI_DSS="PCI_DSS",e.DECISION_MAKER_OVERVIEW="DECISION_MAKER_OVERVIEW",e.TRUST="TRUST",e.TRUST_MEMBER_OVERVIEW="TRUST_MEMBER",e.DECISION_MAKER="DECISION_MAKER",e.TRUST_MEMBER_INDIVIDUAL="TRUST_MEMBER_INDIVIDUAL",e.TRUST_MEMBER_COMPANY="TRUST_MEMBER_COMPANY",e.TRUST_MEMBER_ROLE_AND_TYPE="TRUST_MEMBER_ROLE_AND_TYPE",e.TRUST_MEMBER_COMPANY_OWNER="TRUST_MEMBER_COMPANY_OWNER",e.SOLE_PROPRIETOR_COMPANY="SOLE_PROPRIETOR_COMPANY",e.LEGAL_ENTITY_TYPE_SWITCHER="LEGAL_ENTITY_TYPE_SWITCHER"}(Rd||(Rd={}));const kd={entityType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}};var Ld;!function(e){e.PRIVATE_COMPANY="privateCompany",e.PUBLIC_COMPANY="listedPublicCompany",e.UNLISTED_PUBLIC_COMPANY="unlistedPublicCompany",e.INCORPORATED_PARTNERSHIP="partnershipIncorporated",e.INCORPORATED_ASSOCIATION="associationIncorporated",e.GOVERNMENTAL_ORGANIZATION="governmentalOrganization",e.NON_PROFIT_OR_CHARITABLE="nonProfit",e.SOLE_PROPRIETORSHIP="soleProprietorship"}(Ld||(Ld={}));const wd={entityType:{rule:"REQUIRED"},legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},tradingName:{rule:"REQUIRED"},sameNameAsLegalName:{rule:"REQUIRED"},registrationNumber:{rule:"registrationNumberRules"},registrationAddress:{rule:"REQUIRED"},operationalAddress:{rule:"OPTIONAL"},stockExchangeMIC:{rule:"stockExchangeMICIfTypePublic"},stockISIN:{rule:"stockISINIfTypePublic"},isPartOfTrust:{rule:"partOfTrustFieldsOnlyAU"},accountHolder:{rule:"accountHolderIfCustomer"}},Pd=[{id:Ld.PRIVATE_COMPANY,name:"privateCompanyTitle",description:"privateCompanyDescription"},{id:Ld.PUBLIC_COMPANY,name:"publicCompanyTitle",description:"publicCompanyDescription"},{id:Ld.INCORPORATED_PARTNERSHIP,name:"incorporatedPartnershipTitle",description:"incorporatedPartnershipDescription"},{id:Ld.NON_PROFIT_OR_CHARITABLE,name:"nonProfitOrCharitableOrgTitle",description:"nonProfitOrCharitableOrgDescription"},{id:Ld.GOVERNMENTAL_ORGANIZATION,name:"governmentalOrganizationTitle",description:"governmentalOrganizationDescription"},{id:Ld.INCORPORATED_ASSOCIATION,name:"associationIncorporatedTitle",description:"associationIncorporatedDescription"}],jd={L0:{legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},stateOrProvince:{rule:"REQUIRED"}},L1:Object.assign({},wd),L:Object.assign(Object.assign({},wd),{vatNumber:{rule:"vatRules"},exemptedFromVat:{rule:"vatRules"},vatAbsenceReason:{rule:"vatRules"},taxId:{rule:"taxIdRules"},exemptedFromTax:{rule:"exemptedFromTaxRules"}}),L_REGDOC:{registrationDocument:{rule:"REQUIRED"}},L_TAXDOC:{taxDocument:{rule:"REQUIRED"}},L_PROOFOFADDRESS:{proofOfAddressDocument:{rule:"REQUIRED"}}},xd={AT:{vatNumber:{label:"UST-ID"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"firmenbuchnummer"},exemptedFromRegistrationNumber:{label:"doNotHaveFirmenbuchnummer"}},AU:{legalName:{label:"companyName"},legalEntityType:{label:"companyType"},registrationNumber:{label:"australianBusinessNumberAcn"},taxId:{label:"australianBusinessNumberAbn"},exemptedFromTax:{label:"doNotHaveABN"}},BE:{vatNumber:{label:"euVatNumber"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"enterpriseNumber"}},BG:{registrationNumber:{label:"uniqueIdentificationCode"},vatNumber:{label:"identifikacionenNomerDDS"},exemptedFromVat:{label:"vatNumberExempted"}},BR:{registrationNumber:{label:"CNPJ"}},CA:{tradingName:{label:"doingBusinessAs"},registrationNumber:{label:"businessIncorporationNumber"},exemptedFromRegistrationNumber:{label:"doNotHaveBusinessIncorporationNumber"},taxId:{label:"businessNumber"},exemptedFromTax:{label:"doNotHaveBusinessNumber"}},CH:{registrationNumber:{label:"chRegistrationNumber"},exemptedFromRegistrationNumber:{label:"doNotHaveChRegistrationNumber"},vatNumber:{label:"Mehrwertsteuernummer"},exemptedFromVat:{label:"vatNumberExempted"}},CY:{registrationNumber:{label:"cyRegistrationNumber"},vatNumber:{label:"arithmosEngraphes"},exemptedFromVat:{label:"vatNumberExempted"}},CZ:{vatNumber:{label:"DIC"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"ICO"}},DE:{vatNumber:{label:"USt-IdNr"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"handelsregisternummer"}},DK:{registrationNumber:{label:"CVR-nummer"},vatNumber:{label:"momsregistreringsnummerOrStamregister"},exemptedFromVat:{label:"vatNumberExempted"}},EE:{registrationNumber:{label:"registrikood"},vatNumber:{label:"kaibemaksukohustuslaseNumber"},exemptedFromVat:{label:"vatNumberExempted"}},ES:{vatNumber:{label:"NIFdeIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"NIF"}},FI:{registrationNumber:{label:"YTunnus"},exemptedFromRegistrationNumber:{label:"doNotHaveYTunnus"},vatNumber:{label:"arvonlisaveronumeroMervardesskattenummer"},exemptedFromVat:{label:"vatNumberExempted"}},FR:{vatNumber:{label:"NumeroDeTVA"},registrationNumber:{label:"SIRETOrSIREN"}},GB:{vatNumber:{label:"vatNumber"},registrationNumber:{label:"companyNumber"}},GR:{registrationNumber:{label:"GEMI-number"},vatNumber:{label:"grTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},HK:{legalName:{label:"companyName"},legalEntityType:{label:"typeOfCompany"},tradingName:{label:"businessName"},registrationNumber:{label:"companyNumber"},registrationDocument:{label:"companyRegistrationDocument"},taxId:{label:"businessRegistrationNumber"},exemptedFromTax:{label:"doNotHaveBusinessRegistrationNumber"}},HR:{registrationNumber:{label:"MBS"},vatNumber:{label:"PDVIdBrojOIB"},exemptedFromVat:{label:"vatNumberExempted"}},HU:{registrationNumber:{label:"huRegistrationNumber"},vatNumber:{label:"huTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},IE:{registrationNumber:{label:"companyNumber"},vatNumber:{label:"valueAddedTaxIdentificationNumber"},exemptedFromVat:{label:"vatNumberExempted"}},IT:{vatNumber:{label:"partitaIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"codiceFiscaleOrCCIAA"}},JP:{vatNumber:{label:"taxNumberCorporateNumber"},registrationDocument:{label:"chamberOfCommerceExtract"}},LT:{registrationNumber:{label:"ltRegistrationNumber"},exemptedFromRegistrationNumber:{label:"doNotHaveLtRegistrationNumber"},vatNumber:{label:"PVMmoketojoKodas"},exemptedFromVat:{label:"vatNumberExempted"}},LU:{registrationNumber:{label:"luRegistrationNumber"},exemptedFromRegistrationNumber:{label:"doNotHaveLuRegistrationNumber"},vatNumber:{label:"numeroDIdentificationALATaxe"},exemptedFromVat:{label:"vatNumberExempted"}},LV:{registrationNumber:{label:"lvRegistrationNumber"},vatNumber:{label:"lvTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},MX:{registrationNumber:{label:"RFC"},registrationDocument:{label:"RfcDocument"}},MY:{registrationNumber:{label:"companyNumber"},registrationDocument:{label:"companyProfile"},vatNumber:{label:"SST"}},NL:{vatNumber:{label:"euVatNumber"},registrationNumber:{label:"chamberOfCommerceRegistrationNumber"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"}},NO:{vatNumber:{label:"skattenummer"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"organisasjonsnummer"}},NZ:{legalName:{label:"companyName"},legalEntityType:{label:"entityType"},registrationNumber:{label:"companyNumber"},vatNumber:{label:"irdNumber"},exemptedFromVat:{label:"vatNumberExempted"},taxDocument:{label:"irdDocument"},taxId:{label:"IRD/GST"},exemptedFromTax:{label:"doNotHaveIRD/GST"}},PL:{vatNumber:{label:"NIP"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"regonKrsNumber"}},PT:{vatNumber:{label:"numerodeIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"NIPC"}},RO:{registrationNumber:{label:"numarOrdineRegistrulComertului"},vatNumber:{label:"codulDeIdentificareFiscala"},exemptedFromVat:{label:"vatNumberExempted"}},SE:{vatNumber:{label:"momsregistreringsnummer"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"organisationsnummer"},exemptedFromRegistrationNumber:{label:"doNotHaveOrganisationsnummer"}},SG:{vatNumber:{label:"taxReferenceNumber"},exemptedFromVat:{label:"vatNumberExempted"},legalName:{label:"companyName"},legalEntityType:{label:"companyType"},taxId:{label:"UEN/GST"},exemptedFromTax:{label:"doNotHaveUEN/GST"}},SI:{registrationNumber:{label:"siRegistrationNumber"},vatNumber:{label:"siTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},SK:{registrationNumber:{label:"skRegistrationNumber"},vatNumber:{label:"skTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},US:{tradingName:{label:"doingBusinessAs"},taxId:{label:"employerIdentificationNumber"},exemptedFromTax:{label:"doNotHaveEIN"}}};var Md;!function(e){e.IS_PART_OF_TRUST="isPartOfTrustAnswerYes",e.IS_NOT_PART_OF_TRUST="isPartOfTrustAnswerNo"}(Md||(Md={}));const Fd=[{id:Md.IS_NOT_PART_OF_TRUST,name:"no"},{id:Md.IS_PART_OF_TRUST,name:"yes"}],Vd={isPartOfTrust:Md.IS_NOT_PART_OF_TRUST},Ud=["isPartOfTrust"];function Bd(e){var t,a,r;const{i18n:n,commonProps:i}=We(),{dataStoreId:o,validators:s,isReadOnlyOnDefaultDataYes:d=!1}=e,l=ue({setState:null}),{handleChangeFor:c,data:u,valid:m,errors:p,isValid:g,fieldProblems:y,triggerValidation:b}=ua(Object.assign(Object.assign({},e),{schema:Ud,rules:s,defaultData:(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.isPartOfTrust)?e.data:Vd,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{l.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:y,caller:"partOfTrust",dataStoreId:o}})}),[u,m,p,g]);const f=ra(e,n);this.triggerValidation=b;const h=n.get((null==e?void 0:e.legalEntityType)===id.INDIVIDUAL?"areYouPartOfTrust":"isBusinessPartOfTrust"),v=d&&(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.isPartOfTrust)===Md.IS_PART_OF_TRUST;return le((()=>{b()}),[]),C("div",Object.assign({className:"adyen-kyc-part-of-trust"},{children:[C(Ys,{stateRef:l}),C(Ue,Object.assign({name:"isPartOfTrust",useLabelElement:!1,label:h,classNameModifiers:["isPartOfTrust"],errorMessage:null===(r=p.isPartOfTrust)||void 0===r?void 0:r.errorMessage,showInlineErrors:i.showInlineErrors,disabled:v},{children:Jt("radio",{name:"isPartOfTrust",items:Fd,value:u.isPartOfTrust,i18n:n,disabled:v,onInput:c("isPartOfTrust"),onChange:c("isPartOfTrust"),"aria-required":!0,"aria-label":f.getLabel("isPartOfTrust"),"aria-invalid":!m.isPartOfTrust})}))]}))}var Wd;!function(e){e.MY_NAME="myName",e.MY_SOLE_TRADER_NAME="mySoleTraderName",e.THE_COMPANY_I_WORK_FOR="theCompanyIWorkFor",e.A_TRUST="aTrust",e.A_PARTNERSHIP="aPartnership",e.AN_ASSOCIATION="anAssociation"}(Wd||(Wd={}));const Hd={accountHolder:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}};var qd;!function(e){e.CONTROLLING_PERSON="uboThroughControl",e.OWNER="uboThroughOwnership",e.SIGNATORY="signatory",e.DIRECTOR="director"}(qd||(qd={}));const Gd=["AT","BE","CA","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HU","IE","IT","LT","LU","LV","NL","NO","PT","RO","SI","SK","US"],$d=["CA","US"],Xd=["US"],Yd=["AU"],Kd=t.createContext(null);function zd(){const e=ge(Kd);if(void 0===e)throw new Error("useSettingsContext must be used within a SettingsProvider");return e}const Zd=["accountHolder"],Qd=[{id:Wd.MY_NAME,name:"myName",description:"myNameDescription",type:id.INDIVIDUAL},{id:Wd.THE_COMPANY_I_WORK_FOR,name:"theCompanyIWorkFor",description:"theCompanyIWorkForDescription",type:id.ORGANIZATION}],Jd={id:Wd.MY_SOLE_TRADER_NAME,name:"mySoleTraderName",description:"mySoleTraderNameDescription",type:id.SOLE_PROPRIETORSHIP};function el(e){const{i18n:t,commonProps:a}=We(),r=ue({setState:null}),{dataStoreId:n}=e,{isSettingEnabled:i}=zd(),o=i("changeLegalEntityType"),{handleChangeFor:s,data:d,valid:l,errors:c,fieldProblems:u,triggerValidation:m}=ua(Object.assign(Object.assign({},e),{schema:["accountHolder"],defaultData:e.data,rules:e.validators||Hd,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{r.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,caller:"AccountHolder",dataStoreId:n}})}),[d,c,l]);const p=ra(e,t),g=t.get("nameOfBankAccountHolder");this.triggerValidation=m;const[y,b]=se([]),f=()=>{if(e.legalEntityType===id.ORGANIZATION)return o?Qd:Qd.filter((e=>e.id===Wd.THE_COMPANY_I_WORK_FOR));{let t=[];return t=o?Qd:Qd.filter((e=>e.id===Wd.MY_NAME)),Gd.includes(e.country)?[...t,Jd]:t}};return le((()=>{const e=f();b((()=>Object.values(e).map((({id:e,name:a,description:r})=>({id:e,name:t.get(a),description:t.get(r)})))))}),[t.languageCode,t.locale,e.country,e.legalEntityType]),C("div",{children:[C(Ys,{stateRef:r}),y.length>1?C(Ue,Object.assign({name:"accountHolder",label:g,errorMessage:p.getErrorMessage("accountHolder",c,u),isValid:l.accountHolder,showInlineErrors:a.showInlineErrors,classNameModifiers:["account-holder"]},{children:Jt("select",{onChange:s("accountHolder","input"),name:"accountHolder",placeholder:t.get("selectAccountHolder"),selected:d.accountHolder,items:y})})):null]})}const tl=["entityType",...Ud,...Zd];function al(e){const{i18n:a}=We(),r=ue({setState:null}),{id:n,requiredFields:i}=e,o=ue(null),{isSettingEnabled:s}=zd(),d=s("enableTrustFlow"),l=i||tl,{handleChangeFor:c,data:u,valid:m,errors:p,isValid:g,triggerValidation:y,fieldProblems:b}=ua(Object.assign(Object.assign({},e),{schema:l,defaultData:e.data,rules:e.validators||kd,fieldProblems:null==e?void 0:e.fieldValidationErrors})),f=ra(e,a);this.triggerValidation=()=>{y(l),d&&f.isRequiredField("isPartOfTrust",!1)&&v.current.triggerValidation(),f.isRequiredField("accountHolder",!1)&&o.current.triggerValidation()};const h=Dd(e,Zd);le((()=>{r.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:b,caller:n,dataStoreId:n,schema:l}})}),[u,m,p,g]);const v=ue(null),_=Dd(e,Ud);return C(t.Fragment,{children:[C(Ys,{owner:n,stateRef:r}),C("form",Object.assign({className:"adyen-kyc-company__company-type"},{children:[C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:f,id:"ariaErrorField"}),f.isRequiredField("entityType")&&C(Ue,Object.assign({name:"entityType",useLabelElement:!1,errorMessage:f.getErrorMessage("entityType",p,b),label:f.getLabel("entityType","whatTypeOfCompanyDoYouHave"),classNameModifiers:["entityType"]},{children:Jt("radioCard",{name:"entityType",items:Pd,value:u.entityType,i18n:a,readonly:f.isReadOnly("entityType"),onInput:c("entityType"),onChange:c("entityType"),"aria-required":!0,"aria-label":f.getLabel("entityType","whatTypeOfCompanyDoYouHave"),"aria-invalid":!m.entityType})})),d&&f.isRequiredField("isPartOfTrust",!1)&&C(Bd,Object.assign({},_,{legalEntityType:id.ORGANIZATION,ref:v,dataStoreId:n,isReadOnlyOnDefaultDataYes:!0})),f.isRequiredField("accountHolder")&&C(el,Object.assign({},h,{ref:o,dataStoreId:n,legalEntityType:id.ORGANIZATION}))]}))]})}var rl;!function(e){e.OPERATIONAL_ADDRESS_IS_SAME="OperationAddressAnswerYes",e.OPERATIONAL_ADDRESS_IS_NOT_SAME="OperationAddressAnswerNo"}(rl||(rl={}));const nl=[{id:rl.OPERATIONAL_ADDRESS_IS_SAME,name:"operationalAddressIsSameItemName"},{id:rl.OPERATIONAL_ADDRESS_IS_NOT_SAME,name:"operationalAddressIsNotSameItemName"}],il={operationalAddressIsSame:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},ol=t.createContext(null);function sl({children:e,className:t,expand:r=!1,type:n,onExpandSection:i}){const[o,s]=se([]),d=a("adl-accordion",t,{"adl-accordion--container":"container"===n,"adl-accordion--guide":"guide"===n});return C(ol.Provider,Object.assign({value:{expand:r,items:o,setItems:s,onExpandSection:i}},{children:C("div",Object.assign({className:d},{children:e}))}))}function dl({children:e,collapsed:t=!1,animationDuration:a}){const r=ue(null),[n,i]=se(t?0:void 0);return le((()=>{var e;i(t?0:null===(e=r.current)||void 0===e?void 0:e.scrollHeight)}),[t]),C("div",Object.assign({className:"adyen-collapsible-container","aria-hidden":t,ref:r,style:{height:n,transitionDuration:a}},{children:e}))}var ll;function cl({children:e,open:t=!1,title:a="",subTitle:r="",expandIconPlacement:n=ll.Left,iconPlacement:i=ll.Left,icon:o="",onOpen:s=G,onClose:d=G}){const{expand:l,items:c,setItems:u,onExpandSection:m}=ge(ol),[p,g]=se(t),[y]=se(Ve);return le((()=>{u((e=>[...e,{id:y,isOpen:p}]))}),[]),le((()=>{g(t)}),[t]),le((()=>{var e;g(null===(e=c.find((e=>e.id===y)))||void 0===e?void 0:e.isOpen)}),[c]),le((()=>{p&&(null==m||m(a))}),[p]),C("div",Object.assign({className:"adl-accordion__item"},{children:[C("div",Object.assign({role:"button",className:"adl-accordion__header",tabIndex:0,onClick:()=>{const e=!p,t=[...c];l?(t.find((e=>e.id===y)).isOpen=e,u(t)):u(t.map((t=>Object.assign(Object.assign({},t),{isOpen:t.id===y&&e})))),p?d():s()}},{children:[n===ll.Left?C(xe,{name:p?"chevron-up":"chevron-down",className:"adl-accordion__toggle"}):null,o&&i===ll.Left?C(xe,{name:o,className:"adl-accordion__toggle"}):null,C("div",Object.assign({className:"adl-accordion__title-wrapper"},{children:[C("div",Object.assign({className:"adl-accordion__title"},{children:a})),r&&C("div",Object.assign({className:"adl-accordion__subtitle"},{children:r}))]})),n===ll.Right?C(xe,{name:p?"chevron-up":"chevron-down",className:"adl-accordion__toggle"}):null,o&&i===ll.Right?C(xe,{name:o,className:"adl-accordion__toggle"}):null]})),C(dl,Object.assign({collapsed:!p,animationDuration:"0.1s"},{children:C("div",Object.assign({className:"adl-accordion__content"},{children:e}))}))]}))}function ul({page:e,title:t,content:a,titleId:r,contentId:n,onOpen:i=G,onClose:o=G}){return C(sl,Object.assign({type:"guide"},{children:C(cl,Object.assign({icon:"light-bulb",expandIconPlacement:ll.Right,title:t,onOpen:()=>{w.addEvent("Open contextual guidance information",{segmentation:{guidancePage:e,guidanceTitleId:r,guidanceContentId:n}}),i()},onClose:()=>{w.addEvent("Close contextual guidance information",{segmentation:{guidancePage:e,guidanceTitleId:r,guidanceContentId:n}}),o()}},{children:a}))}))}!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(ll||(ll={}));const ml=["registrationAddress","operationalAddress","operationalAddressIsSame"],pl={formId:"registrationAddress",formName:"registeredAddress",fields:["address"]}.formId,gl={formId:"operationalAddress",formName:"operationalAddressHeader",fields:["address"]}.formId;function yl(e){var a,r,n,i,o;const{i18n:s}=We(),{data:d,valid:l,errors:c,fieldProblems:u,handleChangeFor:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:["operationalAddressIsSame"],defaultData:e.data,rules:e.validators||il,maskedFields:[]})),g={[pl]:ue(null),[gl]:ue(null)},y=ra(e,s),b=ue({setState:null});le((()=>{b.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:u,caller:e.id,dataStoreId:e.id,schema:["registrationAddress","operationalAddressIsSame",...f()?["operationalAddress"]:[]]}})}),[d.operationalAddressIsSame]),this.triggerValidation=()=>{p(),g[pl].current.triggerValidation(),f()&&g[gl].current.triggerValidation()};const f=()=>d.operationalAddressIsSame==rl.OPERATIONAL_ADDRESS_IS_NOT_SAME,h=Cd(e,pl),v=Cd(e,gl);return C(t.Fragment,{children:[C(Ys,{owner:e.id,stateRef:b}),C(Ms,{heading:e.heading,description:e.description}),C(qc,{verificationErrors:null===(r=null===(a=null==e?void 0:e.problems)||void 0===a?void 0:a.verificationErrors)||void 0===r?void 0:r[e.id],validationErrors:null===(i=null===(n=null==e?void 0:e.problems)||void 0===n?void 0:n.validationErrors)||void 0===i?void 0:i[e.id],formUtils:y,id:"ariaErrorField"}),C(ul,{page:"Company registered address",titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingCompanyAddressDetails",title:s.get("whyDoINeedToFillInThisInformation"),content:s.get("reasonForFillingCompanyAddressDetails")}),C($c,Object.assign({},h,{ref:g[pl],data:Object.assign(Object.assign({},h.data),{country:e.country}),hideCountry:!0,id:e.id,addressType:"registrationAddress",handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress})),C(Ms,{classNames:"adl-u-margin-top-32",heading:s.get("operationalAddressHeader")}),C(Ue,Object.assign({name:"operationalAddressIsSame",useLabelElement:!1,label:y.getLabel("operationalAddressIsSame"),classNameModifiers:["operationalAddressIsSame"],errorMessage:null===(o=c.operationalAddressIsSame)||void 0===o?void 0:o.errorMessage},{children:Jt("radio",{name:"operationalAddressIsSame",items:nl,value:d.operationalAddressIsSame,i18n:s,readonly:y.isReadOnly("operationalAddressIsSame"),onInput:m("operationalAddressIsSame"),onChange:m("operationalAddressIsSame"),"aria-required":!0,"aria-label":y.getLabel("operationalAddressIsSame"),"aria-invalid":!l.operationalAddressIsSame})})),f()&&t.createElement($c,Object.assign({},v,{key:"operationalAddress",ref:g[gl],data:Object.assign(Object.assign({},v.data),{country:e.country}),hideCountry:!0,id:e.id,addressType:"operationalAddress",handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))]})}const bl={regex:/^\d{8}$/,message:"validationPleaseEnter8Digits"},fl={regex:/^\d{9}$/,message:"validationPleaseEnter9Digits"},hl={regex:/^\d{10}$/,message:"validationPleaseEnter10Digits"},vl={regex:/^\d{11}$/,message:"validationPleaseEnter11Digits"},_l={regex:/^\d{12}$/,message:"validationPleaseEnter12Digits"},Nl={AT:{regex:/^U\d{8}$/},BE:{regex:/^(1|0?)\d{9}$/},BG:{regex:/^\d{9,10}$/,message:"validationEnter9Or10Digits"},HR:vl,CY:{regex:/^[A-Z0-9]{9}/i},CZ:{regex:/^\d{8,10}$/,message:"validationEnterBetween8And10Digits"},EE:fl,FI:bl,FR:vl,DE:fl,EL:fl,HU:bl,IE:{regex:/^[A-Z0-9]{8,9}$/},IT:vl,LV:vl,LT:{regex:/^\d{9,12}$/,message:"validationEnter9Or12Digits"},LU:bl,MT:bl,NL:{regex:/^\d{9}B\d{2}$/},PL:{regex:/^\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d$/},PT:fl,RO:{regex:/^\d{2,12}$/},SE:{regex:/^\d{10}01$/},SK:hl,SI:bl,ES:{regex:/^[A-Z0-9]\d{7}[A-Z0-9]$/},AL:{regex:/[JK][A-Z0-9]{8}[A-Z]$/},BY:fl,CA:{regex:/^[A-Z0-9]{15}$/},GB:{regex:/^\d{9,12}$/},PH:_l,RU:{regex:/^(\d{10}|\d{12})$/},SM:{regex:/^\d{5}$/,message:"validationPleaseEnter6Digits"},RS:fl,CH:{regex:/^(\d{6}|E\d{9}(TVA|MWST|IVA))$/},TR:hl,UA:_l,AR:vl,CL:{regex:/^\d{8}-\d{1}$/},CO:hl,CR:{regex:/^\d{9,12}$/},EC:{regex:/^\d{13}$/,message:"validationPleaseEnter13Digits"},GT:{regex:/^\d{7}-\d{1}$/},PE:vl,VE:{regex:/^[JGVE]-\d{8}-?\d$/}},Ol={NO:{regex:/^\d{9}MVA$/},DK:[{regex:/^DK\d{8}$/},{regex:/^SE\d{8}$/}],GR:[{regex:/^EL\d{9}$/}]},Il="validationPleaseEnterAValidVatNumber",El=({countryCode:e,specs:t,input:a})=>{const r=Array.isArray(t)?[...t]:[t];let n="";for(;r.length>0;){const t=r.shift();if(!("regex"in t)||!t.regex.test)throw new Error(`Invalid vat validation specification ${e}, ${JSON.stringify(r)}`);if(t.regex.test(a))return{isValid:!0};n=(null==t?void 0:t.message)||Il}return{isValid:!1,message:n}},Tl=(e,t=null)=>{if(!e||!Cs(e)||e.length<3)return{isValid:!1,message:Il};const a=t||((e||"").toUpperCase().match(/^[A-Z]{2}/)||[])[0];return a?a in Ol?El({countryCode:a,specs:Ol[a],input:e}):a in Nl?e.substring(0,2)!==t?{isValid:!1,message:"validationPrefixThevatNumberWith_countryCode"}:El({countryCode:a,specs:Nl[a],input:e.substring(2)}):/^[a-zA-Z0-9_. -]+$/.test(e)?{isValid:!0}:{isValid:!1,message:Il}:{isValid:!1,message:Il}},Al={vatNumber:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}],vatAbsenceReason:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},Sl=e=>({translationKey:"validationPleaseEnterAValidVatNumberWithFormat",translationObject:{values:{format:e}}}),Rl={US:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"US");return t},errorMessage:Sl("XXXXXXXXX")}]},NL:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"NL");return t},errorMessage:Sl("NLXXXXXXXXXBXX")}]},DE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"DE");return t},errorMessage:Sl("DEXXXXXXXXX")}]},PL:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"PL");return t},errorMessage:Sl("PLXXXXXXXXXX")}]},AT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"AT");return t},errorMessage:Sl("ATUXXXXXXXX")}]},BE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"BE");return t},errorMessage:Sl("BEXXXXXXXXXX")}]},SE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"SE");return t},errorMessage:Sl("SEXXXXXXXXXX01")}]},ES:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"ES");return t},errorMessage:Sl("ESXXXXXXXXX")}]},FR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"FR");return t},errorMessage:Sl("FRXXXXXXXXXXX")}]},PT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"PT");return t},errorMessage:Sl("PTXXXXXXXXX")}]},IT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"IT");return t},errorMessage:Sl("ITXXXXXXXXXXX")}]},CZ:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"CZ");return t},errorMessage:Sl("CZXXXXXXXX")}]},NO:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"NO");return t},errorMessage:Sl("XXXXXXXXXMVA")}]},GB:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"GB");return t},errorMessage:Sl('"GB" + 9-12 digits')}]},BG:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"BG");return t},errorMessage:Sl("BG999999999 or BG9999999999")}]},CH:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"CH");return t},errorMessage:Sl("CHE999999999TVA or CHE999999999IVA or CHE999999999MWST")}]},CY:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"CY");return t},errorMessage:Sl("CYXXXXXXXXX")}]},DK:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"DK");return t},errorMessage:Sl("DK99999999 or SE99999999")}]},EE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"EE");return t},errorMessage:Sl("EE999999999")}]},FI:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"FI");return t},errorMessage:Sl("FI99999999")}]},GR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"GR");return t},errorMessage:Sl("EL999999999")}]},HR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"HR");return t},errorMessage:Sl("HR99999999999")}]},HU:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"HU");return t},errorMessage:Sl("HU99999999")}]},IE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"IE");return t},errorMessage:Sl("IEXXXXXXXX or IEXXXXXXXXX")}]},LT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"LT");return t},errorMessage:Sl('"LT" + 9-12 digits')}]},LU:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"LU");return t},errorMessage:Sl("LU99999999")}]},LV:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"LV");return t},errorMessage:Sl("LV99999999999")}]},RO:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"RO");return t},errorMessage:Sl("RO + 2-12 characters")}]},SK:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"SK");return t},errorMessage:Sl("SK9999999999")}]},SI:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"SI");return t},errorMessage:Sl("SI99999999")}]}},Cl=["industryExemption","belowTaxThreshold"],Dl=["vatNumber","exemptedFromVat","vatAbsenceReason"];function kl(e){const{i18n:t,commonProps:a}=We(),r=ra(e,t),n=ue({setState:null}),i=Ts(Al,Rl,e.country),{handleChangeFor:o,data:s,valid:d,errors:l,isValid:c,triggerValidation:u,fieldProblems:m}=ua(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromVat?["vatAbsenceReason","exemptedFromVat"]:["vatNumber","exemptedFromVat"],rules:i,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromVat:!!e.data.exemptedFromVat}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));return le((()=>{s.vatNumber&&o("vatNumber","blur")(s.vatNumber)}),[e.country]),le((()=>{n.current.setState({type:"addToState",value:{data:s,valid:d,errors:l,caller:"vatNumber",dataStoreId:e.dataStoreId}})}),[s,d,l,c]),this.triggerValidation=u,r.isRequiredField("vatNumber")?C("div",Object.assign({className:"adyen-kyc-field--tax-id"},{children:[C(Ys,{stateRef:n}),C(Ue,Object.assign({name:"vatNumber",label:r.getLabel("vatNumber"),classNameModifiers:["tax-id"],errorMessage:r.getErrorMessage("vatNumber",l,m),isValid:d.vatNumber,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"vatNumber",value:s.vatNumber,readonly:r.isReadOnly("vatNumber"),classNameModifiers:["vatNumber"],onInput:o("vatNumber","input"),onBlur:o("vatNumber","blur"),disabled:s.exemptedFromVat,"aria-required":!0,"aria-label":r.getLabel("vatNumber"),"aria-invalid":!d.vatNumber})})),r.isRequiredField("exemptedFromVat")&&Jt("boolean",{name:"exemptedFromVat",label:r.getLabel("exemptedFromVat"),value:"exemptedFromVat",readonly:r.isReadOnly("exemptedFromVat"),classNameModifiers:["exempted-from-tax"],checked:s.exemptedFromVat,onInput:o("exemptedFromVat"),"aria-required":!1,"aria-label":r.getLabel("exemptedFromVat"),"aria-invalid":!1}),s.exemptedFromVat?C(Ue,Object.assign({name:"vatAbsenceReason",classNameModifiers:["tax-id-absence-reason"],label:r.getLabel("vatAbsenceReason"),errorMessage:r.getErrorMessage("vatAbsenceReason",l,m),isValid:d.vatAbsenceReason},{children:Jt("select",{name:"vatAbsenceReason",onChange:o("vatAbsenceReason","input"),selected:s.vatAbsenceReason,items:Cl.map((e=>({id:e,name:t.get(e)})))})})):null]})):null}const Ll={ein:[/^\d{2}-?\d{7}$/],ssn:[/^\d{9}$/,/^\d{4}$/,/^\d{3}-\d{2}-\d{4}$/],passport:[/^\w{6,11}$/],invalidEinPrefixes:[/^(00|07|08|09|17|18|19|28|29|49|69|70|78|79|89|96|97)/]},wl={AU:[{regex:/^\d{11}$/}],BE:[{regex:/^\d{10}$/}],BR:[/^\d{14}$/,/^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$/].map((e=>({regex:e}))),CA:[{regex:/^\d{9}$/}],DE:[{regex:/^\d{10,11}$/}],HK:[{regex:/^\d{8}$/}],IN:[{regex:/^[A-Z0-9]{15}$/}],JP:[{regex:/^\d{13}$/}],MX:[{regex:/^\D{3}\d{6}\w{3}$/}],NZ:[{regex:/^[A-Z0-9]{8,9}$/}],NL:[{regex:/^\d{9}$/}],PH:[{regex:/^\d{12}$/}],SG:[{regex:/^[A-Z0-9]{9,10}$/}],US:[...Ll.ssn,...Ll.ein].map((e=>({regex:e,exception:Ll.invalidEinPrefixes})))},Pl=/^[\w. -]+$/,jl=(e,t)=>!(!e||!Cs(e)||e.length<3)&&(t in wl?((e,t,a)=>{var r;for(const t of a)if(!(null===(r=t.exception)||void 0===r?void 0:r.every((t=>t.test(e))))&&t.regex.test(e))return!0;return!1})(e,0,wl[t]):Pl.test(e)),xl={taxId:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}],taxIdAbsenceReason:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},Ml=e=>({translationKey:"validationPleaseEnterAValidTaxIdNumberWithFormat",translationObject:{values:{format:e}}}),Fl={US:{taxId:[{modes:["blur"],validate:e=>jl(e,"US"),errorMessage:Ml("XXXXXXXXX")}]},CA:{taxId:[{modes:["blur"],validate:e=>jl(e,"CA"),errorMessage:Ml("999999999")}]},AU:{taxId:[{modes:["blur"],validate:e=>jl(e,"AU"),errorMessage:"aValidAbnShouldBe11Digits"}]}},Vl=["taxId","exemptedFromTax"];function Ul(e){const{i18n:t,commonProps:a}=We(),r=ra(e,t),n=ue({setState:null}),i=Ts(xl,Fl,e.country),{handleChangeFor:o,data:s,valid:d,errors:l,isValid:c,triggerValidation:u,fieldProblems:m}=ua(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromTax?["exemptedFromTax"]:["taxId","exemptedFromTax"],rules:i,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromTax:!!e.data.exemptedFromTax}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));return le((()=>{s.taxId&&o("taxId","blur")(s.taxId)}),[e.country]),le((()=>{n.current.setState({type:"addToState",value:{data:s,valid:d,errors:l,caller:"taxId",dataStoreId:e.dataStoreId}})}),[s,d,l,c]),this.triggerValidation=u,r.isRequiredField("taxId")?C("div",Object.assign({className:"adyen-kyc-field--tax-id"},{children:[C(Ys,{stateRef:n}),C(Ue,Object.assign({name:"taxId",label:r.getLabel("taxId"),classNameModifiers:["tax-id"],errorMessage:r.getErrorMessage("taxId",l,m),isValid:d.taxId,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"taxId",value:s.taxId,readonly:r.isReadOnly("taxId"),classNameModifiers:["taxId"],onInput:o("taxId","input"),onBlur:o("taxId","blur"),disabled:s.exemptedFromTax,"aria-required":!0,"aria-label":r.getLabel("taxId"),"aria-invalid":!d.taxId})})),r.isRequiredField("exemptedFromTax")&&Jt("boolean",{name:"exemptedFromTax",label:r.getLabel("exemptedFromTax"),value:"exemptedFromTax",readonly:r.isReadOnly("exemptedFromTax"),classNameModifiers:["exempted-from-tax"],checked:s.exemptedFromTax,onInput:o("exemptedFromTax"),"aria-required":!1,"aria-label":r.getLabel("exemptedFromTax"),"aria-invalid":!1})]})):null}const Bl="default",Wl={AT:{[Ld.NON_PROFIT_OR_CHARITABLE]:{regex:/^(FN|T)\d{3,6}[a-z]$|^(AT-ZVR-)\d{9}$/,format:"T999x, FN999999x, or AT-ZVR-999999999"},[Ld.INCORPORATED_ASSOCIATION]:{regex:/^(FN|T)\d{3,6}[a-z]$|^(AT-ZVR-)\d{9}$/,format:"T999x, FN999999x, or AT-ZVR-999999999"},[Bl]:{regex:/^(FN|T)\d{3,6}[a-z]$/,format:"T999x or FN9999x, FN9999x, or FN999999x"}},AU:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},BE:{[Bl]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},BG:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},BR:{[Bl]:{regex:/^\d{2}(.)\d{3}(.)\d{3}\/\d{4}(-)\d{2}$/,format:"99.999.999/9999-99"}},CA:{[Bl]:{regex:/^[a-zA-Z0-9]{5,10}$/,format:"XtoYdigits",values:{x:5,y:10}}},CH:{[Bl]:{regex:/^(CHE)\d{9}$|^(CH)\d{11}$/,format:"CHE999999999 or CH99999999999"}},CY:{[Bl]:{regex:/^([COP])\d{1,8}$/,format:"cop1to8digits"}},CZ:{[Bl]:{regex:/^\d{8,10}$/,format:"XtoYdigits",values:{x:8,y:10}}},DE:{[Bl]:{regex:/^[a-zA-Z]{2,3}\d{1,6}[a-zA-Z]{0,5}(-[a-zA-Z]\d{4})?$/,format:'2-3 letters + 1-6 numbers + 0-5 letters + Optional ("-" + 1 letter + 4 numbers)'}},DK:{[Bl]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},EE:{[Bl]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},ES:{[Bl]:{regex:/[a-zA-Z]\d{8}$/,format:"1char8digits"}},FI:{[Bl]:{regex:/^\d{7}[-]?\d$/,format:"8digitsOptional-"}},FR:{[Bl]:{regex:/^(\d{9}[-]?(\d{5})?)$/,format:"9digitsOr14digits"},[Ld.NON_PROFIT_OR_CHARITABLE]:{regex:/^(\d{9}[-]?(\d{5})?)$|^(W)\d{9}$/,format:"Wchar9or14digits"}},GB:{[Ld.NON_PROFIT_OR_CHARITABLE]:{regex:/^\d{6,7}$/,format:"XorYdigits",values:{x:6,y:7}},[Bl]:{regex:/^[a-zA-Z0-9]{8}$/,format:"Xcharacters",values:{x:8}}},GR:{[Bl]:{regex:/^\d{12}$/,format:"Xdigits",values:{digits:12}}},HR:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},HU:{[Bl]:{regex:/^\d{2}-\d{2}-\d{6}$/,format:"99-99-999999"}},HK:{[Bl]:{regex:/^\d{7}$/,format:"Xdigits",values:{digits:7}}},IN:{[Bl]:{regex:/^\d{21}$/,format:"Xdigits",values:{digits:21}}},ID:{[Bl]:{regex:/^\d{12}$/,format:"Xdigits",values:{digits:12}}},IS:{[Bl]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},IT:{[Bl]:{regex:/^\d{11}$|^[a-zA-Z]{2}\d{6,7}$/,format:"2characteres6or7digits"}},IE:{[Bl]:{regex:/^\d{6}$/,format:"Xdigits",values:{digits:6}}},LT:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},LU:{[Bl]:{regex:/^[a-zA-Z]\d{5,7}$/,format:"1character5to7digits"}},LV:{[Bl]:{regex:/^\d{11}$/,format:"Xdigits",values:{digits:11}}},MT:{[Bl]:{regex:/^(C)\d{5}$/,format:"Cchar5digits"}},MY:{[Bl]:{regex:/^[A-Za-z0-9]{7,8}$|^[A-Za-z0-9]{12}$/,format:"7or8or12characteres"}},NZ:{[Bl]:{regex:/^\d{13}$/,format:"Xdigits",values:{digits:13}}},NL:{[Bl]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},NO:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},PL:{[Bl]:{regex:/^\d{9,10}$/,format:"XorYdigits",values:{x:9,y:10}}},PT:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},RO:{[Bl]:{regex:/^[J]\d{2}\/\d{1,9}\/\d{4}$/,format:'"J" + 2-digit number + "/" + trade register number (up to 9-digit number) + "/" + year of registration'}},SE:{[Bl]:{regex:/^\d{6}-\d{4}$/,format:"999999-9999"}},SG:{[Bl]:{regex:/^\d{9,10}$/,format:"XorYdigits",values:{x:9,y:10}}},SI:{[Bl]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},SK:{[Bl]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},JP:{[Bl]:{regex:/^\d{13}$/,format:"Xdigits",values:{digits:13}}},KR:{[Bl]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},US:{[Bl]:{regex:/^\d{2}-?\d{7}$/,format:"Xdigits",values:{digits:9}}}},Hl=(e,t,a)=>({modes:["blur"],validate:function(r){const{isValid:n,translationMessage:i}=((e,t=null,a=Bl)=>{const r=Wl[t];if(!r)return{isValid:Ls.noHtml.test(e),translationMessage:{translationKey:"validationPleaseEnterAValidRegistrationNumber",format:null,values:null}};let n=r[a];n||(n=r[Bl]);const{regex:i,format:o,values:s}=n,d={translationKey:"validationPleaseEnterAValidRegistrationNumberWithFormat",format:o,values:s};return{isValid:i.test(e),translationMessage:d}})(r,e,t);return this.errorMessage={translationKey:i.translationKey,translationObject:{values:{format:i.values?a.get(i.format,{values:i.values}):a.get(i.format)}}},n}}),ql={modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"},Gl=["registrationNumber","exemptedFromRegistrationNumber"];function $l(e){const{i18n:t,commonProps:a}=We(),r=ue({setState:null}),n=e.requiredFields||["registrationNumber"],{companyType:i,country:o}=e,s=me((()=>((e,t,a)=>{const r=[ql],n=Hl(e,t,a);return n&&r.push(n),{registrationNumber:r}})(o,i,t)),[o,i]),{handleChangeFor:d,data:l,valid:c,errors:u,isValid:m,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromRegistrationNumber?["exemptedFromRegistrationNumber"]:["registrationNumber","exemptedFromRegistrationNumber"],rules:s,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromRegistrationNumber:!!e.data.exemptedFromRegistrationNumber}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{r.current.setState({type:"addToState",value:{data:l,valid:c,errors:u,caller:"businessRegistration",dataStoreId:e.dataStoreId}})}),[l,c,u,m]),le((()=>{l.registrationNumber&&d("registrationNumber","blur")(l.registrationNumber)}),[e.country]),this.triggerValidation=p;const y=ra(Object.assign(Object.assign({},e),{requiredFields:n}),t);return C("div",Object.assign({className:"adyen-kyc-field__business-registration adl-u-margin-bottom-16"},{children:[C(Ys,{stateRef:r}),C(Ue,Object.assign({name:"registrationNumber",label:y.getLabel("registrationNumber","companyRegistrationNumber"),classNameModifiers:["registrationNumber"],errorMessage:y.getErrorMessage("registrationNumber",u,g)||"",isValid:c.registrationNumber,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"registrationNumber",value:l.registrationNumber,readonly:y.isReadOnly("registrationNumber"),classNameModifiers:["registrationNumber"],onInput:d("registrationNumber","input"),onBlur:d("registrationNumber","blur"),disabled:l.exemptedFromRegistrationNumber,"aria-required":!0,"aria-label":y.getLabel("registrationNumber"),"aria-invalid":!c.registrationNumber})})),y.isRequiredField("exemptedFromRegistrationNumber")&&Jt("boolean",{name:"exemptedFromRegistrationNumber",label:y.getLabel("exemptedFromRegistrationNumber"),value:"exemptedFromRegistrationNumber",readonly:y.isReadOnly("exemptedFromRegistrationNumber"),classNameModifiers:["exempted-from-registration"],checked:l.exemptedFromRegistrationNumber,onInput:d("exemptedFromRegistrationNumber"),"aria-required":!1,"aria-label":y.getLabel("exemptedFromRegistrationNumber"),"aria-invalid":!1})]}))}const Xl={tradingName:{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"},stockExchangeMIC:{modes:["blur"],validate:e=>/^[A-Z0-9]{4}$/.test(e),errorMessage:"validationPleaseEnterAValidMarketIdentifier"},stockISIN:[{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"},{modes:["blur"],validate:e=>js(e,12),errorMessage:"validationPleaseEnterAValidStockISIN"}]};function Yl({onChange:e}){const[t,a]=se(null);return le((()=>{t&&(null==e||e(t))}),[JSON.stringify(null==t?void 0:t.currentState)]),C(Xs.Consumer,{children:({state:e})=>(a(e),null)})}function Kl(){const e=ge(Xs);if(void 0===e)throw new Error("useStateContext must be used within a StateProvider");return e}const zl=["tradingName","sameNameAsLegalName",...Gl,"stockExchangeMIC","stockISIN",...Dl,...Vl];function Zl(e){var a,r;const{i18n:n,commonProps:i}=We(),o=ue(null),s=ue(null),d=ue(null),l=ue({setState:null}),c=e.id,u=(e.requiredFields||zl).filter((e=>["tradingName","sameNameAsLegalName","stockExchangeMIC","stockISIN"].includes(e))),{getData:m}=Kl(),p=null===(r=null===(a=m())||void 0===a?void 0:a.companyNameAndCountry)||void 0===r?void 0:r.legalCompanyName,g=!e.data.tradingName||e.data.tradingName===p,{handleChangeFor:y,data:b,valid:f,fieldProblems:h,errors:v,isValid:_,triggerValidation:N,setData:O}=ua(Object.assign(Object.assign({},e),{schema:u,defaultData:Object.assign(Object.assign({},e.data),{sameNameAsLegalName:g,tradingName:g?p:e.data.tradingName}),rules:Xl,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{e.data.tradingName!==b.tradingName&&e.data.tradingName&&(O("tradingName",e.data.tradingName),N(["tradingName"]))}),[e.data.tradingName]);const I=ra(e,n);le((()=>{l.current.setState({type:"addToState",value:{data:b,valid:f,errors:v,caller:c,dataStoreId:c,schema:e.requiredFields||zl}})}),[b,f,v,_]),le((()=>{O("sameNameAsLegalName",g),g&&O("tradingName",p)}),[p]);this.triggerValidation=()=>{N(u),S(E)&&o.current.triggerValidation(),S(T)&&s.current.triggerValidation(),S(A)&&d.current.triggerValidation()};const E=Dd(e,Gl),T=Dd(e,Dl),A=Dd(e,Vl),S=e=>!!e.requiredFields.length;return C(t.Fragment,{children:[C(Ys,{owner:c,stateRef:l}),C(Yl,{onChange:({currentState:t,changeInitiatedBy:a})=>{if(a===c){const a=t.data[c];let r=e.requiredFields||zl,n=!1;I.isRequiredField("vatNumber")&&(r=a.exemptedFromVat?r.filter((e=>"vatNumber"!==e)):r.filter((e=>"vatAbsenceReason"!==e)),n=!0),I.isRequiredField("taxId")&&a.exemptedFromTax&&(r=r.filter((e=>"taxId"!==e)),n=!0),I.isRequiredField("registrationNumber")&&a.exemptedFromRegistrationNumber&&(r=r.filter((e=>"registrationNumber"!==e)),n=!0),n&&l.current.setState({type:"addToState",value:{data:b,valid:f,errors:v,fieldProblems:h,caller:e.id,dataStoreId:e.id,schema:r}})}}}),C("form",Object.assign({className:"adyen-kyc-company__company-details"},{children:[C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:I,id:"ariaErrorField"}),C(ul,{page:"Company registration details",title:n.get("whyDoINeedToFillInThisInformation"),content:n.get("reasonForFillingCompanyRegistrationDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingCompanyRegistrationDetails"}),I.isRequiredField("tradingName")&&C(t.Fragment,{children:[C(Ue,Object.assign({name:"tradingName",label:I.getLabel("tradingName"),classNameModifiers:["tradingName"],errorMessage:I.getErrorMessage("tradingName",v,h),isValid:f.tradingName,showInlineErrors:i.showInlineErrors},{children:Jt("text",{name:"tradingName",value:b.tradingName,readonly:I.isReadOnly("tradingName")||b.sameNameAsLegalName,classNameModifiers:["tradingName"],onInput:y("tradingName","input"),onBlur:y("tradingName","blur"),"aria-required":!0,"aria-label":I.getLabel("tradingName"),"aria-invalid":!f.tradingName})})),C("div",Object.assign({className:"adyen-kyc-field--same-name-as-legal-name"},{children:Jt("boolean",{name:"sameNameAsLegalName",label:I.getLabel("sameNameAsLegalName"),value:b.sameNameAsLegalName,checked:b.sameNameAsLegalName,onInput:y("sameNameAsLegalName","input"),onChange:()=>O("tradingName",b.sameNameAsLegalName?p:""),"aria-required":!1,"aria-label":I.getLabel("sameNameAsLegalName"),"aria-invalid":!1})}))]}),I.isRequiredField("stockExchangeMIC")&&C(Ue,Object.assign({name:"stockExchangeMIC",label:I.getLabel("stockExchangeMIC"),helper:n.get("stockExchangeMICHelper"),classNameModifiers:["stockExchangeMIC"],errorMessage:I.getErrorMessage("stockExchangeMIC",v,h),isValid:f.stockExchangeMIC,showInlineErrors:i.showInlineErrors},{children:Jt("text",{name:"stockExchangeMIC",value:b.stockExchangeMIC,readonly:I.isReadOnly("stockExchangeMIC"),classNameModifiers:["stockExchangeMIC"],onInput:y("stockExchangeMIC","input"),onBlur:y("stockExchangeMIC","blur"),"aria-required":!0,"aria-label":I.getLabel("stockExchangeMIC"),"aria-invalid":!f.stockExchangeMIC})})),I.isRequiredField("stockISIN")&&C(Ue,Object.assign({name:"stockISIN",label:I.getLabel("stockISIN"),helper:n.get("stockISINHelper"),classNameModifiers:["stockISIN"],errorMessage:I.getErrorMessage("stockISIN",v,h),isValid:f.stockISIN,showInlineErrors:i.showInlineErrors},{children:Jt("text",{name:"stockISIN",value:b.stockISIN,readonly:I.isReadOnly("stockISIN"),classNameModifiers:["stockISIN"],onInput:y("stockISIN","input"),onBlur:y("stockISIN","blur"),"aria-required":!0,"aria-label":I.getLabel("stockISIN"),"aria-invalid":!f.stockISIN})})),I.isRequiredField("registrationNumber")&&C($l,Object.assign({},E,{companyType:e.companyType,ref:o,dataStoreId:c,country:e.country})),I.isRequiredField("vatNumber")&&C(kl,Object.assign({},T,{ref:s,dataStoreId:c,country:e.country})),I.isRequiredField("taxId")&&C(Ul,Object.assign({},A,{ref:d,dataStoreId:c,country:e.country}))]}))]})}const Ql={legalCompanyName:{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"}},Jl=["legalCompanyName"];function ec(e){const{i18n:t,commonProps:a}=We(),{dataStoreId:r,requiredFields:n}=e,i=n||["legalCompanyName"],o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,triggerValidation:m,fieldProblems:p}=ua(Object.assign(Object.assign({},e),{schema:i,rules:e.validators||Ql,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:p,caller:"legalCompanyName",dataStoreId:r}})}),[d,l,c,u]),this.triggerValidation=m;const g=ra(e,t);return g.isRequiredField("legalCompanyName")?C("div",Object.assign({className:"adyen-kyc-field__legal-company-name"},{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"legalCompanyName",label:g.getLabel("legalCompanyName"),helper:t.get("legalCompanyNameHelper"),classNameModifiers:["legalCompanyName"],errorMessage:g.getErrorMessage("legalCompanyName",c,p),isValid:l.legalCompanyName,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"legalCompanyName",value:d.legalCompanyName,readonly:g.isReadOnly("legalCompanyName"),classNameModifiers:["legalCompanyName"],onInput:s("legalCompanyName","input"),onBlur:s("legalCompanyName","blur"),"aria-required":!0,"aria-label":g.getLabel("legalCompanyName"),"aria-invalid":!l.legalCompanyName})}))]})):null}const tc={companyCountry:{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"}},ac=({title:e,children:t})=>C("div",Object.assign({className:"adl-disclaimer-container"},{children:[C("div",Object.assign({className:"adl-disclaimer__title"},{children:e})),C("div",Object.assign({className:"adl-disclaimer__content"},{children:t}))]})),rc=()=>{const{i18n:e}=We();return C(ac,Object.assign({title:e.get("patriotActDisclosureTitle")},{children:[C("p",{children:e.get("patriotActDisclosureTextParagraph1")}),C("p",{children:e.get("patriotActDisclosureTextParagraph2")})]}))},nc=["companyCountry","legalCompanyName"];function ic(e){const{i18n:t}=We(),a=ue(null),{isSettingEnabled:r}=zd(),n=e.id,i=ue({setState:null}),o=r("editPrefilledCountry"),s=nc,{handleChangeFor:d,data:l,valid:c,errors:u,isValid:m,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:["companyCountry"],defaultData:e.data,rules:e.validators||tc,fieldProblems:null==e?void 0:e.fieldValidationErrors})),y=ra(e,t);le((()=>{i.current.setState({type:"addToState",value:{data:l,valid:c,errors:u,fieldProblems:g,caller:n,dataStoreId:n,schema:s}})}),[l,c,u,m]),this.triggerValidation=()=>{p(["companyCountry"]),y.isRequiredField("legalCompanyName")&&a.current.triggerValidation()};const b=Dd(e,Jl);return C("div",{children:[C(Ys,{owner:n,stateRef:i}),C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:y,id:"ariaErrorField"}),"US"===l.companyCountry?C(rc,{}):void 0,y.isRequiredField("companyCountry")&&C(aa,{label:y.getLabel("companyCountry"),allowedCountries:[],classNameModifiers:["country"],errorMessage:y.getErrorMessage("companyCountry",u,g),onDropdownChange:d("companyCountry"),value:l.companyCountry,readOnly:!o}),y.isRequiredField("legalCompanyName")&&C(ec,Object.assign({},b,{ref:a,dataStoreId:n}))]})}let oc=!1,sc=!1;function dc(e){const t=function(){const e=document.createElement("div");return e.setAttribute("aria-hidden","true"),e.setAttribute("id","adl-icon-container"),e.style.height="0",e}();return t.innerHTML=e,t}function lc(e){if(sc)return Promise.resolve();return v({loadingContext:e,path:"static/images/document-guidance.svg"},null,"text").then((e=>{document.body.insertBefore(dc(e),document.body.firstChild),sc=!0}))}var cc;!function(e){e.BANK_STATEMENT="bankStatement",e.DRIVERS_LICENSE="driversLicense",e.IDENTITY_CARD="identityCard",e.NATIONAL_ID_NUMBER="nationalIdNumber",e.PASSPORT="passport",e.PROOF_OF_ADDRESS="proofOfAddress",e.PROOF_OF_NATIONAL_ID_NUMBER="proofOfNationalIdNumber",e.PROOF_OF_RESIDENCY="proofOfResidency",e.REGISTRATION_DOCUMENT="registrationDocument",e.VAT_DOCUMENT="vatDocument",e.CONSTITUTIONAL_DOCUMENT="constitutionalDocument"}(cc||(cc={}));const uc=(e,t=!1,a=!0)=>{switch(e){case cc.PASSPORT:return"passport";case cc.DRIVERS_LICENSE:case cc.IDENTITY_CARD:return t?a?"id-front":"id-back":"id";case cc.BANK_STATEMENT:case cc.VAT_DOCUMENT:case cc.REGISTRATION_DOCUMENT:case cc.PROOF_OF_ADDRESS:case cc.PROOF_OF_RESIDENCY:default:return"generic-document"}};function mc({type:e,className:r}){const{loadingContext:n,i18n:i}=We(),[o,s]=se(null);return le((()=>{lc(n)}),[]),le((()=>{s(uc(e))}),[e]),C("div",Object.assign({className:a("adl-document-guidance",r)},{children:C("div",Object.assign({className:"adl-document-guidance__container"},{children:[C("div",Object.assign({className:"adl-document-guidance__item"},{children:[C("svg",Object.assign({width:"100%",role:"img"},{children:C("use",{href:`#adl-${o}-valid`})})),C("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("good")}))]})),C("div",Object.assign({className:"adl-document-guidance__item"},{children:[C("svg",Object.assign({width:"100%",role:"img"},{children:C("use",{href:`#adl-${o}-invalid-cut`})})),C("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notCutOff")}))]})),C("div",Object.assign({className:"adl-document-guidance__item"},{children:[C("svg",Object.assign({width:"100%",role:"img"},{children:C("use",{href:`#adl-${o}-invalid-blur`})})),C("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notBlurry")}))]})),C("div",Object.assign({className:"adl-document-guidance__item"},{children:C(t.Fragment,"generic-document"===o?{children:[C("svg",Object.assign({width:"100%",role:"img"},{children:C("use",{href:`#adl-${o}-invalid-expired`})})),C("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notExpired")}))]}:{children:[C("svg",Object.assign({width:"100%",role:"img"},{children:C("use",{href:`#adl-${o}-invalid-glare`})})),C("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("noGlare")}))]})}))]}))}))}function pc(e){const{file:t,errorMessage:a,onDelete:r,iconPrefix:n}=e,{i18n:i}=We();return C("div",Object.assign({className:"adyen-kyc-dropzone-file"},{children:[C("div",Object.assign({className:"adyen-kyc-dropzone-file__icon"},{children:C("svg",Object.assign({height:"100%",width:"100%"},{children:C("use",a?{"data-testid":"document-invalid",href:`#adl-${n}-icon-invalid`}:{"data-testid":"document-valid",href:`#adl-${n}-icon-valid`})}))})),C("div",Object.assign({className:"adyen-kyc-dropzone-file__labels"},{children:[C("div",Object.assign({className:"adyen-kyc-dropzone-file__name"},{children:t.name})),C("div",a?Object.assign({className:"adyen-kyc-dropzone-file__error"},{children:i.get(a)}):Object.assign({className:"adyen-kyc-dropzone-file__size"},{children:[C("span",{children:[i.get("complete"),"\xa0"]}),(e=>{if(e){const t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";const a=parseInt(Math.floor(Math.log(e)/Math.log(1024)).toString());return 0===a?`${e} ${t[a]}`:`(${(e/Math.pow(1024,a)).toFixed(1)} ${t[a]})`}return null})(t.size)]}))]})),C("button",Object.assign({type:"button",className:"adyen-kyc-dropzone-file__button",onClick:()=>r(t)},{children:C(xe,{name:"remove"})}))]}))}const gc=e=>{const{name:t,allowedFiletypes:a,maxNumberOfFiles:r,maxSize:n,isOptional:i=!1}=e;let o=[{validate:e=>null==e?void 0:e.every(((e,t)=>t<r)),errorMessage:"tooManyFiles",modes:["blur","input"]},{validate:e=>!(null==e?void 0:e.map((e=>e.name)).some(((e,t,a)=>a.indexOf(e)!==t))),errorMessage:"duplicatedFiles",modes:["blur","input"]},{validate:e=>{const t=a.split(",").map((e=>e.trim()));return null==e?void 0:e.every((e=>t.some((t=>{var a;return null===(a=e.name)||void 0===a?void 0:a.toLocaleLowerCase().endsWith(t.toLocaleLowerCase())}))))},errorMessage:"unsupportedFiletype",modes:["blur","input"]},{validate:e=>null==e?void 0:e.every((e=>!e.size||e.size<n)),errorMessage:"maximumFileSizeExceeded",modes:["blur","input"]}];return i||(o=[{validate:e=>!!(null==e?void 0:e.length),errorMessage:"fieldIsRequired",modes:["blur","input"]},...o]),{[t]:o}};function yc(e){const t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";const a=parseInt(Math.floor(Math.log(e)/Math.log(1024)).toString(),10);return 0===a?`${e} ${t[a]}`:`${(e/Math.pow(1024,a)).toFixed()} ${t[a]}`}function bc(e){var t,r;const{name:n,iconPrefix:i,label:o,maxNumberOfFiles:s,allowedFiletypes:d,multiple:l,required:c,defaultData:u,maxSize:m,id:p,isOptional:g}=e,{i18n:y}=We(),b=ue(null),[f,h]=se(!1),[v,_]=se(!0),N=ue({setState:null}),{data:O,valid:I,errors:E,isValid:T,setData:A,fieldProblems:S,triggerValidation:R,setValid:D,handleChangeFor:k}=ua(Object.assign(Object.assign({},e),{schema:[n],defaultData:u,rules:gc(e)})),L="fieldIsRequired"===(null===(t=null==E?void 0:E[n])||void 0===t?void 0:t.errorMessage);le((()=>{var e;const t=(null===(e=null==O?void 0:O[n])||void 0===e?void 0:e.length)>=s;_(!t),N.current.setState({type:"addToState",value:{data:O,valid:I,errors:E,fieldProblems:S,caller:n,dataStoreId:p}})}),[O,I,E,T]);const w=({files:e})=>{const t=(null==O?void 0:O[n])||[];k(n,"input")([...t,...e])};return this.triggerValidation=R,le((()=>{var t,a,r;(null===(a=null===(t=e.defaultData)||void 0===t?void 0:t[n])||void 0===a?void 0:a[0])?(A(n,null===(r=e.defaultData)||void 0===r?void 0:r[n]),R()):A(n,null)}),[e.defaultData]),le((()=>{const e=null==O?void 0:O[n],t=e&&e.length>0;g&&!t&&D(n,!0)}),[g,O]),C("div",{children:[C(Ys,{stateRef:N}),o&&C("div",Object.assign({className:a("adyen-kyc-label__text",{"adyen-kyc-label__text--error":L})},{children:o})),null===(r=null==O?void 0:O[n])||void 0===r?void 0:r.map((e=>{var t;return C(pc,{file:e,onDelete:e=>(e=>{var t;return k(n,"input")(null===(t=null==O?void 0:O[n])||void 0===t?void 0:t.filter((t=>t!==e)))})(e),errorMessage:null===(t=null==E?void 0:E[n])||void 0===t?void 0:t.errorMessage,iconPrefix:i},e)})),v&&C("div",Object.assign({role:"region",className:a("adyen-kyc-dropzone",{"adyen-kyc-dropzone--dragged":f,"adyen-kyc-dropzone--error":!f&&L}),onDrop:e=>(e=>{e.preventDefault(),e.stopPropagation(),w(e.dataTransfer),h(!1)})(e),onDragOver:e=>(e=>{e.preventDefault(),e.stopPropagation(),h(!0)})(e),onDragEnter:e=>(e=>{e.preventDefault(),e.stopPropagation()})(e),onDragLeave:e=>(e=>{e.preventDefault(),e.stopPropagation(),h(!1)})(e)},{children:[C("div",Object.assign({className:"adyen-kyc-dropzone__icon"},{children:C("svg",Object.assign({height:"100%",width:"100%"},{children:C("use",{href:`#adl-${i}-icon`})}))})),C("div",Object.assign({className:"adyen-kyc-dropzone__labels"},{children:[C("div",Object.assign({className:"adyen-kyc-dropzone__drag-text"},{children:[C("span",{children:[y.get("dragYourFilesHereOr"),"\xa0"]}),C("button",Object.assign({className:"adyen-kyc-dropzone__button",type:"button",onClick:()=>b.current.click()},{children:y.get("browse")}))]})),C("div",Object.assign({className:"adyen-kyc-dropzone__supports-text"},{children:y.get("supports",{values:{fileTypes:d,maxSize:yc(m),maxFiles:s}})}))]})),C("input",{className:"adyen-kyc-dropzone__input",ref:b,multiple:l,accept:d,onChange:e=>(e=>w(e.target))(e),type:"file","aria-required":c,"aria-label":o,"aria-invalid":!I})]})),L&&C("div",Object.assign({className:"adyen-kyc-error-text"},{children:y.get("fieldIsRequired")}))]})}bc.defaultProps={defaultData:[],label:"",required:!0,multiple:!1,maxNumberOfFiles:1,maxSize:4194304,allowedFiletypes:"JPG, JPEG, PNG, PDF",iconPrefix:"generic-document",onChange:()=>{}};const fc=yt((function(e){var a,{documentType:r,documentField:i,guidanceHeader:o,documentTypeSelect:s,guidanceContent:d}=e,l=n(e,["documentType","documentField","guidanceHeader","documentTypeSelect","guidanceContent"]);const{i18n:c}=We(),u=ue(null),[m,p]=se(null),{data:g,errors:y,handleChangeFor:b,fieldProblems:f,triggerValidation:h,valid:v,setData:_}=ua(Object.assign(Object.assign({},l),{schema:["description"],defaultData:l.data,rules:l.validators,fieldProblems:null==l?void 0:l.fieldValidationErrors})),N=ra(l,c),O=ue({setState:null}),I=!((null==l?void 0:l.formVerificationErrors)&&0===(null===(a=Object.keys(null==l?void 0:l.formVerificationErrors))||void 0===a?void 0:a.length)),{selectedType:E,setSelectedType:T,options:A}=s||{};return le((()=>{I&&this.triggerValidation()}),[l.data]),this.triggerValidation=()=>{N.isRequiredField(i)&&u.current.triggerValidation()},le((()=>{O.current.setState({type:"addToState",value:{data:g,valid:v,errors:y,fieldProblems:f,caller:l.id,dataStoreId:l.id,schema:l.requiredFields}})}),[g,v,y,f]),le((()=>{var e,t;p({[i]:null===(e=null==l?void 0:l.data)||void 0===e?void 0:e[i]}),_("description",null===(t=l.data)||void 0===t?void 0:t.description),h()}),[l.data]),C("div",Object.assign({className:`adl-company-document-upload adl-company-document-upload--${i}`},{children:[C(Ys,{owner:l.id,stateRef:O}),C(Ms,{heading:l.heading}),C(qc,{verificationErrors:null==l?void 0:l.formVerificationErrors,validationErrors:null==l?void 0:l.fieldValidationErrors,formUtils:N,id:"ariaErrorField"}),N.isRequiredField(i)&&C(t.Fragment,{children:[o,s?C(Ue,Object.assign({name:"documentType",label:c.get("selectDocumentType",{values:{name:l.name}})},{children:Jt("select",{onChange:e=>T(e.target.value),name:"documentType",placeholder:c.get("selectDocument"),selected:E,items:A.map((({id:e,name:t})=>({id:e,name:c.get(t)})))})})):null,C("div",{children:d}),C(mc,{type:r,className:"adl-u-margin-bottom-24"}),C(bc,{name:i,ref:u,id:l.id,defaultData:m,isOptional:I||N.isOptionalField(i),iconPrefix:uc(r,!0)})]}),N.isRequiredField("description")&&C(Ue,Object.assign({name:"description",label:N.getLabel("description"),helper:c.get("descriptionHelper"),errorMessage:N.getErrorMessage("description",y,f),isValid:v.description},{children:Jt("textArea",{name:"description",value:g.description,classNameModifiers:["description"],maxLength:200,onInput:b("description"),"aria-label":N.getLabel("description"),"aria-invalid":!v.description})}))]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&B(e.documentTypeSelect,t.documentTypeSelect)&&e.documentField===t.documentField));function hc({className:e,children:t,noMarkers:r}){const n=a(["adl-list__item",r&&"adl-list__item--no-markers",e]);return C("li",Object.assign({className:n},{children:t}))}function vc({className:e,nested:t,ordered:r,noMarkers:n,children:i}){const o=a(["adl-list",t&&"adl-list--nested",r&&"adl-list--ordered",n&&"adl-list--no-markers",e]);return C("ul",Object.assign({className:o},{children:i}))}const _c={companyNameAndCountry:{formId:"companyNameAndCountry",formName:"nameAndCountry",fields:nc},companyType:{formId:"companyType",formName:"companyStructure",fields:tl},companyDetails:{formId:"companyDetails",formName:"registrationDetails",fields:zl},companyRegistrationDetails:{formId:"companyRegistrationDetails",formName:"address",fields:["registrationAddress","operationalAddress","operationalAddressIsSame"]},companyRegistrationDocument:{formId:"companyRegistrationDocument",formName:"registrationDocument",fields:["registrationDocument"]},companyTaxDocument:{formId:"companyTaxDocument",formName:"taxDocument",fields:["taxDocument"]}},Nc=_c.companyNameAndCountry.formId,Oc=_c.companyType.formId,Ic=_c.companyDetails.formId,Ec=_c.companyRegistrationDetails.formId,Tc=_c.companyRegistrationDocument.formId,Ac=_c.companyTaxDocument.formId,Sc=[Tc,Ac];var Rc;!function(e){e.BUSINESS_NAME_FILING="doingBusinessAsNameFiling",e.TAX_FILING="taxFiling",e.TRUST_DEED="trustDeed",e.TRUST_INSTRUMENT="trustInstrument"}(Rc||(Rc={}));const Cc={[id.SOLE_PROPRIETORSHIP]:[{id:Rc.BUSINESS_NAME_FILING,name:"doingBusinessAsNameFiling"},{id:Rc.TAX_FILING,name:"taxFiling"}],[id.TRUST]:[{id:Rc.TRUST_DEED,name:"trustDeed"},{id:Rc.TRUST_INSTRUMENT,name:"trustInstrument"}]};const Dc=yt((function(e){var a,{ref:r,id:i,legalEntityType:o}=e,s=n(e,["ref","id","legalEntityType"]);const{i18n:d}=We(),l=C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:d.get("uploadOneOfTheFollowing")})),C(vc,Object.assign({className:"adl-u-margin-left-8"},{children:null===(a=Cc[o])||void 0===a?void 0:a.map((({id:e,name:t})=>C(hc,{children:d.get(t)},e)))})),C("div",Object.assign({className:"adl-u-margin-y-16"},{children:[C("span",{children:[d.get("documentIssuedWithinLastYear")," "]}),C(ed,Object.assign({href:"https://docs.adyen.com/marketplaces-and-platforms/required-kyc-information/document-requirements#constitutional-doc",external:!0},{children:d.get("learnMore")}))]}))]});return C("div",{children:C(fc,Object.assign({},s,{ref:r,documentType:cc.CONSTITUTIONAL_DOCUMENT,documentField:"constitutionalDocument",heading:d.get("constitutionalDocument"),guidanceContent:l,id:i}))})}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name)),kc={solePropNameAndCountry:{formId:"solePropNameAndCountry",formName:"nameAndCountry",fields:nc},solePropRegistrationDetails:{formId:"solePropRegistrationDetails",formName:"registrationDetails",fields:zl},solePropRegistrationAddress:{formId:"solePropRegistrationAddress",formName:"registrationAddress",fields:ml},solePropConstitutionalDocument:{formId:"solePropConstitutionalDocument",formName:"constitutionalDocument",fields:["constitutionalDocument"]}},Lc=kc.solePropNameAndCountry.formId,wc=kc.solePropRegistrationAddress.formId,Pc=kc.solePropRegistrationDetails.formId,jc=kc.solePropConstitutionalDocument.formId;const xc={verificationErrors:{},remediationActions:{},missingData:[],status:Sd.FINISHED,validationErrors:{}},Mc=["2_8036","2_8064","2_8067","2_8189"];function Fc(e){const t=(null==e?void 0:e.capabilities)||{},a={};return Object.values(t).forEach((({problems:e})=>{e&&e.forEach((e=>{var t;if(null==e?void 0:e.entity){const{type:r,id:n}=Wc(e)?null===(t=null==e?void 0:e.entity)||void 0===t?void 0:t.owner:e.entity;a[r]=a[r]||{},a[r][n]=a[r][n]||W(xc),function(e,t){var a;(null===(a=e.verificationErrors)||void 0===a?void 0:a.length)&&e.verificationErrors.forEach((e=>{!function(e,t){switch(e.type){case rd.INVALID_INPUT:!function(e,t){var a,r;const n=null===(a=null==e?void 0:e.subErrors)||void 0===a?void 0:a.reduce(((e,{code:a,remediatingActions:r})=>{const n=null==r?void 0:r.reduce(((e,a)=>{const r=nd[a.code];if(r){const n=r.flatMap((e=>Uc(e))).filter(Boolean),i=null==n?void 0:n.reduce(((e,t)=>{const[a,r]=t.split(/\.(.+)/,2);return e.forms=[...e.forms,a],e.fields=[...e.fields,r],e}),{forms:[],fields:[]}),o=new Set(i.forms.filter(Boolean)),s=new Set(i.fields.filter(Boolean)),d=Object.assign(Object.assign({},a),{forms:[...o],fields:[...s]});e.remActions.push(d),e.forms=[...e.forms,...o],t.remediationActions[d.code]=d}return e}),{forms:[],remActions:[]});return e.childErrorsWithRemActions[a]=null==n?void 0:n.remActions,(null==n?void 0:n.forms)&&(e.allForms=[...e.allForms,...n.forms]),e}),{allForms:[],childErrorsWithRemActions:{}}),i=new Set(null===(r=null==n?void 0:n.allForms)||void 0===r?void 0:r.filter(Boolean));null==i||i.forEach((a=>{(null==t?void 0:t.verificationErrors[a])||(t.verificationErrors[a]={}),t.verificationErrors[a][e.code]||(t.verificationErrors[a][e.code]={}),t.verificationErrors[a][e.code]=n.childErrorsWithRemActions})),Bc(t,Sd.ERROR)}(e,t);break;case rd.DATA_MISSING:Vc(e)||function(e,t){t.missingData=t.missingData?[...t.missingData,e]:[e],Bc(t,Sd.DETAILS_REQUIRED)}(e,t);break;case rd.PENDING_STATUS:Bc(t,Sd.PROCESSING)}}(e,t)}))}(e,a[r][n])}}))})),a}const Vc=e=>Mc.includes(null==e?void 0:e.code);const Uc=e=>{if(!(null==e?void 0:e.key))return null;if("documents"===e.key&&(null==e?void 0:e.type))return e.type.map((e=>Ad[e]));{const[t]=e.key.split(/\.(.+)/,2);switch(t){case id.INDIVIDUAL:return _d[e.key];case id.ORGANIZATION:return vd[e.key];case od.BANK_ACCOUNT:return Nd[e.key];case id.SOLE_PROPRIETORSHIP:return Td[e.key]}}};function Bc(e,t){e.status<t&&(e.status=t)}const Wc=e=>{var t,a;return"document"===(null===(a=null===(t=e.entity)||void 0===t?void 0:t.type)||void 0===a?void 0:a.toLowerCase())},Hc=({verificationErrors:e,formUtils:a})=>{var r,n;const i=e=>a.getVal(`errorMessage_${e}`),o=(e,r)=>{var n,i;if(1===(null==e?void 0:e.length))return a.getVal(`remediationMessage_${e[0].code}`);{const e=r&&Object.keys(r);let o;if((null==e?void 0:e.length)>0)if((null==e?void 0:e.length)>1){const n=[];e.forEach((e=>{var t;n.push(C(hc,{children:C(td,{fieldName:e,label:a.getVal(`remediationMessage_${null===(t=r[e])||void 0===t?void 0:t.remediation.code}`)})}))})),o=C(t.Fragment,{children:[a.getLabel("uploadTheFollowingDocuments"),C(vc,{children:n})]})}else{const t=e[0],s=` ${null===(i=a.getVal(`remediationMessage_${null===(n=r[t])||void 0===n?void 0:n.remediation.code}`))||void 0===i?void 0:i.toLowerCase()}`;o=C(td,{fieldName:t,label:s})}return C(t.Fragment,{children:[`${a.getVal("reviewTheInformationBelowAndCorrectMistakesOr")} `,o,` ${a.getVal("thenResubmit")}`]})}};let s,d;const l=Object.keys(e);1===l.length&&(d=l[0]);const c=Object.values(e).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{}),u=Object.keys(c),m=null===(n=null===(r=Object.values(c))||void 0===r?void 0:r.flat())||void 0===n?void 0:n.reduce(((e,t)=>{var a;const r=(e=>{var t;return null===(t=null==e?void 0:e.forms)||void 0===t?void 0:t.some((e=>e===Wp.idDocument.formId||e===Wp.proofOfResidence.formId||e===Wp.proofOfNationalId.formId||e===(null==_c?void 0:_c.companyRegistrationDocument.formId)||e===(null==_c?void 0:_c.companyTaxDocument.formId)||"payoutAccountDocuments"===e||e===kc.solePropConstitutionalDocument.formId))})(t);return r&&(null===(a=null==t?void 0:t.fields)||void 0===a||a.forEach((a=>e[a]={formName:null==t?void 0:t.forms[0],remediation:t}))),e}),{}),p=Object.values(c).flat();s=1===u.length?C("div",Object.assign({"data-testid":"verification-error--case-"+(1===p.length?"1":"2-1")},{children:[C("span",{children:`${i(u[0])} `}),C("span",{children:o(p,m)})]})):2===u.length?C("div",Object.assign({"data-testid":"verification-error--case-2-2"},{children:[a.getVal("weFoundTheFollowingIssues"),C("ul",{children:u.map((e=>C("li",{children:C("span",{children:i(e)})},e)))}),C("span",{children:o(p,m)})]})):C("div",Object.assign({"data-testid":"verification-error--case-2-3"},{children:o(p,m)}));const g=d?i(d):a.getVal("correctErrorsResubmit");return C(zs,Object.assign({title:g,type:Ks.ERROR,hasCloseButton:!1},{children:C("div",Object.assign({className:"adl-alert__explanation adyen-kyc-error-panel__verification-errors"},{children:s}))}))};function qc({id:e="ariaErrorField",verificationErrors:t,validationErrors:a,formUtils:r}){const n=t&&Object.keys(t).length>0,i=a&&Object.keys(a).length>0;return n||i?C("div",Object.assign({className:"adyen-kyc-error-panel",id:e,"aria-live":"polite"},{children:[n&&!i&&C(Hc,{formUtils:r,verificationErrors:t}),i&&C(ad,{formUtils:r,validationErrors:a})]})):null}class Gc extends t.Component{constructor(){super(...arguments),this.onClick=e=>{e.preventDefault(),this.props.disabled||this.props.onClick(e,{complete:this.complete},null)},this.complete=(e=1e3)=>{this.setState({completed:!0}),setTimeout((()=>{this.setState({completed:!1})}),e)}}render({showAsLink:e,secondary:r,tertiary:n,ghost:i,positive:o,negative:s,className:d,small:l,block:c,circle:u,label:m,icon:p,disabled:g,status:y,type:b,title:f,testId:h,labelHoverBox:v}){const _=e?"adl-link__text":a("adl-button__text",{"adl-button__text--hover-box":v}),N={loading:C(t.Fragment,{children:[m&&C("span",Object.assign({className:_},{children:m})),C("span",Object.assign({className:"adl-button__loader-container"},{children:C(je,{size:"small",inline:!0})}))]}),default:C(t.Fragment,{children:[m&&C("span",Object.assign({className:_},{children:m})),p&&C(xe,{name:p,className:"adl-link__icon"})]})},O=N[y]||N.default,I=e?a("adl-link","adl-link--icon-right",d,{"adl-link--with-icon":!!p}):a("adl-button",d,{"adl-button--icon-left":!!p,"adl-button--secondary":r,"adl-button--tertiary":n&&!r,"adl-button--ghost":i&&!r&&!n,"adl-button--block":c,"adl-button--positive":o,"adl-button--negative":s&&!o,"adl-button--small":l&&m,"adl-button--circle":u,"adl-button--icon":p&&m&&!l,"adl-button--icon-only":p&&(!m||v),"adl-button--icon-small":l&&p&&(!m||v),"adl-button--hover-box":v});return C("button",Object.assign({"data-testid":h,className:I,type:b,title:f,disabled:g,onClick:this.onClick},{children:O}))}}function $c(e){var a,r,n;const{i18n:i,commonProps:o}=We(),s=null!==(r=ke[null===(a=e.data)||void 0===a?void 0:a.country])&&void 0!==r?r:ke.default,[d,l]=se(!1),[c,u]=se(!0),[m,p]=se(!1),y=g(i.locale),b=(null===(n=e.requiredFields)||void 0===n?void 0:n.includes("stateOrProvince"))||e.data.country&&Ce.includes(e.data.country)?s:s.filter((e=>"stateOrProvince"!==e)),f=e.addressType,{data:h,errors:v,valid:_,isValid:N,setData:O,setValid:I,fieldProblems:E,handleChangeFor:T,triggerValidation:A,schema:S}=ua(Object.assign(Object.assign({},e),{schema:b,defaultData:e.data,formatters:Bs,rules:$s,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:[]})),R=ra(Object.assign(Object.assign({},e),{requiredFields:b}),i),D=ue({setState:null});le((()=>{e.data.country!==h.country&&e.data.country&&(b.map((e=>{O(e,""),I(e,!1)})),O("country",e.data.country),I("country",!!e.data.country),l(!1),u(!0))}),[e.data.country]),le((()=>{e.handleAddressSearch&&e.handleFindAddress&&p(!0),(h.city||h.street||h.postalCode)&&(l(!0),u(!1))}),[]),le((()=>{h.postalCode&&T("postalCode","blur")(h.postalCode)}),[h.country]),le((()=>{var t;const a=Oe.reduce(((t,a)=>{if(!R.isRequiredField(a))return delete t[a],t;const r=R.isRequiredField(a)||h[a]||!e.data[a]?"N/A":e.data[a];return Object.assign(Object.assign({},t),{[a]:R.isRequiredField(a)||h[a]?h[a]:r})}),{}),r=f?{data:{[f]:a},valid:{[f]:N},errors:{[f]:v},fieldProblems:{[f]:E}}:{data:a,valid:_,errors:v,fieldProblems:E},n=f?null:{schema:S};D.current.setState({type:"addToState",value:Object.assign(Object.assign(Object.assign({},r),{caller:"address",dataStoreId:e.id}),n)}),null===(t=e.onChange)||void 0===t||t.call(e,Object.assign(Object.assign({},r),{isValid:N}))}),[h,_,v,N]),this.triggerValidation=()=>{l(!0),u(!1),A()};const k=t=>{if(!R.isRequiredField(t))return null;const a="country"===t&&e.hideCountry;return C(na,{allowedCountries:e.allowedCountries,classNameModifiers:[t],data:h,valid:_,errors:v,fieldProblems:E,fieldName:t,onInput:T(t,"input"),onBlur:T(t,"blur"),onDropdownChange:T(t,"blur"),maxlength:Es(Ws,t,h.country,!0),hideField:a,"aria-label":R.getLabel(t,t),trimOnBlur:!0},t)},L=(w=h.country,ke[w]||ke.default);var w;const P=(e,t)=>{O(t,e[t]||""),I(t,!!e[t])};return C("form",Object.assign({className:"adyen-kyc__address adl-u-margin-bottom-48","aria-describedby":o.showInlineErrors?null:"ariaErrorField"},{children:[C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:R,id:"ariaErrorField"}),m?C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-search-address adl-u-margin-bottom-24"},{children:[C(ct,{handleChangeFor:T,data:e.data,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress,legalEntityId:e.legalEntityId,autocompleteAddressForm:e=>{De.includes(e.country)?(b.filter((e=>"houseNumberOrName"!==e)).map((t=>{"street"===t?(e=>{const t=e.houseNumberOrName?`${e.houseNumberOrName} `:"";O("street",`${t}${e.street||""}`||""),I("street",!!e.street)})(e):P(e,t)})),"street2"in e&&(O("houseNumberOrName",e.street2||""),I("houseNumberOrName",!!e.street2))):b.map((t=>P(e,t))),l(!0),u(!1),A()}}),C("div",Object.assign({className:"adyen-kyc-search-address--location"},{children:[C("span",Object.assign({className:"adyen-kyc-search-address--location-country"},{children:[C(xe,{name:"location"})," ",y.getCountryName(e.data.country)]})),c&&C(Gc,{showAsLink:!0,testId:"addAddressManuallyBtn",onClick:()=>(l(!0),void u(!1)),label:i.get("addManually"),title:i.get("addManually")})]}))]})),d&&L.map((e=>k(e)))]}):L.map((e=>k(e))),C(Ys,{owner:e.id,stateRef:D})]}))}Gc.defaultProps={status:"default",disabled:!1,label:"",onClick:()=>{},type:"button"},$c.defaultProps={data:{},onChange:()=>{},visibility:"editable",requiredFields:Oe,countryCode:null};const Xc={firstName:[{validate:Cs,errorMessage:"fieldIsRequired",modes:["blur"]}],lastName:[{validate:Cs,errorMessage:"fieldIsRequired",modes:["blur"]}]},Yc=ks(Ds.replace("-","")),Kc={firstName:{formatter:e=>xs(e).replace(Yc,"")},lastName:{formatter:e=>xs(e).replace(Yc,"")}},zc=["firstName","lastName"];function Zc(e){const{i18n:t,commonProps:a}=We(),r=e.requiredFields||["firstName","lastName"],{handleChangeFor:n,data:i,valid:o,errors:s,fieldProblems:d,isValid:l,triggerValidation:c}=ua(Object.assign(Object.assign({},e),{schema:r,rules:Xc,formatters:Kc,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:u}=e,m=ue({setState:null});le((()=>{m.current.setState({type:"addToState",value:{data:i,valid:o,errors:s,fieldProblems:d,caller:"name",dataStoreId:u}})}),[i,o,s,l]),this.triggerValidation=c;const p=ra(e,t);return C("div",Object.assign({className:"adyen-kyc-field-wrapper"},{children:[C(Ys,{stateRef:m}),p.isRequiredField("firstName")&&C(Ue,Object.assign({name:"firstName",label:p.getLabel("firstName"),classNameModifiers:["firstName","col-50"],errorMessage:p.getErrorMessage("firstName",s,d),isValid:o.firstName,showInlineErrors:a.showInlineErrors,helper:t.get("enterNameExactlyAsAppearInID")},{children:Jt("text",{name:"firstName",value:i.firstName,classNameModifiers:["name"],readonly:p.isReadOnly("firstName"),onInput:n("firstName","input"),onBlur:n("firstName","blur"),trimOnBlur:!0,spellCheck:!1,"aria-required":!0,"aria-label":p.getLabel("firstName"),"aria-invalid":!o.firstName,showInlineErrors:a.showInlineErrors})})),p.isRequiredField("lastName")&&C(Ue,Object.assign({name:"lastName",label:p.getLabel("lastName"),classNameModifiers:["lastName","col-50"],errorMessage:p.getErrorMessage("lastName",s,d),isValid:o.lastName,showInlineErrors:a.showInlineErrors,helper:t.get("enterLastNameExactlyAsAppearInID")},{children:Jt("text",{name:"lastName",value:i.lastName,classNameModifiers:["lastName"],readonly:p.isReadOnly("lastName"),onInput:n("lastName","input"),onBlur:n("lastName","blur"),trimOnBlur:!0,spellCheck:!1,"aria-required":!0,"aria-label":p.getLabel("lastName"),"aria-invalid":!o.lastName,showInlineErrors:a.showInlineErrors})}))]}))}const Qc=yt(Zc,((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)));Zc.defaultProps={data:{},onChange:()=>{},visibility:"editable",validationRules:Xc};var Jc={validCheckCharacter:function(e,t){if(!/^[A-Z]$/.test(e))return!1;const a={0:1,9:21,I:19,R:8,1:0,A:1,J:21,S:12,2:5,B:0,K:2,T:14,3:7,C:5,L:4,U:16,4:9,D:7,M:18,V:10,5:13,E:9,N:20,W:22,6:15,F:13,O:11,X:25,7:17,G:15,P:3,Y:24,8:19,H:17,Q:6,Z:23},r={0:0,9:9,I:8,R:17,1:1,A:0,J:9,S:18,2:2,B:1,K:10,T:19,3:3,C:2,L:11,U:20,4:4,D:3,M:12,V:21,5:5,E:4,N:13,W:22,6:6,F:5,O:14,X:23,7:7,G:6,P:15,Y:24,8:8,H:7,Q:16,Z:25};let n=0;for(let e=0;e<15;e+=1){const i=(e%2==1?r:a)[t.substring(e,e+1)];if(null==i)return!0;n=(n+i)%26}return n>=0&&n<=26&&"ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(n)===e}};const eu={US:{idNumber:{maxlength:4}},US9:{idNumber:{maxlength:9}},BR:{idNumber:{formatter:function(e=""){if("string"!=typeof e)return"";const t=function(e){return e.replace(/[^0-9]/g,"").trim()}(e);return t.length>11?function(e){return e.replace(/^(\d{2})(\d{3})(\d{3})?(\d{4})?(\d{1,2})?$/g,((e,t,a,r,n="",i="")=>`${t}.${a}.${r}/${n}${i.length?`-${i}`:""}`))}(t):function(e){return e.replace(/\W/gi,"").replace(/(\d{3})(?!$)/g,"$1.").replace(/(.{11}).(\d{1,2})$/g,"$1-$2")}(t)},maxlength:18}}},tu={US:/^\d{4}$/,US9:/^\d{9}$/,CA:/^\d{9}$/,IT:/^[A-Z]{6}[0-9]{2}[ABCDEHLMPRST][0-9]{2}[A-Z][0-9]{3}[A-Z]$/,ES:/(^[KL]?\d{7,8}[A-Z]$)|(^[MXYZ]\d{7}[A-Z]$)/,BR:/(^\d{3}\.\d{3}\.\d{3}-\d{2}$)|(^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$)/,SE:/^\d{10,12}$/},au={idNumber:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},ru={US:{idNumber:[{validate:e=>tu.US.test(e),modes:["blur"],errorMessage:"useSSNFormatUS"}]},US9:{idNumber:[{validate:e=>tu.US9.test(e),modes:["blur"],errorMessage:"use9DigitsSSNFormatUS"}]},CA:{idNumber:[{validate:e=>tu.CA.test(e),modes:["blur"],errorMessage:"useSSNFormatCA"}]},IT:{idNumber:[{validate:e=>tu.IT.test(e)&&Jc.validCheckCharacter(e.substring(15,16),e.substring(0,15)),modes:["blur"],errorMessage:"invalidFormat"}]},ES:{idNumber:[{validate:e=>tu.ES.test(e),modes:["blur"],errorMessage:"invalidFormat"}]},SE:{idNumber:[{validate:e=>tu.SE.test(e),modes:["blur"],errorMessage:"invalidFormat"}]},BR:{idNumber:[{validate:e=>tu.BR.test(e),modes:["blur"],errorMessage:"invalidFormat"}]}},nu=["idNumber","idNumberExempt"];function iu(e){const{i18n:a,commonProps:r}=We(),[n,i]=se(e.errors),[o,s]=se(Object.assign(Object.assign({},e.data),{idNumberExempt:!!e.data.idNumberExempt})),d=me((()=>function(e,t,a){if(!a||!t[a])return e;const r={};return Object.entries(e).forEach((([e,n])=>{const i=t[a][e];r[e]=i?Object.assign(Object.assign({},n),i):n})),Object.entries(t[a]).forEach((([e,t])=>{r[e]||(r[e]=t)})),r}({},eu,e.country)),[e.country]),l=((e,t)=>{var a;return(null===(a=e[t])||void 0===a?void 0:a.maxlength)||30})(d,"idNumber"),c=me((()=>Ts(au,ru,e.country)),[e.country]),{handleChangeFor:u,data:m,valid:p,errors:g,fieldProblems:y,triggerValidation:b,setValid:f}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields||o.idNumberExempt?["idNumberExempt"]:["idNumber","idNumberExempt"].idNumber,formatters:d,rules:c,defaultData:Object.assign(Object.assign({},e.data),{idNumberExempt:!!e.data.idNumberExempt}),fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:h}=e,v=ra(e,a),_=ue({setState:null});le((()=>{if(e.errors&&e.errors.idNumber){const t=F("idNumber").from(e.errors);i(Object.assign(Object.assign({},n),t)),f("idNumber",!1)}}),[e.errors]),le((()=>{o.idNumber&&u("idNumber","blur")(o.idNumber)}),[e.country]),le((()=>{const t=!(!B(o,m)||!e.errors||!Object.keys(e.errors).length);i(Object.assign(Object.assign(Object.assign({},n),g),t&&n)),t&&f("idNumber",!1),s(Object.assign(Object.assign({},o),m))}),[g,m]),le((()=>{const e=Object.assign({},p);e.idNumber=!!o.idNumberExempt||p.idNumber;const t=Object.assign({},o);t.idNumber=o.idNumberExempt?null:o.idNumber,_.current.setState({type:"addToState",value:{data:t,valid:e,errors:n,fieldProblems:y,caller:"idNum",dataStoreId:h}})}),[o,p,n,y]),this.triggerValidation=b;const N=[v.isRequiredField("idNumberExempt")?"idNumberWithExempt":"idNumber"];return e.classNames&&N.push(...e.classNames),C("div",Object.assign({className:"adyen-kyc-field__id-number"},{children:v.isRequiredField("idNumber")&&C(t.Fragment,{children:[C(Ue,Object.assign({name:"idNumber",label:v.getLabel("idNumber"),classNameModifiers:N,errorMessage:v.getErrorMessage("idNumber",n,y),disabled:o.idNumberExempt,isValid:p.idNumber,showInlineErrors:r.showInlineErrors,dataPlaceholder:o.idNumber&&e.dataPlaceholder},{children:Jt("text",Object.assign(Object.assign({name:"idNumber",value:o.idNumber,placeholder:v.getPlaceholder("idNumber"),readonly:v.isReadOnly("idNumber"),onInput:u("idNumber","input"),onBlur:u("idNumber","blur"),"aria-required":!0,"aria-label":v.getLabel("idNumber","idNumber"),"aria-invalid":!p.idNumber,inputmode:"numeric",maxLength:l},o.idNumberExempt&&{disabled:!0}),{showInlineErrors:r.showInlineErrors}))})),C(Ue,Object.assign({classNameModifiers:["idNumber__checkbox"],name:"idNumberExempt"},{children:v.isRequiredField("idNumberExempt")&&C(at,{label:v.getLabel("idNumberExempt"),checked:o.idNumberExempt,classNameModifiers:["idNumberExempt"],name:"idNumberExempt",onChange:u("idNumberExempt")})})),C(Ys,{owner:"IdNumberComp",stateRef:_})]})}))}const ou=yt(iu,((e,t)=>e.country===t.country&&B(e.errors,t.errors)&&B(e.labels,t.labels)&&B(e.requiredFields,t.requiredFields)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)));iu.defaultProps={data:{},onChange:()=>{}};const su={birthDate:[{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},{modes:["blur"],validate:e=>e&&new Date(e)<new Date,errorMessage:"invalidDateOfBirth"}],residencyCountry:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},jobTitle:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},du="idNumber",lu=(e,t,a)=>i(void 0,void 0,void 0,(function*(){const r={name:{firstName:e.data.firstName,lastName:e.data.lastName},countryCode:t,idNumber:e.data.idNumber};try{const e=yield(n=a.loadingContext,o=a.clientKey,s=r,N({loadingContext:n,errorLevel:"warn",errorMessage:"Id verification is not available",errorHandler:e=>i(void 0,void 0,void 0,(function*(){const t=yield e;return 422===t.status?{status:422,message:t.detail,errorCode:t.errorCode}:500===t.status?{status:500,message:"Service did not respond, do not block verification"}:console.warn(`Unexpected response status ${t.status}`)})),path:"v1/verification/idNumber",clientKey:o},s));if(422===(null==e?void 0:e.status)||"false"===(null==e?void 0:e.verified))return{status:"error",data:e,fieldName:du,translationKey:"unableToVerifyTheIdNumber"};if(500===(null==e?void 0:e.status))return{status:"verified",data:e,fieldName:du};if("true"===(null==e?void 0:e.verified))return{status:"verified",data:e,fieldName:du}}catch(e){console.warn("WARNING: idNumber verification failed - error:",e)}var n,o,s}));const cu={role:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},uu=[{roleTypes:[qd.OWNER,qd.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[qd.OWNER],min:0,max:4},{roleTypes:[qd.CONTROLLING_PERSON],min:0,max:1/0},{roleTypes:[qd.SIGNATORY],min:1,max:1/0}],mu={US:[{roleTypes:[qd.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[qd.OWNER],min:0,max:4},{roleTypes:[qd.SIGNATORY],min:1,max:1/0}],BR:[{roleTypes:[qd.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[qd.OWNER],min:0,max:4},{roleTypes:[qd.SIGNATORY],min:1,max:1/0}],AU:[...uu,{roleTypes:[qd.DIRECTOR],min:3,max:1/0}],CA:[...uu,{roleTypes:[qd.DIRECTOR],min:1,max:1/0}],HK:[...uu,{roleTypes:[qd.DIRECTOR],min:1,max:1/0}],IN:[...uu,{roleTypes:[qd.DIRECTOR],min:3,max:15}],NZ:[...uu,{roleTypes:[qd.DIRECTOR],min:1,max:1/0}],SG:[...uu,{roleTypes:[qd.DIRECTOR],min:1,max:1/0}]},pu=e=>mu[e]||uu;const gu={[qd.OWNER]:"provideAllOwners",[qd.CONTROLLING_PERSON]:"ifNoOwnersSpecifyControllingPersons",[qd.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeastOne",[qd.SIGNATORY]:"provideAtLeastOneSignatory"},yu={US:{[qd.CONTROLLING_PERSON]:"provideOneControllingPerson"},BR:{[qd.CONTROLLING_PERSON]:"provideOneControllingPerson"},AU:{[qd.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeastThree"},IN:{[qd.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeast3AndAtMost15"}},bu=e=>Object.assign(Object.assign({},gu),yu[e]),fu=e=>{if(null==e?void 0:e.entityAssociations){const t=Object.values(qd);return e.entityAssociations.filter((a=>t.includes(a.type)&&a.associatorId===e.id))}return[]},hu=e=>fu(e).filter((e=>e.type===qd.SIGNATORY)),vu=e=>{var t;return null===(t=fu(e))||void 0===t?void 0:t.map((e=>e.legalEntityId))},_u=e=>fu(e).reduce(((e,t)=>{var a;return e[t.type]=(null!==(a=e[t.type])&&void 0!==a?a:0)+1,e}),{}),Nu=(e,t)=>{var a,r;if(t===Rd.TRUST_MEMBER_COMPANY_OWNER)return[qd.OWNER];const n=_u(e),i=null===(r=null===(a=null==e?void 0:e.organization)||void 0===a?void 0:a.registeredAddress)||void 0===r?void 0:r.country,o=pu(i).reduce(((e,t)=>{var a;const{roleTypes:r,max:i}=t;if(1===r.length){const t=r[0];(null!==(a=null==n?void 0:n[t])&&void 0!==a?a:0)<i&&e.push(t)}return e}),[]);return[...new Set(o)]},Ou=e=>{var t,a;const r=_u(e),n=null===(a=null===(t=null==e?void 0:e.organization)||void 0===t?void 0:t.registeredAddress)||void 0===a?void 0:a.country;return pu(n).every((e=>{const{roleTypes:t,min:a}=e;return t.some((e=>{var t;return!a||(null!==(t=null==r?void 0:r[e])&&void 0!==t?t:0>=a)}))}))},Iu={[qd.CONTROLLING_PERSON]:{id:qd.CONTROLLING_PERSON,name:"controllingPerson",description:"controllingPersonDescription",className:"adl-tag--teal"},[qd.OWNER]:{id:qd.OWNER,name:"owner",description:"ownerDescription",className:"adl-tag--purple"},[qd.SIGNATORY]:{id:qd.SIGNATORY,name:"signatory",description:"signatoryDescription",className:"adl-tag--light-blue"},[qd.DIRECTOR]:{id:qd.DIRECTOR,name:"director",description:"directorDescription",className:"adl-tag--orange"}},Eu=["role"];function Tu(e){var a;const{i18n:r,commonProps:n}=We(),{data:i,valid:o,errors:s,isValid:d,fieldProblems:l,triggerValidation:c,handleChangeFor:u}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields||["role"],rules:e.validators||cu,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:m}=e,p=ue({setState:null}),[g,y]=se([]);le((()=>{p.current.setState({type:"addToState",value:{data:i,valid:o,errors:s,fieldProblems:l,caller:"Role",dataStoreId:m}})}),[i,o,s,d]),this.triggerValidation=c;const b=ra(e,r);return le((()=>{y(((e,t)=>Object.values(Iu).filter((e=>0===(null==t?void 0:t.length)||(null==t?void 0:t.includes(e.id)))).map((t=>Object.assign(Object.assign({},t),{name:e.get(t.name),description:e.get(t.description)}))))(r,null==e?void 0:e.allowedRoles))}),[null===(a=null==e?void 0:e.allowedRoles)||void 0===a?void 0:a.toString(),r.languageCode,r.locale]),C("div",Object.assign({className:"adyen-kyc-field__role"},{children:[C(Ys,{stateRef:p}),b.isRequiredField("role",!1)&&C(t.Fragment,{children:C(Ue,Object.assign({name:"role",classNameModifiers:["role"],label:r.get("role"),errorMessage:b.getErrorMessage("role",s,l),isValid:o.role,showInlineErrors:n.showInlineErrors},{children:Jt("select",{onChange:u("role","input"),name:"role",placeholder:r.get("rolePlaceholder"),selected:i.role,items:g,readonly:e.readOnly&&!!i.role,showInlineErrors:n.showInlineErrors,filterable:!1,isMulti:!0})}))})]}))}const Au={phoneNumber:{modes:["blur"],validate:e=>r.phone(e,{validateMobilePrefix:!1}).isValid,errorMessage:"invalidPhoneNumber"}},Su={phoneNumber:{formatter:e=>e.replace(ks("^+|\\d","g"),"")}},Ru=["phoneNumber"];function Cu(e){var t,a,r;const{i18n:n,commonProps:i}=We(),{dataStoreId:o,country:s}=e,d=ue({setState:null}),l=ra(e,n),c=null!==(r=null===(a=null===(t=e.phonePrefixes)||void 0===t?void 0:t.find((e=>e.id===s)))||void 0===a?void 0:a.name)&&void 0!==r?r:"+1",{handleChangeFor:u,data:m,valid:p,errors:g,fieldProblems:y,isValid:b,triggerValidation:f}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields,defaultData:e.data,formatters:Su,rules:e.validators||Au,fieldProblems:null==e?void 0:e.fieldValidationErrors}));return le((()=>{d.current.setState({type:"addToState",value:{data:m,valid:p,errors:g,fieldProblems:y,caller:"phoneInput",dataStoreId:o}})}),[m,p,g,b]),this.triggerValidation=f,C("div",Object.assign({className:"adyen-kyc-phone-input"},{children:[C(Ys,{stateRef:d}),l.isRequiredField("phoneNumber")&&C(Ue,Object.assign({name:"phoneNumber",label:l.getLabel("phoneNumber"),classNameModifiers:["phone-input"],isValid:p.phoneNumber,errorMessage:l.getErrorMessage("phoneNumber",g,y),showInlineErrors:i.showInlineErrors},{children:Jt("tel",{name:"phoneNumber",value:m.phoneNumber,placeholder:c,readonly:l.isReadOnly("phoneNumber"),onInput:u("phoneNumber","input"),onBlur:u("phoneNumber","blur"),"aria-required":!0,"aria-label":l.getLabel("phoneNumber"),"aria-invalid":!p.phoneNumber,showInlineErrors:i.showInlineErrors})}))]}))}Cu.defaultProps={phoneLabel:"telephoneNumber"};const Du=yt(Cu,((e,t)=>e.country===t.country&&e.phonePrefixes==t.phonePrefixes)),ku={email:{modes:["blur"],validate:e=>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),errorMessage:"invalidEmail"}},Lu=[...Ru,"email"];function wu(e){const{i18n:t,commonProps:a}=We(),r=ue(null),{dataStoreId:n,country:i}=e,o=e.requiredFields||Lu,{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:o,defaultData:e.data,rules:e.validators||ku,fieldProblems:null==e?void 0:e.fieldValidationErrors})),y=ra(e,t),b=ue({setState:null});le((()=>{b.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:g,caller:"contactDetails",dataStoreId:n}})}),[d,l,c,u]);const{dataset:f}=ea(m),h=Dd(e,Ru);return this.triggerValidation=()=>{p(),r.current.triggerValidation()},C("div",Object.assign({role:"form",className:"adyen-kyc-individual__contact-details"},{children:[C(Ys,{owner:"ContactDetails",stateRef:b}),C(Ms,{heading:e.heading}),y.isRequiredField("email")&&C("div",Object.assign({className:"adyen-kyc-email"},{children:C(Ue,Object.assign({name:"email",label:y.getLabel("email"),classNameModifiers:["email"],errorMessage:y.getErrorMessage("email",c,g),isValid:l.email,showInlineErrors:a.showInlineErrors},{children:Jt("email",{name:"email",value:d.email,readonly:y.isReadOnly("email"),classNameModifiers:["email"],onInput:s("email","input"),onBlur:s("email","blur"),"aria-required":!0,"aria-label":y.getLabel("email"),"aria-invalid":!l.email,showInlineErrors:a.showInlineErrors})}))})),y.isRequiredField("phoneNumber")&&C(Du,Object.assign({},h,{ref:r,showInlineErrors:a.showInlineErrors,dataStoreId:n,country:i,phonePrefixes:f}))]}))}const Pu=yt(wu,((e,t)=>e.country===t.country&&B(e.labels,t.labels)&&B(e.requiredFields,t.requiredFields)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)));wu.defaultProps={data:{}};var ju={"adl-u-screen-reader-only":"LoaderWrapper-module_adl-u-screen-reader-only__DQoId","adl-u-screen-reader-only-focusable":"LoaderWrapper-module_adl-u-screen-reader-only-focusable__OWQql","adl-u-text-align-center":"LoaderWrapper-module_adl-u-text-align-center__Fv6Ch","adl-u-text-align-left":"LoaderWrapper-module_adl-u-text-align-left__Xjhn1","adl-u-text-align-right":"LoaderWrapper-module_adl-u-text-align-right__GeJtt","adl-u-text-align-justify":"LoaderWrapper-module_adl-u-text-align-justify__-XTV-","adl-u-vertical-align-baseline":"LoaderWrapper-module_adl-u-vertical-align-baseline__KTZlu","adl-u-vertical-align-top":"LoaderWrapper-module_adl-u-vertical-align-top__A3yt3","adl-u-vertical-align-middle":"LoaderWrapper-module_adl-u-vertical-align-middle__QRNN8","adl-u-vertical-align-bottom":"LoaderWrapper-module_adl-u-vertical-align-bottom__Qi7G6","adl-u-vertical-align-text-top":"LoaderWrapper-module_adl-u-vertical-align-text-top__ss2jj","adl-u-vertical-align-text-bottom":"LoaderWrapper-module_adl-u-vertical-align-text-bottom__S7o5N","adl-u-float-left":"LoaderWrapper-module_adl-u-float-left__38-jH","adl-u-float-right":"LoaderWrapper-module_adl-u-float-right__PMpVS","adl-u-border-none":"LoaderWrapper-module_adl-u-border-none__nPmt-","adl-u-border-bottom-none":"LoaderWrapper-module_adl-u-border-bottom-none__LYeO1","adl-u-border-left-none":"LoaderWrapper-module_adl-u-border-left-none__Tu-nP","adl-u-border-right-none":"LoaderWrapper-module_adl-u-border-right-none__JJ7aQ","adl-u-border-top-none":"LoaderWrapper-module_adl-u-border-top-none__Q2SD8","adl-u-border-x-none":"LoaderWrapper-module_adl-u-border-x-none__o5pHH","adl-u-border-y-none":"LoaderWrapper-module_adl-u-border-y-none__4DM3l","adl-u-border-radius-4":"LoaderWrapper-module_adl-u-border-radius-4__HzmsL","adl-u-border-radius-6":"LoaderWrapper-module_adl-u-border-radius-6__24Y5b","adl-u-border-radius-8":"LoaderWrapper-module_adl-u-border-radius-8__rVBWa","adl-u-border-radius-12":"LoaderWrapper-module_adl-u-border-radius-12__AdNdi","adl-u-color-white":"LoaderWrapper-module_adl-u-color-white__cNLJe","adl-u-color-black":"LoaderWrapper-module_adl-u-color-black__7TChY","adl-u-color-grey-10":"LoaderWrapper-module_adl-u-color-grey-10__15TdJ","adl-u-color-grey-20":"LoaderWrapper-module_adl-u-color-grey-20__z4cS2","adl-u-color-grey-30":"LoaderWrapper-module_adl-u-color-grey-30__-6nob","adl-u-color-grey-40":"LoaderWrapper-module_adl-u-color-grey-40__Xnj9-","adl-u-color-grey-50":"LoaderWrapper-module_adl-u-color-grey-50__PNpJV","adl-u-color-grey-60":"LoaderWrapper-module_adl-u-color-grey-60__UrNCf","adl-u-color-grey-70":"LoaderWrapper-module_adl-u-color-grey-70__uziyz","adl-u-color-info-10":"LoaderWrapper-module_adl-u-color-info-10__N43Gu","adl-u-color-info-20":"LoaderWrapper-module_adl-u-color-info-20__zpreA","adl-u-color-info-30":"LoaderWrapper-module_adl-u-color-info-30__NP7MT","adl-u-color-info-40":"LoaderWrapper-module_adl-u-color-info-40__6lvzm","adl-u-color-info-50":"LoaderWrapper-module_adl-u-color-info-50__BFzTv","adl-u-color-info-60":"LoaderWrapper-module_adl-u-color-info-60__tE1pM","adl-u-color-info-70":"LoaderWrapper-module_adl-u-color-info-70__dwsFG","adl-u-color-warning-10":"LoaderWrapper-module_adl-u-color-warning-10__JkQtP","adl-u-color-warning-20":"LoaderWrapper-module_adl-u-color-warning-20__4Ezb-","adl-u-color-warning-30":"LoaderWrapper-module_adl-u-color-warning-30__uViH0","adl-u-color-warning-40":"LoaderWrapper-module_adl-u-color-warning-40__GMfPZ","adl-u-color-warning-50":"LoaderWrapper-module_adl-u-color-warning-50__ozrs8","adl-u-color-warning-60":"LoaderWrapper-module_adl-u-color-warning-60__arejd","adl-u-color-warning-70":"LoaderWrapper-module_adl-u-color-warning-70__OC1kC","adl-u-color-success-10":"LoaderWrapper-module_adl-u-color-success-10__sDjeQ","adl-u-color-success-20":"LoaderWrapper-module_adl-u-color-success-20__pAhsC","adl-u-color-success-30":"LoaderWrapper-module_adl-u-color-success-30__8lceW","adl-u-color-success-40":"LoaderWrapper-module_adl-u-color-success-40__-OVhR","adl-u-color-success-50":"LoaderWrapper-module_adl-u-color-success-50__w9iGp","adl-u-color-success-60":"LoaderWrapper-module_adl-u-color-success-60__TycSy","adl-u-color-success-70":"LoaderWrapper-module_adl-u-color-success-70__D-MTJ","adl-u-color-error-10":"LoaderWrapper-module_adl-u-color-error-10__ZAdis","adl-u-color-error-20":"LoaderWrapper-module_adl-u-color-error-20__a-5Z-","adl-u-color-error-30":"LoaderWrapper-module_adl-u-color-error-30__Wl5Tz","adl-u-color-error-40":"LoaderWrapper-module_adl-u-color-error-40__Rs-dp","adl-u-color-error-50":"LoaderWrapper-module_adl-u-color-error-50__aqx4o","adl-u-color-error-60":"LoaderWrapper-module_adl-u-color-error-60__s-cif","adl-u-color-error-70":"LoaderWrapper-module_adl-u-color-error-70__mtXLl","adl-u-color-mint-10":"LoaderWrapper-module_adl-u-color-mint-10__PyCeD","adl-u-color-mint-20":"LoaderWrapper-module_adl-u-color-mint-20__BVsuB","adl-u-color-mint-30":"LoaderWrapper-module_adl-u-color-mint-30__rFs6a","adl-u-color-mint-40":"LoaderWrapper-module_adl-u-color-mint-40__NLecv","adl-u-color-mint-50":"LoaderWrapper-module_adl-u-color-mint-50__KcoB4","adl-u-color-mint-60":"LoaderWrapper-module_adl-u-color-mint-60__mr5uU","adl-u-color-mint-70":"LoaderWrapper-module_adl-u-color-mint-70__ag2je","adl-u-color-brand":"LoaderWrapper-module_adl-u-color-brand__rRrDv","adl-u-color-default":"LoaderWrapper-module_adl-u-color-default__YfVqx","adl-u-color-disabled":"LoaderWrapper-module_adl-u-color-disabled__7bzQH","adl-u-color-quiet":"LoaderWrapper-module_adl-u-color-quiet__XPiq1","adl-u-color-inherit":"LoaderWrapper-module_adl-u-color-inherit__wR51M","adl-u-background-color-white":"LoaderWrapper-module_adl-u-background-color-white__fSJZ5","adl-u-background-color-black":"LoaderWrapper-module_adl-u-background-color-black__ChDOa","adl-u-background-color-grey-10":"LoaderWrapper-module_adl-u-background-color-grey-10__oPGfO","adl-u-background-color-grey-20":"LoaderWrapper-module_adl-u-background-color-grey-20__Ejfz-","adl-u-background-color-grey-30":"LoaderWrapper-module_adl-u-background-color-grey-30__hHjTO","adl-u-background-color-grey-40":"LoaderWrapper-module_adl-u-background-color-grey-40__SqH04","adl-u-background-color-grey-50":"LoaderWrapper-module_adl-u-background-color-grey-50__tUUPG","adl-u-background-color-grey-60":"LoaderWrapper-module_adl-u-background-color-grey-60__6i9MM","adl-u-background-color-grey-70":"LoaderWrapper-module_adl-u-background-color-grey-70__yqto5","adl-u-background-color-info-10":"LoaderWrapper-module_adl-u-background-color-info-10__Fol0t","adl-u-background-color-info-20":"LoaderWrapper-module_adl-u-background-color-info-20__-EOoN","adl-u-background-color-info-30":"LoaderWrapper-module_adl-u-background-color-info-30__yE1pC","adl-u-background-color-info-40":"LoaderWrapper-module_adl-u-background-color-info-40__tdB5Q","adl-u-background-color-info-50":"LoaderWrapper-module_adl-u-background-color-info-50__B3rBR","adl-u-background-color-info-60":"LoaderWrapper-module_adl-u-background-color-info-60__tNiM1","adl-u-background-color-info-70":"LoaderWrapper-module_adl-u-background-color-info-70__D6w2L","adl-u-background-color-warning-10":"LoaderWrapper-module_adl-u-background-color-warning-10__r1C9L","adl-u-background-color-warning-20":"LoaderWrapper-module_adl-u-background-color-warning-20__nxgBf","adl-u-background-color-warning-30":"LoaderWrapper-module_adl-u-background-color-warning-30__e7cgV","adl-u-background-color-warning-40":"LoaderWrapper-module_adl-u-background-color-warning-40__gFU3n","adl-u-background-color-warning-50":"LoaderWrapper-module_adl-u-background-color-warning-50__kdnCI","adl-u-background-color-warning-60":"LoaderWrapper-module_adl-u-background-color-warning-60__N1FBx","adl-u-background-color-warning-70":"LoaderWrapper-module_adl-u-background-color-warning-70__tseV-","adl-u-background-color-success-10":"LoaderWrapper-module_adl-u-background-color-success-10__nUC4T","adl-u-background-color-success-20":"LoaderWrapper-module_adl-u-background-color-success-20__8KaLI","adl-u-background-color-success-30":"LoaderWrapper-module_adl-u-background-color-success-30__G3UnZ","adl-u-background-color-success-40":"LoaderWrapper-module_adl-u-background-color-success-40__yRUO-","adl-u-background-color-success-50":"LoaderWrapper-module_adl-u-background-color-success-50__rrdfi","adl-u-background-color-success-60":"LoaderWrapper-module_adl-u-background-color-success-60__wK7hE","adl-u-background-color-success-70":"LoaderWrapper-module_adl-u-background-color-success-70__hMaj-","adl-u-background-color-error-10":"LoaderWrapper-module_adl-u-background-color-error-10__Q6Rw6","adl-u-background-color-error-20":"LoaderWrapper-module_adl-u-background-color-error-20__H7Mk8","adl-u-background-color-error-30":"LoaderWrapper-module_adl-u-background-color-error-30__GseU6","adl-u-background-color-error-40":"LoaderWrapper-module_adl-u-background-color-error-40__F-0vo","adl-u-background-color-error-50":"LoaderWrapper-module_adl-u-background-color-error-50__2C5nG","adl-u-background-color-error-60":"LoaderWrapper-module_adl-u-background-color-error-60__cWt-3","adl-u-background-color-error-70":"LoaderWrapper-module_adl-u-background-color-error-70__UliQ9","adl-u-background-color-mint-10":"LoaderWrapper-module_adl-u-background-color-mint-10__B5yYA","adl-u-background-color-mint-20":"LoaderWrapper-module_adl-u-background-color-mint-20__udcWT","adl-u-background-color-mint-30":"LoaderWrapper-module_adl-u-background-color-mint-30__Pvdfd","adl-u-background-color-mint-40":"LoaderWrapper-module_adl-u-background-color-mint-40__YSfUE","adl-u-background-color-mint-50":"LoaderWrapper-module_adl-u-background-color-mint-50__II2ur","adl-u-background-color-mint-60":"LoaderWrapper-module_adl-u-background-color-mint-60__JdCfY","adl-u-background-color-mint-70":"LoaderWrapper-module_adl-u-background-color-mint-70__XOOr7","adl-u-background-color-brand":"LoaderWrapper-module_adl-u-background-color-brand__StC5S","adl-u-background-color-default":"LoaderWrapper-module_adl-u-background-color-default__QqksR","adl-u-background-color-disabled":"LoaderWrapper-module_adl-u-background-color-disabled__F51GC","adl-u-background-color-quiet":"LoaderWrapper-module_adl-u-background-color-quiet__T-6X6","adl-u-background-color-inherit":"LoaderWrapper-module_adl-u-background-color-inherit__8L6-A","adl-u-overflow-auto":"LoaderWrapper-module_adl-u-overflow-auto__RLoFT","adl-u-overflow-hidden":"LoaderWrapper-module_adl-u-overflow-hidden__OdlT5","adl-u-overflow-scroll":"LoaderWrapper-module_adl-u-overflow-scroll__fF-sR","adl-u-overflow-visible":"LoaderWrapper-module_adl-u-overflow-visible__AD6V1","adl-u-overflow-x-auto":"LoaderWrapper-module_adl-u-overflow-x-auto__kVp7e","adl-u-overflow-x-hidden":"LoaderWrapper-module_adl-u-overflow-x-hidden__6HBtz","adl-u-overflow-x-scroll":"LoaderWrapper-module_adl-u-overflow-x-scroll__1O2-5","adl-u-overflow-x-visible":"LoaderWrapper-module_adl-u-overflow-x-visible__cNwIF","adl-u-overflow-y-auto":"LoaderWrapper-module_adl-u-overflow-y-auto__EHpmv","adl-u-overflow-y-hidden":"LoaderWrapper-module_adl-u-overflow-y-hidden__N84EW","adl-u-overflow-y-scroll":"LoaderWrapper-module_adl-u-overflow-y-scroll__M-nRc","adl-u-overflow-y-visible":"LoaderWrapper-module_adl-u-overflow-y-visible__s7JYN","adl-u-position-static":"LoaderWrapper-module_adl-u-position-static__9uW2P","adl-u-position-relative":"LoaderWrapper-module_adl-u-position-relative__20QN5","adl-u-position-absolute":"LoaderWrapper-module_adl-u-position-absolute__5JTK4","adl-u-position-sticky":"LoaderWrapper-module_adl-u-position-sticky__-v5nH","adl-u-position-fixed":"LoaderWrapper-module_adl-u-position-fixed__pybl1","adl-u-bottom-0":"LoaderWrapper-module_adl-u-bottom-0__63q6H","adl-u-left-0":"LoaderWrapper-module_adl-u-left-0__REQp7","adl-u-right-0":"LoaderWrapper-module_adl-u-right-0__LZOKr","adl-u-top-0":"LoaderWrapper-module_adl-u-top-0__LWq7N","adl-u-padding-2":"LoaderWrapper-module_adl-u-padding-2__3aY1d","adl-u-padding-bottom-2":"LoaderWrapper-module_adl-u-padding-bottom-2__wnJkv","adl-u-padding-left-2":"LoaderWrapper-module_adl-u-padding-left-2__x77IQ","adl-u-padding-right-2":"LoaderWrapper-module_adl-u-padding-right-2__v2l5C","adl-u-padding-top-2":"LoaderWrapper-module_adl-u-padding-top-2__29G-e","adl-u-padding-x-2":"LoaderWrapper-module_adl-u-padding-x-2__IEaLB","adl-u-padding-y-2":"LoaderWrapper-module_adl-u-padding-y-2__r-5Ne","adl-u-padding-4":"LoaderWrapper-module_adl-u-padding-4__Qf7Qu","adl-u-padding-bottom-4":"LoaderWrapper-module_adl-u-padding-bottom-4__W8RCl","adl-u-padding-left-4":"LoaderWrapper-module_adl-u-padding-left-4__EvyNL","adl-u-padding-right-4":"LoaderWrapper-module_adl-u-padding-right-4__dtmEh","adl-u-padding-top-4":"LoaderWrapper-module_adl-u-padding-top-4__e-ilN","adl-u-padding-x-4":"LoaderWrapper-module_adl-u-padding-x-4__4-z31","adl-u-padding-y-4":"LoaderWrapper-module_adl-u-padding-y-4__GGdPs","adl-u-padding-8":"LoaderWrapper-module_adl-u-padding-8__2NE20","adl-u-padding-bottom-8":"LoaderWrapper-module_adl-u-padding-bottom-8__yOXFD","adl-u-padding-left-8":"LoaderWrapper-module_adl-u-padding-left-8__cQfHL","adl-u-padding-right-8":"LoaderWrapper-module_adl-u-padding-right-8__UFca4","adl-u-padding-top-8":"LoaderWrapper-module_adl-u-padding-top-8__rDdlL","adl-u-padding-x-8":"LoaderWrapper-module_adl-u-padding-x-8__-tsFE","adl-u-padding-y-8":"LoaderWrapper-module_adl-u-padding-y-8__p67T8","adl-u-padding-16":"LoaderWrapper-module_adl-u-padding-16__wyIs0","adl-u-padding-bottom-16":"LoaderWrapper-module_adl-u-padding-bottom-16__ZbBMG","adl-u-padding-left-16":"LoaderWrapper-module_adl-u-padding-left-16__IZcWh","adl-u-padding-right-16":"LoaderWrapper-module_adl-u-padding-right-16__XX-Gm","adl-u-padding-top-16":"LoaderWrapper-module_adl-u-padding-top-16__YLoya","adl-u-padding-x-16":"LoaderWrapper-module_adl-u-padding-x-16__Nk9XH","adl-u-padding-y-16":"LoaderWrapper-module_adl-u-padding-y-16__4bS6b","adl-u-padding-24":"LoaderWrapper-module_adl-u-padding-24__T15uX","adl-u-padding-bottom-24":"LoaderWrapper-module_adl-u-padding-bottom-24__yZeVF","adl-u-padding-left-24":"LoaderWrapper-module_adl-u-padding-left-24__H4Mpo","adl-u-padding-right-24":"LoaderWrapper-module_adl-u-padding-right-24__Np7cC","adl-u-padding-top-24":"LoaderWrapper-module_adl-u-padding-top-24__-u4-u","adl-u-padding-x-24":"LoaderWrapper-module_adl-u-padding-x-24__d1Zyw","adl-u-padding-y-24":"LoaderWrapper-module_adl-u-padding-y-24__elC6h","adl-u-padding-32":"LoaderWrapper-module_adl-u-padding-32__1-66b","adl-u-padding-bottom-32":"LoaderWrapper-module_adl-u-padding-bottom-32__MGMqu","adl-u-padding-left-32":"LoaderWrapper-module_adl-u-padding-left-32__OjLzD","adl-u-padding-right-32":"LoaderWrapper-module_adl-u-padding-right-32__9gVTd","adl-u-padding-top-32":"LoaderWrapper-module_adl-u-padding-top-32__T7AgW","adl-u-padding-x-32":"LoaderWrapper-module_adl-u-padding-x-32__zINSY","adl-u-padding-y-32":"LoaderWrapper-module_adl-u-padding-y-32__1cAah","adl-u-padding-40":"LoaderWrapper-module_adl-u-padding-40__LBJpX","adl-u-padding-bottom-40":"LoaderWrapper-module_adl-u-padding-bottom-40__hzO-i","adl-u-padding-left-40":"LoaderWrapper-module_adl-u-padding-left-40__PteLs","adl-u-padding-right-40":"LoaderWrapper-module_adl-u-padding-right-40__KnF5h","adl-u-padding-top-40":"LoaderWrapper-module_adl-u-padding-top-40__oKHiH","adl-u-padding-x-40":"LoaderWrapper-module_adl-u-padding-x-40__kI6vI","adl-u-padding-y-40":"LoaderWrapper-module_adl-u-padding-y-40__RuSag","adl-u-padding-48":"LoaderWrapper-module_adl-u-padding-48__nab9e","adl-u-padding-bottom-48":"LoaderWrapper-module_adl-u-padding-bottom-48__D5-Ld","adl-u-padding-left-48":"LoaderWrapper-module_adl-u-padding-left-48__wkbHt","adl-u-padding-right-48":"LoaderWrapper-module_adl-u-padding-right-48__VWbRj","adl-u-padding-top-48":"LoaderWrapper-module_adl-u-padding-top-48__jFGoL","adl-u-padding-x-48":"LoaderWrapper-module_adl-u-padding-x-48__iLxON","adl-u-padding-y-48":"LoaderWrapper-module_adl-u-padding-y-48__xjJU8","adl-u-padding-56":"LoaderWrapper-module_adl-u-padding-56__k-Yhw","adl-u-padding-bottom-56":"LoaderWrapper-module_adl-u-padding-bottom-56__-PulO","adl-u-padding-left-56":"LoaderWrapper-module_adl-u-padding-left-56__aS5Yj","adl-u-padding-right-56":"LoaderWrapper-module_adl-u-padding-right-56__8hOKA","adl-u-padding-top-56":"LoaderWrapper-module_adl-u-padding-top-56__Y0eqm","adl-u-padding-x-56":"LoaderWrapper-module_adl-u-padding-x-56__GUbnb","adl-u-padding-y-56":"LoaderWrapper-module_adl-u-padding-y-56__KOOlW","adl-u-padding-64":"LoaderWrapper-module_adl-u-padding-64__huzIF","adl-u-padding-bottom-64":"LoaderWrapper-module_adl-u-padding-bottom-64__NJ3rS","adl-u-padding-left-64":"LoaderWrapper-module_adl-u-padding-left-64__HpfaZ","adl-u-padding-right-64":"LoaderWrapper-module_adl-u-padding-right-64__PVDK8","adl-u-padding-top-64":"LoaderWrapper-module_adl-u-padding-top-64__nhkYM","adl-u-padding-x-64":"LoaderWrapper-module_adl-u-padding-x-64__XHvji","adl-u-padding-y-64":"LoaderWrapper-module_adl-u-padding-y-64__PMwnL","adl-u-padding-72":"LoaderWrapper-module_adl-u-padding-72__EL37y","adl-u-padding-bottom-72":"LoaderWrapper-module_adl-u-padding-bottom-72__y0RBf","adl-u-padding-left-72":"LoaderWrapper-module_adl-u-padding-left-72__aKMlI","adl-u-padding-right-72":"LoaderWrapper-module_adl-u-padding-right-72__IKPYC","adl-u-padding-top-72":"LoaderWrapper-module_adl-u-padding-top-72__0eQl-","adl-u-padding-x-72":"LoaderWrapper-module_adl-u-padding-x-72__fnzOF","adl-u-padding-y-72":"LoaderWrapper-module_adl-u-padding-y-72__ZK5GM","adl-u-padding-80":"LoaderWrapper-module_adl-u-padding-80__OjC1L","adl-u-padding-bottom-80":"LoaderWrapper-module_adl-u-padding-bottom-80__mTI5S","adl-u-padding-left-80":"LoaderWrapper-module_adl-u-padding-left-80__zUnH3","adl-u-padding-right-80":"LoaderWrapper-module_adl-u-padding-right-80__FGUjE","adl-u-padding-top-80":"LoaderWrapper-module_adl-u-padding-top-80__WaNty","adl-u-padding-x-80":"LoaderWrapper-module_adl-u-padding-x-80__W5EC1","adl-u-padding-y-80":"LoaderWrapper-module_adl-u-padding-y-80__Q0CtV","adl-u-padding-88":"LoaderWrapper-module_adl-u-padding-88__3hIxN","adl-u-padding-bottom-88":"LoaderWrapper-module_adl-u-padding-bottom-88__-ySZu","adl-u-padding-left-88":"LoaderWrapper-module_adl-u-padding-left-88__Do-TE","adl-u-padding-right-88":"LoaderWrapper-module_adl-u-padding-right-88__ZszmB","adl-u-padding-top-88":"LoaderWrapper-module_adl-u-padding-top-88__PdiWT","adl-u-padding-x-88":"LoaderWrapper-module_adl-u-padding-x-88__aqiOm","adl-u-padding-y-88":"LoaderWrapper-module_adl-u-padding-y-88__opkT-","adl-u-padding-96":"LoaderWrapper-module_adl-u-padding-96__nUVGm","adl-u-padding-bottom-96":"LoaderWrapper-module_adl-u-padding-bottom-96__Q-Xxd","adl-u-padding-left-96":"LoaderWrapper-module_adl-u-padding-left-96__wti4M","adl-u-padding-right-96":"LoaderWrapper-module_adl-u-padding-right-96__Yq6N2","adl-u-padding-top-96":"LoaderWrapper-module_adl-u-padding-top-96__7wq4Z","adl-u-padding-x-96":"LoaderWrapper-module_adl-u-padding-x-96__ILllz","adl-u-padding-y-96":"LoaderWrapper-module_adl-u-padding-y-96__ShVbW","adl-u-padding-0":"LoaderWrapper-module_adl-u-padding-0__vL2ZJ","adl-u-padding-bottom-0":"LoaderWrapper-module_adl-u-padding-bottom-0__Sa8LS","adl-u-padding-left-0":"LoaderWrapper-module_adl-u-padding-left-0__ge--J","adl-u-padding-right-0":"LoaderWrapper-module_adl-u-padding-right-0__o8Uj0","adl-u-padding-top-0":"LoaderWrapper-module_adl-u-padding-top-0__V2OJQ","adl-u-padding-x-0":"LoaderWrapper-module_adl-u-padding-x-0__0a7Lo","adl-u-padding-y-0":"LoaderWrapper-module_adl-u-padding-y-0__osF0a","adl-u-padding-auto":"LoaderWrapper-module_adl-u-padding-auto__14VRO","adl-u-padding-bottom-auto":"LoaderWrapper-module_adl-u-padding-bottom-auto__xS8SM","adl-u-padding-left-auto":"LoaderWrapper-module_adl-u-padding-left-auto__vd-WD","adl-u-padding-right-auto":"LoaderWrapper-module_adl-u-padding-right-auto__1I3uM","adl-u-padding-top-auto":"LoaderWrapper-module_adl-u-padding-top-auto__ne0Nq","adl-u-padding-x-auto":"LoaderWrapper-module_adl-u-padding-x-auto__qDa4k","adl-u-padding-y-auto":"LoaderWrapper-module_adl-u-padding-y-auto__H5mWT","adl-u-margin-2":"LoaderWrapper-module_adl-u-margin-2__Qo8iE","adl-u-margin-bottom-2":"LoaderWrapper-module_adl-u-margin-bottom-2__6ohtb","adl-u-margin-left-2":"LoaderWrapper-module_adl-u-margin-left-2__s1JT2","adl-u-margin-right-2":"LoaderWrapper-module_adl-u-margin-right-2__-Mddd","adl-u-margin-top-2":"LoaderWrapper-module_adl-u-margin-top-2__sjp3N","adl-u-margin-x-2":"LoaderWrapper-module_adl-u-margin-x-2__SKHn6","adl-u-margin-y-2":"LoaderWrapper-module_adl-u-margin-y-2__s7BlI","adl-u-margin-4":"LoaderWrapper-module_adl-u-margin-4__ho9oo","adl-u-margin-bottom-4":"LoaderWrapper-module_adl-u-margin-bottom-4__dM-wd","adl-u-margin-left-4":"LoaderWrapper-module_adl-u-margin-left-4__uoq6Q","adl-u-margin-right-4":"LoaderWrapper-module_adl-u-margin-right-4__O-W4Y","adl-u-margin-top-4":"LoaderWrapper-module_adl-u-margin-top-4__j5hGD","adl-u-margin-x-4":"LoaderWrapper-module_adl-u-margin-x-4__M2Q6h","adl-u-margin-y-4":"LoaderWrapper-module_adl-u-margin-y-4__n3QcP","adl-u-margin-8":"LoaderWrapper-module_adl-u-margin-8__DHdMk","adl-u-margin-bottom-8":"LoaderWrapper-module_adl-u-margin-bottom-8__UFh6P","adl-u-margin-left-8":"LoaderWrapper-module_adl-u-margin-left-8__qrUDK","adl-u-margin-right-8":"LoaderWrapper-module_adl-u-margin-right-8__wWTZH","adl-u-margin-top-8":"LoaderWrapper-module_adl-u-margin-top-8__c0W0j","adl-u-margin-x-8":"LoaderWrapper-module_adl-u-margin-x-8__St8Ig","adl-u-margin-y-8":"LoaderWrapper-module_adl-u-margin-y-8__-V1Mg","adl-u-margin-16":"LoaderWrapper-module_adl-u-margin-16__y0p53","adl-u-margin-bottom-16":"LoaderWrapper-module_adl-u-margin-bottom-16__jGvbm","adl-u-margin-left-16":"LoaderWrapper-module_adl-u-margin-left-16__Upttw","adl-u-margin-right-16":"LoaderWrapper-module_adl-u-margin-right-16__W5-y8","adl-u-margin-top-16":"LoaderWrapper-module_adl-u-margin-top-16__gbfPj","adl-u-margin-x-16":"LoaderWrapper-module_adl-u-margin-x-16__R2UbC","adl-u-margin-y-16":"LoaderWrapper-module_adl-u-margin-y-16__gdLMJ","adl-u-margin-24":"LoaderWrapper-module_adl-u-margin-24__Bgj7-","adl-u-margin-bottom-24":"LoaderWrapper-module_adl-u-margin-bottom-24__FlN7g","adl-u-margin-left-24":"LoaderWrapper-module_adl-u-margin-left-24__l7cEY","adl-u-margin-right-24":"LoaderWrapper-module_adl-u-margin-right-24__7iU7q","adl-u-margin-top-24":"LoaderWrapper-module_adl-u-margin-top-24__5ExVh","adl-u-margin-x-24":"LoaderWrapper-module_adl-u-margin-x-24__CN9Uy","adl-u-margin-y-24":"LoaderWrapper-module_adl-u-margin-y-24__ayYCk","adl-u-margin-32":"LoaderWrapper-module_adl-u-margin-32__gttLq","adl-u-margin-bottom-32":"LoaderWrapper-module_adl-u-margin-bottom-32__TUE6-","adl-u-margin-left-32":"LoaderWrapper-module_adl-u-margin-left-32__N8ZoX","adl-u-margin-right-32":"LoaderWrapper-module_adl-u-margin-right-32__NCSZc","adl-u-margin-top-32":"LoaderWrapper-module_adl-u-margin-top-32__kvsHF","adl-u-margin-x-32":"LoaderWrapper-module_adl-u-margin-x-32__aHnwi","adl-u-margin-y-32":"LoaderWrapper-module_adl-u-margin-y-32__qs3Ih","adl-u-margin-40":"LoaderWrapper-module_adl-u-margin-40__KwyR4","adl-u-margin-bottom-40":"LoaderWrapper-module_adl-u-margin-bottom-40__irTpE","adl-u-margin-left-40":"LoaderWrapper-module_adl-u-margin-left-40__1MP-L","adl-u-margin-right-40":"LoaderWrapper-module_adl-u-margin-right-40__JCYNS","adl-u-margin-top-40":"LoaderWrapper-module_adl-u-margin-top-40__duOrg","adl-u-margin-x-40":"LoaderWrapper-module_adl-u-margin-x-40__8fLVI","adl-u-margin-y-40":"LoaderWrapper-module_adl-u-margin-y-40__oG9xg","adl-u-margin-48":"LoaderWrapper-module_adl-u-margin-48__Ic2Ku","adl-u-margin-bottom-48":"LoaderWrapper-module_adl-u-margin-bottom-48__h0tQC","adl-u-margin-left-48":"LoaderWrapper-module_adl-u-margin-left-48__7kxb-","adl-u-margin-right-48":"LoaderWrapper-module_adl-u-margin-right-48__Qlse8","adl-u-margin-top-48":"LoaderWrapper-module_adl-u-margin-top-48__dTvr2","adl-u-margin-x-48":"LoaderWrapper-module_adl-u-margin-x-48__mGF5m","adl-u-margin-y-48":"LoaderWrapper-module_adl-u-margin-y-48__Bccx9","adl-u-margin-56":"LoaderWrapper-module_adl-u-margin-56__LbQyi","adl-u-margin-bottom-56":"LoaderWrapper-module_adl-u-margin-bottom-56__l8yXF","adl-u-margin-left-56":"LoaderWrapper-module_adl-u-margin-left-56__ouRt1","adl-u-margin-right-56":"LoaderWrapper-module_adl-u-margin-right-56__VvR8H","adl-u-margin-top-56":"LoaderWrapper-module_adl-u-margin-top-56__osJoZ","adl-u-margin-x-56":"LoaderWrapper-module_adl-u-margin-x-56__KS1N2","adl-u-margin-y-56":"LoaderWrapper-module_adl-u-margin-y-56__pOIvQ","adl-u-margin-64":"LoaderWrapper-module_adl-u-margin-64__qrQ-3","adl-u-margin-bottom-64":"LoaderWrapper-module_adl-u-margin-bottom-64__iShlf","adl-u-margin-left-64":"LoaderWrapper-module_adl-u-margin-left-64__Rb3bk","adl-u-margin-right-64":"LoaderWrapper-module_adl-u-margin-right-64__5e905","adl-u-margin-top-64":"LoaderWrapper-module_adl-u-margin-top-64__DMFhE","adl-u-margin-x-64":"LoaderWrapper-module_adl-u-margin-x-64__88Dp3","adl-u-margin-y-64":"LoaderWrapper-module_adl-u-margin-y-64__YrjWu","adl-u-margin-72":"LoaderWrapper-module_adl-u-margin-72__p2Nth","adl-u-margin-bottom-72":"LoaderWrapper-module_adl-u-margin-bottom-72__bQ1rJ","adl-u-margin-left-72":"LoaderWrapper-module_adl-u-margin-left-72__2ZsA9","adl-u-margin-right-72":"LoaderWrapper-module_adl-u-margin-right-72__Y9jVV","adl-u-margin-top-72":"LoaderWrapper-module_adl-u-margin-top-72__XBIqc","adl-u-margin-x-72":"LoaderWrapper-module_adl-u-margin-x-72__U4Geq","adl-u-margin-y-72":"LoaderWrapper-module_adl-u-margin-y-72__igMhc","adl-u-margin-80":"LoaderWrapper-module_adl-u-margin-80__ZaaVL","adl-u-margin-bottom-80":"LoaderWrapper-module_adl-u-margin-bottom-80__4mhvM","adl-u-margin-left-80":"LoaderWrapper-module_adl-u-margin-left-80__Ujmc8","adl-u-margin-right-80":"LoaderWrapper-module_adl-u-margin-right-80__5vsK6","adl-u-margin-top-80":"LoaderWrapper-module_adl-u-margin-top-80__tCCbV","adl-u-margin-x-80":"LoaderWrapper-module_adl-u-margin-x-80__h2Yhu","adl-u-margin-y-80":"LoaderWrapper-module_adl-u-margin-y-80__3CZaK","adl-u-margin-88":"LoaderWrapper-module_adl-u-margin-88__OITKU","adl-u-margin-bottom-88":"LoaderWrapper-module_adl-u-margin-bottom-88__dXAiI","adl-u-margin-left-88":"LoaderWrapper-module_adl-u-margin-left-88__gzaMr","adl-u-margin-right-88":"LoaderWrapper-module_adl-u-margin-right-88__yoUAB","adl-u-margin-top-88":"LoaderWrapper-module_adl-u-margin-top-88__axU9A","adl-u-margin-x-88":"LoaderWrapper-module_adl-u-margin-x-88__G6HTw","adl-u-margin-y-88":"LoaderWrapper-module_adl-u-margin-y-88__1h5uT","adl-u-margin-96":"LoaderWrapper-module_adl-u-margin-96__rM0li","adl-u-margin-bottom-96":"LoaderWrapper-module_adl-u-margin-bottom-96__xWxo0","adl-u-margin-left-96":"LoaderWrapper-module_adl-u-margin-left-96__KjUWb","adl-u-margin-right-96":"LoaderWrapper-module_adl-u-margin-right-96__n6Lvn","adl-u-margin-top-96":"LoaderWrapper-module_adl-u-margin-top-96__wXR-E","adl-u-margin-x-96":"LoaderWrapper-module_adl-u-margin-x-96__59z1P","adl-u-margin-y-96":"LoaderWrapper-module_adl-u-margin-y-96__bknST","adl-u-margin-0":"LoaderWrapper-module_adl-u-margin-0__or6Fk","adl-u-margin-bottom-0":"LoaderWrapper-module_adl-u-margin-bottom-0__cmq1i","adl-u-margin-left-0":"LoaderWrapper-module_adl-u-margin-left-0__sX7Nh","adl-u-margin-right-0":"LoaderWrapper-module_adl-u-margin-right-0__aXH-p","adl-u-margin-top-0":"LoaderWrapper-module_adl-u-margin-top-0__OKTAA","adl-u-margin-x-0":"LoaderWrapper-module_adl-u-margin-x-0__8WA3F","adl-u-margin-y-0":"LoaderWrapper-module_adl-u-margin-y-0__sTouw","adl-u-margin-auto":"LoaderWrapper-module_adl-u-margin-auto__me62z","adl-u-margin-bottom-auto":"LoaderWrapper-module_adl-u-margin-bottom-auto__0bABW","adl-u-margin-left-auto":"LoaderWrapper-module_adl-u-margin-left-auto__OadFh","adl-u-margin-right-auto":"LoaderWrapper-module_adl-u-margin-right-auto__Xb8T0","adl-u-margin-top-auto":"LoaderWrapper-module_adl-u-margin-top-auto__TwqvP","adl-u-margin-x-auto":"LoaderWrapper-module_adl-u-margin-x-auto__W49-q","adl-u-margin-y-auto":"LoaderWrapper-module_adl-u-margin-y-auto__FeR-W","adl-u-box-sizing-border-box":"LoaderWrapper-module_adl-u-box-sizing-border-box__ZRUhq","adl-u-pointer-events-none":"LoaderWrapper-module_adl-u-pointer-events-none__yOoe8","adl-u-pointer-events-auto":"LoaderWrapper-module_adl-u-pointer-events-auto__6ErlI","adl-u-font-size-small":"LoaderWrapper-module_adl-u-font-size-small__8I1Ev","adl-u-font-size-medium":"LoaderWrapper-module_adl-u-font-size-medium__kAt3Y","adl-u-font-size-large":"LoaderWrapper-module_adl-u-font-size-large__n2fD9","adl-u-font-size-xlarge":"LoaderWrapper-module_adl-u-font-size-xlarge__A4cW2","adl-u-font-size-xxlarge":"LoaderWrapper-module_adl-u-font-size-xxlarge__QyQ-A","adl-u-font-size-inherit":"LoaderWrapper-module_adl-u-font-size-inherit__lien5","adl-u-font-weight-thin":"LoaderWrapper-module_adl-u-font-weight-thin__w6-7j","adl-u-font-weight-regular":"LoaderWrapper-module_adl-u-font-weight-regular__81wC2","adl-u-font-weight-medium":"LoaderWrapper-module_adl-u-font-weight-medium__6Bkr1","adl-u-font-weight-semi-bold":"LoaderWrapper-module_adl-u-font-weight-semi-bold__-Km48","adl-u-white-space-normal":"LoaderWrapper-module_adl-u-white-space-normal__O-8hp","adl-u-white-space-nowrap":"LoaderWrapper-module_adl-u-white-space-nowrap__uNmHL","adl-u-white-space-pre-wrap":"LoaderWrapper-module_adl-u-white-space-pre-wrap__-jx-K","adl-u-truncate":"LoaderWrapper-module_adl-u-truncate__hSayP","adl-u-word-break-break-word":"LoaderWrapper-module_adl-u-word-break-break-word__HsHGC","adl-u-visibility-visible":"LoaderWrapper-module_adl-u-visibility-visible__SVpoI","adl-u-visibility-hidden":"LoaderWrapper-module_adl-u-visibility-hidden__zVbUT","adl-u-display-none":"LoaderWrapper-module_adl-u-display-none__DsSe9","adl-u-display-initial":"LoaderWrapper-module_adl-u-display-initial__Lhzvs","adl-u-display-inline":"LoaderWrapper-module_adl-u-display-inline__gIPuS","adl-u-display-inline-block":"LoaderWrapper-module_adl-u-display-inline-block__uubRw","adl-u-display-block":"LoaderWrapper-module_adl-u-display-block__YZiA1","adl-u-display-table":"LoaderWrapper-module_adl-u-display-table__LpAm0","adl-u-display-table-row":"LoaderWrapper-module_adl-u-display-table-row__tjyhl","adl-u-display-table-cell":"LoaderWrapper-module_adl-u-display-table-cell__2Adjd","adl-u-display-flex":"LoaderWrapper-module_adl-u-display-flex__St4mQ","adl-u-display-inline-flex":"LoaderWrapper-module_adl-u-display-inline-flex__X8P3U","adl-u-flex-direction-row":"LoaderWrapper-module_adl-u-flex-direction-row__qOVTd","adl-u-flex-direction-row-reverse":"LoaderWrapper-module_adl-u-flex-direction-row-reverse__eEbiO","adl-u-flex-direction-column":"LoaderWrapper-module_adl-u-flex-direction-column__134gh","adl-u-flex-direction-column-reverse":"LoaderWrapper-module_adl-u-flex-direction-column-reverse__VCrho","adl-u-flex-wrap-wrap":"LoaderWrapper-module_adl-u-flex-wrap-wrap__QVjdM","adl-u-flex-wrap-nowrap":"LoaderWrapper-module_adl-u-flex-wrap-nowrap__rAxpJ","adl-u-align-items-start":"LoaderWrapper-module_adl-u-align-items-start__Dvri5","adl-u-align-items-flex-start":"LoaderWrapper-module_adl-u-align-items-flex-start__IfSZJ","adl-u-align-items-flex-end":"LoaderWrapper-module_adl-u-align-items-flex-end__wLnjV","adl-u-align-items-center":"LoaderWrapper-module_adl-u-align-items-center__ncX4A","adl-u-align-items-stretch":"LoaderWrapper-module_adl-u-align-items-stretch__VVYwf","adl-u-align-items-baseline":"LoaderWrapper-module_adl-u-align-items-baseline__ptDF1","adl-u-align-items-end":"LoaderWrapper-module_adl-u-align-items-end__i2wqG","adl-u-justify-content-center":"LoaderWrapper-module_adl-u-justify-content-center__VzKQK","adl-u-justify-content-flex-start":"LoaderWrapper-module_adl-u-justify-content-flex-start__2GeaL","adl-u-justify-content-flex-end":"LoaderWrapper-module_adl-u-justify-content-flex-end__jX5a4","adl-u-justify-content-start":"LoaderWrapper-module_adl-u-justify-content-start__s19ps","adl-u-justify-content-end":"LoaderWrapper-module_adl-u-justify-content-end__WrpbG","adl-u-justify-content-left":"LoaderWrapper-module_adl-u-justify-content-left__UYl5j","adl-u-justify-content-right":"LoaderWrapper-module_adl-u-justify-content-right__Ulage","adl-u-justify-content-space-between":"LoaderWrapper-module_adl-u-justify-content-space-between__fHuEx","adl-u-justify-content-space-around":"LoaderWrapper-module_adl-u-justify-content-space-around__yuaBm","adl-u-justify-content-space-evenly":"LoaderWrapper-module_adl-u-justify-content-space-evenly__ZKme5","adl-u-justify-content-stretch":"LoaderWrapper-module_adl-u-justify-content-stretch__zRJxM","adl-u-flex-1":"LoaderWrapper-module_adl-u-flex-1__dnOHF","adl-u-width-full":"LoaderWrapper-module_adl-u-width-full__g4Hkw","adl-u-width-auto":"LoaderWrapper-module_adl-u-width-auto__3QMUT","adyen-kyc-loading-input__form":"LoaderWrapper-module_adyen-kyc-loading-input__form__chx-J","adyen-kyc-loading-input__form--loading-opacity0":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0__A2eC5","adyen-kyc-loading-input__form--loading-opacity0-1":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-1__CbgnO","adyen-kyc-loading-input__form--loading-opacity0-2":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-2__LdJOX","adyen-kyc-loading-input__form--loading-opacity0-3":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-3__S3Lav","adyen-kyc-loading-input__form--loading-opacity0-4":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-4__Nbbb9","adyen-kyc-loading-input__form--loading-opacity0-5":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-5__1alhE","adyen-kyc-loading-input__form--loading-opacity0-6":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-6__uicZA","adyen-kyc-loading-input__form--loading-opacity0-7":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-7__AgxAJ","adyen-kyc-loading-input__form--loading-opacity0-8":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-8__2gl9x","adyen-kyc-loading-input__form--loading-opacity0-9":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-9__acg2x","adyen-kyc-loading-input__form--loading-opacity1":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity1__kOcum","adyen-kyc-loading-input__loader":"LoaderWrapper-module_adyen-kyc-loading-input__loader__k4L0f","adyen-kyc-loading-input__loader--active":"LoaderWrapper-module_adyen-kyc-loading-input__loader--active__RLLLI"};const xu="success",Mu="loading";var Fu;!function(e){e.SUCCESS="success",e.LOADING="loading"}(Fu||(Fu={}));const Vu=({children:e,status:t,formOpacityWhenLoading:r=0,loaderSize:n="large",showSpinner:i=!0,className:o})=>{const s=`${r}`.split("."),d=s[0],l=s[1],c=a("adyen-kyc-loading-input__form",ju["adyen-kyc-loading-input__form"],{[ju[`adyen-kyc-loading-input__form--loading-opacity${l?`${d}-${l}`:`${d}`}`]]:t===Mu}),u=a({[ju["adyen-kyc-loading-input__loader"]]:!0,[ju["adyen-kyc-loading-input__loader--active"]]:t===Mu&&i}),m=a("adyen-kyc-loading-input",o);return C("div",Object.assign({className:m,style:{position:"relative"}},{children:[C("div",Object.assign({className:u},{children:C(Ze,{size:n})})),C("div",Object.assign({className:c},{children:e}))]}))},Uu=["typeOfIdentity","licenseCardNumber","issuerState"],Bu=["nationalIdNumber","passport","driversLicense","proofOfIdentityCard"],Wu=({availableIdentityTypes:e,selectedIdentityType:t,setSelectedIdentityType:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{i18n:o,commonProps:{showInlineErrors:s}}=We();return C(Ue,Object.assign({name:"typeOfIdentity",label:r("typeOfIdentity"),errorMessage:n,isValid:i},{children:[C("span",Object.assign({className:"adyen-kyc-helper-text"},{children:o.get("typeOfIdentitySubtitle")})),C(lt,{isInvalid:!1,items:e.map((e=>((e,t)=>({id:e,name:t}))(e,o.get(e)))),placeholder:o.get("id"),selected:t,onChange:e=>a(e.target.value),showInlineErrors:s})]}))},Hu=({passportNumber:e,onInput:t,onBlur:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{commonProps:{showInlineErrors:o}}=We();return C(Ue,Object.assign({name:"passportNumber",label:r("idNumber","passportNumber"),showInlineErrors:o,errorMessage:n,isValid:i},{children:C(Vt,{name:"passportNumber",value:e,onInput:t,onBlur:a,placeholder:"",showInlineErrors:o})}))},qu=({cardNumber:e,onInput:t,onBlur:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{commonProps:{showInlineErrors:o}}=We();return C(Ue,Object.assign({name:"cardNumber",label:r("idNumber","proofOfIdentityCardNumber"),showInlineErrors:o,errorMessage:n,isValid:i},{children:C(Vt,{name:"cardNumber",value:e,onInput:t,onBlur:a,placeholder:"",showInlineErrors:o})}))},Gu=({driversLicense:e,onIssuerStateChange:a,onLicenseNumberInput:r,onLicenseNumberBlur:n,onCardNumberInput:i,onCardNumberBlur:o,formUtils:{getLabel:s},isValid:d,errorMessages:l})=>{const{i18n:c,commonProps:{showInlineErrors:m}}=We(),{dataset:p}=ea(u("AU"));return C(t.Fragment,{children:[C(Ue,Object.assign({name:"issuerState",label:s("issuerState"),showInlineErrors:m,isValid:d.issuerState,errorMessage:l.issuerState},{children:C(lt,{onChange:a,isInvalid:!1,items:p,placeholder:c.get("selectState"),selected:e.issuerState})})),C("div",Object.assign({className:"adyen-kyc-field-wrapper"},{children:[C(Ue,Object.assign({name:"licenseNumber",label:s("idNumber","licenseNumber"),showInlineErrors:m,isValid:d.idNumber,errorMessage:l.idNumber},{children:C(Vt,{name:"licenseNumber",value:e.idNumber,onInput:r,onBlur:n,placeholder:"",showInlineErrors:m})})),C(Ue,Object.assign({name:"licenseCardNumber",label:s("licenseCardNumber"),showInlineErrors:m,isValid:d.licenseCardNumber,errorMessage:l.licenseCardNumber},{children:C(Vt,{name:"licenseCardNumber",value:e.licenseCardNumber,onInput:i,onBlur:o,placeholder:"",showInlineErrors:m})}))]})),C(ul,{page:"Personal details",title:c.get("whereCanIFindTheseNumbersOnMyDriversLicense"),content:C(t.Fragment,{children:[c.get("whereToFindNumbersOnDriversLicense"),"\xa0",C("a",Object.assign({href:"https://www.usi.gov.au/about/forms-id/drivers-licence",target:"_blank",rel:"noreferrer"},{children:c.get("iStillCantFindIt")}))]}),titleId:"whereCanIFindTheseNumbersOnMyDriversLicense",contentId:"whereToFindNumbersOnDriversLicense"})]})};const $u={validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"},Xu=/^[A-Z]{1,2}\d{7}$/,Yu=/^[A-Za-z\d]{6,11}$/,Ku=/^[A-Za-z\d]{6,10}$/,zu={typeOfIdentity:[$u],idNumber:[{validate:(e,t)=>{switch(t.state.data.typeOfIdentity){case"passport":return Xu.test(e);case"driversLicense":return Yu.test(e);case"proofOfIdentityCard":return Ku.test(e)}},errorMessage:(e,t)=>{switch(t.state.data.typeOfIdentity){case"passport":return"invalidFormatForAuPassportNumber";case"driversLicense":return"invalidFormatForAuDriversLicenseNumber";case"proofOfIdentityCard":return"invalidFormatForAuProofOfIdentityCardNumber"}},modes:["blur"]}],licenseCardNumber:[{validate:e=>Yu.test(e),errorMessage:"invalidFormatForAuDriversLicenseCardNumber",modes:["blur"]}],issuerState:[$u]};function Zu(e){var a;"nationalIdNumber"===(null===(a=e.data)||void 0===a?void 0:a.typeOfIdentity)&&(e.data.typeOfIdentity=void 0);const{handleChangeFor:r,triggerValidation:n,data:i,errors:o,fieldProblems:s,valid:d}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields,defaultData:e.data,fieldProblems:e.fieldValidationErrors,rules:zu}));le((()=>{i.typeOfIdentity&&n(["idNumber"])}),[n,i.typeOfIdentity]),this.triggerValidation=n;const{sliceData:l,updateStateSlice:c}=function(e,t){const{dispatch:a,getData:r}=Kl(),n=r()[e],i=pe((r=>a({type:"addToState",value:Object.assign(Object.assign({},r),{dataStoreId:e,caller:t})})),[e,t]);return{sliceData:n,updateStateSlice:pe(dt(i,200),[i])}}("personalDetails");le((()=>c({data:Object.assign(Object.assign({},l),i),errors:o,valid:d,fieldProblems:s})),[i,o,d,s]);const{i18n:u}=We(),m=ra(e,u);return C(t.Fragment,{children:[C(Wu,{availableIdentityTypes:Bu.filter((e=>"nationalIdNumber"!==e)),selectedIdentityType:i.typeOfIdentity,setSelectedIdentityType:r("typeOfIdentity"),formUtils:m,isValid:d.typeOfIdentity,errorMessage:m.getErrorMessage("typeOfIdentity",o,s)}),"passport"===i.typeOfIdentity?C(Hu,{passportNumber:i.idNumber,onInput:r("idNumber","input"),onBlur:r("idNumber","blur"),formUtils:m,isValid:d.idNumber,errorMessage:m.getErrorMessage("idNumber",o,s)}):"proofOfIdentityCard"===i.typeOfIdentity?C(qu,{cardNumber:i.idNumber,onInput:r("idNumber","input"),onBlur:r("idNumber","blur"),formUtils:m,isValid:d.idNumber,errorMessage:m.getErrorMessage("idNumber",o,s)}):"driversLicense"===i.typeOfIdentity?C(Gu,{driversLicense:i,onIssuerStateChange:r("issuerState"),onLicenseNumberInput:r("idNumber","input"),onLicenseNumberBlur:r("idNumber","blur"),onCardNumberInput:r("licenseCardNumber","input"),onCardNumberBlur:r("licenseCardNumber","blur"),formUtils:m,isValid:{idNumber:d.idNumber,licenseCardNumber:d.licenseCardNumber,issuerState:d.issuerState},errorMessages:{idNumber:m.getErrorMessage("idNumber",o,s),licenseCardNumber:m.getErrorMessage("licenseCardNumber",o,s),issuerState:m.getErrorMessage("issuerState",o,s)}}):void 0]})}const Qu=[...Uu,"idNumber"],Ju="1_316",em="1_3062",tm="1_30",am="4DigitSSN",rm="entireSSN",nm=ht(((e,t)=>{var a,r,n,i;const o=null===(a=e.formVerificationErrors)||void 0===a?void 0:a[tm],s=(null===(r=null==o?void 0:o[em])||void 0===r?void 0:r.some((e=>e.code===Ju)))||9===(null===(i=null===(n=e.data)||void 0===n?void 0:n.idNumber)||void 0===i?void 0:i.length)?rm:am;let d=Object.assign({},e);if(s===rm){const t={labels:Object.assign(Object.assign({},e.labels),{idNumber:"socialSecurityNumber9Digits"}),country:"US9",placeholders:Object.assign(Object.assign({},e.placeholders),{idNumber:"SSNFormatUS9Digits"})};d=Object.assign(Object.assign({},e),t)}return s===am&&(d.classNames=["us4DigitsNumberId"],d.dataPlaceholder="*** \u2014 ** \u2014 "),C(ou,Object.assign({},d,{ref:t}))})),im=[...zc,"birthDate",...nu,...Uu,"residencyCountry","jobTitle",...Eu,...Lu,...Ud,...Zd];function om(e){const{i18n:t,commonProps:a}=We(),{isSettingEnabled:r}=zd(),n=ue(null),o=ue(null),s=ue(null),d=ue(null),l=ue(null),c=ue(null),u=e.id,[m,p]=se(null),[g,y]=se(xu),b=ue({setState:null}),[f,h]=se(null),v=e.taskType===Rd.DECISION_MAKER||e.taskType===Rd.TRUST_MEMBER_COMPANY_OWNER,_=(e.requiredFields||im).filter((e=>"role"!==e||"role"===e&&v)),N=r("editPrefilledCountry"),O=()=>_.filter((e=>["birthDate","residencyCountry","jobTitle"].includes(e))),{handleChangeFor:I,data:E,valid:T,errors:A,triggerValidation:S,fieldProblems:R}=ua(Object.assign(Object.assign({},e),{schema:O(),defaultData:e.data,rules:e.validators||su,fieldProblems:null==e?void 0:e.fieldValidationErrors})),D=ra(e,t),{hasFieldsToVerify:k,verifyFields:L}=function(e,t){const{loadingContext:a,clientKey:r}=We();return{hasFieldsToVerify:!!(null==e?void 0:e.length),verifyFields:pe((n=>i(this,void 0,void 0,(function*(){const i=[];return e.map((e=>{if("idNumber"===e&&n.data[e]){if("US"===t&&4===n.data[e].length)return;const o=lu(n,t,{loadingContext:a,clientKey:r});i.push(o)}})),Promise.all(i)}))),[e,t])}}(e.verifyFields,E.residencyCountry);this.triggerValidation=()=>{S(O()),v&&n.current.triggerValidation(),U(P)&&o.current.triggerValidation(),U(j)&&s.current.triggerValidation(),U(M)&&d.current.triggerValidation(),U(F)&&l.current.triggerValidation(),U(V)&&c.current.triggerValidation()},this.verifyForm=()=>{if(!k)return Promise.resolve(!0);const e=performance.now();return y(Mu),new Promise((t=>{L({data:f}).then((a=>{const r=a.every((e=>"verified"===e.status)),n=performance.now(),i=Math.floor(n-e);if(i<400?setTimeout((()=>{y(xu),t(r)}),400-i):(y(xu),t(r)),!r){const e=Object.assign({},m);a.forEach((t=>{"error"===t.status&&(e[t.fieldName]={isValid:!1,errorMessage:t.translationKey})})),p(Object.assign(Object.assign({},m),e))}}))}))},le((()=>{b.current.setState({type:"addToState",value:{data:E,valid:T,errors:A,fieldProblems:R,caller:u,dataStoreId:u,schema:_}})}),[E,T,A]);const w=Dd(e,Eu),P=Dd(e,zc),j=Dd(e,nu),x=Dd(e,Qu),M=Dd(e,Lu),F=Dd(e,Ud),V=Dd(e,Zd),U=e=>!!e.requiredFields.length;return C(Vu,Object.assign({status:g,formOpacityWhenLoading:.3,loaderSize:"large"},{children:[C(Ys,{owner:u,stateRef:b}),C(Yl,{owner:u,onChange:({currentState:e,changeInitiatedBy:t})=>{var a,r;t===u&&(!(null===(r=null===(a=e.errors)||void 0===a?void 0:a[u])||void 0===r?void 0:r.idNumber)&&(null==m?void 0:m.idNumber)&&delete m.idNumber,this.isValid=e.validityByForm[u],h(e.data[u]))}}),C("form",Object.assign({className:"adyen-kyc-individual__personal-details","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[C(Ms,{heading:e.heading}),C(qc,{verificationErrors:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:D,id:"ariaErrorField"}),"US"!==E.residencyCountry||v?void 0:C(rc,{}),C(ul,{page:"Personal details",title:t.get("whyDoINeedToFillInThisInformation"),content:t.get("reasonForFillingIndividualPersonalDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingIndividualPersonalDetails"}),v&&C(Tu,Object.assign({},w,{ref:n,taskType:e.taskType,dataStoreId:u,allowedRoles:null==e?void 0:e.allowedRoles})),U(P)&&C(Qc,Object.assign({},P,{ref:o,dataStoreId:u})),D.isRequiredField("birthDate")&&C(Ue,Object.assign({name:"birthDate",label:D.getLabel("birthDate"),classNameModifiers:["birthDate"],errorMessage:D.getErrorMessage("birthDate",A,R),isValid:T.birthDate,showInlineErrors:a.showInlineErrors},{children:Jt("date",{name:"birthDate",value:E.birthDate,placeholder:t.get("birthDatePlaceholder"),readonly:D.isReadOnly("birthDate"),onInput:I("birthDate","input"),onBlur:I("birthDate","blur"),"aria-required":!0,"aria-label":D.getLabel("birthDate"),"aria-invalid":!T.birthDate,showInlineErrors:a.showInlineErrors,max:(B=new Date,B.toJSON().slice(0,10))})})),D.isRequiredField("residencyCountry")&&C(aa,{label:D.getLabel("residencyCountry"),allowedCountries:[],classNameModifiers:["country"],errorMessage:D.getErrorMessage("residencyCountry",A,R),onDropdownChange:I("residencyCountry","input"),value:E.residencyCountry,readOnly:!N&&!v}),U(j)&&("AU"===E.residencyCountry?C(Zu,Object.assign({},x,{ref:s,dataStoreId:u})):"US"===E.residencyCountry?C(nm,Object.assign({},j,{errors:m,dataStoreId:u,country:E.residencyCountry,formVerificationErrors:e.formVerificationErrors})):C(ou,Object.assign({},j,{ref:s,errors:m,country:E.residencyCountry,dataStoreId:u}))),U(M)&&C(Pu,Object.assign({},M,{ref:d,dataStoreId:u,country:E.residencyCountry})),D.isRequiredField("jobTitle",!1)&&C(Ue,Object.assign({name:"jobTitle",label:D.getLabel("jobTitle"),classNameModifiers:["jobTitle"],errorMessage:D.getErrorMessage("jobTitle",A,R)},{children:Jt("text",{name:"jobTitle",value:E.jobTitle,placeholder:D.getPlaceholder("jobTitle"),readonly:D.isReadOnly("jobTitle"),onInput:I("jobTitle","input"),onBlur:I("jobTitle","blur"),"aria-required":!0,"aria-label":D.getLabel("jobTitle"),"aria-invalid":!T.birthDate})})),D.isRequiredField("isPartOfTrust",!1)&&C(Bd,Object.assign({},F,{legalEntityType:id.INDIVIDUAL,ref:l,dataStoreId:u,isReadOnlyOnDefaultDataYes:!0})),D.isRequiredField("accountHolder")&&C(el,Object.assign({},V,{ref:c,country:E.residencyCountry,dataStoreId:u}))]}))]}));var B}var sm;!function(e){e.PASSPORT="passport",e.DRIVING_LICENCE="driving_licence",e.NATIONAL_IDENTITY_CARD="national_identity_card",e.RESIDENCE_PERMIT="residence_permit"}(sm||(sm={}));const dm=[{id:cc.DRIVERS_LICENSE,name:"driversLicense",hasBackPage:!0},{id:cc.PASSPORT,name:"passport",hasBackPage:!1},{id:cc.IDENTITY_CARD,name:"id",hasBackPage:!0}],lm=[{id:sm.DRIVING_LICENCE,name:"driversLicense",hasBackPage:!0},{id:sm.NATIONAL_IDENTITY_CARD,name:"id",hasBackPage:!0},{id:sm.PASSPORT,name:"passport",hasBackPage:!1}],cm={},um=dm.map((e=>e.id));let mm,pm,gm;const ym=(e,t,a)=>(mm&&pm&&gm||(mm=t,pm=a,gm=e),{fetchDocuments:bm,fetchDocument:fm,uploadDocuments:hm}),bm=(e,t)=>i(void 0,void 0,void 0,(function*(){const a=[];null==e||e.forEach((e=>{a.push(fm(e,t))}));return(yield Promise.all(a)).forEach((e=>{var t;const a=null===(t=null==e?void 0:e.owner)||void 0===t?void 0:t.id;a&&(cm[a]=cm[a]||[],cm[a].push(e))})),cm[t]})),fm=(e,t)=>i(void 0,void 0,void 0,(function*(){return mm(e,t)})),hm=(e,t)=>i(void 0,void 0,void 0,(function*(){const a=[];e.forEach((e=>{if(Im(e,t)){if(Em(e,t)){const r=_m(t,e.type).id;a.push(pm(e,r,t))}}else a.push(gm(e,t))}));const r=yield Promise.all(a);return vm(r,t),cm[t]})),vm=(e,t)=>{cm[t]||(cm[t]=[]),e.forEach((e=>{if(e){const a=cm[t].findIndex((t=>t.id===e.id));a>-1?cm[t][a]=e:cm[t].push(e)}}))},_m=(e,t)=>{var a;return null===(a=cm[e])||void 0===a?void 0:a.find((e=>e.type===t&&Tm(e)))},Nm=({entityId:e,entityType:t,documentType:a,page1:r,page2:n=null,description:o=null})=>i(void 0,void 0,void 0,(function*(){const i=[Am(r),Am(n)].filter(Boolean),[s,d]=yield Promise.all(i),l=r&&n;if(s)return{owner:{id:e,type:t},type:a,description:o||`Document type: ${a}`,attachments:[Om(s,null==r?void 0:r.name,l?"front":null),Om(d,null==n?void 0:n.name,l?"back":null)].filter(Boolean)}})),Om=(e,t,a="")=>e&&Object.assign({content:e,pageName:t},a&&{pageType:a}),Im=(e,t)=>{const a=cm[t];return!!(null==a?void 0:a.length)&&a.some((t=>t.type===e.type))},Em=(e,t)=>{const a=_m(t,e.type);return!a||a.attachments.some(((t,a)=>{var r;return t.content!==(null===(r=null==e?void 0:e.attachments[a])||void 0===r?void 0:r.content)}))},Tm=e=>!!e,Am=e=>new Promise(((t,a)=>{if(!(e&&e instanceof Blob))return void t(null);const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{const e=r.result.toString().split(";base64,")[1];t(e)},r.onerror=e=>a(e)})),Sm=e=>e.split(".").pop();var Rm;!function(e){e.DEFINED_BENEFICIARY="definedBeneficiary",e.PROTECTOR="protector",e.SECONDARY_TRUSTEE="secondaryTrustee",e.SETTLOR="settlor",e.UBO_THROUGH_OWNERSHIP="uboThroughOwnership"}(Rm||(Rm={}));const Cm={[Rm.DEFINED_BENEFICIARY]:{min:1},[Rm.SETTLOR]:{min:1}},Dm=e=>{var t;return null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.some((t=>t.entityType===id.TRUST&&t.associatorId===e.id))},km=e=>Dm(e)?Md.IS_PART_OF_TRUST:Md.IS_NOT_PART_OF_TRUST,Lm=e=>{var t;return null===(t=Fd.find((t=>t.id===e)))||void 0===t?void 0:t.name},wm=e=>{if(null==e?void 0:e.entityAssociations){const t=Object.values(Rm);return e.entityAssociations.filter((a=>t.includes(a.type)&&a.associatorId===e.id))}return[]},Pm=e=>{var t;return null===(t=wm(e))||void 0===t?void 0:t.map((e=>e.legalEntityId))},jm=e=>{var t,a;return null===(a=null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.find((t=>t.entityType===id.TRUST&&t.associatorId===e.id)))||void 0===a?void 0:a.legalEntityId},xm=e=>{const t=jm(e);return t?[t]:[]},Mm=(e,t)=>{var a;const r=jm(e);if(r)return null===(a=null==t?void 0:t.LegalEntity)||void 0===a?void 0:a[r]},Fm=e=>{const t=(e=>wm(e).reduce(((e,t)=>{var a;return e[t.type]=(null!==(a=e[t.type])&&void 0!==a?a:0)+1,e}),{}))(e);return Object.entries(Cm).every((([e,a])=>{var r;return!a.min||(null!==(r=null==t?void 0:t[e])&&void 0!==r?r:0>=a.min)}))},Vm=(e,t)=>Object.values(Um).filter((e=>0===(null==t?void 0:t.length)||(null==t?void 0:t.includes(e.id)))).map((t=>Object.assign(Object.assign({},t),{name:e.get(t.name),description:e.get(t.description)}))),Um={[Rm.DEFINED_BENEFICIARY]:{id:Rm.DEFINED_BENEFICIARY,name:"beneficiary",description:"beneficialOwnersOfTrustProperty",className:"adl-tag--light-blue"},[Rm.PROTECTOR]:{id:Rm.PROTECTOR,name:"protector",description:"personAppointmentUnderTrustInstrument",className:"adl-tag--green"},[Rm.SECONDARY_TRUSTEE]:{id:Rm.SECONDARY_TRUSTEE,name:"trustee",description:"legalOwnerOfProperty",className:"adl-tag--purple"},[Rm.SETTLOR]:{id:Rm.SETTLOR,name:"settlor",description:"entityEstablishingTrust",className:"adl-tag--teal"},[Rm.UBO_THROUGH_OWNERSHIP]:{id:Rm.UBO_THROUGH_OWNERSHIP,name:"ultimateBeneficialOwner",description:"entityOwning25OrMoreOfTrust",className:"adl-tag--basic"}},Bm={US:"EIN",AU:"ABN"},Wm=({taxId:e,country:t,exemptedFromTax:a=!1,entity:r})=>{var n,i;const o=W(r),s=null!==(i=null===(n=r.taxInformation)||void 0===n?void 0:n.reduce(((e,t)=>(e[t.country]=t,e)),{}))&&void 0!==i?i:{};return a?delete s[t]:s[t]={country:t,type:Bm[t],number:e},o.taxInformation=Object.values(s),"US"===t&&(o.vatNumber="",o.registrationNumber=""),o},Hm=Object.assign(Object.assign({},Um),Iu),qm=e=>{var t;return null===(t=Hm[e])||void 0===t?void 0:t.className},Gm=e=>{var t;return null===(t=Hm[e])||void 0===t?void 0:t.name},$m=e=>(null==e?void 0:e.entityAssociations)?e.entityAssociations.filter((t=>t.associatorId===e.id)):[],Xm=e=>$m(e).filter((e=>e.entityType===id.SOLE_PROPRIETORSHIP)).map((e=>e.legalEntityId)),Ym=e=>{var t;return null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.some((t=>t.entityType===id.SOLE_PROPRIETORSHIP&&t.associatorId===e.id))},Km=(e,t)=>{var a;const r=Xm(e)[0];if(r)return null===(a=null==t?void 0:t.LegalEntity)||void 0===a?void 0:a[r]};var zm;function Zm(e,t=!1){const a=[];for(const[r,n]of Object.entries(e)){if("object"!=typeof n&&(void 0!==n||t)){a.push(r);continue}const e=Zm(n).map((e=>`${r}.${e}`));a.push(...e)}return a}!function(e){e.VALID="valid",e.PENDING="pending",e.INVALID="invalid",e.REJECTED="rejected"}(zm||(zm={}));const Qm=(e,t,a,r)=>{if(!(null==r?void 0:r.length)||ap(a))return Sd.EMPTY;const n=function(e,t,a){if(!(null==t?void 0:t[e]))return;const r=Object.entries(t[e]).filter((([e])=>a.includes(e))).map((([,e])=>e.status)).filter((e=>Jm.includes(e)));if(!r.length)return;return r.reduce(((e,t)=>t>e?t:e))}(e,t,r);return n||(!r.includes(a.id)||ep(a)?Sd.PROCESSING:Sd.FINISHED)},Jm=[Sd.DETAILS_REQUIRED,Sd.DOWNLOAD,Sd.ERROR];const ep=e=>{var t;return Object.values(null!==(t=e.capabilities)&&void 0!==t?t:{}).some((e=>"pending"===e.verificationStatus))},tp={[id.INDIVIDUAL]:["name.firstName","name.lastName","residentialAddress.country"],[id.ORGANIZATION]:["legalName","registeredAddress.country"],[id.TRUST]:["name","registeredAddress.country"],[id.SOLE_PROPRIETORSHIP]:["name","registeredAddress.country"]};function ap(e){var t;const a=null==e?void 0:e.type;if(!a)return!0;if(null===(t=e.documentDetails)||void 0===t?void 0:t.length)return!1;const r=tp[a];return!Zm(e[a]).some((e=>!r.includes(e)))}const rp=[{id:Wd.MY_NAME,name:"myName",description:"myNameDescription",type:id.INDIVIDUAL},{id:Wd.MY_SOLE_TRADER_NAME,name:"mySoleTraderName",description:"mySoleTraderNameDescription",type:id.SOLE_PROPRIETORSHIP},{id:Wd.THE_COMPANY_I_WORK_FOR,name:"theCompanyIWorkFor",description:"theCompanyIWorkForDescription",type:id.ORGANIZATION}];rp.filter((e=>e.id!==Wd.MY_SOLE_TRADER_NAME));const np=(e,t=!1)=>{var a;return Ym(e)?Wd.MY_SOLE_TRADER_NAME:t||!ap(e)?null===(a=rp.find((({type:t})=>t===e.type)))||void 0===a?void 0:a.id:void 0},ip=e=>{var t;const a=Object.assign({},yp(e,cd));return a.type=id.INDIVIDUAL,a.individual.identificationData=op(e.personalDetails,a.individual.identificationData),(null===(t=a.individual.phone)||void 0===t?void 0:t.number)?a.individual.phone.type="mobile":delete a.individual.phone,a},op=(e,t)=>{var a,r;if(void 0!==e.idNumber||void 0!==e.idNumberExempt)return Object.assign(Object.assign({},t),{nationalIdExempt:null!==(a=t.nationalIdExempt)&&void 0!==a?a:!e.idNumber,type:null!==(r=e.typeOfIdentity)&&void 0!==r?r:"nationalIdNumber"})},sp=({data:e,legalEntity:t})=>{const a=yp(e,hd);return a.legalEntityId=t.id,a.type=od.BANK_ACCOUNT,a},dp=(e,t)=>{let a=yp(e,ld);return a=Object.assign(Object.assign({},a),{personalDetails:Object.assign(Object.assign(Object.assign({},null==a?void 0:a.personalDetails),t&&{firstName:"",lastName:""}),{isPartOfTrust:km(e),accountHolder:np(e,t)})}),a},lp=(e,t)=>{var a,r;let n;if(null==e?void 0:e.organization){n=yp(e,yd),(null===(a=e.organization)||void 0===a?void 0:a.principalPlaceOfBusiness)?n.companyRegistrationDetails.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_NOT_SAME:(n.companyRegistrationDetails||(n.companyRegistrationDetails={}),n.companyRegistrationDetails.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_SAME);const{taxInformation:t=[]}=e.organization;if(t.length){const{country:a}=e.organization.registeredAddress;n.companyDetails.taxId=null===(r=t.find((e=>e.country===a)))||void 0===r?void 0:r.number}}return n=Object.assign(Object.assign({},n),{companyType:Object.assign(Object.assign({},null==n?void 0:n.companyType),{isPartOfTrust:km(e),accountHolder:np(e,t)})}),n},cp=e=>{const t=Object.assign({},yp(e,bd));return t.organization.vatAbsenceReason&&(t.organization.vatNumber=""),e.companyDetails.taxId&&(t.organization=Wm({taxId:e.companyDetails.taxId,country:e.companyNameAndCountry.companyCountry,entity:t.organization})),t.type=id.ORGANIZATION,t},up=(e,t)=>i(void 0,void 0,void 0,(function*(){var a,r,n,i;if(e){const{idDocument:o,proofOfNationalId:s,proofOfResidence:d}=e,l="legalEntity";return(yield Promise.all([Nm({entityId:t,entityType:l,documentType:null==o?void 0:o.idDocumentType,page1:null===(a=null==o?void 0:o.idFrontPage)||void 0===a?void 0:a[0],page2:null===(r=null==o?void 0:o.idBackPage)||void 0===r?void 0:r[0]}),Nm({entityId:t,entityType:l,documentType:cc.PROOF_OF_NATIONAL_ID_NUMBER,page1:null===(n=null==s?void 0:s.proofOfNationalId)||void 0===n?void 0:n[0]}),Nm({entityId:t,entityType:l,documentType:cc.PROOF_OF_RESIDENCY,page1:null===(i=null==d?void 0:d.proofOfResidence)||void 0===i?void 0:i[0]})])).filter(Boolean)}})),mp=e=>{const t=(e=>{var t;return null===(t=cm[e])||void 0===t?void 0:t.find((e=>um.includes(e.type)&&Tm(e)))})(e)||null,a=_m(e,cc.PROOF_OF_RESIDENCY)||null,r=_m(e,cc.PROOF_OF_NATIONAL_ID_NUMBER)||null;return{idDocument:Object.assign(Object.assign(Object.assign({},(null==t?void 0:t.attachments[0])?{idFrontPage:[{name:vp(t,0)}]}:{}),(null==t?void 0:t.attachments[1])?{idBackPage:[{name:vp(t,1)}]}:{}),{idDocumentType:null==t?void 0:t.type}),proofOfResidence:a?[{name:vp(a)}]:null,proofOfNationalId:r?[{name:vp(r)}]:null}},pp=(e,t)=>i(void 0,void 0,void 0,(function*(){const{companyRegistrationDocument:{registrationDocument:a},companyTaxDocument:{taxDocument:r}}=e,n="legalEntity";return(yield Promise.all([Nm({entityId:t,entityType:n,documentType:cc.REGISTRATION_DOCUMENT,page1:null==a?void 0:a[0]}),Nm({entityId:t,entityType:n,documentType:cc.VAT_DOCUMENT,page1:null==r?void 0:r[0]})])).filter(Boolean)})),gp=(e,t)=>i(void 0,void 0,void 0,(function*(){const{payoutAccountDocuments:a={}}=e,{bankStatementDocument:r,description:n}=a,i=od.BANK_ACCOUNT;return(yield Promise.all([Nm({entityId:t,entityType:i,documentType:cc.BANK_STATEMENT,page1:null==r?void 0:r[0],description:n})])).filter(Boolean)})),yp=(e,t)=>{if(e){const a={};return Object.entries(t).forEach((([t,r])=>{const n=_p(e,r);void 0!==n&&bp(t,a,n)})),a}return null};function bp(e,t,a){const r=e.split("."),n=r.length;let i=t;r.forEach((function(e,t){t===n-1?i[e]=a:(i[e]||(i[e]={}),i=i[e])}))}const fp=e=>{const t=Object.assign({},yp(e,Td));return t.soleProprietorship.vatAbsenceReason&&(t.soleProprietorship.vatNumber=""),e.solePropRegistrationDetails.taxId&&(t.soleProprietorship=Wm({taxId:e.solePropRegistrationDetails.taxId,exemptedFromTax:e.solePropRegistrationDetails.exemptedFromTax,country:e.solePropNameAndCountry.companyCountry,entity:t.soleProprietorship})),e.solePropRegistrationDetails.exemptedFromRegistrationNumber&&(t.soleProprietorship.registrationNumber=""),t.type=id.SOLE_PROPRIETORSHIP,t},hp=(e,t)=>i(void 0,void 0,void 0,(function*(){var a;const r=null===(a=null==e?void 0:e.solePropConstitutionalDocument)||void 0===a?void 0:a.constitutionalDocument;return(yield Promise.all([Nm({entityId:t,entityType:"legalEntity",documentType:cc.CONSTITUTIONAL_DOCUMENT,page1:null==r?void 0:r[0]})])).filter(Boolean)})),vp=(e,t=0)=>{var a;return(null===(a=null==e?void 0:e.attachments)||void 0===a?void 0:a[t].pageName)||null};function _p(e,t){return t.split(".").reduce(((e,t)=>e&&void 0!==e[t]?e[t]:void 0),e)}function Np(e){const{userDetails:t,handleGetIdVerificationToken:a,onIdVerificationClose:r,onIdVerificationError:n,onIdVerificationComplete:o}=e,s="adyen-kyc-id-verification";let d=null;const l=e=>i(this,void 0,void 0,(function*(){const{init:t}=yield import("onfido-sdk-ui");try{d=t({token:e,containerId:s,disableAnalytics:!0,useModal:!1,isModalOpen:!1,onUserExit:r,onComplete:o,steps:[{type:"document",options:{documentTypes:{[sm.PASSPORT]:!0,[sm.DRIVING_LICENCE]:!0,[sm.NATIONAL_IDENTITY_CARD]:!0,[sm.RESIDENCE_PERMIT]:!1}}}]})}catch(e){n(e)}}));return le((()=>((()=>{i(this,void 0,void 0,(function*(){try{const{firstName:e,lastName:r,residencyCountry:n}=t,i={name:{firstName:e,lastName:r},country:n,origin:`${window.location.origin}/*`},{sdkToken:o}=yield a("",i);l(o)}catch(e){n(e)}}))})(),()=>{d&&d.tearDown()})),[]),C("div",{id:s,className:s})}const Op={idDocumentType:{validate:e=>!!e,errorMessage:"fieldIsRequired",modes:["blur","input"]},instantIdVerificationData:{validate:e=>!!e,errorMessage:"fieldIsRequired",modes:["blur","input"]}};const Ip=yt((function(e){var a;const{i18n:r}=We(),n=ue(null),i=ue(null),[o,s]=se({}),[d,l]=se({}),[c,u]=se(!1),m=ue({setState:null}),p=!((null==e?void 0:e.formVerificationErrors)&&0===(null===(a=Object.keys(null==e?void 0:e.formVerificationErrors))||void 0===a?void 0:a.length)),g=["instantIdVerificationData"],{data:y,valid:b,errors:f,isValid:h,triggerValidation:v,fieldProblems:_,handleChangeFor:N,setData:O,setValid:I}=ua(Object.assign(Object.assign({},e),{schema:e.showIdVerification?g:["idDocumentType"],defaultData:e.data,rules:p?null==e?void 0:e.validators:Op,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{var t,a,r,n;(null===(t=e.data)||void 0===t?void 0:t.idDocumentType)&&!c?(O("idDocumentType",null===(a=e.data)||void 0===a?void 0:a.idDocumentType),s({idFrontPage:null===(r=e.data)||void 0===r?void 0:r.idFrontPage}),l({idBackPage:null===(n=e.data)||void 0===n?void 0:n.idBackPage}),v()):p&&this.triggerValidation()}),[e.data]);const E=e=>{var t;if(e)return null===(t=dm.find((({id:t})=>e===t)))||void 0===t?void 0:t.hasBackPage},T=ra(e,r),A=!!y.idDocumentType,S=E(y.idDocumentType),R=["idDocumentType",...A?["idFrontPage"]:[],...S?["idBackPage"]:[]];this.triggerValidation=()=>{var e,t;v(),null===(e=null==n?void 0:n.current)||void 0===e||e.triggerValidation(),S&&(null===(t=null==i?void 0:i.current)||void 0===t||t.triggerValidation())},le((()=>{m.current.setState({type:"addToState",value:{data:y,valid:b,errors:f,fieldProblems:_,caller:"idDocument",dataStoreId:e.id,schema:e.showIdVerification?g:e.showManualUpload?R:["idDocumentType"]}})}),[y,b,f,h]);const D=()=>C(t.Fragment,{children:[C(Ms,{heading:r.get("idDocument")}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:T,id:"ariaErrorField"}),C("div",{className:"adyen-kyc-document-upload__subtitle",dangerouslySetInnerHTML:{__html:r.get("idUploadDocumentSubtitle",{values:{name:e.name}})}}),C(Ue,Object.assign({name:"idDocumentType",label:r.get("selectDocumentType"),errorMessage:f.idDocumentType?r.get(f.idDocumentType.errorMessage):null,isValid:b.idDocumentType},{children:Jt("select",{onChange:N("idDocumentType","input"),name:"idDocumentType",placeholder:r.get("selectDocument"),selected:y.idDocumentType,items:dm.map((({id:e,name:t})=>({id:e,name:r.get(t)})))})})),C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",r.get("requirements")]})),C(vc,Object.assign({className:"adyen-kyc-document-upload__requirements"},{children:[C(hc,{children:r.get("documentNotExpiredOrDamaged")}),E(y.idDocumentType)?C(hc,{children:r.get("includeFrontAndBack")}):C(hc,{children:r.get("providePageWithPhotoAndCode")}),C(hc,{children:r.get("fullDocumentVisible")}),C(hc,{children:r.get("imagesInColor")})]})),A&&C(mc,{type:y.idDocumentType,className:"adl-u-margin-y-16"}),A&&C(bc,{name:"idFrontPage",label:r.get("frontPage"),ref:n,defaultData:o,id:e.id,isOptional:p,iconPrefix:uc(y.idDocumentType,!0,!0)}),A&&S&&C("div",Object.assign({className:"adl-u-margin-top-16"},{children:C(bc,{name:"idBackPage",label:r.get("backPage"),ref:i,defaultData:d,id:e.id,isOptional:p,iconPrefix:uc(y.idDocumentType,!0,!1)})}))]}),k=e=>{O("instantIdVerificationData",e),I("instantIdVerificationData",!0)};return C("div",Object.assign({className:"adl-individual-document-upload adl-individual-document-upload--idDocument"},{children:[C(Yl,{onChange:({currentState:t,prevState:a,changeInitiatedBy:r})=>{var n,i,o,d,c,u,m,p;if("idDocument"===r&&(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.idDocument.idDocumentType)!==(null===(o=null===(i=null==a?void 0:a.data)||void 0===i?void 0:i.idDocument)||void 0===o?void 0:o.idDocumentType)){const a=null===(d=t.data)||void 0===d?void 0:d.idDocument,r=_m(e.legalEntityId,null==a?void 0:a.idDocumentType),n=(null===(c=null==a?void 0:a.idFrontPage)||void 0===c?void 0:c[0])instanceof File,i=(null===(u=null==a?void 0:a.idBackPage)||void 0===u?void 0:u[0])instanceof File;r?(!n&&(null===(m=r.attachments)||void 0===m?void 0:m[0])&&s({idFrontPage:[{name:vp(r,0)}]}),!i&&(null===(p=r.attachments)||void 0===p?void 0:p[1])&&l({idBackPage:[{name:vp(r,1)}]})):(n||s({idFrontPage:null}),i||l({idBackPage:null}))}}}),C(Ys,{stateRef:m}),(()=>{var a;return e.handleGetIdVerificationToken?!(null===(a=e.data)||void 0===a?void 0:a.idDocumentType)&&!e.data.instantIdVerificationData||c?!e.showManualUpload&&e.showIdVerification?C(t.Fragment,{children:[C(Np,{handleGetIdVerificationToken:e.handleGetIdVerificationToken,name:e.name,userDetails:e.userDetails,onIdVerificationComplete:e=>k(e),onIdVerificationError:e=>console.error(e)}),C("div",Object.assign({className:"adyen-kyc-document-upload__manual-upload"},{children:[r.get("canNotCompleteInstantVerification"),"\xa0",r.get("goBackAndProvideDocumentScans")]}))]}):D():C(t.Fragment,{children:[C(Ms,{heading:r.get("documentVerification")}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:T,id:"ariaErrorField"}),C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:r.get("youHaveSuccessfullyProvidedTheIdDocument")})),C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[C("span",{children:[r.get("madeAMistake"),"\xa0"]}),C("button",Object.assign({className:"adl-link",title:r.get("submitIdDocumentsAgain"),type:"button",onClick:()=>{u(!0),e.setShowManualUpload(!1),e.setShowIdVerification(!1),O("idDocumentType",void 0),I("idDocumentType",!1)}},{children:r.get("submitIdDocumentsAgain")}))]}))]}):(e.setShowManualUpload(!0),D())})()]}))}),((e,t)=>B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name&&e.showIdVerification===t.showIdVerification&&e.showManualUpload===t.showManualUpload)),Ep=[{id:"instantVerification",name:"takePhotoOriginalDocumentWithPhone",subtitle:"instant",description:"instantIDVerificationDescription",iconComponentDesktop:"instant-verification-desktop",iconComponentMobile:"instant-verification-mobile",provider:"provider-logo-onfido"},{id:"manualVerification",name:"uploadScanOriginalIDDocument",subtitle:"takesLonger",description:"manualIDVerificationDescription",iconComponentDesktop:"manual-verification-desktop",iconComponentMobile:"manual-verification-mobile"}];function Tp(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(null===e[t]||Ss(e[t]))&&delete e[t];return e}const Ap={data:{},allData:{},errors:{},valid:{},fieldProblems:{},isValid:!1};function Sp({defaultData:e={},children:t}){const a={currentState:{data:e,allData:e,valid:{},errors:{},fieldProblems:{},validityByForm:{}},prevState:{},changeInitiatedBy:null},r=function(){const[e,t]=se({}),[a,r]=se([]);return{reducer:function({currentState:r},n){var i,o,s,d,l;switch(n.type){case"addToState":{const s=null!==(i=n.value.dataStoreId)&&void 0!==i?i:n.value.caller,d=n.value.schema||null,l=d&&(null===(o=null==e?void 0:e[s])||void 0===o?void 0:o.toString())!==d.toString(),c=Object.assign(Object.assign({},r),{data:Object.assign(Object.assign({},r.data),{[s]:Object.assign(Object.assign({},r.data[s]),n.value.data)}),allData:Object.assign(Object.assign({},r.allData),{[s]:Object.assign(Object.assign({},r.allData[s]),Tp(n.value.data))}),errors:Object.assign(Object.assign({},r.errors),{[s]:Object.assign(Object.assign({},r.errors[s]),n.value.errors)}),valid:Object.assign(Object.assign({},r.valid),{[s]:Object.assign(Object.assign({},r.valid[s]),n.value.valid)}),fieldProblems:Object.assign(Object.assign({},r.fieldProblems),{[s]:Object.assign(Object.assign({},r.fieldProblems[s]),n.value.fieldProblems)})});if(l){t(Object.assign(Object.assign({},e),{[s]:d}));const a=d.reduce(((e,t)=>{var a;const r=c.data[s],n=c.allData[s],i=c.valid[s],o=c.errors[s],d=c.fieldProblems[s];return{data:Object.assign(Object.assign({},e.data),{[t]:null!==(a=r[t])&&void 0!==a?a:n[t]}),valid:Object.assign(Object.assign({},e.valid),{[t]:i[t]}),errors:Object.assign(Object.assign({},e.errors),{[t]:o[t]}),fieldProblems:Object.assign(Object.assign({},e.fieldProblems),{[t]:d[t]})}}),{data:{},valid:{},errors:{},fieldProblems:{}});c.data[s]=a.data,c.valid[s]=a.valid,c.errors[s]=a.errors,c.fieldProblems[s]=a.fieldProblems}return c.validityByForm=Object.assign(Object.assign({},c.validityByForm),{[s]:Object.values(c.valid[s]).every((e=>e))}),c.allValid=Object.values(c.validityByForm).every((e=>e)),c.isValid=a.length?a.every((e=>c.validityByForm[e])):c.allValid,{currentState:c,prevState:r,changeInitiatedBy:s}}case"resetState":{const e=null!==(d=null===(s=n.value)||void 0===s?void 0:s.dataStoreId)&&void 0!==d?d:null===(l=n.value)||void 0===l?void 0:l.caller;return{currentState:Ap,prevState:r,changeInitiatedBy:e}}default:throw new Error(`Unhandled action type: ${n.type}`)}},setCurrentForms:e=>{r(e)}}}(),[n,i]=de(r.reducer,a),o={state:n,dispatch:i,setActiveForms:r.setCurrentForms,getData:()=>{var e,t;return null!==(t=null===(e=null==n?void 0:n.currentState)||void 0===e?void 0:e.data)&&void 0!==t?t:{}}};return C(Xs.Provider,Object.assign({value:o},{children:t}))}const Rp=t.createContext(null);var Cp;function Dp(e){const t=ue(null),{label:r,subLabel:n,actionLabel:i,type:o,duration:s,onToastHide:d}=e,l=o===Cp.LOADING,c=o===Cp.SUCCESS,u=Ve("toast"),m=()=>{t.current.classList.remove("adl-toast--visible"),d()};return le((()=>{t.current.classList.add("adl-toast--visible"),setTimeout((()=>{m()}),s)}),[r]),C("div",Object.assign({ref:t,role:i?"alertdialog":"alert",className:"adl-toast","aria-labelledby":u},{children:[l&&C("div",Object.assign({className:"adl-toast__loader"},{children:C("div",{className:"adl-loading-indicator adl-loading-indicator--small adl-loading-indicator--dark"})})),!l&&o&&C("div",Object.assign({className:a("adl-toast__status",{"adl-toast__status--success":c,"adl-toast__status--error":!c})},{children:[c&&C(xe,{className:"adl-toast__status-icon",name:"checkmark"}),!c&&C(xe,{className:"adl-toast__status-icon",name:"cross"})]})),C("div",Object.assign({className:"adl-toast__message"},{children:[C("span",Object.assign({id:u,className:"adl-toast__title"},{children:r})),i&&C("button",Object.assign({className:"adl-link adl-toast__action",title:"performAction",type:"button",onClick:e.onToastAction},{children:i})),!l&&n&&C("span",Object.assign({className:"adl-toast__subtitle"},{children:n}))]})),!l&&C("button",Object.assign({className:"adl-toast__close",title:"close",type:"button",onClick:m},{children:C(xe,{name:"cross"})}))]}))}function kp({children:e}){const[t,a]=se(null);return C(Rp.Provider,Object.assign({value:{showToast:e=>{a(e)}}},{children:[!!t&&C("div",Object.assign({className:"adyen-kyc-dropin__toast-stack"},{children:C("div",Object.assign({className:"adyen-kyc-dropin__toast-context"},{children:C(Dp,Object.assign({},t,{onToastHide:()=>{a(null)}}))}))})),e]}))}!function(e){e.LOADING="loading",e.SUCCESS="success",e.ERROR="error"}(Cp||(Cp={})),Dp.defaultProps={duration:3500};const Lp={editPrefilledCountry:!0,changeLegalEntityType:!0,enableTrustFlow:!1};function wp({children:e,settings:t={}}){return C(Kd.Provider,Object.assign({value:{isSettingEnabled:e=>t&&e in t?t[e]:Lp[e]}},{children:e}))}const Pp={xsOnly:"adyen-layout-xs-only",md:"adyen-layout-md",lg:"adyen-layout-lg"},jp={md:680,lg:1024};class xp extends P{constructor(e){super(e),this.handleStateChange=({currentState:e})=>{this.setState(e)}}formatData(){return Object.assign({},this.state.data)}get isValid(){return!!this.state.isValid}assignLayout(e,t){let a=[];e.forEach((e=>{var r;const n=null===(r=e.contentBoxSize)||void 0===r?void 0:r[0].inlineSize;n?a=(e=>{const t=Object.entries(jp).reduce(((t,[a,r])=>(r<=e&&t.push(Pp[a]),t)),[]);return t.length>0?t:["adyen-layout-xs-only"]})(n):a.push(Pp.lg),t.classList.remove(...Object.values(Pp)),t.classList.add(...a)}))}renderDropinComponent(){return C("div",{children:"Placeholder for dropin component"})}render(){return C(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey,contextCountry:this.props.country,commonProps:{showInlineErrors:this.props.showInlineErrors},isReview:this.props.isReview},{children:C(Sp,Object.assign({defaultData:this.props.data},{children:C(wp,Object.assign({settings:this.props.settings},{children:[C(Yl,{owner:"Dropin",onChange:this.handleStateChange}),C("div",Object.assign({className:"adyen-kyc-dropin-container adl-u-position-relative"},{children:C(kp,{children:this.renderDropinComponent()})}))]}))}))}))}}const Mp=["idVerificationMethod"];function Fp(e){const{i18n:a,loadingContext:r}=We(),n=e.id,i=Mp,o=ue({setState:null}),s=`${r}static/images/id-verification-method`,{handleChangeFor:d,data:l,valid:c,errors:u,isValid:m,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:i,defaultData:Object.assign(Object.assign({},e.data),{idVerificationMethod:"manualVerification"}),rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),y=ra(e,a);return this.triggerValidation=()=>{p(["idVerificationMethod"])},le((()=>{o.current.setState({type:"addToState",value:{data:l,valid:c,errors:u,fieldProblems:g,caller:n,dataStoreId:n,schema:i}})}),[l,c,u,m]),C("div",{children:[C(Ys,{owner:n,stateRef:o}),C("form",Object.assign({className:"adyen-kyc-verification-method"},{children:[C(Ms,{heading:a.get("verificationMethod")}),C("div",{dangerouslySetInnerHTML:{__html:a.get("idUploadDocumentSubtitle",{values:{name:e.name}})}}),C("div",{children:a.get("weAccept")}),C(vc,Object.assign({className:"adl-u-margin-bottom-16"},{children:[C(hc,{children:a.get("passport")}),C(hc,{children:a.get("identityCard")}),C(hc,{children:a.get("driversLicense")})]})),C(Ue,Object.assign({name:"verificationMethods",useLabelElement:!1,errorMessage:y.getErrorMessage("idVerificationMethod",u,g)},{children:C("div",Object.assign({className:"adyen-kyc-field-verification-methods"},{children:Ep.map((e=>C(zt,Object.assign({item:e,uniqueId:e.id,i18n:a,value:l.idVerificationMethod,onChange:d("idVerificationMethod"),name:e.id,labelClassName:"adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"},{children:[C(zt.Icon,{children:C("div",Object.assign({className:"adyen-kyc-radio-group-card__illustration"},{children:C("picture",{children:[C("source",{type:"image/svg+xml",media:`(min-width: ${jp.md}px)`,srcSet:`${s}/${e.iconComponentDesktop}.svg`}),C("source",{type:"image/svg+xml",media:`(max-width: ${jp.md}px)`,srcSet:`${s}/${e.iconComponentMobile}.svg`}),C("img",{srcSet:`${s}/${e.iconComponentDesktop}.svg`,alt:`${e.iconComponentDesktop}`})]})}))}),e.provider&&C(zt.Footer,{children:C("div",Object.assign({className:"adyen-kyc-field-verification-methods__footer"},{children:[a.get("poweredBy"),C("img",{src:`${s}/${e.provider}.svg`,alt:`${e.provider}-logo`})]}))})]}),e.id)))}))})),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:y,id:"ariaErrorField"}),C(ul,{page:"Instant verification with Onfido",title:a.get("howVerificationWithOnfidoWorks"),content:C(t.Fragment,{children:[C("div",Object.assign({className:"adl-u-margin-bottom-8"},{children:a.get("onfidoIsOurTrustedPartner")})),C(vc,Object.assign({className:"adyen-kyc-id-verification-method__guidance adl-u-margin-bottom-8"},{children:[C(hc,{children:a.get("usePhoneToScanId")}),C(hc,{children:a.get("onfidoWillGiveFeedbackInRealTime")}),C(hc,{children:a.get("theIdCheckWillBeAutomaticallyValidated")})]})),C("div",Object.assign({className:"adl-u-margin-bottom-8"},{children:a.get("adyenKeepsDataAsLongAsLegallyRequired")})),C(ed,Object.assign({href:"https://www.adyen.com/policies-and-disclaimer/privacy-policy-archive-21",external:!0},{children:a.get("learnMore")}))]}),titleId:"howVerificationWithOnfidoWorks",contentId:"howVerificationWithOnfidoWorksContent"})]}))]})}var Vp;!function(e){e.BANK_STATEMENT="bankStatement",e.UTILITY_BILL="utilityBill",e.GOVERNMENT_ISSUED_CORRESPONDENCE="governmentIssuedCorrespondence",e.TAXATION_DOCUMENT="taxationDocument",e.EXTRACT_FROM_MUNICIPAL_PERSONAL_RECORDS_DATABASE="extractFromMunicipalPersonalRecordsDatabase",e.SALARY_SLIP="salarySlip",e.MORTGAGE_STATEMENT="mortgageStatement",e.CERTIFICATE_OF_VOTER_REGISTRATION="certificateOfVoterRegistration"}(Vp||(Vp={}));const Up=[{id:Vp.BANK_STATEMENT,name:"bankStatement"},{id:Vp.UTILITY_BILL,name:"utilityBill"},{id:Vp.GOVERNMENT_ISSUED_CORRESPONDENCE,name:"governmentIssuedCorrespondence"},{id:Vp.TAXATION_DOCUMENT,name:"taxationDocument"},{id:Vp.EXTRACT_FROM_MUNICIPAL_PERSONAL_RECORDS_DATABASE,name:"extractFromMunicipalPersonalRecordsDatabase"},{id:Vp.SALARY_SLIP,name:"salarySlip"},{id:Vp.MORTGAGE_STATEMENT,name:"mortgageStatement"},{id:Vp.CERTIFICATE_OF_VOTER_REGISTRATION,name:"certificateOfVoterRegistration"}];const Bp=yt((function(e){var{ref:a,id:r}=e,i=n(e,["ref","id"]);const{i18n:o}=We(),[s,d]=se(Up[0].id),l=s===Vp.MORTGAGE_STATEMENT||s===Vp.CERTIFICATE_OF_VOTER_REGISTRATION,c=C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",o.get("requirements")]})),C(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[C(hc,{children:o.get("documentAddressedToName",{values:{name:i.name}})}),C(hc,{children:o.get("showAddressStateCountry")}),C(hc,{children:l?o.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:12}}):o.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:3}})}),C(hc,{children:o.get("fullDocumentVisibleWithReadableText")}),C(hc,{children:o.get("documentCannotBeDamaged")})]}))]});return C("div",{children:C(fc,Object.assign({},i,{name:i.name,documentField:"proofOfResidence",documentType:cc.PROOF_OF_RESIDENCY,ref:a,heading:o.get("proofOfResidence"),guidanceHeader:C("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:o.get("proofOfResidenceDocumentTypeLabel",{values:{name:i.name}})})),documentTypeSelect:{selectedType:s,setSelectedType:d,options:Up},guidanceContent:c,id:r}))})}),((e,t)=>B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&B(e.requiredFields,t.requiredFields)&&e.name===t.name)),Wp={personalDetails:{formId:"personalDetails",formName:"personalDetails",fields:im},address:{formId:"address",formName:"address",fields:["address"]},idVerificationMethod:{formId:"idVerificationMethod",formName:"verificationMethod",fields:["idVerificationMethod"]},idDocument:{formId:"idDocument",formName:"idDocument",fields:["idDocumentType","idFrontPage","idBackPage","idDocument"]},proofOfResidence:{formId:"proofOfResidence",formName:"proofOfResidence",fields:["proofOfResidence"]},proofOfNationalId:{formId:"proofOfNationalId",formName:"proofOfNationalId",fields:["proofOfNationalId"]}},Hp=Wp.personalDetails.formId,qp=Wp.address.formId,Gp=Wp.idDocument.formId,$p=Wp.idVerificationMethod.formId,Xp=Wp.proofOfResidence.formId,Yp=Wp.proofOfNationalId.formId,Kp=[$p,Gp,Xp,Yp];function zp({trackingConig:e={topLevelLegalEntity:{}},parentLegalEntity:t,legalEntity:a,task:r}){const{topLevelLegalEntity:n}=e,i={task:r,flow:null==n?void 0:n.type,topLevelLegalEntityId:n.id,topLevelLegalEntityType:n.type};return t&&(i.parentLegalEntityId=t.id,i.parentLegalEntityType=t.type),a&&(i.legalEntityId=a.id,i.legalEntityType=a.type),i}const Zp={BANK_CODE:"bankCode",BRANCH_CODE:"branchCode",COUNTRY:"country",NUMBER:"bankAccountNumber",BANK_CITY:"bankCity",SWIFT_CODE:"swiftCode",IBAN:"iban",OWNER_NAME:"accountHolder",BANK_NAME:"bankName",BANK_COUNTRY:"bankCountry",OWNER_CITY:"accountHolderCity"},Qp=[Zp.NUMBER,Zp.IBAN],Jp={AU:{branchCode:{label:"bsbNumber"}},BR:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},"CA--CAD":{branchCode:{label:"transitNumber"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},CA:{bankCode:{label:"institutionNumber"},branchCode:{label:"transitNumber"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},"GB--GBP":{branchCode:{label:"sortCode"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},GB:{branchCode:{label:"sortCode"},bankCity:{label:"bankCityTown"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},"GB--EUR":{bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},HK:{bankCode:{label:"clearingCode"},branchCode:{label:"branchCode"}},ID:{branchCode:{label:"clearingCode"}},NZ:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},"SG--SGD":{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},SG:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},US:{branchCode:{label:"achRoutingNumber"}}},eg=e=>{if(!e)return;if("bic_either8or11"===e)return{modes:["blur","input"],validate:e=>/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/.test(e),errorMessage:"validation8Or11Characters"};const[t,a,r]=e.split(":");if("iban"===t)return{modes:["blur","input"],validate:e=>js(e,+a),errorMessage:{translationKey:"validationCharacters",translationObject:{values:{length:a}}}};if("digits"===t){if(r){const e=new RegExp(`^\\d{${a},${r}}$`,"");return{modes:["blur","input"],validate:t=>e.test(t),errorMessage:{translationKey:"validationDigitsBetween",translationObject:{values:{start:a,end:r}}}}}const e=new RegExp(`^\\d{${a}}$`,"");return{modes:["blur","input"],validate:t=>e.test(t),errorMessage:{translationKey:"validationDigits",translationObject:{values:{length:a}}}}}},tg={role:{rule:"REQUIRED"},firstName:{rule:"REQUIRED"},lastName:{rule:"REQUIRED"},birthDate:{rule:"REQUIRED"},phoneNumber:{rule:"contactsIfRequiredForRole"},email:{rule:"contactsIfRequiredForRole"},jobTitle:{rule:"jobTitleIfRequiredForRole"},address:{rule:"REQUIRED"},residencyCountry:{rule:"REQUIRED"},proofOfResidence:{rule:"isProofOfResidenceRequired"},proofOfNationalId:{rule:"isProofOfNationalIdRequired"},isPartOfTrust:{rule:"partOfTrustFieldsOnlyAU"},accountHolder:{rule:"accountHolderIfCustomer"}},ag={idNumber:{rule:"REQUIRED",verify:"isVerificationAllowedForCountry"},idNumberExempt:{rule:"idNumberExemptIfApplicableCountry"},idDocument:{rule:"idDocumentIfIdNumberExempted"},idVerificationMethod:{rule:"idDocumentIfIdNumberExempted"}},rg={typeOfIdentity:{rule:"requiredIfCountryUsesMultipleTypesOfIdentity"},issuerState:{rule:"requiredIfIdentityTypeIsDriversLicense"},licenseCardNumber:{rule:"requiredIfIdentityTypeIsDriversLicense"}},ng={L0:V(["address","birthDate"]).from(tg),L1:tg,L1_ID:Object.assign(Object.assign(Object.assign({},tg),ag),rg),L1_IDO:Object.assign(Object.assign(Object.assign({},tg),ag),rg),L1_NAT:Object.assign(Object.assign(Object.assign(Object.assign({},tg),ag),rg),{nationality:{rule:"REQUIRED"}}),L1_IDDOC:{idDocument:{rule:"REQUIRED"}}},ig={US:{idNumber:{label:"socialSecurityNumber",placeholder:"SSNFormatUS"},idNumberExempt:{label:"uploadDocumentForSsn"}},CA:{idNumber:{label:"socialInsuranceNumber",placeholder:"SINFormatCA"},idNumberExempt:{label:"uploadDocumentForSsn"}},IT:{idNumber:{label:"codiceFiscale"}},BR:{idNumber:{label:"cadastroDePessoasFisicas"}},SE:{idNumber:{label:"personnummer"}},ES:{idNumber:{label:"dniNumber"}}},og={trustType:{rule:"REQUIRED"},legalName:{rule:"REQUIRED"},country:{rule:"REQUIRED"},taxId:{rule:"REQUIRED"},registrationAddress:{rule:"REQUIRED"},operationalAddress:{rule:"OPTIONAL"}},sg={L0:Object.assign({},og),L1:Object.assign({},og),L:Object.assign({},og)},dg={AU:{taxId:{label:"australianBusinessNumberAbn"}}},lg={legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},tradingName:{rule:"REQUIRED"},registrationNumber:{rule:"SolePropsRegistrationNumberRules"},exemptedFromRegistrationNumber:{rule:"SolePropsExemptedFromRegistrationNumberRules"},registrationAddress:{rule:"REQUIRED"},stockExchangeMIC:{rule:"stockExchangeMICIfTypePublic"},stockISIN:{rule:"stockISINIfTypePublic"}},cg={L0:{legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"}},L1:Object.assign({},lg),L2:Object.assign({},lg),L:Object.assign(Object.assign({},lg),{vatNumber:{rule:"vatRules"},exemptedFromVat:{rule:"vatRules"},vatAbsenceReason:{rule:"vatRules"},taxId:{rule:"taxIdRules"},exemptedFromTax:{rule:"SolePropsExemptedFromTaxRules"}}),L_ConstDoc:{constitutionalDocument:{rule:"REQUIRED"}}},ug=xd;const mg=(e,t)=>(e&&Object.entries(e).forEach((([e,a])=>{t[e]=Object.assign(Object.assign({},t[e]),a)})),t);const pg=(e,t)=>null==t?void 0:t.some((t=>{var a,r;return(null===(a=null==t?void 0:t.fields)||void 0===a?void 0:a.includes(e))&&(null===(r=null==t?void 0:t.forms)||void 0===r?void 0:r.some((e=>e===Wp.idDocument.formId||e===Wp.proofOfResidence.formId||e===Wp.proofOfNationalId.formId||e===_c.companyRegistrationDocument.formId||e===_c.companyTaxDocument.formId||e===kc.solePropConstitutionalDocument.formId)))})),gg=({onNext:e,onBack:t,onHome:a,homeButtonLabel:r,backButtonLabel:n,nextButtonLabel:i,hideOnHomeButton:o,hideBackButton:s})=>C("div",Object.assign({className:"adyen-action-bar"},{children:[(t||e)&&C("div",Object.assign({className:"adyen-action-bar__action"},{children:[t&&!s&&C(Gc,{label:n,className:"adyen-action-bar__button",secondary:!0,onClick:()=>t(),testId:"backBtn"}),e&&C(Gc,{label:i,className:"adyen-action-bar__button",onClick:e,testId:"nextBtn"})]})),a&&r&&!o&&C("div",Object.assign({className:"adyen-action-bar__action"},{children:C(Gc,{className:"adyen-action-bar__button",label:r,secondary:!0,onClick:()=>a(),testId:"homeBtn"})}))]})),yg=()=>{const{i18n:e,isReview:t}=We();return t?C("div",Object.assign({className:"adl-review-alert"},{children:C(zs,{hasCloseButton:!1,type:Ks.WARNING,title:e.get("verifyCompanyInfoIsUpToDate")})})):null},bg={formId:"summary",formName:"summary"};function fg({data:e,forms:t,omittedKeys:a,gotoForm:r,labels:n,problems:i,trackNavigation:o=G,omittedForms:s=[]}){var d,l;const{i18n:c}=We(),u=(null==i?void 0:i.validationErrors)&&(null===(d=Object.values(null==i?void 0:i.validationErrors))||void 0===d?void 0:d.reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{})),m=(null==i?void 0:i.verificationErrors)&&(null===(l=Object.values(null==i?void 0:i.verificationErrors))||void 0===l?void 0:l.reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{})),p=ra({labels:n},c),g=(e,a)=>C("ul",Object.assign({className:"adyen-kyc-summary__heading-section"},{children:[C("li",{children:C("span",Object.assign({className:"adyen-kyc-summary__form-heading"},{children:e}))}),C("li",{children:C(Gc,{className:"adyen-kyc-summary__edit-form-button",ghost:!0,circle:!0,tertiary:!0,icon:"edit",onClick:()=>{o({fromForm:{formName:"summary",formId:"summary"},toForm:{formId:a,formName:e},component:"Pencil icon"}),(e=>{const a=t.findIndex((t=>t.formId===e));a>=0&&r(a)})(a)},title:c.get("edit"),label:c.get("edit"),labelHoverBox:!0})})]})),y=(e,t,a,r)=>C("li",Object.assign({className:"adyen-kyc-summary__item"},{children:[g(a,r),C("ul",Object.assign({className:"adyen-kyc-summary__content-section"},{children:f(e,t)}))]})),b=(e={},t,a)=>{const r=[];return e&&Object.entries(e).forEach((([e,n])=>{const i=c.get(null==t?void 0:t[e])||c.get(e);"object"==typeof n&&null!==n&&r.push(y(n,t,i,a))})),r},f=(e={},t={})=>{const r=[];return e&&Object.entries(e).forEach((([e,n])=>{const i=c.get(t[e])||c.get(e);"object"!=typeof n||null===n||(null==a?void 0:a.includes(e))?"string"!=typeof n||(null==a?void 0:a.includes(e))||r.push(C("li",Object.assign({className:"adyen-kyc-summary__data-item"},{children:[C("span",Object.assign({className:"adyen-kyc-summary__field"},{children:i})),C("span",Object.assign({className:"adyen-kyc-summary__data"},{children:n}))]}))):r.push(C("li",Object.assign({className:"adyen-kyc-summary__item-nested"},{children:C("ul",Object.assign({className:"adyen-kyc-summary__content-section-nested"},{children:f(n,t)}))})))})),r};return C("div",Object.assign({role:"region",className:"adyen-kyc-summary"},{children:[C("h2",Object.assign({className:"adyen-kyc-summary__heading"},{children:c.get("summary")})),C(yg,{}),C(qc,{validationErrors:u,verificationErrors:m,formUtils:p,id:"ariaErrorField"}),C("ul",Object.assign({className:"adyen-kyc-summary"},{children:(e=>{const a=[];return t.forEach((({formId:t,formName:r})=>{var i;const o=null==e?void 0:e[t];if(!o||Object.keys(o).every((e=>Ss(o[e])))||t===bg.formId||(null==s?void 0:s.includes(t)))return;const d=(null===(i=null==e?void 0:e[t])||void 0===i?void 0:i.hasInnerForms)?b(null==e?void 0:e[t],null==n?void 0:n[t],t):(null==e?void 0:e[t])?y(null==e?void 0:e[t],null==n?void 0:n[t],c.get(r),t):null;a.push(d)})),a})(e)}))]}))}const hg=e=>{const{content:t,footer:a}=e;return C("div",Object.assign({className:"adyen-kyc-dropin"},{children:[C("div",Object.assign({className:"adyen-kyc-dropin__content"},{children:C("div",Object.assign({className:"adyen-kyc-dropin__content-main"},{children:t}))})),a&&C("div",Object.assign({className:"adyen-kyc-dropin__footer-container"},{children:a}))]}))},vg=({trackNavigation:e,form:t,isActive:r,onClick:n,hasVerificationErrors:i})=>{const{i18n:o}=We();return C("li",Object.assign({className:a("adyen-kyc-form-navigation__item",{"adyen-kyc-form-navigation__item--active":r,"adyen-kyc-form-navigation__item--valid":t.isValid,"adyen-kyc-form-navigation__item--isnav":n}),onClick:()=>{e(),n()}},{children:[o.get(t.formName),t.hasServerValidationErrors&&C("span",Object.assign({className:"adyen-kyc-form-navigation__item-icon adyen-kyc-form-navigation__item-icon--error"},{children:C(Zs,{type:Ks.WARNING})})),t.isValid&&!t.hasServerValidationErrors&&!i&&C("span",Object.assign({className:"adyen-kyc-form-navigation__item-icon adyen-kyc-form-navigation__item-icon--success"},{children:C(xe,{name:"checkmark-small"})}))]}),t.formId)};function _g({forms:e,activeForm:t,gotoForm:r,validateForm:n,className:i,taskName:o,hasVerificationErrors:s,trackNavigation:d=G}){const{i18n:l}=We(),c=t=>null==e?void 0:e.findIndex((e=>e.formId===t.formId)),u=c(t)+1,m=null==e?void 0:e.length,p=(t,a)=>{const i=c(t),o=[...e];o.length=i;return o.every((e=>e.isValid))?((e,t)=>()=>{if(e.formId!==t.formId){const t=c(e);r(t)}})(t,a):a.isValid?null:n};return C("div",Object.assign({className:a("adyen-kyc-form-navigation",i)},{children:[C("div",Object.assign({className:"adyen-kyc-form-navigation__header"},{children:l.get(o)})),C("ul",Object.assign({className:"adyen-kyc-form-navigation__items"},{children:[e&&C("li",Object.assign({className:"adyen-kyc-form-navigation__home-button-item"},{children:C("span",Object.assign({className:"adyen-kyc-form-navigation__step-count"},{children:l.get("stepsX/YofForm",{values:{activeFormIndex:u,totalForms:m,taskName:o}})}))})),null==e?void 0:e.map((e=>C(vg,{form:e,isActive:e.formId===t.formId,onClick:p(e,t),trackNavigation:()=>d({fromForm:e,toForm:t,component:"FormNavigation"}),hasVerificationErrors:s},e.formId)))]}))]}))}function Ng({children:e,forms:t,setFormIndex:a}){return C(Qs.Provider,Object.assign({value:{setFormIndex:a,goToFormByFieldName:e=>{const r=t.findIndex((t=>{var a;return null===(a=null==t?void 0:t.fields)||void 0===a?void 0:a.some((t=>t===e))}));r>-1?a(r):console.error("No form was found to have that field so form navigation failed.")}}},{children:e}))}function Og(e,a){const{getComponentForms:r,parseConfiguration:n,rules:o,labels:s,getTaskName:d}=a;return a=>{var l,c,u;const{i18n:m,loadingContext:p,clientKey:g,contextCountry:y,setContextCountry:b,isReview:f,setPayoutDefaultCurrency:h}=We(),{isSettingEnabled:_}=zd(),{getData:N}=Kl(),{getOmittedKeys:O=null,formatData:I=null,omittedForms:E}=a.summary||{},T=r(a),A=d(a),[S]=se(f?[bg,...Object.values(T),bg]:[...Object.values(T),bg]),[R,D]=se(S),[k,L]=se(!1),[P,j]=se(!1),[x,M]=se(!1),[F,V]=se(!1),[U,B]=se(!1),[W,H]=se(null),[q,G]=se(!1),[X,Y]=se({}),[K,z]=se((()=>{var e,t,r,n;if((null===(e=null==a?void 0:a.problems)||void 0===e?void 0:e.remediationActions)&&Object.keys(null===(t=null==a?void 0:a.problems)||void 0===t?void 0:t.remediationActions).length>0){const e=Object.values(null===(r=null==a?void 0:a.problems)||void 0===r?void 0:r.remediationActions).flat().filter((e=>{var t;return(null===(t=e.forms)||void 0===t?void 0:t.length)>0}));if(1===e.length&&1===(null===(n=e[0])||void 0===n?void 0:n.forms.length)){const t=R.find((t=>{var a;return(null==t?void 0:t.formId)===(null===(a=e[0])||void 0===a?void 0:a.forms[0])}));if(t)return t}return R[R.length-1]}return R[0]})()),[Z,Q]=se({}),J=ue(null),[ee,te]=se(null),[ae,re]=se(Fu.SUCCESS),[ne,ie]=se(a.data),[oe,de]=se(a),[ce,me]=se(a.country||y),[pe,ge]=se(null),[ye,be]=se(null);le((()=>{!function(e){oc?Promise.resolve():v({loadingContext:e,path:"static/images/country-flags.svg"},null,"text").then((e=>{document.body.insertBefore(dc(e),document.body.firstChild),oc=!0}))}(p),lc(p)}),[p]),le((()=>{n&&ce&&(re(Fu.LOADING),$({loadingContext:p,clientKey:g,country:ce,capabilities:a.capabilities,legalEntityType:a.legalEntityType}).then((e=>{var t;const{matchingScenario:a,requiredFields:r,bankVerificationProviders:i}=e,o=null===(t=null==r?void 0:r.payout)||void 0===t?void 0:t.currency;o&&h(o);const s=n({requiredFields:r,matchingScenario:a,country:ce,bankVerificationAvailable:i&&!!i[ce]&&!!oe.handleGetBankVerificationVendors});te(s),be(r),ge(i),fe(s,ce,N(),_,r),re(Fu.SUCCESS)})).catch((e=>{console.warn("WARNING: Configuration failed - error:",e),re(Fu.SUCCESS)})))}),[ce]);const fe=(e,t,r,n,i)=>{var d,l;const c=function(e,t={},a={},r,n){var i;const o={},s={},d={},l={},c={},u={},m={},p={};if(e)return null===(i=Object.entries(r))||void 0===i||i.forEach((([r,i])=>{var g;null===(g=null==i?void 0:i.fields)||void 0===g||g.forEach((i=>{var g;const y=e[i],b=y&&("REQUIRED"===(null==y?void 0:y.rule)||(null==t?void 0:t[y.rule])&&"REQUIRED"===t[y.rule]()),f=pg(i,n)||b;f&&(o[r]=o[r]?[...o[r],i]:[i],d[r]=d[r]?[...d[r],i]:[i]);const h=y&&("OPTIONAL"===y.rule||(null==t?void 0:t[y.rule])&&"OPTIONAL"===t[y.rule]());if(!f&&h&&(s[r]=s[r]?[...s[r],i]:[i],d[r]=d[r]?[...d[r],i]:[i]),y){const e=(null===(g=null==a?void 0:a[i])||void 0===g?void 0:g.call(a))||y.label;e&&(c[r]=c[r]?Object.assign(Object.assign({},c[r]),{[i]:e}):{[i]:e}),y.verify&&("string"!=typeof y.verify||t[y.verify]())&&(l[r]=l[r]?[...l[r],i]:[i]),y.placeholder&&(u[r]=Object.assign(Object.assign({},u[r]||{}),{[i]:y.placeholder})),y.validators&&(m[r]=Object.assign(Object.assign({},m[r]||{}),{[i]:y.validators})),y.masked&&(p[r]=p[r]?[...p[r],i]:[i])}}))})),{requiredFields:o,optionalFields:s,allFields:d,labels:c,verifyFields:l,placeholders:u,validators:m,maskedFields:p}}(e,o?o({data:r,country:t,taskType:a.taskType,isSettingEnabled:n,requiredFields:i}):{},s?s(r,t):{},T,(null===(d=null==a?void 0:a.problems)||void 0===d?void 0:d.remediationActions)&&Object.values(null===(l=null==a?void 0:a.problems)||void 0===l?void 0:l.remediationActions));de(Object.assign(Object.assign(Object.assign({},a),c),{country:ce}))},he=({fromForm:e,toForm:t,component:r})=>{w.addEvent("Navigated form",{segmentation:Object.assign(Object.assign({},null==a?void 0:a.baseTrackingPayload),{component:r,from:e.formId,fromLabel:m.get(e.formName),to:t.formId,toLabel:m.get(t.formName)})})},ve=e=>{J.current.verifyForm?J.current.verifyForm(K.formId).then((t=>{t&&z(R[e])})):z(R[e])},_e=()=>{J.current.triggerCurrentFormValidation()},Ne=(e,t,r=!1)=>{var n,i;if(J.current.customNavigationHandler)return void J.current.customNavigationHandler();if(null===(n=X[K.formId])||void 0===n?void 0:n.onNext)return void(null===(i=X[K.formId])||void 0===i||i.onNext());const o=(null==oe?void 0:oe.allFields)||{};var s;if(Te(K))q?a.navigateBackToTaskList():a.onSubmit({data:N(),forms:R,allFields:o,setLoadingStatus:re});else if(Z[K.formId]||r){if(Ie())return void a.onSubmit({data:N(),forms:R,allFields:o,setLoadingStatus:re});const e=R.findIndex((e=>e.formId===K.formId))+1;ve(e);const t=R[e];he({fromForm:K,toForm:t,component:"ActionBar"}),s=K,w.addEvent("Completed form section",{segmentation:Object.assign(Object.assign({},null==a?void 0:a.baseTrackingPayload),{sectionName:s.formId})})}else _e()},Oe=()=>{if(Ee())a.handleBackClick&&a.handleBackClick();else{const e=R.findIndex((e=>e.formId===K.formId));if(e){const t=R[e],a=R[e-1];z(a),he({fromForm:t,toForm:a,component:"ActionBar"})}}},Ie=()=>R.findIndex((e=>e.formId===K.formId))===R.length-1,Ee=()=>0===R.findIndex((e=>e.formId===K.formId)),Te=e=>e.formId===bg.formId;le((()=>(a.eventEmitter.on("next",Ne),a.eventEmitter.on("back",Oe),a.eventEmitter.on("validate",_e),()=>{a.eventEmitter.off("next",Ne),a.eventEmitter.off("back",Ne),a.eventEmitter.off("validate",_e)})),[K,R]),le((()=>{const e=S.filter((e=>{return t=e.formId,!oe.requiredFields&&!oe.optionalFields||!!oe.requiredFields[t]||!!oe.optionalFields[t]||Te(e);var t}));D(e)}),[oe.requiredFields]),le((()=>{ie(a.data)}),[a.data]);const Ae=e=>{Q(e.validityByForm||e.valid),e.validityByForm||a.onChange(e)},Se=!k&&!x&&C(gg,{onNext:Ne,onBack:Oe,backButtonLabel:m.get("back"),nextButtonLabel:f?Te(K)?m.get("confirm"):m.get("next"):Ie()?m.get(null!=W?W:"submit"):m.get("next"),onHome:()=>i(this,void 0,void 0,(function*(){var e,t;const r=N();if((yield null===(e=a.hasDataChanged)||void 0===e?void 0:e.call(a,r))&&(null===(t=a.canSubmit)||void 0===t?void 0:t.call(a,r))){b(ce);const e=(null==oe?void 0:oe.allFields)||{};yield a.onSubmit({data:r,forms:R,allFields:e,setLoadingStatus:re})}else a.handleHomeClick()})),homeButtonLabel:a.homeButtonLabel,hideOnHomeButton:F,hideBackButton:U}),Re=C("div",Object.assign({className:"adyen-kyc-form-container"},{children:C(Vu,Object.assign({status:ae,formOpacityWhenLoading:.3,loaderSize:"large"},{children:C(Ng,Object.assign({setFormIndex:ve,forms:R},{children:[C(Yl,{owner:"FormComposer",onChange:({currentState:e})=>{Ae(e)}}),C(e,Object.assign({ref:J,forms:R,activeForm:K},oe,{data:ne,onChange:Ae,evaluateConfiguration:e=>fe(ee,ce,e,_,ye),onCountryChange:e=>{me(e)},legalEntityId:a.legalEntityId,problems:null==a?void 0:a.problems,onNext:Ne,onBack:Oe,setHideDropinLayout:L,setHideNavigation:j,setHideFooter:M,setCustomFormNavigationHandlers:(e,t,a)=>{Y(Object.assign(Object.assign({},X),{[e]:{onNext:t,onBack:a}}))},setHideOnHomeButton:V,setHideBackButton:B,setSubmitButtonLabel:H,setSkipSubmitAndGoTaskList:G,bankVerificationVendors:pe})),K.formId===bg.formId&&C("div",Object.assign({className:"adyen-kyc-form-wrapper"},{children:C(fg,{trackNavigation:he,data:I?I(N(),R):N(),omittedKeys:O?O(N()):null,omittedForms:E,forms:R,gotoForm:ve,labels:oe.labels,problems:null==a?void 0:a.problems})})),Se]}))}))})),Ce=!k&&!P&&C(Vu,Object.assign({status:ae,formOpacityWhenLoading:.3,showSpinner:!1,className:"adyen-kyc-dropin__sidebar-wrapper"},{children:C(_g,{forms:f?null:R.map((({formId:e,formName:t})=>{var r,n;return{formId:e,formName:t,isValid:Z[e],hasServerValidationErrors:void 0!==(null===(n=null===(r=null==a?void 0:a.problems)||void 0===r?void 0:r.validationErrors)||void 0===n?void 0:n[e])}})),activeForm:K,gotoForm:ve,validateForm:_e,taskName:A,trackNavigation:he,hasVerificationErrors:(null===(l=null==a?void 0:a.problems)||void 0===l?void 0:l.verificationErrors)&&(null===(u=Object.keys(null===(c=null==a?void 0:a.problems)||void 0===c?void 0:c.verificationErrors))||void 0===u?void 0:u.length)>0})})),De=C(t.Fragment,{children:[Ce,Re]});return a.hideDropinLayout?C(t.Fragment,{children:Re}):C(hg,{content:De})}}function Ig(){const e=ge(Rp);if(void 0===e)throw new Error("useToastContext must be used within a ToastProvider");return e}const Eg=(e,t)=>{if((null==e?void 0:e.invalidFields)&&(null==e?void 0:e.invalidFields.length)>0)return null==e?void 0:e.invalidFields.reduce(((e,a)=>{if(null==a?void 0:a.name){const r=Tg(null==a?void 0:a.name,t);r&&bp(r,e,!0)}return e}),{})},Tg=(e,t)=>{switch(t){case Rd.INDIVIDUAL:return _d[e];case Rd.COMPANY:return vd[e];case Rd.PAYOUT:case Rd.PAYIN:return Nd[e]}return null},Ag=Og((function(e){const{i18n:a}=We(),[r,n]=se(e.data),[i,o]=se(!1),[s,d]=se(!1),l=ue({setState:null});le((()=>{const t=Object.values(e.forms).reduce(((e,t)=>[...e,..."summary"!==t.formId?[t.formId]:[]]),[]);l.current.setActiveForms(t)}),[e.forms.toString()]),le((()=>()=>{l.current.setState({type:"resetState"})}),[]);const c={[Hp]:ue(null),[qp]:ue(null),[$p]:ue(null),[Gp]:ue(null),[Xp]:ue(null),[Yp]:ue(null)},u=Cd(e,Hp),m=Cd(e,qp),p=Cd(e,Gp),g=Cd(e,$p),y=Cd(e,Xp),b=Cd(e,Yp);this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==c?void 0:c[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()},this.verifyForm=e=>{var t,a;return(null===(a=null===(t=c[e])||void 0===t?void 0:t.current)||void 0===a?void 0:a.verifyForm)?c[e].current.verifyForm():Promise.resolve(!0)};const f=e=>{var t,a;return`${null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.firstName} ${null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.lastName}`},h=e=>{var t,a,r;return{firstName:null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.firstName,lastName:null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.lastName,residencyCountry:null===(r=null==e?void 0:e.personalDetails)||void 0===r?void 0:r.residencyCountry}},v=({currentState:t,prevState:a})=>{var r,i,l,c,u,m,p,g,y,b;(((e,t)=>{var a,r,n,i;const o=null===(r=null===(a=e.data)||void 0===a?void 0:a.personalDetails)||void 0===r?void 0:r.idNumberExempt,s=null===(i=null===(n=t.data)||void 0===n?void 0:n.personalDetails)||void 0===i?void 0:i.idNumberExempt;return null!=o&&null!=s&&s!==o})(a,t)||((e,t)=>{var a,r,n,i;return(null===(r=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.personalDetails)||void 0===r?void 0:r.typeOfIdentity)!==(null===(i=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.personalDetails)||void 0===i?void 0:i.typeOfIdentity)})(a,t)||_(a,t))&&e.evaluateConfiguration(t.allData);const f=null===(i=null===(r=a.data)||void 0===r?void 0:r.personalDetails)||void 0===i?void 0:i.residencyCountry,h=null===(c=null===(l=t.data)||void 0===l?void 0:l.personalDetails)||void 0===c?void 0:c.residencyCountry;null!=h&&h!==f&&e.onCountryChange(h);const v=null===(m=null===(u=a.data)||void 0===u?void 0:u.idVerificationMethod)||void 0===m?void 0:m.idVerificationMethod,N=null===(g=null===(p=t.data)||void 0===p?void 0:p.idVerificationMethod)||void 0===g?void 0:g.idVerificationMethod;null!=N&&N!==v&&("instantVerification"===N?(d(!0),o(!1)):(o(!0),d(!1)));const O=null===(b=null===(y=t.data)||void 0===y?void 0:y.personalDetails)||void 0===b?void 0:b.accountHolder;this.customNavigationHandler=O===Wd.THE_COMPANY_I_WORK_FOR?()=>e.onTypeSwitch(id.ORGANIZATION):null,s&&t.validityByForm[Gp]&&e.onNext(null,null,!0),n(t.data)},_=(t,a)=>{var r,n,i,o;return e.taskType===Rd.DECISION_MAKER&&!U((null===(n=null===(r=t.data)||void 0===r?void 0:r.personalDetails)||void 0===n?void 0:n.role)||[],(null===(o=null===(i=a.data)||void 0===i?void 0:i.personalDetails)||void 0===o?void 0:o.role)||[])};return C("div",Object.assign({className:"adyen-kyc-individual"},{children:(N=e.activeForm,C(t.Fragment,{children:[C(Yl,{owner:"IndividualComponent",onChange:v}),C(Ys,{owner:"IndividualComponent",stateRef:l}),C("div",Object.assign({className:N.formId!==Hp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(om,Object.assign({},u,{data:Object.assign(Object.assign({},null==u?void 0:u.data),{residencyCountry:e.country}),ref:c[Hp],heading:a.get("providePersonalDetails"),taskType:e.taskType,id:Hp,allowedRoles:null==e?void 0:e.allowedRoles}))})),C("div",Object.assign({className:N.formId!==qp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C("div",{children:[C(Ms,{heading:a.get("providePersonalAddress")}),C(ul,{page:"Personal address",title:a.get("whyDoINeedToFillInThisInformation"),content:a.get("reasonForFillingIndividualAddressDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingIndividualAddressDetails"}),C($c,Object.assign({},m,{ref:c[qp],data:Object.assign(Object.assign({},m.data),{country:e.country}),hideCountry:!0,id:qp,legalEntityId:e.legalEntityId,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))]})})),C("div",Object.assign({className:N.formId!==$p?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Fp,Object.assign({},g,{ref:c[$p],name:f(r),id:$p}))})),C("div",Object.assign({className:N.formId!==Gp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Ip,Object.assign({},p,{ref:c[Gp],name:f(r),userDetails:h(r),id:Gp,legalEntityId:e.legalEntityId,handleGetIdVerificationToken:e.handleGetIdVerificationToken,showManualUpload:i,setShowManualUpload:o,showIdVerification:s,setShowIdVerification:d}))})),C("div",Object.assign({className:N.formId!==Xp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Bp,Object.assign({},y,{ref:c[Xp],id:Xp,name:f(r)}))})),C("div",Object.assign({className:N.formId!==Yp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(fc,Object.assign({},b,{documentField:"proofOfNationalId",documentType:cc.REGISTRATION_DOCUMENT,ref:c[Yp],heading:a.get("proofOfNationalId"),id:Yp}))}))]}))}));var N}),{getComponentForms:()=>Wp,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),ng[t])),{});return a=mg(ig[t],a),a}(e[id.INDIVIDUAL],t),rules:({data:e,country:t,taskType:a,isSettingEnabled:r})=>({idNumberExemptIfApplicableCountry:()=>{if($d.includes(t))return"REQUIRED"},idDocumentIfIdNumberExempted:()=>{var t;if(null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.idNumberExempt)return"REQUIRED"},isProofOfResidenceRequired:()=>{var t;if(null===(t=null==e?void 0:e.proofOfResidence)||void 0===t?void 0:t.proofOfResidence)return"REQUIRED"},isProofOfNationalIdRequired:()=>{var t;if(null===(t=null==e?void 0:e.proofOfNationalId)||void 0===t?void 0:t.proofOfNationalId)return"REQUIRED"},contactsIfRequiredForRole:()=>{var t,a;return(null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.role)?(null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.role)&&e.personalDetails.role.includes(qd.SIGNATORY)?"REQUIRED":void 0:"REQUIRED"},jobTitleIfRequiredForRole:()=>{var t;if((null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.role)&&e.personalDetails.role.some((e=>e===qd.SIGNATORY||e===qd.CONTROLLING_PERSON)))return"REQUIRED"},partOfTrustFieldsOnlyAU:()=>{if("AU"===t&&r("enableTrustFlow"))return"REQUIRED"},accountHolderIfCustomer:()=>{if(a===Rd.INDIVIDUAL)return"REQUIRED"},requiredIfCountryUsesMultipleTypesOfIdentity:()=>{if(Yd.includes(t))return"REQUIRED"},requiredIfIdentityTypeIsDriversLicense:()=>{var t;if("driversLicense"===(null===(t=e.personalDetails)||void 0===t?void 0:t.typeOfIdentity))return"REQUIRED"},isVerificationAllowedForCountry:()=>Xd.includes(t)}),getTaskName:()=>"individualDetails"});function Sg(e){var t,a,r,n,o,s;const{i18n:d,setLocale:l,setIsLegalEntityPartOfTrust:c,setAccountHolder:u}=We(),{showToast:m}=Ig(),{handleCreateDocument:p,handleGetDocument:y,handleUpdateDocument:b,handleAddressSearch:f,handleFindAddress:h,handleGetIdVerificationToken:v,handleGetIdVerificationStartCheck:_,taskType:N,trackingConig:O,parentLegalEntity:I,legalEntityResponse:E}=e;let T=dp(E,e.isTargetLegalEntityType);const A=ym(p,y,b),[S,R]=se(null);let D=[];const[k,L]=se(null==e?void 0:e.problems);if(N===Rd.DECISION_MAKER||N===Rd.TRUST_MEMBER_COMPANY_OWNER){if(null===(t=null==e?void 0:e.parentLegalEntity)||void 0===t?void 0:t.entityAssociations){const e=null===(a=null==I?void 0:I.entityAssociations)||void 0===a?void 0:a.filter((e=>e.legalEntityId===(null==E?void 0:E.id)));if(e&&e.length>0){const t=null===(r=e.find((e=>Boolean(e.jobTitle))))||void 0===r?void 0:r.jobTitle;T=Object.assign(Object.assign({},T),{personalDetails:Object.assign(Object.assign(Object.assign({},null==T?void 0:T.personalDetails),{role:null==e?void 0:e.map((e=>e.type))}),t&&{jobTitle:t})})}}D=Nu(I,N)}const[P,j]=se(T||e.data),x=zp({trackingConig:O,parentLegalEntity:I,legalEntity:E,task:N});le((()=>{w.addPageView("Individual dropin"),w.addEvent("Started individual task",{segmentation:Object.assign({},x)})}),[]),le((()=>{var t;e.eventEmitter.on("updateLocale",(e=>l(e)));const a=(null===(t=null==E?void 0:E.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];a.length&&A.fetchDocuments(a,null==E?void 0:E.id).then((()=>{const e=mp(null==E?void 0:E.id);j(Object.assign(Object.assign({},P),e))})).catch((()=>{m({label:d.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}))}),[]);const M=({dataSubmitted:t,legalEntity:a,idDocumentType:r})=>i(this,void 0,void 0,(function*(){let n;return(null==E?void 0:E.id)||(null==S?void 0:S.id)?n=yield e.handleUpdateLegalEntity(V("type").from(a),(null==E?void 0:E.id)||(null==S?void 0:S.id)):(n=yield e.handleCreateLegalEntity(a),R(a),w.addEvent("Added decision maker",{segmentation:Object.assign(Object.assign({},x),{legalEntityId:n.id,legalEntityType:n.type,countryOfRegistration:t.personalDetails.residencyCountry,roles:t.personalDetails.role})})),w.addEvent("Saved individual details",{segmentation:Object.assign(Object.assign({},x),{legalEntityId:n.id,legalEntityType:n.type,countryOfRegistration:t.personalDetails.residencyCountry,idDocumentType:r})}),n})),F=(e,t)=>i(this,void 0,void 0,(function*(){const a={legalEntityId:t,captureMetadata:e};yield _("",a)})),U=({forms:e,legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(G(e))if(H(a))yield F(a.idDocument.instantIdVerificationData,t.id);else{const e=yield up(a,t.id);yield A.uploadDocuments(e,t.id),null==e||e.forEach((e=>{w.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},x),{documentType:e.type,fileExtention:e.attachments.map((e=>Sm(e.pageName)))})})}))}})),H=e=>{var t;return!!(null===(t=e.idDocument)||void 0===t?void 0:t.instantIdVerificationData)},q=({legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){var r,n;const i=N===Rd.DECISION_MAKER||N===Rd.TRUST_MEMBER_COMPANY_OWNER?null===(r=null==a?void 0:a.personalDetails)||void 0===r?void 0:r.role:N===Rd.TRUST_MEMBER_INDIVIDUAL?null===(n=e.associationDetail)||void 0===n?void 0:n.types:null,o=$m(I);if(i&&((e,t)=>{var a;return(null===(a=$m(I).filter((a=>a.legalEntityId===e.id&&t.includes(a.type))))||void 0===a?void 0:a.length)!==t.length})(t,i)){const r={entityAssociations:[...i.map((e=>{var r;return{type:e,legalEntityId:t.id,jobTitle:null===(r=null==a?void 0:a.personalDetails)||void 0===r?void 0:r.jobTitle}}))||[],...o.filter((e=>e.legalEntityId!==t.id))||[]]};yield e.handleUpdateLegalEntity(r,I.id)}})),G=e=>e.some((e=>Kp.includes(e.formId))),$=g(d.locale),X=({idDocument:e,proofOfNationalId:t,proofOfResidence:a})=>{var r,n,i,o;return Object.assign(Object.assign(Object.assign({},((null==e?void 0:e.idDocumentType)||(null==e?void 0:e.instantIdVerificationData))&&{idDocument:Y(e)}),(null==t?void 0:t.proofOfNationalId)&&{proofOfNationalId:{fileName:null===(n=null===(r=t.proofOfNationalId)||void 0===r?void 0:r[0])||void 0===n?void 0:n.name}}),(null==a?void 0:a.proofOfResidence)&&{proofOfResidence:{fileName:null===(o=null===(i=a.proofOfResidence)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name}})},Y=e=>{var t,a,r,n,i,o;if(e){const s=H({idDocument:e})?lm.find((t=>e.instantIdVerificationData.document_front.type===t.id)):dm.find((({id:t})=>(null==e?void 0:e.idDocumentType)===t));return Object.assign({documentType:d.get(null==s?void 0:s.name)},(null==s?void 0:s.hasBackPage)?{frontPage:null===(a=null===(t=null==e?void 0:e.idFrontPage)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name,backPage:null===(n=null===(r=null==e?void 0:e.idBackPage)||void 0===r?void 0:r[0])||void 0===n?void 0:n.name}:{fileName:null===(o=null===(i=null==e?void 0:e.idFrontPage)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name})}};return C(Ag,{baseTrackingPayload:x,capabilities:e.capabilities,data:P,country:(null===(n=null==P?void 0:P.personalDetails)||void 0===n?void 0:n.residencyCountry)||(null===(s=null===(o=null==I?void 0:I.organization)||void 0===o?void 0:o.registeredAddress)||void 0===s?void 0:s.country),taskType:e.taskType,problems:k,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,handleBackClick:e.handleBackClick,handleGetIdVerificationToken:v,onSubmit:({data:t,forms:a,setLoadingStatus:r})=>i(this,void 0,void 0,(function*(){var n,i,o;r(Fu.LOADING);try{let s=ip(t);const d=null===(n=dm.find((({id:e})=>{var a;return(null===(a=t.idDocument)||void 0===a?void 0:a.idDocumentType)===e})))||void 0===n?void 0:n.id;w.addEvent("Provided individual details",{segmentation:Object.assign(Object.assign({},x),{countryOfRegistration:t.personalDetails.residencyCountry,idDocumentType:d})}),s=yield M({dataSubmitted:t,legalEntity:s,idDocumentType:d}),yield U({forms:a,legalEntity:s,dataSubmitted:t}),yield q({legalEntity:s,dataSubmitted:t}),c((null===(i=null==t?void 0:t.personalDetails)||void 0===i?void 0:i.isPartOfTrust)===Md.IS_PART_OF_TRUST),u(null===(o=null==t?void 0:t.personalDetails)||void 0===o?void 0:o.accountHolder),r(Fu.SUCCESS),null==e||e.onSubmit(t)}catch(e){if((null==e?void 0:e.errorCode)===st){const t=Eg(e,Rd.INDIVIDUAL);L(Object.assign(Object.assign({},k),{validationErrors:t}))}else m({label:d.get("failedToUpdateDetails"),type:Cp.ERROR});r(Fu.SUCCESS),w.addEvent("Encountered error individual details",{segmentation:Object.assign(Object.assign({},x),{errorCode:e.errorCode,errorMessage:e.title,errorType:"BE"})})}})),summary:{formatData:(e,t)=>{var a,r,n;let i=W(e);return(null===(a=i.personalDetails)||void 0===a?void 0:a.residencyCountry)&&(i.personalDetails.residencyCountry=$.getCountryName(i.personalDetails.residencyCountry)),i.address&&(i.address=Pe(i.address,$)),G(t)&&(Kp.forEach((e=>delete i[e])),i=Object.assign(Object.assign({},i),X(e))),(null===(r=null==i?void 0:i.personalDetails)||void 0===r?void 0:r.isPartOfTrust)&&(i.personalDetails.isPartOfTrust=d.get(Lm(i.personalDetails.isPartOfTrust))),(null===(n=null==i?void 0:i.personalDetails)||void 0===n?void 0:n.accountHolder)&&(i.personalDetails.accountHolder=d.get(i.personalDetails.accountHolder)),i},getOmittedKeys:t=>{var a;return[e.taskType===Rd.DECISION_MAKER?"role":null,(null===(a=t.personalDetails)||void 0===a?void 0:a.idNumberExempt)?"idNumber":null].filter(Boolean)}},hasDataChanged:e=>i(this,void 0,void 0,(function*(){const t=ip(e),a=yield up(e,"test");return!B(t,V(["documents","id"]).from(E||{}))||a.length>0})),canSubmit:t=>(e.taskType===Rd.DECISION_MAKER?sd.DECISIONMAKER:sd.INDIVIDUAL).every((e=>{const a=_p(t,e);return!Ss(a)||Array.isArray(e)&&e.length>0})),legalEntityType:id.INDIVIDUAL,legalEntityId:null==E?void 0:E.id,allowedRoles:D,handleAddressSearch:f,handleFindAddress:h,onTypeSwitch:e.onTypeSwitch})}const Rg=["ES","GB","US","IE"],Cg=["AT","CA","CH","FI","LT","LU","SE"],Dg=["US","CA","AU","HK","NZ","SG"],kg=["AU","HK","NZ","SG"],Lg=({data:e,country:t,taskType:a,isSettingEnabled:r})=>({stockExchangeMICIfTypePublic:()=>{var t;if((null===(t=null==e?void 0:e.companyType)||void 0===t?void 0:t.entityType)===Ld.PUBLIC_COMPANY)return"REQUIRED"},stockISINIfTypePublic:()=>{var t;if((null===(t=null==e?void 0:e.companyType)||void 0===t?void 0:t.entityType)===Ld.PUBLIC_COMPANY)return"REQUIRED"},vatRules:()=>{if(!Dg.includes(t))return"REQUIRED"},taxIdRules:()=>{if(Dg.includes(t))return"REQUIRED"},SolePropsExemptedFromTaxRules:()=>{if(Dg.includes(t))return"REQUIRED"},SolePropsExemptedFromRegistrationNumberRules:()=>{if(Cg.includes(t))return"REQUIRED"},SolePropsRegistrationNumberRules:()=>{if(!Rg.includes(t))return"REQUIRED"},partOfTrustFieldsOnlyAU:()=>{if("AU"===t&&r("enableTrustFlow"))return"REQUIRED"},registrationNumberRules:()=>{if(!Rg.includes(t))return"REQUIRED"},accountHolderIfCustomer:()=>{if(a===Rd.COMPANY)return"REQUIRED"},exemptedFromTaxRules:()=>{if(kg.includes(t))return"REQUIRED"}}),wg=Og((function(e){const{i18n:a}=We(),[r,n]=se(null),i={[Nc]:ue(null),[Oc]:ue(null),[Ic]:ue(null),[Ec]:ue(null),[Tc]:ue(null),[Ac]:ue(null)},o=Cd(e,Nc),s=Cd(e,Oc),d=Cd(e,Ic),l=Cd(e,Ec),c=Cd(e,Tc),u=Cd(e,Ac);this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==i?void 0:i[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const m=({currentState:t,prevState:a})=>{var r,i,o,s,d,l,c,u,m,p;const g=null===(i=null===(r=t.data)||void 0===r?void 0:r[Oc])||void 0===i?void 0:i.entityType;n(g);const y=null===(s=null===(o=a.data)||void 0===o?void 0:o[Nc])||void 0===s?void 0:s.companyCountry,b=null===(l=null===(d=t.data)||void 0===d?void 0:d[Nc])||void 0===l?void 0:l.companyCountry,f=null===(u=null===(c=t.data)||void 0===c?void 0:c[Oc])||void 0===u?void 0:u.accountHolder;null!=b&&b!==y&&e.onCountryChange(b),g!==(null===(p=null===(m=a.data)||void 0===m?void 0:m[Oc])||void 0===p?void 0:p.entityType)&&e.evaluateConfiguration(t.allData),this.customNavigationHandler=f===Wd.MY_NAME?()=>e.onTypeSwitch(id.INDIVIDUAL):null};return C("div",Object.assign({className:"adyen-kyc-company"},{children:(p=e.activeForm,C("div",Object.assign({className:"adyen-kyc-company"},{children:[C(Yl,{owner:"CompanyComponent",onChange:m}),C("div",Object.assign({className:p.formId!==Nc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(ic,Object.assign({},o,{data:Object.assign(Object.assign({},null==o?void 0:o.data),{companyCountry:e.country}),ref:i[Nc],heading:a.get("nameAndCountry"),id:Nc}))})),C("div",Object.assign({className:p.formId!==Oc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(al,Object.assign({},s,{ref:i[Oc],heading:a.get("companyStructure"),id:Oc}))})),C("div",Object.assign({className:p.formId!==Ic?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Zl,Object.assign({},d,{ref:i[Ic],heading:a.get("registrationDetails"),id:Ic,country:e.country,companyType:r}))})),C("div",Object.assign({className:p.formId!==Ec?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(yl,Object.assign({},l,{ref:i[Ec],heading:a.get("registeredAddress"),description:a.get("registeredAddressHeaderDescription"),id:Ec,country:e.country,problems:null==e?void 0:e.problems,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))})),C("div",Object.assign({className:p.formId!==Tc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(fc,Object.assign({},c,{documentField:"registrationDocument",documentType:cc.REGISTRATION_DOCUMENT,ref:i[Tc],heading:a.get("registrationDocument"),guidanceContent:C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:a.get("registrationDocumentSubTitle")})),C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("requirements")]})),C(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[C(hc,{children:a.get("documentIssuedByGovernmentAuthority")}),C(hc,{children:a.get("dateOnDocumentNoOlderThanXMonths",{values:{noOfMonths:12}})})]})),C(ul,{page:"Company registration document",titleId:"whatIfDocumentIsMoreThan12MonthsOld",contentId:"ifDocumentMoreThan12months",title:a.get("whatIfDocumentIsMoreThan12MonthsOld"),content:a.get("ifDocumentMoreThan12months")})]}),id:Tc}))})),C("div",Object.assign({className:p.formId!==Ac?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(fc,Object.assign({},u,{documentField:"taxDocument",documentType:cc.VAT_DOCUMENT,ref:i[Ac],heading:a.get("taxDocument"),guidanceContent:C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:a.get("uploadTaxationDocument")})),C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("requirements")]})),C(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[C(hc,{children:a.get("containsNameOfCompany")}),C(hc,{children:a.get("documentShowsTaxIdOfCompany")}),C(hc,{children:a.get("issuedByTheTaxAuthority")})]}))]}),id:Ac}))}))]})))}));var p}),{getComponentForms:()=>_c,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),jd[t])),{});return a=mg(xd[t],a),a}}(null==e?void 0:e[id.ORGANIZATION],t),rules:Lg,labels:(e,t)=>({registrationNumber:()=>{var a,r,n,i;return"GB"===t&&(null===(a=null==e?void 0:e.companyType)||void 0===a?void 0:a.entityType)===Ld.NON_PROFIT_OR_CHARITABLE?"charityNumber":"FR"===t&&(null===(r=null==e?void 0:e.companyType)||void 0===r?void 0:r.entityType)===Ld.NON_PROFIT_OR_CHARITABLE?"RNA/SIREN/SIRETNumber":"AT"===t&&(null===(n=null==e?void 0:e.companyType)||void 0===n?void 0:n.entityType)===Ld.NON_PROFIT_OR_CHARITABLE||"AT"===t&&(null===(i=null==e?void 0:e.companyType)||void 0===i?void 0:i.entityType)===Ld.INCORPORATED_ASSOCIATION?"firmenbuchnummerOrZVR":void 0}}),getTaskName:()=>"companyDetails"});function Pg(e){var t;const{showToast:a}=Ig(),{i18n:r,setLocale:n,setIsLegalEntityPartOfTrust:o}=We(),{handleCreateDocument:s,handleGetDocument:d,handleUpdateDocument:l,handleAddressSearch:c,handleFindAddress:u,taskType:m,trackingConig:p,associationDetail:y,parentLegalEntity:b,legalEntityResponse:f,isTargetLegalEntityType:h}=e,v=lp(f,h),[_,N]=se(v||e.data),[O,I]=se(e.problems),E=zp({trackingConig:p,parentLegalEntity:b,legalEntity:f,task:m});le((()=>{w.addPageView("Company dropin"),w.addEvent("Started company task",{segmentation:E})}),[]);const T=({forms:e,legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(S(e)){const e=yield pp(a,t.id);e&&(yield R.uploadDocuments(e,t.id),e.forEach((e=>{w.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},E),{documentType:e.type,fileExtention:e.attachments.map((e=>Sm(e.pageName)))})})})))}})),A=({legalEntity:t})=>i(this,void 0,void 0,(function*(){if(m===Rd.TRUST_MEMBER_COMPANY){const a=$m(b),r=null==y?void 0:y.types;if(r&&D(b,r)){const n={entityAssociations:[...r.map((e=>({type:e,legalEntityId:t.id})))||[],...a.filter((e=>e.legalEntityId!==t.id))||[]]};yield e.handleUpdateLegalEntity(n,b.id)}}})),S=e=>e.some((e=>[_c.companyRegistrationDocument.formId,_c.companyTaxDocument.formId].includes(e.formId))),R=ym(s,d,l),D=(e,t)=>{var a;return(null===(a=$m(b).filter((a=>a.legalEntityId===e.id&&t.includes(a.type))))||void 0===a?void 0:a.length)!==t.length};le((()=>{var t;e.eventEmitter.on("updateLocale",(e=>n(e)));const i=(null===(t=null==f?void 0:f.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];try{i.length&&R.fetchDocuments(i,f.id).then((()=>{const e=(e=>{const t=_m(e,cc.REGISTRATION_DOCUMENT)||null,a=_m(e,cc.VAT_DOCUMENT)||null;return{companyRegistrationDocument:t?{registrationDocument:[{name:vp(t)}]}:null,companyTaxDocument:a?{taxDocument:[{name:vp(a)}]}:null}})(f.id);N(Object.assign(Object.assign({},_),e))})).catch((()=>{a({label:r.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}))}catch(e){a({label:r.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}}),[]);const k=g(r.locale),L=(e,t)=>{var a,r,n,i;return Object.assign(Object.assign({},(null==e?void 0:e.registrationDocument)&&{companyRegistrationDocument:{fileName:null===(r=null===(a=e.registrationDocument)||void 0===a?void 0:a[0])||void 0===r?void 0:r.name}}),(null==t?void 0:t.taxDocument)&&{companyTaxDocument:{fileName:null===(i=null===(n=t.taxDocument)||void 0===n?void 0:n[0])||void 0===i?void 0:i.name}})};return C(Sp,Object.assign({defaultData:v},{children:C(wg,{baseTrackingPayload:E,capabilities:e.capabilities,data:_,country:null===(t=null==_?void 0:_.companyNameAndCountry)||void 0===t?void 0:t.companyCountry,taskType:e.taskType,problems:O,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,handleBackClick:e.handleBackClick,onSubmit:({data:t,forms:n,setLoadingStatus:s})=>i(this,void 0,void 0,(function*(){var i;const d=lp(f,!1),l=((e,t)=>(Object.keys(t).forEach((a=>{Object.keys(t[a]).forEach((r=>{void 0===e[a][r]&&(Array.isArray(t[a][r])?e[a][r]=[]:e[a][r]="")}))})),e))(t,d);let c=cp(l);s(Fu.LOADING);const u={companyStructure:t.companyType.entityType,countryOfRegistration:t.companyNameAndCountry.companyCountry,legalEntityName:t.companyNameAndCountry.legalCompanyName,usedAdditionalAddress:t.companyRegistrationDetails.operationalAddressIsSame===rl.OPERATIONAL_ADDRESS_IS_NOT_SAME};try{w.addEvent("Provided company details",{segmentation:Object.assign(Object.assign({},E),u)}),c=(null==f?void 0:f.id)?yield e.handleUpdateLegalEntity(V("type").from(c),f.id):yield e.handleCreateLegalEntity(c),w.addEvent("Saved company details",{segmentation:Object.assign(Object.assign(Object.assign({},E),{legalEntityId:c.id,legalEntityType:c.type}),u)}),yield T({forms:n,legalEntity:c,dataSubmitted:t}),yield A({legalEntity:c}),o((null===(i=null==t?void 0:t.companyType)||void 0===i?void 0:i.isPartOfTrust)===Md.IS_PART_OF_TRUST),s(Fu.SUCCESS),null==e||e.onSubmit(t)}catch(e){if((null==e?void 0:e.errorCode)===st){const t=Eg(e,Rd.COMPANY);I(Object.assign(Object.assign({},O),{validationErrors:t}))}else a({label:r.get("failedToUpdateDetails"),type:Cp.ERROR});s(Fu.SUCCESS),w.addEvent("Encountered error company details",{segmentation:Object.assign(Object.assign({},E),{errorCode:e.errorCode,errorMessage:e.title,errorType:"BE"})})}})),legalEntityType:id.ORGANIZATION,summary:{formatData:(e,t)=>{var a,n,i,o,s,d,l,c,u;let m=W(e);if((null===(a=null==m?void 0:m.companyNameAndCountry)||void 0===a?void 0:a.companyCountry)&&(m.companyNameAndCountry.companyCountry=k.getCountryName(m.companyNameAndCountry.companyCountry)),null===(n=null==m?void 0:m.companyType)||void 0===n?void 0:n.entityType){const e=null===(i=Pd.find((e=>{var t;return e.id===(null===(t=m.companyType)||void 0===t?void 0:t.entityType)})))||void 0===i?void 0:i.name;m.companyType.entityType=r.get(e)}if((null===(o=null==m?void 0:m.companyType)||void 0===o?void 0:o.accountHolder)&&(m.companyType.accountHolder=r.get(null===(s=null==m?void 0:m.companyType)||void 0===s?void 0:s.accountHolder)),(null===(d=null==m?void 0:m.companyRegistrationDetails)||void 0===d?void 0:d.registrationAddress)&&(m.companyRegistrationDetails.hasInnerForms=!0,m.companyRegistrationDetails.registrationAddress=Pe(null==m?void 0:m.companyRegistrationDetails.registrationAddress,k)),(null===(l=null==m?void 0:m.companyRegistrationDetails)||void 0===l?void 0:l.operationalAddress)&&(m.companyRegistrationDetails.operationalAddress=Pe(null==m?void 0:m.companyRegistrationDetails.operationalAddress,k)),null===(c=m.companyDetails)||void 0===c?void 0:c.vatAbsenceReason){const e=Cl.find((e=>e===m.companyDetails.vatAbsenceReason));e&&(m.companyDetails.vatAbsenceReason=r.get(e))}return S(t)&&(Sc.forEach((e=>delete m[e])),m=Object.assign(Object.assign({},m),L(e.companyRegistrationDocument,e.companyTaxDocument))),(null===(u=null==m?void 0:m.companyType)||void 0===u?void 0:u.isPartOfTrust)&&(m.companyType.isPartOfTrust=r.get(Lm(m.companyType.isPartOfTrust))),m},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>i(this,void 0,void 0,(function*(){var t;const a=(null===(t=cp(e))||void 0===t?void 0:t.organization)||{},r=(null==f?void 0:f.organization)||{},n=yield pp(e,"");return!B(a,r)||n.length>0})),canSubmit:e=>sd.ORGANIZATION.every((t=>{const a=_p(e,t);return!Ss(a)})),handleAddressSearch:c,handleFindAddress:u,onTypeSwitch:e.onTypeSwitch})}))}function jg(){return C("div",{children:[C("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--small"}),C("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--large"}),C("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--small"}),C("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--large"})]})}function xg({className:e,children:t}){return C("section",Object.assign({className:a("adl-card-group",e)},{children:t}))}const Mg={1:"h1",2:"h2",3:"h3",4:"h4",sub:"div"};function Fg({className:e,level:r,children:n}){const i=Mg[r]||Mg[1],o=a("adl-heading",`adl-heading--${r}`,e);return t.createElement(i,{className:o},n)}const Vg=({title:e,children:t})=>C("article",Object.assign({className:"adyen-task-list-group"},{children:[e&&C("header",Object.assign({className:"adyen-task-list-group__header"},{children:C(Fg,Object.assign({level:4},{children:e}))})),C("main",Object.assign({className:"adl-card__body"},{children:C(xg,Object.assign({className:"adyen-task-list-group__items"},{children:t}))}))]})),Ug=({className:e,problems:t})=>{const{i18n:a}=We();if((null==t?void 0:t.verificationErrors)&&Object.keys(t.verificationErrors).length>0){const r=Object.values(t.verificationErrors).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{}),n=Object.keys(r);if(1===n.length){const t=Object.values(r[n[0]]).flat();if(1===t.length){const r=a.get(`errorMessage_${n[0]}`),i=a.get(`remediationMessage_${t[0].code}`);return C(zs,{className:e,hasCloseButton:!1,type:Ks.ERROR,title:`${r}. ${i}`})}}}return C(zs,{className:e,hasCloseButton:!1,type:Ks.ERROR,title:a.get("verificationErrorMessage")})},Bg=({text:e,className:t,iconStatusClass:r,icon:n})=>{const i=a("adl-status",t),o=a("adl-status__icon",r);return C("div",Object.assign({className:i},{children:[C("span",Object.assign({className:o},{children:"loading"===n?C(Ze,{size:"xsmall",dot:!0}):C(xe,{name:n})})),C("span",Object.assign({className:"adl-status__text"},{children:e}))]}))},Wg=({status:e,downloadHandler:t})=>{const{i18n:a,isReview:r}=We(),n=e=>{e.stopPropagation(),t()};switch(e){case Sd.DOWNLOAD:return C("span",Object.assign({className:"adl-status--download",role:"button",tabIndex:0,icon:"download",onClick:n},{children:[a.get("download")," "]}));case Sd.FINISHED:return C(Bg,{className:"adl-status--finished",iconStatusClass:"adl-status__icon--finished",icon:"check",text:a.get("finished")});case Sd.ERROR:return C(Bg,{className:"adl-status--error",iconStatusClass:"adl-status__icon--error",icon:"info-circle",text:a.get("unsuccessful")});case Sd.PROCESSING:return C(Bg,{className:"",iconStatusClass:"",icon:"loading",text:a.get("processing")});case Sd.DETAILS_REQUIRED:case Sd.EMPTY:default:return C("span",Object.assign({className:"adl-task-status-details-required"},{children:r?a.get("verify"):a.get("go")}))}};function Hg({className:e,children:t,stateful:r,active:n,disabled:i,title:o,subTitle:s,onClick:d,onKeyDown:l}){const c=a("adl-card",e,{"adl-card--stateful":r,"adl-card--active":r&&n,"adl-card--disabled":i}),u=r&&0,m=r&&"button";return C("article",Object.assign({className:c,tabIndex:u,role:m,onClick:e=>{i||d(e)},onKeyDown:l},{children:[o&&C("header",Object.assign({className:"adl-card__header"},{children:[C(Fg,Object.assign({level:4},{children:o})),s&&C(Fg,Object.assign({level:"sub"},{children:s}))]})),C("main",Object.assign({className:"adl-card__body"},{children:t}))]}))}const qg=({title:e,tagline:t,icon:a,status:r,onNavigateToTask:n,disabled:i=!1,problems:o,downloadHandler:s})=>C(Hg,Object.assign({stateful:!0,onClick:()=>n(),onKeyDown:e=>{e.key===ot.enter&&n()},className:"adyen-task",disabled:i},{children:[C("div",Object.assign({className:"adyen-task-item"},{children:[C("div",Object.assign({className:"adyen-task-item__heading"},{children:[C("span",Object.assign({className:"adyen-task-item__icon-wrapper"},{children:C(xe,{name:a})})),C("div",Object.assign({className:"adyen-task-item__body"},{children:[C("span",Object.assign({className:"adyen-task-item__tagline"},{children:t})),C("span",Object.assign({className:"adyen-task-item__title"},{children:e}))]}))]})),C("aside",Object.assign({className:"adyen-task-item__status"},{children:[C(Wg,{status:r,downloadHandler:s}),C(xe,{className:"adl-u-color-grey-60",name:"chevron-right"})]}))]})),r===Sd.ERROR&&C(Ug,{className:"adyen-task-item-alert",problems:o})]}));var Gg;!function(e){e.BANK_ACCOUNT="BankAccount",e.LEGAL_ENTITY="LegalEntity",e.DOCUMENTS="Documents"}(Gg||(Gg={}));const $g=e=>{var t;return(null===(t=e.transferInstruments)||void 0===t?void 0:t.length)>0};function Xg({tasks:e,onNavigateToTask:a,legalEntityResponse:r,capabilityProblems:n,onPciDownload:i,pciStatus:o,serviceAgreementTypes:s}){var d,l,c,u,m,p,g,y,b,f;const{i18n:h,isLegalEntityPartOfTrust:v,accountHolder:_}=We(),N=e.some((e=>[Rd.INDIVIDUAL,Rd.COMPANY,Rd.DECISION_MAKER_OVERVIEW].includes(e))),O=v||Dm(r),I=e.some((e=>[Rd.SERVICE_AGREEMENT,Rd.PCI_DSS].includes(e))),E=e.some((e=>e===Rd.COMPANY)),T=_===Wd.MY_SOLE_TRADER_NAME||Ym(r),A=(null==r?void 0:r.transferInstruments)||[],S=(null===(d=null==r?void 0:r.organization)||void 0===d?void 0:d.legalName)||(null===(l=null==r?void 0:r.individual)||void 0===l?void 0:l.name),R=e.includes(Rd.PAYIN)&&!e.includes(Rd.PAYOUT),D=(r.type===id.ORGANIZATION&&!!(null===(c=null==r?void 0:r.entityAssociations)||void 0===c?void 0:c.length)||r.type===id.INDIVIDUAL&&!!(null==r?void 0:r.individual))&&e.includes(Rd.PCI_DSS),k="true"===(null==o?void 0:o.signingRequired)||!0===(null==o?void 0:o.signingRequired),L=!k&&(null==o?void 0:o.hasDocuments),w=!D||!k&&!(null==o?void 0:o.hasDocuments)||L,P=L||k,j=e.includes(Rd.SERVICE_AGREEMENT)&&(null==s?void 0:s.length)>0,x=!(r.type===id.ORGANIZATION&&hu(r).length||r.type===id.INDIVIDUAL&&!!(null==r?void 0:r.individual)),M=I&&(P||j),F=e=>a(R?Rd.PAYIN:Rd.PAYOUT,e);return C("div",{children:[N&&C(Vg,Object.assign({title:E?h.get("businessAccountDetailsDescription"):h.get("accountDetailsDescription")},{children:[C(yg,{}),e.includes(Rd.INDIVIDUAL)&&C(qg,{onNavigateToTask:()=>a(Rd.INDIVIDUAL),icon:"decision-maker",title:h.get("providePersonalDetails"),status:Qm(Gg.LEGAL_ENTITY,n,r,[r.id]),problems:null===(u=null==n?void 0:n.LegalEntity)||void 0===u?void 0:u[r.id]}),T&&C(qg,{onNavigateToTask:()=>a(Rd.SOLE_PROPRIETOR_COMPANY),icon:"company",title:h.get("enterSoleProprietorDetails"),status:Qm(Gg.LEGAL_ENTITY,n,r,Xm(r)),problems:Km(r,n)}),e.includes(Rd.COMPANY)&&C(qg,{onNavigateToTask:()=>a(Rd.COMPANY),icon:"company",title:h.get("provideCompanyDetails"),status:Qm(Gg.LEGAL_ENTITY,n,r,[r.id]),problems:null===(m=null==n?void 0:n.LegalEntity)||void 0===m?void 0:m[r.id]}),e.includes(Rd.DECISION_MAKER)&&C(qg,{onNavigateToTask:()=>a(Rd.DECISION_MAKER_OVERVIEW),icon:"decision-maker",title:h.get("addDecisionMakers"),status:Ou(r)?Qm(Gg.LEGAL_ENTITY,n,r,vu(r)):Sd.DETAILS_REQUIRED})]})),O&&C(Vg,Object.assign({title:h.get("trustDetailsDescription")},{children:[C(qg,{onNavigateToTask:()=>a(Rd.TRUST),icon:"trust",title:h.get("provideTrustDetails"),status:Qm(Gg.LEGAL_ENTITY,n,r,xm(r)),problems:Mm(r,n)}),C(qg,{onNavigateToTask:()=>a(Rd.TRUST_MEMBER_OVERVIEW),icon:"decision-maker",title:h.get("addTrustMembers"),status:Fm(r)?Qm(Gg.LEGAL_ENTITY,n,r,Pm(r)):Sd.DETAILS_REQUIRED})]})),(e.includes(Rd.PAYOUT)||e.includes(Rd.PAYIN))&&C(Vg,Object.assign({title:h.get(R?"payinAccountsDescription":"payoutAccountsDescription")},{children:A.length>0?C(t.Fragment,{children:[A.map((e=>{var t;return C(qg,{onNavigateToTask:()=>F(e.id),icon:"payout",title:e.accountIdentifier,tagline:h.get("payoutDetails"),status:$g(r)?Qm(Gg.BANK_ACCOUNT,n,r,[e.id]):Sd.DETAILS_REQUIRED,problems:null===(t=null==n?void 0:n.BankAccount)||void 0===t?void 0:t[e.id]})})),C(Hg,Object.assign({stateful:!0,onClick:()=>F(null),className:"adyen-task adl-add-payout",disabled:!S},{children:[C(xe,{name:"plus",className:"adl-u-padding-top-2 adl-u-margin-right-8"}),C("span",{children:h.get(R?"addExtraPayinAccount":"addExtraPayoutAccount")})]}))]}):C(qg,{onNavigateToTask:F,icon:"payout",title:h.get(R?"providePayinDetails":"providePayoutDetails"),status:$g(r)?Qm(Gg.BANK_ACCOUNT,n,r,[null===(g=null===(p=null==r?void 0:r.transferInstruments)||void 0===p?void 0:p[0])||void 0===g?void 0:g.id]):Sd.DETAILS_REQUIRED,disabled:!S,problems:null===(y=null==n?void 0:n.BankAccount)||void 0===y?void 0:y[null===(f=null===(b=null==r?void 0:r.transferInstruments)||void 0===b?void 0:b[0])||void 0===f?void 0:f.id]})})),M&&C(Vg,Object.assign({title:h.get("toCompleteProcessReviewAndSignOfficialDocumentation")},{children:[j&&s.map((e=>C(qg,{onNavigateToTask:()=>(e=>a(Rd.SERVICE_AGREEMENT,e))(e),icon:"contract",title:h.get("signServiceAgreement"),disabled:x,status:Sd.DETAILS_REQUIRED},e))),P&&C(qg,{onNavigateToTask:()=>!L&&a(Rd.PCI_DSS),icon:"pci",title:h.get("pciDssQuestionnaire"),status:L?Sd.DOWNLOAD:Sd.DETAILS_REQUIRED,downloadHandler:i,disabled:w})]}))]})}const Yg=({name:e,types:r,status:n,actions:i,reviewActions:o,problems:s,infoContent:d})=>{const{i18n:l,isReview:c}=We(),[u,m]=se(!1),p=a("adl-entity-association__more-actions-toggle",{"adl-entity-association__more-actions-toggle--open":u}),g=a("adl-entity-association__more-actions",{"adl-entity-association__more-actions--open":u});return C("div",Object.assign({className:"adl-entity-association"},{children:[C("div",Object.assign({className:"adl-entity-association__top"},{children:[C("h3",Object.assign({className:"adl-entity-association__title"},{children:e})),C("div",Object.assign({className:"adl-entity-association__info"},{children:c&&o?{reviewActions:o}:C(t.Fragment,{children:[C(Wg,{status:n}),i&&C("div",Object.assign({className:"adl-entity-association__actions"},{children:[C(Gc,{className:p,ghost:!0,icon:"more-horiz",onClick:()=>m(!u),title:l.get("toggleAssociationMenu",{values:{name:e}})}),C("div",Object.assign({className:g},{children:i}))]}))]})}))]})),C("div",{children:r.map((e=>C(ze,Object.assign({className:`adl-entity-association__tag ${qm(e)}`,isBasic:!0},{children:l.get(Gm(e))}),e)))}),n===Sd.ERROR&&C(Ug,{className:"adl-entity-association-alert",problems:s}),d]}))},Kg=({decisionMakerType:e,country:t})=>{const{i18n:a}=We();return C("div",Object.assign({className:"adl-decision-makers__box"},{children:[C(ze,Object.assign({className:`adl-u-margin-bottom-8 adl-decision-makers__tag ${qm(e)}`,isBasic:!0},{children:a.get(Gm(e))}),e),C("span",{dangerouslySetInnerHTML:{__html:a.get(bu(t)[e])}})]}))},zg=({trackingConig:e,parentLegalEntity:r,legalEntityResponse:n,capabilityProblems:o,onNavigateToIndividual:s,handleUpdateLegalEntity:d,navigateBackToTaskList:l,onDecisionMakerDelete:c})=>{var u,m;const{i18n:p}=We(),{showToast:g}=Ig(),y=fu(n),b=null===(m=null===(u=null==n?void 0:n.organization)||void 0===u?void 0:u.registeredAddress)||void 0===m?void 0:m.country,f=function(e){const t=pu(e).filter((e=>1===e.roleTypes.length)).map((e=>e.roleTypes[0]));return[...new Set(t)]}(b),h=null==y?void 0:y.reduce(((e,t)=>{var a;const r=e[t.legalEntityId],i=t.type;return e[t.legalEntityId]={legalEntityId:t.legalEntityId,types:r?[...r.types,i]:[i],status:Qm(Gg.LEGAL_ENTITY,o,n,[t.legalEntityId]),name:t.name,legalEntityType:t.entityType,problems:null===(a=null==o?void 0:o.LegalEntity)||void 0===a?void 0:a[t.legalEntityId]},e}),{}),v=h?Object.values(h):[],_=0===Nu(n,Rd.DECISION_MAKER).length,N=zp({trackingConig:e,parentLegalEntity:r,legalEntity:n,task:Rd.DECISION_MAKER_OVERVIEW}),O=e=>{s(e.legalEntityId),w.addEvent("Edited decision maker",{segmentation:Object.assign(Object.assign({},N),{legalEntityId:e.legalEntityId,legalEntityType:e.legalEntityType,roles:e.types})})},I=e=>C(t.Fragment,{children:[C(Gc,{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>O(e),label:p.get("edit"),title:p.get("editDecisionMakerDetails",{values:{decisionMaker:e.name}})}),C(Gc,{className:"adl-entity-association__delete",ghost:!0,icon:"bin",onClick:()=>(e=>i(void 0,void 0,void 0,(function*(){try{const t={entityAssociations:n.entityAssociations.filter((t=>t.legalEntityId!==e.legalEntityId))};yield d(t,n.id),c();const a=y.filter((t=>t.legalEntityId!==e.legalEntityId));w.addEvent("Removed decision maker",{segmentation:Object.assign(Object.assign({},N),{legalEntityId:e.legalEntityId,legalEntityType:e.legalEntityType,roles:e.types,remainingDecisionMakers:a})}),g({type:Cp.SUCCESS,label:p.get("successFullyRemovedDecisionMaker")})}catch(e){g({type:Cp.ERROR,label:p.get("failedToRemoveDecisionMaker")})}})))(e),label:p.get("remove"),title:p.get("removeDecisionMaker",{values:{decisionMaker:e.name}})})]}),E=e=>C(Gc,{showAsLink:!0,icon:"chevron-right",onClick:()=>O(e.legalEntityId),label:p.get("verify"),title:p.get("verifyDecisionMakerDetails",{values:{decisionMaker:e.name}})});return C(hg,{content:C(t.Fragment,{children:C("div",Object.assign({className:"adl-decision-makers adl-u-width-full"},{children:[C(Ms,{heading:p.get("decisionMaker"),description:p.get("decisionMakerDescription")}),C("div",Object.assign({className:"adl-decision-makers__container"},{children:f.map((e=>C(Kg,{decisionMakerType:e,country:b},e)))})),C(yg,{}),C(ul,{page:"Decision makers",title:p.get("whatIsTheDifferenceBetweenTheseRoles"),content:C("ul",Object.assign({className:"adl-guidance-list"},{children:f.map((e=>C("li",{dangerouslySetInnerHTML:{__html:p.get(`${"uboThroughControl"===e?"controllingPerson":"uboThroughOwnership"===e?"owner":e}GuideDescription`)}},e)))})),titleId:"whatIsTheDifferenceBetweenTheseRoles",contentId:"differenceBetweenAnOwnerControllingPersonAndSignatory"}),(null==v?void 0:v.length)>0?C("div",Object.assign({className:"adl-decision-makers__wrapper"},{children:v.map((e=>C(Yg,{types:e.types,legalEntityId:e.legalEntityId,name:e.name,status:e.status,actions:I(e),reviewActions:E(e),problems:null==e?void 0:e.problems},e.legalEntityId)))})):null,C(Gc,{secondary:!0,className:a("adl-decision-makers__add",{"adl-decision-makers__add--more":(null==v?void 0:v.length)>0}),icon:"plus",onClick:e=>{e.stopPropagation(),s()},label:p.get("addDecisionMaker"),disabled:_}),C(gg,{onHome:()=>{w.addEvent("Saved decision makers list",{segmentation:Object.assign(Object.assign({},N),{noOfDecisionMakers:y.length})}),l()},homeButtonLabel:p.get("saveAndGoToOverview")})]}))})})};var Zg;!function(e){e.BANK_STATEMENT="bankStatement",e.DEPOSIT_TICKET="depositTicket",e.SCREENSHOT_OF_BANK="screenshotOfOnlineBankingEnviroment",e.OFFICIAL_EMAIL="officialEmailOrALetterFromYourBank",e.CHEQUES="cheques",e.RELEVE_DIDENTITE="releveDidentiteBancaire"}(Zg||(Zg={}));const Qg=[{id:Zg.BANK_STATEMENT,name:"bankStatement"},{id:Zg.DEPOSIT_TICKET,name:"depositTicket"},{id:Zg.SCREENSHOT_OF_BANK,name:"screenshotOfOnlineBankingEnviroment"},{id:Zg.OFFICIAL_EMAIL,name:"officialEmailOrALetterFromYourBank"},{id:Zg.CHEQUES,name:"cheques"},{id:Zg.RELEVE_DIDENTITE,name:"releveDidentiteBancaire"}],Jg=["bankStatementDocument","description"];const ey=yt((function(e){var a,r;const{i18n:n,commonProps:i}=We(),o=ue(null),[s,d]=se({}),[l,c]=se(null),{country:u,optionalFields:m}=e,{handleChangeFor:p,data:g,valid:y,setValid:b,fieldProblems:f,errors:h,triggerValidation:v,setData:_}=ua(Object.assign(Object.assign({},e),{schema:["description"],defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{v()}),[]);const N=ra(e,n),O=ue({setState:null});return this.triggerValidation=()=>{N.isRequiredField("bankStatementDocument")&&o.current.triggerValidation()},le((()=>{var t;e.data.bankStatementDocument&&(d({bankStatementDocument:e.data.bankStatementDocument}),_("description",null===(t=e.data)||void 0===t?void 0:t.description))}),[e.data]),le((()=>{O.current.setState({type:"addToState",value:{data:g,valid:y,errors:h,fieldProblems:f,caller:e.id,dataStoreId:e.id,schema:Jg}})}),[g,y,h,f]),le((()=>{const e=m.includes("bankStatementDocument");e?b("bankStatementDocument",!0):e||(null==o?void 0:o.current)||b("bankStatementDocument",!1)}),[m]),C("form",Object.assign({className:"adyen-kyc-payout__bank-statement","aria-describedby":i.showInlineErrors?null:"ariaErrorField"},{children:[C(Ys,{owner:e.id,stateRef:O}),C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:N,id:"ariaErrorField"}),N.isVisibleField("bankStatementDocument")&&C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:n.get("bankStatementDocumentTypeLabel",{values:{name:e.name}})})),C(Ue,Object.assign({name:"documentType",label:N.getLabel("bankStatementDocument","selectDocumentType"),className:"adyen-kyc-field--bankStatementDocumentType"},{children:Jt("select",{onChange:e=>c(e.target.value),name:"documentType",placeholder:n.get("selectDocument"),selected:l,items:(()=>{let e=Qg;return"FR"!==u&&(e=e.filter((e=>e.id!==Zg.RELEVE_DIDENTITE))),e.map((({id:e,name:t})=>({id:e,name:n.get(t)})))})()})})),l?C("div",{children:[C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",n.get("requirements")]})),C(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[C(hc,{children:n.get("accountHolderNameMatchesWithBusinessOrTradingName")}),C(hc,{children:n.get("accountNumberOrIbanVisible")}),C(hc,{children:n.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:12}})}),C(hc,{children:n.get("showsCountryOfBankAccount")}),C(hc,{children:n.get("hasTobeOfficialDocumentFromBank")})]})),C(mc,{type:cc.BANK_STATEMENT,className:"adl-u-margin-y-24"})]}):null,l||!Ss(null===(a=e.data)||void 0===a?void 0:a.bankStatementDocument)?C(Ue,Object.assign({className:"adyen-kyc-field--bankStatementDocument adyen-kyc-upload-field",name:"bankStatementDocument",isValid:y.bankStatementDocument},{children:C(bc,{name:"bankStatementDocument",ref:o,id:e.id,defaultData:s,isOptional:N.isOptionalField("bankStatementDocument"),iconPrefix:uc(cc.BANK_STATEMENT,!0)})})):null]}),l||!Ss(null===(r=e.data)||void 0===r?void 0:r.bankStatementDocument)?C(Ue,Object.assign({name:"description",label:N.getLabel("description"),helper:n.get("descriptionHelper"),errorMessage:N.getErrorMessage("description",h,f),isValid:y.description},{children:Jt("textArea",{name:"description",value:g.description,classNameModifiers:["description"],maxLength:200,onInput:p("description"),"aria-label":N.getLabel("description"),"aria-invalid":!y.description})})):null]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.optionalFields,t.optionalFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name)),ty=["bankAccountNumber"];function ay(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:ty,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:e.maskedFields}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"bankAccountNumber",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"bankAccountNumber",label:g.getLabel("bankAccountNumber"),classNameModifiers:["bankAccountNumber"],errorMessage:g.getErrorMessage("bankAccountNumber",c,m)||"",isValid:l.bankAccountNumber,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankAccountNumber",value:d.bankAccountNumber,readonly:g.isReadOnly("bankAccountNumber"),classNameModifiers:["bankAccountNumber"],onInput:s("bankAccountNumber","input"),onBlur:s("bankAccountNumber","blur"),"aria-required":!0,"aria-label":g.getLabel("bankAccountNumber"),"aria-invalid":!l.bankAccountNumber})}))]})}var ry;!function(e){e.AUD="AUD",e.BGN="BGN",e.BRL="BRL",e.CAD="CAD",e.CHF="CHF",e.CZK="CZK",e.DKK="DKK",e.EUR="EUR",e.GBP="GBP",e.HUF="HUF",e.HRK="HRK",e.PLN="PLN",e.NOK="NOK",e.RON="RON",e.SGD="SGD",e.SEK="SEK",e.USD="USD"}(ry||(ry={}));const ny={AUD:[ry.AUD],AUS:[ry.EUR],BE:[ry.EUR],BR:[ry.BRL],BG:[ry.BGN,ry.EUR],CA:[ry.CAD,ry.USD],HR:[ry.HRK,ry.EUR],CY:[ry.EUR],CZ:[ry.CZK,ry.EUR],DK:[ry.DKK,ry.EUR],EE:[ry.EUR],FI:[ry.EUR],FR:[ry.EUR],DE:[ry.EUR],GR:[ry.EUR],HU:[ry.HUF,ry.EUR],IE:[ry.EUR],IT:[ry.EUR],LV:[ry.EUR],LI:[ry.CHF,ry.EUR],LT:[ry.EUR],LU:[ry.EUR],MT:[ry.EUR],NL:[ry.EUR],NO:[ry.NOK,ry.EUR],PL:[ry.PLN,ry.EUR],PT:[ry.EUR],RO:[ry.RON,ry.EUR],SGD:[ry.SGD],SK:[ry.EUR],ES:[ry.EUR],SE:[ry.SEK,ry.EUR],CH:[ry.CHF,ry.EUR],GB:[ry.GBP,ry.EUR],US:[ry.USD]},iy=["swiftCode"];function oy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:iy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"swiftCode",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"swiftCode",label:g.getLabel("swiftCode"),classNameModifiers:["swiftCode"],errorMessage:g.getErrorMessage("swiftCode",c,m),isValid:l.swiftCode,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"swiftCode",value:d.swiftCode,readonly:g.isReadOnly("swiftCode"),onInput:s("swiftCode","input"),onBlur:s("swiftCode","blur"),"aria-required":!0,"aria-label":g.getLabel("swiftCode"),"aria-invalid":!l.swiftCode})}))]})}const sy=["branchCode"];function dy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:sy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"branchCode",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"branchCode",label:g.getLabel("branchCode"),classNameModifiers:["branchCode"],errorMessage:g.getErrorMessage("branchCode",c,m)||"",isValid:l.branchCode,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"branchCode",value:d.branchCode,readonly:g.isReadOnly("branchCode"),onInput:s("branchCode","input"),onBlur:s("branchCode","blur"),"aria-required":!0,"aria-label":g.getLabel("branchCode"),"aria-invalid":!l.branchCode})}))]})}const ly=["iban"],cy=(e,t)=>{const{iban:a}=e;return{iban:[...a,{modes:["blur","input"],validate:e=>null===function(e,t){if(Ss(e))return null;const a=e.replace(/ /g,"").toUpperCase(),r="validationPleaseEnterAValidIban";if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(a))return r;const n=a.substring(0,2);if(t&&!t.includes(n))return r;const i={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{26}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"}[n];if(void 0!==i&&!new RegExp(`^[A-Z]{2}\\d{2}${i}$`,"").test(a))return r;const o=a.substring(4,a.length)+a.substring(0,4);let s=!0,d="";for(let e=0;e<o.length;e+=1){const t=o.charAt(e);"0"!==t&&(s=!1),s||(d+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(t))}let l=0;for(let e=0;e<d.length;e+=1)l=+`${l}${d.charAt(e)}`%97;return 1===l?null:r}(e,t),errorMessage:"validationPleaseEnterAValidIban"}]}};function uy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,country:i,validators:o}=e,s=ue({setState:null}),{handleChangeFor:d,data:l,valid:c,errors:u,isValid:m,fieldProblems:p,triggerValidation:g}=ua(Object.assign(Object.assign({},e),{schema:ly,rules:cy(o,i),defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:e.maskedFields}));le((()=>{s.current.setState({type:"addToState",value:{data:l,valid:c,errors:u,fieldProblems:p,caller:"iban",dataStoreId:n}})}),[l,c,u,m]);const y=ra(e,a);return this.triggerValidation=g,C(t.Fragment,{children:[C(Ys,{stateRef:s}),C(Ue,Object.assign({name:"iban",label:y.getLabel("iban"),errorMessage:y.getErrorMessage("iban",u,p)||"",isValid:c.iban,showInlineErrors:r.showInlineErrors},{children:C(Vt,{name:"iban",value:l.iban,readonly:y.isReadOnly("iban"),classNameModifiers:["iban"],onInput:d("iban","blur"),onBlur:d("iban","blur"),"aria-required":!0,"aria-label":y.getLabel("iban"),"aria-invalid":!c.iban,transformInput:e=>e.toUpperCase()})}))]})}const my=["bankName"];function py(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:my,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"bankName",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"bankName",label:g.getLabel("bankName"),classNameModifiers:["bankName"],errorMessage:g.getErrorMessage("bankName",c,m)||"",isValid:l.bankName,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankName",value:d.bankName,readonly:g.isReadOnly("bankName"),onInput:s("bankName","input"),onBlur:s("bankName","blur"),"aria-required":!0,"aria-label":g.getLabel("bankName"),"aria-invalid":!l.bankName})}))]})}const gy=["bankCode"];function yy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:gy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"bankCode",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"bankCode",label:g.getLabel("bankCode"),classNameModifiers:["bankCode"],errorMessage:g.getErrorMessage("bankCode",c,m)||"",isValid:l.bankCode,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankCode",value:d.bankCode,readonly:g.isReadOnly("bankCode"),onInput:s("bankCode","input"),onBlur:s("bankCode","blur"),"aria-required":!0,"aria-label":g.getLabel("bankCode"),"aria-invalid":!l.bankCode})}))]})}const by=["bankCity"];function fy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:by,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"bankCity",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"bankCity",label:g.getLabel("bankCity"),classNameModifiers:["bankCity"],errorMessage:g.getErrorMessage("bankCity",c,m),isValid:l.bankCity,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankCity",value:d.bankCity,readonly:g.isReadOnly("bankCity"),onInput:s("bankCity","input"),onBlur:s("bankCity","blur"),"aria-required":!0,"aria-label":g.getLabel("bankCity"),"aria-invalid":!l.bankCity})}))]})}const hy=["accountHolder",...ly,...sy,...iy,"currency",...ty,...my,...gy];const vy=yt((function(e){const{i18n:t,commonProps:a,accountHolder:r}=We(),{legalEntityResponse:n}=e,i=e.requiredFields||hy,o=ue(null),s=ue(null),d=ue(null),l=ue(null),c=ue(null),u=ue(null),m=ue(null),p=ue({setState:null}),{data:g,valid:y,errors:b,isValid:f,handleChangeFor:h}=ua(Object.assign(Object.assign({},e),{defaultData:e.data,schema:i,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),v=ra(Object.assign(Object.assign({},e),{requiredFields:i}),t);le((()=>{p.current.setState({type:"addToState",value:{data:g,valid:y,errors:b,caller:e.id,dataStoreId:e.id}})}),[g,y,b,f]),this.triggerValidation=()=>{v.isRequiredField("bankAccountNumber")&&o.current.triggerValidation(),v.isRequiredField("branchCode")&&s.current.triggerValidation(),v.isRequiredField("swiftCode")&&l.current.triggerValidation(),v.isRequiredField("iban")&&c.current.triggerValidation(),v.isRequiredField("bankName")&&u.current.triggerValidation(),v.isRequiredField("bankCode")&&m.current.triggerValidation(),v.isRequiredField("bankCity")&&d.current.triggerValidation()};const _=Dd(e,ty),N=Dd(e,iy),O=Dd(e,ly),I=Dd(e,sy),E=Dd(e,my),T=Dd(e,gy),A=Dd(e,by),S=r===Wd.MY_SOLE_TRADER_NAME||Ym(n);return C("form",Object.assign({className:"adyen-kyc-individual__payout-account","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[C(Ys,{owner:e.id,stateRef:p}),C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:v,id:"ariaErrorField"}),C(ul,{page:"Payout account details",titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingPayoutDetails",title:t.get("whyDoINeedToFillInThisInformation"),content:t.get("reasonForFillingPayoutDetails")}),v.isRequiredField("accountHolder")&&C(Ue,Object.assign({name:"accountHolder",label:v.getLabel("accountHolder"),helper:t.get(S?"accountHolderDescriptionSoleProp":n.type===id.ORGANIZATION?"accountHolderDescriptionCompany":"accountHolderDescriptionIndividual"),classNameModifiers:["accountHolder"],isValid:y.accountHolder,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"accountHolder",value:g.accountHolder,placeholder:v.getPlaceholder("accountHolder"),readonly:!0,onInput:h("accountHolder","input"),onBlur:h("accountHolder","blur"),"aria-required":!0,"aria-label":v.getLabel("accountHolder"),"aria-invalid":!y.accountHolder,showInlineErrors:a.showInlineErrors})})),v.isRequiredField("bankAccountNumber")&&C(ay,Object.assign({},_,{dataStoreId:e.id,ref:o})),v.isRequiredField("iban")&&C(uy,Object.assign({},O,{dataStoreId:e.id,country:g.bankCountry,ref:c})),v.isRequiredField("swiftCode")&&C(oy,Object.assign({},N,{dataStoreId:e.id,ref:l})),v.isRequiredField("bankName")&&C(py,Object.assign({},E,{dataStoreId:e.id,ref:u})),v.isRequiredField("bankCode")&&C(yy,Object.assign({},T,{dataStoreId:e.id,ref:m})),v.isRequiredField("branchCode")&&C(dy,Object.assign({},I,{dataStoreId:e.id,ref:s})),v.isRequiredField("bankCity")&&C(fy,Object.assign({},A,{dataStoreId:e.id,ref:d}))]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.optionalFields,t.optionalFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name));var _y;!function(e){e.INSTANT_VERIFICATION="instantVerification",e.MANUAL_VERIFICATION="manualVerification"}(_y||(_y={}));class Ny extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.sourceError=t;const a=[];t&&(t instanceof this.constructor&&a.push(`${this.name}: ${t.message}`),t.stack&&a.push(t.stack)),this.stack=a.join("\n")}}const Oy=["Tink","PayWithMyBank"],[Iy,Ey]=Oy,Ty=["account_verification_report_id","error"],Ay=["accounts","error","reference"],Sy=e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,Ry=e=>i(void 0,void 0,void 0,(function*(){try{yield e}catch(e){console.error(e)}return{error:"UNKNOWN_ERROR",message:"We couldn't complete the account check. Please try again later or provide account details manually."}}));let Cy;class Dy{constructor(e,t,a){this.mountInProgress=!1,this.waitForResponse=()=>i(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{this.listener=a=>i(this,void 0,void 0,(function*(){try{const t=yield this.handleMessage(a);if(!t)return;e(t)}catch(e){t(e)}})),window.addEventListener("message",this.listener)}))}));try{this.iframeUrl=new URL(t)}catch(e){throw new Ny("WIDGET_URL_MALFORMED",e)}this.iframeElement=e,this.iframeWindow=e.contentWindow,this.vendor=a}removeMessageEventListener(){this.listener&&(window.removeEventListener("message",this.listener),this.listener=void 0)}handleMessage({data:e,origin:t,source:a}){return i(this,void 0,void 0,(function*(){if(a!==this.iframeWindow||t!==this.iframeUrl.origin)return;if(this.vendor!==Iy&&(e=>Object.entries(e).some((([e])=>Ay.includes(e))))(e)){if(Object.getOwnPropertyNames(e).includes("error"))throw e;return e}if(!Rs(e))return;const r=(e=>{try{const t=JSON.parse(e);return Ty.includes(t.type)?t:"invalid"}catch(e){return"invalid"}})(e);if("invalid"===r)return;const n={errorHandler:Ry,errorLevel:null,loadingContext:""},i=new URL(this.iframeUrl.searchParams.get("redirect_uri")),o=i.searchParams;switch(i.pathname=i.pathname.replace(RegExp(`(${this.vendor})$`,"i"),"$1/json"),r.type){case"account_verification_report_id":o.set("account_verification_report_id",r.data);try{const e=yield _(Object.assign(Object.assign({},n),{path:i.href}));if((e=>Sy(e)&&"accounts"in e)(e))return e;throw e}catch(e){throw new Ny("WIDGET_ACCOUNT_COMMIT_FAILURE",e)}case"error":{let{status:e,message:t}=r.error;o.set("error",e),o.set("message",t);try{const a=yield _(Object.assign(Object.assign({},n),{path:i.href}));(e=>Sy(e)&&"error"in e&&"errorMessage"in e)(a)&&(e=a.error,t=a.errorMessage)}catch(e){console.error(e)}throw{error:e,message:t}}}}))}unmount(){if(this.mountInProgress)throw new Ny("Cannot unmount widget, mounting is still in progress");this.removeMessageEventListener(),(e=>{const t=e.parentNode;let a=t.firstChild;for(;a;)a!==e&&t.removeChild(a),a=a.nextSibling})(this.iframeElement),Cy=void 0}mount(){return i(this,void 0,void 0,(function*(){if(Cy)throw new Ny(`You can only have one ${this.constructor.name} mounted at a time`);if(Cy=this,this.mountInProgress)throw new Ny("Cannot mount widget, mounting is already in progress");this.mountInProgress=!0;try{yield new Promise(((e,t)=>{let a=setTimeout((()=>{this.mountInProgress=!1,t(new Ny("WIDGET_TIMEOUT"))}),1e4);const r=()=>{a&&clearTimeout(a),a=null};this.iframeElement.addEventListener("load",(()=>{r(),this.mountInProgress=!1,e()})),requestAnimationFrame((()=>{try{this.vendor===Iy&&this.iframeUrl.searchParams.set("iframe","true"),this.iframeElement.setAttribute("src",this.iframeUrl.href)}catch(e){r(),this.mountInProgress=!1,t(e)}}))}))}catch(e){throw new Ny("WIDGET_LAUNCH_FAILED",e)}}))}mountAndWaitForResponse(){return i(this,void 0,void 0,(function*(){yield this.mount();try{return yield this.waitForResponse()}finally{this.removeMessageEventListener()}}))}}const ky="adyen-kyc-bank-verification-widget",Ly=`${ky}-container`;function wy({url:e,vendor:t,widgetCallback:a}){const r=ue(null);return le((()=>{const n=r.current;let o,s;var d,l;return l=function r(d){var l,c;"adyen-kyc:empty-bank-verification-widget-container"===d.animationName&&(c=r,(l=n).removeEventListener("animationstart",c,!1),l.removeEventListener("MSAnimationStart",c,!1),l.removeEventListener("webkitAnimationStart",c,!1),o=document.createElement("iframe"),o.setAttribute("allowFullscreen","true"),o.classList.add(ky),d.target.appendChild(o),requestAnimationFrame((()=>i(this,void 0,void 0,(function*(){try{s=new Dy(o,e,t);const r=yield s.mountAndWaitForResponse();a({action:"verification_success",result:r})}catch(e){if(e instanceof Ny)switch(e.message){case"WIDGET_ACCOUNT_COMMIT_FAILURE":return a({action:"handle_verification_exception",err:e.sourceError});case"WIDGET_LAUNCH_FAILED":case"WIDGET_URL_MALFORMED":case"WIDGET_TIMEOUT":return a({action:"retry_verification"});default:throw e}return a({action:"handle_verification_exception",err:e})}})))))},(d=n).addEventListener("animationstart",l,!1),d.addEventListener("MSAnimationStart",l,!1),d.addEventListener("webkitAnimationStart",l,!1),n.classList.add(Ly),()=>{null==s||s.unmount(),null==o||o.remove()}}),[]),C("div",{ref:r})}const Py=["verifiedAccountHolder","verifiedBankCountry","verifiedBankName","verifiedCurrencyCode","verifiedAccountName","verifiedBankAccountNumber"],jy=t.createContext(null);function xy({getBankVerificationVendors:e,retrieveBankAccountInfo:a,setBankVerificationError:r,onBack:n,country:o}){const{i18n:s}=We(),[d,l]=se(!1),c=((e,t)=>{const[a,r]=se();return le((()=>{i(void 0,void 0,void 0,(function*(){const a=(yield t(e))[0];r(Oy.includes(a.name)?a:null)})).catch((e=>console.error(e)))}),[e,t]),a})(o,e),u=pe((e=>{l(!0);const t="Please try again later or provide account details manually.";switch(e.action){case"handle_verification_exception":{let a="We're are sorry, an error has occurred";const{err:i}=e;switch(!(i instanceof Error)&&i.error){case"USER_CANCELLED":a=null;break;case"CONNECTION_ERROR":case"GENERIC_ERROR":case"UNKNOWN_ERROR":{const e=i.message.split(/\.\s*/)[0];e&&(a=e);break}}a&&r({title:a,content:t}),n&&n();break}case"retry_verification":r({title:"Failed to initialize instant account verification process",content:t}),n&&n();break;default:{const{accounts:t}=e.result;a(t[0])}}}),[a,n,r]);return r(null),C("form",Object.assign({className:"adyen-kyc-bank-verification"},{children:c&&!d?C(t.Fragment,{children:[C(wy,{widgetCallback:u,url:c.redirectUrl,vendor:c.name}),C(gg,{onBack:()=>null==n?void 0:n(),backButtonLabel:s.get("goBack")})]}):void 0}))}var My=yt((function(e){const{getBankVerificationVendors:a,setBankVerificationError:r,onBack:n,hideDropinLayout:i}=e,{i18n:o,payoutDefaultCurrency:s}=We(),d=e.id,l=Py,c=ue({setState:null}),u=Py,{handleChangeFor:m,data:p,valid:g,errors:y,isValid:b,triggerValidation:f,fieldProblems:h}=ua(Object.assign(Object.assign({},e),{schema:l,defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),[v,_]=se(!1);return le((()=>{c.current.setState({type:"addToState",value:{data:p,valid:g,errors:y,fieldProblems:h,caller:d,dataStoreId:d,schema:u}})}),[p,g,y,b]),this.triggerValidation=()=>{f(["verifiedBankAccountNumber"])},le((()=>(i(!0),()=>i(!1))),[]),C(t.Fragment,{children:[C(Ys,{owner:d,stateRef:c}),v&&C(t.Fragment,{children:[C(Ms,{heading:e.heading}),C("div",Object.assign({className:"adyen-kyc-bank-verification-success"},{children:[C("span",{children:C("i",{className:"adyen-kyc-icon adyen-kyc-icon-checkmark-small adyen-kyc-bank-verification-success__checkmark-icon",role:"img","aria-hidden":"true"})}),C("span",{children:[" ",o.get("youSuccessfullyVerifiedAccount")]})]}))]}),"function"==typeof a&&!v&&C("div",Object.assign({className:"adyen-kyc-bank-verification-container"},{children:C(xy,{getBankVerificationVendors:a,retrieveBankAccountInfo:t=>{var a;m("verifiedBankAccountNumber")(t.number),m("verifiedAccountName")(t.name),m("verifiedBankName")(t.bankName),m("verifiedBankCountry")(e.country),m("verifiedAccountHolder")(e.data.verifiedAccountHolder),m("verifiedCurrencyCode")(null!==(a=e.data.verifiedCurrencyCode)&&void 0!==a?a:s),_(!0),i(!1),f()},setBankVerificationError:r,onBack:n,country:e.country})}))]})}));const Fy=["payoutVerificationMethod"];function Vy(e){var a;const{i18n:r,loadingContext:n}=We(),i=ge(jy),o=e.id,s=Fy,d=ue({setState:null});function l(){if(e.bankVerificationVendors)return"TRUSTLY"===e.bankVerificationVendors[e.country]?"trustly":"TINK"===e.bankVerificationVendors[e.country]?"tink":void 0}const c=`${n}static/images/payout-verification-method`,u=[{id:_y.INSTANT_VERIFICATION,name:"verifyViaMobileBankAppOrBankWebsite",subtitle:"instant",description:"instantVerificationDescription",iconComponentDesktop:"instant-verification-desktop",iconComponentMobile:"instant-verification-mobile",provider:`provider-logo-${l()}`},{id:_y.MANUAL_VERIFICATION,name:"provideAccountDetailsAndUploadBankStatement",subtitle:"mayTakeAFewHoursOrDays",description:"manualVerificationDescription",iconComponentDesktop:"manual-verification-desktop",iconComponentMobile:"manual-verification-mobile"}],m=g(r.locale),{handleChangeFor:p,data:y,valid:b,errors:f,isValid:h,triggerValidation:v,fieldProblems:_}=ua(Object.assign(Object.assign({},e),{schema:s,defaultData:Object.assign(Object.assign({},e.data),{payoutVerificationMethod:_y.INSTANT_VERIFICATION}),rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),N=ra(e,r);return le((()=>{d.current.setState({type:"addToState",value:{data:y,valid:b,errors:f,fieldProblems:_,caller:o,dataStoreId:o,schema:s}})}),[y,b,f,h]),this.triggerValidation=()=>{v(["payoutVerificationMethod"])},C("div",{children:[C(Ys,{owner:o,stateRef:d}),C("form",Object.assign({className:"adyen-kyc-verification-method"},{children:[C(Ms,{heading:e.heading}),i&&C(zs,Object.assign({type:Ks.ERROR,className:"adyen-kyc-instant-verification-error",title:i.title,hasCloseButton:!1},{children:i.content&&C("p",{children:i.content})})),C("p",{children:[" ",r.get("textToVerifyAccount")," "]}),C("div",Object.assign({className:"adyen-kyc-account-holder-information"},{children:[C("div",Object.assign({className:"adyen-kyc-account-holder-information__labels"},{children:[C("p",{children:r.get("accountHolder")}),C("p",{children:r.get("bankCountry")})]})),C("div",Object.assign({className:"adyen-kyc-account-holder-information__values"},{children:[C("p",{children:e.accountHolder}),C("p",{children:null!==(a=m.getCountryName(e.country))&&void 0!==a?a:e.country})]}))]})),C(Ue,Object.assign({name:"verificationMethods",useLabelElement:!1,errorMessage:N.getErrorMessage("payoutVerificationMethod",f,_)},{children:C("div",Object.assign({className:"adyen-kyc-field-verification-methods"},{children:u.map((e=>C(zt,Object.assign({item:e,uniqueId:e.id,i18n:r,value:y.payoutVerificationMethod,onChange:p("payoutVerificationMethod"),name:"verificationMethod",labelClassName:"adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"},{children:[C(zt.Icon,{children:C("div",Object.assign({className:"adyen-kyc-radio-group-card__illustration"},{children:C("picture",{children:[C("source",{type:"image/svg+xml",media:`(min-width: ${jp.md}px)`,srcSet:`${c}/${e.iconComponentDesktop}.svg`}),C("source",{type:"image/svg+xml",media:`(max-width: ${jp.md}px)`,srcSet:`${c}/${e.iconComponentMobile}.svg`}),C("img",{srcSet:`${c}/${e.iconComponentDesktop}.svg`,alt:`${e.iconComponentDesktop}`})]})}))}),e.provider&&C(zt.Footer,{children:C("div",Object.assign({className:"adyen-kyc-field-verification-methods__footer"},{children:[r.get("poweredBy"),C("img",{className:"adyen-kyc-field-verification-methods__icon",src:`${c}/${e.provider}.svg`,alt:`${e.provider}-logo`})]}))})]}),e.id)))}))})),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:N,id:"ariaErrorField"}),C(ul,{page:"Instant verification with partner",titleId:"howDoesVerificationWithOurPartnerWorks",contentId:"bankVerificationWithPartnerSteps",title:r.get("howDoesVerificationWithOurPartnerWorks",{values:{provider:r.get(l())}}),content:C(t.Fragment,{children:[C("p",{children:[" ",r.get("isOurTrustedPartnerHelpingSpeedUpSetup",{values:{provider:r.get(l())}})," "]}),C("ul",Object.assign({className:"adl-guidance-list"},{children:[C("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("selectTheBankToReceivePayouts")})),C("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("loginIntoYourBankingEnvironment")})),C("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("yourBankWillConfirmYourAccountDetails")}))]})),C("p",{children:r.get("adyenWillOnlyGetTemporaryAccess")}),C(ed,Object.assign({href:"https://www.adyen.com/policies-and-disclaimer/privacy-policy",external:!0},{children:r.get("learnMore")}))]})})]}))]})}const Uy=({country:e,verificationVendorsCallback:t,bankVerificationVendors:a})=>!!t&&a&&!!a[e],By=(e,t)=>{const a={payoutAccountDetails:{formId:"payoutAccountDetails",formName:e===Rd.PAYIN?"payinAccount":"payoutAccount",fields:hy},payoutAccountDocuments:{formId:"payoutAccountDocuments",formName:"bankStatement",fields:Jg},payoutAccountVerification:{formId:"payoutAccountVerification",formName:"instantVerification",fields:Py}};return t?Object.assign({payoutVerificationMethod:{formId:"payoutVerificationMethod",formName:"verificationMethod",fields:Fy}},a):a};const Wy=e=>{var t,a,r,n,i,o,s,d;return e.type===id.INDIVIDUAL?`${null!==(r=null===(a=null===(t=e.individual)||void 0===t?void 0:t.name)||void 0===a?void 0:a.firstName)&&void 0!==r?r:""} ${null!==(o=null===(i=null===(n=e.individual)||void 0===n?void 0:n.name)||void 0===i?void 0:i.lastName)&&void 0!==o?o:""}`:e.type===id.ORGANIZATION?null!==(d=null===(s=e.organization)||void 0===s?void 0:s.legalName)&&void 0!==d?d:"":void 0},Hy=e=>{var t,a;return e.type===id.INDIVIDUAL?null===(t=e.individual)||void 0===t?void 0:t.residentialAddress.country:e.type===id.ORGANIZATION?null===(a=e.organization)||void 0===a?void 0:a.registeredAddress.country:void 0},qy=Og((function(e){var t,a;const{i18n:r,loadingContext:n,clientKey:i}=We(),{activeForm:o,currentTask:s,legalEntityResponse:d,handleGetBankVerificationVendors:l}=e,u=Uy({country:e.country,bankVerificationVendors:e.bankVerificationVendors,verificationVendorsCallback:e.handleGetBankVerificationVendors}),[m,p]=(e=>{const[t,a]=se(null),r=ue(null),n=pe((()=>{r.current&&(clearTimeout(r.current),r.current=null)}),[]);return le((()=>{if(n(),t){if(e<=0)return;r.current=setTimeout((()=>{a(null),n()}),e)}return()=>n()}),[t,n,e]),[t,a]})(1e4),[g,y]=se(u),b=By(s,u),f=null===(t=b.payoutVerificationMethod)||void 0===t?void 0:t.formId,h=null===(a=b.payoutAccountVerification)||void 0===a?void 0:a.formId,v=b.payoutAccountDetails.formId,_=b.payoutAccountDocuments.formId,N={[f]:ue(null),[v]:ue(null),[_]:ue(null),[h]:ue(null)},I=Cd(e,f),E=Cd(e,h),T=Cd(e,v),A=Cd(e,_);this.triggerCurrentFormValidation=()=>{var t;null===(t=null==N?void 0:N[e.activeForm.formId])||void 0===t||t.current.triggerValidation()};const S=e=>e===Rd.PAYIN?r.get("payinAccount"):r.get("payoutAccount"),R=ra(A,r).isOptionalField("bankStatementDocument"),D=ue({setState:null});return le((()=>()=>{D.current.setState({type:"resetState"})}),[]),le((()=>{o.formId===bg.formId&&g&&(e.setSkipSubmitAndGoTaskList(!0),e.setHideOnHomeButton(!0),e.setHideBackButton(!0),e.setSubmitButtonLabel("continue"))}),[e.activeForm]),le((()=>{O(c,n,r.locale,i)}),[]),C("div",Object.assign({className:"adyen-kyc-payout"},{children:[C(Ys,{owner:"PayoutComponent",stateRef:D}),C(Yl,{owner:"PayoutComponent",onChange:({currentState:t})=>{var a,r,n;y((null===(r=null===(a=t.allData)||void 0===a?void 0:a.payoutVerificationMethod)||void 0===r?void 0:r.payoutVerificationMethod)===_y.INSTANT_VERIFICATION),(null===(n=t.allData)||void 0===n?void 0:n.payoutVerificationMethod)&&e.evaluateConfiguration(t.allData)}}),u&&C("div",Object.assign({className:o.formId!==f?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(jy.Provider,Object.assign({value:m},{children:C(Vy,Object.assign({},I,{ref:N[f],heading:S(s),id:f,country:e.country,accountHolder:e.accountHolder,bankVerificationVendors:e.bankVerificationVendors}))}))})),g?o.formId===h&&C("div",Object.assign({className:"adyen-kyc-form-wrapper"},{children:C(My,Object.assign({},E,{ref:N[h],heading:r.get("bankAccountVerification"),id:h,country:e.country,onBack:e.onBack,onNext:e.onNext,hideDropinLayout:t=>e.setHideDropinLayout(t),getBankVerificationVendors:l,setBankVerificationError:p}))})):C("div",Object.assign({className:o.formId!==v?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(vy,Object.assign({},T,{ref:N[v],heading:S(s),id:v,country:e.country,legalEntityResponse:d}))})),!g&&C("div",Object.assign({className:o.formId!==_?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(ey,Object.assign({},A,{ref:N[_],heading:r.get(R?"bankStatementOptional":"bankStatement"),id:_,country:e.country}))}))]}))}),{getComponentForms:e=>By(e.currentTask,Uy({country:e.country,bankVerificationVendors:e.bankVerificationVendors,verificationVendorsCallback:e.handleGetBankVerificationVendors})),parseConfiguration:({requiredFields:e,country:t,bankVerificationAvailable:a})=>{const{fields:r,bankStatementRequirement:n}=(null==e?void 0:e.payout)||{};return function({requiredFields:e,country:t,bankStatementRequirement:a,bankVerificationAvailable:r}){if(e){const n={modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"};let i={};return e.forEach((e=>{const t=Zp[e.Field.fieldName],a=e.Field.validationRule;t&&(i[t]=a?{rule:r?"manualVerification":"REQUIRED",validators:[eg(a),n]}:{rule:r?"manualVerification":"REQUIRED",validators:[n]},i[t].masked=Qp.includes(t))})),r&&(i.payoutVerificationMethod={rule:"REQUIRED"},i.verifiedAccountHolder={rule:"instantVerification"},i.verifiedBankCountry={rule:"instantVerification"},i.verifiedBankName={rule:"instantVerification"},i.verifiedCurrencyCode={rule:"instantVerification"},i.verifiedAccountName={rule:"instantVerification"},i.verifiedBankAccountNumber={rule:"instantVerification"},i.bankStatementDocument={rule:"bankStatementRequirement"},i.description={rule:"bankStatementDescription"}),!r&&a&&(i.bankStatementDocument={rule:a},i.description={rule:"OPTIONAL"}),i=mg(Jp[t],i),i}}({requiredFields:r,country:t,bankStatementRequirement:n,bankVerificationAvailable:a})},rules:({data:e,requiredFields:t})=>({manualVerification:()=>{var t;if(e.payoutVerificationMethod)return(null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.MANUAL_VERIFICATION?"REQUIRED":void 0},instantVerification:()=>{var t;return e.payoutVerificationMethod?(null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.INSTANT_VERIFICATION?"REQUIRED":void 0:"REQUIRED"},verifiedBankAccountNumber:()=>{var t;if((null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.INSTANT_VERIFICATION)return"REQUIRED"},bankStatementRequirement:()=>{var a,r;if((null===(a=null==e?void 0:e.payoutVerificationMethod)||void 0===a?void 0:a.payoutVerificationMethod)===_y.MANUAL_VERIFICATION)return null===(r=null==t?void 0:t.payout)||void 0===r?void 0:r.bankStatementRequirement},bankStatementDescription:()=>{var a,r;if((null===(a=null==e?void 0:e.payoutVerificationMethod)||void 0===a?void 0:a.payoutVerificationMethod)===_y.MANUAL_VERIFICATION&&(null===(r=null==t?void 0:t.payout)||void 0===r?void 0:r.bankStatementRequirement))return"OPTIONAL"}}),getTaskName:e=>e.currentTask===Rd.PAYIN?"payinDetails":"payoutDetails",labels:()=>({verifiedAccountHolder:()=>"accountHolder",verifiedBankCountry:()=>"bankCountry",verifiedBankName:()=>"bankName",verifiedCurrencyCode:()=>"currencyCode",verifiedAccountName:()=>"accountName",verifiedBankAccountNumber:()=>"bankAccountNumber"})});function Gy(e){var t,a,r,n,o,s;const{transferInstrument:d,handleCreateDocument:l,handleGetDocument:c,handleUpdateDocument:u,handleUpdateTransferInstrument:m,handleCreateTransferInstrument:p,legalEntityResponse:y,trackingConig:b,accountHolder:f}=e,{loadingContext:h,clientKey:v}=We(),_=null!==(t=Hy(y))&&void 0!==t?t:e.country,[N,O]=se(),[I,E]=se(By(e.currentTask,Uy({country:_,bankVerificationVendors:null!==(a=e.bankVerificationVendors)&&void 0!==a?a:N,verificationVendorsCallback:e.handleGetBankVerificationVendors}))),[T,A]=se(!1),S=()=>i(this,void 0,void 0,(function*(){const t=yield $({loadingContext:h,clientKey:v,country:_,capabilities:e.capabilities,legalEntityType:e.legalEntityResponse.type});(null==t?void 0:t.bankVerificationProviders)&&(O(t.bankVerificationProviders),E(By(e.currentTask,Uy({country:_,bankVerificationVendors:t.bankVerificationProviders,verificationVendorsCallback:e.handleGetBankVerificationVendors}))))}));ce((()=>{e.handleGetBankVerificationVendors&&!e.bankVerificationVendors&&(A(!0),S().catch(console.error).finally((()=>{A(!1)})))}),[e.legalEntityResponse.type]);const{i18n:R,payoutDefaultCurrency:D}=We(),{showToast:k}=Ig(),[L,P]=se(e.problems),j=ym(l,c,u),x=(e=>yp(e,fd))(d),M=(null==x?void 0:x.payoutAccountDetails)||{},F=(null===(r=ny[_])||void 0===r?void 0:r.length)?ny[_][0]:null,U=D||F,H=f||Wy(y),q={payoutAccountDetails:Object.assign({accountHolder:H,bankCountry:_,currency:U},M),payoutVerificationMethod:{payoutVerificationMethod:_y.INSTANT_VERIFICATION},payoutAccountVerification:{verifiedAccountHolder:H,verifiedBankCountry:_}},[G,X]=se(q||e.data),Y=zp({trackingConig:b,task:e.taskType});le((()=>{w.addPageView("Payout dropin"),w.addEvent("Started payout task",{segmentation:Object.assign({},Y)})}),[]),le((()=>{var e;const t=(null===(e=null==d?void 0:d.documentDetails)||void 0===e?void 0:e.map((e=>e.id)))||[];t.length&&j.fetchDocuments(t,null==d?void 0:d.id).then((()=>{const e=(e=>{const t=_m(e,cc.BANK_STATEMENT)||null;return{bankStatementDocument:t?[{name:vp(t)}]:null,description:t.description}})(null==d?void 0:d.id);X(Object.assign(Object.assign({},G),{payoutAccountDocuments:e}))})).catch((()=>{k({label:R.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}))}),[]);const K=({forms:e,transferInstrument:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(Z(e)){const e=yield gp(a,t.id);e&&(yield j.uploadDocuments(e,t.id),e.forEach((e=>{w.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},Y),{documentType:e.type,fileExtention:e.attachments.map((e=>Sm(e.pageName)))})})})))}})),z=({data:t,forms:a,setLoadingStatus:r})=>i(this,void 0,void 0,(function*(){var n;const i={documentType:cc.BANK_STATEMENT,bankCountry:_,bankCurrency:U};w.addEvent("Provided payout details",{segmentation:Object.assign(Object.assign({},Y),i)}),r(Fu.LOADING),t.payoutAccountDetails.bankCountry=_,t.payoutAccountDetails.currency=U,((e,t,a)=>{e.forEach((e=>{t[e]===(null==a?void 0:a[e])&&delete t[e]}))})(Qp,t.payoutAccountDetails,null==x?void 0:x.payoutAccountDetails);let o=sp({data:t,legalEntity:y});const s=null===(n=null==x?void 0:x.payoutAccountDetails)||void 0===n?void 0:n.transferInstrumentId;try{o=s?yield m(V("id").from(o),s):yield p(o),w.addEvent("Saved payout details",{segmentation:Object.assign(Object.assign({},Y),i)}),yield K({forms:a,transferInstrument:o,dataSubmitted:t}),r(Fu.SUCCESS),e.onSubmit(t)}catch(t){if((null==t?void 0:t.errorCode)===st){const a=Eg(t,e.currentTask);P(Object.assign(Object.assign({},L),{validationErrors:a}))}else k({label:R.get("failedToUpdateDetails"),type:Cp.ERROR});r(Fu.SUCCESS),w.addEvent("Encountered error payout details",{segmentation:Object.assign(Object.assign({},Y),{errorCode:t.errorCode,errorMessage:t.title,errorType:"BE"})})}})),Z=e=>e.some((e=>e.formId===I.payoutAccountDocuments.formId)),Q=e=>i(this,void 0,void 0,(function*(){if(null==d?void 0:d.id){const t=sp({data:e,legalEntity:y}),a=yield gp(e,d.id);return!B(t.bankAccount,null==d?void 0:d.bankAccount)||a.length>0}return!0})),J=e=>{const t=e.payoutAccountDetails;return Object.values(t).every(Boolean)},ee=g(R.locale),te=e=>{var t;const a=W(e);return(null===(t=a.payoutAccountDetails)||void 0===t?void 0:t.bankCountry)&&(a.payoutAccountDetails.bankCountry=ee.getCountryName(a.payoutAccountDetails.bankCountry)),(null==e?void 0:e.payoutAccountDocuments)&&(a.payoutAccountDocuments.bankStatementDocument=(e=>{var t,a;return Object.assign({},(null==e?void 0:e.bankStatementDocument)&&{bankStatementDocument:{fileName:null===(a=null===(t=e.bankStatementDocument)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name}})})(null==e?void 0:e.payoutAccountDocuments)),a};return T?C(jg,{}):C(qy,{baseTrackingPayload:Y,currentTask:e.currentTask,capabilities:e.capabilities,data:G,country:Hy(y)||e.country,problems:L,eventEmitter:e.eventEmitter,accountHolder:null!==(n=e.accountHolder)&&void 0!==n?n:Wy(e.legalEntityResponse),hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,legalEntityType:y.type,legalEntityResponse:y,summary:{formatData:te,getOmittedKeys:()=>["transferInstrumentId"],omittedForms:[null===(o=null==I?void 0:I.payoutVerificationMethod)||void 0===o?void 0:o.formId]},hasDataChanged:Q,canSubmit:J,onSubmit:z,handleBackClick:e.handleBackClick,handleCreateTransferInstrument:e.handleCreateTransferInstrument,handleUpdateTransferInstrument:e.handleUpdateTransferInstrument,handleGetBankVerificationVendors:e.handleGetBankVerificationVendors,bankVerificationVendors:null!==(s=e.bankVerificationVendors)&&void 0!==s?s:N,navigateBackToTaskList:e.navigateBackToTaskList})}var $y;!function(e){e.CASH_MANAGEMENT_TRUST="cashManagementTrust",e.CORPORATE_UNIT_TRUST="corporateUnitTrust",e.DECEASED_ESTATE="deceasedEstate",e.DISCRETIONARY_INVESTMENT_TRUST="discretionaryInvestmentTrust",e.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST="discretionaryServicesManagementTrust",e.DISCRETIONARY_TRADING_TRUST="discretionaryTradingTrust",e.FIRST_HOME_SAVER_ACCOUNTS_TRUST="firstHomeSaverAccountsTrust",e.FIXED_TRUST="fixedTrust",e.FIXED_UNIT_TRUST="fixedUnitTrust",e.HYBRID_TRUST="hybridTrust",e.LISTED_PUBLIC_UNIT_TRUST="listedPublicUnitTrust",e.OTHER_TRUST="otherTrust",e.POOLED_SUPERANNUATION_TRUST="pooledSuperannuationTrust",e.PUBLIC_TRADING_TRUST="publicTradingTrust",e.UNLISTED_PUBLIC_UNIT_TRUST="unlistedPublicUnitTrust"}($y||($y={}));const Xy=[{id:$y.CASH_MANAGEMENT_TRUST,name:"cashManagementTrust"},{id:$y.CORPORATE_UNIT_TRUST,name:"corporateUnitTrust"},{id:$y.DECEASED_ESTATE,name:"deceasedEstate"},{id:$y.DISCRETIONARY_INVESTMENT_TRUST,name:"discretionaryInvestmentTrust"},{id:$y.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST,name:"discretionaryServicesManagementTrust"},{id:$y.DISCRETIONARY_TRADING_TRUST,name:"discretionaryTradingTrust"},{id:$y.FIRST_HOME_SAVER_ACCOUNTS_TRUST,name:"firstHomeSaverAccountsTrust"},{id:$y.FIXED_TRUST,name:"fixedTrust"},{id:$y.FIXED_UNIT_TRUST,name:"fixedUnitTrust"},{id:$y.HYBRID_TRUST,name:"hybridTrust"},{id:$y.LISTED_PUBLIC_UNIT_TRUST,name:"listedPublicUnitTrust"},{id:$y.OTHER_TRUST,name:"otherTrust"},{id:$y.POOLED_SUPERANNUATION_TRUST,name:"pooledSuperannuationTrust"},{id:$y.PUBLIC_TRADING_TRUST,name:"publicTradingTrust"},{id:$y.UNLISTED_PUBLIC_UNIT_TRUST,name:"unlistedPublicUnitTrust"}],Yy={trustType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},country:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},legalName:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},Ky=["legalName","country","trustType","vatNumber"],zy=["AU"];function Zy(e){var a;const{i18n:r,commonProps:n}=We(),i=e.id,o=ue({setState:null}),s=ue(null),d=e.requiredFields||Ky,l=d.filter((e=>["trustType","legalName","country"].includes(e))),{handleChangeFor:c,data:u,valid:m,errors:p,setData:g,triggerValidation:y,fieldProblems:b}=ua(Object.assign(Object.assign({},e),{schema:l,defaultData:e.data,rules:e.validators||Yy,fieldProblems:null==e?void 0:e.fieldValidationErrors})),f=ra(e,r);this.triggerValidation=()=>{y(l),f.isRequiredField("vatNumber")&&s.current.triggerValidation()},le((()=>{o.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:b,caller:i,dataStoreId:i,schema:d}})}),[u,m,p]);const h=Dd(e,Dl);return le((()=>{1!==zy.length||u.country||(g("country",zy[0]),y(["country"]))}),[null===(a=e.data)||void 0===a?void 0:a.country]),C(t.Fragment,{children:[C(Ys,{owner:i,stateRef:o}),C("form",Object.assign({className:"adyen-kyc-trust__registration-details","aria-describedby":n.showInlineErrors?null:"ariaErrorField"},{children:[C(Ms,{heading:e.heading}),C(qc,{verificationErrors:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:f,id:"ariaErrorField"}),f.isRequiredField("country")&&C(aa,{label:f.getLabel("country","countryOfEstablishment"),allowedCountries:zy,classNameModifiers:["country"],errorMessage:f.getErrorMessage("country",p,b),onDropdownChange:c("country"),value:u.country,readOnly:!0}),f.isRequiredField("legalName")&&C(Ue,Object.assign({name:"legalName",label:f.getLabel("legalName","nameOfTrustAgreement"),classNameModifiers:["legalName"],errorMessage:f.getErrorMessage("legalName",p,b),isValid:m.legalName,showInlineErrors:n.showInlineErrors},{children:Jt("text",{name:"legalName",value:u.legalName,readonly:f.isReadOnly("legalName"),classNameModifiers:["legalName"],onInput:c("legalName","input"),onBlur:c("legalName","blur"),"aria-required":!0,"aria-label":f.getLabel("legalName"),"aria-invalid":!m.legalName})})),f.isRequiredField("trustType")&&C(Ue,Object.assign({name:"trustType",label:f.getLabel("trustType","typeOfTrustAgreement"),classNameModifiers:["trust-type"],errorMessage:f.getErrorMessage("trustType",p,b),isValid:m.trustType},{children:Jt("select",{name:"trustType",onChange:c("trustType","blur"),selected:u.trustType,items:Xy.map((({id:e,name:t})=>({id:e,name:r.get(t)})))})})),f.isRequiredField("vatNumber")&&C(kl,Object.assign({},h,{ref:s,dataStoreId:i,country:e.country}))]}))]})}const Qy=["trustDocument"];const Jy=yt((function(e){const{i18n:t,commonProps:a}=We(),r=ue(null),[n,i]=se({}),{data:o,valid:s,fieldProblems:d,errors:l}=ua(Object.assign(Object.assign({},e),{defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),c=ra(e,t),u=ue({setState:null});return this.triggerValidation=()=>{c.isRequiredField("trustDocument")&&r.current.triggerValidation()},le((()=>{e.data.trustDocument&&i({trustDocument:e.data.trustDocument})}),[e.data]),le((()=>{u.current.setState({type:"addToState",value:{data:o,valid:s,errors:l,fieldProblems:d,caller:e.id,dataStoreId:e.id,schema:Qy}})}),[o,s,l,d]),C("form",Object.assign({className:"adyen-kyc-trust__trust-document","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[C(Ys,{owner:e.id,stateRef:u}),C(Ms,{heading:null==e?void 0:e.heading,description:null==e?void 0:e.description}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:c,id:"ariaErrorField"}),c.isVisibleField("trustDocument")&&C(Ue,Object.assign({className:"adyen-kyc-field--trustDocument adyen-kyc-upload-field",name:"trustDocument",isValid:s.trustDocument},{children:[C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",t.get("trustDocumentDescription")]})),C(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[C(hc,{children:t.get("nameOfTrust")}),C(hc,{children:t.get("fullLegalNamesOfAnyAppointers")}),C(hc,{children:t.get("dateDeedWasSigned")}),C(hc,{children:t.get("settlerDetailsIncl")}),C(hc,{children:t.get("trusteeDetailsIncl")}),C(hc,{children:t.get("beneficiariesDetailsIncl")})]})),C(bc,{name:"trustDocument",ref:r,id:e.id,defaultData:n,isOptional:c.isOptionalField("trustDocument")})]}))]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.optionalFields,t.optionalFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name));var eb=Jy;const tb={trustRegistrationDetails:{formId:"trustRegistrationDetails",formName:"registrationDetails",fields:[...Ky]},trustRegistrationAddress:{formId:"trustRegistrationAddress",formName:"registeredAddress",fields:[...ml]},trustDocument:{formId:"trustDocument",formName:"trustDocument",fields:[...Qy]}},ab=tb.trustRegistrationAddress.formId,rb=tb.trustRegistrationDetails.formId,nb=tb.trustDocument.formId;const ib=Og((function(e){const{i18n:t}=We(),a={[rb]:ue(null),[ab]:ue(null),[nb]:ue(null)};this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==a?void 0:a[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const r=Cd(e,rb),n=Cd(e,ab),i=Cd(e,nb),o=()=>{};return C("div",Object.assign({className:"adyen-kyc-trust"},{children:(s=e.activeForm,C("div",Object.assign({className:"adyen-kyc-trust"},{children:[C(Yl,{owner:"TrustComponent",onChange:o}),C("div",Object.assign({className:s.formId!==rb?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Zy,Object.assign({},r,{ref:a[rb],heading:t.get("registrationDetails"),id:rb,country:e.country}))})),C("div",Object.assign({className:s.formId!==ab?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(yl,Object.assign({},n,{ref:a[ab],heading:t.get("registeredAddress"),description:t.get("registeredAddressTrustHeaderDescription"),id:ab,country:e.country,problems:null==e?void 0:e.problems,labels:{operationalAddressIsSame:"isTrustOperationAddressSame"}}))})),C("div",Object.assign({className:s.formId!==nb?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(eb,Object.assign({},i,{ref:a[nb],heading:t.get("trustDocument"),id:nb}))}))]})))}));var s}),{getComponentForms:()=>tb,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),sg[t])),{});return a=mg(dg[t],a),a}}(null==e?void 0:e[id.TRUST],t),getTaskName:()=>"trustDetails"});function ob(e){const{parentLegalEntity:t,legalEntityResponse:a}=e,{i18n:r}=We(),n=(e=>{var t;let a;return(null==e?void 0:e.trust)&&(a=yp(e,Od),(null===(t=e.trust)||void 0===t?void 0:t.principalPlaceOfBusiness)?a.trustRegistrationAddress.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_NOT_SAME:(a.trustRegistrationAddress||(a.trustRegistrationAddress={}),a.trustRegistrationAddress.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_SAME)),a})(a),[o]=se(n||e.data),[s,d]=se(e.problems),l=g(r.locale),[c,u]=se(null),{showToast:m}=Ig();return C(ib,{capabilities:e.capabilities,data:o,country:"AU",problems:s,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,onSubmit:({data:n,setLoadingStatus:o})=>i(this,void 0,void 0,(function*(){o(Fu.LOADING);let i=(e=>{const t=Object.assign({},yp(e,Id));return t.trust.vatAbsenceReason&&(t.trust.vatNumber=""),t.type=id.TRUST,t})(n);try{if((null==a?void 0:a.id)||(null==c?void 0:c.id)?i=yield e.handleUpdateLegalEntity(V("type").from(i),(null==a?void 0:a.id)||(null==c?void 0:c.id)):(i=yield e.handleCreateLegalEntity(i),u(i)),!(null==a?void 0:a.id)){const a=Object.assign(Object.assign({},t),{entityAssociations:[{type:id.TRUST,legalEntityId:i.id},...t.entityAssociations||[]]});yield e.handleUpdateLegalEntity(V(["id","type","documents","transferInstruments","capabilities"]).from(a),a.id)}o(Fu.SUCCESS),m({label:r.get("successfullyUpdatedDetails"),type:Cp.SUCCESS}),null==e||e.onSubmit(n)}catch(e){if(m({label:r.get("failedToUpdateDetails"),type:Cp.ERROR}),(null==e?void 0:e.errorCode)===st){const t=Eg(e,Rd.TRUST);d(Object.assign(Object.assign({},s),{validationErrors:t}))}o(Fu.SUCCESS)}})),legalEntityType:id.TRUST,summary:{formatData:e=>{var t,a,n,i,o;const s=W(e);let d,c;if((null===(t=null==s?void 0:s.trustRegistrationDetails)||void 0===t?void 0:t.country)&&(d=l.getCountryName(s.trustRegistrationDetails.country)),null===(a=null==s?void 0:s.trustRegistrationDetails)||void 0===a?void 0:a.trustType){const e=null===(n=Xy.find((e=>{var t;return e.id===(null===(t=s.trustRegistrationDetails)||void 0===t?void 0:t.trustType)})))||void 0===n?void 0:n.name;c=r.get(e)}const u={nameOfTrustAgreement:e.trustRegistrationDetails.legalName,countryOfEstablishment:d,typeOfTrustAgreement:c,vatNumber:e.trustRegistrationDetails.vatNumber};return s.trustRegistrationDetails=u,(null===(i=null==s?void 0:s.trustRegistrationAddress)||void 0===i?void 0:i.registrationAddress)&&(s.trustRegistrationAddress.hasInnerForms=!0,s.trustRegistrationAddress.registrationAddress=Pe(null==s?void 0:s.trustRegistrationAddress.registrationAddress,l)),(null===(o=null==s?void 0:s.trustRegistrationAddress)||void 0===o?void 0:o.operationalAddress)&&(s.trustRegistrationAddress.operationalAddress=Pe(null==s?void 0:s.trustRegistrationAddress.operationalAddress,l)),s},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>i(this,void 0,void 0,(function*(){return!1})),canSubmit:e=>!1})}const sb=({parentLegalEntity:e,trustResponse:r,capabilityProblems:n,navigateBackToTaskList:o,onAddTrustMember:s,onAddTrustMemberOwner:d,handleUpdateLegalEntity:l,onTrustMemberDelete:c})=>{const{i18n:u}=We(),{showToast:m}=Ig(),p=wm(r),g=Wy(e),y=null==p?void 0:p.reduce(((e,t)=>{const a=e[t.legalEntityId],i=t.type;return e[t.legalEntityId]={legalEntityId:t.legalEntityId,types:a?[...a.types,i]:[i],status:Qm(Gg.LEGAL_ENTITY,n,r,[t.legalEntityId]),name:t.name,legalEntityType:t.entityType},e}),{}),b=y?Object.values(y):[],f=(e,t)=>{d(e,t,Rd.TRUST_MEMBER_COMPANY_OWNER)},h=(e,t)=>{var a;const r=t.entityAssociations;if(r)return null===(a=r.find((t=>t.associatorId===e&&t.type===Rm.UBO_THROUGH_OWNERSHIP)))||void 0===a?void 0:a.legalEntityId},v=e=>{const a=h(e.legalEntityId,r),n=C(t.Fragment,{children:[u.get("helpUsVerifyCompany")," ",C(ed,Object.assign({onClick:t=>{t.preventDefault(),f("",e.legalEntityId)},href:"to-company-owner"},{children:u.get("providePersonalDetailsOfOwner")}))]});if(e.legalEntityType===id.ORGANIZATION&&!a)return C(zs,{type:Ks.BASIC,hasCloseButton:!1,title:n,className:"adl-u-margin-top-16"})},_=e=>{const a=h(e.legalEntityId,r);return C(t.Fragment,{children:[C(Gc,{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>(e=>s(e))(e),label:u.get("editEntityDetails"),title:u.get("editTrustMember",{values:{trustMember:e.name}})}),e.legalEntityType===id.ORGANIZATION&&[C(Gc,a?{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>f(a,e.legalEntityId),label:u.get("editEntityOwner"),title:u.get("editOwnerOfTrustMember",{values:{trustMember:e.name}})}:{className:"adl-entity-association__edit",ghost:!0,icon:"plus",onClick:()=>f("",e.legalEntityId),label:u.get("addEntityOwner"),title:u.get("addOwnerToTrustMember",{values:{trustMember:e.name}})})],C(Gc,{className:"adl-entity-association__delete",ghost:!0,icon:"bin",onClick:()=>{return t=e.legalEntityId,i(void 0,void 0,void 0,(function*(){try{const e={entityAssociations:$m(r).filter((e=>e.legalEntityId!==t))};yield l(e,r.id),c(),m({type:Cp.SUCCESS,label:u.get("successFullyRemovedTrustMember")})}catch(e){m({type:Cp.ERROR,label:u.get("failedToRemoveTrustMember")})}}));var t},label:u.get("remove"),title:u.get("removeTrustMember",{values:{trustMember:e.name}})})]})},N=C(t.Fragment,{});return C(hg,{content:C(t.Fragment,{children:C("div",Object.assign({className:"adl-trust-members adl-u-width-full"},{children:[C(Ms,{heading:u.get("trustMembers"),description:u.get("trustMembersDescription")}),C(yg,{}),C("div",Object.assign({className:"adl-trust-members__wrapper"},{children:[C(Yg,{types:[Rm.SECONDARY_TRUSTEE],legalEntityId:e.id,status:Qm(Gg.LEGAL_ENTITY,n,e,[e.id]),name:g,legalEntityType:e.type},e.id),b.map((e=>C(Yg,{types:e.types,legalEntityId:e.legalEntityId,status:e.status,name:e.name,legalEntityType:e.legalEntityType,actions:_(e),reviewActions:N,infoContent:v(e)},e.legalEntityId)))]})),C(Gc,{secondary:!0,className:a("adl-trust-members__add",{"adl-trust-members__add--more":(null==b?void 0:b.length)>0}),icon:"plus",onClick:e=>{e.stopPropagation(),s()},label:u.get("addTrustMember")}),C(gg,{onHome:o,homeButtonLabel:u.get("saveAndGoToOverview")})]}))})})},db=[{id:id.INDIVIDUAL,name:"naturalPersonTitle",description:"naturalPersonDescription"},{id:id.ORGANIZATION,name:"businessEntityTitle",description:"businessEntityDescription"}],lb={entityType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},role:{modes:["blur"],validate:e=>!!(null==e?void 0:e.length),errorMessage:"fieldIsRequired"}};function cb(e){const{trustMember:t}=e,{i18n:a,commonProps:r}=We(),n={entityType:null==t?void 0:t.legalEntityType,role:null==t?void 0:t.types},i=e.requiredFields||["role","entityType"],{data:o,valid:s,errors:d,fieldProblems:l,handleChangeFor:c,isValid:u,triggerValidation:m}=ua(Object.assign(Object.assign({},e),{schema:i,rules:lb,defaultData:n,fieldProblems:null==e?void 0:e.fieldValidationErrors})),p=Object.values(Rm),g=p.filter((e=>e!==Rm.UBO_THROUGH_OWNERSHIP)),y=ra(e,a),[b,f]=se([]);return le((()=>{o.entityType===id.INDIVIDUAL?f(Vm(a,p)):o.entityType===id.ORGANIZATION&&f(Vm(a,g)),e.onChange({data:o,errors:d,valid:s})}),[o,u,a.languageCode,a.locale]),this.isValid=u,this.triggerValidation=m,C("form",Object.assign({className:"adyen-kyc-trust__role-and-entity-type adl-u-width-full"},{children:[C(Ms,{heading:a.get("roleAndEntityType")}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:y,id:"ariaErrorField"}),y.isRequiredField("entityType")&&C(Ue,Object.assign({name:"entityType",useLabelElement:!1,errorMessage:y.getErrorMessage("entityType",d,l),label:y.getLabel("entityType","whatTypeOfYourMembersEntity"),classNameModifiers:["entityType"],disabled:!!(null==t?void 0:t.legalEntityId)},{children:Jt("radioCard",{name:"entityType",items:db,value:o.entityType,i18n:a,readonly:y.isReadOnly("entityType"),onInput:c("entityType"),onChange:c("entityType"),"aria-required":!0,"aria-label":y.getLabel("entityType","whatTypeOfYourMembersEntity"),"aria-invalid":!s.entityType})})),C(Ue,Object.assign({name:"role",classNameModifiers:["role"],label:a.get("role"),errorMessage:y.getErrorMessage("role",d,l),isValid:s.role,disabled:!b.length},{children:Jt("select",{onChange:c("role","input"),name:"role",placeholder:a.get("rolePlaceholder"),selected:o.role,items:b,readonly:e.readOnly&&!!o.role,showInlineErrors:r.showInlineErrors,filterable:!1,isMulti:!0})}))]}))}const ub={roleAndEntityType:{formId:"roleAndEntityType",formName:"roleAndEntityType"},memberDetails:{formId:"memberDetails",formName:"memberDetails"},summary:{formId:"summary",formName:"summary"}},mb=ub.roleAndEntityType.formId;function pb(e){const{i18n:a}=We(),[r,n]=se(e.trustMember),o=ue(null),s={[mb]:o},d=(e=[],t=[])=>e.length!==t.length||!e.every((e=>t.includes(e))),l=C(_g,{forms:Object.values(ub).map((e=>{var t,a,r;return{formId:e.formId,formName:e.formName,isValid:null!==(r=null===(a=null===(t=s[e.formId])||void 0===t?void 0:t.current)||void 0===a?void 0:a.isValid)&&void 0!==r&&r}})),activeForm:ub.roleAndEntityType,taskName:"trustMembers"}),c=C(gg,{onNext:()=>{if(o.current.triggerValidation(),!o.current.isValid)return;const t=Object.assign(Object.assign({},e.trustMember),{legalEntityType:r.legalEntityType,types:r.types});e.navigateNext(t)},onHome:()=>i(this,void 0,void 0,(function*(){if(r.legalEntityId&&d(r.types,e.trustMember.types)){const t=$m(e.trust),a={entityAssociations:[...r.types.map((e=>({type:e,legalEntityId:r.legalEntityId})))||[],...t.filter((e=>e.legalEntityId!==r.legalEntityId))||[]]};yield e.handleUpdateLegalEntity(a,e.trust.id)}e.navigateBack()})),nextButtonLabel:a.get("next"),homeButtonLabel:a.get("saveAndGoToOverview")}),u=C(t.Fragment,{children:[l,C("div",Object.assign({className:"adyen-kyc-form-container"},{children:[C(cb,{ref:o,trustMember:e.trustMember,onChange:({data:t})=>{n(Object.assign(Object.assign({},e.trustMember),{legalEntityType:t.entityType,types:t.role}))}}),c]}))]});return C(hg,{content:u})}var gb,yb;function bb({content:e,styles:t}){const r=a({"adl-u-font-weight-semi-bold":null==t?void 0:t.includes(yb.Bold),"adyen-kyc-italic":null==t?void 0:t.includes(yb.Italic)});return C("span",Object.assign({className:r},{children:e}))}function fb({title:e,contentElements:t}){return C("section",Object.assign({className:"adl-u-margin-bottom-48"},{children:[C(Fg,Object.assign({level:2,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:C(bb,{content:e.content,styles:e.styles})})),C(Eb,{contentElements:t,isTopLevel:!0})]}))}function hb({title:e,label:t,isTopLevel:a,contentElements:r}){return a?C(cl,Object.assign({title:e.content},{children:C("section",Object.assign({className:"adyen-kyc-section-box",id:t},{children:C(Eb,{contentElements:r})}))})):C("section",Object.assign({id:t},{children:[C(Fg,Object.assign({level:2,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:C(bb,{content:e.content,styles:e.styles})})),C(Eb,{contentElements:r})]}))}function vb({isTopLevel:e,contentElements:t}){const r=a("adyen-kyc-paragraph",{"adl-u-margin-bottom-16":e});return C("p",Object.assign({className:r},{children:C(Eb,{contentElements:t})}))}!function(e){e.Chapter="chapter",e.Section="section",e.Paragraph="paragraph",e.Text="text",e.Weblink="weblink",e.List="list",e.Table="table",e.InternalReference="internalReference"}(gb||(gb={})),function(e){e.Bold="BOLD",e.Italic="ITALIC"}(yb||(yb={}));const _b=({url:e,displayText:t})=>C(ed,Object.assign({href:e},{children:t?C(bb,Object.assign({},t)):e}));function Nb({items:e,style:t}){return C(vc,Object.assign({ordered:t.ordered},{children:e.map(((e,t)=>C(hc,{children:[C(Eb,{contentElements:e.content}),e.subList&&C(Nb,{style:e.subList.style,items:e.subList.items})]},t)))}))}function Ob({rows:e,label:t,captions:a,titlePrefix:r,title:n}){return C("div",Object.assign({id:t},{children:[C("div",Object.assign({className:"adl-u-margin-y-8 adl-u-text-align-center"},{children:[r&&C(bb,Object.assign({},r)),n&&C(bb,Object.assign({},n))]})),C("table",Object.assign({className:"adl-table adl-table--condensed"},{children:[a&&C("caption",{children:C(Eb,{contentElements:a})}),C("tbody",Object.assign({className:"adl-table__body"},{children:e.map(((e,t)=>C("tr",Object.assign({className:"adl-table__row"},{children:e.map(((e,t)=>C("td",Object.assign({className:"adl-table__cell"},{children:C(Eb,{contentElements:e.elements})}),t)))}),t)))}))]}))]}))}function Ib({referencedLabel:e,displayText:t}){const a=t?t.content:e;return C(Gc,{onClick:()=>{const t=it(document.getElementById(e)),a=-1!==t&&t.querySelector("#"+e);null==a||a.scrollIntoView({behavior:"smooth"})},showAsLink:!0,label:a})}function Eb({contentElements:e,isTopLevel:t=!1,onExpandSection:a}){const r={chapter:fb,section:hb,paragraph:vb,text:bb,weblink:_b,list:Nb,table:Ob,internalReference:Ib,breakline:"br"},n=e.map((e=>C(r[e.type],Object.assign({},(e=>{switch(e.type){case gb.Chapter:return{title:e.title,contentElements:e.contentElements};case gb.Section:return{isTopLevel:t,title:e.title,label:e.label,contentElements:e.contentElements};case gb.Paragraph:return{isTopLevel:t,contentElements:e.contentElements};case gb.Text:return{content:e.content,styles:e.styles};case gb.Weblink:return{url:e.url,displayText:e.displayText};case gb.List:return{items:e.items,style:e.style};case gb.Table:return{rows:e.rows,label:e.label,captions:e.captions,titlePrefix:e.titlePrefix,title:e.title};case gb.InternalReference:return{referencedLabel:e.referencedLabel,displayText:e.displayText};default:return null}})(e)),`key-${e.type}-${Ve()}`)));return t?C(sl,Object.assign({onExpandSection:a},{children:n})):C("span",{children:n})}function Tb({contract:e,className:t,onExpandSection:r}){const n=a("adyen-contract-viewer",t);return C("main",Object.assign({className:n},{children:[C(Fg,Object.assign({level:1,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:C(bb,{content:e.title.content,styles:e.title.styles})})),C(Eb,{contentElements:e.contentElements,onExpandSection:r,isTopLevel:!0})]}))}const Ab=["signer","acceptPci"];function Sb({legalEntity:e,pciTemplateResponse:a,handleHomeClick:r,handleLanguageChange:n,handleSign:o,taskType:s,trackingConig:d}){var l,c,u,m,p;const{i18n:g}=We(),{showToast:y}=Ig(),b=zp({trackingConig:d,legalEntity:e,task:s}),[f,h]=se(null),{handleChangeFor:v,triggerValidation:_,data:N,valid:O,isValid:I,errors:E}=ua({schema:Ab,rules:{signer:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},acceptPci:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}}}),T=a.pciTemplateReferences,A=JSON.parse(decodeURIComponent(escape(window.atob(a.content)))),S=[...new Map(null===(l=null==e?void 0:e.entityAssociations)||void 0===l?void 0:l.map((e=>[e.legalEntityId,e]))).values()],R=e.type===id.ORGANIZATION?S.map((({legalEntityId:e,name:t})=>({id:e,name:t}))):[{id:null==e?void 0:e.id,name:`${null===(c=null==e?void 0:e.individual)||void 0===c?void 0:c.name.firstName} ${null===(u=null==e?void 0:e.individual)||void 0===u?void 0:u.name.lastName}`}],D=()=>{w.addEvent("Returned to task overview from PCI",{segmentation:Object.assign({},b)}),r()};le((()=>{n()}),[g.locale]),le((()=>{w.addPageView("PCI dropin"),w.addEvent("Started PCI task",{segmentation:Object.assign({},b)})}),[]);const k=C(t.Fragment,{children:[C("span",{children:g.get("byClickingSignIAcknowledgeAndAgree")}),C("ul",{children:[C("li",{children:g.get("acknowledgePciRequirements")}),C("li",{children:g.get("basedOnTheAboveSignatory")})]})]}),L=C(Vu,Object.assign({status:f,formOpacityWhenLoading:.3,showSpinner:!1},{children:[C(Tb,{contract:A,onExpandSection:e=>{w.addEvent("Expanded PCI section",{segmentation:Object.assign(Object.assign({},b),{statementExtended:e})})}}),C(Ue,Object.assign({name:"signer",label:g.get("signer"),classNameModifiers:["col-50"],className:"adl-u-margin-y-32",errorMessage:g.get(null===(m=E.signer)||void 0===m?void 0:m.errorMessage),isValid:O.signer},{children:Jt("select",{onChange:v("signer","blur"),name:"signer",placeholder:g.get("selectSigner"),selected:N.signer,items:R})})),C(Ue,Object.assign({name:"acceptPci",errorMessage:g.get(null===(p=E.acceptPci)||void 0===p?void 0:p.errorMessage),isValid:O.acceptPci},{children:C(at,{label:k,checked:N.acceptPci,name:"acceptPci",onChange:v("acceptPci")})}))]})),P=C(gg,{onHome:D,homeButtonLabel:g.get("goToOverview"),onNext:()=>i(this,void 0,void 0,(function*(){if(w.addEvent("Clicked PCI signing",{segmentation:Object.assign({},b)}),_(),I)try{h(Fu.LOADING),yield o(e.id,{signedBy:N.signer,pciTemplateReferences:T}),h(Fu.SUCCESS),y({label:g.get("pciSignedSuccessfully"),type:Cp.SUCCESS}),w.addEvent("Succeeded PCI signing",{segmentation:Object.assign({},b)}),D()}catch(e){h(Fu.SUCCESS),y({label:g.get("pciSignFailed"),type:Cp.ERROR}),w.addEvent("Failed PCI signing",{segmentation:Object.assign({},b)})}else w.addEvent("Encountered PCI validation error",{segmentation:Object.assign(Object.assign({},b),{fields:Object.entries(O).filter((([,e])=>!e)).map((([e])=>e))})})})),nextButtonLabel:g.get("sign")});return C(hg,{content:L,footer:P})}const Rb=["signer","acceptServiceAgreement"];function Cb({legalEntity:e,serviceAgreement:t,handleHomeClick:a,handleLanguageChange:r,handleSign:n,taskType:o,trackingConig:s}){var d,l,c,u;const{i18n:m}=We(),{showToast:p}=Ig(),g=zp({trackingConig:s,legalEntity:e,task:o}),[y,b]=se(null),{handleChangeFor:f,triggerValidation:h,data:v,valid:_,isValid:N,errors:O}=ua({schema:Rb,rules:{signer:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},acceptServiceAgreement:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}}}),I=JSON.parse(decodeURIComponent(escape(window.atob(t.document)))),E=e.type===id.ORGANIZATION?hu(e).map((({legalEntityId:e,name:t})=>({id:e,name:t}))):[{id:null==e?void 0:e.id,name:`${null===(d=null==e?void 0:e.individual)||void 0===d?void 0:d.name.firstName} ${null===(l=null==e?void 0:e.individual)||void 0===l?void 0:l.name.lastName}`}],T=()=>{w.addEvent("Returned to task overview from ToS",{segmentation:Object.assign({},g)}),a()};le((()=>{r(t.type)}),[m.locale]),le((()=>{w.addPageView("ToS dropin"),w.addEvent("Started ToS task",{segmentation:Object.assign({},g)})}),[]);const A=C(Vu,Object.assign({status:y,formOpacityWhenLoading:.3,showSpinner:!1},{children:[C(Tb,{contract:I,onExpandSection:e=>{w.addEvent("Expanded ToS section",{segmentation:Object.assign(Object.assign({},g),{statementExtended:e})})}}),C(Ue,Object.assign({name:"signer",label:m.get("signer"),classNameModifiers:["col-50"],className:"adl-u-margin-y-32",errorMessage:m.get(null===(c=O.signer)||void 0===c?void 0:c.errorMessage),isValid:_.signer},{children:Jt("select",{onChange:f("signer","blur"),name:"signer",placeholder:m.get("selectSigner"),selected:v.signer,items:E})})),C(Ue,Object.assign({name:"acceptServiceAgreement",errorMessage:m.get(null===(u=O.acceptServiceAgreement)||void 0===u?void 0:u.errorMessage),isValid:_.acceptServiceAgreement},{children:C(at,{label:m.get("iHaveReadAndIAcceptTheseTerms"),checked:v.acceptServiceAgreement,name:"acceptServiceAgreement",onChange:f("acceptServiceAgreement")})}))]})),S=C(gg,{onHome:T,homeButtonLabel:m.get("goToOverview"),onNext:()=>i(this,void 0,void 0,(function*(){if(w.addEvent("Clicked ToS signing",{segmentation:Object.assign({},g)}),h(),N)try{b(Fu.LOADING),yield n(e.id,t.termsOfServiceDocumentId,{acceptedBy:v.signer}),b(Fu.SUCCESS),p({label:m.get("serviceAgreementSignedSuccessfully"),type:Cp.SUCCESS}),w.addEvent("Succeeded ToS signing",{segmentation:Object.assign({},g)}),T()}catch(e){b(Fu.SUCCESS),p({label:m.get("serviceAgreementSignFailed"),type:Cp.ERROR}),w.addEvent("Failed ToS signing",{segmentation:Object.assign({},g)})}else w.addEvent("Encountered ToS validation error",{segmentation:Object.assign(Object.assign({},g),{fields:Object.entries(_).filter((([,e])=>!e)).map((([e])=>e))})})})),nextButtonLabel:m.get("sign")});return C(hg,{content:A,footer:S})}const Db=(e,t)=>i(void 0,void 0,void 0,(function*(){Lb(kb(e),t)})),kb=(e,t="application/octet-stream")=>{const a=window.atob(e),r=a.length,n=new Array(r);for(let e=0;e<r;e+=1)n[e]=a.charCodeAt(e);return new Blob([new Uint8Array(n)],{type:t})},Lb=(e,t)=>{if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(e,t);else{const a=window.URL.createObjectURL(e),r=document.createElement("a");r.style.display="none",r.href=a,r.setAttribute("download",t),void 0===r.download&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(a)}},wb=Og((function(e){const{i18n:a}=We(),r={[Lc]:ue(null),[wc]:ue(null),[Pc]:ue(null),[jc]:ue(null)},[n,i]=se(null);this.isCurrentFormValid=()=>{var t;return null===(t=null==r?void 0:r[e.activeForm.formId])||void 0===t?void 0:t.current.isValid},this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==r?void 0:r[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const o=Cd(e,Lc),s=Cd(e,Pc),d=Cd(e,wc),l=Cd(e,jc),c=({currentState:t,prevState:a})=>{var r,n,o,d,l,c,u;const m=null===(n=null===(r=a.data)||void 0===r?void 0:r[Lc])||void 0===n?void 0:n.companyCountry,p=null===(d=null===(o=t.data)||void 0===o?void 0:o[Lc])||void 0===d?void 0:d.companyCountry;null!=p&&p!==m&&e.onCountryChange(p);const g=null===(c=null===(l=t.data)||void 0===l?void 0:l[Lc])||void 0===c?void 0:c.legalCompanyName;i((null===(u=null==s?void 0:s.data)||void 0===u?void 0:u.tradingName)||g)};return C("div",Object.assign({className:"adyen-kyc-sol-prop"},{children:(u=e.activeForm,C(t.Fragment,{children:[C(Yl,{owner:"SolePropComponent",onChange:c}),C("div",Object.assign({className:u.formId!==Lc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(ic,Object.assign({},o,{data:Object.assign(Object.assign({},o.data),{companyCountry:e.country}),labels:{companyCountry:"countryOfEstablishment",legalCompanyName:"legalNameOfSoleProprietor"},ref:r[Lc],heading:a.get("nameAndCountry"),id:Lc}))})),C("div",Object.assign({className:u.formId!==Pc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Zl,Object.assign({},s,{data:Object.assign(Object.assign({},s.data),{tradingName:n}),ref:r[Pc],heading:a.get("registrationDetails"),id:Pc,country:e.country}))})),C("div",Object.assign({className:u.formId!==wc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(yl,Object.assign({},d,{ref:r[wc],heading:a.get("registeredAddress"),id:wc,country:e.country,problems:null==e?void 0:e.problems}))})),C("div",Object.assign({className:u.formId!==jc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Dc,Object.assign({},l,{ref:r[jc],id:jc,legalEntityType:id.SOLE_PROPRIETORSHIP}))}))]}))}));var u}),{getComponentForms:()=>kc,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),cg[t])),{});return a=mg(ug[t],a),a}}([e[id.TRUST]],t),rules:Lg,getTaskName:()=>"solePropDetails"});function Pb(e){var t;const{parentLegalEntity:a,legalEntityResponse:r,handleCreateDocument:n,handleGetDocument:o,handleUpdateDocument:s}=e,{i18n:d,setLocale:l}=We(),[c,u]=se(e.problems),m=g(d.locale),[p,y]=se(null),{showToast:b}=Ig(),[f,h]=se(((e,t)=>{var a;let r=(e=>{var t;let a;return(null==e?void 0:e.soleProprietorship)&&(a=yp(e,Ed),(null===(t=e.soleProprietorship)||void 0===t?void 0:t.principalPlaceOfBusiness)?a.solePropRegistrationAddress.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_NOT_SAME:(a.solePropRegistrationAddress||(a.solePropRegistrationAddress={}),a.solePropRegistrationAddress.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_SAME)),a})(e);if(!(e=>{var t;const a=(null===(t=null==e?void 0:e.solePropRegistrationAddress)||void 0===t?void 0:t.registrationAddress)||{};return Object.entries(a).some((([e,t])=>"country"!==e&&Boolean(t)))})(r)){const e=null===(a=dp(t,!1))||void 0===a?void 0:a.address;r=Object.assign(Object.assign({},r),{solePropRegistrationAddress:Object.assign(Object.assign({},null==r?void 0:r.solePropRegistrationAddress),{registrationAddress:Object.assign({},e)})})}return r})(r,a)),v=e=>e.some((e=>[kc.solePropConstitutionalDocument.formId].includes(e.formId))),_=ym(n,o,s),N=({forms:e,legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(v(e)){const e=yield hp(a,t.id);e&&(yield _.uploadDocuments(e,t.id))}})),O=({legalEntity:t})=>i(this,void 0,void 0,(function*(){if(!(null==r?void 0:r.id)){const r={entityAssociations:[{type:id.SOLE_PROPRIETORSHIP,legalEntityId:t.id}]};yield e.handleUpdateLegalEntity(r,a.id)}}));le((()=>{var t;e.eventEmitter.on("updateLocale",(e=>l(e)));const a=(null===(t=null==r?void 0:r.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];try{a.length&&_.fetchDocuments(a,r.id).then((()=>{const e=(e=>{const t=_m(e,cc.CONSTITUTIONAL_DOCUMENT)||null;return{solePropConstitutionalDocument:t?{constitutionalDocument:[{name:vp(t)}]}:null}})(r.id);h(Object.assign(Object.assign({},f),e))})).catch((()=>{b({label:d.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}))}catch(e){b({label:d.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}}),[]);const I=e=>{var t,a;return Object.assign({},(null==e?void 0:e.constitutionalDocument)&&{solePropConstitutionalDocument:{fileName:null===(a=null===(t=e.constitutionalDocument)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name}})};return C(wb,{capabilities:e.capabilities,data:f,country:(null===(t=null==f?void 0:f.solePropNameAndCountry)||void 0===t?void 0:t.companyCountry)||e.country,problems:c,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,onSubmit:({data:t,forms:a,setLoadingStatus:n})=>i(this,void 0,void 0,(function*(){n(Fu.LOADING);let i=fp(t);try{(null==r?void 0:r.id)||(null==p?void 0:p.id)?i=yield e.handleUpdateLegalEntity(V("type").from(i),(null==r?void 0:r.id)||(null==p?void 0:p.id)):(i=yield e.handleCreateLegalEntity(i),y(i)),yield N({forms:a,legalEntity:i,dataSubmitted:t}),yield O({legalEntity:i}),n(Fu.SUCCESS),b({label:d.get("successfullyUpdatedDetails"),type:Cp.SUCCESS}),null==e||e.onSubmit(t)}catch(e){if(b({label:d.get("failedToUpdateDetails"),type:Cp.ERROR}),(null==e?void 0:e.errorCode)===st){const t=Eg(e,Rd.TRUST);u(Object.assign(Object.assign({},c),{validationErrors:t}))}n(Fu.SUCCESS)}})),legalEntityType:id.TRUST,summary:{formatData:(e,t)=>{var a,r,n,i;let o,s=W(e);return(null===(a=null==s?void 0:s.solePropNameAndCountry)||void 0===a?void 0:a.companyCountry)&&(o=m.getCountryName(s.solePropNameAndCountry.companyCountry)),s.solePropNameAndCountry={legalNameOfSoleProprietor:null===(r=e.solePropNameAndCountry)||void 0===r?void 0:r.legalCompanyName,countryOfEstablishment:o},(null===(n=null==s?void 0:s.solePropRegistrationAddress)||void 0===n?void 0:n.registrationAddress)&&(s.solePropRegistrationAddress.hasInnerForms=!0,s.solePropRegistrationAddress.registrationAddress=Pe(null==s?void 0:s.solePropRegistrationAddress.registrationAddress,m)),(null===(i=null==s?void 0:s.solePropRegistrationAddress)||void 0===i?void 0:i.operationalAddress)&&(s.solePropRegistrationAddress.operationalAddress=Pe(null==s?void 0:s.solePropRegistrationAddress.operationalAddress,m)),v(t)&&(delete s[jc],s=Object.assign(Object.assign({},s),I(e.solePropConstitutionalDocument))),s},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>i(this,void 0,void 0,(function*(){var t;const a=(null===(t=fp(e))||void 0===t?void 0:t.soleProprietorship)||{},n=(null==r?void 0:r.soleProprietorship)||{},i=yield hp(e,"");return!B(a,n)||i.length>0})),canSubmit:e=>sd.SOLE_PROPRIETORSHIP.every((t=>{const a=_p(e,t);return!Ss(a)}))})}function jb({targetLegalEntityType:e,handleHomeClick:a,onLegalEntityTypeChange:r,handleUpdateLegalEntity:n,legalEntityResponse:o}){const{i18n:s}=We(),[d,l]=se(null),{showToast:c}=Ig(),u=C(gg,{onHome:a,homeButtonLabel:s.get("noGoBack"),onNext:()=>i(this,void 0,void 0,(function*(){try{l(Fu.LOADING),yield n({type:e},o.id),c({label:s.get("successfullyUpdatedDetails"),type:Cp.SUCCESS}),r()}catch(e){c({label:s.get("failedToUpdateDetails"),type:Cp.ERROR})}finally{l(Fu.SUCCESS)}})),nextButtonLabel:e===id.ORGANIZATION?s.get("continueCompany"):s.get("continueIndividual")});return C(hg,{content:C(Vu,Object.assign({status:d,formOpacityWhenLoading:.3,showSpinner:!1},{children:[(e=>{switch(e){case id.ORGANIZATION:return C(t.Fragment,{children:[C("h2",Object.assign({className:"adyen-kyc-form-header__heading","data-testid":id.ORGANIZATION},{children:s.get("continueAsCompany")})),C("span",{children:s.get("indicatedPayoutToCompany")}),C("p",{children:s.get("continueSigningUpAsCompany")})]});case id.INDIVIDUAL:return C(t.Fragment,{children:[C("h2",Object.assign({className:"adyen-kyc-form-header__heading","data-testid":id.INDIVIDUAL},{children:s.get("continueAsIndividual")})),C("span",{children:s.get("indicatedPayoutToPersonalAccount")}),C("p",{children:s.get("continueSigningUpAsIndividual")})]});default:C("p",{children:"Change not supported"})}})(e),u]}))})}const xb=[Rd.DECISION_MAKER_OVERVIEW,Rd.TASKS_OVERVIEW];function Mb(e){var{capabilities:t,legalEntityResponse:a,eventEmitter:r,onSubmit:o,onChange:s,onLoad:d=(()=>{}),onNavigate:l=(()=>{})}=e,c=n(e,["capabilities","legalEntityResponse","eventEmitter","onSubmit","onChange","onLoad","onNavigate"]);const{showToast:u}=Ig(),{loadingContext:m,clientKey:p,contextCountry:g,setLocale:y,i18n:b}=We(),[f,h]=se(!1),[v,_]=se([]),[N,O]=se([Rd.TASKS_OVERVIEW]),[I,E]=se(a),[T,A]=se(null),[S,R]=se(null),[D,k]=se(null),[L,P]=se([]),[j,x]=se(null),[M,F]=se(null),[V,U]=se(null),[B,W]=se(null),[H,q]=se(null),[G,X]=se(Fc(a)),[Y,K]=se(null),[z,Z]=se(null),[Q,J]=se(null),[ee,te]=se();le((()=>{w.addPageView("Task list"),r.on("updateLocale",(e=>y(e)))}),[]),ce((()=>{h(!0),(()=>i(this,void 0,void 0,(function*(){const e=yield $({loadingContext:m,clientKey:p,country:g,capabilities:t,legalEntityType:I.type});(null==e?void 0:e.bankVerificationProviders)&&te(e.bankVerificationProviders),(null==e?void 0:e.taskList)&&(_(e.taskList),e.taskList.includes(Rd.PCI_DSS)&&(yield ue()),yield ge())})))().catch(console.error).finally((()=>{h(!1),d()}))}),[I.type,g]),le((()=>{let e=I;if(xb.includes(N[N.length-1])){if(!Y){const t=setInterval((()=>i(this,void 0,void 0,(function*(){(e=>{var t;return Object.values(null!==(t=null==e?void 0:e.capabilities)&&void 0!==t?t:{}).every((e=>e.verificationStatus===zm.VALID||e.verificationStatus===zm.REJECTED))})(e)?ae():e=yield be()}))),3e3);K(t)}}else ae()}),[N.length]);const ae=()=>{Y&&(clearInterval(Y),K(null))},re=e=>{O([...N,e]),l(e)},ne=(e,t)=>{switch(e){case Rd.PAYOUT:ve(Rd.PAYOUT,t);break;case Rd.PAYIN:ve(Rd.PAYIN,t);break;case Rd.TRUST:Ie(Rd.TRUST);break;case Rd.TRUST_MEMBER_OVERVIEW:Ie(Rd.TRUST_MEMBER_OVERVIEW);break;case Rd.PCI_DSS:Ee(Rd.PCI_DSS);break;case Rd.SOLE_PROPRIETOR_COMPANY:Oe(Rd.SOLE_PROPRIETOR_COMPANY);break;case Rd.SERVICE_AGREEMENT:Te(Rd.SERVICE_AGREEMENT,t);break;default:re(e)}},ie=(e=1)=>{if(N.length>1){N[N.length-(e+1)]===Rd.TASKS_OVERVIEW?(O([Rd.TASKS_OVERVIEW]),l(Rd.TASKS_OVERVIEW)):(O(N.slice(0,-1*e)),l(N[N.length-1]))}},oe=e=>{s(e,this)},de=(e,t)=>i(this,void 0,void 0,(function*(){o(e,this),yield be(),ie(t)})),ue=()=>i(this,void 0,void 0,(function*(){var e,t;if(I.id&&(null==c?void 0:c.handleGetPciStatus))try{const a=yield c.handleGetPciStatus(I.id);return a.hasDocuments=(null===(t=null===(e=yield null==c?void 0:c.handleGetPciQuestionnaires(I.id))||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)>0,k(a),a}catch(e){console.warn(b.get("failedToGetPciStatus"))}})),me=()=>i(this,void 0,void 0,(function*(){const e=Xm(I)[0];if(e)try{const t=yield null==c?void 0:c.handleGetLegalEntity(e);Z(t)}catch(e){u(b.get("failedToFetchSoleProp"),{type:Cp.ERROR})}})),pe=()=>i(this,void 0,void 0,(function*(){const e=e=>i(this,void 0,void 0,(function*(){const t=yield c.handleGetPciTemplate(I.id,{language:e});A(t)}));try{yield e(b.locale.substring(0,2))}catch(t){const a="en";b.locale.substring(0,2)!==a&&(u({label:b.get("failedToGetPciTemplateInSelectedLanguageFallbackToEn"),type:Cp.ERROR}),yield e(a))}})),ge=()=>i(this,void 0,void 0,(function*(){if(I.id&&(null==c?void 0:c.handleGetServiceAgreementStatus))try{const e=yield c.handleGetServiceAgreementStatus(I.id);P(e.termsOfServiceTypes)}catch(e){console.warn(b.get("failedToGetServiceAgreementStatus"))}})),ye=e=>i(this,void 0,void 0,(function*(){const t=t=>i(this,void 0,void 0,(function*(){const a=yield c.handleGetServiceAgreement(I.id,{type:e,language:t});R(a)}));try{yield t(b.locale.substring(0,2))}catch(e){const a="en";b.locale.substring(0,2)!==a&&(u({label:b.get("failedToGetServiceAgreementInSelectedLanguageFallbackToEn"),type:Cp.ERROR}),yield t(a))}})),be=()=>i(this,void 0,void 0,(function*(){if(I.id&&(null==c?void 0:c.handleGetLegalEntity))try{const e=yield null==c?void 0:c.handleGetLegalEntity(I.id);return E(e),X(Fc(e)),e}catch(e){console.warn(b.get("failedToFetchLegalEntityDetails"))}})),fe=()=>i(this,void 0,void 0,(function*(){if(H.id&&(null==c?void 0:c.handleGetLegalEntity))try{const e=yield null==c?void 0:c.handleGetLegalEntity(H.id);return q(e),e}catch(e){console.warn(b.get("failedToFetchTrustDetails"))}})),he=(e,t,a=Rd.DECISION_MAKER)=>i(this,void 0,void 0,(function*(){if(t&&t!==I.id){const e=yield null==c?void 0:c.handleGetLegalEntity(t);U(e)}else U(I);if(e&&(null==c?void 0:c.handleGetLegalEntity))try{const t=yield null==c?void 0:c.handleGetLegalEntity(e);F(t),re(a)}catch(e){u({label:b.get("failedFetchingDecisionMaker"),type:Cp.ERROR})}else F(null),re(a)})),ve=(e,t)=>i(this,void 0,void 0,(function*(){if(t)try{yield Se(t),Ym(I)&&!z&&(yield me())}finally{re(e)}else x(null),re(e)})),_e=e=>{W(e||null),re(Rd.TRUST_MEMBER_ROLE_AND_TYPE)},Ne=e=>i(this,void 0,void 0,(function*(){try{if(null==e?void 0:e.legalEntityId){const t=yield null==c?void 0:c.handleGetLegalEntity(e.legalEntityId);F(t)}else F(null);W(e),re(e.legalEntityType===id.ORGANIZATION?Rd.TRUST_MEMBER_COMPANY:Rd.TRUST_MEMBER_INDIVIDUAL)}catch(e){u(b.get("failedToFetchTrustMemberDetails"),{type:Cp.ERROR})}})),Oe=e=>i(this,void 0,void 0,(function*(){try{yield me()}finally{re(e)}})),Ie=e=>i(this,void 0,void 0,(function*(){var t,a;const r=null===(a=null===(t=null==I?void 0:I.entityAssociations)||void 0===t?void 0:t.find((e=>e.type===id.TRUST)))||void 0===a?void 0:a.legalEntityId;if(r)try{const t=yield null==c?void 0:c.handleGetLegalEntity(r);q(t),re(e)}catch(e){u({label:b.get("failedToFetchTrustDetails"),type:Cp.ERROR})}else re(Rd.TRUST)})),Ee=e=>i(this,void 0,void 0,(function*(){try{yield pe(),re(e)}catch(e){u({label:b.get("failedToGetPciTemplate"),type:Cp.ERROR})}})),Te=(e,t)=>i(this,void 0,void 0,(function*(){if(L.length)try{yield ye(t),re(e)}catch(e){u({label:b.get("failedToGetServiceAgreement"),type:Cp.ERROR})}})),Ae=()=>i(this,void 0,void 0,(function*(){const e=zp({trackingConig:{topLevelLegalEntity:a},legalEntity:I,task:Rd.PCI_DSS});try{const t=yield null==c?void 0:c.handleGetPciQuestionnaires(I.id);for(const e of t.data){const t=yield null==c?void 0:c.handleDownloadPci(I.id,e.id);yield Db(t.content,t.id+".pdf")}}catch(e){u({label:b.get("failedToDownloadPci"),type:Cp.ERROR})}finally{w.addEvent("Downloaded signed PCI form",{segmentation:Object.assign({},e)})}})),Se=e=>i(this,void 0,void 0,(function*(){if(e&&(null==c?void 0:c.handleGetTransferInstrument))try{const t=yield null==c?void 0:c.handleGetTransferInstrument(e);x(t)}catch(e){u({label:b.get("failedToFetchPayoutAccount"),type:Cp.ERROR})}})),Re=e=>{var t;if(null==e?void 0:e.id)return null===(t=null==G?void 0:G.LegalEntity)||void 0===t?void 0:t[e.id]},Ce=()=>{var e;const t=null===(e=null==z?void 0:z.soleProprietorship)||void 0===e?void 0:e.name;return t||Wy(I)},De=e=>i(this,void 0,void 0,(function*(){yield fe(),yield de(e,2)})),ke=e=>{J(e),re(Rd.LEGAL_ENTITY_TYPE_SWITCHER)},Le=()=>{var e,n,s,d,l,u;const m=N[N.length-1];switch(m){case Rd.TASKS_OVERVIEW:return C(Xg,{onNavigateToTask:ne,tasks:v,legalEntityResponse:I,capabilityProblems:G,onPciDownload:Ae,pciStatus:D,serviceAgreementTypes:L});case Rd.DECISION_MAKER_OVERVIEW:return C(zg,{trackingConig:{topLevelLegalEntity:a},parentLegalEntity:V,legalEntityResponse:I,onNavigateToIndividual:he,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity,navigateBackToTaskList:ie,onDecisionMakerDelete:be,capabilityProblems:G});case Rd.INDIVIDUAL:return C(Sg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.INDIVIDUAL,parentLegalEntity:null,legalEntityResponse:I,problems:Re(I),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:e=>i(this,void 0,void 0,(function*(){o(e,this),yield be(),re(Rd.TASKS_OVERVIEW),J(null)})),handleHomeClick:()=>re(Rd.TASKS_OVERVIEW),homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken,onTypeSwitch:ke,isTargetLegalEntityType:Q===id.INDIVIDUAL}));case Rd.DECISION_MAKER:return C(Sg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.DECISION_MAKER,parentLegalEntity:V,legalEntityResponse:M,problems:Re(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:de,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Rd.TRUST_MEMBER_COMPANY_OWNER:return C(Sg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.TRUST_MEMBER_COMPANY_OWNER,parentLegalEntity:V,legalEntityResponse:M,problems:Re(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:e=>i(this,void 0,void 0,(function*(){yield fe(),yield de(e)})),handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Rd.TRUST_MEMBER_INDIVIDUAL:return C(Sg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.TRUST_MEMBER_INDIVIDUAL,parentLegalEntity:H,legalEntityResponse:M,problems:Re(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:De,handleBackClick:ie,handleHomeClick:()=>re(Rd.TRUST_MEMBER_OVERVIEW),homeButtonLabel:b.get("saveAndGoToOverview"),associationDetail:B,handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Rd.COMPANY:return C(Pg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.COMPANY,legalEntityResponse:I,capabilities:t,problems:Re(I),onChange:oe,eventEmitter:r,onSubmit:e=>i(this,void 0,void 0,(function*(){o(e,this),yield be(),re(Rd.TASKS_OVERVIEW),J(null)})),handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,onTypeSwitch:ke,isTargetLegalEntityType:Q===id.ORGANIZATION}));case Rd.TRUST_MEMBER_COMPANY:return C(Pg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.TRUST_MEMBER_COMPANY,parentLegalEntity:H,legalEntityResponse:M,capabilities:t,problems:null===(e=null==G?void 0:G.LegalEntity)||void 0===e?void 0:e[I.id],onChange:oe,eventEmitter:r,onSubmit:De,handleBackClick:ie,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),associationDetail:B,handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress}));case Rd.PAYOUT:case Rd.PAYIN:return C(Gy,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.PAYOUT,problems:null===(n=null==G?void 0:G.BankAccount)||void 0===n?void 0:n[null==j?void 0:j.id],currentTask:m,transferInstrument:j,legalEntityResponse:I,accountHolder:Ce(),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:de,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),bankVerificationVendors:ee,navigateBackToTaskList:ie}));case Rd.TRUST:return C(ob,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.TRUST,problems:null===(s=null==G?void 0:G.LegalEntity)||void 0===s?void 0:s[null==H?void 0:H.id],parentLegalEntity:I,legalEntityResponse:H,capabilities:t,onChange:oe,eventEmitter:r,onSubmit:de,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview")}));case Rd.TRUST_MEMBER_OVERVIEW:return C(sb,{parentLegalEntity:I,trustResponse:H,capabilityProblems:G,onAddTrustMember:_e,onAddTrustMemberOwner:he,navigateBackToTaskList:ie,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity,onTrustMemberDelete:fe});case Rd.TRUST_MEMBER_ROLE_AND_TYPE:return C(pb,{navigateNext:Ne,navigateBack:()=>i(this,void 0,void 0,(function*(){yield fe(),ie()})),trust:H,trustMember:B,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity});case Rd.PCI_DSS:return C(Sb,{legalEntity:I,pciTemplateResponse:T,trackingConig:{topLevelLegalEntity:a},taskType:Rd.PCI_DSS,handleHomeClick:ie,handleLanguageChange:pe,handleSign:(...e)=>i(this,void 0,void 0,(function*(){yield c.handleSignPci(...e),yield ue()}))});case Rd.SOLE_PROPRIETOR_COMPANY:return C(Pb,Object.assign({},c,{taskType:Rd.SOLE_PROPRIETOR_COMPANY,parentLegalEntity:I,legalEntityResponse:z,capabilities:t,problems:null===(d=null==G?void 0:G.LegalEntity)||void 0===d?void 0:d[null==z?void 0:z.id],onChange:oe,eventEmitter:r,onSubmit:de,handleBackClick:ie,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),country:null===(u=null===(l=null==I?void 0:I.individual)||void 0===l?void 0:l.residentialAddress)||void 0===u?void 0:u.country}));case Rd.SERVICE_AGREEMENT:return C(Cb,{legalEntity:I,serviceAgreement:S,trackingConig:{topLevelLegalEntity:a},taskType:Rd.SERVICE_AGREEMENT,handleHomeClick:ie,handleLanguageChange:ye,handleSign:(...e)=>i(this,void 0,void 0,(function*(){yield c.handleSignServiceAgreement(...e),yield ge()}))});case Rd.LEGAL_ENTITY_TYPE_SWITCHER:return C(jb,Object.assign({},c,{targetLegalEntityType:Q,legalEntityResponse:a,handleHomeClick:ie,onLegalEntityTypeChange:()=>i(this,void 0,void 0,(function*(){yield be(),(()=>{switch(Q){case id.INDIVIDUAL:re(Rd.INDIVIDUAL);break;case id.ORGANIZATION:re(Rd.COMPANY)}})()}))}))}};return f?C(jg,{}):Le()}const Fb={individualDropin:class extends xp{renderDropinComponent(){return C(Sg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},individual:class extends P{render(){return C(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey,contextCountry:this.props.country},{children:C(Sg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,hideDropinLayout:!0}))}))}},personalDetails:class extends P{render(){return C(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey},{children:C(om,Object.assign({},this.props))}))}},address:class extends P{get data(){return this.state.data}get isValid(){return!!this.state.isValid}render(){return C(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey},{children:C($c,Object.assign({ref:e=>{this.componentRef=e}},this.props,{onChange:this.setState}))}))}},contactDetails:class extends P{render(){return C(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations},{children:C(Pu,Object.assign({},this.props))}))}},company:class extends P{render(){return C(X,Object.assign({i18n:this.props.i18n,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations,locale:this.props.locale,contextCountry:this.props.country},{children:C(Pg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,hideDropinLayout:!0}))}))}},companyDropin:class extends xp{renderDropinComponent(){return C(Pg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},taskList:class extends xp{renderDropinComponent(){return C(Mb,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},payoutAccount:class extends xp{renderDropinComponent(){return C(Gy,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},trustDropin:class extends xp{renderDropinComponent(){return C(ob,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}}},Vb={type:"object",propertiesSchema:{registeredAddress:{type:"object",propertiesSchema:{country:{type:"string",required:!0}}}}},Ub={type:"object",propertiesSchema:{residentialAddress:{type:"object",propertiesSchema:{country:{type:"string",required:!0}}}}},Bb={id:{type:"string",required:!0},legalEntityId:{type:"string",required:!0},type:{type:"string",exactValue:["bankAccount","recurringDetail"],required:!0},bankAccount:{type:"object",propertiesSchema:{accountNumber:{type:"string"},accountType:{type:"string"},bankBicSwift:{type:"string"},bankCode:{type:"string"},bankName:{type:"string"},branchCode:{type:"string"},checkCode:{type:"string"},countryCode:{type:"string"},currencyCode:{type:"string"},iban:{type:"string"}}}},Wb={personalDetails:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{firstName:{type:"string",required:!0},lastName:{type:"string",required:!0},birthDate:{type:"string",required:!0},idNumber:{type:"string",required:!0},residencyCountry:{type:"string",required:!0},phoneNumber:{type:"string",required:!0},email:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},address:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{country:{type:"string"},city:{type:"string",required:!0},postalCode:{type:"string",required:!0},stateOrProvince:{type:"string",required:!0},houseNumberOrName:{type:"string",required:!0},street:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},contactDetails:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{phoneNumber:{type:"string",required:!0},email:{type:"string",required:!0},birthDate:{type:"string",required:!0},residencyCountry:{type:"string",required:!0},jobTitle:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},company:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{companyType:{type:"object",required:!0,propertiesSchema:{entityType:{type:"string",required:!0}}}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},individual:{propertiesSchema:{taskType:{type:"string"},data:{type:"object",required:!0,propertiesSchema:{firstName:{type:"string",required:!0},lastName:{type:"string",required:!0},birthDate:{type:"string",required:!0},idNumber:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},payoutAccount:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},transferInstrument:{type:"object",propertiesSchema:Bb},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:["organization","individual"],required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Ub,organization:Vb}}}},companyDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"organization",required:!0},capabilities:{type:"object",required:!0},organization:Vb}}}},individualDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"individual",required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Ub}}}},trustDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"trust",required:!0},capabilities:{type:"object",required:!0},trust:Vb}}}},taskList:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},handleGetLegalEntity:{type:"function",required:!0},handleCreateLegalEntity:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},transferInstrument:{type:"object",propertiesSchema:Bb},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:["organization","individual","trust"],required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Ub,organization:Vb}}}}},Hb=({expected:e,received:t,schemaParentsPaths:a})=>{for(const[r,n]of Object.entries(e)){const{type:e,exactValue:i,required:o,propertiesSchema:s}=n,d=t[r];if(o&&As(d))throw new Error(`\n\n"${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} is required, Please add it to the form creation options\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#adyenkyccreatedropincomponentname-componentname-options-options.\n `);if(o||!o&&!As(d)){if("array"===e&&!Array.isArray(d))throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} must be an array.`);if("array"!==e&&typeof d!==e)throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} must be a ${e}.`);if(i&&!Array.isArray(i)&&i!==d)throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} value should be equal to "${i}".`);if(i&&Array.isArray(i)&&!i.includes(d))throw new Error(`\n\n "${r}" ${a.length>0?` inside "${a.join(" -> ")}"`:""} value should be equal to one of: "${q(i,{type:"disjunction"})}"`);As(s)||(a.push(r),Hb({expected:s,received:d,schemaParentsPaths:a}),a.pop())}}};class qb{constructor(e){this.components=[],this.create=(e,t)=>{const a=this.getPropsForComponent(t);return this.validate(e,t),this.createForm(e,a)},this.update=e=>(this.setOptions(e),this.components.forEach((e=>e.update(this.getPropsForComponent(this.options)))),this),this.updateLocale=e=>(this.setOptions(e),this.components.forEach((e=>e.updateLocale(this.getPropsForComponent(this.options)))),this),this.remove=e=>(this.components=this.components.filter((t=>t._id!==e._id)),e.unmount(),this),this.setOptions=e=>{var t;return this.options=Object.assign(Object.assign({},this.options),e),(e=>{const t=["country","locale","clientKey","environment"].filter((t=>!e[t]));if(t.length>0)throw new Error(`\n\nPlease specify a ${q(t)} for the SDK to initialize!\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#configuration.\n `)})(this.options),this.options.loadingContext=(t=this.options.environment).endsWith("/")?t:`${t}/`,this.options.locale||(this.options.locale=o),this.modules={i18n:new S},this},this.getPropsForComponent=e=>Object.assign(Object.assign({},e),{i18n:this.modules.i18n}),this.setOptions(e)}createForm(e,t){const a=Fb[e],r=this.getPropsForComponent(t),n=new a(Object.assign(Object.assign({},this.options),r));return this.components.push(n),n}validate(e,t){(e=>{if(!e)throw new Error("\n\n No form Component was passed!\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#adyenkyccreatedropincomponentname-componentname-options-options\n ");const t=Fb[e],a=Object.keys(Wb);if(!(t&&t.prototype instanceof P))throw new Error(`\n\n"${e}" is not a valid form Component. Please enter one of the following:\n- ${q(a)}.\n `)})(e),((e,t)=>{const a=Wb[e],{propertiesSchema:r}=a;As(r)||Hb({expected:r,received:t,schemaParentsPaths:[]})})(e,t)}}qb.version={version:void 0,revision:void 0,branch:void 0,buildId:void 0},module.exports=qb;
1
+ "use strict";var e=require("whatwg-fetch"),t=require("preact"),a=require("classnames"),r=require("phone");function n(e,t){var a={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(a[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(e);n<r.length;n++)t.indexOf(r[n])<0&&Object.prototype.propertyIsEnumerable.call(e,r[n])&&(a[r[n]]=e[r[n]])}return a}function i(e,t,a,r){return new(a||(a=Promise))((function(n,i){function o(e){try{d(r.next(e))}catch(e){i(e)}}function s(e){try{d(r.throw(e))}catch(e){i(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof a?t:new a((function(e){e(t)}))).then(o,s)}d((r=r.apply(e,t||[])).next())}))}const o="en-US",s={close:"Close",individual:"Individual",payoutAccount:"Payout account",payinAccount:"Payin account",firstName:"First name",lastName:"Last name",country:"Country",street:"Street",houseNumber:"House number",houseNumberOptional:"House number (optional)",houseNumberOrName:"House number or name",postalCode:"Postal code",city:"City",cityTown:"City / Town",state:"State",provinceOrTerritory:"Province or territory",selectProvinceOrTerritory:"Select a province or territory",zipCode:"ZIP code",apartmentSuite:"Apartment / Suite",apartmentSuiteOptional:"Apartment / Suite (optional)",phoneNumber:"Phone number",email:"Email address",birthdate:"Date of birth",code:"Code",invalidEmail:"Please enter a valid email",invalidPhoneNumber:"Please enter a valid phone number",invalidCountryCode:"Please select a country code",birthDate:"Date of birth",idNumber:"Identity number",selectState:"Select a state",selectCountry:"Select a country",search:"Search",noOptionsFound:"No options found",SSNFormatUS:"*** \u2014 ** \u2014 XXXX",SSNFormatUS9Digits:"XXXXXXXXX",SINFormatCA:"XXXXXXXXX",useSSNFormatUS:"Please provide last 4 digits",use9DigitsSSNFormatUS:"Please use the SSN format: XXXXXXXXX",useSSNFormatCA:"Please use the SIN format: XXXXXXXXX",invalidFormat:"Invalid format",fieldIsRequired:"Field is required",tooManyFiles:"Too many files",duplicatedFiles:"Duplicated files",unsupportedFiletype:"Unsupported filetype",maximumFileSizeExceeded:"Maximum file size exceeded",personalDetails:"Personal details",invalidBirthDate:"Enter a valid birth date (TODO - explain why this is invalid)",address:"Address",contactDetails:"Contact Details",uploadDocument:"Upload Document",individualDetails:"Individual details",socialSecurityNumber:"Last 4 digits of Social Security Number (SSN)",socialSecurityNumber9Digits:"Social Security Number (SSN)",codiceFiscale:"Codice fiscale",personnummer:"Personnummer (PIN)",dniNumber:"DNI Number",cadastroDePessoasFisicas:"Cadastro de Pessoas F\xedsicas (CFP)",invalidFormatExpects:"Invalid format. Expected format: %{format}",invalidFormatForAuPassportNumber:"This isn't a valid Australian passport number. Expected format: 1-2 letters followed by 7 numbers.",invalidFormatForAuDriversLicenseNumber:"This isn't a valid Australian driver's license number. Expected format: 6-11 alphanumeric characters.",invalidFormatForAuDriversLicenseCardNumber:"This isn't a valid Australian driver's license card number. Expected format: 6-10 alphanumeric characters.",invalidFormatForAuProofOfIdentityCardNumber:"This isn't a valid Australian proof of identity card number. Expected format: 6-10 alphanumeric characters.",residencyCountry:"Country of residence",stateOrProvince:"State or province",selectStateOrProvince:"Select a state or province",dragYourFilesHereOr:"Drag your files here, or",browse:"Browse",supports:"Supports: %{fileTypes}. Size up to %{maxSize}. Maximum %{maxFiles} page.",complete:"Complete",summary:"Summary",selectDocument:"Select a document",passport:"Passport",passportNumber:"Passport number",id:"ID",driversLicense:"Driver's license",issuerState:"Issuing state",licenseNumber:"Driver license number",licenseCardNumber:"Card number",documents:"Documents",idDocument:"ID Document",documentType:"Document type",frontPage:"Front page",backPage:"Back page",fileName:"File name",proofOfNationality:"Proof of nationality",uploadDocumentForSsn:"Upload an ID document instead of SSN",operationalAddressHeader:"Additional address",operationalAddressHeaderDescription:"Is there a different address for your company\u2019s main business operations?",operationalAddressIsSame:"Is there a different address for your company\u2019s main business operations?",operationalAddressIsSameItemName:"No, the registered address is where we operate",operationalAddressIsNotSameItemName:"Yes, our headquarters are at a different location",verifyPrefilledInfoIsCorrect:"Verify if your prefilled information is correct",legalStructureHeader:"Tell us your legal structure",whatTypeOfCompanyDoYouHave:"What type of company do you have?",privateCompanyTitle:"Private company",privateCompanyDescription:"Owned privately. The shareholders don\u2019t necessarily trade on public exchanges (like the stock market).",publicCompanyTitle:"Public company",publicCompanyDescription:"Owned by public shareholders. They\u2019re also required to disclose financial information to the public regularly.",incorporatedPartnershipTitle:"Incorporated partnership",incorporatedPartnershipDescription:"An agreement between two or more people who run a business together.",nonProfitOrCharitableOrgTitle:"Non-profit or charitable organization",nonProfitOrCharitableOrgDescription:"An organization that has an official status as not for profit or tax exempt, sometimes called an NGO.",governmentalOrganizationTitle:"Governmental organization",governmentalOrganizationDescription:"Owned by the government or state.",associationIncorporatedTitle:"Incorporated association",associationIncorporatedDescription:"A registered entity without profit that's organized around a purpose such as recreation, culture, or charity.",jobTitle:"Job title",legalStructure:"Legal structure",entityType:"Entity type",registrationDetails:"Registration details",registeredAddress:"Registered address",registrationAddress:"Registration address",registeredAddressHeaderDescription:"The address registered to your company with the Chamber of Commerce.",registeredAddressTrustHeaderDescription:"The address registered to your trust",operationalAddress:"Operational address",provideRegistrationDetails:"Provide registration details",companyStructure:"Company structure",providePersonalDetails:"Provide personal details",providePersonalAddress:"Provide personal address",provideContactDetails:"Provide contact details",correctErrorsResubmit:"Correct the following errors and resubmit the form",registrationDocument:"Registration document",taxDocument:"Tax document",provideCompanyDetails:"Provide company details",companyDetails:"Company details",invalidRegistrationNumber:"Invalid registration number",tradingName:"Trading name",chamberOfCommerceRegistrationNumber:"Chamber of Commerce registration number",taxId:"Tax ID",exemptedFromTax:"Exempted from tax",doNotHaveEIN:"I do not have an Employer Identification Number",doNotHaveFirmenbuchnummer:"I do not have a Firmenbuchnummer",doNotHaveOrganisationsnummer:"I do not have an Organisationsnummer",doNotHaveYTunnus:"I do not have a Y-TUNNUS",doNotHaveLtRegistrationNumber:"I do not have a Juridini\u0173 asmen\u0173 registro kodas",doNotHaveLuRegistrationNumber:"I do not have a Num\xe9ro registre de commerce et des soci\xe9t\xe9s (RCS)",doNotHaveChRegistrationNumber:"I do not have a Unternehmens-Identifikationsnummer (UID), Num\xe9ro d\u2019identification des entreprises (IDE), Numero d\u2019identificazione delle imprese (IDI), or CH-number",taxIdAbsenceReason:"Tax ID absence reason",vatNumberExempted:"Exempted from VAT",vatNumberAbsenceReason:"VAT number absence reason",belowTaxThreshold:"Below tax threshold",industryExemption:"Industry exemption",validationPleaseEnterAValidRegistrationNumber:"Please enter a valid company registration number",validationPleaseEnterAValidRegistrationNumberWithFormat:"Please enter a valid company registration number. Expected format: %{format}",validationPleaseEnterAValidVatNumber:"Please enter a valid Tax id number",validationPleaseEnterAValidVatNumberWithFormat:"Please enter a valid Tax id number. Expected format: %{format}",validationPleaseEnterAValidTaxIdNumber:"Please enter a valid Tax id number",validationPleaseEnterAValidTaxIdNumberWithFormat:"Please enter a valid Tax id number. Expected format: %{format}",aValidAbnShouldBe11Digits:"A valid ABN should be 11 digits.",validationPleaseEnterAValidIban:"Please enter a valid IBAN",validation8Or11Characters:"Please enter either 8 or 11 characters.",validationCharacters:"Please enter %{length} characters.",validationDigitsBetween:"Please enter a number between %{start} and %{end} digits",validationDigits:"Please enter %{length} digits",enterValidRegistrationNumber:"Please enter a valid registration number",stockExchangeMIC:"Stock Exchange MIC",stockExchangeMICHelper:"Market Identifier Code, as defined in ISO 10383",stockISINHelper:"International Securities Identification Number, as defined in ISO 10383",stockISIN:"Stock ISIN",validationPleaseEnterAValidMarketIdentifier:"Please enter a valid Market identifier code",validationPleaseEnterAValidStockISIN:"Please enter a valid International Securities Identification Number",shareholderDocument:"Shareholder document",role:"Role",rolePlaceholder:"Select the applicable role(s)",back:"Back",next:"Next",submit:"Submit",nameAndCountry:"Name and country",companyCountry:"Where is your business located?",legalCompanyName:"Legal name of the company",legalCompanyNameHelper:"Enter the name exactly as it is on your Chamber of Commerce registration",accountDetailsDescription:"Provide few details about you to start accepting live payments.",provideDetails:"Provide details",payoutAccountsDescription:"To set up your account, let us know where to send your payouts.",payinAccountsDescription:"To complete your account, let us know where to send your payins.",providePayoutDetails:"Provide payout details",providePayinDetails:"Provide payin details",addExtraPayoutAccount:"Add extra payout account",addExtraPayinAccount:"Add extra payin account",payoutDetails:"Payout details",payinDetails:"Payin details",addPayoutAccount:"Add a payout account",addPayinAccount:"Add a payin account",failedToFetchPayoutAccount:"failed to fetch payout account",toCompleteProcessReviewAndSignOfficialDocumentation:"To complete this process, review and sign the official documentation.",sign:"Sign",signer:"Signer",selectSigner:"Select signer",pciSignedSuccessfully:"PCI signed successfully",pciSignFailed:"PCI signing failed",byClickingSignIAcknowledgeAndAgree:"By clicking the Sign button, I acknowledge and agree to the following: ",acknowledgePciRequirements:"We hereby acknowledge that we must remain compliant with the aforementioned PCI DSS requirements at all times as long as we want to receive payments. Consequently, we must continuously reassess our environment and implement any additional PCI DSS requirements if our environment changes.",basedOnTheAboveSignatory:"Based on the above, the signatory above asserts that the information within this attestation form fairly represents the results of the assessment.",failedToGetPciStatus:"Failed to get the PCI status",failedToGetPciTemplate:"Failed to get PCI template",failedToGetPciTemplateInSelectedLanguageFallbackToEn:"Failed to get the PCI template in the selected language. Falling back to English.",failedToDownloadPci:"Failed to download PCI document(s)",signServiceAgreement:"Sign services agreement",pciDssQuestionnaire:"PCI DSS questionnaire",serviceAgreementSignedSuccessfully:"Service agreement signed successfully",serviceAgreementSignFailed:"Service agreement signing failed",failedToGetServiceAgreementStatus:"Failed to get the service agreement status",failedToGetServiceAgreement:"Failed to get the service agreement",failedToGetServiceAgreementInSelectedLanguageFallbackToEn:"Failed to get the service agreement in the selected language. Falling back to English.",iHaveReadAndIAcceptTheseTerms:"I have read and I accept these terms and confirm that I am a legal representative authorized to accept these terms on behalf of the company. I have taken notice of the privacy statement (www.adyen.com/privacy) and I consent to my (personal) data being used for the purposes described therein.",finished:"Finished",invalidRole:"Please select a role",unableToVerifyTheIdNumber:"Unable to verify the Id number for the given country",download:"Download",accountHolder:"Account holder",accountHolderDescriptionCompany:"The bank account holder has to have the same name as your company.",accountHolderDescriptionIndividual:"This should be you, since the bank account has to be in your name",accountHolderDescriptionSoleProp:" The bank account holder has to have the same name as your sole proprietorship",bankCountry:"Bank country",bankAccountCountry:"Bank account country",currencyCode:"Currency code",currencyPlaceholder:"Select a currency code",bankAccountNumber:"Account number",iban:"IBAN",swiftCode:"Swift code",bsbNumber:"BSB Number",branchCode:"Branch code",transitNumber:"Transit number",listitemVoidedChequeBankLetterBankStatementOnline:"Voided cheque/Bank letter/Bank statement/Online banking environment",instructionNumber:"Instruction number",institutionNumber:"Institution number",sortCode:"Sort code",bankCityTown:"Bank city/town",clearingCode:"Clearing code",bankCode:"Bank code",bankName:"Bank name",achRoutingNumber:"ACH routing number",decisionMaker:"Decision-makers",decisionMakerDescription:"Provide the information of the owners, controlling persons, and signatories in your company. Keep in mind that one person may hold multiple roles. The requirements are as follows:",owner:"Owner",ownerDescription:"Someone who owns 25% or more of the company(directly or indirectly)",controllingPerson:"Controlling person",controllingPersonDescription:"Not an owner, but with authority to make major business decisions",signatory:"Signatory",signatoryDescription:"Authorized to sign the contracts on behalf of the company",director:"Director",directorDescription:"Someone appointed to manage a company's business and affairs",provideAllDirectorsYouShouldHaveAtLeastOne:"Provide <strong>all directors</strong>. You should have at least one.",provideAllDirectorsYouShouldHaveAtLeastThree:"Provide <strong>all directors</strong>. You should have at least three.",provideAllDirectorsYouShouldHaveAtLeast3AndAtMost15:"Provide <strong>all directors</strong>. You should have at least 3, and at most 15",addDecisionMaker:"Add decision maker",addDecisionMakers:"Add decision makers",goToOverview:"Go to overview",saveAndGoToOverview:"Save and go to overview",edit:"Edit",remove:"Remove",toggleAssociationMenu:"toggle menu of %{name} ",editDecisionMakerDetails:"edit details of %{decisionMaker}",removeDecisionMaker:"remove %{decisionMaker}",verifyDecisionMakerDetails:"verify details of %{decisionMaker}",goToMenu:"Go to Menu",confirm:"Confirm",goToDecisionMakers:"Go to list of decision makers",theSubmitWasSuccessful:"The submit was successful",thereWasAnErrorTryAgain:"There was an error, please try again",proofOfIdentityCard:"State-issued proof of identity card",proofOfIdentityCardNumber:"Identity card number",proofOfResidence:"Proof of residency",proofOfNationalId:"Proof of national ID",backToTaskList:"Back to task list",proofOfResidenceDocumentTypeLabel:"Upload a document as proof of address for %{name}. We need to see this document so we can more accurately verify their identity.",utilityBill:"Utility bill",governmentIssuedCorrespondence:"Government-issued correspondence",taxationDocument:"Taxation document",extractFromMunicipalPersonalRecordsDatabase:"Extract from Municipal Personal Records database",salarySlip:"Salary slip",mortgageStatement:"Mortgage statement",certificateOfVoterRegistration:"Certificate of voter registration",businessAccountDetailsDescription:"To prepare your account, we need information about your business.",documentAddressedToName:"The document has to be addressed to %{name}",showAddressStateCountry:"Shows address, state, and country of residence",dateOnDocumentNoOlderThanXMonths:"The date on the document is no older than %{numberOfMonths} months",fullDocumentVisibleWithReadableText:"The full document needs to be visible, with all text readable",documentCannotBeDamaged:"The document cannot be damaged",verify:"Verify",go:"Go",idUploadDocumentSubtitle:"So that we can verify the identity of <strong>%{name}</strong>, we need to see their government issued ID. Choose the method most convenient to you.",documentNotExpiredOrDamaged:"The document cannot be expired or damaged",weAccept:"We accept:",includeFrontAndBack:"Include both the front and back side, each in separate file",fullDocumentVisible:"The full document needs to be visible, with all text readable",imagesInColor:"Images have to be in color",birthDatePlaceholder:"dd/mm/yyyy",onlyEnterNormalCharacters:"Please only enter normal characters",verifyCompanyInfoIsUpToDate:"You need to verify that your company information is up to date",failedToFetchRelevantDocuments:"Failed to fetch relevant documents",failedToFetchRelevantAccounts:"Failed to fetch relevant accounts",processing:"Processing",unsuccessful:"Unsuccessful",invalidDateOfBirth:"Please enter a valid date of birth",successfullyUpdatedDetails:"Successfully updated details",failedToUpdateDetails:"Failed to update details",successfullyVerifiedIdNumber:"Successfully verified %{idNumber}",failedFetchingDecisionMaker:"Failed to get decision maker details",fileUpload:"File upload",bankStatement:"Bank statement",bankStatementOptional:"Bank statement (optional)",bankAccountVerification:"Bank account verification",bankStatementDocumentTypeLabel:"Upload a document to confirm your bank account information. We need to see this document so we can set up your payouts.",requirements:"Requirements:",accountHolderNameMatchesWithBusinessOrTradingName:"The account holder name on the document has to match the legal business or trading name of your company",accountNumberOrIbanVisible:"The account number or IBAN needs to be visible",showsCountryOfBankAccount:"Shows the country where the bank account is located (for banks in the EU, the country is included in the IBAN)",hasTobeOfficialDocumentFromBank:"It has to be official document from a bank, demonstrated by a bank logo, the bank name, or a bank-specific font",ifDocumentMoreThan12months:"If your document is older than 12 months, then it should contain a statement with the company\u2019s assets and liabilities. You will need to have it signed and dated by someone with decision-making or signing power within the company. Make sure the date, title, and legal entity name are included.",whyDoINeedToFillInThisInformation:"Why do I need to fill in this information?",reasonForFillingCompanyRegistrationDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingCompanyAddressDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingIndividualPersonalDetails:"We have to make sure that everyone who uses our services is who they say they are. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingIndividualAddressDetails:"We have to make sure that everyone who uses our services is who they say they are. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingPayoutAccountDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",reasonForFillingPayoutDetails:"We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we\u2019ll check all of this information against official records. This is a part of the financial regulations that we have to follow as a payments provider.",whatIsTheDifferenceBetweenTheseRoles:"What is the difference between these roles?",ownerGuideDescription:"An <strong>owner</strong> is someone who owns 25% or more of the company, through voting rights, equity, or similar.",controllingPersonGuideDescription:"A <strong>controlling person</strong> is not an owner, but has the authority to make major business decisions.",signatoryGuideDescription:"A <strong>signatory</strong> has been given authority to sign official documents on behalf of the company. Usually a signatory is also an owner or a controlling person.",directorGuideDescription:"A <strong>director</strong> is someone appointed to manage a company's business and affairs. Who your directors are can be found on the companies register.",someoneAppointedToManageACompanysBusinessAndAffairs:"Someone appointed to manage a company's business and affairs.",whatIfDocumentIsMoreThan12MonthsOld:"What if my document is more than 12 months old?",description:"Description (optional)",descriptionHelper:"Attach description to this payout account",depositTicket:"Deposit ticket / deposit form",screenshotOfOnlineBankingEnviroment:"Screenshot of online banking environment",officialEmailOrALetterFromYourBank:"Official email or a letter from your bank",cheques:"Cheques",releveDidentiteBancaire:"Relev\xe9 d'Identit\xe9 Bancaire (RIB)",successFullyRemovedDecisionMaker:"Successfully removed a decision maker",failedToRemoveDecisionMaker:"Failed to remove a decision maker",chamberOfCommerceExtract:"Chamber of Commerce extract",taxNumberCorporateNumber:"Tax Number / Corporate Number",companyLegalName:"Company legal name",companyName:"Company name",companyType:"Company type",taxReferenceNumber:"Tax reference number",SST:"SST",companyProfile:"Company profile",companyNumber:"Company number",RfcDocument:"RFC Document",RFC:"RFC",companyRegistrationDocument:"Company registration document",businessName:"Business name",typeOfCompany:"Type of company",typeOfIdentity:"Type of identity",typeOfIdentitySubtitle:"We need to see a government-issued photo ID document that belongs to the person mentioned above.",CNPJ:"CNPJ",businessNumber:"Business number",doingBusinessAs:"Doing business as",taxIdentificationNumber:"Tax identification number",irdDocument:"IRD document",irdNumber:"IRD number",australianBusinessNumberAbn:"Australian business number (ABN)",australianBusinessNumberAcn:"Australian company number (ACN)",enterpriseNumber:"Enterprise Number",NIP:"NIP (Numer identyfikacji podatkowej)",NIPC:"NIPC (N\xfamero de Identifica\xe7\xe3o de Pessoa Colectiva)",numerodeIVA:"N\xfamero de IVA",NIF:"NIF (N\xfamero de Identificaci\xf3n Fiscal)",NIFdeIVA:"N\xfamero de Identificaci\xf3n a efectos de IVA",partitaIVA:"Partita IVA",organisationsnummer:"Organisationsnummer",momsregistreringsnummer:"Momsregistreringsnummer",codiceFiscaleOrCCIAA:"Codice fiscale or CCIAA","UST-ID":"UST-ID (Umsatzsteuer-Identifikationsnummer)",DIC:"DI\u010c (Da\u0148ov\xe9 identifika\u010dn\xed \u010d\xedslo)",ICO:"IC\u030cO (Identifikac\u030cni\u0301 c\u030ci\u0301slo)","USt-IdNr":"USt-IdNr. (Umsatzsteuer-Identifikationsnummer)",handelsregisternummer:"Handelsregisternummer",NumeroDeTVA:"Num\xe9ro de TVA",organisasjonsnummer:"Organisasjonsnummer",skattenummer:"Skattenummer",verificationErrorMessage:"Some information couldn\u2019t be verified. Click to see what needs to be adjusted.",remediationFormErrorMessage:"Some information couldn\u2019t be verified. Information in this form may need to be adjusted.",youHaveUnsavedChanges:"You have unsaved changes",areYouSureToLeave:"Are you sure you want to leave?",cancel:"Cancel","save&Leave":"Save & leave",leave:"Leave",employerIdentificationNumber:"Employer identification number",companyRegistrationNumber:"Company registration number",euVatNumber:"EU VAT number",vatNumber:"VAT number",regonKrsNumber:"REGON / KRS number",registrationNumber:"Registration number",charityNumber:"Charity number",SIRETOrSIREN:"SIRET or SIREN","RNA/SIREN/SIRETNumber":"RNA number/SIREN number/SIRET number",firmenbuchnummer:"Firmenbuchnummer",firmenbuchnummerOrZVR:"Firmenbuchnummer or ZVR number","stepsX/YofForm":"Step %{activeFormIndex}/ %{totalForms} of %{taskName}",areYouPartOfTrust:"Are you part of a trust?",isBusinessPartOfTrust:"Is your business part of a trust?",no:"No",yes:"Yes",isPartOfTrust:"Is part of a trust",informationCouldNotBeSubmitted:"Information couldn\u2019t be submitted",fieldHasUnsupportedFormats:"%{fieldName} has an unsupported format.",updateTheInformation:"Update the information",andResubmit:"and submit again.",someFieldsHaveUnsupportedFormatedUpdateInfoAndResubmit:"Some fields have unsupported formats. Update the information and submit again.",trustType:"Type of trust agreement",cashManagementTrust:"Cash management trust",corporateUnitTrust:"Corporate unit trust",deceasedEstate:"Deceased estate",discretionaryInvestmentTrust:"Discretionary investment trust",discretionaryServicesManagementTrust:"Discretionary services management trust",discretionaryTradingTrust:"Discretionary trading trust",firstHomeSaverAccountsTrust:"First home saver accounts trust",fixedTrust:"Fixed trust",fixedUnitTrust:"Fixed unit trust",hybridTrust:"Hybrid trust",listedPublicUnitTrust:"Listed public unit trust",otherTrust:"Other trust",pooledSuperannuationTrust:"Pooled superannuation trust",publicTradingTrust:"Public trading trust",unlistedPublicUnitTrust:"Unlisted public unit trust",countryOfEstablishment:"Country of establishment",nameOfTrustAgreement:"Name of trust agreement",typeOfTrustAgreement:"Type of trust agreement",weFoundTheFollowingIssues:"We found the following issues:",reviewTheInformationBelowAndCorrectMistakesOr:"Review the information below and correct any mistakes, or",uploadTheRequestedDocuments:"upload the requested documents",uploadTheFollowingDocuments:"upload the following documents:",uploadDocumentAndDocument:"%{uploadDocumentOne} and %{documentTwo}",thenResubmit:"Then resubmit.",isTrustOperationAddressSame:"Is there a different address for your trust's operations?",trustDetails:"Trust Details",trustDetailsDescription:"To prepare your account, we need information about your trust.",provideTrustDetails:"Enter trust details",addTrustMembers:"Add trust members",trustDocument:"Trust document",trustDocumentDescription:"We won\u2019t be able to verify your trust without all required information. Make sure the following information is visible on your document:",nameOfTrust:"Name of trust",fullLegalNamesOfAnyAppointers:"Full legal name of any appointers included in the deed",dateDeedWasSigned:"Date deed was signed",settlerDetailsIncl:"Settlor details including their full legal name and home address",trusteeDetailsIncl:"Trustee details including full legal name, CAN or ABN, and address",beneficiariesDetailsIncl:"Beneficiaries details including number of beneficiaries, full legal names, and any default beneficiaries",trustMembers:"Trust members",trustMembersDescription:"Provide information for the secondary trustee, settlor, protector and beneficiary associated with the trust contract.",trustee:"Trustee",beneficiary:"Beneficiary",protector:"Protector",settlor:"Settlor",ultimateBeneficialOwner:"Ultimate beneficial owner",addTrustMember:"Add trust member",beneficialOwnersOfTrustProperty:"The beneficial owners of the trust property.",personAppointmentUnderTrustInstrument:"The person appointed under the trust instrument to direct or restrain the trustees in relation to their administration of the trust.",legalOwnerOfProperty:"The legal owner of the property in trust.",entityEstablishingTrust:"The entity that establishes a trust.",entityOwning25OrMoreOfTrust:"The entity who owns 25% or more of the property in trust.",failedToFetchTrustDetails:"Failed to fetch the trust details",failedToFetchTrustMemberDetails:"Failed to fetch the trust member details",failedToFetchLegalEntityDetails:"Failed to fetch the legal entity's details",editTrustMember:"Edit details of %{trustMember} ",removeTrustMember:"Remove %{trustMember}",successFullyRemovedTrustMember:"Successfully removed trust member",failedToRemoveTrustMember:"Failed to remove trust member",editEntityDetails:"Edit entity details",editOwnerOfTrustMember:"Edit owner of %{trustMember}",editEntityOwner:"Edit owner details",addEntityOwner:"Add owner details",addOwnerToTrustMember:"Add owner of %{trustMember}",whatTypeOfYourMembersEntity:"What\u2019s the type of your member\u2019s entity?",naturalPersonTitle:"Natural person",naturalPersonDescription:"He/she doesn\u2019t have any business.",businessEntityTitle:"Business entity",businessEntityDescription:"This is usually a sole proprietor, private company, public corporation, partnership, or non profit.",roleAndEntityType:"Role and entity type",helpUsVerifyCompany:"Help us verify this company.",providePersonalDetailsOfOwner:"Please provide the personal details of the owner.",memberDetails:"Member details",good:"Good",notCutOff:"Not cut off",notBlurry:"Not blurry",notExpired:"Not Expired",noGlare:"No glare",selectDocumentType:"Select document type",registrationDocumentSubTitle:"Upload your company\u2019s business registration document. We need to see this document so we can verify your company.",documentIssuedByGovernmentAuthority:"The document has to be issued by a government authority. It\u2019s usually given when a business is created at the local commercial register",uploadTaxationDocument:"Upload a a tax return or taxation registration document. We need to see this document so we can verify that your tax ID number belongs to your company.",containsNameOfCompany:"Contains the name of your company or organization",documentShowsTaxIdOfCompany:"The document shows the tax ID number of the company",issuedByTheTaxAuthority:"Issued by the tax authority or government of the country where the company is registered",providePageWithPhotoAndCode:"Provide the page with the photo, including the code on the bottom",constitutionalDocument:"Constitutional document",solePropDetails:"Sole proprietor details",enterSoleProprietorDetails:"Enter sole proprietor details",selectAccountHolder:"Select account holder",nameOfBankAccountHolder:"We need to know about the bank account where you want to receive your payouts. What is the name of the account holder of that bank account?",myName:"My name",myNameDescription:"It\u2019s a personal bank account held in my own name",mySoleTraderName:"My sole trader name",mySoleTraderNameDescription:"The account is in my name, but I am registered as a sole trader, sole proprietor, or freelancer",theCompanyIWorkFor:"The company I work for",theCompanyIWorkForDescription:"It is a company bank account for a private, public, or non-profit organization",aTrust:"A trust",aTrustDescription:"The account belongs to a trust, a trustee controls the account for the benefit of a beneficiary",aPartnership:"A partnership",aPartnershipDescription:"The account belongs to a jointly owned business where two or more people operate and share profits",anAssociation:"An association",anAssociationDescription:"The account belongs to a group of people acting together for a specific non-commercial purpose",legalNameOfSoleProprietor:"Legal name of sole proprietor",failedToFetchSoleProp:"Failed to fetch the sole propietor",uniqueIdentificationCode:"Unique identification code (\u0415\u0418\u041a/UIC)",identifikacionenNomerDDS:"VAT number (\u0414\u0414\u0421)",MBS:"Mati\u010dni broj subjekta trgova\u010dkog suda (MBS)",PDVIdBrojOIB:"PDV Id. Broj OIB",cyRegistrationNumber:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u0395\u03b3\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2",arithmosEngraphes:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u0395\u03b3\u03b3\u03c1\u03b1\u03c6\u03ae\u03c2 \u03a6.\u03a0.\u0391.","CVR-nummer":"CVR-nummer",momsregistreringsnummerOrStamregister:"Momsregistreringsnummer (CVR) or Stamregister erhverv (SE-nummer)",registrikood:"Registrikood",kaibemaksukohustuslaseNumber:"K\xe4ibemaksukohustuslase number",YTunnus:"Y-TUNNUS",arvonlisaveronumeroMervardesskattenummer:"Arvonlis\xe4veronumero Merv\xe4rdesskattenummer","GEMI-number":"GEMI number or \u0391\u03a1\u0399\u0398\u039c\u039f\u03a3 \u0393.\u0395.\u039c\u0397 (\u0393\u03b5\u03bd\u03b9\u03ba\u03bf\u03c5\u0301 \u0395\u03bc\u03c0\u03bf\u03c1\u03b9\u03ba\u03bf\u03c5\u0301 \u039c\u03b7\u03c4\u03c1\u03c9\u0301\u03bf\u03c5)",grTaxId:"\u0391\u03c1\u03b9\u03b8\u03bc\u03cc\u03c2 \u03a6\u03bf\u03c1\u03bf\u03bb\u03bf\u03b3\u03b9\u03ba\u03bf\u03cd \u039c\u03b7\u03c4\u03c1\u03ce\u03bf\u03c5 Arithm\xf3s Forologikou M\u0113tr\u1e53ou (\u0391\u03a6\u039c)",huRegistrationNumber:"Ce\u0301gjegyze\u0301ksza\u0301m",huTaxId:"K\xf6z\xf6ss\xe9gi ad\xf3sz\xe1m",valueAddedTaxIdentificationNumber:"Value added tax identification number (VAT)",lvRegistrationNumber:"Komersanta re\u0123istr\u0101cijas numurs (NBR)",lvTaxId:"Pievienot\u0101s v\u0113rt\u012bbas nodok\u013ca re\u0123istr\u0101cijas numurs (PVN)",ltRegistrationNumber:"Juridini\u0173 asmen\u0173 registro kodas",PVMmoketojoKodas:"PVM mok\u0117tojo kodas",luRegistrationNumber:"Num\xe9ro registre de commerce et des soci\xe9t\xe9s (RCS)",numeroDIdentificationALATaxe:"Num\xe9ro d'identification \xe0 la taxe sur la valeur ajout\xe9e (No. TVA)",numarOrdineRegistrulComertului:"Numar de ordine in registrul comertului",codulDeIdentificareFiscala:"Codul de identificare fiscal\u0103 (CIF)",skRegistrationNumber:"Identifikac\u030cne\u0301 c\u030ci\u0301slo (I\u010cO)",skTaxId:"Identifika\u010dn\xe9 \u010d\xedslo pre da\u0148 z pridanej hodnoty (I\u010c DPH)",siRegistrationNumber:"Mati\u010dna \u0161tevilka",siTaxId:"Identifikacijska \u0161tevilka za DDV (ID za DDV)",chRegistrationNumber:"Unternehmens-Identifikationsnummer (UID), Num\xe9ro d\u2019identification des entreprises (IDE), Numero d\u2019identificazione delle imprese (IDI), or CH-number",Mehrwertsteuernummer:"Mehrwertsteuernummer (MwST), Num\xe9ro de TVA, Numero dell\u2019imposta sul valore aggiunto (IVA), VAT number",Xdigits:"%{digits} digits",XtoYdigits:"%{x} to %{y} digits",XorYdigits:"%{x} or %{y} digits",Xcharacters:"%{x} characters","9digitsOr14digits":"9 digits or 14 digits","1character5to7digits":"1 letter + 5-7 digits",Wchar9or14digits:"W123456789, 9 or 14 digits","1char8digits":"X99999999","2characteres6or7digits":"11 digits, XX123456 or XX1234567","7or8or12characteres":"7, 8 or 12 digits or characters",Cchar5digits:"C99999",cop1to8digits:"C, O, or P, followed by a number from 1 up to 8 digits",selectAccountHolderDescription:"We need to know about the bank account where you want to receive your payouts. What is the name of the account holder of that bank account?","8digitsOptional-":'8 digits; last digit can be preceded by an optional "-"',provideAllOwners:"Provide <strong>all owners</strong> holding 25% or more of your company.",ifNoOwnersSpecifyControllingPersons:"If you don\u2019t have any owners holding 25% or more, then specify <strong>all controlling persons</strong>. Otherwise you can skip this.",provideAtLeastOneSignatory:"Provide at least <strong>1 signatory</strong>.",provideOneControllingPerson:"Provide <strong>1 controlling person</strong>.",textToVerifyAccount:"For you to receive your payouts, we need a verified bank account.",mobileApplication:"Mobile Application",onOnlineBankingEnvironment:"Or web version of online banking environment",dontHaveAccessOnlineBanking:"Don\u2019t have access to online banking environment?",confirmPayoutManually:"Confirm the payout account manually",noteManualTakesLonger:"Note that manual review takes longer.",accountVerification:"Account Verification",verifyWith:"Verify with",documentVerification:"Document verification",youHaveSuccessfullyProvidedTheIdDocument:"You\u2019ve successfully provided the ID document.",submitIdDocumentsAgain:"Submit ID documents again",madeAMistake:"Made a mistake?",canNotCompleteInstantVerification:"Can not complete instant verification?",goBackAndProvideDocumentScans:"Go back and provide document scans",identityCard:"Identity card",uploadOneOfTheFollowing:"Upload one of the following so we can verify your information:",documentIssuedWithinLastYear:"Note! The document needs to be issued within the last year. If it is older, make sure it contains a signature and a state of affair not older than a year.",learnMore:"Learn more.",doingBusinessAsNameFiling:"Doing business as-name filling",taxFiling:"Tax-filling",continueAsCompany:"Continue as a company?",continueAsIndividual:"Continue as an individual?",indicatedPayoutToCompany:"You indicated that you want to be paid out to a bank account that is owned by a company, such as a private company, public company, partnership, or non-profit organization. This means that we need to collect some information about your company too.",continueSigningUpAsCompany:"Do you want to continue signing up with your company information?",indicatedPayoutToPersonalAccount:"You indicated that you want to be paid out to a bank account that is owned by you personally. This means you will continue as an individual, not a company. However, if you operate as a private company, public company, partnership, or non-profit organization, then you cannot continue as an individual.",continueSigningUpAsIndividual:"Do you want to continue signing up as an individual?",continue:"Continue",noGoBack:"No, go back",continueCompany:"Continue as company",continueIndividual:"Continue as individual",addManually:"Add manually",searchAddress:"Search address",startTypingTheAddress:"Start typing the address",addresses:"Addresses",loading:"Loading",businessIncorporationNumber:"Business incorporation number",doNotHaveBusinessIncorporationNumber:"I do not have a Business incorporation number",socialInsuranceNumber:"Social insurance number",verificationMethod:"Verification Method",verifyViaMobileBankAppOrBankWebsite:"Verify the account via mobile bank app or bank website",provideAccountDetailsAndUploadBankStatement:"Provide account details and upload a scan of a bank statement",instantVerificationDescription:"To quickly and safely verify the account you need access to the online banking environment associated with this account holder.",manualVerificationDescription:"Manually provide your account details and upload a bank statement.",poweredBy:"Powered by",youSuccessfullyVerifiedAccount:"You\u2019ve successfully verified your bank account.",verifyBankAccountAgain:"Verify bank account again",accountName:"Account name",mayTakeAFewHoursOrDays:"May take a few hours or days",instant:"Instant",tink:"Tink",trustly:"Trustly",isOurTrustedPartnerHelpingSpeedUpSetup:"%{provider} is our trusted partner helping speed up your account setup by instantly verifying your bank account.",howDoesVerificationWithOurPartnerWorks:"How does verification with our partner %{provider} work?",selectTheBankToReceivePayouts:"After this page, you can select the bank where you would like to receive the payouts.",loginIntoYourBankingEnvironment:"Log into your banking environment via mobile app or internet browser.",yourBankWillConfirmYourAccountDetails:"Your bank will confirm your account details to us.",adyenWillOnlyGetTemporaryAccess:"Adyen will only gain temporary access to your bank details, and your data is never shared with third parties.",instantVerification:"Instant verification",xCharactersLeft:"%{charactersLeft} characters left",goBack:"Go back",doNotHaveABN:"I do not have an ABN","doNotHaveUEN/GST":"I do not have an/a UEN/GST","doNotHaveIRD/GST":"I do not have an/a IRD/GST",businessRegistrationNumber:"Business registration number",doNotHaveBusinessRegistrationNumber:"I do not have a Business registration number",doNotHaveBusinessNumber:"I do not have a Business number","UEN/GST":"Unique Entity Number (UEN)/Goods and Services Tax (GST)","IRD/GST":"Inland Revenue Department Number (IRD No)/Goods and Services Tax (GST)",enterNameExactlyAsAppearInID:"Enter your first name(s) exactly as it appears on your identity document",enterLastNameExactlyAsAppearInID:"Enter your last name(s) exactly as it appears on your identity document",takePhotoOriginalDocumentWithPhone:"Take a photo of the original ID document with your phone",instantIDVerificationDescription:"With access to a physical ID document and a phone you can go through verification instantly!",manualIDVerificationDescription:"Upload a good quality copy of your ID so we can verify it offline. Make sure it is clear with all corners and letters visible.",uploadScanOriginalIDDocument:"Upload a scan of the original ID document",takesLonger:"Takes longer",howVerificationWithOnfidoWorks:"How does verification with our partner Onfido works?",onfidoIsOurTrustedPartner:"Onfido is our trusted partner helping speed up your account setup by verifying your identity in real-time. ",usePhoneToScanId:"Use your phone to scan the ID",onfidoWillGiveFeedbackInRealTime:"Onfido will give you feedback in real-time",theIdCheckWillBeAutomaticallyValidated:"With the right capture, the ID check will be automatically validated",adyenKeepsDataAsLongAsLegallyRequired:"Adyen only keeps your data for as long as we\u2019re legally required to. It won\u2019t be used for any other purposes or by other third parties than those stated.",errorMessage_1_10:"Information couldn\u2019t be verified",errorMessage_1_11:"Document didn\u2019t meet requirements",errorMessage_1_12:"Legal entity declined",errorMessage_1_30:"Individual details couldn't be verified",errorMessage_1_31:"ID document is needed",errorMessage_1_32:"ID document couldn\u2019t be processed",errorMessage_1_33:"ID document didn\u2019t meet requirements",errorMessage_1_34:"Image of the ID document didn\u2019t meet requirements",errorMessage_1_35:"Individual details didn't match the ID document",errorMessage_1_36:"Proof of residency didn\u2019t meet requirements",errorMessage_1_37:"Image of the proof of residency didn't meet the requirements",errorMessage_1_38:"Individual details didn't match the proof of residency",errorMessage_1_39:"Proof of national ID number didn't meet requirements",errorMessage_1_40:"Image of the proof of national ID number didn't meet the requirements",errorMessage_1_41:"Individual details didn't match the proof of national ID number",errorMessage_1_50:"Organization details couldn\u2019t be verified",errorMessage_1_51:"Organization details didn't match the document",errorMessage_1_52:"Registration document didn\u2019t meet requirements",errorMessage_1_53:"Tax document didn't meet requirements",errorMessage_1_54:"Proof of address didn't meet requirements",errorMessage_1_55:"Proof of ownership is needed",errorMessage_1_56:"Organization ownership couldn't be verified",errorMessage_1_57:"Submitted affiliation document didn't meet the requirements",errorMessage_1_60:"Legal entity details couldn't be verified",errorMessage_1_61:"Constitutional document didn't meet requirements",errorMessage_1_62:"Legal entity details didn't match the constitutional document",errorMessage_1_70:"Bank account couldn't be verified",errorMessage_1_71:"Bank account details couldn't be verified",errorMessage_1_72:"Verification could not be completed",errorMessage_1_73:"Bank account access could not be authenticated",errorMessage_1_74:"Bank statement is needed",errorMessage_1_75:"Bank statement didn\u2019t meet requirements",errorMessage_1_76:"Bank details didn't match the bank statement",errorMessage_1_1000:"Verification failed. Legal entity declined",errorMessage_1_1001:"There were some technical issues in the verification process.",errorMessage_1_1002:"There are more questions about the submitted information.",errorMessage_1_1003:"The document contained sensitive data.",errorMessage_1_3000:"The user couldn't be verified.",errorMessage_1_3001:"The name and date of birth couldn't be verified.",errorMessage_1_3002:"The name and national ID number couldn't be verified.",errorMessage_1_3003:"The name and residence state couldn't be verified.",errorMessage_1_3004:"The name and residence country couldn't be verified.",errorMessage_1_3005:"The national ID number was entered incorrectly.",errorMessage_1_3006:"The name didn't match the national ID number.",errorMessage_1_3007:"An incorrect national ID number was entered.",errorMessage_1_3008:"The ID document image was incomplete.",errorMessage_1_3009:"The photo on the ID document couldn\u2019t be recognized.",errorMessage_1_3010:"The ID document image was incomplete or too blurry.",errorMessage_1_3011:"The ID document image was in black and white.",errorMessage_1_3012:"The image couldn\u2019t be recognized as a supported ID document.",errorMessage_1_3013:"The ID document wasn't a supported document type.",errorMessage_1_3014:"The ID document image didn\u2019t contain the MRZ code.",errorMessage_1_3015:"The ID document was expired.",errorMessage_1_3016:"The ID document image was of too low quality.",errorMessage_1_3017:"The ID document image was a scan.",errorMessage_1_3018:"The ID document image was too blurry.",errorMessage_1_3019:"The ID document was expired.",errorMessage_1_3020:"The ID document wasn't a supported document type.",errorMessage_1_3021:"The ID document MRZ code is unreadable.",errorMessage_1_3022:"The ID document image only showed one side of the ID document.",errorMessage_1_3023:"The ID document image only showed parts of the ID document.",errorMessage_1_3024:"The ID document wasn't valid.",errorMessage_1_3025:"The state didn\u2019t match the one on the ID document.",errorMessage_1_3026:"The ID document didn\u2019t show an issuing state.",errorMessage_1_3027:"The ID document wasn't valid.",errorMessage_1_3028:"The ID number didn\u2019t match the one on the document.",errorMessage_1_3029:"The ID document didn\u2019t show a document number.",errorMessage_1_3030:"The ID document wasn't valid.",errorMessage_1_3031:"The ID document wasn't valid.",errorMessage_1_3032:"The first name didn\u2019t match the one on the ID document.",errorMessage_1_3033:"The last name didn\u2019t match the one on the ID document.",errorMessage_1_3034:"The date of birth didn\u2019t match the one on the ID document.",errorMessage_1_3035:"The country didn\u2019t match the one on the ID document.",errorMessage_1_3036:"The ID document image was too low quality.",errorMessage_1_3037:"The last name didn't match the one on the proof of residential address.",errorMessage_1_3038:"The first name didn\u2019t match the one on the proof of residential address.",errorMessage_1_3039:"The date of birth didn\u2019t match the one on the proof of residential address.",errorMessage_1_3040:"The proof of residential address didn\u2019t show the date it was issued.",errorMessage_1_3041:"The proof of residential address didn\u2019t show a name.",errorMessage_1_3042:"The proof of residential address didn't show an issuing country.",errorMessage_1_3043:"The proof of residential address wasn't a supported document type.",errorMessage_1_3044:"The proof of residential address was too old.",errorMessage_1_3045:"The proof of residential address image was of too low quality.",errorMessage_1_3046:"The address on the proof of residential address was a PO box.",errorMessage_1_3047:"The proof of national ID number wasn't a supported document type.",errorMessage_1_3048:"The last name didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3049:"The first name didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3050:"The date of birth didn\u2019t match the one on the proof of national ID number.",errorMessage_1_3051:"The proof of national ID number image was of too low quality.",errorMessage_1_3062:"The name and 4 digit SSN couldn't be verified.",errorMessage_1_5000:"The legal business name couldn't be verified.",errorMessage_1_5001:"The tax ID number couldn't be verified.",errorMessage_1_5002:"The state couldn't be verified.",errorMessage_1_5003:"The legal name didn't match the one on the registry.",errorMessage_1_5004:"The legal name didn't match the one on the registry.",errorMessage_1_5005:"The legal name didn't match the one on the registry.",errorMessage_1_5006:"The country didn't match the one on the registry.",errorMessage_1_5007:"The registration number didn't match the one on the registry.",errorMessage_1_5008:"The tax ID didn't match the one on the registry.",errorMessage_1_5009:"The registration number was provided as tax ID.",errorMessage_1_5010:"The company details couldn't be verified. ",errorMessage_1_5011:"The trade name (doing business as) was entered.",errorMessage_1_5012:"The submitted company type didn\u2019t match the one on the registry.",errorMessage_1_5013:"The company was not found in the database.",errorMessage_1_5014:"The registration number couldn't be verified. ",errorMessage_1_5015:"The registration number didn't match the legal business name.",errorMessage_1_5016:"The tax ID number couldn't be verified.",errorMessage_1_5017:"The tax ID number didn't match the legal business name.",errorMessage_1_5018:"The business address couldn't be verified.",errorMessage_1_5019:"The trade name (doing business as) was entered instead of the legal name.",errorMessage_1_5020:"Registration document is missing.",errorMessage_1_5021:"The registration document was too low quality.",errorMessage_1_5022:"The registration document was too old.",errorMessage_1_5023:"The submitted company type didn't match the one on the registration document.",errorMessage_1_5024:"The registration document did not show the company type.",errorMessage_1_5025:"The address on the company registration document was a residential address.",errorMessage_1_5026:"The address on the company registration document was a PO box.",errorMessage_1_5027:"The business address didn't match the one on the company registration document.",errorMessage_1_5028:"The registration number didn't match the one on the company registration document.",errorMessage_1_5029:"The legal business name didn't match the one on the company registration document.",errorMessage_1_5030:"The country didn't match the one on the company registration document.",errorMessage_1_5031:"The company registration document didn't show a legal business name.",errorMessage_1_5032:"The company registration document didn't show a registration number.",errorMessage_1_5033:"The state didn't match the one on the company registration document.",errorMessage_1_5034:"The company registration document wasn't a supported document type.",errorMessage_1_5035:"The company registration document is not supported.",errorMessage_1_5036:"Tax document is missing.",errorMessage_1_5037:"The country didn't match the one on the tax document.",errorMessage_1_5038:"The tax document wasn't a supported document type.",errorMessage_1_5039:"The tax document was too low quality.",errorMessage_1_5040:"The tax document was too old.",errorMessage_1_5041:"The legal name didn't match the one on the tax document.",errorMessage_1_5042:"The tax ID number didn't match the legal business name.",errorMessage_1_5043:"The tax document didn't show a tax ID number.",errorMessage_1_5044:"The tax document didn't show a legal business name.",errorMessage_1_5045:"The state didn't match the one on the proof of address.",errorMessage_1_5046:"Ownership data seems incorrect.",errorMessage_1_5047:"Ownership data seems to be missing.",errorMessage_1_5048:"Provide official ownership documentation.",errorMessage_1_5049:"The affiliation document was not sufficient to prove the 100% affiliation.",errorMessage_1_5050:"The affiliation document was not official.",errorMessage_1_5051:"Signing person on the affiliation document could not be verified",errorMessage_1_5052:"The affiliation document verifies the payout entity is not 100% affiliated with the company. Setup can't be continued.",errorMessage_1_5053:"The affiliation document was not issued within the last 6 months",errorMessage_1_6000:"The legal name couldn't be verified.",errorMessage_1_6001:"The legal name didn't match the registration number.",errorMessage_1_6002:"The registration number couldn't be verified.",errorMessage_1_6003:"Legal entity type couldn't be verified.",errorMessage_1_6004:"The country of governing law couldn't be verified.",errorMessage_1_6005:"Constitutional document is missing.",errorMessage_1_6006:"The constitutional document was too old.",errorMessage_1_6007:"Legal name didn't match the constitutional document.",errorMessage_1_6008:"Country of governing law didn't match the constitutional document.",errorMessage_1_6009:"The constitutional document didn't show a legal name.",errorMessage_1_6010:"The constitutional document didn't show a registration number.",errorMessage_1_6011:"The legal entity type didn't match the one on the constitutional document.",errorMessage_1_7000:"The bank account couldn't be verified.",errorMessage_1_7001:"The routing number wasn't valid.",errorMessage_1_7002:"The bank account number wasn't valid.",errorMessage_1_7003:"The bank account couldn't be verified.",errorMessage_1_7004:"The bank account entered was invalid.",errorMessage_1_7005:"The verification code wasn't valid.",errorMessage_1_7006:"There were too many attempts to request the verification code.",errorMessage_1_7007:"The verification code wasn't entered.",errorMessage_1_7008:"There is no bank document to verify.",errorMessage_1_7009:"The bank document didn't show a bank account number.",errorMessage_1_7010:"The bank document didn't show the account owner name.",errorMessage_1_7011:"The bank account number didn't match the one on the bank document.",errorMessage_1_7012:"The bank account owner name appearing in the document does not match the verified legal name.",errorMessage_1_7013:"The bank document was too low quality.",errorMessage_1_7014:"The bank document wasn't a supported document type.",errorMessage_1_7015:"The bank account country didn't match the one on the bank document.",errorMessage_1_7016:"The branch code didn\u2019t match the one on the bank document.",errorMessage_1_7017:"The bank account currency didn't match the one on the bank document.",errorMessage_1_7018:"The bank document wasn't officially issued by the bank.",errorMessage_1_7019:"The bank document wasn't issued in the past 12 months.",errorMessage_1_7020:"The bank name didn't match the one on the bank document.",errorMessage_1_7021:"The bank document didn't show an official bank logo.",errorMessage_1_7022:"The bank document didn't show an official bank stamp.",remediationMessage_1_100:"No remediation possible",remediationMessage_1_101:"Contact Support",remediationMessage_1_102:"Upload a different document",remediationMessage_1_300:"Update individual details",remediationMessage_1_301:"Upload an ID document",remediationMessage_1_302:"Upload a different ID document",remediationMessage_1_303:"Upload a different image of the ID document",remediationMessage_1_304:"Upload proof of residency",remediationMessage_1_305:"Upload a different proof of residency",remediationMessage_1_306:"Upload a different image of the proof of residency",remediationMessage_1_307:"Upload a proof of national ID number",remediationMessage_1_308:"Upload a different proof of national ID number",remediationMessage_1_309:"Upload a different image of the proof of national ID number",remediationMessage_1_316:"Provide complete 9-digits Social Security Number number or upload an ID document if you don\u2019t have SSN.",remediationMessage_1_500:"Update organization details",remediationMessage_1_501:"Upload a registration document",remediationMessage_1_502:"Upload a different registration document",remediationMessage_1_503:"Upload a tax document",remediationMessage_1_504:"Upload a different tax document",remediationMessage_1_505:"Upload a proof of address",remediationMessage_1_506:"Upload a different proof of address",remediationMessage_1_507:"Update organization ownership details",remediationMessage_1_508:"Upload a proof of ownership",remediationMessage_1_509:"Upload a different affiliation document",remediationMessage_1_510:"Ensure signing person has the rights to represent the organization or is a listed professional member (lawyer, accountant) in your country of business and upload the right document",remediationMessage_1_511:"Upload a document that proves the payout entity is 100% affiliated with the legal entity",remediationMessage_1_600:"Update legal entity details",remediationMessage_1_601:"Upload a constitutional document",remediationMessage_1_602:"Upload a different constitutional document",remediationMessage_1_700:"Update bank account details",remediationMessage_1_701:"Use different bank account",remediationMessage_1_702:"Use other means of bank account verification",remediationMessage_1_703:"Upload a bank statement",remediationMessage_1_704:"Upload a different bank statement",remediationMessage_1_705:"Upload an official bank statement",sameNameAsLegalName:"Same as legal name of the company",whereCanIFindTheseNumbersOnMyDriversLicense:"Where can I find these numbers on my driver's license?",whereToFindNumbersOnDriversLicense:"Depending on the issuing state the position of these numbers might differ, but the license number is always on the front side of the card and the card number is in most cases located on the back of the license.",iStillCantFindIt:"I still can't find it.",patriotActDisclosureTitle:"Important Information You Need to Know About Opening An Account",patriotActDisclosureTextParagraph1:"To help the government fight the funding of terrorism and money laundering activities, Federal law requires financial institutions to obtain, verify, and record information that identifies each person (individual or entity) who opens an account and certain individuals who are associated with an account.",patriotActDisclosureTextParagraph2:"What this means: when you open an account, we will ask for your name, address, taxpayer identification number and other information that will allow us to identify you."},d={},l={},c="countries",u=e=>`states/${e}`,m="phone-prefixes",p="translations";function g(e){return{getCountryName:t=>{const a=b(c,e);return y(a,t)},getStateName:(t,a)=>{const r=b(u(a),e);return y(r,t)},getPhonePrefix:t=>{const a=b(m,e);return y(a,t)},setDataset:(t,a)=>{const r=b(t,e);l[r]=a},getDataset:t=>{const a=b(t,e);return l[a]},getDatasetKey:t=>b(t,e)}}const y=(e,t)=>{if(l[e]){const a=(e=>(d[e]||(d[e]={},l[e].forEach((({id:t,name:a})=>{d[e][t]=a}))),d[e]))(e);return a[t]}return null},b=(e,t)=>`${e}_${t}`.toLowerCase(),f="fetch"in window?window.fetch:e.fetch;function h(e,t){switch(t){case"silent":return null;case"info":case"warn":case"error":return console[t](e);default:throw new Error(e)}}function v(e,t,a="json"){const{errorLevel:r="warn",loadingContext:n,path:i,clientKey:o=""}=e,s=function(e,t){const{headers:a=[],method:r="GET"}=e;return Object.assign({method:r,mode:"cors",cache:"default",credentials:"same-origin",headers:Object.assign({Accept:"application/json, text/plain, */*","Content-Type":"POST"===r?"application/json":"text/plain"},a),redirect:"follow",referrerPolicy:"no-referrer-when-downgrade"},t&&{body:JSON.stringify(t)})}(e,t),d=function(e,t,a){let r=`${e}${t}`;return a&&(r+=`?clientKey=${a}`),r}(n,i,o);return f(d,s).then((t=>{if(t.ok)return t[a]();const n=e.errorMessage||`Service at ${d} is not available`;return e.errorHandler?e.errorHandler(t[a]()):h(n,r)})).catch((t=>h(e.errorMessage||`Call to ${d} failed. Error= ${t}`,r)))}function _(e,t){return v(Object.assign(Object.assign({},e),{method:"GET"}),t)}function N(e,t){return v(Object.assign(Object.assign({},e),{method:"POST"}),t)}function O(e,t,a,r){const n=g(a),i=n.getDataset(e);if(i)return new Promise((e=>e(i)));return _({loadingContext:t,errorLevel:"warn",errorMessage:`Dataset ${e} is not available`,path:a?`datasets/${e}/${a}`:`datasets/${e}`,clientKey:r}).then((t=>(n.setDataset(e,t),t)))}const I=e=>e.toLowerCase().substring(0,2);function E(e){const t=e.replace("_","-");if(new RegExp("([a-z]{2})([-])([A-Z]{2})").test(t))return t;const[a,r]=t.split("-");if(!a||!r)return null;const n=[a.toLowerCase(),r.toUpperCase()].join("-");return 5===n.length?n:null}function T(e,t=[]){if(!e||e.length<1||e.length>5)return o;const a=E(e);return t.indexOf(a)>-1?a:function(e,t){return e&&"string"==typeof e&&t.find((t=>I(t)===I(e)))||null}(a||e,t)}const A=(e,t)=>e.replace(/%{(\w+)}/g,((e,a)=>{var r,n;return null!==(n=null===(r=t[a])||void 0===r?void 0:r.toString())&&void 0!==n?n:""}));class S{constructor(){this.translations=s}get(e,t){const a=((e,t,a={values:{},count:0})=>{const r=`${t}__plural`,n=e=>`${t}__${e}`;return Object.prototype.hasOwnProperty.call(e,n(a.count))?A(e[n(a.count)],a.values):Object.prototype.hasOwnProperty.call(e,r)&&a.count>1?A(e[r],a.values):Object.prototype.hasOwnProperty.call(e,t)?A(e[t],a.values):null})(this.translations,e,t);return null!==a?a:e}date(e,t={}){return new Date(e).toLocaleDateString(this.locale,Object.assign({year:"numeric",month:"2-digit",day:"2-digit"},t))}initialize({customTranslations:e={},locale:t=o,allowedLocales:a=[],loadingContext:r,clientKey:n}){return i(this,void 0,void 0,(function*(){this.customTranslations=function(e={},t){return Object.keys(e).reduce(((a,r)=>{const n=E(r)||T(r,t);return n&&(a[n]=e[r]),a}),{})}(e,a);const i=Object.keys(this.customTranslations);this.supportedLocales=[...a,...i].filter(((e,t,a)=>a.indexOf(e)===t)),this.locale=E(t)||T(t,this.supportedLocales),yield this.loadTranslations({locale:this.locale,loadingContext:r,clientKey:n})}))}loadTranslations({locale:e=this.locale,loadingContext:t,clientKey:a}){return i(this,void 0,void 0,(function*(){let r;!this.supportedLocales.includes(e)&&(e=o),r=e===o?Object.assign(Object.assign({},s),!!this.customTranslations[e]&&this.customTranslations[e]):yield(({locale:e,loadingContext:t,clientKey:a,customTranslations:r={}})=>i(void 0,void 0,void 0,(function*(){let n={};try{n=yield O(p,t,e,a)}catch(e){console.error(e)}return Object.assign(Object.assign(Object.assign({},s),n),!!r[e]&&r[e])})))({locale:e,loadingContext:t,clientKey:a,customTranslations:this.customTranslations});const n=(e=>{if(!e)return"";const[t]=e.split("-");return t})(e);return this.locale=e,this.translations=r,this.languageCode=n,r}))}}var R=0;function C(e,a,r,n,i){var o,s,d={};for(s in a)"ref"==s?o=a[s]:d[s]=a[s];var l={type:e,props:d,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--R,__source:i,__self:n};if("function"==typeof e&&(o=e.defaultProps))for(s in o)void 0===d[s]&&(d[s]=o[s]);return t.options.vnode&&t.options.vnode(l),l}class D{constructor(){this.events={},this.on=(e,t)=>{this.events[e]=this.events[e]||[],this.events[e].push(t)},this.off=(e,t)=>{this.events[e]&&(this.events[e]=this.events[e].reduce(((e,a)=>(a!==t&&e.push(a),e)),[]))},this.emit=(e,t)=>{this.events[e]&&this.events[e].forEach((e=>{e(t)}))}}}function k(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}class L{constructor(e){this._id=`${this.constructor.type}-${k()}`,this.eventEmitter=new D,this._resizeObserver=null,this.props=this.formatProps(Object.assign(Object.assign({},this.constructor.defaultProps),e)),this._parentInstance=this.props._parentInstance,this._node=null,this.state={}}formatProps(e){return e}formatData(){return{}}setState(e){this.state=Object.assign(Object.assign({},this.state),e)}get data(){return Object.assign({},this.formatData())}render(){throw new Error("Kyc Forms cannot be rendered")}observeContainerSize(e){window.ResizeObserver&&(this._resizeObserver=new ResizeObserver((t=>{this.assignLayout(t,e)})),this._resizeObserver.observe(e))}assignLayout(e,t){return null}mount(e){const a="string"==typeof e?document.querySelector(e):e;if(!a)throw new Error("Component could not mount. Root node was not found.");if(this._node)throw new Error("Component is already mounted.");return this._node=a,this._component=this.render(),this.observeContainerSize(a),t.render(this._component,a),this}update(e){return this.props=this.formatProps(Object.assign(Object.assign({},this.props),e)),this.state={},this.unmount().remount()}updateLocale(e){this.eventEmitter.emit("updateLocale",e)}remount(e){if(!this._node)throw new Error("Component is not mounted.");const a=e||this.render();return t.render(a,this._node,null),this}unmount(){return this._node&&t.render(null,this._node),this._resizeObserver&&(this._resizeObserver=this._resizeObserver.disconnect()),this}remove(){this.unmount(),this._parentInstance&&this._parentInstance.remove(this)}}L.defaultProps={};var w=new class{constructor(){return this.queue=[],this.subscriptions=new Set,this}add(...e){this.queue.push(...e)}notifySubscribers(){for(;this.queue.length>0;){const e=this.queue.pop();this.subscriptions.forEach((t=>t(e)))}}addEvent(e,t){this.add(["add_event",Object.assign({key:e},t)]),this.notifySubscribers()}addPageView(e){this.add(["track_pageview",e]),this.notifySubscribers()}startEvent(e){this.add(["start_event",e]),this.notifySubscribers()}endEvent(e,t){this.add(["end_event",t?Object.assign({key:e},t):e]),this.notifySubscribers()}subscribe(e){this.subscriptions.add(e)}unsubscribe(e){this.subscriptions.has(e)&&this.subscriptions.delete(e)}};class P extends L{constructor(e){super(e),e.onUserEvent&&w.subscribe(e.onUserEvent),this.submit=this.submit.bind(this),this.setState=this.setState.bind(this),this.onValid=this.onValid.bind(this),this.onComplete=this.onComplete.bind(this),this.elementRef=e&&e.elementRef||this}setState(e){this.state=Object.assign(Object.assign({},this.state),e),this.onChange()}onChange(){const e=this.isValid,t={data:this.data,errors:this.state.errors,valid:this.state.valid,isValid:e};return this.props.onChange&&this.props.onChange(t,this.elementRef),e&&this.onValid(),t}onValid(){const e={data:this.data};return this.props.onValid&&this.props.onValid(e,this.elementRef),e}submit(){const{onSubmit:e=(()=>{})}=this.props,{data:t,isValid:a}=this;return a?e({data:t,isValid:a},this.elementRef):(this.showValidation(),!1)}onComplete(e){this.props.onComplete&&this.props.onComplete(e,this.elementRef)}showValidation(){return this.componentRef&&this.componentRef.showValidation&&this.componentRef.showValidation(),this}setStatus(e){return this.componentRef&&this.componentRef.setStatus&&this.componentRef.setStatus(e),this}get isValid(){return!1}get displayName(){return this.props.name||this.constructor.type}}const j=t.createContext({i18n:new S,translations:null,setLocale:null,loadingContext:"",clientKey:"",setContextCountry:null,contextCountry:"",setPayoutDefaultCurrency:null,payoutDefaultCurrency:"",commonProps:{},isReview:!1,isLegalEntityPartOfTrust:!1,setIsLegalEntityPartOfTrust:null,setAccountHolder:null,accountHolder:""}),x=e=>{const t=`${`${e}static/fonts`}/adyen-kyc-icons`;((e,t,a,r,n)=>{const i=document.createElement("style");i.setAttribute("type","text/css"),i.innerText=((e,t,a,r,n)=>{const i=[`font-family: '${e}'`,`font-style: ${t}`,`font-weight: ${a}`,`src: url(${r})`],o=[];return n.eot&&o.push(`url(${n.eot}) format('embedded-opentype')`),n.woff&&o.push(`url(${n.woff}) format('woff')`),n.woff2&&o.push(`url(${n.woff2}) format('woff2')`),n.ttf&&o.push(`url(${n.ttf}) format('truetype')`),n.otf&&o.push(`url(${n.otf}) format('opentype')`),o.length>0&&i.push("src: "+o.join(",")+";"),`@font-face {${i.join(";")}}`})(e,t,a,r,n),document.body.insertBefore(i,document.body.firstChild)})("adyen-kyc-icons","normal","normal",`${t}.eot`,{eot:`${t}.eot`,woff:`${t}.woff`,woff2:`${t}.woff2`,ttf:`${t}.ttf`,otf:`${t}.otf`})};function M(e){return"object"==typeof e&&null!==e&&"[object Array]"===Object.prototype.toString.call(e)}function F(...e){const t=M(e[0])?e[0]:e;return{from:e=>t.map((t=>t in e?{[t]:e[t]}:{})).reduce(((e,t)=>Object.assign(Object.assign({},e),t)),{})}}function V(...e){const t=M(e[0])?e[0]:e;return{from:e=>{const a=Object.keys(e).filter((e=>!t.includes(e)));return F(...a).from(e)}}}function U(e,t){return e.length===t.length&&e.every((function(e){return t.includes(e)}))}const B=(e,t)=>{const a=typeof e;return e&&t&&"object"===a&&a===typeof t?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).every((a=>B(e[a],t[a]))):e===t};function W(e){return structuredClone(e)}function H(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[t,e])))}function q(e,{type:t="conjunction",style:a="long",stringify:r=(e=>e.toString())}={}){const n=e.map((e=>r(e)));return new Intl.ListFormat("en",{style:a,type:t}).format(n)}const G=()=>{};function $({loadingContext:e,clientKey:t,country:a,capabilities:r,legalEntityType:n}){return N({loadingContext:e,errorLevel:"warn",errorMessage:"Configuration is not available",path:"v1/configuration",clientKey:t},{capabilities:r,country:a,legalEntityType:n})}class X extends t.Component{constructor(){super(...arguments),this.state={loaded:!1,contextCountry:this.props.contextCountry,payoutDefaultCurrency:"",i18n:this.props.i18n,isLegalEntityPartOfTrust:!1,accountHolder:""},this.setContextCountry=e=>{this.setState({contextCountry:e})},this.setPayoutDefaultCurrency=e=>{this.setState({payoutDefaultCurrency:e})},this.setLocale=({locale:e})=>{var t;this.setState({loaded:!1});const a=null===(t=this.state.i18n)||void 0===t?void 0:t.locale;this.props.i18n.loadTranslations({locale:e,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey}).then((()=>{w.addEvent("Changed page language",{segmentation:{originalLanguage:a,newLanguage:e}}),this.setState({loaded:!0})}))},this.setIsLegalEntityPartOfTrust=e=>this.setState({isLegalEntityPartOfTrust:e}),this.setAccountHolder=e=>{this.setState({accountHolder:e})}}componentDidMount(){return i(this,void 0,void 0,(function*(){const{contextCountry:e,locale:t,loadingContext:a,clientKey:r}=this.props;x(a);try{let n=t;const{locales:i=[]}=yield function({loadingContext:e,clientKey:t}){return _({loadingContext:e,errorLevel:"warn",errorMessage:"Locales configuration is not available",path:"v1/configuration/locales",clientKey:t})}({loadingContext:a,clientKey:r}),{countries:s=[]}=yield function({loadingContext:e,clientKey:t}){return _({loadingContext:e,errorLevel:"warn",errorMessage:"Countries configuration is not available",path:"v1/configuration/countries",clientKey:t})}({loadingContext:a,clientKey:r});if(s&&!s.includes(e))throw new Error(`\n\n"${e}" isn't a supported country. Please use one of the following:\n- ${q(s)}.\n `);i&&!i.includes(t)&&(console.error(`\n"${t}" isn't a supported locale. Please use one of the following:\n- ${q(i)}. falling back to "${o}"`),n=o),this.props.i18n?(yield this.props.i18n.initialize({locale:n,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,customTranslations:this.props.translations,allowedLocales:i}),this.setState({loaded:!0})):this.setState({loaded:!0})}catch(e){console.log(e)}}))}shouldComponentUpdate(e,t){return this.state.contextCountry!==t.contextCountry||this.state.payoutDefaultCurrency!==t.payoutDefaultCurrency||!1===this.state.loaded||this.state.isLegalEntityPartOfTrust!==t.isLegalEntityPartOfTrust||this.state.accountHolder!==t.accountHolder}render({children:e}){return this.state.loaded?C(j.Provider,Object.assign({value:{i18n:this.state.i18n,setLocale:this.setLocale,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations,setContextCountry:this.setContextCountry,contextCountry:this.state.contextCountry,setPayoutDefaultCurrency:this.setPayoutDefaultCurrency,payoutDefaultCurrency:this.state.payoutDefaultCurrency,commonProps:this.props.commonProps||{},isReview:this.props.isReview,isLegalEntityPartOfTrust:this.state.isLegalEntityPartOfTrust,setIsLegalEntityPartOfTrust:this.setIsLegalEntityPartOfTrust,setAccountHolder:this.setAccountHolder,accountHolder:this.state.accountHolder}},{children:t.toChildArray(e)})):null}}var Y,K,z,Z,Q=0,J=[],ee=[],te=t.options.__b,ae=t.options.__r,re=t.options.diffed,ne=t.options.__c,ie=t.options.unmount;function oe(e,a){t.options.__h&&t.options.__h(K,e,Q||a),Q=0;var r=K.__H||(K.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:ee}),r.__[e]}function se(e){return Q=1,de(Ne,e)}function de(e,t,a){var r=oe(Y++,2);if(r.t=e,!r.__c&&(r.__=[a?a(t):Ne(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],a=r.t(t,e);t!==a&&(r.__N=[a,r.__[1]],r.__c.setState({}))}],r.__c=K,!K.u)){K.u=!0;var n=K.shouldComponentUpdate;K.shouldComponentUpdate=function(e,t,a){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter((function(e){return e.__c}));if(i.every((function(e){return!e.__N})))return!n||n.call(this,e,t,a);var o=!1;return i.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}})),!(!o&&r.__c.props===e)&&(!n||n.call(this,e,t,a))}}return r.__N||r.__}function le(e,a){var r=oe(Y++,3);!t.options.__s&&_e(r.__H,a)&&(r.__=e,r.i=a,K.__H.__h.push(r))}function ce(e,a){var r=oe(Y++,4);!t.options.__s&&_e(r.__H,a)&&(r.__=e,r.i=a,K.__h.push(r))}function ue(e){return Q=5,me((function(){return{current:e}}),[])}function me(e,t){var a=oe(Y++,7);return _e(a.__H,t)?(a.__V=e(),a.i=t,a.__h=e,a.__V):a.__}function pe(e,t){return Q=8,me((function(){return e}),t)}function ge(e){var t=K.context[e.__c],a=oe(Y++,9);return a.c=e,t?(null==a.__&&(a.__=!0,t.sub(K)),t.props.value):e.__}function ye(){for(var e;e=J.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(he),e.__H.__h.forEach(ve),e.__H.__h=[]}catch(a){e.__H.__h=[],t.options.__e(a,e.__v)}}t.options.__b=function(e){K=null,te&&te(e)},t.options.__r=function(e){ae&&ae(e),Y=0;var t=(K=e.__c).__H;t&&(z===K?(t.__h=[],K.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=ee,e.__N=e.i=void 0}))):(t.__h.forEach(he),t.__h.forEach(ve),t.__h=[])),z=K},t.options.diffed=function(e){re&&re(e);var a=e.__c;a&&a.__H&&(a.__H.__h.length&&(1!==J.push(a)&&Z===t.options.requestAnimationFrame||((Z=t.options.requestAnimationFrame)||fe)(ye)),a.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==ee&&(e.__=e.__V),e.i=void 0,e.__V=ee}))),z=K=null},t.options.__c=function(e,a){a.some((function(e){try{e.__h.forEach(he),e.__h=e.__h.filter((function(e){return!e.__||ve(e)}))}catch(r){a.some((function(e){e.__h&&(e.__h=[])})),a=[],t.options.__e(r,e.__v)}})),ne&&ne(e,a)},t.options.unmount=function(e){ie&&ie(e);var a,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{he(e)}catch(e){a=e}})),r.__H=void 0,a&&t.options.__e(a,r.__v))};var be="function"==typeof requestAnimationFrame;function fe(e){var t,a=function(){clearTimeout(r),be&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(a,100);be&&(t=requestAnimationFrame(a))}function he(e){var t=K,a=e.__c;"function"==typeof a&&(e.__c=void 0,a()),K=t}function ve(e){var t=K;e.__c=e.__(),K=t}function _e(e,t){return!e||e.length!==t.length||t.some((function(t,a){return t!==e[a]}))}function Ne(e,t){return"function"==typeof t?t(e):t}const Oe=["street","houseNumberOrName","postalCode","city","stateOrProvince","country"],[Ie,Ee,Te,Ae,Se,Re]=Oe,Ce=["BR","CA","US","AU"],De=["US","GB"],ke={CA:[Re,Ie,Ee,Ae,Te,Se],GB:[Re,Ee,Ie,Ae,Te,Se],US:[Re,Ie,Ee,Ae,Se,Te],AU:[Re,Ie,Ae,Se,Te],default:[Re,Ie,Ee,Te,Ae,Se]},Le={city:{GB:"cityTown",default:Ae},country:{default:Re},houseNumberOrName:{CA:"apartmentSuite",US:"apartmentSuiteOptional",GB:"houseNumberOptional",default:"houseNumber"},postalCode:{US:"zipCode",default:Te},stateOrProvince:{BR:"state",CA:"provinceOrTerritory",US:"state",AU:"state",default:Se},stateOrProvincePlaceholder:{BR:"selectState",CA:"selectProvinceOrTerritory",US:"selectState",AU:"selectState",default:"selectStateOrProvince"},street:{CA:"address",US:"address",AU:"address",default:Ie}},we=(e,t)=>Le[e][t]||Le[e].default,Pe=(e,t)=>{const a=e.country;return a?Object.entries(e).reduce(((e,[r,n])=>{const i=we(r,a);return e[i]="country"===r?t.getCountryName(n):"stateOrProvince"===r?t.getStateName(n,a):n,e}),{}):e},je=({inline:e=!1,size:t="large"})=>C("div",Object.assign({className:"adyen-kyc-spinner__wrapper "+(e?"adyen-kyc-spinner__wrapper--inline":"")},{children:C("div",{className:`adyen-kyc-spinner adyen-kyc-spinner--${t}`,role:"progressbar"})})),xe=({className:e="",name:t})=>C("i",{className:a("adyen-kyc-icon",`adyen-kyc-icon-${t}`,e),role:"img","aria-hidden":!0}),Me="-ariaError";let Fe=Date.now();const Ve=(e="id")=>(Fe+=1,`${e}-${Fe}`);class Ue extends t.Component{constructor(e){super(e),this.state={focused:!1},this.onFocus=this.onFocus.bind(this),this.onBlur=this.onBlur.bind(this),this.uniqueId=Ve(`adyen-kyc-${this.props.name}`)}onFocus(e){this.setState({focused:!0},(()=>{this.props.onFocus&&this.props.onFocus(e)}))}onBlur(e){this.setState({focused:!1},(()=>{this.props.onBlur&&this.props.onBlur(e),this.props.onFieldBlur&&this.props.onFieldBlur(e)}))}static getDerivedStateFromProps(e,t){return void 0!==e.focused&&e.focused!==t.focused?{focused:e.focused}:void 0!==e.filled&&e.filled!==t.filled?{filled:e.filled}:null}renderContent({name:e,children:r,errorMessage:n,helper:i,inputWrapperModifiers:o,isLoading:s,isValid:d,label:l}){return C(t.Fragment,{children:["string"==typeof l&&C("span",Object.assign({className:a({"adyen-kyc-label__text":!0,"adyen-kyc-label__text--error":n})},{children:l})),"function"==typeof l&&l(),i&&C("span",Object.assign({className:"adyen-kyc-helper-text"},{children:i})),C("div",Object.assign({className:a(["adyen-kyc-input-wrapper",...o.map((e=>`adyen-kyc-input-wrapper--${e}`))])},{children:[t.toChildArray(r).map((a=>{const r=Object.assign({isValid:d,onFocusHandler:this.onFocus,onBlurHandler:this.onBlur,isInvalid:!!n},e&&{uniqueId:this.uniqueId});return t.cloneElement(a,r)})),s&&C("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--loading"},{children:C(je,{size:"small"})})),d&&C("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--valid"},{children:C(xe,{name:"check"})})),n&&C("span",Object.assign({className:"adyen-kyc-input__inline-validation adyen-kyc-input__inline-validation--invalid"},{children:C(xe,{name:"field-error"})}))]})),n&&n.length&&C("span",Object.assign({className:"adyen-kyc-error-text","aria-live":"polite",id:`${this.uniqueId}${Me}`},{children:n}))]})}render({name:e,className:t="",classNameModifiers:r=[],children:n,errorMessage:i,helper:o,inputWrapperModifiers:s=[],isLoading:d,isValid:l,label:c,useLabelElement:u=!0,dataPlaceholder:m}){return C("div",Object.assign({className:a("adyen-kyc-field",t,r.map((e=>`adyen-kyc-field--${e}`)),{"adyen-kyc-field--error":i,"adyen-kyc-field--valid":l}),"data-placeholder":m},{children:C(Be,Object.assign({onFocusField:this.props.onFocusField,name:e,disabled:this.props.disabled,filled:this.state.filled,focused:this.state.focused,useLabelElement:u,uniqueId:this.uniqueId},{children:this.renderContent({name:e,children:n,errorMessage:i,helper:o,inputWrapperModifiers:s,isLoading:d,isValid:l,label:c})}))}))}}const Be=({onFocusField:e,focused:t,filled:r,disabled:n,name:i,uniqueId:o,useLabelElement:s,children:d})=>{const l={onClick:e,className:a({"adyen-kyc-label":!0,"adyen-kyc-label--focused":t,"adyen-kyc-label--filled":r,"adyen-kyc-label--disabled":n})};return s?C("label",Object.assign({},l,{htmlFor:i&&o},{children:d})):C("div",Object.assign({},l,{role:"form"},{children:d}))},We=()=>ge(j);var He="Select-module_adyen-kyc-dropdown__e1hdP",qe="Select-module_adyen-kyc-dropdown-button__FdX-b",Ge="Select-module_adyen-kyc-dropdown-button--active__AGNoA",$e="Select-module_adyen-kyc-filter-input__4JVhc",Xe="Select-module_adyen-kyc-dropdown-list__9PypK",Ye="Select-module_adyen-kyc-dropdown-list--active__lE-9R",Ke="Select-module_adyen-kyc-dropdown-element__v4sS7";const ze=({className:e,isBasic:t=!1,children:r})=>{const n=a("adl-tag",e,{"adl-tag--basic":t});return C("span",Object.assign({className:n},{children:r}))},Ze=({inline:e=!1,size:t="large",dot:r=!1})=>C("div",Object.assign({className:"adl-loader__wrapper "+(e?"adl-loader__wrapper--inline":"")},{children:C("div",{className:a("adl-loading-indicator",`adl-loading-indicator--${t}`,{"adl-loading-indicator--dot":r})})}));function Qe(e){var{filterable:t,isMulti:a,toggleButtonRef:r,isSearch:i}=e,o=n(e,["filterable","isMulti","toggleButtonRef","isSearch"]);return C(t||a||i?"div":"button",Object.assign({},o,{ref:r}))}function Je({active:e,readonly:t,showList:r,isInvalid:n,isValid:i,toggleList:o,onButtonKeyDown:s,filterable:d,placeholder:l,toggleButtonRef:c,ariaDescribedBy:u,selectListId:m,filterInputRef:p,onInput:g,isMulti:y,id:b,isSearch:f,loading:h,textFilter:v}){return C(Qe,Object.assign({"aria-disabled":t,"aria-expanded":r,"aria-haspopup":"listbox",className:a({"adyen-kyc-dropdown-button":!0,[qe]:!0,"adyen-kyc-dropdown-button--readonly":t,"adyen-kyc-dropdown-button--active":r,[Ge]:r,"adyen-kyc-dropdown-button--invalid":n,"adyen-kyc-dropdown-field--valid":i,"adyen-kyc-dropdown-button-search":f}),filterable:d,onClick:t?null:o,onKeyDown:t?null:s,role:d||y?"button":null,tabIndex:"0",title:e.join(",")||l,toggleButtonRef:c,type:d||y?null:"button","aria-describedby":u,isMulti:y,id:b,isSearch:f},{children:y?C(tt,{active:e,placeholder:l}):C(et,{active:e,placeholder:l,selectListId:m,showList:r,filterInputRef:p,filterable:d,onInput:g,isSearch:f,loading:h,textFilter:v})}))}const et=({active:e,placeholder:r,selectListId:n,showList:i,filterInputRef:o,filterable:s,onInput:d,isSearch:l,loading:c,textFilter:u})=>{const m=e.pop();return C(t.Fragment,i&&s?{children:[l&&C(xe,{name:"search",className:"adyen-kyc-dropdown-button-search__icon"}),C("input",{"aria-autocomplete":"list","aria-controls":n,"aria-expanded":i,"aria-owns":n,autoComplete:"off",className:a("adyen-kyc-filter-input",[$e]),onInput:d,placeholder:r,ref:o,role:"combobox",type:"text",value:u}),l&&c&&C(Ze,{size:"xsmall",dot:!0})]}:{children:[(null==m?void 0:m.sprite)&&C("svg",Object.assign({className:"adyen-kyc-dropdown-button__icon",role:"img"},{children:C("use",{href:m.sprite})})),l&&C(xe,{name:"search",className:"adyen-kyc-dropdown-button-search__icon"}),C("span",Object.assign({className:a("adyen-kyc-dropdown-button__text",{"adyen-kyc-dropdown-button__text--placeholder":!m})},{children:(null==m?void 0:m.selectedOptionName)||(null==m?void 0:m.name)||u||r}))]})},tt=({active:e,placeholder:t})=>e&&e.length>0?C("div",Object.assign({className:"adyen-kyc-dropdown-selected-items"},{children:e.map(((e,a)=>C(ze,Object.assign({className:e.className,isBasic:!0},{children:(null==e?void 0:e.selectedOptionName)||(null==e?void 0:e.name)||t}),a)))})):C("span",Object.assign({className:"adyen-kyc-dropdown-button__text"},{children:t}));function at(e){var{classNameModifiers:t=[],label:r,isInvalid:i,onChange:o,helper:s}=e,d=n(e,["classNameModifiers","label","isInvalid","onChange","helper"]);return C("label",Object.assign({className:"adyen-kyc-checkbox"},{children:[C("input",Object.assign({},d,{className:a(["adyen-kyc-checkbox__input",[d.className],{"adyen-kyc-checkbox__input--invalid":i},t.map((e=>`adyen-kyc-input--${e}`))]),type:"checkbox",onChange:o})),C("span",Object.assign({className:"adyen-kyc-checkbox__label"},{children:r})),s&&C("span",Object.assign({className:"adyen-kyc-checkbox__helper-text"},{children:s}))]}))}at.defaultProps={onChange:()=>{}};const rt=e=>{var{item:r,selected:i,isMulti:o,isSearch:s,children:d}=e,l=n(e,["item","selected","isMulti","isSearch","children"]);return C("li",Object.assign({"aria-disabled":!!r.disabled,"aria-selected":i,className:a(["adyen-kyc-dropdown-element",Ke,{"adyen-kyc-dropdown-element--active":i,"adyen-kyc-dropdown-element--disabled":!!r.disabled,"adyen-kyc-dropdown-multi-element":o,"adyen-kyc-dropdown-element-description":!o&&!s&&r.description,"adyen-kyc-dropdown-search-element":s}]),"data-disabled":!!r.disabled,"data-value":r.id,onClick:l.onSelect,onKeyDown:l.onKeyDown,role:"option",tabIndex:-1},{children:o?C(at,{label:r.name,helper:null==r?void 0:r.description,checked:i,name:`adyen-kyc-dropdown-element__checkbox adyen-kyc-dropdown-element__checkbox--${r.id}`}):d?[d]:C(t.Fragment,{children:[r.sprite?C("svg",Object.assign({className:"adyen-kyc-dropdown-element__icon",role:"img"},{children:C("use",{href:r.sprite})})):r.icon&&C("img",{className:"adyen-kyc-dropdown-element__icon",alt:r.name,src:r.icon}),r.description?C(t.Fragment,{children:[C("span",Object.assign({className:"adyen-kyc-dropdown-element__label adl-u-font-weight-semi-bold"},{children:r.name})),C("span",Object.assign({className:"adyen-kyc-dropdown-element-description__text"},{children:r.description}))]}):C("span",Object.assign({className:"adyen-kyc-dropdown-element__label"},{children:r.name}))]})}))};function nt(e){var{active:t,items:r,showList:i,textFilter:o,isMulti:s,showAbove:d,isSearch:l,loading:c,getSearchItem:u}=e,m=n(e,["active","items","showList","textFilter","isMulti","showAbove","isSearch","loading","getSearchItem"]);const{i18n:p}=We(),g=r.filter((e=>{var t;return l?e:!o||(null===(t=e.name)||void 0===t?void 0:t.toLowerCase().includes(o))})),[y,b]=se([]);return le((()=>{b(g.map((e=>C(rt,Object.assign({item:e,onKeyDown:m.onKeyDown,onSelect:m.onSelect,selected:!!t.find((t=>t.id===e.id)),isMulti:s,isSearch:l},{children:u&&u(e)}),e.id))))}),[g.length,null==t?void 0:t.length,r]),C("ul",Object.assign({className:a({test:!0,"adyen-kyc-dropdown-list--above":d,"adyen-kyc-dropdown-list":!0,[Xe]:!0,"adyen-kyc-dropdown-list--active":i,[Ye]:i}),id:m.selectListId,ref:m.selectListRef,role:"listbox"},{children:c?C("div",Object.assign({className:"adyen-kyc-dropdown-element adyen-kyc-dropdown-element--no-options"},{children:p.get("loading")})):l&&(!o||o.length<3)?null:y.length?y:C("div",Object.assign({className:"adyen-kyc-dropdown-element adyen-kyc-dropdown-element--no-options"},{children:p.get("noOptionsFound")}))}))}const it=e=>{const t=e instanceof HTMLElement&&window.getComputedStyle(e).overflowY;return e?"visible"!==t&&"hidden"!==t?e:it(e.parentNode)||document.body:-1},ot={arrowDown:"ArrowDown",arrowUp:"ArrowUp",enter:"Enter",escape:"Escape",space:" ",tab:"Tab"},st="30_102";function dt(e,t=20){let a;return(...r)=>{clearTimeout(a),a=setTimeout((()=>e(...r)),t)}}const lt=({items:e=[],className:t="",classNameModifiers:r=[],filterable:n=!0,readonly:i=!1,onChange:o,selected:s,name:d,isInvalid:l=!1,isValid:c,placeholder:u,showInlineErrors:m,isMulti:p,uniqueId:g,showSelectedItemsAsTags:y=!1,isSearch:b=!1,onSearch:f=(()=>{}),resetSearch:h=!1,loading:v=!1,getSearchItem:_,searchText:N,showSearchList:O})=>{const I=ue(null),E=ue(null),T=ue(null),A=ue(null),[S,R]=se(null),[D,L]=se(!1),w=me((()=>`select-${k()}`),[]),P=e.filter((e=>p?null==s?void 0:s.includes(e.id):e.id===s))||[],[j,x]=se(!1),[M,F]=se(null),V=()=>{R(null),L(!1),T.current&&T.current.focus()},U=e=>{e.preventDefault();const t=A.current.contains(e.currentTarget)?e.currentTarget:A.current.firstElementChild,a="true"===t.getAttribute("data-disabled");if(!i&&!a){const e=t.getAttribute("data-value");if(p){const t=P.find((t=>t.id===e))?[...P.filter((t=>t.id!==e)).map((e=>e.id))]:[...P.map((e=>e.id)),e];o({target:{value:t,name:d}})}else V(),o({target:{value:e,name:d}})}},B=()=>{let e=M;if(e||(e=it(T.current),F(e)),-1!==e){const{bottom:t}=e.getBoundingClientRect(),{bottom:a}=T.current.getBoundingClientRect();x(!(t-a>145))}L(!0)},W=e=>{E.current.contains(e.target)||L(!1)};return le((()=>{h&&R("")}),[h]),le((()=>{R(N)}),[N]),le((()=>{D&&n&&I.current&&I.current.focus()}),[D]),le((()=>{L(O)}),[O]),le((()=>(document.addEventListener("click",W,!0),()=>{document.removeEventListener("click",W,!0)})),[]),C("div",Object.assign({className:a(["adyen-kyc-dropdown",He,t,...r.map((e=>`adyen-kyc-dropdown--${e}`))]),ref:E},{children:[C(Je,{id:null!=g?g:null,active:P,filterInputRef:I,filterable:n,isInvalid:l,isValid:c,onButtonKeyDown:e=>{var t;if(e.key===ot.enter&&n&&D&&S){const t=e.target.value;(b&&t.length>2||!b)&&(U(e),B())}else e.key===ot.escape?V():![ot.arrowUp,ot.arrowDown,ot.enter].includes(e.key)&&(e.key!==ot.space||n&&D)?(e.shiftKey&&e.key===ot.tab||e.key===ot.tab)&&V():(e.preventDefault(),B(),(null===(t=A.current)||void 0===t?void 0:t.firstElementChild)&&A.current.firstElementChild.focus())},onInput:e=>{const t=e.target.value;b&&t.length>2&&dt(f(t),500),R(t.toLowerCase())},placeholder:u,readonly:i,selectListId:w,showList:D,toggleButtonRef:T,toggleList:e=>{e.preventDefault(),D?L(!1):B()},ariaDescribedBy:m&&g?`${g}${Me}`:null,isMulti:p,showSelectedItemsAsTags:y,isSearch:b,loading:v,textFilter:S}),C(nt,{active:P,items:e,onKeyDown:e=>{const t=e.target;switch(e.key){case ot.escape:e.preventDefault(),V();break;case ot.space:case ot.enter:U(e);break;case ot.arrowDown:e.preventDefault(),t.nextElementSibling&&t.nextElementSibling.focus();break;case ot.arrowUp:e.preventDefault(),t.previousElementSibling?t.previousElementSibling.focus():n&&I.current&&I.current.focus();break;case ot.tab:V()}},onSelect:U,selectListId:w,selectListRef:A,showList:D,textFilter:S,isMulti:p,showAbove:j,isSearch:b,getSearchItem:_,loading:v})]}))},ct=e=>{const{i18n:a}=We(),[r,n]=se([]),[o,s]=se(!1),{handleChangeFor:d,data:l,autocompleteAddressForm:c}=e,[u,m]=se(!1),[p,g]=se(null),[y,b]=se(!1);le((()=>{n([]),m(!0)}),[l.country]);const f=(e,t)=>{const a=[];let r=0;return""===e[0]?[t]:(e.forEach((e=>{const n=e.split("-"),i=parseInt(n[0]),o=parseInt(n[1]);if(r<i){const e=t.substring(r,i);a.push(`${e}`)}const s=t.substring(i,o);a.push(C("span",Object.assign({className:"adyen-kyc-dropdown-search-element__description--highlight"},{children:s}))),r=o})),r<t.length&&a.push(`${t.substring(r)}`),a)},h=e=>{const{text:t,highlight:a,description:r}=e;let n=[];if(""===a)r?n.push(`${t}, ${r}`):n.push(t);else{const e=a.split(";");n=f(e[0].split(","),t),e.length>1?(n.push(", "),n.push(f(e[1].split(","),r))):r&&n.push(`, ${r}`)}return n};return C(Ue,Object.assign({name:"searchAddress",className:"adl-u-margin-bottom-8",label:a.get("searchAddress")},{children:C(lt,{onChange:t=>{const a=t.target.value;d("searchAddress","blur")(a),m(!1),s(!0);const o=r.filter((e=>e.id===a))[0];"Address"===o.type?((t=>{i(void 0,void 0,void 0,(function*(){try{const a=yield e.handleFindAddress(t);c(a)}catch(e){console.error(e)}}))})(o.id),g(`${o.text} ${o.description}`),b(!1)):((t=>{i(void 0,void 0,void 0,(function*(){try{const a=yield e.handleAddressSearch({text:t.text,country:l.country,container:t.id},e.legalEntityId);n((null==a?void 0:a.results)||[])}catch(e){console.error(e)}}))})(o),g(`${o.text}`),b(!0)),s(!1)},name:"searchAddress",placeholder:a.get("startTypingTheAddress"),selected:l.searchAddress,items:r,isSearch:!0,resetSearch:u,onSearch:t=>i(void 0,void 0,void 0,(function*(){if(t){s(!0);try{const a=yield e.handleAddressSearch({text:t,country:l.country},e.legalEntityId);if(null==a?void 0:a.results){const e=a.results.map((e=>(e=>{if(e.description.includes("Addresses")){const t=e.description.split(" - ");return 1===t.length?Object.assign(Object.assign({},e),{description:void 0,addressAmount:t[0].replace("Addresses","")}):Object.assign(Object.assign({},e),{description:t[0],addressAmount:t[1].replace("Addresses","")})}return e})(e)));n(e)}else n([])}catch(e){console.error(e)}s(!1)}else n([])})),loading:o,getSearchItem:e=>C(t.Fragment,{children:[C("span",Object.assign({className:"adyen-kyc-dropdown-search-element__description"},{children:h(e)})),e.addressAmount&&C("div",Object.assign({className:"adyen-kyc-dropdown-search-element__addresses"},{children:[e.addressAmount," ",C("span",Object.assign({className:"adyen-kyc-dropdown-search-element__addresses--text"},{children:[" ",a.get("addresses")]})),C(xe,{name:"arrow-right",className:"adyen-kyc-dropdown-search-element__addresses--icon"})]}))]}),isInvalid:!1,searchText:p,showSearchList:y})}))},ut=e=>e.replace(/[\uff01-\uff5e]/g,(e=>String.fromCharCode(e.charCodeAt(0)-65248)));function mt(e,t){for(var a in t)e[a]=t[a];return e}function pt(e,t){for(var a in e)if("__source"!==a&&!(a in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function gt(e){this.props=e}function yt(e,a){function r(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),a?!a(this.props,e)||!r:pt(this.props,e)}function n(a){return this.shouldComponentUpdate=r,t.createElement(e,a)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(gt.prototype=new t.Component).isPureReactComponent=!0,gt.prototype.shouldComponentUpdate=function(e,t){return pt(this.props,e)||pt(this.state,t)};var bt=t.options.__b;t.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),bt&&bt(e)};var ft="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function ht(e){function t(t){var a=mt({},t);return delete a.ref,e(a,t.ref||null)}return t.$$typeof=ft,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var vt=t.options.__e;t.options.__e=function(e,t,a,r){if(e.then)for(var n,i=t;i=i.__;)if((n=i.__c)&&n.__c)return null==t.__e&&(t.__e=a.__e,t.__k=a.__k),n.__c(e,t);vt(e,t,a,r)};var _t=t.options.unmount;function Nt(e,t,a){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=mt({},e)).__c&&(e.__c.__P===a&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return Nt(e,t,a)}))),e}function Ot(e,t,a){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return Ot(e,t,a)})),e.__c&&e.__c.__P===t&&(e.__e&&a.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=a)),e}function It(){this.__u=0,this.t=null,this.__b=null}function Et(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Tt(){this.u=null,this.o=null}t.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),_t&&_t(e)},(It.prototype=new t.Component).__c=function(e,t){var a=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(a);var n=Et(r.__v),i=!1,o=function(){i||(i=!0,a.__R=null,n?n(s):s())};a.__R=o;var s=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=Ot(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},d=!0===t.__h;r.__u++||d||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(o,o)},It.prototype.componentWillUnmount=function(){this.t=[]},It.prototype.render=function(e,a){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=Nt(this.__b,r,n.__O=n.__P)}this.__b=null}var i=a.__a&&t.createElement(t.Fragment,null,e.fallback);return i&&(i.__h=null),[t.createElement(t.Fragment,null,a.__a?null:e.children),i]};var At=function(e,t,a){if(++a[1]===a[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(a=e.u;a;){for(;a.length>3;)a.pop()();if(a[1]<a[0])break;e.u=a=a[2]}};(Tt.prototype=new t.Component).__a=function(e){var t=this,a=Et(t.__v),r=t.o.get(e);return r[0]++,function(n){var i=function(){t.props.revealOrder?(r.push(n),At(t,e,r)):n()};a?a(i):i()}},Tt.prototype.render=function(e){this.u=null,this.o=new Map;var a=t.toChildArray(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&a.reverse();for(var r=a.length;r--;)this.o.set(a[r],this.u=[1,0,this.u]);return e.children},Tt.prototype.componentDidUpdate=Tt.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,a){At(e,a,t)}))};var St="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Rt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|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]/,Ct="undefined"!=typeof document,Dt=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};t.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(t.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var kt=t.options.event;function Lt(){}function wt(){return this.cancelBubble}function Pt(){return this.defaultPrevented}t.options.event=function(e){return kt&&(e=kt(e)),e.persist=Lt,e.isPropagationStopped=wt,e.isDefaultPrevented=Pt,e.nativeEvent=e};var jt={configurable:!0,get:function(){return this.class}},xt=t.options.vnode;t.options.vnode=function(e){var a=e.type,r=e.props,n=r;if("string"==typeof a){var i=-1===a.indexOf("-");for(var o in n={},r){var s=r[o];Ct&&"children"===o&&"noscript"===a||"value"===o&&"defaultValue"in r&&null==s||("defaultValue"===o&&"value"in r&&null==r.value?o="value":"download"===o&&!0===s?s="":/ondoubleclick/i.test(o)?o="ondblclick":/^onchange(textarea|input)/i.test(o+a)&&!Dt(r.type)?o="oninput":/^onfocus$/i.test(o)?o="onfocusin":/^onblur$/i.test(o)?o="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(o)?o=o.toLowerCase():i&&Rt.test(o)?o=o.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===s&&(s=void 0),/^oninput$/i.test(o)&&(o=o.toLowerCase(),n[o]&&(o="oninputCapture")),n[o]=s)}"select"==a&&n.multiple&&Array.isArray(n.value)&&(n.value=t.toChildArray(r.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==a&&null!=n.defaultValue&&(n.value=t.toChildArray(r.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),e.props=n,r.class!=r.className&&(jt.enumerable="className"in r,null!=r.className&&(n.class=r.className),Object.defineProperty(n,"className",jt))}e.$$typeof=St,xt&&xt(e)};var Mt=t.options.__r;t.options.__r=function(e){Mt&&Mt(e),e.__c};const Ft=ht(((e,t)=>{const{autoCorrect:r,classNameModifiers:i=[],isInvalid:o,isValid:s,readonly:d=null,spellCheck:l,type:c="text",disabled:u,showInlineErrors:m,uniqueId:p}=e,g=a("adyen-kyc-input",[`adyen-kyc-input--${c}`],e.className,{"adyen-kyc-input--invalid":o,"adyen-kyc-field--valid":s,"adyen-kyc-input--disabled":u},i.map((e=>`adyen-kyc-input--${e}`))),y=n(e,["classNameModifiers","uniqueId","showInlineErrors"]);return C("input",Object.assign({ref:t,id:p},y,{type:c,className:g,readOnly:d,spellCheck:l,autoCorrect:r},u&&{"aria-disabled":!0},{"aria-describedby":m?`${p}${Me}`:null,onInput:t=>{var a;t.target.value=ut(t.target.value),null===(a=null==e?void 0:e.onInput)||void 0===a||a.call(e,t)},onBlur:t=>{var a,r;null===(a=null==e?void 0:e.onBlurHandler)||void 0===a||a.call(e,t),e.trimOnBlur&&(t.target.value=t.target.value.trim()),null===(r=null==e?void 0:e.onBlur)||void 0===r||r.call(e,t)},onFocus:t=>{var a;null===(a=null==e?void 0:e.onFocusHandler)||void 0===a||a.call(e,t)}}))}));Ft.displayName="InputBase";const Vt=ht(((e,t)=>{var{transformInput:a,onInput:r}=e,i=n(e,["transformInput","onInput"]);const[o,s]=se(),d=ue(null),l=null!=t?t:d,c=pe(a?e=>{const t=e.target,n=a(t.value);s(t.selectionStart);const i=Object.assign(Object.assign({},e),{target:Object.assign(Object.assign({},e.target),{value:n})});r(i)}:r,[a,r]);return ce((()=>{var e;null===(e=l.current)||void 0===e||e.setSelectionRange(o,o,"none")}),[o]),C(Ft,Object.assign({classNameModifiers:["large"]},i,{type:"text",onInput:r?c:void 0,ref:l}))}));Vt.displayName="InputText";const Ut=()=>{const e=document.createElement("input");return e.setAttribute("type","date"),"date"===e.type};function Bt(e){const t=me(Ut,[]);return C(Ft,t?Object.assign({},e,{type:"date"}):Object.assign({},e,{onInput:t=>{const{value:a}=t.target;t.target.value=(e=>{const t=e.replace(/\D|\s/g,"").replace(/^(00)(.*)?/,"01$2").replace(/^(3[2-9])(.*)?/,"0$1$2").replace(/^([4-9])(.*)?/,"0$1").replace(/^([0-9]{2})(00)(.*)?/,"$101").replace(/^(3[01])(02)(.*)?/,"29$2").replace(/^([0-9]{2})([2-9]|1[3-9])(.*)?/,"$10$2").replace(/^([0-9]{2})([0-9]{2})([0-9])/,"$1/$2/$3").replace(/^([0-9]{2})([0-9])/,"$1/$2"),[a="",r="",n=""]=t.split("/");return 4===n.length&&"29"===a&&"02"===r&&(Number(n)%4!=0||"00"===n.substr(2,2)&&Number(n)%400!=0)?t.replace(/^29/,"28"):t})(a),e.onInput(t)},maxLength:10}))}function Wt(e){return C(Ft,Object.assign({},e,{type:"tel"}))}function Ht(e){return C(Ft,Object.assign({},e,{type:"email",autoCapitalize:"off"}))}const qt=e=>C("input",Object.assign({},e,{className:a("adl-input-radio__input",e.className)}));function Gt(e){const{items:t,i18n:r,name:n,onChange:i,value:o,isInvalid:s,uniqueId:d,disabled:l=!1}=e,c=null==d?void 0:d.replace(/[0-9]/g,"").substring(0,d.lastIndexOf("-"));return C("div",Object.assign({className:"adyen-kyc-radio-group"},{children:t.map((t=>{const d=Ve(c);return C("label",Object.assign({htmlFor:d,className:"adl-input-radio"},{children:[C(qt,{id:d,type:"radio",checked:o===t.id,"aria-checked":o===t.id,className:"adyen-kyc-radio-group__input",name:n,onChange:i,onClick:i,value:t.id,disabled:l}),C("span",Object.assign({className:a(["adl-input-radio__label","adyen-kyc-label__text",e.className,{"adyen-kyc-radio-group__label--invalid":s}])},{children:r.get(t.name)}))]}),t.id)}))}))}function $t(e){return C(Ft,Object.assign({classNameModifiers:["large"]},e,{type:"file"}))}Gt.defaultProps={onChange:()=>{},items:[]};const Xt=()=>null,Yt=()=>null,Kt=()=>null,zt=({item:e,name:t,uniqueId:r,i18n:n,isInvalid:i,value:o,onChange:s=(()=>{}),labelClassName:d,className:l,children:c})=>{let u,m,p;if(c)if(Array.isArray(c))u=c.find((e=>(null==e?void 0:e.type)===Xt)),m=c.find((e=>(null==e?void 0:e.type)===Yt)),p=c.find((e=>(null==e?void 0:e.type)===Kt));else switch(c.type){case Xt:u=c;break;case Yt:m=c;break;case Kt:p=c}return C("label",Object.assign({htmlFor:r,className:a(["adl-radio-card",d])},{children:[u&&C("div",Object.assign({className:"adl-u-margin-bottom-16 adl-radio-card__icon","aria-hidden":"true"},{children:u.props.children})),C("div",Object.assign({className:"adl-radio-card__content"},{children:[C("div",Object.assign({className:"adl-radio-card__header adl-u-display-flex adl-u-align-items-center"},{children:[C("div",Object.assign({className:a(["adl-label","adyen-kyc-radio-group-card__label","adl-u-margin-bottom-16",l,{"adyen-kyc-radio-group-card__label--invalid":i}])},{children:[e.subtitle&&C("div",Object.assign({className:"adyen-kyc-radio-group-card__subtitle"},{children:n.get(e.subtitle)})),n.get(e.name)]})),C(qt,{id:r,type:"radio",checked:o===e.id,className:"adyen-kyc-radio-group-card__input",name:t,onChange:s,onClick:s,value:e.id,"aria-checked":o===e.id})]})),C("div",m?Object.assign({className:"adl-radio-card__body adl-u-margin-bottom-16"},{children:m.props.children}):Object.assign({className:"adl-radio-card__body adl-u-margin-bottom-16"},{children:n.get(e.description)})),p&&C("div",Object.assign({className:"adl-u-margin-bottom-16"},{children:p.props.children}))]}))]}),e.id)};function Zt(e){const{items:t,i18n:a,name:r,onChange:n,value:i,isInvalid:o,uniqueId:s}=e,d=null==s?void 0:s.replace(/[0-9]/g,"").substring(0,s.lastIndexOf("-"));return C("div",Object.assign({className:"adyen-kyc-radio-group-card"},{children:t.map((e=>{const t=Ve(d);return C(zt,{item:e,uniqueId:t,i18n:a,isInvalid:o,value:i,onChange:n,name:r},e.id)}))}))}function Qt(e){const{autoCorrect:t,classNameModifiers:r,isInvalid:i,isValid:o,readonly:s=null,spellCheck:d,disabled:l,showInlineErrors:c,uniqueId:u,maxLength:m}=e,{i18n:p}=We(),[g,y]=se("");Object.prototype.hasOwnProperty.call(e,"onChange")&&console.error("Error: Form fields that rely on InputBase may not have an onChange property");const b=a("adyen-kyc-input","adyen-kyc-input--textarea",e.className,{"adyen-kyc-input--invalid":i,"adyen-kyc-field--valid":o,"adyen-kyc-input--disabled":l},r.map((e=>`adyen-kyc-input--${e}`))),f=n(e,["classNameModifiers","uniqueId","showInlineErrors"]),h=m-g.length;return C("div",Object.assign({className:"adyen-kyc-input-wrapper"},{children:[C("textarea",Object.assign({id:u},f,{className:b,readOnly:s,spellCheck:d,autoCorrect:t},l&&{"aria-disabled":!0},{"aria-describedby":c?`${u}${Me}`:null,onInput:t=>{var a;t.target.value=ut(t.target.value),y(t.target.value),null===(a=null==e?void 0:e.onInput)||void 0===a||a.call(e,t)},onBlur:t=>{var a,r;null===(a=null==e?void 0:e.onBlurHandler)||void 0===a||a.call(e,t),e.trimOnBlur&&(t.target.value=t.target.value.trim()),null===(r=null==e?void 0:e.onBlur)||void 0===r||r.call(e,t)},onFocus:t=>{var a;null===(a=null==e?void 0:e.onFocusHandler)||void 0===a||a.call(e,t)}})),m&&h>=0?C("span",Object.assign({className:"adyen-kyc-input__counter"},{children:p.get("xCharactersLeft",{values:{charactersLeft:h}})})):null]}))}zt.Icon=Xt,zt.Body=Yt,zt.Footer=Kt,Zt.defaultProps={onChange:()=>{},items:[]};const Jt=(e,t)=>{const a={boolean:at,radio:Gt,select:lt,radioCard:Zt,date:Bt,emailAddress:Ht,email:Ht,tel:Wt,text:Vt,file:$t,textArea:Qt,default:Vt};return C(a[e]||a.default,Object.assign({},t))};function ea(e,t){const{i18n:a,loadingContext:r,clientKey:n}=We(),[i,o]=se([]),[s,d]=se(!1);return le((()=>{t||O(e,r,a.locale,n).then((e=>{const t=e&&e.length?e:[];o(t),d(!0)})).catch((()=>{o([]),d(!0)}))}),[e,r,a.locale,n,t]),{dataset:i,loaded:s}}function ta(e){const{classNameModifiers:t,selectedCountry:a,onDropdownChange:r,value:n,readOnly:i}=e,{i18n:o,commonProps:s}=We(),d=we("stateOrProvince",a),l=we("stateOrProvincePlaceholder",a),{dataset:c,loaded:m}=ea(u(a),!a||!Ce.includes(a));return m&&c.length?C(Ue,Object.assign({name:"stateOrProvince",label:o.get(d),classNameModifiers:t,errorMessage:e.errorMessage,isValid:!!n,showInlineErrors:s.showInlineErrors},{children:Jt("select",{name:"stateOrProvince",onChange:r,selected:n,placeholder:o.get(l),items:c,readonly:i&&!!n,showInlineErrors:s.showInlineErrors})})):null}function aa({allowedCountries:e=[],classNameModifiers:t=[],errorMessage:a,onDropdownChange:r,value:n,readOnly:i,label:o}){const{i18n:s,commonProps:d}=We(),{dataset:l}=ea(c),u=l.filter((t=>!e.length||e.includes(t.id))).map((e=>Object.assign(Object.assign({},e),{sprite:`#adl-flag-${e.id.toLowerCase()}`})));return C(Ue,Object.assign({name:"country",label:o||s.get("country"),errorMessage:a,classNameModifiers:t,isValid:!!n,showInlineErrors:d.showInlineErrors},{children:Jt("select",{onChange:r,name:"country",placeholder:s.get("selectCountry"),selected:n,items:u,readonly:(1===u.length||i)&&!!n,showInlineErrors:d.showInlineErrors})}))}var ra=(e,t)=>({getPlaceholder:(a,r=null)=>{var n,i,o;const s=null!==(o=null!==(i=null===(n=e.placeholders)||void 0===n?void 0:n[a])&&void 0!==i?i:r)&&void 0!==o?o:a;return t.get(s)},getLabel:(a,r=null)=>{var n,i,o;const s=null!==(o=null!==(i=null===(n=e.labels)||void 0===n?void 0:n[a])&&void 0!==i?i:r)&&void 0!==o?o:a;return t.get(s)},isRequiredField:(t,a=!0)=>e.requiredFields?e.requiredFields.includes(t)&&("role"!==t||"role"===t&&"individual"!==e.taskType):a,isOptionalField:t=>{var a;return null===(a=e.optionalFields)||void 0===a?void 0:a.includes(t)},isVisibleField:function(e,t=!0){return this.isRequiredField(e,t)||this.isOptionalField(e)},isReadOnly:t=>e.readOnly||!!e.readOnlyFields&&e.readOnlyFields.includes(t),getVal:e=>{if("string"==typeof e)return t.get(e);let a="error";if(e&&"object"==typeof e){const{translationKey:r,translationObject:n}=e;a=t.get(r,n)}return a},getErrorMessage:(e,a,r)=>{var n;const i=null===(n=null==a?void 0:a[e])||void 0===n?void 0:n.errorMessage;if("object"==typeof i){const{translationKey:e,translationObject:a}=i;return t.get(e,a)}return i?t.get(i):Boolean(null==r?void 0:r[e])}});function na(e){const{i18n:t,commonProps:a}=We(),{classNameModifiers:r=[],data:n,valid:i,errors:o,fieldProblems:s,fieldName:d,onInput:l,onBlur:c,trimOnBlur:u}=e,m=ra(e,t).getErrorMessage(d,o,s),p=n[d],g=we(d,n.country),y=o=>{switch(o){case"country":return C(aa,{classNameModifiers:r,allowedCountries:e.allowedCountries,errorMessage:m,onDropdownChange:e.onDropdownChange,value:p,className:e.hideField?"adl-u-display-none":""});case"stateOrProvince":return C(ta,{classNameModifiers:r,selectedCountry:n.country,errorMessage:m,onDropdownChange:e.onDropdownChange,value:p});default:return C(Ue,Object.assign({name:o,label:t.get(g),classNameModifiers:r,errorMessage:m,isValid:i[o],showInlineErrors:a.showInlineErrors},{children:Jt("text",{classNameModifiers:r,name:o,value:p,onInput:l,onBlur:c,maxlength:e.maxlength,"aria-required":!0,"aria-label":e["aria-label"],"aria-invalid":!i[o],showInlineErrors:a.showInlineErrors,trimOnBlur:u})}))}};return e.hideField?C("div",Object.assign({className:"adl-u-display-none"},{children:y(d)})):y(d)}class ia{constructor(e){this.validationResults=e}get isValid(){return this.validationResults.reduce(((e,t)=>e&&t.isValid),!0)}hasError(){return Boolean(this.getError())}getError(){return this.validationResults.find((e=>e.hasError))}getAllErrors(){return this.validationResults.filter((e=>e.hasError))}}const oa={validate:()=>!0,modes:["blur","input"]};class sa{constructor(e){this.setRules(e)}setRules(e){this.rules=Object.assign(Object.assign({},this.rules),e)}getRulesFor(e){var t;const a=null!==(t=this.rules[e])&&void 0!==t?t:[oa];return Array.isArray(a)?a:[a]}validate({key:e,value:t,mode:a="blur"},r){const n=this.getRulesFor(e).map((e=>((e,t,a,r)=>{const n=e.validate(t,r),i=e.modes.includes(a);return{isValid:n,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t,r):e.errorMessage,hasError:i&&!n}})(e,t,a,r)));return new ia(n)}}const da=(e,t)=>Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,a)=>(t[a]=e[a],t)),{}),la=(e,t,a,r,n)=>t.reduce(((e,t)=>{var i,o,s;return Object.assign(Object.assign({},e),{[t]:null!==(s=null!==(o=null!==(i=e[t])&&void 0!==i?i:null==n?void 0:n[t])&&void 0!==o?o:null==r?void 0:r[t])&&void 0!==s?s:a})}),e);function ca({schema:e,defaultData:t,processField:a,fieldProblems:r,maskedFields:n}){const i=e=>{var i,o;if(void 0===t[e])return{valid:!1,errors:null,data:null,fieldProblems:null!==(i=null==r?void 0:r[e])&&void 0!==i?i:null};const[s,d]=a({key:e,value:t[e],mode:"blur",defaultData:t,maskedFields:n},{state:{data:t}});return{valid:d.isValid&&!(null==r?void 0:r[e])||!1,errors:d.hasError()?d.getError():null,data:s,fieldProblems:null!==(o=null==r?void 0:r[e])&&void 0!==o?o:null}},o=e.reduce(((e,t)=>{const{valid:a,errors:r,data:n,fieldProblems:o}=i(t);return{valid:Object.assign(Object.assign({},e.valid),{[t]:a}),errors:Object.assign(Object.assign({},e.errors),{[t]:r}),data:Object.assign(Object.assign({},e.data),{[t]:n}),fieldProblems:Object.assign(Object.assign({},e.fieldProblems),{[t]:o})}}),{data:{},valid:{},errors:{},fieldProblems:{}});return{schema:e,data:o.data,valid:o.valid,errors:o.errors,fieldProblems:o.fieldProblems,maskedFields:n}}function ua({rules:e,schema:t,formatters:a,defaultData:r={},fieldProblems:n,maskedFields:i}){var o;const s=me((()=>new sa(e)),[e]),d=pe("function"==typeof t?t:()=>t,[t]),l=({key:e,value:t,mode:r,defaultData:n,maskedFields:i},o)=>{var d;const l=(null===(d=null==a?void 0:a[e])||void 0===d?void 0:d.formatter)?a[e].formatter:null==a?void 0:a[e],c=l&&"function"==typeof l?l(null!=t?t:"",o):t;return[c,!((null==i?void 0:i.includes(e))&&n[e]===t&&n[e])?s.validate({key:e,value:c,mode:r},o):{isValid:!0,hasError:()=>null}]},[c,u]=de(function(e){return function(t,{type:a,key:r,value:n,mode:i,schema:o,defaultData:s,formValue:d,selectedSchema:l,maskedFields:c,fieldProblems:u}){var m,p,g,y,b;const f=l||t.schema;switch(a){case"setData":return Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{[r]:n})});case"setValid":return Object.assign(Object.assign({},t),{valid:Object.assign(Object.assign({},t.valid),{[r]:n})});case"setErrors":return Object.assign(Object.assign({},t),{errors:Object.assign(Object.assign({},t.errors),{[r]:n})});case"setFieldProblems":return null!==(p=null===(m=null==t?void 0:t.schema)||void 0===m?void 0:m.reduce(((e,a)=>{var r,n;return Object.assign(Object.assign({},e),{fieldProblems:Object.assign(Object.assign({},t.fieldProblems),{[a]:null!==(r=null==u?void 0:u[a])&&void 0!==r?r:null}),valid:Object.assign(Object.assign({},t.valid),{[a]:(null===(n=t.valid)||void 0===n?void 0:n[a])&&!u[a]})})}),t))&&void 0!==p?p:t;case"updateField":{const[a,o]=e({key:r,value:n,mode:i,defaultData:s,maskedFields:c},{state:t}),d=t.data[r],l=Object.assign({},t.fieldProblems);return d!==a&&(l[r]=null),Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),{[r]:a}),errors:Object.assign(Object.assign({},t.errors),{[r]:o.hasError()?o.getError():null}),valid:Object.assign(Object.assign({},t.valid),{[r]:o.isValid&&!l[r]||!1}),fieldProblems:l})}case"mergeForm":{const e=Object.assign(Object.assign({},t),{data:Object.assign(Object.assign({},t.data),d.data),errors:Object.assign(Object.assign({},t.errors),d.errors),valid:Object.assign(Object.assign({},t.valid),d.valid),fieldProblems:Object.assign(Object.assign({},t.fieldProblems),d.fieldProblems)});return e.valid&&(e.isValid=Object.values(e.valid).every((e=>e))),e}case"setSchema":{const a=ca({schema:o,defaultData:s,processField:e,fieldProblems:u,maskedFields:c}),r=t.schema.filter((e=>!o.includes(e))),n=o.filter((e=>!t.schema.includes(e))),i={data:da(t.data,n),errors:da(t.errors,n),valid:da(t.valid,n)},d=la(da(t.data,r),n,null,a.data,null===(g=t.local)||void 0===g?void 0:g.data),l=la(da(t.valid,r),n,!1,a.valid,null===(y=t.local)||void 0===y?void 0:y.valid),m=la(da(t.errors,r),n,null,a.errors,null===(b=t.local)||void 0===b?void 0:b.errors);return Object.assign(Object.assign({},t),{schema:o,data:d,valid:l,errors:m,local:i})}case"validateForm":{const a=f.reduce(((a,r)=>{const[,n]=e({key:r,value:t.data[r],mode:"blur",defaultData:s,maskedFields:c},{state:t});return{valid:Object.assign(Object.assign({},a.valid),{[r]:n.isValid&&!t.fieldProblems[r]||!1}),errors:Object.assign(Object.assign({},a.errors),{[r]:n.hasError()?n.getError():null})}}),{valid:t.valid,errors:t.errors});return Object.assign(Object.assign({},t),{valid:a.valid,errors:a.errors})}default:throw new Error("Undefined useForm action")}}}(l),{defaultData:r,schema:null!==(o=d(r))&&void 0!==o?o:[],processField:l,fieldProblems:n,maskedFields:i},ca),m=me((()=>c.schema.reduce(((e,t)=>e&&c.valid[t]),!0)),[c.schema,c.valid]),p=pe(((e=null)=>{u({type:"validateForm",selectedSchema:e,defaultData:r,maskedFields:i})}),[]),g=pe(((e,t)=>u({type:"setErrors",key:e,value:t})),[]),y=pe(((e,t)=>u({type:"setValid",key:e,value:t})),[]),b=pe(((e,t)=>u({type:"setData",key:e,value:t})),[]),f=pe((e=>u({type:"setSchema",schema:e,defaultData:r})),[c.schema]),h=pe((e=>u({type:"mergeForm",formValue:e})),[]),v=pe((e=>u({type:"setFieldProblems",fieldProblems:e})),[c.schema]);return le((()=>{const e=d(c.data);U(c.schema,e)||f(e)}),[c.schema,c.data,f,d]),le((()=>{v(null!=n?n:{})}),[JSON.stringify(n)]),{handleChangeFor:(e,t="blur")=>a=>{const n=((e,t)=>t.target?"checkbox"===t.target.type?!c.data[e]:t.target.value:t)(e,a);u({type:"updateField",key:e,value:n,mode:t,defaultData:r,maskedFields:i})},triggerValidation:p,setData:b,setValid:y,setErrors:g,isValid:m,mergeForm:h,setFieldProblems:v,schema:c.schema,valid:c.valid,errors:c.errors,data:c.data,fieldProblems:c.fieldProblems}}var ma="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},pa={},ga={get exports(){return pa},set exports(e){pa=e}},ya=function(e){return e&&e.Math==Math&&e},ba=ya("object"==typeof globalThis&&globalThis)||ya("object"==typeof window&&window)||ya("object"==typeof self&&self)||ya("object"==typeof ma&&ma)||function(){return this}()||Function("return this")(),fa={},ha=function(e){try{return!!e()}catch(e){return!0}},va=!ha((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),_a=!ha((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Na=_a,Oa=Function.prototype.call,Ia=Na?Oa.bind(Oa):function(){return Oa.apply(Oa,arguments)},Ea={},Ta={}.propertyIsEnumerable,Aa=Object.getOwnPropertyDescriptor,Sa=Aa&&!Ta.call({1:2},1);Ea.f=Sa?function(e){var t=Aa(this,e);return!!t&&t.enumerable}:Ta;var Ra,Ca,Da=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},ka=_a,La=Function.prototype,wa=La.call,Pa=ka&&La.bind.bind(wa,wa),ja=ka?Pa:function(e){return function(){return wa.apply(e,arguments)}},xa=ja,Ma=xa({}.toString),Fa=xa("".slice),Va=function(e){return Fa(Ma(e),8,-1)},Ua=ha,Ba=Va,Wa=Object,Ha=ja("".split),qa=Ua((function(){return!Wa("z").propertyIsEnumerable(0)}))?function(e){return"String"==Ba(e)?Ha(e,""):Wa(e)}:Wa,Ga=function(e){return null==e},$a=Ga,Xa=TypeError,Ya=function(e){if($a(e))throw Xa("Can't call method on "+e);return e},Ka=qa,za=Ya,Za=function(e){return Ka(za(e))},Qa="object"==typeof document&&document.all,Ja={all:Qa,IS_HTMLDDA:void 0===Qa&&void 0!==Qa},er=Ja.all,tr=Ja.IS_HTMLDDA?function(e){return"function"==typeof e||e===er}:function(e){return"function"==typeof e},ar=tr,rr=Ja.all,nr=Ja.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:ar(e)||e===rr}:function(e){return"object"==typeof e?null!==e:ar(e)},ir=ba,or=tr,sr=function(e){return or(e)?e:void 0},dr=function(e,t){return arguments.length<2?sr(ir[e]):ir[e]&&ir[e][t]},lr=ja({}.isPrototypeOf),cr=ba,ur=dr("navigator","userAgent")||"",mr=cr.process,pr=cr.Deno,gr=mr&&mr.versions||pr&&pr.version,yr=gr&&gr.v8;yr&&(Ca=(Ra=yr.split("."))[0]>0&&Ra[0]<4?1:+(Ra[0]+Ra[1])),!Ca&&ur&&(!(Ra=ur.match(/Edge\/(\d+)/))||Ra[1]>=74)&&(Ra=ur.match(/Chrome\/(\d+)/))&&(Ca=+Ra[1]);var br=Ca,fr=ha,hr=!!Object.getOwnPropertySymbols&&!fr((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&br&&br<41})),vr=hr&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_r=dr,Nr=tr,Or=lr,Ir=Object,Er=vr?function(e){return"symbol"==typeof e}:function(e){var t=_r("Symbol");return Nr(t)&&Or(t.prototype,Ir(e))},Tr=String,Ar=tr,Sr=function(e){try{return Tr(e)}catch(e){return"Object"}},Rr=TypeError,Cr=function(e){if(Ar(e))return e;throw Rr(Sr(e)+" is not a function")},Dr=Ga,kr=Ia,Lr=tr,wr=nr,Pr=TypeError,jr={},xr={get exports(){return jr},set exports(e){jr=e}},Mr=ba,Fr=Object.defineProperty,Vr=function(e,t){try{Fr(Mr,e,{value:t,configurable:!0,writable:!0})}catch(a){Mr[e]=t}return t},Ur=Vr,Br="__core-js_shared__",Wr=ba[Br]||Ur(Br,{}),Hr=Wr;(xr.exports=function(e,t){return Hr[e]||(Hr[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.26.1",mode:"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"});var qr=Ya,Gr=Object,$r=function(e){return Gr(qr(e))},Xr=ja({}.hasOwnProperty),Yr=Object.hasOwn||function(e,t){return Xr($r(e),t)},Kr=ja,zr=0,Zr=Math.random(),Qr=Kr(1..toString),Jr=function(e){return"Symbol("+(void 0===e?"":e)+")_"+Qr(++zr+Zr,36)},en=ba,tn=Yr,an=Jr,rn=hr,nn=vr,on=jr("wks"),sn=en.Symbol,dn=sn&&sn.for,ln=nn?sn:sn&&sn.withoutSetter||an,cn=function(e){if(!tn(on,e)||!rn&&"string"!=typeof on[e]){var t="Symbol."+e;rn&&tn(sn,e)?on[e]=sn[e]:on[e]=nn&&dn?dn(t):ln(t)}return on[e]},un=Ia,mn=nr,pn=Er,gn=function(e,t){var a=e[t];return Dr(a)?void 0:Cr(a)},yn=function(e,t){var a,r;if("string"===t&&Lr(a=e.toString)&&!wr(r=kr(a,e)))return r;if(Lr(a=e.valueOf)&&!wr(r=kr(a,e)))return r;if("string"!==t&&Lr(a=e.toString)&&!wr(r=kr(a,e)))return r;throw Pr("Can't convert object to primitive value")},bn=TypeError,fn=cn("toPrimitive"),hn=function(e,t){if(!mn(e)||pn(e))return e;var a,r=gn(e,fn);if(r){if(void 0===t&&(t="default"),a=un(r,e,t),!mn(a)||pn(a))return a;throw bn("Can't convert object to primitive value")}return void 0===t&&(t="number"),yn(e,t)},vn=Er,_n=function(e){var t=hn(e,"string");return vn(t)?t:t+""},Nn=nr,On=ba.document,In=Nn(On)&&Nn(On.createElement),En=function(e){return In?On.createElement(e):{}},Tn=!va&&!ha((function(){return 7!=Object.defineProperty(En("div"),"a",{get:function(){return 7}}).a})),An=va,Sn=Ia,Rn=Ea,Cn=Da,Dn=Za,kn=_n,Ln=Yr,wn=Tn,Pn=Object.getOwnPropertyDescriptor;fa.f=An?Pn:function(e,t){if(e=Dn(e),t=kn(t),wn)try{return Pn(e,t)}catch(e){}if(Ln(e,t))return Cn(!Sn(Rn.f,e,t),e[t])};var jn={},xn=va&&ha((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Mn=nr,Fn=String,Vn=TypeError,Un=function(e){if(Mn(e))return e;throw Vn(Fn(e)+" is not an object")},Bn=va,Wn=Tn,Hn=xn,qn=Un,Gn=_n,$n=TypeError,Xn=Object.defineProperty,Yn=Object.getOwnPropertyDescriptor,Kn="enumerable",zn="configurable",Zn="writable";jn.f=Bn?Hn?function(e,t,a){if(qn(e),t=Gn(t),qn(a),"function"==typeof e&&"prototype"===t&&"value"in a&&Zn in a&&!a[Zn]){var r=Yn(e,t);r&&r[Zn]&&(e[t]=a.value,a={configurable:zn in a?a[zn]:r[zn],enumerable:Kn in a?a[Kn]:r[Kn],writable:!1})}return Xn(e,t,a)}:Xn:function(e,t,a){if(qn(e),t=Gn(t),qn(a),Wn)try{return Xn(e,t,a)}catch(e){}if("get"in a||"set"in a)throw $n("Accessors not supported");return"value"in a&&(e[t]=a.value),e};var Qn=jn,Jn=Da,ei=va?function(e,t,a){return Qn.f(e,t,Jn(1,a))}:function(e,t,a){return e[t]=a,e},ti={},ai={get exports(){return ti},set exports(e){ti=e}},ri=va,ni=Yr,ii=Function.prototype,oi=ri&&Object.getOwnPropertyDescriptor,si=ni(ii,"name"),di={EXISTS:si,PROPER:si&&"something"===function(){}.name,CONFIGURABLE:si&&(!ri||ri&&oi(ii,"name").configurable)},li=tr,ci=Wr,ui=ja(Function.toString);li(ci.inspectSource)||(ci.inspectSource=function(e){return ui(e)});var mi,pi,gi,yi=ci.inspectSource,bi=tr,fi=ba.WeakMap,hi=bi(fi)&&/native code/.test(String(fi)),vi=Jr,_i=jr("keys"),Ni={},Oi=hi,Ii=ba,Ei=nr,Ti=ei,Ai=Yr,Si=Wr,Ri=function(e){return _i[e]||(_i[e]=vi(e))},Ci=Ni,Di="Object already initialized",ki=Ii.TypeError,Li=Ii.WeakMap;if(Oi||Si.state){var wi=Si.state||(Si.state=new Li);wi.get=wi.get,wi.has=wi.has,wi.set=wi.set,mi=function(e,t){if(wi.has(e))throw ki(Di);return t.facade=e,wi.set(e,t),t},pi=function(e){return wi.get(e)||{}},gi=function(e){return wi.has(e)}}else{var Pi=Ri("state");Ci[Pi]=!0,mi=function(e,t){if(Ai(e,Pi))throw ki(Di);return t.facade=e,Ti(e,Pi,t),t},pi=function(e){return Ai(e,Pi)?e[Pi]:{}},gi=function(e){return Ai(e,Pi)}}var ji={set:mi,get:pi,has:gi,enforce:function(e){return gi(e)?pi(e):mi(e,{})},getterFor:function(e){return function(t){var a;if(!Ei(t)||(a=pi(t)).type!==e)throw ki("Incompatible receiver, "+e+" required");return a}}},xi=ha,Mi=tr,Fi=Yr,Vi=va,Ui=di.CONFIGURABLE,Bi=yi,Wi=ji.enforce,Hi=ji.get,qi=Object.defineProperty,Gi=Vi&&!xi((function(){return 8!==qi((function(){}),"length",{value:8}).length})),$i=String(String).split("String"),Xi=ai.exports=function(e,t,a){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),a&&a.getter&&(t="get "+t),a&&a.setter&&(t="set "+t),(!Fi(e,"name")||Ui&&e.name!==t)&&(Vi?qi(e,"name",{value:t,configurable:!0}):e.name=t),Gi&&a&&Fi(a,"arity")&&e.length!==a.arity&&qi(e,"length",{value:a.arity});try{a&&Fi(a,"constructor")&&a.constructor?Vi&&qi(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=Wi(e);return Fi(r,"source")||(r.source=$i.join("string"==typeof t?t:"")),e};Function.prototype.toString=Xi((function(){return Mi(this)&&Hi(this).source||Bi(this)}),"toString");var Yi=tr,Ki=jn,zi=ti,Zi=Vr,Qi={},Ji=Math.ceil,eo=Math.floor,to=Math.trunc||function(e){var t=+e;return(t>0?eo:Ji)(t)},ao=to,ro=function(e){var t=+e;return t!=t||0===t?0:ao(t)},no=ro,io=Math.max,oo=Math.min,so=ro,lo=Math.min,co=function(e){return e>0?lo(so(e),9007199254740991):0},uo=Za,mo=function(e,t){var a=no(e);return a<0?io(a+t,0):oo(a,t)},po=function(e){return co(e.length)},go=function(e){return function(t,a,r){var n,i=uo(t),o=po(i),s=mo(r,o);if(e&&a!=a){for(;o>s;)if((n=i[s++])!=n)return!0}else for(;o>s;s++)if((e||s in i)&&i[s]===a)return e||s||0;return!e&&-1}},yo={includes:go(!0),indexOf:go(!1)},bo=Yr,fo=Za,ho=yo.indexOf,vo=Ni,_o=ja([].push),No=function(e,t){var a,r=fo(e),n=0,i=[];for(a in r)!bo(vo,a)&&bo(r,a)&&_o(i,a);for(;t.length>n;)bo(r,a=t[n++])&&(~ho(i,a)||_o(i,a));return i},Oo=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"].concat("length","prototype");Qi.f=Object.getOwnPropertyNames||function(e){return No(e,Oo)};var Io={};Io.f=Object.getOwnPropertySymbols;var Eo=dr,To=Qi,Ao=Io,So=Un,Ro=ja([].concat),Co=Eo("Reflect","ownKeys")||function(e){var t=To.f(So(e)),a=Ao.f;return a?Ro(t,a(e)):t},Do=Yr,ko=Co,Lo=fa,wo=jn,Po=ha,jo=tr,xo=/#|\.prototype\./,Mo=function(e,t){var a=Vo[Fo(e)];return a==Bo||a!=Uo&&(jo(t)?Po(t):!!t)},Fo=Mo.normalize=function(e){return String(e).replace(xo,".").toLowerCase()},Vo=Mo.data={},Uo=Mo.NATIVE="N",Bo=Mo.POLYFILL="P",Wo=Mo,Ho=ba,qo=fa.f,Go=ei,$o=function(e,t,a,r){r||(r={});var n=r.enumerable,i=void 0!==r.name?r.name:t;if(Yi(a)&&zi(a,i,r),r.global)n?e[t]=a:Zi(t,a);else{try{r.unsafe?e[t]&&(n=!0):delete e[t]}catch(e){}n?e[t]=a:Ki.f(e,t,{value:a,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return e},Xo=Vr,Yo=function(e,t,a){for(var r=ko(t),n=wo.f,i=Lo.f,o=0;o<r.length;o++){var s=r[o];Do(e,s)||a&&Do(a,s)||n(e,s,i(t,s))}},Ko=Wo,zo=function(e,t){var a,r,n,i,o,s=e.target,d=e.global,l=e.stat;if(a=d?Ho:l?Ho[s]||Xo(s,{}):(Ho[s]||{}).prototype)for(r in t){if(i=t[r],n=e.dontCallGetSet?(o=qo(a,r))&&o.value:a[r],!Ko(d?r:s+(l?".":"#")+r,e.forced)&&void 0!==n){if(typeof i==typeof n)continue;Yo(i,n)}(e.sham||n&&n.sham)&&Go(i,"sham",!0),$o(a,r,i,e)}},Zo={};Zo[cn("toStringTag")]="z";var Qo="[object z]"===String(Zo),Jo=tr,es=Va,ts=cn("toStringTag"),as=Object,rs="Arguments"==es(function(){return arguments}()),ns=Qo?es:function(e){var t,a,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(a=function(e,t){try{return e[t]}catch(e){}}(t=as(e),ts))?a:rs?es(t):"Object"==(r=es(t))&&Jo(t.callee)?"Arguments":r},is=String,os="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff",ss=Ya,ds=function(e){if("Symbol"===ns(e))throw TypeError("Cannot convert a Symbol value to a string");return is(e)},ls=os,cs=ja("".replace),us="["+ls+"]",ms=RegExp("^"+us+us+"*"),ps=RegExp(us+us+"*$"),gs=function(e){return function(t){var a=ds(ss(t));return 1&e&&(a=cs(a,ms,"")),2&e&&(a=cs(a,ps,"")),a}},ys={start:gs(1),end:gs(2),trim:gs(3)},bs=di.PROPER,fs=ha,hs=os,vs=ys.start,_s=function(e){return fs((function(){return!!hs[e]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[e]()||bs&&hs[e].name!==e}))}("trimStart")?function(){return vs(this)}:"".trimStart;zo({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==_s},{trimLeft:_s});zo({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==_s},{trimStart:_s});var Ns=ba,Os=ja,Is=function(e,t){return Os(Ns[e].prototype[t])}("String","trimLeft");ga.exports=Is;const Es=(e,t,a,r)=>{var n,i,o,s;if(r&&(null===(i=null===(n=e[a])||void 0===n?void 0:n[t])||void 0===i?void 0:i.formatter))return null;const d=null===(s=null===(o=e[a])||void 0===o?void 0:o[t])||void 0===s?void 0:s.maxlength;return d||30};function Ts(e,t,a){if(!a||!t[a])return e;const r={};return Object.entries(e).forEach((([e,n])=>{const i=t[a][e];if(i){const t=Array.isArray(n)?[...n]:[n],a=Array.isArray(i)?[...i]:[i];r[e]=[...a],t.forEach((t=>{const n=t.modes;let i=!1;a.every((e=>(i=U(e.modes,n),!i))),i||r[e].unshift(t)}))}else r[e]=n})),Object.entries(t[a]).forEach((([e,t])=>{r[e]||(r[e]=t)})),r}const As=e=>!(null!=e),Ss=e=>!!(As(e)||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&/^[\s]*$/.test(e)),Rs=e=>"string"==typeof e||e instanceof String,Cs=e=>Rs(e)&&!Ss(e),Ds="?\\-\\+_=!@#$%^&*(){}~<>\\[\\]\\/\\\\",ks=(e,t="g")=>new RegExp(`[${e}]`,t),Ls={digitsHyphen:/^[\d-]+$/,noHtml:/^[^<>&]+$/,alphaNum:/^\d[a-zA-Z0-9]{6,11}$/,noSpecialChars:(ws=Ds,Ps=!0,new RegExp(`^[${Ps?"^":""}${ws}]+$`))};var ws,Ps;const js=(e,t)=>!!Ss(e)||e.length===t,xs=e=>e.trimStart().replace(/\s+/g," ");function Ms({heading:e,description:t,headingComponent:a,descriptionComponent:r,classNames:n}){const i=e?C("h2",Object.assign({className:"adyen-kyc-form-header__heading"},{children:e})):a,o=t?C("div",Object.assign({className:"adyen-kyc-form-header__description"},{children:t})):r;return i||o?C("div",Object.assign({className:`adyen-kyc-form-header ${n}`},{children:[i,o]})):null}const Fs=e=>({formatter:t=>t.replace(ks("^\\d","g"),"").substr(0,e),format:new Array(e).fill("9").join(""),maxlength:e}),Vs=ks(Ds),Us=ks(Ds.replace("-","")),Bs={postalCode:{formatter:(e,t)=>{var a;const r=t.state.data.country,n=null===(a=Ws[r])||void 0===a?void 0:a.postalCode.formatter;return n?n(e):e}},street:{formatter:e=>xs(e).replace(Us,"")},houseNumberOrName:{formatter:e=>xs(e).replace(Us,"")},city:{formatter:e=>xs(e).replace(Vs,"")}},Ws={AT:{postalCode:Fs(4)},AU:{postalCode:Fs(4)},BE:{postalCode:Fs(4)},BG:{postalCode:Fs(4)},BR:{postalCode:Fs(8)},CA:{postalCode:{format:"A9A 9A9 or A9A9A9",maxlength:7}},CH:{postalCode:Fs(4)},CY:{postalCode:Fs(4)},CZ:{postalCode:{format:"999 99",maxlength:6}},DE:{postalCode:Fs(5)},DK:{postalCode:{format:"9999",maxlength:7}},EE:{postalCode:Fs(5)},ES:{postalCode:Fs(5)},FI:{postalCode:Fs(5)},FR:{postalCode:Fs(5)},GB:{postalCode:{formatter:e=>e.replace(ks(Ds),"").substr(0,8),format:"AA99 9AA or A99 9AA or A9 9AA",maxlength:8}},GR:{postalCode:{format:"999 99",maxlength:6}},HR:{postalCode:{format:"[1-5]9999",maxlength:5}},HU:{postalCode:Fs(4)},IE:{postalCode:{format:"A99 A999",maxlength:8}},IS:{postalCode:Fs(3)},IT:{postalCode:Fs(5)},LI:{postalCode:Fs(4)},LT:{postalCode:{format:"9999 or 99999 or LT-99999",maxlength:8}},LU:{postalCode:Fs(4)},LV:{postalCode:{format:"9999 or LV-9999",maxlength:7}},MC:{postalCode:{format:"980NN",maxlength:5}},MT:{postalCode:{format:"AA99 or AAA99 or AA9999 or AAA9999",maxlength:8}},MY:{postalCode:Fs(5)},NL:{postalCode:{format:"9999AA",maxlength:7}},NZ:{postalCode:Fs(4)},NO:{postalCode:Fs(4)},PL:{postalCode:{formatter:e=>{const t=e.replace(ks("^\\d-","g"),""),a=t.indexOf("-")>-1?6:5;return t.substr(0,a)},format:"99-999",maxlength:6}},PT:{postalCode:{formatter:e=>e.replace(ks("^\\d-","g"),"").substr(0,8),format:"9999-999",maxlength:8}},RO:{postalCode:Fs(6)},SI:{postalCode:{format:"9999 or SI-9999",maxlength:7}},SE:{postalCode:Fs(5)},SG:{postalCode:Fs(6)},SK:{postalCode:{format:"99999 or SK-99999",maxlength:8}},JP:{postalCode:{format:"999-9999",maxlength:8}},US:{postalCode:{formatter:e=>{const t=e.replace(ks("^\\d-","g"),""),a=t.indexOf("-")>-1?10:5;return t.substr(0,a)},format:"99999 or 99999-9999"}}},Hs=e=>({pattern:new RegExp(`\\d{${e}}`)}),qs={AT:Hs(4),AU:Hs(4),BE:{pattern:/(?:(?:[1-9])(?:\d{3}))/},BG:Hs(4),BR:Hs(8),CA:{pattern:/(?:[ABCEGHJ-NPRSTVXY]\d[A-Z][ -]?\d[A-Z]\d)/},CH:{pattern:/[1-9]\d{3}/},CY:Hs(4),CZ:{pattern:/\d{3}\s?\d{2}/},DE:Hs(5),DK:{pattern:/^(DK-)?[0-9]{4}$/},EE:Hs(5),ES:{pattern:/(?:0[1-9]|[1-4]\d|5[0-2])\d{3}/},FI:Hs(5),FR:Hs(5),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})$/},GE:Hs(4),GR:{pattern:/^\d{3}\s{0,1}\d{2}$/},HR:{pattern:/^([1-5])[0-9]{4}$/},HU:Hs(4),IE:{pattern:/(?:^[AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}/},IS:Hs(3),IT:Hs(5),LI:Hs(4),LT:{pattern:/^(LT-)?[0-9]{4,5}$/},LU:Hs(4),LV:{pattern:/^(LV-)?[0-9]{4}$/},MC:{pattern:/^980\d{2}$/},MT:{pattern:/^[A-Za-z]{2,3}[ ]?\d{2}(?:\d{2})?$/},MY:Hs(5),NZ:Hs(4),NL:{pattern:/(?:NL-)?(?:[1-9]\d{3} ?(?:[A-EGHJ-NPRTVWXZ][A-EGHJ-NPRSTVWXZ]|S[BCEGHJ-NPRTVWXZ]))/},NO:Hs(4),PL:{pattern:/^\d{2}[-]\d{3}$/},PT:{pattern:/^([1-9]\d{3})([- ]?(\d{3})? *)$/},RO:Hs(6),SI:{pattern:/^(SI-)?[0-9]{4}$/},SE:Hs(5),SG:Hs(6),SK:{pattern:/^(SK-)?[0-9]{5}$/},JP:{pattern:/^\d{3}[-]\d{4}$/},US:{pattern:/^(\d{5})([-]?(\d{4})? *)$/}},Gs=["US","GB"],$s={street:{modes:["blur"],validate:e=>Cs(e),errorMessage:"fieldIsRequired"},houseNumberOrName:{modes:["blur"],validate:(e,t)=>{const a=t.state.data.country;return!(!a||!Gs.includes(a))||Cs(e)},errorMessage:"fieldIsRequired"},postalCode:{modes:["blur"],validate:(e,t)=>{var a,r;const n=t.state.data.country;if(n){$s.postalCode.errorMessage={translationKey:"invalidFormatExpects",translationObject:{values:{format:(null===(a=Ws[n])||void 0===a?void 0:a.postalCode.format)||null}}};const t=null===(r=qs[n])||void 0===r?void 0:r.pattern;return t?t.test(e):!!e}return!!e},errorMessage:"fieldIsRequired"},city:{modes:["blur"],validate:Cs,errorMessage:"fieldIsRequired"},stateOrProvince:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},country:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},Xs=t.createContext(null);function Ys({stateRef:e}){return e.current.setState?null:C(Xs.Consumer,{children:({dispatch:t,setActiveForms:a})=>(e.current.setState=dt(t,200),e.current.setActiveForms=a,null)})}var Ks;!function(e){e[e.BASIC=0]="BASIC",e[e.INFO=1]="INFO",e[e.ERROR=2]="ERROR",e[e.WARNING=3]="WARNING",e[e.SUCCESS=4]="SUCCESS"}(Ks||(Ks={}));const zs=({className:e,title:t,type:r=Ks.BASIC,children:n,hasCloseButton:i=!0})=>{const{i18n:o}=We(),[s,d]=se(!1);if(s)return null;const l=a("adl-alert",e,{"adl-alert--basic":r===Ks.BASIC,"adl-alert--information":r===Ks.INFO,"adl-alert--error":r===Ks.ERROR,"adl-alert--warning":r===Ks.WARNING,"adl-alert--success":r===Ks.SUCCESS});return C("div",Object.assign({className:l,role:"alert"},{children:[C("div",Object.assign({className:"adl-alert__header"},{children:[C("span",Object.assign({className:"adl-alert__icon"},{children:C(Zs,{type:r})})),t&&C("span",Object.assign({className:a("adl-alert__title",{"adl-alert__title--no-content":!n})},{children:t})),i&&C("button",Object.assign({className:"adl-alert__dismiss",onClick:()=>d(!0),"aria-label":o.get("close")},{children:C(xe,{name:"cross",className:"adl-alert__dismiss__icon"})}))]})),n]}))},Zs=({type:e})=>{switch(e){case Ks.SUCCESS:return C(xe,{name:"check"});case Ks.ERROR:return C(xe,{name:"warning"});case Ks.WARNING:return C(xe,{name:"field-error"});case Ks.INFO:case Ks.BASIC:default:return C(xe,{name:"info-circle",className:"adl-alert__icon__info"})}},Qs=t.createContext(null);const Js=(e,t)=>t?"adl-link__icon adyen-kyc-icon-external-link":e?"adl-link__icon":null,ed=({className:e,children:t,href:r,external:n,icon:i,underline:o,inheritStyles:s,showAsButton:d,iconLeft:l=!1,onClick:c})=>{if(!(e=>"#"!==e||(console.error('Links must include a valid href. If your href is "#", consider using a Button instead'),!1))(r))return null;const u=n?"_blank":"_self",m=n?"external noopener noreferrer ":null,p=i||n,g=d?a("adl-button",e,{"adl-button--icon":p&&!l,"adl-button--icon-left":p&&l}):a("adl-link",e,{"adl-link--with-icon":p,"adl-link--underline":o,"adl-link--inherit":s,"adl-link--icon-left":l});return C("a",Object.assign({href:r,className:g,target:u,rel:m,onClick:c},{children:[C("span",Object.assign({className:"adl-link__text"},{children:t})),p&&C(xe,{name:i,className:Js(i,n)})]}))},td=({fieldName:e,label:t})=>{const{goToFormByFieldName:a}=function(){const e=ge(Qs);if(void 0===e)throw new Error("useFormRouterContext must be used within a FormRouterProvider");return e}();return C(ed,Object.assign({onClick:t=>{t.preventDefault(),a(e)},href:"to-field-link"},{children:t}))},ad=({validationErrors:e,formUtils:t})=>{const a=Object.keys(e);return C(zs,Object.assign({title:t.getVal("informationCouldNotBeSubmitted"),type:Ks.ERROR,hasCloseButton:!1},{children:C("div",Object.assign({className:"adl-alert__explanation adyen-kyc-error-panel__validation-errors"},{children:1===(null==a?void 0:a.length)?C("div",Object.assign({"data-testid":"validation-error--case-1"},{children:[t.getVal({translationKey:"fieldHasUnsupportedFormats",translationObject:{values:{fieldName:t.getLabel(a[0])}}}).toString()," ",C(td,{fieldName:a[0],label:t.getVal("updateTheInformation")})," ",t.getVal("andResubmit")]})):C("div",Object.assign({"data-testid":"validation-error--case-2"},{children:[t.getVal("someFieldsHaveUnsupportedFormatedUpdateInfoAndResubmit"),C("ul",{children:a.map((e=>C("li",Object.assign({className:"adyen-kyc-error-panel__validation-error"},{children:C(td,{fieldName:e,label:t.getLabel(e)})}),e)))})]}))}))}))};var rd;!function(e){e.DATA_MISSING="dataMissing",e.INVALID_INPUT="invalidInput",e.PENDING_STATUS="pendingStatus"}(rd||(rd={}));const nd={"1_100":[],"1_101":[],"1_102":[{key:"documents"}],"1_300":[{key:"individual.birthData.dateOfBirth"},{key:"individual.identificationData.number"},{key:"individual.name.firstName"},{key:"individual.name.lastName"},{key:"individual.residentialAddress"}],"1_301":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_302":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_303":[{key:"documents",type:["passport","driversLicense","identityCard"]}],"1_304":[{key:"documents",type:["proofOfResidency"]}],"1_305":[{key:"documents",type:["proofOfResidency"]}],"1_306":[{key:"documents",type:["proofOfResidency"]}],"1_307":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_308":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_309":[{key:"documents",type:["proofOfNationalIdNumber"]}],"1_313":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_314":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_315":[{key:"documents",type:["proofOfIndividualTaxId"]}],"1_316":[{key:"individual.identificationData.number"}],"1_500":[{key:"organization.legalName"},{key:"organization.registrationNumber"},{key:"organization.taxId"},{key:"organization.registeredAddress"}],"1_501":[{key:"documents",type:["registrationDocument"]}],"1_502":[{key:"documents",type:["registrationDocument"]}],"1_503":[{key:"documents",type:["taxDocument"]}],"1_504":[{key:"documents",type:["taxDocument"]}],"1_505":[{key:"documents",type:["proofOfAddress"]}],"1_506":[{key:"documents",type:["proofOfAddress"]}],"1_507":[],"1_508":[],"1_512":[{key:"documents",type:["taxDocument"]}],"1_513":[{key:"documents",type:["taxDocument"]}],"1_600":[{key:"soleProprietorship.name"},{key:"soleProprietorship.registeredAddress"}],"1_601":[{key:"documents",type:["solePropConstitutionalDocument"]}],"1_602":[{key:"documents",type:["solePropConstitutionalDocument"]}],"1_700":[{key:"bankAccount"}],"1_701":[{key:"bankAccount"}],"1_702":[{key:"bankAccount"}],"1_703":[{key:"documents",type:["bankStatementDocument"]}],"1_704":[{key:"documents",type:["bankStatementDocument"]}],"1_705":[{key:"documents",type:["bankStatementDocument"]}]};var id,od;!function(e){e.INDIVIDUAL="individual",e.ORGANIZATION="organization",e.TRUST="trust",e.SOLE_PROPRIETORSHIP="soleProprietorship"}(id||(id={})),function(e){e.BANK_ACCOUNT="bankAccount",e.RECURRING_DETAIL="recurringDetail"}(od||(od={}));const sd={INDIVIDUAL:["personalDetails.firstName","personalDetails.lastName","personalDetails.residencyCountry"],DECISIONMAKER:["personalDetails.firstName","personalDetails.lastName","personalDetails.residencyCountry","personalDetails.role","personalDetails.jobTitle"],ORGANIZATION:["companyNameAndCountry.legalCompanyName","companyNameAndCountry.companyCountry"],SOLE_PROPRIETORSHIP:["solePropNameAndCountry.legalCompanyName","solePropNameAndCountry.companyCountry"]},dd={"personalDetails.firstName":"individual.name.firstName","personalDetails.lastName":"individual.name.lastName","personalDetails.birthDate":"individual.birthData.dateOfBirth","personalDetails.idNumber":"individual.identificationData.number","personalDetails.phoneNumber":"individual.phone.number","personalDetails.email":"individual.email","personalDetails.idNumberExempt":"individual.identificationData.nationalIdExempt","personalDetails.typeOfIdentity":"individual.identificationData.type","personalDetails.issuerState":"individual.identificationData.issuerState","personalDetails.licenseCardNumber":"individual.identificationData.cardNumber","address.city":"individual.residentialAddress.city","address.country":"individual.residentialAddress.country","address.postalCode":"individual.residentialAddress.postalCode","address.stateOrProvince":"individual.residentialAddress.stateOrProvince","address.street":"individual.residentialAddress.street","address.houseNumberOrName":"individual.residentialAddress.street2"},ld=Object.assign(Object.assign({},dd),{"personalDetails.residencyCountry":"individual.residentialAddress.country"}),cd=Object.assign({},H(dd)),ud={"payoutAccountDetails.transferInstrumentId":"id","payoutAccountDetails.accountType":"bankAccount.accountType","payoutAccountDetails.bankAccountNumber":"bankAccount.accountNumber","payoutAccountDetails.bankBicSwift":"bankAccount.bankBicSwift","payoutAccountDetails.bankCity":"bankAccount.bankCity","payoutAccountDetails.bankCode":"bankAccount.bankCode","payoutAccountDetails.bankName":"bankAccount.bankName","payoutAccountDetails.branchCode":"bankAccount.branchCode","payoutAccountDetails.checkCode":"bankAccount.checkCode","payoutAccountDetails.bankCountry":"bankAccount.countryCode","payoutAccountDetails.currency":"bankAccount.currencyCode","payoutAccountDetails.iban":"bankAccount.iban"},md={"companyNameAndCountry.legalCompanyName":"organization.legalName","companyType.entityType":"organization.type","companyDetails.tradingName":"organization.doingBusinessAs","companyDetails.registrationNumber":"organization.registrationNumber","companyDetails.vatNumber":"organization.vatNumber","companyDetails.exemptedFromVat":"organization.vatAbsenceReason","companyDetails.vatAbsenceReason":"organization.vatAbsenceReason","companyDetails.taxInformation":"organization.taxInformation","companyDetails.stockExchangeMIC":"organization.stockData.marketIdentifier","companyDetails.stockISIN":"organization.stockData.stockNumber","companyRegistrationDetails.registrationAddress.city":"organization.registeredAddress.city","companyRegistrationDetails.registrationAddress.country":"organization.registeredAddress.country","companyRegistrationDetails.registrationAddress.postalCode":"organization.registeredAddress.postalCode","companyRegistrationDetails.registrationAddress.stateOrProvince":"organization.registeredAddress.stateOrProvince","companyRegistrationDetails.registrationAddress.street":"organization.registeredAddress.street","companyRegistrationDetails.registrationAddress.houseNumberOrName":"organization.registeredAddress.street2","companyRegistrationDetails.operationalAddress.city":"organization.principalPlaceOfBusiness.city","companyRegistrationDetails.operationalAddress.country":"organization.principalPlaceOfBusiness.country","companyRegistrationDetails.operationalAddress.postalCode":"organization.principalPlaceOfBusiness.postalCode","companyRegistrationDetails.operationalAddress.stateOrProvince":"organization.principalPlaceOfBusiness.stateOrProvince","companyRegistrationDetails.operationalAddress.street":"organization.principalPlaceOfBusiness.street","companyRegistrationDetails.operationalAddress.houseNumberOrName":"organization.principalPlaceOfBusiness.street2"},pd={"trustRegistrationDetails.trustType":"trust.type","trustRegistrationDetails.vatNumber":"trust.vatNumber","trustRegistrationDetails.legalName":"trust.name","trustRegistrationDetails.country":"trust.countryOfGoverningLaw","trustRegistrationAddress.registrationAddress.city":"trust.registeredAddress.city","trustRegistrationAddress.registrationAddress.country":"trust.registeredAddress.country","trustRegistrationAddress.registrationAddress.postalCode":"trust.registeredAddress.postalCode","trustRegistrationAddress.registrationAddress.stateOrProvince":"trust.registeredAddress.stateOrProvince","trustRegistrationAddress.registrationAddress.street":"trust.registeredAddress.street","trustRegistrationAddress.registrationAddress.houseNumberOrName":"trust.registeredAddress.street2","trustRegistrationAddress.operationalAddress.city":"trust.principalPlaceOfBusiness.city","trustRegistrationAddress.operationalAddress.country":"trust.principalPlaceOfBusiness.country","trustRegistrationAddress.operationalAddress.postalCode":"trust.principalPlaceOfBusiness.postalCode","trustRegistrationAddress.operationalAddress.stateOrProvince":"trust.principalPlaceOfBusiness.stateOrProvince","trustRegistrationAddress.operationalAddress.street":"trust.principalPlaceOfBusiness.street","trustRegistrationAddress.operationalAddress.houseNumberOrName":"trust.principalPlaceOfBusiness.street2"},gd={"solePropNameAndCountry.legalCompanyName":"soleProprietorship.name","solePropNameAndCountry.companyCountry":"soleProprietorship.countryOfGoverningLaw","solePropRegistrationDetails.tradingName":"soleProprietorship.doingBusinessAs","solePropRegistrationDetails.vatNumber":"soleProprietorship.vatNumber","solePropRegistrationDetails.registrationNumber":"soleProprietorship.registrationNumber","solePropRegistrationDetails.exemptedFromVat":"soleProprietorship.vatAbsenceReason","solePropRegistrationDetails.vatAbsenceReason":"soleProprietorship.vatAbsenceReason","solePropRegistrationDetails.taxInformation":"soleProprietorship.taxInformation","solePropRegistrationAddress.registrationAddress.city":"soleProprietorship.registeredAddress.city","solePropRegistrationAddress.registrationAddress.country":"soleProprietorship.registeredAddress.country","solePropRegistrationAddress.registrationAddress.postalCode":"soleProprietorship.registeredAddress.postalCode","solePropRegistrationAddress.registrationAddress.stateOrProvince":"soleProprietorship.registeredAddress.stateOrProvince","solePropRegistrationAddress.registrationAddress.street":"soleProprietorship.registeredAddress.street","solePropRegistrationAddress.registrationAddress.houseNumberOrName":"soleProprietorship.registeredAddress.street2","solePropRegistrationAddress.operationalAddress.city":"soleProprietorship.principalPlaceOfBusiness.city","solePropRegistrationAddress.operationalAddress.country":"soleProprietorship.principalPlaceOfBusiness.country","solePropRegistrationAddress.operationalAddress.postalCode":"soleProprietorship.principalPlaceOfBusiness.postalCode","solePropRegistrationAddress.operationalAddress.stateOrProvince":"soleProprietorship.principalPlaceOfBusiness.stateOrProvince","solePropRegistrationAddress.operationalAddress.street":"soleProprietorship.principalPlaceOfBusiness.street","solePropRegistrationAddress.operationalAddress.houseNumberOrName":"soleProprietorship.principalPlaceOfBusiness.street2"},yd=Object.assign({"companyNameAndCountry.companyCountry":"organization.registeredAddress.country"},md),bd=Object.assign({},H(md)),fd=Object.assign({},ud),hd=Object.assign({},H(ud)),vd=Object.assign(Object.assign({},bd),{"organization.registeredAddress":"companyRegistrationDetails.registrationAddress"}),_d=Object.assign(Object.assign({},cd),{"individual.residentialAddress":"address.address"}),Nd=Object.assign({bankAccount:"payoutAccountDetails"},hd),Od=Object.assign({},pd),Id=Object.assign({},H(pd)),Ed=Object.assign({},gd),Td=Object.assign({},H(gd)),Ad={passport:"idDocument.idDocument",driversLicense:"idDocument.idDocument",identityCard:"idDocument.idDocument",proofOfNationalIdNumber:"proofOfNationalId.proofOfNationalId",proofOfResidency:"proofOfResidence.proofOfResidence",proofOfIndividualTaxId:"",registrationDocument:"companyRegistrationDocument.registrationDocument",taxDocument:"companyTaxDocument.taxDocument",proofOfAddress:"",bankStatementDocument:"payoutAccountDocuments.bankStatementDocument",trustDocument:"trustDocument.trustDocument",solePropConstitutionalDocument:"solePropConstitutionalDocument.constitutionalDocument"};var Sd,Rd;function Cd(e,t){var a,r,n,i,o,s,d,l,c,u,m,p,g,y,b,f,h,v,_,N,O,I;if(t){const E={placeholders:{},labels:{},data:{},formVerificationErrors:{},requiredFields:[],optionalFields:[],maskedFields:[],validators:null};return E.placeholders=Object.assign({},null===(a=e.placeholders)||void 0===a?void 0:a[t]),E.labels=Object.assign({},null===(r=e.labels)||void 0===r?void 0:r[t]),E.data=Object.assign({},null===(n=e.data)||void 0===n?void 0:n[t]),(null===(i=e.readOnlyFields)||void 0===i?void 0:i[t])&&(E.readOnlyFields=null===(o=e.readOnlyFields)||void 0===o?void 0:o[t]),(null===(s=e.requiredFields)||void 0===s?void 0:s[t])&&(E.requiredFields=null===(d=e.requiredFields)||void 0===d?void 0:d[t]),(null===(l=e.optionalFields)||void 0===l?void 0:l[t])&&(E.optionalFields=null===(c=e.optionalFields)||void 0===c?void 0:c[t]),(null===(u=e.validators)||void 0===u?void 0:u[t])&&(E.validators=Object.assign({},null===(m=e.validators)||void 0===m?void 0:m[t])),(null===(p=e.verifyFields)||void 0===p?void 0:p[t])&&(E.verifyFields=null===(g=e.verifyFields)||void 0===g?void 0:g[t]),(null===(b=null===(y=e.problems)||void 0===y?void 0:y.verificationErrors)||void 0===b?void 0:b[t])&&(E.formVerificationErrors=null===(h=null===(f=e.problems)||void 0===f?void 0:f.verificationErrors)||void 0===h?void 0:h[t]),(null===(_=null===(v=e.problems)||void 0===v?void 0:v.validationErrors)||void 0===_?void 0:_[t])&&(E.fieldValidationErrors=null===(O=null===(N=e.problems)||void 0===N?void 0:N.validationErrors)||void 0===O?void 0:O[t]),(null===(I=e.maskedFields)||void 0===I?void 0:I[t])&&(E.maskedFields=e.maskedFields[t]),E}return null}function Dd(e,t){if(t){const a={placeholders:{},labels:{},data:{},requiredFields:[],maskedFields:[],optionalFields:[],readOnlyFields:[],verifyFields:[],fieldValidationErrors:{}};return t.forEach((t=>{var r,n,i,o,s,d,l,c,u,m,p;a.placeholders[t]=null===(r=e.placeholders)||void 0===r?void 0:r[t],a.labels[t]=null===(n=e.labels)||void 0===n?void 0:n[t],a.data[t]=null===(i=e.data)||void 0===i?void 0:i[t],(null===(o=e.readOnlyFields)||void 0===o?void 0:o.includes(t))&&a.readOnlyFields.push(t),(null===(s=e.requiredFields)||void 0===s?void 0:s.includes(t))&&a.requiredFields.push(t),(null===(d=e.optionalFields)||void 0===d?void 0:d.includes(t))&&a.optionalFields.push(t),(null===(l=e.verifyFields)||void 0===l?void 0:l.includes(t))&&a.verifyFields.push(t),(null===(c=e.fieldValidationErrors)||void 0===c?void 0:c[t])&&(a.fieldValidationErrors[t]=e.fieldValidationErrors[t]),(null===(u=e.maskedFields)||void 0===u?void 0:u.includes(t))&&a.maskedFields.push(t),(null===(m=e.validators)||void 0===m?void 0:m[t])&&((null==a?void 0:a.validators)||(a.validators={}),a.validators[t]=null===(p=e.validators)||void 0===p?void 0:p[t])})),a}return null}!function(e){e[e.EMPTY=0]="EMPTY",e[e.FINISHED=1]="FINISHED",e[e.PROCESSING=2]="PROCESSING",e[e.DETAILS_REQUIRED=3]="DETAILS_REQUIRED",e[e.DOWNLOAD=4]="DOWNLOAD",e[e.ERROR=5]="ERROR"}(Sd||(Sd={})),function(e){e.TASKS_OVERVIEW="TASKS_OVERVIEW",e.INDIVIDUAL="INDIVIDUAL",e.COMPANY="COMPANY",e.PAYOUT="PAYOUT",e.PAYIN="PAYIN",e.SERVICE_AGREEMENT="SERVICE_AGREEMENT",e.PCI_DSS="PCI_DSS",e.DECISION_MAKER_OVERVIEW="DECISION_MAKER_OVERVIEW",e.TRUST="TRUST",e.TRUST_MEMBER_OVERVIEW="TRUST_MEMBER",e.DECISION_MAKER="DECISION_MAKER",e.TRUST_MEMBER_INDIVIDUAL="TRUST_MEMBER_INDIVIDUAL",e.TRUST_MEMBER_COMPANY="TRUST_MEMBER_COMPANY",e.TRUST_MEMBER_ROLE_AND_TYPE="TRUST_MEMBER_ROLE_AND_TYPE",e.TRUST_MEMBER_COMPANY_OWNER="TRUST_MEMBER_COMPANY_OWNER",e.SOLE_PROPRIETOR_COMPANY="SOLE_PROPRIETOR_COMPANY",e.LEGAL_ENTITY_TYPE_SWITCHER="LEGAL_ENTITY_TYPE_SWITCHER"}(Rd||(Rd={}));const kd={entityType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}};var Ld;!function(e){e.PRIVATE_COMPANY="privateCompany",e.PUBLIC_COMPANY="listedPublicCompany",e.UNLISTED_PUBLIC_COMPANY="unlistedPublicCompany",e.INCORPORATED_PARTNERSHIP="partnershipIncorporated",e.INCORPORATED_ASSOCIATION="associationIncorporated",e.GOVERNMENTAL_ORGANIZATION="governmentalOrganization",e.NON_PROFIT_OR_CHARITABLE="nonProfit",e.SOLE_PROPRIETORSHIP="soleProprietorship"}(Ld||(Ld={}));const wd={entityType:{rule:"REQUIRED"},legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},tradingName:{rule:"REQUIRED"},sameNameAsLegalName:{rule:"REQUIRED"},registrationNumber:{rule:"registrationNumberRules"},registrationAddress:{rule:"REQUIRED"},operationalAddress:{rule:"OPTIONAL"},stockExchangeMIC:{rule:"stockExchangeMICIfTypePublic"},stockISIN:{rule:"stockISINIfTypePublic"},isPartOfTrust:{rule:"partOfTrustFieldsOnlyAU"},accountHolder:{rule:"accountHolderIfCustomer"}},Pd=[{id:Ld.PRIVATE_COMPANY,name:"privateCompanyTitle",description:"privateCompanyDescription"},{id:Ld.PUBLIC_COMPANY,name:"publicCompanyTitle",description:"publicCompanyDescription"},{id:Ld.INCORPORATED_PARTNERSHIP,name:"incorporatedPartnershipTitle",description:"incorporatedPartnershipDescription"},{id:Ld.NON_PROFIT_OR_CHARITABLE,name:"nonProfitOrCharitableOrgTitle",description:"nonProfitOrCharitableOrgDescription"},{id:Ld.GOVERNMENTAL_ORGANIZATION,name:"governmentalOrganizationTitle",description:"governmentalOrganizationDescription"},{id:Ld.INCORPORATED_ASSOCIATION,name:"associationIncorporatedTitle",description:"associationIncorporatedDescription"}],jd={L0:{legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},stateOrProvince:{rule:"REQUIRED"}},L1:Object.assign({},wd),L:Object.assign(Object.assign({},wd),{vatNumber:{rule:"vatRules"},exemptedFromVat:{rule:"vatRules"},vatAbsenceReason:{rule:"vatRules"},taxId:{rule:"taxIdRules"},exemptedFromTax:{rule:"exemptedFromTaxRules"}}),L_REGDOC:{registrationDocument:{rule:"REQUIRED"}},L_TAXDOC:{taxDocument:{rule:"REQUIRED"}},L_PROOFOFADDRESS:{proofOfAddressDocument:{rule:"REQUIRED"}}},xd={AT:{vatNumber:{label:"UST-ID"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"firmenbuchnummer"},exemptedFromRegistrationNumber:{label:"doNotHaveFirmenbuchnummer"}},AU:{legalName:{label:"companyName"},legalEntityType:{label:"companyType"},registrationNumber:{label:"australianBusinessNumberAcn"},taxId:{label:"australianBusinessNumberAbn"},exemptedFromTax:{label:"doNotHaveABN"}},BE:{vatNumber:{label:"euVatNumber"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"enterpriseNumber"}},BG:{registrationNumber:{label:"uniqueIdentificationCode"},vatNumber:{label:"identifikacionenNomerDDS"},exemptedFromVat:{label:"vatNumberExempted"}},BR:{registrationNumber:{label:"CNPJ"}},CA:{tradingName:{label:"doingBusinessAs"},registrationNumber:{label:"businessIncorporationNumber"},exemptedFromRegistrationNumber:{label:"doNotHaveBusinessIncorporationNumber"},taxId:{label:"businessNumber"},exemptedFromTax:{label:"doNotHaveBusinessNumber"}},CH:{registrationNumber:{label:"chRegistrationNumber"},exemptedFromRegistrationNumber:{label:"doNotHaveChRegistrationNumber"},vatNumber:{label:"Mehrwertsteuernummer"},exemptedFromVat:{label:"vatNumberExempted"}},CY:{registrationNumber:{label:"cyRegistrationNumber"},vatNumber:{label:"arithmosEngraphes"},exemptedFromVat:{label:"vatNumberExempted"}},CZ:{vatNumber:{label:"DIC"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"ICO"}},DE:{vatNumber:{label:"USt-IdNr"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"handelsregisternummer"}},DK:{registrationNumber:{label:"CVR-nummer"},vatNumber:{label:"momsregistreringsnummerOrStamregister"},exemptedFromVat:{label:"vatNumberExempted"}},EE:{registrationNumber:{label:"registrikood"},vatNumber:{label:"kaibemaksukohustuslaseNumber"},exemptedFromVat:{label:"vatNumberExempted"}},ES:{vatNumber:{label:"NIFdeIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"NIF"}},FI:{registrationNumber:{label:"YTunnus"},exemptedFromRegistrationNumber:{label:"doNotHaveYTunnus"},vatNumber:{label:"arvonlisaveronumeroMervardesskattenummer"},exemptedFromVat:{label:"vatNumberExempted"}},FR:{vatNumber:{label:"NumeroDeTVA"},registrationNumber:{label:"SIRETOrSIREN"}},GB:{vatNumber:{label:"vatNumber"},registrationNumber:{label:"companyNumber"}},GR:{registrationNumber:{label:"GEMI-number"},vatNumber:{label:"grTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},HK:{legalName:{label:"companyName"},legalEntityType:{label:"typeOfCompany"},tradingName:{label:"businessName"},registrationNumber:{label:"companyNumber"},registrationDocument:{label:"companyRegistrationDocument"},taxId:{label:"businessRegistrationNumber"},exemptedFromTax:{label:"doNotHaveBusinessRegistrationNumber"}},HR:{registrationNumber:{label:"MBS"},vatNumber:{label:"PDVIdBrojOIB"},exemptedFromVat:{label:"vatNumberExempted"}},HU:{registrationNumber:{label:"huRegistrationNumber"},vatNumber:{label:"huTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},IE:{registrationNumber:{label:"companyNumber"},vatNumber:{label:"valueAddedTaxIdentificationNumber"},exemptedFromVat:{label:"vatNumberExempted"}},IT:{vatNumber:{label:"partitaIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"codiceFiscaleOrCCIAA"}},JP:{vatNumber:{label:"taxNumberCorporateNumber"},registrationDocument:{label:"chamberOfCommerceExtract"}},LT:{registrationNumber:{label:"ltRegistrationNumber"},exemptedFromRegistrationNumber:{label:"doNotHaveLtRegistrationNumber"},vatNumber:{label:"PVMmoketojoKodas"},exemptedFromVat:{label:"vatNumberExempted"}},LU:{registrationNumber:{label:"luRegistrationNumber"},exemptedFromRegistrationNumber:{label:"doNotHaveLuRegistrationNumber"},vatNumber:{label:"numeroDIdentificationALATaxe"},exemptedFromVat:{label:"vatNumberExempted"}},LV:{registrationNumber:{label:"lvRegistrationNumber"},vatNumber:{label:"lvTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},MX:{registrationNumber:{label:"RFC"},registrationDocument:{label:"RfcDocument"}},MY:{registrationNumber:{label:"companyNumber"},registrationDocument:{label:"companyProfile"},vatNumber:{label:"SST"}},NL:{vatNumber:{label:"euVatNumber"},registrationNumber:{label:"chamberOfCommerceRegistrationNumber"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"}},NO:{vatNumber:{label:"skattenummer"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"organisasjonsnummer"}},NZ:{legalName:{label:"companyName"},legalEntityType:{label:"entityType"},registrationNumber:{label:"companyNumber"},vatNumber:{label:"irdNumber"},exemptedFromVat:{label:"vatNumberExempted"},taxDocument:{label:"irdDocument"},taxId:{label:"IRD/GST"},exemptedFromTax:{label:"doNotHaveIRD/GST"}},PL:{vatNumber:{label:"NIP"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"regonKrsNumber"}},PT:{vatNumber:{label:"numerodeIVA"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"NIPC"}},RO:{registrationNumber:{label:"numarOrdineRegistrulComertului"},vatNumber:{label:"codulDeIdentificareFiscala"},exemptedFromVat:{label:"vatNumberExempted"}},SE:{vatNumber:{label:"momsregistreringsnummer"},exemptedFromVat:{label:"vatNumberExempted"},vatAbsenceReason:{label:"vatNumberAbsenceReason"},registrationNumber:{label:"organisationsnummer"},exemptedFromRegistrationNumber:{label:"doNotHaveOrganisationsnummer"}},SG:{vatNumber:{label:"taxReferenceNumber"},exemptedFromVat:{label:"vatNumberExempted"},legalName:{label:"companyName"},legalEntityType:{label:"companyType"},taxId:{label:"UEN/GST"},exemptedFromTax:{label:"doNotHaveUEN/GST"}},SI:{registrationNumber:{label:"siRegistrationNumber"},vatNumber:{label:"siTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},SK:{registrationNumber:{label:"skRegistrationNumber"},vatNumber:{label:"skTaxId"},exemptedFromVat:{label:"vatNumberExempted"}},US:{tradingName:{label:"doingBusinessAs"},taxId:{label:"employerIdentificationNumber"},exemptedFromTax:{label:"doNotHaveEIN"}}};var Md;!function(e){e.IS_PART_OF_TRUST="isPartOfTrustAnswerYes",e.IS_NOT_PART_OF_TRUST="isPartOfTrustAnswerNo"}(Md||(Md={}));const Fd=[{id:Md.IS_NOT_PART_OF_TRUST,name:"no"},{id:Md.IS_PART_OF_TRUST,name:"yes"}],Vd={isPartOfTrust:Md.IS_NOT_PART_OF_TRUST},Ud=["isPartOfTrust"];function Bd(e){var t,a,r;const{i18n:n,commonProps:i}=We(),{dataStoreId:o,validators:s,isReadOnlyOnDefaultDataYes:d=!1}=e,l=ue({setState:null}),{handleChangeFor:c,data:u,valid:m,errors:p,isValid:g,fieldProblems:y,triggerValidation:b}=ua(Object.assign(Object.assign({},e),{schema:Ud,rules:s,defaultData:(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.isPartOfTrust)?e.data:Vd,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{l.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:y,caller:"partOfTrust",dataStoreId:o}})}),[u,m,p,g]);const f=ra(e,n);this.triggerValidation=b;const h=n.get((null==e?void 0:e.legalEntityType)===id.INDIVIDUAL?"areYouPartOfTrust":"isBusinessPartOfTrust"),v=d&&(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.isPartOfTrust)===Md.IS_PART_OF_TRUST;return le((()=>{b()}),[]),C("div",Object.assign({className:"adyen-kyc-part-of-trust"},{children:[C(Ys,{stateRef:l}),C(Ue,Object.assign({name:"isPartOfTrust",useLabelElement:!1,label:h,classNameModifiers:["isPartOfTrust"],errorMessage:null===(r=p.isPartOfTrust)||void 0===r?void 0:r.errorMessage,showInlineErrors:i.showInlineErrors,disabled:v},{children:Jt("radio",{name:"isPartOfTrust",items:Fd,value:u.isPartOfTrust,i18n:n,disabled:v,onInput:c("isPartOfTrust"),onChange:c("isPartOfTrust"),"aria-required":!0,"aria-label":f.getLabel("isPartOfTrust"),"aria-invalid":!m.isPartOfTrust})}))]}))}var Wd;!function(e){e.MY_NAME="myName",e.MY_SOLE_TRADER_NAME="mySoleTraderName",e.THE_COMPANY_I_WORK_FOR="theCompanyIWorkFor",e.A_TRUST="aTrust",e.A_PARTNERSHIP="aPartnership",e.AN_ASSOCIATION="anAssociation"}(Wd||(Wd={}));const Hd={accountHolder:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}};var qd;!function(e){e.CONTROLLING_PERSON="uboThroughControl",e.OWNER="uboThroughOwnership",e.SIGNATORY="signatory",e.DIRECTOR="director"}(qd||(qd={}));const Gd=["AT","BE","CA","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HU","IE","IT","LT","LU","LV","NL","NO","PT","RO","SI","SK","US"],$d=["CA","US"],Xd=["US"],Yd=["AU"],Kd=t.createContext(null);function zd(){const e=ge(Kd);if(void 0===e)throw new Error("useSettingsContext must be used within a SettingsProvider");return e}const Zd=["accountHolder"],Qd=[{id:Wd.MY_NAME,name:"myName",description:"myNameDescription",type:id.INDIVIDUAL},{id:Wd.THE_COMPANY_I_WORK_FOR,name:"theCompanyIWorkFor",description:"theCompanyIWorkForDescription",type:id.ORGANIZATION}],Jd={id:Wd.MY_SOLE_TRADER_NAME,name:"mySoleTraderName",description:"mySoleTraderNameDescription",type:id.SOLE_PROPRIETORSHIP};function el(e){const{i18n:t,commonProps:a}=We(),r=ue({setState:null}),{dataStoreId:n}=e,{isSettingEnabled:i}=zd(),o=i("changeLegalEntityType"),{handleChangeFor:s,data:d,valid:l,errors:c,fieldProblems:u,triggerValidation:m}=ua(Object.assign(Object.assign({},e),{schema:["accountHolder"],defaultData:e.data,rules:e.validators||Hd,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{r.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,caller:"AccountHolder",dataStoreId:n}})}),[d,c,l]);const p=ra(e,t),g=t.get("nameOfBankAccountHolder");this.triggerValidation=m;const[y,b]=se([]),f=()=>{if(e.legalEntityType===id.ORGANIZATION)return o?Qd:Qd.filter((e=>e.id===Wd.THE_COMPANY_I_WORK_FOR));{let t=[];return t=o?Qd:Qd.filter((e=>e.id===Wd.MY_NAME)),Gd.includes(e.country)?[...t,Jd]:t}};return le((()=>{const e=f();b((()=>Object.values(e).map((({id:e,name:a,description:r})=>({id:e,name:t.get(a),description:t.get(r)})))))}),[t.languageCode,t.locale,e.country,e.legalEntityType]),C("div",{children:[C(Ys,{stateRef:r}),y.length>1?C(Ue,Object.assign({name:"accountHolder",label:g,errorMessage:p.getErrorMessage("accountHolder",c,u),isValid:l.accountHolder,showInlineErrors:a.showInlineErrors,classNameModifiers:["account-holder"]},{children:Jt("select",{onChange:s("accountHolder","input"),name:"accountHolder",placeholder:t.get("selectAccountHolder"),selected:d.accountHolder,items:y})})):null]})}const tl=["entityType",...Ud,...Zd];function al(e){const{i18n:a}=We(),r=ue({setState:null}),{id:n,requiredFields:i}=e,o=ue(null),{isSettingEnabled:s}=zd(),d=s("enableTrustFlow"),l=i||tl,{handleChangeFor:c,data:u,valid:m,errors:p,isValid:g,triggerValidation:y,fieldProblems:b}=ua(Object.assign(Object.assign({},e),{schema:l,defaultData:e.data,rules:e.validators||kd,fieldProblems:null==e?void 0:e.fieldValidationErrors})),f=ra(e,a);this.triggerValidation=()=>{y(l),d&&f.isRequiredField("isPartOfTrust",!1)&&v.current.triggerValidation(),f.isRequiredField("accountHolder",!1)&&o.current.triggerValidation()};const h=Dd(e,Zd);le((()=>{r.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:b,caller:n,dataStoreId:n,schema:l}})}),[u,m,p,g]);const v=ue(null),_=Dd(e,Ud);return C(t.Fragment,{children:[C(Ys,{owner:n,stateRef:r}),C("form",Object.assign({className:"adyen-kyc-company__company-type"},{children:[C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:f,id:"ariaErrorField"}),f.isRequiredField("entityType")&&C(Ue,Object.assign({name:"entityType",useLabelElement:!1,errorMessage:f.getErrorMessage("entityType",p,b),label:f.getLabel("entityType","whatTypeOfCompanyDoYouHave"),classNameModifiers:["entityType"]},{children:Jt("radioCard",{name:"entityType",items:Pd,value:u.entityType,i18n:a,readonly:f.isReadOnly("entityType"),onInput:c("entityType"),onChange:c("entityType"),"aria-required":!0,"aria-label":f.getLabel("entityType","whatTypeOfCompanyDoYouHave"),"aria-invalid":!m.entityType})})),d&&f.isRequiredField("isPartOfTrust",!1)&&C(Bd,Object.assign({},_,{legalEntityType:id.ORGANIZATION,ref:v,dataStoreId:n,isReadOnlyOnDefaultDataYes:!0})),f.isRequiredField("accountHolder")&&C(el,Object.assign({},h,{ref:o,dataStoreId:n,legalEntityType:id.ORGANIZATION}))]}))]})}var rl;!function(e){e.OPERATIONAL_ADDRESS_IS_SAME="OperationAddressAnswerYes",e.OPERATIONAL_ADDRESS_IS_NOT_SAME="OperationAddressAnswerNo"}(rl||(rl={}));const nl=[{id:rl.OPERATIONAL_ADDRESS_IS_SAME,name:"operationalAddressIsSameItemName"},{id:rl.OPERATIONAL_ADDRESS_IS_NOT_SAME,name:"operationalAddressIsNotSameItemName"}],il={operationalAddressIsSame:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},ol=t.createContext(null);function sl({children:e,className:t,expand:r=!1,type:n,onExpandSection:i}){const[o,s]=se([]),d=a("adl-accordion",t,{"adl-accordion--container":"container"===n,"adl-accordion--guide":"guide"===n});return C(ol.Provider,Object.assign({value:{expand:r,items:o,setItems:s,onExpandSection:i}},{children:C("div",Object.assign({className:d},{children:e}))}))}function dl({children:e,collapsed:t=!1,animationDuration:a}){const r=ue(null),[n,i]=se(t?0:void 0);return le((()=>{var e;i(t?0:null===(e=r.current)||void 0===e?void 0:e.scrollHeight)}),[t]),C("div",Object.assign({className:"adyen-collapsible-container","aria-hidden":t,ref:r,style:{height:n,transitionDuration:a}},{children:e}))}var ll;function cl({children:e,open:t=!1,title:a="",subTitle:r="",expandIconPlacement:n=ll.Left,iconPlacement:i=ll.Left,icon:o="",onOpen:s=G,onClose:d=G}){const{expand:l,items:c,setItems:u,onExpandSection:m}=ge(ol),[p,g]=se(t),[y]=se(Ve);return le((()=>{u((e=>[...e,{id:y,isOpen:p}]))}),[]),le((()=>{g(t)}),[t]),le((()=>{var e;g(null===(e=c.find((e=>e.id===y)))||void 0===e?void 0:e.isOpen)}),[c]),le((()=>{p&&(null==m||m(a))}),[p]),C("div",Object.assign({className:"adl-accordion__item"},{children:[C("div",Object.assign({role:"button",className:"adl-accordion__header",tabIndex:0,onClick:()=>{const e=!p,t=[...c];l?(t.find((e=>e.id===y)).isOpen=e,u(t)):u(t.map((t=>Object.assign(Object.assign({},t),{isOpen:t.id===y&&e})))),p?d():s()}},{children:[n===ll.Left?C(xe,{name:p?"chevron-up":"chevron-down",className:"adl-accordion__toggle"}):null,o&&i===ll.Left?C(xe,{name:o,className:"adl-accordion__toggle"}):null,C("div",Object.assign({className:"adl-accordion__title-wrapper"},{children:[C("div",Object.assign({className:"adl-accordion__title"},{children:a})),r&&C("div",Object.assign({className:"adl-accordion__subtitle"},{children:r}))]})),n===ll.Right?C(xe,{name:p?"chevron-up":"chevron-down",className:"adl-accordion__toggle"}):null,o&&i===ll.Right?C(xe,{name:o,className:"adl-accordion__toggle"}):null]})),C(dl,Object.assign({collapsed:!p,animationDuration:"0.1s"},{children:C("div",Object.assign({className:"adl-accordion__content"},{children:e}))}))]}))}function ul({page:e,title:t,content:a,titleId:r,contentId:n,onOpen:i=G,onClose:o=G}){return C(sl,Object.assign({type:"guide"},{children:C(cl,Object.assign({icon:"light-bulb",expandIconPlacement:ll.Right,title:t,onOpen:()=>{w.addEvent("Open contextual guidance information",{segmentation:{guidancePage:e,guidanceTitleId:r,guidanceContentId:n}}),i()},onClose:()=>{w.addEvent("Close contextual guidance information",{segmentation:{guidancePage:e,guidanceTitleId:r,guidanceContentId:n}}),o()}},{children:a}))}))}!function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(ll||(ll={}));const ml=["registrationAddress","operationalAddress","operationalAddressIsSame"],pl={formId:"registrationAddress",formName:"registeredAddress",fields:["address"]}.formId,gl={formId:"operationalAddress",formName:"operationalAddressHeader",fields:["address"]}.formId;function yl(e){var a,r,n,i,o;const{i18n:s}=We(),{data:d,valid:l,errors:c,fieldProblems:u,handleChangeFor:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:["operationalAddressIsSame"],defaultData:e.data,rules:e.validators||il,maskedFields:[]})),g={[pl]:ue(null),[gl]:ue(null)},y=ra(e,s),b=ue({setState:null});le((()=>{b.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:u,caller:e.id,dataStoreId:e.id,schema:["registrationAddress","operationalAddressIsSame",...f()?["operationalAddress"]:[]]}})}),[d.operationalAddressIsSame]),this.triggerValidation=()=>{p(),g[pl].current.triggerValidation(),f()&&g[gl].current.triggerValidation()};const f=()=>d.operationalAddressIsSame==rl.OPERATIONAL_ADDRESS_IS_NOT_SAME,h=Cd(e,pl),v=Cd(e,gl);return C(t.Fragment,{children:[C(Ys,{owner:e.id,stateRef:b}),C(Ms,{heading:e.heading,description:e.description}),C(qc,{verificationErrors:null===(r=null===(a=null==e?void 0:e.problems)||void 0===a?void 0:a.verificationErrors)||void 0===r?void 0:r[e.id],validationErrors:null===(i=null===(n=null==e?void 0:e.problems)||void 0===n?void 0:n.validationErrors)||void 0===i?void 0:i[e.id],formUtils:y,id:"ariaErrorField"}),C(ul,{page:"Company registered address",titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingCompanyAddressDetails",title:s.get("whyDoINeedToFillInThisInformation"),content:s.get("reasonForFillingCompanyAddressDetails")}),C($c,Object.assign({},h,{ref:g[pl],data:Object.assign(Object.assign({},h.data),{country:e.country}),hideCountry:!0,id:e.id,addressType:"registrationAddress",handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress})),C(Ms,{classNames:"adl-u-margin-top-32",heading:s.get("operationalAddressHeader")}),C(Ue,Object.assign({name:"operationalAddressIsSame",useLabelElement:!1,label:y.getLabel("operationalAddressIsSame"),classNameModifiers:["operationalAddressIsSame"],errorMessage:null===(o=c.operationalAddressIsSame)||void 0===o?void 0:o.errorMessage},{children:Jt("radio",{name:"operationalAddressIsSame",items:nl,value:d.operationalAddressIsSame,i18n:s,readonly:y.isReadOnly("operationalAddressIsSame"),onInput:m("operationalAddressIsSame"),onChange:m("operationalAddressIsSame"),"aria-required":!0,"aria-label":y.getLabel("operationalAddressIsSame"),"aria-invalid":!l.operationalAddressIsSame})})),f()&&t.createElement($c,Object.assign({},v,{key:"operationalAddress",ref:g[gl],data:Object.assign(Object.assign({},v.data),{country:e.country}),hideCountry:!0,id:e.id,addressType:"operationalAddress",handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))]})}const bl={regex:/^\d{8}$/,message:"validationPleaseEnter8Digits"},fl={regex:/^\d{9}$/,message:"validationPleaseEnter9Digits"},hl={regex:/^\d{10}$/,message:"validationPleaseEnter10Digits"},vl={regex:/^\d{11}$/,message:"validationPleaseEnter11Digits"},_l={regex:/^\d{12}$/,message:"validationPleaseEnter12Digits"},Nl={AT:{regex:/^U\d{8}$/},BE:{regex:/^(1|0?)\d{9}$/},BG:{regex:/^\d{9,10}$/,message:"validationEnter9Or10Digits"},HR:vl,CY:{regex:/^[A-Z0-9]{9}/i},CZ:{regex:/^\d{8,10}$/,message:"validationEnterBetween8And10Digits"},EE:fl,FI:bl,FR:vl,DE:fl,EL:fl,HU:bl,IE:{regex:/^[A-Z0-9]{8,9}$/},IT:vl,LV:vl,LT:{regex:/^\d{9,12}$/,message:"validationEnter9Or12Digits"},LU:bl,MT:bl,NL:{regex:/^\d{9}B\d{2}$/},PL:{regex:/^\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d[-]?\d$/},PT:fl,RO:{regex:/^\d{2,12}$/},SE:{regex:/^\d{10}01$/},SK:hl,SI:bl,ES:{regex:/^[A-Z0-9]\d{7}[A-Z0-9]$/},AL:{regex:/[JK][A-Z0-9]{8}[A-Z]$/},BY:fl,CA:{regex:/^[A-Z0-9]{15}$/},GB:{regex:/^\d{9,12}$/},PH:_l,RU:{regex:/^(\d{10}|\d{12})$/},SM:{regex:/^\d{5}$/,message:"validationPleaseEnter6Digits"},RS:fl,CH:{regex:/^(\d{6}|E\d{9}(TVA|MWST|IVA))$/},TR:hl,UA:_l,AR:vl,CL:{regex:/^\d{8}-\d{1}$/},CO:hl,CR:{regex:/^\d{9,12}$/},EC:{regex:/^\d{13}$/,message:"validationPleaseEnter13Digits"},GT:{regex:/^\d{7}-\d{1}$/},PE:vl,VE:{regex:/^[JGVE]-\d{8}-?\d$/}},Ol={NO:{regex:/^\d{9}MVA$/},DK:[{regex:/^DK\d{8}$/},{regex:/^SE\d{8}$/}],GR:[{regex:/^EL\d{9}$/}]},Il="validationPleaseEnterAValidVatNumber",El=({countryCode:e,specs:t,input:a})=>{const r=Array.isArray(t)?[...t]:[t];let n="";for(;r.length>0;){const t=r.shift();if(!("regex"in t)||!t.regex.test)throw new Error(`Invalid vat validation specification ${e}, ${JSON.stringify(r)}`);if(t.regex.test(a))return{isValid:!0};n=(null==t?void 0:t.message)||Il}return{isValid:!1,message:n}},Tl=(e,t=null)=>{if(!e||!Cs(e)||e.length<3)return{isValid:!1,message:Il};const a=t||((e||"").toUpperCase().match(/^[A-Z]{2}/)||[])[0];return a?a in Ol?El({countryCode:a,specs:Ol[a],input:e}):a in Nl?e.substring(0,2)!==t?{isValid:!1,message:"validationPrefixThevatNumberWith_countryCode"}:El({countryCode:a,specs:Nl[a],input:e.substring(2)}):/^[a-zA-Z0-9_. -]+$/.test(e)?{isValid:!0}:{isValid:!1,message:Il}:{isValid:!1,message:Il}},Al={vatNumber:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}],vatAbsenceReason:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},Sl=e=>({translationKey:"validationPleaseEnterAValidVatNumberWithFormat",translationObject:{values:{format:e}}}),Rl={US:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"US");return t},errorMessage:Sl("XXXXXXXXX")}]},NL:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"NL");return t},errorMessage:Sl("NLXXXXXXXXXBXX")}]},DE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"DE");return t},errorMessage:Sl("DEXXXXXXXXX")}]},PL:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"PL");return t},errorMessage:Sl("PLXXXXXXXXXX")}]},AT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"AT");return t},errorMessage:Sl("ATUXXXXXXXX")}]},BE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"BE");return t},errorMessage:Sl("BEXXXXXXXXXX")}]},SE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"SE");return t},errorMessage:Sl("SEXXXXXXXXXX01")}]},ES:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"ES");return t},errorMessage:Sl("ESXXXXXXXXX")}]},FR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"FR");return t},errorMessage:Sl("FRXXXXXXXXXXX")}]},PT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"PT");return t},errorMessage:Sl("PTXXXXXXXXX")}]},IT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"IT");return t},errorMessage:Sl("ITXXXXXXXXXXX")}]},CZ:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"CZ");return t},errorMessage:Sl("CZXXXXXXXX")}]},NO:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"NO");return t},errorMessage:Sl("XXXXXXXXXMVA")}]},GB:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"GB");return t},errorMessage:Sl('"GB" + 9-12 digits')}]},BG:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"BG");return t},errorMessage:Sl("BG999999999 or BG9999999999")}]},CH:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"CH");return t},errorMessage:Sl("CHE999999999TVA or CHE999999999IVA or CHE999999999MWST")}]},CY:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"CY");return t},errorMessage:Sl("CYXXXXXXXXX")}]},DK:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"DK");return t},errorMessage:Sl("DK99999999 or SE99999999")}]},EE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"EE");return t},errorMessage:Sl("EE999999999")}]},FI:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"FI");return t},errorMessage:Sl("FI99999999")}]},GR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"GR");return t},errorMessage:Sl("EL999999999")}]},HR:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"HR");return t},errorMessage:Sl("HR99999999999")}]},HU:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"HU");return t},errorMessage:Sl("HU99999999")}]},IE:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"IE");return t},errorMessage:Sl("IEXXXXXXXX or IEXXXXXXXXX")}]},LT:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"LT");return t},errorMessage:Sl('"LT" + 9-12 digits')}]},LU:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"LU");return t},errorMessage:Sl("LU99999999")}]},LV:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"LV");return t},errorMessage:Sl("LV99999999999")}]},RO:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"RO");return t},errorMessage:Sl("RO + 2-12 characters")}]},SK:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"SK");return t},errorMessage:Sl("SK9999999999")}]},SI:{vatNumber:[{modes:["blur"],validate:e=>{const{isValid:t}=Tl(e,"SI");return t},errorMessage:Sl("SI99999999")}]}},Cl=["industryExemption","belowTaxThreshold"],Dl=["vatNumber","exemptedFromVat","vatAbsenceReason"];function kl(e){const{i18n:t,commonProps:a}=We(),r=ra(e,t),n=ue({setState:null}),i=Ts(Al,Rl,e.country),{handleChangeFor:o,data:s,valid:d,errors:l,isValid:c,triggerValidation:u,fieldProblems:m}=ua(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromVat?["vatAbsenceReason","exemptedFromVat"]:["vatNumber","exemptedFromVat"],rules:i,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromVat:!!e.data.exemptedFromVat}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));return le((()=>{s.vatNumber&&o("vatNumber","blur")(s.vatNumber)}),[e.country]),le((()=>{n.current.setState({type:"addToState",value:{data:s,valid:d,errors:l,caller:"vatNumber",dataStoreId:e.dataStoreId}})}),[s,d,l,c]),this.triggerValidation=u,r.isRequiredField("vatNumber")?C("div",Object.assign({className:"adyen-kyc-field--tax-id"},{children:[C(Ys,{stateRef:n}),C(Ue,Object.assign({name:"vatNumber",label:r.getLabel("vatNumber"),classNameModifiers:["tax-id"],errorMessage:r.getErrorMessage("vatNumber",l,m),isValid:d.vatNumber,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"vatNumber",value:s.vatNumber,readonly:r.isReadOnly("vatNumber"),classNameModifiers:["vatNumber"],onInput:o("vatNumber","input"),onBlur:o("vatNumber","blur"),disabled:s.exemptedFromVat,"aria-required":!0,"aria-label":r.getLabel("vatNumber"),"aria-invalid":!d.vatNumber})})),r.isRequiredField("exemptedFromVat")&&Jt("boolean",{name:"exemptedFromVat",label:r.getLabel("exemptedFromVat"),value:"exemptedFromVat",readonly:r.isReadOnly("exemptedFromVat"),classNameModifiers:["exempted-from-tax"],checked:s.exemptedFromVat,onInput:o("exemptedFromVat"),"aria-required":!1,"aria-label":r.getLabel("exemptedFromVat"),"aria-invalid":!1}),s.exemptedFromVat?C(Ue,Object.assign({name:"vatAbsenceReason",classNameModifiers:["tax-id-absence-reason"],label:r.getLabel("vatAbsenceReason"),errorMessage:r.getErrorMessage("vatAbsenceReason",l,m),isValid:d.vatAbsenceReason},{children:Jt("select",{name:"vatAbsenceReason",onChange:o("vatAbsenceReason","input"),selected:s.vatAbsenceReason,items:Cl.map((e=>({id:e,name:t.get(e)})))})})):null]})):null}const Ll={ein:[/^\d{2}-?\d{7}$/],ssn:[/^\d{9}$/,/^\d{4}$/,/^\d{3}-\d{2}-\d{4}$/],passport:[/^\w{6,11}$/],invalidEinPrefixes:[/^(00|07|08|09|17|18|19|28|29|49|69|70|78|79|89|96|97)/]},wl={AU:[{regex:/^\d{11}$/}],BE:[{regex:/^\d{10}$/}],BR:[/^\d{14}$/,/^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$/].map((e=>({regex:e}))),CA:[{regex:/^\d{9}$/}],DE:[{regex:/^\d{10,11}$/}],HK:[{regex:/^\d{8}$/}],IN:[{regex:/^[A-Z0-9]{15}$/}],JP:[{regex:/^\d{13}$/}],MX:[{regex:/^\D{3}\d{6}\w{3}$/}],NZ:[{regex:/^[A-Z0-9]{8,9}$/}],NL:[{regex:/^\d{9}$/}],PH:[{regex:/^\d{12}$/}],SG:[{regex:/^[A-Z0-9]{9,10}$/}],US:[...Ll.ssn,...Ll.ein].map((e=>({regex:e,exception:Ll.invalidEinPrefixes})))},Pl=/^[\w. -]+$/,jl=(e,t)=>!(!e||!Cs(e)||e.length<3)&&(t in wl?((e,t,a)=>{var r;for(const t of a)if(!(null===(r=t.exception)||void 0===r?void 0:r.every((t=>t.test(e))))&&t.regex.test(e))return!0;return!1})(e,0,wl[t]):Pl.test(e)),xl={taxId:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}],taxIdAbsenceReason:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},Ml=e=>({translationKey:"validationPleaseEnterAValidTaxIdNumberWithFormat",translationObject:{values:{format:e}}}),Fl={US:{taxId:[{modes:["blur"],validate:e=>jl(e,"US"),errorMessage:Ml("XXXXXXXXX")}]},CA:{taxId:[{modes:["blur"],validate:e=>jl(e,"CA"),errorMessage:Ml("999999999")}]},AU:{taxId:[{modes:["blur"],validate:e=>jl(e,"AU"),errorMessage:"aValidAbnShouldBe11Digits"}]}},Vl=["taxId","exemptedFromTax"];function Ul(e){const{i18n:t,commonProps:a}=We(),r=ra(e,t),n=ue({setState:null}),i=Ts(xl,Fl,e.country),{handleChangeFor:o,data:s,valid:d,errors:l,isValid:c,triggerValidation:u,fieldProblems:m}=ua(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromTax?["exemptedFromTax"]:["taxId","exemptedFromTax"],rules:i,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromTax:!!e.data.exemptedFromTax}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));return le((()=>{s.taxId&&o("taxId","blur")(s.taxId)}),[e.country]),le((()=>{n.current.setState({type:"addToState",value:{data:s,valid:d,errors:l,caller:"taxId",dataStoreId:e.dataStoreId}})}),[s,d,l,c]),this.triggerValidation=u,r.isRequiredField("taxId")?C("div",Object.assign({className:"adyen-kyc-field--tax-id"},{children:[C(Ys,{stateRef:n}),C(Ue,Object.assign({name:"taxId",label:r.getLabel("taxId"),classNameModifiers:["tax-id"],errorMessage:r.getErrorMessage("taxId",l,m),isValid:d.taxId,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"taxId",value:s.taxId,readonly:r.isReadOnly("taxId"),classNameModifiers:["taxId"],onInput:o("taxId","input"),onBlur:o("taxId","blur"),disabled:s.exemptedFromTax,"aria-required":!0,"aria-label":r.getLabel("taxId"),"aria-invalid":!d.taxId})})),r.isRequiredField("exemptedFromTax")&&Jt("boolean",{name:"exemptedFromTax",label:r.getLabel("exemptedFromTax"),value:"exemptedFromTax",readonly:r.isReadOnly("exemptedFromTax"),classNameModifiers:["exempted-from-tax"],checked:s.exemptedFromTax,onInput:o("exemptedFromTax"),"aria-required":!1,"aria-label":r.getLabel("exemptedFromTax"),"aria-invalid":!1})]})):null}const Bl="default",Wl={AT:{[Ld.NON_PROFIT_OR_CHARITABLE]:{regex:/^(FN|T)\d{3,6}[a-z]$|^(AT-ZVR-)\d{9}$/,format:"T999x, FN999999x, or AT-ZVR-999999999"},[Ld.INCORPORATED_ASSOCIATION]:{regex:/^(FN|T)\d{3,6}[a-z]$|^(AT-ZVR-)\d{9}$/,format:"T999x, FN999999x, or AT-ZVR-999999999"},[Bl]:{regex:/^(FN|T)\d{3,6}[a-z]$/,format:"T999x or FN9999x, FN9999x, or FN999999x"}},AU:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},BE:{[Bl]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},BG:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},BR:{[Bl]:{regex:/^\d{2}(.)\d{3}(.)\d{3}\/\d{4}(-)\d{2}$/,format:"99.999.999/9999-99"}},CA:{[Bl]:{regex:/^[a-zA-Z0-9]{5,10}$/,format:"XtoYdigits",values:{x:5,y:10}}},CH:{[Bl]:{regex:/^(CHE)\d{9}$|^(CH)\d{11}$/,format:"CHE999999999 or CH99999999999"}},CY:{[Bl]:{regex:/^([COP])\d{1,8}$/,format:"cop1to8digits"}},CZ:{[Bl]:{regex:/^\d{8,10}$/,format:"XtoYdigits",values:{x:8,y:10}}},DE:{[Bl]:{regex:/^[a-zA-Z]{2,3}\d{1,6}[a-zA-Z]{0,5}(-[a-zA-Z]\d{4})?$/,format:'2-3 letters + 1-6 numbers + 0-5 letters + Optional ("-" + 1 letter + 4 numbers)'}},DK:{[Bl]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},EE:{[Bl]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},ES:{[Bl]:{regex:/[a-zA-Z]\d{8}$/,format:"1char8digits"}},FI:{[Bl]:{regex:/^\d{7}[-]?\d$/,format:"8digitsOptional-"}},FR:{[Bl]:{regex:/^(\d{9}[-]?(\d{5})?)$/,format:"9digitsOr14digits"},[Ld.NON_PROFIT_OR_CHARITABLE]:{regex:/^(\d{9}[-]?(\d{5})?)$|^(W)\d{9}$/,format:"Wchar9or14digits"}},GB:{[Ld.NON_PROFIT_OR_CHARITABLE]:{regex:/^\d{6,7}$/,format:"XorYdigits",values:{x:6,y:7}},[Bl]:{regex:/^[a-zA-Z0-9]{8}$/,format:"Xcharacters",values:{x:8}}},GR:{[Bl]:{regex:/^\d{12}$/,format:"Xdigits",values:{digits:12}}},HR:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},HU:{[Bl]:{regex:/^\d{2}-\d{2}-\d{6}$/,format:"99-99-999999"}},HK:{[Bl]:{regex:/^\d{7}$/,format:"Xdigits",values:{digits:7}}},IN:{[Bl]:{regex:/^\d{21}$/,format:"Xdigits",values:{digits:21}}},ID:{[Bl]:{regex:/^\d{12}$/,format:"Xdigits",values:{digits:12}}},IS:{[Bl]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},IT:{[Bl]:{regex:/^\d{11}$|^[a-zA-Z]{2}\d{6,7}$/,format:"2characteres6or7digits"}},IE:{[Bl]:{regex:/^\d{6}$/,format:"Xdigits",values:{digits:6}}},LT:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},LU:{[Bl]:{regex:/^[a-zA-Z]\d{5,7}$/,format:"1character5to7digits"}},LV:{[Bl]:{regex:/^\d{11}$/,format:"Xdigits",values:{digits:11}}},MT:{[Bl]:{regex:/^(C)\d{5}$/,format:"Cchar5digits"}},MY:{[Bl]:{regex:/^[A-Za-z0-9]{7,8}$|^[A-Za-z0-9]{12}$/,format:"7or8or12characteres"}},NZ:{[Bl]:{regex:/^\d{13}$/,format:"Xdigits",values:{digits:13}}},NL:{[Bl]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},NO:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},PL:{[Bl]:{regex:/^\d{9,10}$/,format:"XorYdigits",values:{x:9,y:10}}},PT:{[Bl]:{regex:/^\d{9}$/,format:"Xdigits",values:{digits:9}}},RO:{[Bl]:{regex:/^[J]\d{2}\/\d{1,9}\/\d{4}$/,format:'"J" + 2-digit number + "/" + trade register number (up to 9-digit number) + "/" + year of registration'}},SE:{[Bl]:{regex:/^\d{6}-\d{4}$/,format:"999999-9999"}},SG:{[Bl]:{regex:/^\d{9,10}$/,format:"XorYdigits",values:{x:9,y:10}}},SI:{[Bl]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},SK:{[Bl]:{regex:/^\d{8}$/,format:"Xdigits",values:{digits:8}}},JP:{[Bl]:{regex:/^\d{13}$/,format:"Xdigits",values:{digits:13}}},KR:{[Bl]:{regex:/^\d{10}$/,format:"Xdigits",values:{digits:10}}},US:{[Bl]:{regex:/^\d{2}-?\d{7}$/,format:"Xdigits",values:{digits:9}}}},Hl=(e,t,a)=>({modes:["blur"],validate:function(r){const{isValid:n,translationMessage:i}=((e,t=null,a=Bl)=>{const r=Wl[t];if(!r)return{isValid:Ls.noHtml.test(e),translationMessage:{translationKey:"validationPleaseEnterAValidRegistrationNumber",format:null,values:null}};let n=r[a];n||(n=r[Bl]);const{regex:i,format:o,values:s}=n,d={translationKey:"validationPleaseEnterAValidRegistrationNumberWithFormat",format:o,values:s};return{isValid:i.test(e),translationMessage:d}})(r,e,t);return this.errorMessage={translationKey:i.translationKey,translationObject:{values:{format:i.values?a.get(i.format,{values:i.values}):a.get(i.format)}}},n}}),ql={modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"},Gl=["registrationNumber","exemptedFromRegistrationNumber"];function $l(e){const{i18n:t,commonProps:a}=We(),r=ue({setState:null}),n=e.requiredFields||["registrationNumber"],{companyType:i,country:o}=e,s=me((()=>((e,t,a)=>{const r=[ql],n=Hl(e,t,a);return n&&r.push(n),{registrationNumber:r}})(o,i,t)),[o,i]),{handleChangeFor:d,data:l,valid:c,errors:u,isValid:m,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:e=>e.exemptedFromRegistrationNumber?["exemptedFromRegistrationNumber"]:["registrationNumber","exemptedFromRegistrationNumber"],rules:s,defaultData:Object.assign(Object.assign({},e.data),{exemptedFromRegistrationNumber:!!e.data.exemptedFromRegistrationNumber}),fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{r.current.setState({type:"addToState",value:{data:l,valid:c,errors:u,caller:"businessRegistration",dataStoreId:e.dataStoreId}})}),[l,c,u,m]),le((()=>{l.registrationNumber&&d("registrationNumber","blur")(l.registrationNumber)}),[e.country]),this.triggerValidation=p;const y=ra(Object.assign(Object.assign({},e),{requiredFields:n}),t);return C("div",Object.assign({className:"adyen-kyc-field__business-registration adl-u-margin-bottom-16"},{children:[C(Ys,{stateRef:r}),C(Ue,Object.assign({name:"registrationNumber",label:y.getLabel("registrationNumber","companyRegistrationNumber"),classNameModifiers:["registrationNumber"],errorMessage:y.getErrorMessage("registrationNumber",u,g)||"",isValid:c.registrationNumber,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"registrationNumber",value:l.registrationNumber,readonly:y.isReadOnly("registrationNumber"),classNameModifiers:["registrationNumber"],onInput:d("registrationNumber","input"),onBlur:d("registrationNumber","blur"),disabled:l.exemptedFromRegistrationNumber,"aria-required":!0,"aria-label":y.getLabel("registrationNumber"),"aria-invalid":!c.registrationNumber})})),y.isRequiredField("exemptedFromRegistrationNumber")&&Jt("boolean",{name:"exemptedFromRegistrationNumber",label:y.getLabel("exemptedFromRegistrationNumber"),value:"exemptedFromRegistrationNumber",readonly:y.isReadOnly("exemptedFromRegistrationNumber"),classNameModifiers:["exempted-from-registration"],checked:l.exemptedFromRegistrationNumber,onInput:d("exemptedFromRegistrationNumber"),"aria-required":!1,"aria-label":y.getLabel("exemptedFromRegistrationNumber"),"aria-invalid":!1})]}))}const Xl={tradingName:{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"},stockExchangeMIC:{modes:["blur"],validate:e=>/^[A-Z0-9]{4}$/.test(e),errorMessage:"validationPleaseEnterAValidMarketIdentifier"},stockISIN:[{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"},{modes:["blur"],validate:e=>js(e,12),errorMessage:"validationPleaseEnterAValidStockISIN"}]};function Yl({onChange:e}){const[t,a]=se(null);return le((()=>{t&&(null==e||e(t))}),[JSON.stringify(null==t?void 0:t.currentState)]),C(Xs.Consumer,{children:({state:e})=>(a(e),null)})}function Kl(){const e=ge(Xs);if(void 0===e)throw new Error("useStateContext must be used within a StateProvider");return e}const zl=["tradingName","sameNameAsLegalName",...Gl,"stockExchangeMIC","stockISIN",...Dl,...Vl];function Zl(e){var a,r;const{i18n:n,commonProps:i}=We(),o=ue(null),s=ue(null),d=ue(null),l=ue({setState:null}),c=e.id,u=(e.requiredFields||zl).filter((e=>["tradingName","sameNameAsLegalName","stockExchangeMIC","stockISIN"].includes(e))),{getData:m}=Kl(),p=null===(r=null===(a=m())||void 0===a?void 0:a.companyNameAndCountry)||void 0===r?void 0:r.legalCompanyName,g=!e.data.tradingName||e.data.tradingName===p,{handleChangeFor:y,data:b,valid:f,fieldProblems:h,errors:v,isValid:_,triggerValidation:N,setData:O}=ua(Object.assign(Object.assign({},e),{schema:u,defaultData:Object.assign(Object.assign({},e.data),{sameNameAsLegalName:g,tradingName:g?p:e.data.tradingName}),rules:Xl,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{e.data.tradingName!==b.tradingName&&e.data.tradingName&&(O("tradingName",e.data.tradingName),N(["tradingName"]))}),[e.data.tradingName]);const I=ra(e,n);le((()=>{l.current.setState({type:"addToState",value:{data:b,valid:f,errors:v,caller:c,dataStoreId:c,schema:e.requiredFields||zl}})}),[b,f,v,_]),le((()=>{O("sameNameAsLegalName",g),g&&O("tradingName",p)}),[p]);this.triggerValidation=()=>{N(u),S(E)&&o.current.triggerValidation(),S(T)&&s.current.triggerValidation(),S(A)&&d.current.triggerValidation()};const E=Dd(e,Gl),T=Dd(e,Dl),A=Dd(e,Vl),S=e=>!!e.requiredFields.length;return C(t.Fragment,{children:[C(Ys,{owner:c,stateRef:l}),C(Yl,{onChange:({currentState:t,changeInitiatedBy:a})=>{if(a===c){const a=t.data[c];let r=e.requiredFields||zl,n=!1;I.isRequiredField("vatNumber")&&(r=a.exemptedFromVat?r.filter((e=>"vatNumber"!==e)):r.filter((e=>"vatAbsenceReason"!==e)),n=!0),I.isRequiredField("taxId")&&a.exemptedFromTax&&(r=r.filter((e=>"taxId"!==e)),n=!0),I.isRequiredField("registrationNumber")&&a.exemptedFromRegistrationNumber&&(r=r.filter((e=>"registrationNumber"!==e)),n=!0),n&&l.current.setState({type:"addToState",value:{data:b,valid:f,errors:v,fieldProblems:h,caller:e.id,dataStoreId:e.id,schema:r}})}}}),C("form",Object.assign({className:"adyen-kyc-company__company-details"},{children:[C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:I,id:"ariaErrorField"}),C(ul,{page:"Company registration details",title:n.get("whyDoINeedToFillInThisInformation"),content:n.get("reasonForFillingCompanyRegistrationDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingCompanyRegistrationDetails"}),I.isRequiredField("tradingName")&&C(t.Fragment,{children:[C(Ue,Object.assign({name:"tradingName",label:I.getLabel("tradingName"),classNameModifiers:["tradingName"],errorMessage:I.getErrorMessage("tradingName",v,h),isValid:f.tradingName,showInlineErrors:i.showInlineErrors},{children:Jt("text",{name:"tradingName",value:b.tradingName,readonly:I.isReadOnly("tradingName")||b.sameNameAsLegalName,classNameModifiers:["tradingName"],onInput:y("tradingName","input"),onBlur:y("tradingName","blur"),"aria-required":!0,"aria-label":I.getLabel("tradingName"),"aria-invalid":!f.tradingName})})),C("div",Object.assign({className:"adyen-kyc-field--same-name-as-legal-name"},{children:Jt("boolean",{name:"sameNameAsLegalName",label:I.getLabel("sameNameAsLegalName"),value:b.sameNameAsLegalName,checked:b.sameNameAsLegalName,onInput:y("sameNameAsLegalName","input"),onChange:()=>O("tradingName",b.sameNameAsLegalName?p:""),"aria-required":!1,"aria-label":I.getLabel("sameNameAsLegalName"),"aria-invalid":!1})}))]}),I.isRequiredField("stockExchangeMIC")&&C(Ue,Object.assign({name:"stockExchangeMIC",label:I.getLabel("stockExchangeMIC"),helper:n.get("stockExchangeMICHelper"),classNameModifiers:["stockExchangeMIC"],errorMessage:I.getErrorMessage("stockExchangeMIC",v,h),isValid:f.stockExchangeMIC,showInlineErrors:i.showInlineErrors},{children:Jt("text",{name:"stockExchangeMIC",value:b.stockExchangeMIC,readonly:I.isReadOnly("stockExchangeMIC"),classNameModifiers:["stockExchangeMIC"],onInput:y("stockExchangeMIC","input"),onBlur:y("stockExchangeMIC","blur"),"aria-required":!0,"aria-label":I.getLabel("stockExchangeMIC"),"aria-invalid":!f.stockExchangeMIC})})),I.isRequiredField("stockISIN")&&C(Ue,Object.assign({name:"stockISIN",label:I.getLabel("stockISIN"),helper:n.get("stockISINHelper"),classNameModifiers:["stockISIN"],errorMessage:I.getErrorMessage("stockISIN",v,h),isValid:f.stockISIN,showInlineErrors:i.showInlineErrors},{children:Jt("text",{name:"stockISIN",value:b.stockISIN,readonly:I.isReadOnly("stockISIN"),classNameModifiers:["stockISIN"],onInput:y("stockISIN","input"),onBlur:y("stockISIN","blur"),"aria-required":!0,"aria-label":I.getLabel("stockISIN"),"aria-invalid":!f.stockISIN})})),I.isRequiredField("registrationNumber")&&C($l,Object.assign({},E,{companyType:e.companyType,ref:o,dataStoreId:c,country:e.country})),I.isRequiredField("vatNumber")&&C(kl,Object.assign({},T,{ref:s,dataStoreId:c,country:e.country})),I.isRequiredField("taxId")&&C(Ul,Object.assign({},A,{ref:d,dataStoreId:c,country:e.country}))]}))]})}const Ql={legalCompanyName:{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"}},Jl=["legalCompanyName"];function ec(e){const{i18n:t,commonProps:a}=We(),{dataStoreId:r,requiredFields:n}=e,i=n||["legalCompanyName"],o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,triggerValidation:m,fieldProblems:p}=ua(Object.assign(Object.assign({},e),{schema:i,rules:e.validators||Ql,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:p,caller:"legalCompanyName",dataStoreId:r}})}),[d,l,c,u]),this.triggerValidation=m;const g=ra(e,t);return g.isRequiredField("legalCompanyName")?C("div",Object.assign({className:"adyen-kyc-field__legal-company-name"},{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"legalCompanyName",label:g.getLabel("legalCompanyName"),helper:t.get("legalCompanyNameHelper"),classNameModifiers:["legalCompanyName"],errorMessage:g.getErrorMessage("legalCompanyName",c,p),isValid:l.legalCompanyName,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"legalCompanyName",value:d.legalCompanyName,readonly:g.isReadOnly("legalCompanyName"),classNameModifiers:["legalCompanyName"],onInput:s("legalCompanyName","input"),onBlur:s("legalCompanyName","blur"),"aria-required":!0,"aria-label":g.getLabel("legalCompanyName"),"aria-invalid":!l.legalCompanyName})}))]})):null}const tc={companyCountry:{modes:["blur"],validate:e=>!Ss(e),errorMessage:"fieldIsRequired"}},ac=({title:e,children:t})=>C("div",Object.assign({className:"adl-disclaimer-container"},{children:[C("div",Object.assign({className:"adl-disclaimer__title"},{children:e})),C("div",Object.assign({className:"adl-disclaimer__content"},{children:t}))]})),rc=()=>{const{i18n:e}=We();return C(ac,Object.assign({title:e.get("patriotActDisclosureTitle")},{children:[C("p",{children:e.get("patriotActDisclosureTextParagraph1")}),C("p",{children:e.get("patriotActDisclosureTextParagraph2")})]}))},nc=["companyCountry","legalCompanyName"];function ic(e){const{i18n:t}=We(),a=ue(null),{isSettingEnabled:r}=zd(),n=e.id,i=ue({setState:null}),o=r("editPrefilledCountry"),s=nc,{handleChangeFor:d,data:l,valid:c,errors:u,isValid:m,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:["companyCountry"],defaultData:e.data,rules:e.validators||tc,fieldProblems:null==e?void 0:e.fieldValidationErrors})),y=ra(e,t);le((()=>{i.current.setState({type:"addToState",value:{data:l,valid:c,errors:u,fieldProblems:g,caller:n,dataStoreId:n,schema:s}})}),[l,c,u,m]),this.triggerValidation=()=>{p(["companyCountry"]),y.isRequiredField("legalCompanyName")&&a.current.triggerValidation()};const b=Dd(e,Jl);return C("div",{children:[C(Ys,{owner:n,stateRef:i}),C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:y,id:"ariaErrorField"}),"US"===l.companyCountry?C(rc,{}):void 0,y.isRequiredField("companyCountry")&&C(aa,{label:y.getLabel("companyCountry"),allowedCountries:[],classNameModifiers:["country"],errorMessage:y.getErrorMessage("companyCountry",u,g),onDropdownChange:d("companyCountry"),value:l.companyCountry,readOnly:!o}),y.isRequiredField("legalCompanyName")&&C(ec,Object.assign({},b,{ref:a,dataStoreId:n}))]})}let oc=!1,sc=!1;function dc(e){const t=function(){const e=document.createElement("div");return e.setAttribute("aria-hidden","true"),e.setAttribute("id","adl-icon-container"),e.style.height="0",e}();return t.innerHTML=e,t}function lc(e){if(sc)return Promise.resolve();return v({loadingContext:e,path:"static/images/document-guidance.svg"},null,"text").then((e=>{document.body.insertBefore(dc(e),document.body.firstChild),sc=!0}))}var cc;!function(e){e.BANK_STATEMENT="bankStatement",e.DRIVERS_LICENSE="driversLicense",e.IDENTITY_CARD="identityCard",e.NATIONAL_ID_NUMBER="nationalIdNumber",e.PASSPORT="passport",e.PROOF_OF_ADDRESS="proofOfAddress",e.PROOF_OF_NATIONAL_ID_NUMBER="proofOfNationalIdNumber",e.PROOF_OF_RESIDENCY="proofOfResidency",e.REGISTRATION_DOCUMENT="registrationDocument",e.VAT_DOCUMENT="vatDocument",e.CONSTITUTIONAL_DOCUMENT="constitutionalDocument"}(cc||(cc={}));const uc=(e,t=!1,a=!0)=>{switch(e){case cc.PASSPORT:return"passport";case cc.DRIVERS_LICENSE:case cc.IDENTITY_CARD:return t?a?"id-front":"id-back":"id";case cc.BANK_STATEMENT:case cc.VAT_DOCUMENT:case cc.REGISTRATION_DOCUMENT:case cc.PROOF_OF_ADDRESS:case cc.PROOF_OF_RESIDENCY:default:return"generic-document"}};function mc({type:e,className:r}){const{loadingContext:n,i18n:i}=We(),[o,s]=se(null);return le((()=>{lc(n)}),[]),le((()=>{s(uc(e))}),[e]),C("div",Object.assign({className:a("adl-document-guidance",r)},{children:C("div",Object.assign({className:"adl-document-guidance__container"},{children:[C("div",Object.assign({className:"adl-document-guidance__item"},{children:[C("svg",Object.assign({width:"100%",role:"img"},{children:C("use",{href:`#adl-${o}-valid`})})),C("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("good")}))]})),C("div",Object.assign({className:"adl-document-guidance__item"},{children:[C("svg",Object.assign({width:"100%",role:"img"},{children:C("use",{href:`#adl-${o}-invalid-cut`})})),C("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notCutOff")}))]})),C("div",Object.assign({className:"adl-document-guidance__item"},{children:[C("svg",Object.assign({width:"100%",role:"img"},{children:C("use",{href:`#adl-${o}-invalid-blur`})})),C("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notBlurry")}))]})),C("div",Object.assign({className:"adl-document-guidance__item"},{children:C(t.Fragment,"generic-document"===o?{children:[C("svg",Object.assign({width:"100%",role:"img"},{children:C("use",{href:`#adl-${o}-invalid-expired`})})),C("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("notExpired")}))]}:{children:[C("svg",Object.assign({width:"100%",role:"img"},{children:C("use",{href:`#adl-${o}-invalid-glare`})})),C("span",Object.assign({className:"adl-document-guidance__description"},{children:i.get("noGlare")}))]})}))]}))}))}function pc(e){const{file:t,errorMessage:a,onDelete:r,iconPrefix:n}=e,{i18n:i}=We();return C("div",Object.assign({className:"adyen-kyc-dropzone-file"},{children:[C("div",Object.assign({className:"adyen-kyc-dropzone-file__icon"},{children:C("svg",Object.assign({height:"100%",width:"100%"},{children:C("use",a?{"data-testid":"document-invalid",href:`#adl-${n}-icon-invalid`}:{"data-testid":"document-valid",href:`#adl-${n}-icon-valid`})}))})),C("div",Object.assign({className:"adyen-kyc-dropzone-file__labels"},{children:[C("div",Object.assign({className:"adyen-kyc-dropzone-file__name"},{children:t.name})),C("div",a?Object.assign({className:"adyen-kyc-dropzone-file__error"},{children:i.get(a)}):Object.assign({className:"adyen-kyc-dropzone-file__size"},{children:[C("span",{children:[i.get("complete"),"\xa0"]}),(e=>{if(e){const t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";const a=parseInt(Math.floor(Math.log(e)/Math.log(1024)).toString());return 0===a?`${e} ${t[a]}`:`(${(e/Math.pow(1024,a)).toFixed(1)} ${t[a]})`}return null})(t.size)]}))]})),C("button",Object.assign({type:"button",className:"adyen-kyc-dropzone-file__button",onClick:()=>r(t)},{children:C(xe,{name:"remove"})}))]}))}const gc=e=>{const{name:t,allowedFiletypes:a,maxNumberOfFiles:r,maxSize:n,isOptional:i=!1}=e;let o=[{validate:e=>null==e?void 0:e.every(((e,t)=>t<r)),errorMessage:"tooManyFiles",modes:["blur","input"]},{validate:e=>!(null==e?void 0:e.map((e=>e.name)).some(((e,t,a)=>a.indexOf(e)!==t))),errorMessage:"duplicatedFiles",modes:["blur","input"]},{validate:e=>{const t=a.split(",").map((e=>e.trim()));return null==e?void 0:e.every((e=>t.some((t=>{var a;return null===(a=e.name)||void 0===a?void 0:a.toLocaleLowerCase().endsWith(t.toLocaleLowerCase())}))))},errorMessage:"unsupportedFiletype",modes:["blur","input"]},{validate:e=>null==e?void 0:e.every((e=>!e.size||e.size<n)),errorMessage:"maximumFileSizeExceeded",modes:["blur","input"]}];return i||(o=[{validate:e=>!!(null==e?void 0:e.length),errorMessage:"fieldIsRequired",modes:["blur","input"]},...o]),{[t]:o}};function yc(e){const t=["Bytes","KB","MB","GB","TB"];if(0===e)return"n/a";const a=parseInt(Math.floor(Math.log(e)/Math.log(1024)).toString(),10);return 0===a?`${e} ${t[a]}`:`${(e/Math.pow(1024,a)).toFixed()} ${t[a]}`}function bc(e){var t,r;const{name:n,iconPrefix:i,label:o,maxNumberOfFiles:s,allowedFiletypes:d,multiple:l,required:c,defaultData:u,maxSize:m,id:p,isOptional:g}=e,{i18n:y}=We(),b=ue(null),[f,h]=se(!1),[v,_]=se(!0),N=ue({setState:null}),{data:O,valid:I,errors:E,isValid:T,setData:A,fieldProblems:S,triggerValidation:R,setValid:D,handleChangeFor:k}=ua(Object.assign(Object.assign({},e),{schema:[n],defaultData:u,rules:gc(e)})),L="fieldIsRequired"===(null===(t=null==E?void 0:E[n])||void 0===t?void 0:t.errorMessage);le((()=>{var e;const t=(null===(e=null==O?void 0:O[n])||void 0===e?void 0:e.length)>=s;_(!t),N.current.setState({type:"addToState",value:{data:O,valid:I,errors:E,fieldProblems:S,caller:n,dataStoreId:p}})}),[O,I,E,T]);const w=({files:e})=>{const t=(null==O?void 0:O[n])||[];k(n,"input")([...t,...e])};return this.triggerValidation=R,le((()=>{var t,a,r;(null===(a=null===(t=e.defaultData)||void 0===t?void 0:t[n])||void 0===a?void 0:a[0])?(A(n,null===(r=e.defaultData)||void 0===r?void 0:r[n]),R()):A(n,null)}),[e.defaultData]),le((()=>{const e=null==O?void 0:O[n],t=e&&e.length>0;g&&!t&&D(n,!0)}),[g,O]),C("div",{children:[C(Ys,{stateRef:N}),o&&C("div",Object.assign({className:a("adyen-kyc-label__text",{"adyen-kyc-label__text--error":L})},{children:o})),null===(r=null==O?void 0:O[n])||void 0===r?void 0:r.map((e=>{var t;return C(pc,{file:e,onDelete:e=>(e=>{var t;return k(n,"input")(null===(t=null==O?void 0:O[n])||void 0===t?void 0:t.filter((t=>t!==e)))})(e),errorMessage:null===(t=null==E?void 0:E[n])||void 0===t?void 0:t.errorMessage,iconPrefix:i},e)})),v&&C("div",Object.assign({role:"region",className:a("adyen-kyc-dropzone",{"adyen-kyc-dropzone--dragged":f,"adyen-kyc-dropzone--error":!f&&L}),onDrop:e=>(e=>{e.preventDefault(),e.stopPropagation(),w(e.dataTransfer),h(!1)})(e),onDragOver:e=>(e=>{e.preventDefault(),e.stopPropagation(),h(!0)})(e),onDragEnter:e=>(e=>{e.preventDefault(),e.stopPropagation()})(e),onDragLeave:e=>(e=>{e.preventDefault(),e.stopPropagation(),h(!1)})(e)},{children:[C("div",Object.assign({className:"adyen-kyc-dropzone__icon"},{children:C("svg",Object.assign({height:"100%",width:"100%"},{children:C("use",{href:`#adl-${i}-icon`})}))})),C("div",Object.assign({className:"adyen-kyc-dropzone__labels"},{children:[C("div",Object.assign({className:"adyen-kyc-dropzone__drag-text"},{children:[C("span",{children:[y.get("dragYourFilesHereOr"),"\xa0"]}),C("button",Object.assign({className:"adyen-kyc-dropzone__button",type:"button",onClick:()=>b.current.click()},{children:y.get("browse")}))]})),C("div",Object.assign({className:"adyen-kyc-dropzone__supports-text"},{children:y.get("supports",{values:{fileTypes:d,maxSize:yc(m),maxFiles:s}})}))]})),C("input",{className:"adyen-kyc-dropzone__input",ref:b,multiple:l,accept:d,onChange:e=>(e=>w(e.target))(e),type:"file","aria-required":c,"aria-label":o,"aria-invalid":!I})]})),L&&C("div",Object.assign({className:"adyen-kyc-error-text"},{children:y.get("fieldIsRequired")}))]})}bc.defaultProps={defaultData:[],label:"",required:!0,multiple:!1,maxNumberOfFiles:1,maxSize:4194304,allowedFiletypes:"JPG, JPEG, PNG, PDF",iconPrefix:"generic-document",onChange:()=>{}};const fc=yt((function(e){var a,{documentType:r,documentField:i,guidanceHeader:o,documentTypeSelect:s,guidanceContent:d}=e,l=n(e,["documentType","documentField","guidanceHeader","documentTypeSelect","guidanceContent"]);const{i18n:c}=We(),u=ue(null),[m,p]=se(null),{data:g,errors:y,handleChangeFor:b,fieldProblems:f,triggerValidation:h,valid:v,setData:_}=ua(Object.assign(Object.assign({},l),{schema:["description"],defaultData:l.data,rules:l.validators,fieldProblems:null==l?void 0:l.fieldValidationErrors})),N=ra(l,c),O=ue({setState:null}),I=!((null==l?void 0:l.formVerificationErrors)&&0===(null===(a=Object.keys(null==l?void 0:l.formVerificationErrors))||void 0===a?void 0:a.length)),{selectedType:E,setSelectedType:T,options:A}=s||{};return le((()=>{I&&this.triggerValidation()}),[l.data]),this.triggerValidation=()=>{N.isRequiredField(i)&&u.current.triggerValidation()},le((()=>{O.current.setState({type:"addToState",value:{data:g,valid:v,errors:y,fieldProblems:f,caller:l.id,dataStoreId:l.id,schema:l.requiredFields}})}),[g,v,y,f]),le((()=>{var e,t;p({[i]:null===(e=null==l?void 0:l.data)||void 0===e?void 0:e[i]}),_("description",null===(t=l.data)||void 0===t?void 0:t.description),h()}),[l.data]),C("div",Object.assign({className:`adl-company-document-upload adl-company-document-upload--${i}`},{children:[C(Ys,{owner:l.id,stateRef:O}),C(Ms,{heading:l.heading}),C(qc,{verificationErrors:null==l?void 0:l.formVerificationErrors,validationErrors:null==l?void 0:l.fieldValidationErrors,formUtils:N,id:"ariaErrorField"}),N.isRequiredField(i)&&C(t.Fragment,{children:[o,s?C(Ue,Object.assign({name:"documentType",label:c.get("selectDocumentType",{values:{name:l.name}})},{children:Jt("select",{onChange:e=>T(e.target.value),name:"documentType",placeholder:c.get("selectDocument"),selected:E,items:A.map((({id:e,name:t})=>({id:e,name:c.get(t)})))})})):null,C("div",{children:d}),C(mc,{type:r,className:"adl-u-margin-bottom-24"}),C(bc,{name:i,ref:u,id:l.id,defaultData:m,isOptional:I||N.isOptionalField(i),iconPrefix:uc(r,!0)})]}),N.isRequiredField("description")&&C(Ue,Object.assign({name:"description",label:N.getLabel("description"),helper:c.get("descriptionHelper"),errorMessage:N.getErrorMessage("description",y,f),isValid:v.description},{children:Jt("textArea",{name:"description",value:g.description,classNameModifiers:["description"],maxLength:200,onInput:b("description"),"aria-label":N.getLabel("description"),"aria-invalid":!v.description})}))]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&B(e.documentTypeSelect,t.documentTypeSelect)&&e.documentField===t.documentField));function hc({className:e,children:t,noMarkers:r}){const n=a(["adl-list__item",r&&"adl-list__item--no-markers",e]);return C("li",Object.assign({className:n},{children:t}))}function vc({className:e,nested:t,ordered:r,noMarkers:n,children:i}){const o=a(["adl-list",t&&"adl-list--nested",r&&"adl-list--ordered",n&&"adl-list--no-markers",e]);return C("ul",Object.assign({className:o},{children:i}))}const _c={companyNameAndCountry:{formId:"companyNameAndCountry",formName:"nameAndCountry",fields:nc},companyType:{formId:"companyType",formName:"companyStructure",fields:tl},companyDetails:{formId:"companyDetails",formName:"registrationDetails",fields:zl},companyRegistrationDetails:{formId:"companyRegistrationDetails",formName:"address",fields:["registrationAddress","operationalAddress","operationalAddressIsSame"]},companyRegistrationDocument:{formId:"companyRegistrationDocument",formName:"registrationDocument",fields:["registrationDocument"]},companyTaxDocument:{formId:"companyTaxDocument",formName:"taxDocument",fields:["taxDocument"]}},Nc=_c.companyNameAndCountry.formId,Oc=_c.companyType.formId,Ic=_c.companyDetails.formId,Ec=_c.companyRegistrationDetails.formId,Tc=_c.companyRegistrationDocument.formId,Ac=_c.companyTaxDocument.formId,Sc=[Tc,Ac];var Rc;!function(e){e.BUSINESS_NAME_FILING="doingBusinessAsNameFiling",e.TAX_FILING="taxFiling",e.TRUST_DEED="trustDeed",e.TRUST_INSTRUMENT="trustInstrument"}(Rc||(Rc={}));const Cc={[id.SOLE_PROPRIETORSHIP]:[{id:Rc.BUSINESS_NAME_FILING,name:"doingBusinessAsNameFiling"},{id:Rc.TAX_FILING,name:"taxFiling"}],[id.TRUST]:[{id:Rc.TRUST_DEED,name:"trustDeed"},{id:Rc.TRUST_INSTRUMENT,name:"trustInstrument"}]};const Dc=yt((function(e){var a,{ref:r,id:i,legalEntityType:o}=e,s=n(e,["ref","id","legalEntityType"]);const{i18n:d}=We(),l=C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:d.get("uploadOneOfTheFollowing")})),C(vc,Object.assign({className:"adl-u-margin-left-8"},{children:null===(a=Cc[o])||void 0===a?void 0:a.map((({id:e,name:t})=>C(hc,{children:d.get(t)},e)))})),C("div",Object.assign({className:"adl-u-margin-y-16"},{children:[C("span",{children:[d.get("documentIssuedWithinLastYear")," "]}),C(ed,Object.assign({href:"https://docs.adyen.com/marketplaces-and-platforms/required-kyc-information/document-requirements#constitutional-doc",external:!0},{children:d.get("learnMore")}))]}))]});return C("div",{children:C(fc,Object.assign({},s,{ref:r,documentType:cc.CONSTITUTIONAL_DOCUMENT,documentField:"constitutionalDocument",heading:d.get("constitutionalDocument"),guidanceContent:l,id:i}))})}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name)),kc={solePropNameAndCountry:{formId:"solePropNameAndCountry",formName:"nameAndCountry",fields:nc},solePropRegistrationDetails:{formId:"solePropRegistrationDetails",formName:"registrationDetails",fields:zl},solePropRegistrationAddress:{formId:"solePropRegistrationAddress",formName:"registrationAddress",fields:ml},solePropConstitutionalDocument:{formId:"solePropConstitutionalDocument",formName:"constitutionalDocument",fields:["constitutionalDocument"]}},Lc=kc.solePropNameAndCountry.formId,wc=kc.solePropRegistrationAddress.formId,Pc=kc.solePropRegistrationDetails.formId,jc=kc.solePropConstitutionalDocument.formId;const xc={verificationErrors:{},remediationActions:{},missingData:[],status:Sd.FINISHED,validationErrors:{}},Mc=["2_8036","2_8064","2_8067","2_8189"];function Fc(e){const t=(null==e?void 0:e.capabilities)||{},a={};return Object.values(t).forEach((({problems:e})=>{e&&e.forEach((e=>{var t;if(null==e?void 0:e.entity){const{type:r,id:n}=Wc(e)?null===(t=null==e?void 0:e.entity)||void 0===t?void 0:t.owner:e.entity;a[r]=a[r]||{},a[r][n]=a[r][n]||W(xc),function(e,t){var a;(null===(a=e.verificationErrors)||void 0===a?void 0:a.length)&&e.verificationErrors.forEach((e=>{!function(e,t){switch(e.type){case rd.INVALID_INPUT:!function(e,t){var a,r;const n=null===(a=null==e?void 0:e.subErrors)||void 0===a?void 0:a.reduce(((e,{code:a,remediatingActions:r})=>{const n=null==r?void 0:r.reduce(((e,a)=>{const r=nd[a.code];if(r){const n=r.flatMap((e=>Uc(e))).filter(Boolean),i=null==n?void 0:n.reduce(((e,t)=>{const[a,r]=t.split(/\.(.+)/,2);return e.forms=[...e.forms,a],e.fields=[...e.fields,r],e}),{forms:[],fields:[]}),o=new Set(i.forms.filter(Boolean)),s=new Set(i.fields.filter(Boolean)),d=Object.assign(Object.assign({},a),{forms:[...o],fields:[...s]});e.remActions.push(d),e.forms=[...e.forms,...o],t.remediationActions[d.code]=d}return e}),{forms:[],remActions:[]});return e.childErrorsWithRemActions[a]=null==n?void 0:n.remActions,(null==n?void 0:n.forms)&&(e.allForms=[...e.allForms,...n.forms]),e}),{allForms:[],childErrorsWithRemActions:{}}),i=new Set(null===(r=null==n?void 0:n.allForms)||void 0===r?void 0:r.filter(Boolean));null==i||i.forEach((a=>{(null==t?void 0:t.verificationErrors[a])||(t.verificationErrors[a]={}),t.verificationErrors[a][e.code]||(t.verificationErrors[a][e.code]={}),t.verificationErrors[a][e.code]=n.childErrorsWithRemActions})),Bc(t,Sd.ERROR)}(e,t);break;case rd.DATA_MISSING:Vc(e)||function(e,t){t.missingData=t.missingData?[...t.missingData,e]:[e],Bc(t,Sd.DETAILS_REQUIRED)}(e,t);break;case rd.PENDING_STATUS:Bc(t,Sd.PROCESSING)}}(e,t)}))}(e,a[r][n])}}))})),a}const Vc=e=>Mc.includes(null==e?void 0:e.code);const Uc=e=>{if(!(null==e?void 0:e.key))return null;if("documents"===e.key&&(null==e?void 0:e.type))return e.type.map((e=>Ad[e]));{const[t]=e.key.split(/\.(.+)/,2);switch(t){case id.INDIVIDUAL:return _d[e.key];case id.ORGANIZATION:return vd[e.key];case od.BANK_ACCOUNT:return Nd[e.key];case id.SOLE_PROPRIETORSHIP:return Td[e.key]}}};function Bc(e,t){e.status<t&&(e.status=t)}const Wc=e=>{var t,a;return"document"===(null===(a=null===(t=e.entity)||void 0===t?void 0:t.type)||void 0===a?void 0:a.toLowerCase())},Hc=({verificationErrors:e,formUtils:a})=>{var r,n;const i=e=>a.getVal(`errorMessage_${e}`),o=(e,r)=>{var n,i;if(1===(null==e?void 0:e.length))return a.getVal(`remediationMessage_${e[0].code}`);{const e=r&&Object.keys(r);let o;if((null==e?void 0:e.length)>0)if((null==e?void 0:e.length)>1){const n=[];e.forEach((e=>{var t;n.push(C(hc,{children:C(td,{fieldName:e,label:a.getVal(`remediationMessage_${null===(t=r[e])||void 0===t?void 0:t.remediation.code}`)})}))})),o=C(t.Fragment,{children:[a.getLabel("uploadTheFollowingDocuments"),C(vc,{children:n})]})}else{const t=e[0],s=` ${null===(i=a.getVal(`remediationMessage_${null===(n=r[t])||void 0===n?void 0:n.remediation.code}`))||void 0===i?void 0:i.toLowerCase()}`;o=C(td,{fieldName:t,label:s})}return C(t.Fragment,{children:[`${a.getVal("reviewTheInformationBelowAndCorrectMistakesOr")} `,o,` ${a.getVal("thenResubmit")}`]})}};let s,d;const l=Object.keys(e);1===l.length&&(d=l[0]);const c=Object.values(e).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{}),u=Object.keys(c),m=null===(n=null===(r=Object.values(c))||void 0===r?void 0:r.flat())||void 0===n?void 0:n.reduce(((e,t)=>{var a;const r=(e=>{var t;return null===(t=null==e?void 0:e.forms)||void 0===t?void 0:t.some((e=>e===Wp.idDocument.formId||e===Wp.proofOfResidence.formId||e===Wp.proofOfNationalId.formId||e===(null==_c?void 0:_c.companyRegistrationDocument.formId)||e===(null==_c?void 0:_c.companyTaxDocument.formId)||"payoutAccountDocuments"===e||e===kc.solePropConstitutionalDocument.formId))})(t);return r&&(null===(a=null==t?void 0:t.fields)||void 0===a||a.forEach((a=>e[a]={formName:null==t?void 0:t.forms[0],remediation:t}))),e}),{}),p=Object.values(c).flat();s=1===u.length?C("div",Object.assign({"data-testid":"verification-error--case-"+(1===p.length?"1":"2-1")},{children:[C("span",{children:`${i(u[0])} `}),C("span",{children:o(p,m)})]})):2===u.length?C("div",Object.assign({"data-testid":"verification-error--case-2-2"},{children:[a.getVal("weFoundTheFollowingIssues"),C("ul",{children:u.map((e=>C("li",{children:C("span",{children:i(e)})},e)))}),C("span",{children:o(p,m)})]})):C("div",Object.assign({"data-testid":"verification-error--case-2-3"},{children:o(p,m)}));const g=d?i(d):a.getVal("correctErrorsResubmit");return C(zs,Object.assign({title:g,type:Ks.ERROR,hasCloseButton:!1},{children:C("div",Object.assign({className:"adl-alert__explanation adyen-kyc-error-panel__verification-errors"},{children:s}))}))};function qc({id:e="ariaErrorField",verificationErrors:t,validationErrors:a,formUtils:r}){const n=t&&Object.keys(t).length>0,i=a&&Object.keys(a).length>0;return n||i?C("div",Object.assign({className:"adyen-kyc-error-panel",id:e,"aria-live":"polite"},{children:[n&&!i&&C(Hc,{formUtils:r,verificationErrors:t}),i&&C(ad,{formUtils:r,validationErrors:a})]})):null}class Gc extends t.Component{constructor(){super(...arguments),this.onClick=e=>{e.preventDefault(),this.props.disabled||this.props.onClick(e,{complete:this.complete},null)},this.complete=(e=1e3)=>{this.setState({completed:!0}),setTimeout((()=>{this.setState({completed:!1})}),e)}}render({showAsLink:e,secondary:r,tertiary:n,ghost:i,positive:o,negative:s,className:d,small:l,block:c,circle:u,label:m,icon:p,disabled:g,status:y,type:b,title:f,testId:h,labelHoverBox:v}){const _=e?"adl-link__text":a("adl-button__text",{"adl-button__text--hover-box":v}),N={loading:C(t.Fragment,{children:[m&&C("span",Object.assign({className:_},{children:m})),C("span",Object.assign({className:"adl-button__loader-container"},{children:C(je,{size:"small",inline:!0})}))]}),default:C(t.Fragment,{children:[m&&C("span",Object.assign({className:_},{children:m})),p&&C(xe,{name:p,className:"adl-link__icon"})]})},O=N[y]||N.default,I=e?a("adl-link","adl-link--icon-right",d,{"adl-link--with-icon":!!p}):a("adl-button",d,{"adl-button--icon-left":!!p,"adl-button--secondary":r,"adl-button--tertiary":n&&!r,"adl-button--ghost":i&&!r&&!n,"adl-button--block":c,"adl-button--positive":o,"adl-button--negative":s&&!o,"adl-button--small":l&&m,"adl-button--circle":u,"adl-button--icon":p&&m&&!l,"adl-button--icon-only":p&&(!m||v),"adl-button--icon-small":l&&p&&(!m||v),"adl-button--hover-box":v});return C("button",Object.assign({"data-testid":h,className:I,type:b,title:f,disabled:g,onClick:this.onClick},{children:O}))}}function $c(e){var a,r,n;const{i18n:i,commonProps:o}=We(),s=null!==(r=ke[null===(a=e.data)||void 0===a?void 0:a.country])&&void 0!==r?r:ke.default,[d,l]=se(!1),[c,u]=se(!0),[m,p]=se(!1),y=g(i.locale),b=(null===(n=e.requiredFields)||void 0===n?void 0:n.includes("stateOrProvince"))||e.data.country&&Ce.includes(e.data.country)?s:s.filter((e=>"stateOrProvince"!==e)),f=e.addressType,{data:h,errors:v,valid:_,isValid:N,setData:O,setValid:I,fieldProblems:E,handleChangeFor:T,triggerValidation:A,schema:S}=ua(Object.assign(Object.assign({},e),{schema:b,defaultData:e.data,formatters:Bs,rules:$s,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:[]})),R=ra(Object.assign(Object.assign({},e),{requiredFields:b}),i),D=ue({setState:null});le((()=>{e.data.country!==h.country&&e.data.country&&(b.map((e=>{O(e,""),I(e,!1)})),O("country",e.data.country),I("country",!!e.data.country),l(!1),u(!0))}),[e.data.country]),le((()=>{e.handleAddressSearch&&e.handleFindAddress&&p(!0),(h.city||h.street||h.postalCode)&&(l(!0),u(!1))}),[]),le((()=>{h.postalCode&&T("postalCode","blur")(h.postalCode)}),[h.country]),le((()=>{var t;const a=Oe.reduce(((t,a)=>{if(!R.isRequiredField(a))return delete t[a],t;const r=R.isRequiredField(a)||h[a]||!e.data[a]?"N/A":e.data[a];return Object.assign(Object.assign({},t),{[a]:R.isRequiredField(a)||h[a]?h[a]:r})}),{}),r=f?{data:{[f]:a},valid:{[f]:N},errors:{[f]:v},fieldProblems:{[f]:E}}:{data:a,valid:_,errors:v,fieldProblems:E},n=f?null:{schema:S};D.current.setState({type:"addToState",value:Object.assign(Object.assign(Object.assign({},r),{caller:"address",dataStoreId:e.id}),n)}),null===(t=e.onChange)||void 0===t||t.call(e,Object.assign(Object.assign({},r),{isValid:N}))}),[h,_,v,N]),this.triggerValidation=()=>{l(!0),u(!1),A()};const k=t=>{if(!R.isRequiredField(t))return null;const a="country"===t&&e.hideCountry;return C(na,{allowedCountries:e.allowedCountries,classNameModifiers:[t],data:h,valid:_,errors:v,fieldProblems:E,fieldName:t,onInput:T(t,"input"),onBlur:T(t,"blur"),onDropdownChange:T(t,"blur"),maxlength:Es(Ws,t,h.country,!0),hideField:a,"aria-label":R.getLabel(t,t),trimOnBlur:!0},t)},L=(w=h.country,ke[w]||ke.default);var w;const P=(e,t)=>{O(t,e[t]||""),I(t,!!e[t])};return C("form",Object.assign({className:"adyen-kyc__address adl-u-margin-bottom-48","aria-describedby":o.showInlineErrors?null:"ariaErrorField"},{children:[C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:R,id:"ariaErrorField"}),m?C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-search-address adl-u-margin-bottom-24"},{children:[C(ct,{handleChangeFor:T,data:e.data,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress,legalEntityId:e.legalEntityId,autocompleteAddressForm:e=>{De.includes(e.country)?(b.filter((e=>"houseNumberOrName"!==e)).map((t=>{"street"===t?(e=>{const t=e.houseNumberOrName?`${e.houseNumberOrName} `:"";O("street",`${t}${e.street||""}`||""),I("street",!!e.street)})(e):P(e,t)})),"street2"in e&&(O("houseNumberOrName",e.street2||""),I("houseNumberOrName",!!e.street2))):b.map((t=>P(e,t))),l(!0),u(!1),A()}}),C("div",Object.assign({className:"adyen-kyc-search-address--location"},{children:[C("span",Object.assign({className:"adyen-kyc-search-address--location-country"},{children:[C(xe,{name:"location"})," ",y.getCountryName(e.data.country)]})),c&&C(Gc,{showAsLink:!0,testId:"addAddressManuallyBtn",onClick:()=>(l(!0),void u(!1)),label:i.get("addManually"),title:i.get("addManually")})]}))]})),d&&L.map((e=>k(e)))]}):L.map((e=>k(e))),C(Ys,{owner:e.id,stateRef:D})]}))}Gc.defaultProps={status:"default",disabled:!1,label:"",onClick:()=>{},type:"button"},$c.defaultProps={data:{},onChange:()=>{},visibility:"editable",requiredFields:Oe,countryCode:null};const Xc={firstName:[{validate:Cs,errorMessage:"fieldIsRequired",modes:["blur"]}],lastName:[{validate:Cs,errorMessage:"fieldIsRequired",modes:["blur"]}]},Yc=ks(Ds.replace("-","")),Kc={firstName:{formatter:e=>xs(e).replace(Yc,"")},lastName:{formatter:e=>xs(e).replace(Yc,"")}},zc=["firstName","lastName"];function Zc(e){const{i18n:t,commonProps:a}=We(),r=e.requiredFields||["firstName","lastName"],{handleChangeFor:n,data:i,valid:o,errors:s,fieldProblems:d,isValid:l,triggerValidation:c}=ua(Object.assign(Object.assign({},e),{schema:r,rules:Xc,formatters:Kc,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:u}=e,m=ue({setState:null});le((()=>{m.current.setState({type:"addToState",value:{data:i,valid:o,errors:s,fieldProblems:d,caller:"name",dataStoreId:u}})}),[i,o,s,l]),this.triggerValidation=c;const p=ra(e,t);return C("div",Object.assign({className:"adyen-kyc-field-wrapper"},{children:[C(Ys,{stateRef:m}),p.isRequiredField("firstName")&&C(Ue,Object.assign({name:"firstName",label:p.getLabel("firstName"),classNameModifiers:["firstName","col-50"],errorMessage:p.getErrorMessage("firstName",s,d),isValid:o.firstName,showInlineErrors:a.showInlineErrors,helper:t.get("enterNameExactlyAsAppearInID")},{children:Jt("text",{name:"firstName",value:i.firstName,classNameModifiers:["name"],readonly:p.isReadOnly("firstName"),onInput:n("firstName","input"),onBlur:n("firstName","blur"),trimOnBlur:!0,spellCheck:!1,"aria-required":!0,"aria-label":p.getLabel("firstName"),"aria-invalid":!o.firstName,showInlineErrors:a.showInlineErrors})})),p.isRequiredField("lastName")&&C(Ue,Object.assign({name:"lastName",label:p.getLabel("lastName"),classNameModifiers:["lastName","col-50"],errorMessage:p.getErrorMessage("lastName",s,d),isValid:o.lastName,showInlineErrors:a.showInlineErrors,helper:t.get("enterLastNameExactlyAsAppearInID")},{children:Jt("text",{name:"lastName",value:i.lastName,classNameModifiers:["lastName"],readonly:p.isReadOnly("lastName"),onInput:n("lastName","input"),onBlur:n("lastName","blur"),trimOnBlur:!0,spellCheck:!1,"aria-required":!0,"aria-label":p.getLabel("lastName"),"aria-invalid":!o.lastName,showInlineErrors:a.showInlineErrors})}))]}))}const Qc=yt(Zc,((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)));Zc.defaultProps={data:{},onChange:()=>{},visibility:"editable",validationRules:Xc};var Jc={validCheckCharacter:function(e,t){if(!/^[A-Z]$/.test(e))return!1;const a={0:1,9:21,I:19,R:8,1:0,A:1,J:21,S:12,2:5,B:0,K:2,T:14,3:7,C:5,L:4,U:16,4:9,D:7,M:18,V:10,5:13,E:9,N:20,W:22,6:15,F:13,O:11,X:25,7:17,G:15,P:3,Y:24,8:19,H:17,Q:6,Z:23},r={0:0,9:9,I:8,R:17,1:1,A:0,J:9,S:18,2:2,B:1,K:10,T:19,3:3,C:2,L:11,U:20,4:4,D:3,M:12,V:21,5:5,E:4,N:13,W:22,6:6,F:5,O:14,X:23,7:7,G:6,P:15,Y:24,8:8,H:7,Q:16,Z:25};let n=0;for(let e=0;e<15;e+=1){const i=(e%2==1?r:a)[t.substring(e,e+1)];if(null==i)return!0;n=(n+i)%26}return n>=0&&n<=26&&"ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(n)===e}};const eu={US:{idNumber:{maxlength:4}},US9:{idNumber:{maxlength:9}},BR:{idNumber:{formatter:function(e=""){if("string"!=typeof e)return"";const t=function(e){return e.replace(/[^0-9]/g,"").trim()}(e);return t.length>11?function(e){return e.replace(/^(\d{2})(\d{3})(\d{3})?(\d{4})?(\d{1,2})?$/g,((e,t,a,r,n="",i="")=>`${t}.${a}.${r}/${n}${i.length?`-${i}`:""}`))}(t):function(e){return e.replace(/\W/gi,"").replace(/(\d{3})(?!$)/g,"$1.").replace(/(.{11}).(\d{1,2})$/g,"$1-$2")}(t)},maxlength:18}}},tu={US:/^\d{4}$/,US9:/^\d{9}$/,CA:/^\d{9}$/,IT:/^[A-Z]{6}[0-9]{2}[ABCDEHLMPRST][0-9]{2}[A-Z][0-9]{3}[A-Z]$/,ES:/(^[KL]?\d{7,8}[A-Z]$)|(^[MXYZ]\d{7}[A-Z]$)/,BR:/(^\d{3}\.\d{3}\.\d{3}-\d{2}$)|(^\d{2}\.\d{3}\.\d{3}\/\d{4}-\d{2}$)/,SE:/^\d{10,12}$/},au={idNumber:[{validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"}]},ru={US:{idNumber:[{validate:e=>tu.US.test(e),modes:["blur"],errorMessage:"useSSNFormatUS"}]},US9:{idNumber:[{validate:e=>tu.US9.test(e),modes:["blur"],errorMessage:"use9DigitsSSNFormatUS"}]},CA:{idNumber:[{validate:e=>tu.CA.test(e),modes:["blur"],errorMessage:"useSSNFormatCA"}]},IT:{idNumber:[{validate:e=>tu.IT.test(e)&&Jc.validCheckCharacter(e.substring(15,16),e.substring(0,15)),modes:["blur"],errorMessage:"invalidFormat"}]},ES:{idNumber:[{validate:e=>tu.ES.test(e),modes:["blur"],errorMessage:"invalidFormat"}]},SE:{idNumber:[{validate:e=>tu.SE.test(e),modes:["blur"],errorMessage:"invalidFormat"}]},BR:{idNumber:[{validate:e=>tu.BR.test(e),modes:["blur"],errorMessage:"invalidFormat"}]}},nu=["idNumber","idNumberExempt"];function iu(e){const{i18n:a,commonProps:r}=We(),[n,i]=se(e.errors),[o,s]=se(Object.assign(Object.assign({},e.data),{idNumberExempt:!!e.data.idNumberExempt})),d=me((()=>function(e,t,a){if(!a||!t[a])return e;const r={};return Object.entries(e).forEach((([e,n])=>{const i=t[a][e];r[e]=i?Object.assign(Object.assign({},n),i):n})),Object.entries(t[a]).forEach((([e,t])=>{r[e]||(r[e]=t)})),r}({},eu,e.country)),[e.country]),l=((e,t)=>{var a;return(null===(a=e[t])||void 0===a?void 0:a.maxlength)||30})(d,"idNumber"),c=me((()=>Ts(au,ru,e.country)),[e.country]),{handleChangeFor:u,data:m,valid:p,errors:g,fieldProblems:y,triggerValidation:b,setValid:f}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields||o.idNumberExempt?["idNumberExempt"]:["idNumber","idNumberExempt"].idNumber,formatters:d,rules:c,defaultData:Object.assign(Object.assign({},e.data),{idNumberExempt:!!e.data.idNumberExempt}),fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:h}=e,v=ra(e,a),_=ue({setState:null});le((()=>{if(e.errors&&e.errors.idNumber){const t=F("idNumber").from(e.errors);i(Object.assign(Object.assign({},n),t)),f("idNumber",!1)}}),[e.errors]),le((()=>{o.idNumber&&u("idNumber","blur")(o.idNumber)}),[e.country]),le((()=>{const t=!(!B(o,m)||!e.errors||!Object.keys(e.errors).length);i(Object.assign(Object.assign(Object.assign({},n),g),t&&n)),t&&f("idNumber",!1),s(Object.assign(Object.assign({},o),m))}),[g,m]),le((()=>{const e=Object.assign({},p);e.idNumber=!!o.idNumberExempt||p.idNumber;const t=Object.assign({},o);t.idNumber=o.idNumberExempt?null:o.idNumber,_.current.setState({type:"addToState",value:{data:t,valid:e,errors:n,fieldProblems:y,caller:"idNum",dataStoreId:h}})}),[o,p,n,y]),this.triggerValidation=b;const N=[v.isRequiredField("idNumberExempt")?"idNumberWithExempt":"idNumber"];return e.classNames&&N.push(...e.classNames),C("div",Object.assign({className:"adyen-kyc-field__id-number"},{children:v.isRequiredField("idNumber")&&C(t.Fragment,{children:[C(Ue,Object.assign({name:"idNumber",label:v.getLabel("idNumber"),classNameModifiers:N,errorMessage:v.getErrorMessage("idNumber",n,y),disabled:o.idNumberExempt,isValid:p.idNumber,showInlineErrors:r.showInlineErrors,dataPlaceholder:o.idNumber&&e.dataPlaceholder},{children:Jt("text",Object.assign(Object.assign({name:"idNumber",value:o.idNumber,placeholder:v.getPlaceholder("idNumber"),readonly:v.isReadOnly("idNumber"),onInput:u("idNumber","input"),onBlur:u("idNumber","blur"),"aria-required":!0,"aria-label":v.getLabel("idNumber","idNumber"),"aria-invalid":!p.idNumber,inputmode:"numeric",maxLength:l},o.idNumberExempt&&{disabled:!0}),{showInlineErrors:r.showInlineErrors}))})),C(Ue,Object.assign({classNameModifiers:["idNumber__checkbox"],name:"idNumberExempt"},{children:v.isRequiredField("idNumberExempt")&&C(at,{label:v.getLabel("idNumberExempt"),checked:o.idNumberExempt,classNameModifiers:["idNumberExempt"],name:"idNumberExempt",onChange:u("idNumberExempt")})})),C(Ys,{owner:"IdNumberComp",stateRef:_})]})}))}const ou=yt(iu,((e,t)=>e.country===t.country&&B(e.errors,t.errors)&&B(e.labels,t.labels)&&B(e.requiredFields,t.requiredFields)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)));iu.defaultProps={data:{},onChange:()=>{}};const su={birthDate:[{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},{modes:["blur"],validate:e=>e&&new Date(e)<new Date,errorMessage:"invalidDateOfBirth"}],residencyCountry:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},jobTitle:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},du="idNumber",lu=(e,t,a)=>i(void 0,void 0,void 0,(function*(){const r={name:{firstName:e.data.firstName,lastName:e.data.lastName},countryCode:t,idNumber:e.data.idNumber};try{const e=yield(n=a.loadingContext,o=a.clientKey,s=r,N({loadingContext:n,errorLevel:"warn",errorMessage:"Id verification is not available",errorHandler:e=>i(void 0,void 0,void 0,(function*(){const t=yield e;return 422===t.status?{status:422,message:t.detail,errorCode:t.errorCode}:500===t.status?{status:500,message:"Service did not respond, do not block verification"}:console.warn(`Unexpected response status ${t.status}`)})),path:"v1/verification/idNumber",clientKey:o},s));if(422===(null==e?void 0:e.status)||"false"===(null==e?void 0:e.verified))return{status:"error",data:e,fieldName:du,translationKey:"unableToVerifyTheIdNumber"};if(500===(null==e?void 0:e.status))return{status:"verified",data:e,fieldName:du};if("true"===(null==e?void 0:e.verified))return{status:"verified",data:e,fieldName:du}}catch(e){console.warn("WARNING: idNumber verification failed - error:",e)}var n,o,s}));const cu={role:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},uu=[{roleTypes:[qd.OWNER,qd.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[qd.OWNER],min:0,max:4},{roleTypes:[qd.CONTROLLING_PERSON],min:0,max:1/0},{roleTypes:[qd.SIGNATORY],min:1,max:1/0}],mu={US:[{roleTypes:[qd.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[qd.OWNER],min:0,max:4},{roleTypes:[qd.SIGNATORY],min:1,max:1/0}],BR:[{roleTypes:[qd.CONTROLLING_PERSON],min:1,max:1/0},{roleTypes:[qd.OWNER],min:0,max:4},{roleTypes:[qd.SIGNATORY],min:1,max:1/0}],AU:[...uu,{roleTypes:[qd.DIRECTOR],min:3,max:1/0}],CA:[...uu,{roleTypes:[qd.DIRECTOR],min:1,max:1/0}],HK:[...uu,{roleTypes:[qd.DIRECTOR],min:1,max:1/0}],IN:[...uu,{roleTypes:[qd.DIRECTOR],min:3,max:15}],NZ:[...uu,{roleTypes:[qd.DIRECTOR],min:1,max:1/0}],SG:[...uu,{roleTypes:[qd.DIRECTOR],min:1,max:1/0}]},pu=e=>mu[e]||uu;const gu={[qd.OWNER]:"provideAllOwners",[qd.CONTROLLING_PERSON]:"ifNoOwnersSpecifyControllingPersons",[qd.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeastOne",[qd.SIGNATORY]:"provideAtLeastOneSignatory"},yu={US:{[qd.CONTROLLING_PERSON]:"provideOneControllingPerson"},BR:{[qd.CONTROLLING_PERSON]:"provideOneControllingPerson"},AU:{[qd.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeastThree"},IN:{[qd.DIRECTOR]:"provideAllDirectorsYouShouldHaveAtLeast3AndAtMost15"}},bu=e=>Object.assign(Object.assign({},gu),yu[e]),fu=e=>{if(null==e?void 0:e.entityAssociations){const t=Object.values(qd);return e.entityAssociations.filter((a=>t.includes(a.type)&&a.associatorId===e.id))}return[]},hu=e=>fu(e).filter((e=>e.type===qd.SIGNATORY)),vu=e=>{var t;return null===(t=fu(e))||void 0===t?void 0:t.map((e=>e.legalEntityId))},_u=e=>fu(e).reduce(((e,t)=>{var a;return e[t.type]=(null!==(a=e[t.type])&&void 0!==a?a:0)+1,e}),{}),Nu=(e,t)=>{var a,r;if(t===Rd.TRUST_MEMBER_COMPANY_OWNER)return[qd.OWNER];const n=_u(e),i=null===(r=null===(a=null==e?void 0:e.organization)||void 0===a?void 0:a.registeredAddress)||void 0===r?void 0:r.country,o=pu(i).reduce(((e,t)=>{var a;const{roleTypes:r,max:i}=t;if(1===r.length){const t=r[0];(null!==(a=null==n?void 0:n[t])&&void 0!==a?a:0)<i&&e.push(t)}return e}),[]);return[...new Set(o)]},Ou=e=>{var t,a;const r=_u(e),n=null===(a=null===(t=null==e?void 0:e.organization)||void 0===t?void 0:t.registeredAddress)||void 0===a?void 0:a.country;return pu(n).every((e=>{const{roleTypes:t,min:a}=e;return t.some((e=>{var t;return!a||(null!==(t=null==r?void 0:r[e])&&void 0!==t?t:0>=a)}))}))},Iu={[qd.CONTROLLING_PERSON]:{id:qd.CONTROLLING_PERSON,name:"controllingPerson",description:"controllingPersonDescription",className:"adl-tag--teal"},[qd.OWNER]:{id:qd.OWNER,name:"owner",description:"ownerDescription",className:"adl-tag--purple"},[qd.SIGNATORY]:{id:qd.SIGNATORY,name:"signatory",description:"signatoryDescription",className:"adl-tag--light-blue"},[qd.DIRECTOR]:{id:qd.DIRECTOR,name:"director",description:"directorDescription",className:"adl-tag--orange"}},Eu=["role"];function Tu(e){var a;const{i18n:r,commonProps:n}=We(),{data:i,valid:o,errors:s,isValid:d,fieldProblems:l,triggerValidation:c,handleChangeFor:u}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields||["role"],rules:e.validators||cu,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors})),{dataStoreId:m}=e,p=ue({setState:null}),[g,y]=se([]);le((()=>{p.current.setState({type:"addToState",value:{data:i,valid:o,errors:s,fieldProblems:l,caller:"Role",dataStoreId:m}})}),[i,o,s,d]),this.triggerValidation=c;const b=ra(e,r);return le((()=>{y(((e,t)=>Object.values(Iu).filter((e=>0===(null==t?void 0:t.length)||(null==t?void 0:t.includes(e.id)))).map((t=>Object.assign(Object.assign({},t),{name:e.get(t.name),description:e.get(t.description)}))))(r,null==e?void 0:e.allowedRoles))}),[null===(a=null==e?void 0:e.allowedRoles)||void 0===a?void 0:a.toString(),r.languageCode,r.locale]),C("div",Object.assign({className:"adyen-kyc-field__role"},{children:[C(Ys,{stateRef:p}),b.isRequiredField("role",!1)&&C(t.Fragment,{children:C(Ue,Object.assign({name:"role",classNameModifiers:["role"],label:r.get("role"),errorMessage:b.getErrorMessage("role",s,l),isValid:o.role,showInlineErrors:n.showInlineErrors},{children:Jt("select",{onChange:u("role","input"),name:"role",placeholder:r.get("rolePlaceholder"),selected:i.role,items:g,readonly:e.readOnly&&!!i.role,showInlineErrors:n.showInlineErrors,filterable:!1,isMulti:!0})}))})]}))}const Au={phoneNumber:{modes:["blur"],validate:e=>r.phone(e,{validateMobilePrefix:!1}).isValid,errorMessage:"invalidPhoneNumber"}},Su={phoneNumber:{formatter:e=>e.replace(ks("^+|\\d","g"),"")}},Ru=["phoneNumber"];function Cu(e){var t,a,r;const{i18n:n,commonProps:i}=We(),{dataStoreId:o,country:s}=e,d=ue({setState:null}),l=ra(e,n),c=null!==(r=null===(a=null===(t=e.phonePrefixes)||void 0===t?void 0:t.find((e=>e.id===s)))||void 0===a?void 0:a.name)&&void 0!==r?r:"+1",{handleChangeFor:u,data:m,valid:p,errors:g,fieldProblems:y,isValid:b,triggerValidation:f}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields,defaultData:e.data,formatters:Su,rules:e.validators||Au,fieldProblems:null==e?void 0:e.fieldValidationErrors}));return le((()=>{d.current.setState({type:"addToState",value:{data:m,valid:p,errors:g,fieldProblems:y,caller:"phoneInput",dataStoreId:o}})}),[m,p,g,b]),this.triggerValidation=f,C("div",Object.assign({className:"adyen-kyc-phone-input"},{children:[C(Ys,{stateRef:d}),l.isRequiredField("phoneNumber")&&C(Ue,Object.assign({name:"phoneNumber",label:l.getLabel("phoneNumber"),classNameModifiers:["phone-input"],isValid:p.phoneNumber,errorMessage:l.getErrorMessage("phoneNumber",g,y),showInlineErrors:i.showInlineErrors},{children:Jt("tel",{name:"phoneNumber",value:m.phoneNumber,placeholder:c,readonly:l.isReadOnly("phoneNumber"),onInput:u("phoneNumber","input"),onBlur:u("phoneNumber","blur"),"aria-required":!0,"aria-label":l.getLabel("phoneNumber"),"aria-invalid":!p.phoneNumber,showInlineErrors:i.showInlineErrors})}))]}))}Cu.defaultProps={phoneLabel:"telephoneNumber"};const Du=yt(Cu,((e,t)=>e.country===t.country&&e.phonePrefixes==t.phonePrefixes)),ku={email:{modes:["blur"],validate:e=>/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e),errorMessage:"invalidEmail"}},Lu=[...Ru,"email"];function wu(e){const{i18n:t,commonProps:a}=We(),r=ue(null),{dataStoreId:n,country:i}=e,o=e.requiredFields||Lu,{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:o,defaultData:e.data,rules:e.validators||ku,fieldProblems:null==e?void 0:e.fieldValidationErrors})),y=ra(e,t),b=ue({setState:null});le((()=>{b.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:g,caller:"contactDetails",dataStoreId:n}})}),[d,l,c,u]);const{dataset:f}=ea(m),h=Dd(e,Ru);return this.triggerValidation=()=>{p(),r.current.triggerValidation()},C("div",Object.assign({role:"form",className:"adyen-kyc-individual__contact-details"},{children:[C(Ys,{owner:"ContactDetails",stateRef:b}),C(Ms,{heading:e.heading}),y.isRequiredField("email")&&C("div",Object.assign({className:"adyen-kyc-email"},{children:C(Ue,Object.assign({name:"email",label:y.getLabel("email"),classNameModifiers:["email"],errorMessage:y.getErrorMessage("email",c,g),isValid:l.email,showInlineErrors:a.showInlineErrors},{children:Jt("email",{name:"email",value:d.email,readonly:y.isReadOnly("email"),classNameModifiers:["email"],onInput:s("email","input"),onBlur:s("email","blur"),"aria-required":!0,"aria-label":y.getLabel("email"),"aria-invalid":!l.email,showInlineErrors:a.showInlineErrors})}))})),y.isRequiredField("phoneNumber")&&C(Du,Object.assign({},h,{ref:r,showInlineErrors:a.showInlineErrors,dataStoreId:n,country:i,phonePrefixes:f}))]}))}const Pu=yt(wu,((e,t)=>e.country===t.country&&B(e.labels,t.labels)&&B(e.requiredFields,t.requiredFields)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)));wu.defaultProps={data:{}};var ju={"adl-u-screen-reader-only":"LoaderWrapper-module_adl-u-screen-reader-only__DQoId","adl-u-screen-reader-only-focusable":"LoaderWrapper-module_adl-u-screen-reader-only-focusable__OWQql","adl-u-text-align-center":"LoaderWrapper-module_adl-u-text-align-center__Fv6Ch","adl-u-text-align-left":"LoaderWrapper-module_adl-u-text-align-left__Xjhn1","adl-u-text-align-right":"LoaderWrapper-module_adl-u-text-align-right__GeJtt","adl-u-text-align-justify":"LoaderWrapper-module_adl-u-text-align-justify__-XTV-","adl-u-vertical-align-baseline":"LoaderWrapper-module_adl-u-vertical-align-baseline__KTZlu","adl-u-vertical-align-top":"LoaderWrapper-module_adl-u-vertical-align-top__A3yt3","adl-u-vertical-align-middle":"LoaderWrapper-module_adl-u-vertical-align-middle__QRNN8","adl-u-vertical-align-bottom":"LoaderWrapper-module_adl-u-vertical-align-bottom__Qi7G6","adl-u-vertical-align-text-top":"LoaderWrapper-module_adl-u-vertical-align-text-top__ss2jj","adl-u-vertical-align-text-bottom":"LoaderWrapper-module_adl-u-vertical-align-text-bottom__S7o5N","adl-u-float-left":"LoaderWrapper-module_adl-u-float-left__38-jH","adl-u-float-right":"LoaderWrapper-module_adl-u-float-right__PMpVS","adl-u-border-none":"LoaderWrapper-module_adl-u-border-none__nPmt-","adl-u-border-bottom-none":"LoaderWrapper-module_adl-u-border-bottom-none__LYeO1","adl-u-border-left-none":"LoaderWrapper-module_adl-u-border-left-none__Tu-nP","adl-u-border-right-none":"LoaderWrapper-module_adl-u-border-right-none__JJ7aQ","adl-u-border-top-none":"LoaderWrapper-module_adl-u-border-top-none__Q2SD8","adl-u-border-x-none":"LoaderWrapper-module_adl-u-border-x-none__o5pHH","adl-u-border-y-none":"LoaderWrapper-module_adl-u-border-y-none__4DM3l","adl-u-border-radius-4":"LoaderWrapper-module_adl-u-border-radius-4__HzmsL","adl-u-border-radius-6":"LoaderWrapper-module_adl-u-border-radius-6__24Y5b","adl-u-border-radius-8":"LoaderWrapper-module_adl-u-border-radius-8__rVBWa","adl-u-border-radius-12":"LoaderWrapper-module_adl-u-border-radius-12__AdNdi","adl-u-color-white":"LoaderWrapper-module_adl-u-color-white__cNLJe","adl-u-color-black":"LoaderWrapper-module_adl-u-color-black__7TChY","adl-u-color-grey-10":"LoaderWrapper-module_adl-u-color-grey-10__15TdJ","adl-u-color-grey-20":"LoaderWrapper-module_adl-u-color-grey-20__z4cS2","adl-u-color-grey-30":"LoaderWrapper-module_adl-u-color-grey-30__-6nob","adl-u-color-grey-40":"LoaderWrapper-module_adl-u-color-grey-40__Xnj9-","adl-u-color-grey-50":"LoaderWrapper-module_adl-u-color-grey-50__PNpJV","adl-u-color-grey-60":"LoaderWrapper-module_adl-u-color-grey-60__UrNCf","adl-u-color-grey-70":"LoaderWrapper-module_adl-u-color-grey-70__uziyz","adl-u-color-info-10":"LoaderWrapper-module_adl-u-color-info-10__N43Gu","adl-u-color-info-20":"LoaderWrapper-module_adl-u-color-info-20__zpreA","adl-u-color-info-30":"LoaderWrapper-module_adl-u-color-info-30__NP7MT","adl-u-color-info-40":"LoaderWrapper-module_adl-u-color-info-40__6lvzm","adl-u-color-info-50":"LoaderWrapper-module_adl-u-color-info-50__BFzTv","adl-u-color-info-60":"LoaderWrapper-module_adl-u-color-info-60__tE1pM","adl-u-color-info-70":"LoaderWrapper-module_adl-u-color-info-70__dwsFG","adl-u-color-warning-10":"LoaderWrapper-module_adl-u-color-warning-10__JkQtP","adl-u-color-warning-20":"LoaderWrapper-module_adl-u-color-warning-20__4Ezb-","adl-u-color-warning-30":"LoaderWrapper-module_adl-u-color-warning-30__uViH0","adl-u-color-warning-40":"LoaderWrapper-module_adl-u-color-warning-40__GMfPZ","adl-u-color-warning-50":"LoaderWrapper-module_adl-u-color-warning-50__ozrs8","adl-u-color-warning-60":"LoaderWrapper-module_adl-u-color-warning-60__arejd","adl-u-color-warning-70":"LoaderWrapper-module_adl-u-color-warning-70__OC1kC","adl-u-color-success-10":"LoaderWrapper-module_adl-u-color-success-10__sDjeQ","adl-u-color-success-20":"LoaderWrapper-module_adl-u-color-success-20__pAhsC","adl-u-color-success-30":"LoaderWrapper-module_adl-u-color-success-30__8lceW","adl-u-color-success-40":"LoaderWrapper-module_adl-u-color-success-40__-OVhR","adl-u-color-success-50":"LoaderWrapper-module_adl-u-color-success-50__w9iGp","adl-u-color-success-60":"LoaderWrapper-module_adl-u-color-success-60__TycSy","adl-u-color-success-70":"LoaderWrapper-module_adl-u-color-success-70__D-MTJ","adl-u-color-error-10":"LoaderWrapper-module_adl-u-color-error-10__ZAdis","adl-u-color-error-20":"LoaderWrapper-module_adl-u-color-error-20__a-5Z-","adl-u-color-error-30":"LoaderWrapper-module_adl-u-color-error-30__Wl5Tz","adl-u-color-error-40":"LoaderWrapper-module_adl-u-color-error-40__Rs-dp","adl-u-color-error-50":"LoaderWrapper-module_adl-u-color-error-50__aqx4o","adl-u-color-error-60":"LoaderWrapper-module_adl-u-color-error-60__s-cif","adl-u-color-error-70":"LoaderWrapper-module_adl-u-color-error-70__mtXLl","adl-u-color-mint-10":"LoaderWrapper-module_adl-u-color-mint-10__PyCeD","adl-u-color-mint-20":"LoaderWrapper-module_adl-u-color-mint-20__BVsuB","adl-u-color-mint-30":"LoaderWrapper-module_adl-u-color-mint-30__rFs6a","adl-u-color-mint-40":"LoaderWrapper-module_adl-u-color-mint-40__NLecv","adl-u-color-mint-50":"LoaderWrapper-module_adl-u-color-mint-50__KcoB4","adl-u-color-mint-60":"LoaderWrapper-module_adl-u-color-mint-60__mr5uU","adl-u-color-mint-70":"LoaderWrapper-module_adl-u-color-mint-70__ag2je","adl-u-color-brand":"LoaderWrapper-module_adl-u-color-brand__rRrDv","adl-u-color-default":"LoaderWrapper-module_adl-u-color-default__YfVqx","adl-u-color-disabled":"LoaderWrapper-module_adl-u-color-disabled__7bzQH","adl-u-color-quiet":"LoaderWrapper-module_adl-u-color-quiet__XPiq1","adl-u-color-inherit":"LoaderWrapper-module_adl-u-color-inherit__wR51M","adl-u-background-color-white":"LoaderWrapper-module_adl-u-background-color-white__fSJZ5","adl-u-background-color-black":"LoaderWrapper-module_adl-u-background-color-black__ChDOa","adl-u-background-color-grey-10":"LoaderWrapper-module_adl-u-background-color-grey-10__oPGfO","adl-u-background-color-grey-20":"LoaderWrapper-module_adl-u-background-color-grey-20__Ejfz-","adl-u-background-color-grey-30":"LoaderWrapper-module_adl-u-background-color-grey-30__hHjTO","adl-u-background-color-grey-40":"LoaderWrapper-module_adl-u-background-color-grey-40__SqH04","adl-u-background-color-grey-50":"LoaderWrapper-module_adl-u-background-color-grey-50__tUUPG","adl-u-background-color-grey-60":"LoaderWrapper-module_adl-u-background-color-grey-60__6i9MM","adl-u-background-color-grey-70":"LoaderWrapper-module_adl-u-background-color-grey-70__yqto5","adl-u-background-color-info-10":"LoaderWrapper-module_adl-u-background-color-info-10__Fol0t","adl-u-background-color-info-20":"LoaderWrapper-module_adl-u-background-color-info-20__-EOoN","adl-u-background-color-info-30":"LoaderWrapper-module_adl-u-background-color-info-30__yE1pC","adl-u-background-color-info-40":"LoaderWrapper-module_adl-u-background-color-info-40__tdB5Q","adl-u-background-color-info-50":"LoaderWrapper-module_adl-u-background-color-info-50__B3rBR","adl-u-background-color-info-60":"LoaderWrapper-module_adl-u-background-color-info-60__tNiM1","adl-u-background-color-info-70":"LoaderWrapper-module_adl-u-background-color-info-70__D6w2L","adl-u-background-color-warning-10":"LoaderWrapper-module_adl-u-background-color-warning-10__r1C9L","adl-u-background-color-warning-20":"LoaderWrapper-module_adl-u-background-color-warning-20__nxgBf","adl-u-background-color-warning-30":"LoaderWrapper-module_adl-u-background-color-warning-30__e7cgV","adl-u-background-color-warning-40":"LoaderWrapper-module_adl-u-background-color-warning-40__gFU3n","adl-u-background-color-warning-50":"LoaderWrapper-module_adl-u-background-color-warning-50__kdnCI","adl-u-background-color-warning-60":"LoaderWrapper-module_adl-u-background-color-warning-60__N1FBx","adl-u-background-color-warning-70":"LoaderWrapper-module_adl-u-background-color-warning-70__tseV-","adl-u-background-color-success-10":"LoaderWrapper-module_adl-u-background-color-success-10__nUC4T","adl-u-background-color-success-20":"LoaderWrapper-module_adl-u-background-color-success-20__8KaLI","adl-u-background-color-success-30":"LoaderWrapper-module_adl-u-background-color-success-30__G3UnZ","adl-u-background-color-success-40":"LoaderWrapper-module_adl-u-background-color-success-40__yRUO-","adl-u-background-color-success-50":"LoaderWrapper-module_adl-u-background-color-success-50__rrdfi","adl-u-background-color-success-60":"LoaderWrapper-module_adl-u-background-color-success-60__wK7hE","adl-u-background-color-success-70":"LoaderWrapper-module_adl-u-background-color-success-70__hMaj-","adl-u-background-color-error-10":"LoaderWrapper-module_adl-u-background-color-error-10__Q6Rw6","adl-u-background-color-error-20":"LoaderWrapper-module_adl-u-background-color-error-20__H7Mk8","adl-u-background-color-error-30":"LoaderWrapper-module_adl-u-background-color-error-30__GseU6","adl-u-background-color-error-40":"LoaderWrapper-module_adl-u-background-color-error-40__F-0vo","adl-u-background-color-error-50":"LoaderWrapper-module_adl-u-background-color-error-50__2C5nG","adl-u-background-color-error-60":"LoaderWrapper-module_adl-u-background-color-error-60__cWt-3","adl-u-background-color-error-70":"LoaderWrapper-module_adl-u-background-color-error-70__UliQ9","adl-u-background-color-mint-10":"LoaderWrapper-module_adl-u-background-color-mint-10__B5yYA","adl-u-background-color-mint-20":"LoaderWrapper-module_adl-u-background-color-mint-20__udcWT","adl-u-background-color-mint-30":"LoaderWrapper-module_adl-u-background-color-mint-30__Pvdfd","adl-u-background-color-mint-40":"LoaderWrapper-module_adl-u-background-color-mint-40__YSfUE","adl-u-background-color-mint-50":"LoaderWrapper-module_adl-u-background-color-mint-50__II2ur","adl-u-background-color-mint-60":"LoaderWrapper-module_adl-u-background-color-mint-60__JdCfY","adl-u-background-color-mint-70":"LoaderWrapper-module_adl-u-background-color-mint-70__XOOr7","adl-u-background-color-brand":"LoaderWrapper-module_adl-u-background-color-brand__StC5S","adl-u-background-color-default":"LoaderWrapper-module_adl-u-background-color-default__QqksR","adl-u-background-color-disabled":"LoaderWrapper-module_adl-u-background-color-disabled__F51GC","adl-u-background-color-quiet":"LoaderWrapper-module_adl-u-background-color-quiet__T-6X6","adl-u-background-color-inherit":"LoaderWrapper-module_adl-u-background-color-inherit__8L6-A","adl-u-overflow-auto":"LoaderWrapper-module_adl-u-overflow-auto__RLoFT","adl-u-overflow-hidden":"LoaderWrapper-module_adl-u-overflow-hidden__OdlT5","adl-u-overflow-scroll":"LoaderWrapper-module_adl-u-overflow-scroll__fF-sR","adl-u-overflow-visible":"LoaderWrapper-module_adl-u-overflow-visible__AD6V1","adl-u-overflow-x-auto":"LoaderWrapper-module_adl-u-overflow-x-auto__kVp7e","adl-u-overflow-x-hidden":"LoaderWrapper-module_adl-u-overflow-x-hidden__6HBtz","adl-u-overflow-x-scroll":"LoaderWrapper-module_adl-u-overflow-x-scroll__1O2-5","adl-u-overflow-x-visible":"LoaderWrapper-module_adl-u-overflow-x-visible__cNwIF","adl-u-overflow-y-auto":"LoaderWrapper-module_adl-u-overflow-y-auto__EHpmv","adl-u-overflow-y-hidden":"LoaderWrapper-module_adl-u-overflow-y-hidden__N84EW","adl-u-overflow-y-scroll":"LoaderWrapper-module_adl-u-overflow-y-scroll__M-nRc","adl-u-overflow-y-visible":"LoaderWrapper-module_adl-u-overflow-y-visible__s7JYN","adl-u-position-static":"LoaderWrapper-module_adl-u-position-static__9uW2P","adl-u-position-relative":"LoaderWrapper-module_adl-u-position-relative__20QN5","adl-u-position-absolute":"LoaderWrapper-module_adl-u-position-absolute__5JTK4","adl-u-position-sticky":"LoaderWrapper-module_adl-u-position-sticky__-v5nH","adl-u-position-fixed":"LoaderWrapper-module_adl-u-position-fixed__pybl1","adl-u-bottom-0":"LoaderWrapper-module_adl-u-bottom-0__63q6H","adl-u-left-0":"LoaderWrapper-module_adl-u-left-0__REQp7","adl-u-right-0":"LoaderWrapper-module_adl-u-right-0__LZOKr","adl-u-top-0":"LoaderWrapper-module_adl-u-top-0__LWq7N","adl-u-padding-2":"LoaderWrapper-module_adl-u-padding-2__3aY1d","adl-u-padding-bottom-2":"LoaderWrapper-module_adl-u-padding-bottom-2__wnJkv","adl-u-padding-left-2":"LoaderWrapper-module_adl-u-padding-left-2__x77IQ","adl-u-padding-right-2":"LoaderWrapper-module_adl-u-padding-right-2__v2l5C","adl-u-padding-top-2":"LoaderWrapper-module_adl-u-padding-top-2__29G-e","adl-u-padding-x-2":"LoaderWrapper-module_adl-u-padding-x-2__IEaLB","adl-u-padding-y-2":"LoaderWrapper-module_adl-u-padding-y-2__r-5Ne","adl-u-padding-4":"LoaderWrapper-module_adl-u-padding-4__Qf7Qu","adl-u-padding-bottom-4":"LoaderWrapper-module_adl-u-padding-bottom-4__W8RCl","adl-u-padding-left-4":"LoaderWrapper-module_adl-u-padding-left-4__EvyNL","adl-u-padding-right-4":"LoaderWrapper-module_adl-u-padding-right-4__dtmEh","adl-u-padding-top-4":"LoaderWrapper-module_adl-u-padding-top-4__e-ilN","adl-u-padding-x-4":"LoaderWrapper-module_adl-u-padding-x-4__4-z31","adl-u-padding-y-4":"LoaderWrapper-module_adl-u-padding-y-4__GGdPs","adl-u-padding-8":"LoaderWrapper-module_adl-u-padding-8__2NE20","adl-u-padding-bottom-8":"LoaderWrapper-module_adl-u-padding-bottom-8__yOXFD","adl-u-padding-left-8":"LoaderWrapper-module_adl-u-padding-left-8__cQfHL","adl-u-padding-right-8":"LoaderWrapper-module_adl-u-padding-right-8__UFca4","adl-u-padding-top-8":"LoaderWrapper-module_adl-u-padding-top-8__rDdlL","adl-u-padding-x-8":"LoaderWrapper-module_adl-u-padding-x-8__-tsFE","adl-u-padding-y-8":"LoaderWrapper-module_adl-u-padding-y-8__p67T8","adl-u-padding-16":"LoaderWrapper-module_adl-u-padding-16__wyIs0","adl-u-padding-bottom-16":"LoaderWrapper-module_adl-u-padding-bottom-16__ZbBMG","adl-u-padding-left-16":"LoaderWrapper-module_adl-u-padding-left-16__IZcWh","adl-u-padding-right-16":"LoaderWrapper-module_adl-u-padding-right-16__XX-Gm","adl-u-padding-top-16":"LoaderWrapper-module_adl-u-padding-top-16__YLoya","adl-u-padding-x-16":"LoaderWrapper-module_adl-u-padding-x-16__Nk9XH","adl-u-padding-y-16":"LoaderWrapper-module_adl-u-padding-y-16__4bS6b","adl-u-padding-24":"LoaderWrapper-module_adl-u-padding-24__T15uX","adl-u-padding-bottom-24":"LoaderWrapper-module_adl-u-padding-bottom-24__yZeVF","adl-u-padding-left-24":"LoaderWrapper-module_adl-u-padding-left-24__H4Mpo","adl-u-padding-right-24":"LoaderWrapper-module_adl-u-padding-right-24__Np7cC","adl-u-padding-top-24":"LoaderWrapper-module_adl-u-padding-top-24__-u4-u","adl-u-padding-x-24":"LoaderWrapper-module_adl-u-padding-x-24__d1Zyw","adl-u-padding-y-24":"LoaderWrapper-module_adl-u-padding-y-24__elC6h","adl-u-padding-32":"LoaderWrapper-module_adl-u-padding-32__1-66b","adl-u-padding-bottom-32":"LoaderWrapper-module_adl-u-padding-bottom-32__MGMqu","adl-u-padding-left-32":"LoaderWrapper-module_adl-u-padding-left-32__OjLzD","adl-u-padding-right-32":"LoaderWrapper-module_adl-u-padding-right-32__9gVTd","adl-u-padding-top-32":"LoaderWrapper-module_adl-u-padding-top-32__T7AgW","adl-u-padding-x-32":"LoaderWrapper-module_adl-u-padding-x-32__zINSY","adl-u-padding-y-32":"LoaderWrapper-module_adl-u-padding-y-32__1cAah","adl-u-padding-40":"LoaderWrapper-module_adl-u-padding-40__LBJpX","adl-u-padding-bottom-40":"LoaderWrapper-module_adl-u-padding-bottom-40__hzO-i","adl-u-padding-left-40":"LoaderWrapper-module_adl-u-padding-left-40__PteLs","adl-u-padding-right-40":"LoaderWrapper-module_adl-u-padding-right-40__KnF5h","adl-u-padding-top-40":"LoaderWrapper-module_adl-u-padding-top-40__oKHiH","adl-u-padding-x-40":"LoaderWrapper-module_adl-u-padding-x-40__kI6vI","adl-u-padding-y-40":"LoaderWrapper-module_adl-u-padding-y-40__RuSag","adl-u-padding-48":"LoaderWrapper-module_adl-u-padding-48__nab9e","adl-u-padding-bottom-48":"LoaderWrapper-module_adl-u-padding-bottom-48__D5-Ld","adl-u-padding-left-48":"LoaderWrapper-module_adl-u-padding-left-48__wkbHt","adl-u-padding-right-48":"LoaderWrapper-module_adl-u-padding-right-48__VWbRj","adl-u-padding-top-48":"LoaderWrapper-module_adl-u-padding-top-48__jFGoL","adl-u-padding-x-48":"LoaderWrapper-module_adl-u-padding-x-48__iLxON","adl-u-padding-y-48":"LoaderWrapper-module_adl-u-padding-y-48__xjJU8","adl-u-padding-56":"LoaderWrapper-module_adl-u-padding-56__k-Yhw","adl-u-padding-bottom-56":"LoaderWrapper-module_adl-u-padding-bottom-56__-PulO","adl-u-padding-left-56":"LoaderWrapper-module_adl-u-padding-left-56__aS5Yj","adl-u-padding-right-56":"LoaderWrapper-module_adl-u-padding-right-56__8hOKA","adl-u-padding-top-56":"LoaderWrapper-module_adl-u-padding-top-56__Y0eqm","adl-u-padding-x-56":"LoaderWrapper-module_adl-u-padding-x-56__GUbnb","adl-u-padding-y-56":"LoaderWrapper-module_adl-u-padding-y-56__KOOlW","adl-u-padding-64":"LoaderWrapper-module_adl-u-padding-64__huzIF","adl-u-padding-bottom-64":"LoaderWrapper-module_adl-u-padding-bottom-64__NJ3rS","adl-u-padding-left-64":"LoaderWrapper-module_adl-u-padding-left-64__HpfaZ","adl-u-padding-right-64":"LoaderWrapper-module_adl-u-padding-right-64__PVDK8","adl-u-padding-top-64":"LoaderWrapper-module_adl-u-padding-top-64__nhkYM","adl-u-padding-x-64":"LoaderWrapper-module_adl-u-padding-x-64__XHvji","adl-u-padding-y-64":"LoaderWrapper-module_adl-u-padding-y-64__PMwnL","adl-u-padding-72":"LoaderWrapper-module_adl-u-padding-72__EL37y","adl-u-padding-bottom-72":"LoaderWrapper-module_adl-u-padding-bottom-72__y0RBf","adl-u-padding-left-72":"LoaderWrapper-module_adl-u-padding-left-72__aKMlI","adl-u-padding-right-72":"LoaderWrapper-module_adl-u-padding-right-72__IKPYC","adl-u-padding-top-72":"LoaderWrapper-module_adl-u-padding-top-72__0eQl-","adl-u-padding-x-72":"LoaderWrapper-module_adl-u-padding-x-72__fnzOF","adl-u-padding-y-72":"LoaderWrapper-module_adl-u-padding-y-72__ZK5GM","adl-u-padding-80":"LoaderWrapper-module_adl-u-padding-80__OjC1L","adl-u-padding-bottom-80":"LoaderWrapper-module_adl-u-padding-bottom-80__mTI5S","adl-u-padding-left-80":"LoaderWrapper-module_adl-u-padding-left-80__zUnH3","adl-u-padding-right-80":"LoaderWrapper-module_adl-u-padding-right-80__FGUjE","adl-u-padding-top-80":"LoaderWrapper-module_adl-u-padding-top-80__WaNty","adl-u-padding-x-80":"LoaderWrapper-module_adl-u-padding-x-80__W5EC1","adl-u-padding-y-80":"LoaderWrapper-module_adl-u-padding-y-80__Q0CtV","adl-u-padding-88":"LoaderWrapper-module_adl-u-padding-88__3hIxN","adl-u-padding-bottom-88":"LoaderWrapper-module_adl-u-padding-bottom-88__-ySZu","adl-u-padding-left-88":"LoaderWrapper-module_adl-u-padding-left-88__Do-TE","adl-u-padding-right-88":"LoaderWrapper-module_adl-u-padding-right-88__ZszmB","adl-u-padding-top-88":"LoaderWrapper-module_adl-u-padding-top-88__PdiWT","adl-u-padding-x-88":"LoaderWrapper-module_adl-u-padding-x-88__aqiOm","adl-u-padding-y-88":"LoaderWrapper-module_adl-u-padding-y-88__opkT-","adl-u-padding-96":"LoaderWrapper-module_adl-u-padding-96__nUVGm","adl-u-padding-bottom-96":"LoaderWrapper-module_adl-u-padding-bottom-96__Q-Xxd","adl-u-padding-left-96":"LoaderWrapper-module_adl-u-padding-left-96__wti4M","adl-u-padding-right-96":"LoaderWrapper-module_adl-u-padding-right-96__Yq6N2","adl-u-padding-top-96":"LoaderWrapper-module_adl-u-padding-top-96__7wq4Z","adl-u-padding-x-96":"LoaderWrapper-module_adl-u-padding-x-96__ILllz","adl-u-padding-y-96":"LoaderWrapper-module_adl-u-padding-y-96__ShVbW","adl-u-padding-0":"LoaderWrapper-module_adl-u-padding-0__vL2ZJ","adl-u-padding-bottom-0":"LoaderWrapper-module_adl-u-padding-bottom-0__Sa8LS","adl-u-padding-left-0":"LoaderWrapper-module_adl-u-padding-left-0__ge--J","adl-u-padding-right-0":"LoaderWrapper-module_adl-u-padding-right-0__o8Uj0","adl-u-padding-top-0":"LoaderWrapper-module_adl-u-padding-top-0__V2OJQ","adl-u-padding-x-0":"LoaderWrapper-module_adl-u-padding-x-0__0a7Lo","adl-u-padding-y-0":"LoaderWrapper-module_adl-u-padding-y-0__osF0a","adl-u-padding-auto":"LoaderWrapper-module_adl-u-padding-auto__14VRO","adl-u-padding-bottom-auto":"LoaderWrapper-module_adl-u-padding-bottom-auto__xS8SM","adl-u-padding-left-auto":"LoaderWrapper-module_adl-u-padding-left-auto__vd-WD","adl-u-padding-right-auto":"LoaderWrapper-module_adl-u-padding-right-auto__1I3uM","adl-u-padding-top-auto":"LoaderWrapper-module_adl-u-padding-top-auto__ne0Nq","adl-u-padding-x-auto":"LoaderWrapper-module_adl-u-padding-x-auto__qDa4k","adl-u-padding-y-auto":"LoaderWrapper-module_adl-u-padding-y-auto__H5mWT","adl-u-margin-2":"LoaderWrapper-module_adl-u-margin-2__Qo8iE","adl-u-margin-bottom-2":"LoaderWrapper-module_adl-u-margin-bottom-2__6ohtb","adl-u-margin-left-2":"LoaderWrapper-module_adl-u-margin-left-2__s1JT2","adl-u-margin-right-2":"LoaderWrapper-module_adl-u-margin-right-2__-Mddd","adl-u-margin-top-2":"LoaderWrapper-module_adl-u-margin-top-2__sjp3N","adl-u-margin-x-2":"LoaderWrapper-module_adl-u-margin-x-2__SKHn6","adl-u-margin-y-2":"LoaderWrapper-module_adl-u-margin-y-2__s7BlI","adl-u-margin-4":"LoaderWrapper-module_adl-u-margin-4__ho9oo","adl-u-margin-bottom-4":"LoaderWrapper-module_adl-u-margin-bottom-4__dM-wd","adl-u-margin-left-4":"LoaderWrapper-module_adl-u-margin-left-4__uoq6Q","adl-u-margin-right-4":"LoaderWrapper-module_adl-u-margin-right-4__O-W4Y","adl-u-margin-top-4":"LoaderWrapper-module_adl-u-margin-top-4__j5hGD","adl-u-margin-x-4":"LoaderWrapper-module_adl-u-margin-x-4__M2Q6h","adl-u-margin-y-4":"LoaderWrapper-module_adl-u-margin-y-4__n3QcP","adl-u-margin-8":"LoaderWrapper-module_adl-u-margin-8__DHdMk","adl-u-margin-bottom-8":"LoaderWrapper-module_adl-u-margin-bottom-8__UFh6P","adl-u-margin-left-8":"LoaderWrapper-module_adl-u-margin-left-8__qrUDK","adl-u-margin-right-8":"LoaderWrapper-module_adl-u-margin-right-8__wWTZH","adl-u-margin-top-8":"LoaderWrapper-module_adl-u-margin-top-8__c0W0j","adl-u-margin-x-8":"LoaderWrapper-module_adl-u-margin-x-8__St8Ig","adl-u-margin-y-8":"LoaderWrapper-module_adl-u-margin-y-8__-V1Mg","adl-u-margin-16":"LoaderWrapper-module_adl-u-margin-16__y0p53","adl-u-margin-bottom-16":"LoaderWrapper-module_adl-u-margin-bottom-16__jGvbm","adl-u-margin-left-16":"LoaderWrapper-module_adl-u-margin-left-16__Upttw","adl-u-margin-right-16":"LoaderWrapper-module_adl-u-margin-right-16__W5-y8","adl-u-margin-top-16":"LoaderWrapper-module_adl-u-margin-top-16__gbfPj","adl-u-margin-x-16":"LoaderWrapper-module_adl-u-margin-x-16__R2UbC","adl-u-margin-y-16":"LoaderWrapper-module_adl-u-margin-y-16__gdLMJ","adl-u-margin-24":"LoaderWrapper-module_adl-u-margin-24__Bgj7-","adl-u-margin-bottom-24":"LoaderWrapper-module_adl-u-margin-bottom-24__FlN7g","adl-u-margin-left-24":"LoaderWrapper-module_adl-u-margin-left-24__l7cEY","adl-u-margin-right-24":"LoaderWrapper-module_adl-u-margin-right-24__7iU7q","adl-u-margin-top-24":"LoaderWrapper-module_adl-u-margin-top-24__5ExVh","adl-u-margin-x-24":"LoaderWrapper-module_adl-u-margin-x-24__CN9Uy","adl-u-margin-y-24":"LoaderWrapper-module_adl-u-margin-y-24__ayYCk","adl-u-margin-32":"LoaderWrapper-module_adl-u-margin-32__gttLq","adl-u-margin-bottom-32":"LoaderWrapper-module_adl-u-margin-bottom-32__TUE6-","adl-u-margin-left-32":"LoaderWrapper-module_adl-u-margin-left-32__N8ZoX","adl-u-margin-right-32":"LoaderWrapper-module_adl-u-margin-right-32__NCSZc","adl-u-margin-top-32":"LoaderWrapper-module_adl-u-margin-top-32__kvsHF","adl-u-margin-x-32":"LoaderWrapper-module_adl-u-margin-x-32__aHnwi","adl-u-margin-y-32":"LoaderWrapper-module_adl-u-margin-y-32__qs3Ih","adl-u-margin-40":"LoaderWrapper-module_adl-u-margin-40__KwyR4","adl-u-margin-bottom-40":"LoaderWrapper-module_adl-u-margin-bottom-40__irTpE","adl-u-margin-left-40":"LoaderWrapper-module_adl-u-margin-left-40__1MP-L","adl-u-margin-right-40":"LoaderWrapper-module_adl-u-margin-right-40__JCYNS","adl-u-margin-top-40":"LoaderWrapper-module_adl-u-margin-top-40__duOrg","adl-u-margin-x-40":"LoaderWrapper-module_adl-u-margin-x-40__8fLVI","adl-u-margin-y-40":"LoaderWrapper-module_adl-u-margin-y-40__oG9xg","adl-u-margin-48":"LoaderWrapper-module_adl-u-margin-48__Ic2Ku","adl-u-margin-bottom-48":"LoaderWrapper-module_adl-u-margin-bottom-48__h0tQC","adl-u-margin-left-48":"LoaderWrapper-module_adl-u-margin-left-48__7kxb-","adl-u-margin-right-48":"LoaderWrapper-module_adl-u-margin-right-48__Qlse8","adl-u-margin-top-48":"LoaderWrapper-module_adl-u-margin-top-48__dTvr2","adl-u-margin-x-48":"LoaderWrapper-module_adl-u-margin-x-48__mGF5m","adl-u-margin-y-48":"LoaderWrapper-module_adl-u-margin-y-48__Bccx9","adl-u-margin-56":"LoaderWrapper-module_adl-u-margin-56__LbQyi","adl-u-margin-bottom-56":"LoaderWrapper-module_adl-u-margin-bottom-56__l8yXF","adl-u-margin-left-56":"LoaderWrapper-module_adl-u-margin-left-56__ouRt1","adl-u-margin-right-56":"LoaderWrapper-module_adl-u-margin-right-56__VvR8H","adl-u-margin-top-56":"LoaderWrapper-module_adl-u-margin-top-56__osJoZ","adl-u-margin-x-56":"LoaderWrapper-module_adl-u-margin-x-56__KS1N2","adl-u-margin-y-56":"LoaderWrapper-module_adl-u-margin-y-56__pOIvQ","adl-u-margin-64":"LoaderWrapper-module_adl-u-margin-64__qrQ-3","adl-u-margin-bottom-64":"LoaderWrapper-module_adl-u-margin-bottom-64__iShlf","adl-u-margin-left-64":"LoaderWrapper-module_adl-u-margin-left-64__Rb3bk","adl-u-margin-right-64":"LoaderWrapper-module_adl-u-margin-right-64__5e905","adl-u-margin-top-64":"LoaderWrapper-module_adl-u-margin-top-64__DMFhE","adl-u-margin-x-64":"LoaderWrapper-module_adl-u-margin-x-64__88Dp3","adl-u-margin-y-64":"LoaderWrapper-module_adl-u-margin-y-64__YrjWu","adl-u-margin-72":"LoaderWrapper-module_adl-u-margin-72__p2Nth","adl-u-margin-bottom-72":"LoaderWrapper-module_adl-u-margin-bottom-72__bQ1rJ","adl-u-margin-left-72":"LoaderWrapper-module_adl-u-margin-left-72__2ZsA9","adl-u-margin-right-72":"LoaderWrapper-module_adl-u-margin-right-72__Y9jVV","adl-u-margin-top-72":"LoaderWrapper-module_adl-u-margin-top-72__XBIqc","adl-u-margin-x-72":"LoaderWrapper-module_adl-u-margin-x-72__U4Geq","adl-u-margin-y-72":"LoaderWrapper-module_adl-u-margin-y-72__igMhc","adl-u-margin-80":"LoaderWrapper-module_adl-u-margin-80__ZaaVL","adl-u-margin-bottom-80":"LoaderWrapper-module_adl-u-margin-bottom-80__4mhvM","adl-u-margin-left-80":"LoaderWrapper-module_adl-u-margin-left-80__Ujmc8","adl-u-margin-right-80":"LoaderWrapper-module_adl-u-margin-right-80__5vsK6","adl-u-margin-top-80":"LoaderWrapper-module_adl-u-margin-top-80__tCCbV","adl-u-margin-x-80":"LoaderWrapper-module_adl-u-margin-x-80__h2Yhu","adl-u-margin-y-80":"LoaderWrapper-module_adl-u-margin-y-80__3CZaK","adl-u-margin-88":"LoaderWrapper-module_adl-u-margin-88__OITKU","adl-u-margin-bottom-88":"LoaderWrapper-module_adl-u-margin-bottom-88__dXAiI","adl-u-margin-left-88":"LoaderWrapper-module_adl-u-margin-left-88__gzaMr","adl-u-margin-right-88":"LoaderWrapper-module_adl-u-margin-right-88__yoUAB","adl-u-margin-top-88":"LoaderWrapper-module_adl-u-margin-top-88__axU9A","adl-u-margin-x-88":"LoaderWrapper-module_adl-u-margin-x-88__G6HTw","adl-u-margin-y-88":"LoaderWrapper-module_adl-u-margin-y-88__1h5uT","adl-u-margin-96":"LoaderWrapper-module_adl-u-margin-96__rM0li","adl-u-margin-bottom-96":"LoaderWrapper-module_adl-u-margin-bottom-96__xWxo0","adl-u-margin-left-96":"LoaderWrapper-module_adl-u-margin-left-96__KjUWb","adl-u-margin-right-96":"LoaderWrapper-module_adl-u-margin-right-96__n6Lvn","adl-u-margin-top-96":"LoaderWrapper-module_adl-u-margin-top-96__wXR-E","adl-u-margin-x-96":"LoaderWrapper-module_adl-u-margin-x-96__59z1P","adl-u-margin-y-96":"LoaderWrapper-module_adl-u-margin-y-96__bknST","adl-u-margin-0":"LoaderWrapper-module_adl-u-margin-0__or6Fk","adl-u-margin-bottom-0":"LoaderWrapper-module_adl-u-margin-bottom-0__cmq1i","adl-u-margin-left-0":"LoaderWrapper-module_adl-u-margin-left-0__sX7Nh","adl-u-margin-right-0":"LoaderWrapper-module_adl-u-margin-right-0__aXH-p","adl-u-margin-top-0":"LoaderWrapper-module_adl-u-margin-top-0__OKTAA","adl-u-margin-x-0":"LoaderWrapper-module_adl-u-margin-x-0__8WA3F","adl-u-margin-y-0":"LoaderWrapper-module_adl-u-margin-y-0__sTouw","adl-u-margin-auto":"LoaderWrapper-module_adl-u-margin-auto__me62z","adl-u-margin-bottom-auto":"LoaderWrapper-module_adl-u-margin-bottom-auto__0bABW","adl-u-margin-left-auto":"LoaderWrapper-module_adl-u-margin-left-auto__OadFh","adl-u-margin-right-auto":"LoaderWrapper-module_adl-u-margin-right-auto__Xb8T0","adl-u-margin-top-auto":"LoaderWrapper-module_adl-u-margin-top-auto__TwqvP","adl-u-margin-x-auto":"LoaderWrapper-module_adl-u-margin-x-auto__W49-q","adl-u-margin-y-auto":"LoaderWrapper-module_adl-u-margin-y-auto__FeR-W","adl-u-box-sizing-border-box":"LoaderWrapper-module_adl-u-box-sizing-border-box__ZRUhq","adl-u-pointer-events-none":"LoaderWrapper-module_adl-u-pointer-events-none__yOoe8","adl-u-pointer-events-auto":"LoaderWrapper-module_adl-u-pointer-events-auto__6ErlI","adl-u-font-size-small":"LoaderWrapper-module_adl-u-font-size-small__8I1Ev","adl-u-font-size-medium":"LoaderWrapper-module_adl-u-font-size-medium__kAt3Y","adl-u-font-size-large":"LoaderWrapper-module_adl-u-font-size-large__n2fD9","adl-u-font-size-xlarge":"LoaderWrapper-module_adl-u-font-size-xlarge__A4cW2","adl-u-font-size-xxlarge":"LoaderWrapper-module_adl-u-font-size-xxlarge__QyQ-A","adl-u-font-size-inherit":"LoaderWrapper-module_adl-u-font-size-inherit__lien5","adl-u-font-weight-thin":"LoaderWrapper-module_adl-u-font-weight-thin__w6-7j","adl-u-font-weight-regular":"LoaderWrapper-module_adl-u-font-weight-regular__81wC2","adl-u-font-weight-medium":"LoaderWrapper-module_adl-u-font-weight-medium__6Bkr1","adl-u-font-weight-semi-bold":"LoaderWrapper-module_adl-u-font-weight-semi-bold__-Km48","adl-u-white-space-normal":"LoaderWrapper-module_adl-u-white-space-normal__O-8hp","adl-u-white-space-nowrap":"LoaderWrapper-module_adl-u-white-space-nowrap__uNmHL","adl-u-white-space-pre-wrap":"LoaderWrapper-module_adl-u-white-space-pre-wrap__-jx-K","adl-u-truncate":"LoaderWrapper-module_adl-u-truncate__hSayP","adl-u-word-break-break-word":"LoaderWrapper-module_adl-u-word-break-break-word__HsHGC","adl-u-visibility-visible":"LoaderWrapper-module_adl-u-visibility-visible__SVpoI","adl-u-visibility-hidden":"LoaderWrapper-module_adl-u-visibility-hidden__zVbUT","adl-u-display-none":"LoaderWrapper-module_adl-u-display-none__DsSe9","adl-u-display-initial":"LoaderWrapper-module_adl-u-display-initial__Lhzvs","adl-u-display-inline":"LoaderWrapper-module_adl-u-display-inline__gIPuS","adl-u-display-inline-block":"LoaderWrapper-module_adl-u-display-inline-block__uubRw","adl-u-display-block":"LoaderWrapper-module_adl-u-display-block__YZiA1","adl-u-display-table":"LoaderWrapper-module_adl-u-display-table__LpAm0","adl-u-display-table-row":"LoaderWrapper-module_adl-u-display-table-row__tjyhl","adl-u-display-table-cell":"LoaderWrapper-module_adl-u-display-table-cell__2Adjd","adl-u-display-flex":"LoaderWrapper-module_adl-u-display-flex__St4mQ","adl-u-display-inline-flex":"LoaderWrapper-module_adl-u-display-inline-flex__X8P3U","adl-u-flex-direction-row":"LoaderWrapper-module_adl-u-flex-direction-row__qOVTd","adl-u-flex-direction-row-reverse":"LoaderWrapper-module_adl-u-flex-direction-row-reverse__eEbiO","adl-u-flex-direction-column":"LoaderWrapper-module_adl-u-flex-direction-column__134gh","adl-u-flex-direction-column-reverse":"LoaderWrapper-module_adl-u-flex-direction-column-reverse__VCrho","adl-u-flex-wrap-wrap":"LoaderWrapper-module_adl-u-flex-wrap-wrap__QVjdM","adl-u-flex-wrap-nowrap":"LoaderWrapper-module_adl-u-flex-wrap-nowrap__rAxpJ","adl-u-align-items-start":"LoaderWrapper-module_adl-u-align-items-start__Dvri5","adl-u-align-items-flex-start":"LoaderWrapper-module_adl-u-align-items-flex-start__IfSZJ","adl-u-align-items-flex-end":"LoaderWrapper-module_adl-u-align-items-flex-end__wLnjV","adl-u-align-items-center":"LoaderWrapper-module_adl-u-align-items-center__ncX4A","adl-u-align-items-stretch":"LoaderWrapper-module_adl-u-align-items-stretch__VVYwf","adl-u-align-items-baseline":"LoaderWrapper-module_adl-u-align-items-baseline__ptDF1","adl-u-align-items-end":"LoaderWrapper-module_adl-u-align-items-end__i2wqG","adl-u-justify-content-center":"LoaderWrapper-module_adl-u-justify-content-center__VzKQK","adl-u-justify-content-flex-start":"LoaderWrapper-module_adl-u-justify-content-flex-start__2GeaL","adl-u-justify-content-flex-end":"LoaderWrapper-module_adl-u-justify-content-flex-end__jX5a4","adl-u-justify-content-start":"LoaderWrapper-module_adl-u-justify-content-start__s19ps","adl-u-justify-content-end":"LoaderWrapper-module_adl-u-justify-content-end__WrpbG","adl-u-justify-content-left":"LoaderWrapper-module_adl-u-justify-content-left__UYl5j","adl-u-justify-content-right":"LoaderWrapper-module_adl-u-justify-content-right__Ulage","adl-u-justify-content-space-between":"LoaderWrapper-module_adl-u-justify-content-space-between__fHuEx","adl-u-justify-content-space-around":"LoaderWrapper-module_adl-u-justify-content-space-around__yuaBm","adl-u-justify-content-space-evenly":"LoaderWrapper-module_adl-u-justify-content-space-evenly__ZKme5","adl-u-justify-content-stretch":"LoaderWrapper-module_adl-u-justify-content-stretch__zRJxM","adl-u-flex-1":"LoaderWrapper-module_adl-u-flex-1__dnOHF","adl-u-width-full":"LoaderWrapper-module_adl-u-width-full__g4Hkw","adl-u-width-auto":"LoaderWrapper-module_adl-u-width-auto__3QMUT","adyen-kyc-loading-input__form":"LoaderWrapper-module_adyen-kyc-loading-input__form__chx-J","adyen-kyc-loading-input__form--loading-opacity0":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0__A2eC5","adyen-kyc-loading-input__form--loading-opacity0-1":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-1__CbgnO","adyen-kyc-loading-input__form--loading-opacity0-2":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-2__LdJOX","adyen-kyc-loading-input__form--loading-opacity0-3":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-3__S3Lav","adyen-kyc-loading-input__form--loading-opacity0-4":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-4__Nbbb9","adyen-kyc-loading-input__form--loading-opacity0-5":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-5__1alhE","adyen-kyc-loading-input__form--loading-opacity0-6":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-6__uicZA","adyen-kyc-loading-input__form--loading-opacity0-7":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-7__AgxAJ","adyen-kyc-loading-input__form--loading-opacity0-8":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-8__2gl9x","adyen-kyc-loading-input__form--loading-opacity0-9":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity0-9__acg2x","adyen-kyc-loading-input__form--loading-opacity1":"LoaderWrapper-module_adyen-kyc-loading-input__form--loading-opacity1__kOcum","adyen-kyc-loading-input__loader":"LoaderWrapper-module_adyen-kyc-loading-input__loader__k4L0f","adyen-kyc-loading-input__loader--active":"LoaderWrapper-module_adyen-kyc-loading-input__loader--active__RLLLI"};const xu="success",Mu="loading";var Fu;!function(e){e.SUCCESS="success",e.LOADING="loading"}(Fu||(Fu={}));const Vu=({children:e,status:t,formOpacityWhenLoading:r=0,loaderSize:n="large",showSpinner:i=!0,className:o})=>{const s=`${r}`.split("."),d=s[0],l=s[1],c=a("adyen-kyc-loading-input__form",ju["adyen-kyc-loading-input__form"],{[ju[`adyen-kyc-loading-input__form--loading-opacity${l?`${d}-${l}`:`${d}`}`]]:t===Mu}),u=a({[ju["adyen-kyc-loading-input__loader"]]:!0,[ju["adyen-kyc-loading-input__loader--active"]]:t===Mu&&i}),m=a("adyen-kyc-loading-input",o);return C("div",Object.assign({className:m,style:{position:"relative"}},{children:[C("div",Object.assign({className:u},{children:C(Ze,{size:n})})),C("div",Object.assign({className:c},{children:e}))]}))},Uu=["typeOfIdentity","licenseCardNumber","issuerState"],Bu=["nationalIdNumber","passport","driversLicense","proofOfIdentityCard"],Wu=({availableIdentityTypes:e,selectedIdentityType:t,setSelectedIdentityType:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{i18n:o,commonProps:{showInlineErrors:s}}=We();return C(Ue,Object.assign({name:"typeOfIdentity",label:r("typeOfIdentity"),errorMessage:n,isValid:i},{children:[C("span",Object.assign({className:"adyen-kyc-helper-text"},{children:o.get("typeOfIdentitySubtitle")})),C(lt,{isInvalid:!1,items:e.map((e=>((e,t)=>({id:e,name:t}))(e,o.get(e)))),placeholder:o.get("id"),selected:t,onChange:e=>a(e.target.value),showInlineErrors:s})]}))},Hu=({passportNumber:e,onInput:t,onBlur:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{commonProps:{showInlineErrors:o}}=We();return C(Ue,Object.assign({name:"passportNumber",label:r("idNumber","passportNumber"),showInlineErrors:o,errorMessage:n,isValid:i},{children:C(Vt,{name:"passportNumber",value:e,onInput:t,onBlur:a,placeholder:"",showInlineErrors:o})}))},qu=({cardNumber:e,onInput:t,onBlur:a,formUtils:{getLabel:r},errorMessage:n,isValid:i})=>{const{commonProps:{showInlineErrors:o}}=We();return C(Ue,Object.assign({name:"cardNumber",label:r("idNumber","proofOfIdentityCardNumber"),showInlineErrors:o,errorMessage:n,isValid:i},{children:C(Vt,{name:"cardNumber",value:e,onInput:t,onBlur:a,placeholder:"",showInlineErrors:o})}))},Gu=({driversLicense:e,onIssuerStateChange:a,onLicenseNumberInput:r,onLicenseNumberBlur:n,onCardNumberInput:i,onCardNumberBlur:o,formUtils:{getLabel:s},isValid:d,errorMessages:l})=>{const{i18n:c,commonProps:{showInlineErrors:m}}=We(),{dataset:p}=ea(u("AU"));return C(t.Fragment,{children:[C(Ue,Object.assign({name:"issuerState",label:s("issuerState"),showInlineErrors:m,isValid:d.issuerState,errorMessage:l.issuerState},{children:C(lt,{onChange:a,isInvalid:!1,items:p,placeholder:c.get("selectState"),selected:e.issuerState})})),C("div",Object.assign({className:"adyen-kyc-field-wrapper"},{children:[C(Ue,Object.assign({name:"licenseNumber",label:s("idNumber","licenseNumber"),showInlineErrors:m,isValid:d.idNumber,errorMessage:l.idNumber},{children:C(Vt,{name:"licenseNumber",value:e.idNumber,onInput:r,onBlur:n,placeholder:"",showInlineErrors:m})})),C(Ue,Object.assign({name:"licenseCardNumber",label:s("licenseCardNumber"),showInlineErrors:m,isValid:d.licenseCardNumber,errorMessage:l.licenseCardNumber},{children:C(Vt,{name:"licenseCardNumber",value:e.licenseCardNumber,onInput:i,onBlur:o,placeholder:"",showInlineErrors:m})}))]})),C(ul,{page:"Personal details",title:c.get("whereCanIFindTheseNumbersOnMyDriversLicense"),content:C(t.Fragment,{children:[c.get("whereToFindNumbersOnDriversLicense"),"\xa0",C("a",Object.assign({href:"https://www.usi.gov.au/about/forms-id/drivers-licence",target:"_blank",rel:"noreferrer"},{children:c.get("iStillCantFindIt")}))]}),titleId:"whereCanIFindTheseNumbersOnMyDriversLicense",contentId:"whereToFindNumbersOnDriversLicense"})]})};const $u={validate:e=>!!e,modes:["blur"],errorMessage:"fieldIsRequired"},Xu=/^[A-Z]{1,2}\d{7}$/,Yu=/^[A-Za-z\d]{6,11}$/,Ku=/^[A-Za-z\d]{6,10}$/,zu={typeOfIdentity:[$u],idNumber:[{validate:(e,t)=>{switch(t.state.data.typeOfIdentity){case"passport":return Xu.test(e);case"driversLicense":return Yu.test(e);case"proofOfIdentityCard":return Ku.test(e)}},errorMessage:(e,t)=>{switch(t.state.data.typeOfIdentity){case"passport":return"invalidFormatForAuPassportNumber";case"driversLicense":return"invalidFormatForAuDriversLicenseNumber";case"proofOfIdentityCard":return"invalidFormatForAuProofOfIdentityCardNumber"}},modes:["blur"]}],licenseCardNumber:[{validate:e=>Yu.test(e),errorMessage:"invalidFormatForAuDriversLicenseCardNumber",modes:["blur"]}],issuerState:[$u]};function Zu(e){var a;"nationalIdNumber"===(null===(a=e.data)||void 0===a?void 0:a.typeOfIdentity)&&(e.data.typeOfIdentity=void 0);const{handleChangeFor:r,triggerValidation:n,data:i,errors:o,fieldProblems:s,valid:d}=ua(Object.assign(Object.assign({},e),{schema:e.requiredFields,defaultData:e.data,fieldProblems:e.fieldValidationErrors,rules:zu}));le((()=>{i.typeOfIdentity&&n(["idNumber"])}),[n,i.typeOfIdentity]),this.triggerValidation=n;const{sliceData:l,updateStateSlice:c}=function(e,t){const{dispatch:a,getData:r}=Kl(),n=r()[e],i=pe((r=>a({type:"addToState",value:Object.assign(Object.assign({},r),{dataStoreId:e,caller:t})})),[e,t]);return{sliceData:n,updateStateSlice:pe(dt(i,200),[i])}}("personalDetails");le((()=>c({data:Object.assign(Object.assign({},l),i),errors:o,valid:d,fieldProblems:s})),[i,o,d,s]);const{i18n:u}=We(),m=ra(e,u);return C(t.Fragment,{children:[C(Wu,{availableIdentityTypes:Bu.filter((e=>"nationalIdNumber"!==e)),selectedIdentityType:i.typeOfIdentity,setSelectedIdentityType:r("typeOfIdentity"),formUtils:m,isValid:d.typeOfIdentity,errorMessage:m.getErrorMessage("typeOfIdentity",o,s)}),"passport"===i.typeOfIdentity?C(Hu,{passportNumber:i.idNumber,onInput:r("idNumber","input"),onBlur:r("idNumber","blur"),formUtils:m,isValid:d.idNumber,errorMessage:m.getErrorMessage("idNumber",o,s)}):"proofOfIdentityCard"===i.typeOfIdentity?C(qu,{cardNumber:i.idNumber,onInput:r("idNumber","input"),onBlur:r("idNumber","blur"),formUtils:m,isValid:d.idNumber,errorMessage:m.getErrorMessage("idNumber",o,s)}):"driversLicense"===i.typeOfIdentity?C(Gu,{driversLicense:i,onIssuerStateChange:r("issuerState"),onLicenseNumberInput:r("idNumber","input"),onLicenseNumberBlur:r("idNumber","blur"),onCardNumberInput:r("licenseCardNumber","input"),onCardNumberBlur:r("licenseCardNumber","blur"),formUtils:m,isValid:{idNumber:d.idNumber,licenseCardNumber:d.licenseCardNumber,issuerState:d.issuerState},errorMessages:{idNumber:m.getErrorMessage("idNumber",o,s),licenseCardNumber:m.getErrorMessage("licenseCardNumber",o,s),issuerState:m.getErrorMessage("issuerState",o,s)}}):void 0]})}const Qu=[...Uu,"idNumber"],Ju="1_316",em="1_3062",tm="1_30",am="4DigitSSN",rm="entireSSN",nm=ht(((e,t)=>{var a,r,n,i;const o=null===(a=e.formVerificationErrors)||void 0===a?void 0:a[tm],s=(null===(r=null==o?void 0:o[em])||void 0===r?void 0:r.some((e=>e.code===Ju)))||9===(null===(i=null===(n=e.data)||void 0===n?void 0:n.idNumber)||void 0===i?void 0:i.length)?rm:am;let d=Object.assign({},e);if(s===rm){const t={labels:Object.assign(Object.assign({},e.labels),{idNumber:"socialSecurityNumber9Digits"}),country:"US9",placeholders:Object.assign(Object.assign({},e.placeholders),{idNumber:"SSNFormatUS9Digits"})};d=Object.assign(Object.assign({},e),t)}return s===am&&(d.classNames=["us4DigitsNumberId"],d.dataPlaceholder="*** \u2014 ** \u2014 "),C(ou,Object.assign({},d,{ref:t}))})),im=[...zc,"birthDate",...nu,...Uu,"residencyCountry","jobTitle",...Eu,...Lu,...Ud,...Zd];function om(e){const{i18n:t,commonProps:a}=We(),{isSettingEnabled:r}=zd(),n=ue(null),o=ue(null),s=ue(null),d=ue(null),l=ue(null),c=ue(null),u=e.id,[m,p]=se(null),[g,y]=se(xu),b=ue({setState:null}),[f,h]=se(null),v=e.taskType===Rd.DECISION_MAKER||e.taskType===Rd.TRUST_MEMBER_COMPANY_OWNER,_=(e.requiredFields||im).filter((e=>"role"!==e||"role"===e&&v)),N=r("editPrefilledCountry"),O=()=>_.filter((e=>["birthDate","residencyCountry","jobTitle"].includes(e))),{handleChangeFor:I,data:E,valid:T,errors:A,triggerValidation:S,fieldProblems:R}=ua(Object.assign(Object.assign({},e),{schema:O(),defaultData:e.data,rules:e.validators||su,fieldProblems:null==e?void 0:e.fieldValidationErrors})),D=ra(e,t),{hasFieldsToVerify:k,verifyFields:L}=function(e,t){const{loadingContext:a,clientKey:r}=We();return{hasFieldsToVerify:!!(null==e?void 0:e.length),verifyFields:pe((n=>i(this,void 0,void 0,(function*(){const i=[];return e.map((e=>{if("idNumber"===e&&n.data[e]){if("US"===t&&4===n.data[e].length)return;const o=lu(n,t,{loadingContext:a,clientKey:r});i.push(o)}})),Promise.all(i)}))),[e,t])}}(e.verifyFields,E.residencyCountry);this.triggerValidation=()=>{S(O()),v&&n.current.triggerValidation(),U(P)&&o.current.triggerValidation(),U(j)&&s.current.triggerValidation(),U(M)&&d.current.triggerValidation(),U(F)&&l.current.triggerValidation(),U(V)&&c.current.triggerValidation()},this.verifyForm=()=>{if(!k)return Promise.resolve(!0);const e=performance.now();return y(Mu),new Promise((t=>{L({data:f}).then((a=>{const r=a.every((e=>"verified"===e.status)),n=performance.now(),i=Math.floor(n-e);if(i<400?setTimeout((()=>{y(xu),t(r)}),400-i):(y(xu),t(r)),!r){const e=Object.assign({},m);a.forEach((t=>{"error"===t.status&&(e[t.fieldName]={isValid:!1,errorMessage:t.translationKey})})),p(Object.assign(Object.assign({},m),e))}}))}))},le((()=>{b.current.setState({type:"addToState",value:{data:E,valid:T,errors:A,fieldProblems:R,caller:u,dataStoreId:u,schema:_}})}),[E,T,A]);const w=Dd(e,Eu),P=Dd(e,zc),j=Dd(e,nu),x=Dd(e,Qu),M=Dd(e,Lu),F=Dd(e,Ud),V=Dd(e,Zd),U=e=>!!e.requiredFields.length;return C(Vu,Object.assign({status:g,formOpacityWhenLoading:.3,loaderSize:"large"},{children:[C(Ys,{owner:u,stateRef:b}),C(Yl,{owner:u,onChange:({currentState:e,changeInitiatedBy:t})=>{var a,r;t===u&&(!(null===(r=null===(a=e.errors)||void 0===a?void 0:a[u])||void 0===r?void 0:r.idNumber)&&(null==m?void 0:m.idNumber)&&delete m.idNumber,this.isValid=e.validityByForm[u],h(e.data[u]))}}),C("form",Object.assign({className:"adyen-kyc-individual__personal-details","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[C(Ms,{heading:e.heading}),C(qc,{verificationErrors:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:D,id:"ariaErrorField"}),"US"!==E.residencyCountry||v?void 0:C(rc,{}),C(ul,{page:"Personal details",title:t.get("whyDoINeedToFillInThisInformation"),content:t.get("reasonForFillingIndividualPersonalDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingIndividualPersonalDetails"}),v&&C(Tu,Object.assign({},w,{ref:n,taskType:e.taskType,dataStoreId:u,allowedRoles:null==e?void 0:e.allowedRoles})),U(P)&&C(Qc,Object.assign({},P,{ref:o,dataStoreId:u})),D.isRequiredField("birthDate")&&C(Ue,Object.assign({name:"birthDate",label:D.getLabel("birthDate"),classNameModifiers:["birthDate"],errorMessage:D.getErrorMessage("birthDate",A,R),isValid:T.birthDate,showInlineErrors:a.showInlineErrors},{children:Jt("date",{name:"birthDate",value:E.birthDate,placeholder:t.get("birthDatePlaceholder"),readonly:D.isReadOnly("birthDate"),onInput:I("birthDate","input"),onBlur:I("birthDate","blur"),"aria-required":!0,"aria-label":D.getLabel("birthDate"),"aria-invalid":!T.birthDate,showInlineErrors:a.showInlineErrors,max:(B=new Date,B.toJSON().slice(0,10))})})),D.isRequiredField("residencyCountry")&&C(aa,{label:D.getLabel("residencyCountry"),allowedCountries:[],classNameModifiers:["country"],errorMessage:D.getErrorMessage("residencyCountry",A,R),onDropdownChange:I("residencyCountry","input"),value:E.residencyCountry,readOnly:!N&&!v}),U(j)&&("AU"===E.residencyCountry?C(Zu,Object.assign({},x,{ref:s,dataStoreId:u})):"US"===E.residencyCountry?C(nm,Object.assign({},j,{errors:m,dataStoreId:u,country:E.residencyCountry,formVerificationErrors:e.formVerificationErrors})):C(ou,Object.assign({},j,{ref:s,errors:m,country:E.residencyCountry,dataStoreId:u}))),U(M)&&C(Pu,Object.assign({},M,{ref:d,dataStoreId:u,country:E.residencyCountry})),D.isRequiredField("jobTitle",!1)&&C(Ue,Object.assign({name:"jobTitle",label:D.getLabel("jobTitle"),classNameModifiers:["jobTitle"],errorMessage:D.getErrorMessage("jobTitle",A,R)},{children:Jt("text",{name:"jobTitle",value:E.jobTitle,placeholder:D.getPlaceholder("jobTitle"),readonly:D.isReadOnly("jobTitle"),onInput:I("jobTitle","input"),onBlur:I("jobTitle","blur"),"aria-required":!0,"aria-label":D.getLabel("jobTitle"),"aria-invalid":!T.birthDate})})),D.isRequiredField("isPartOfTrust",!1)&&C(Bd,Object.assign({},F,{legalEntityType:id.INDIVIDUAL,ref:l,dataStoreId:u,isReadOnlyOnDefaultDataYes:!0})),D.isRequiredField("accountHolder")&&C(el,Object.assign({},V,{ref:c,country:E.residencyCountry,dataStoreId:u}))]}))]}));var B}var sm;!function(e){e.PASSPORT="passport",e.DRIVING_LICENCE="driving_licence",e.NATIONAL_IDENTITY_CARD="national_identity_card",e.RESIDENCE_PERMIT="residence_permit"}(sm||(sm={}));const dm=[{id:cc.DRIVERS_LICENSE,name:"driversLicense",hasBackPage:!0},{id:cc.PASSPORT,name:"passport",hasBackPage:!1},{id:cc.IDENTITY_CARD,name:"id",hasBackPage:!0}],lm=[{id:sm.DRIVING_LICENCE,name:"driversLicense",hasBackPage:!0},{id:sm.NATIONAL_IDENTITY_CARD,name:"id",hasBackPage:!0},{id:sm.PASSPORT,name:"passport",hasBackPage:!1}],cm={},um=dm.map((e=>e.id));let mm,pm,gm;const ym=(e,t,a)=>(mm&&pm&&gm||(mm=t,pm=a,gm=e),{fetchDocuments:bm,fetchDocument:fm,uploadDocuments:hm}),bm=(e,t)=>i(void 0,void 0,void 0,(function*(){const a=[];null==e||e.forEach((e=>{a.push(fm(e,t))}));return(yield Promise.all(a)).forEach((e=>{var t;const a=null===(t=null==e?void 0:e.owner)||void 0===t?void 0:t.id;a&&(cm[a]=cm[a]||[],cm[a].push(e))})),cm[t]})),fm=(e,t)=>i(void 0,void 0,void 0,(function*(){return mm(e,t)})),hm=(e,t)=>i(void 0,void 0,void 0,(function*(){const a=[];e.forEach((e=>{if(Im(e,t)){if(Em(e,t)){const r=_m(t,e.type).id;a.push(pm(e,r,t))}}else a.push(gm(e,t))}));const r=yield Promise.all(a);return vm(r,t),cm[t]})),vm=(e,t)=>{cm[t]||(cm[t]=[]),e.forEach((e=>{if(e){const a=cm[t].findIndex((t=>t.id===e.id));a>-1?cm[t][a]=e:cm[t].push(e)}}))},_m=(e,t)=>{var a;return null===(a=cm[e])||void 0===a?void 0:a.find((e=>e.type===t&&Tm(e)))},Nm=({entityId:e,entityType:t,documentType:a,page1:r,page2:n=null,description:o=null})=>i(void 0,void 0,void 0,(function*(){const i=[Am(r),Am(n)].filter(Boolean),[s,d]=yield Promise.all(i),l=r&&n;if(s)return{owner:{id:e,type:t},type:a,description:o||`Document type: ${a}`,attachments:[Om(s,null==r?void 0:r.name,l?"front":null),Om(d,null==n?void 0:n.name,l?"back":null)].filter(Boolean)}})),Om=(e,t,a="")=>e&&Object.assign({content:e,pageName:t},a&&{pageType:a}),Im=(e,t)=>{const a=cm[t];return!!(null==a?void 0:a.length)&&a.some((t=>t.type===e.type))},Em=(e,t)=>{const a=_m(t,e.type);return!a||a.attachments.some(((t,a)=>{var r;return t.content!==(null===(r=null==e?void 0:e.attachments[a])||void 0===r?void 0:r.content)}))},Tm=e=>!!e,Am=e=>new Promise(((t,a)=>{if(!(e&&e instanceof Blob))return void t(null);const r=new FileReader;r.readAsDataURL(e),r.onload=()=>{const e=r.result.toString().split(";base64,")[1];t(e)},r.onerror=e=>a(e)})),Sm=e=>e.split(".").pop();var Rm;!function(e){e.DEFINED_BENEFICIARY="definedBeneficiary",e.PROTECTOR="protector",e.SECONDARY_TRUSTEE="secondaryTrustee",e.SETTLOR="settlor",e.UBO_THROUGH_OWNERSHIP="uboThroughOwnership"}(Rm||(Rm={}));const Cm={[Rm.DEFINED_BENEFICIARY]:{min:1},[Rm.SETTLOR]:{min:1}},Dm=e=>{var t;return null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.some((t=>t.entityType===id.TRUST&&t.associatorId===e.id))},km=e=>Dm(e)?Md.IS_PART_OF_TRUST:Md.IS_NOT_PART_OF_TRUST,Lm=e=>{var t;return null===(t=Fd.find((t=>t.id===e)))||void 0===t?void 0:t.name},wm=e=>{if(null==e?void 0:e.entityAssociations){const t=Object.values(Rm);return e.entityAssociations.filter((a=>t.includes(a.type)&&a.associatorId===e.id))}return[]},Pm=e=>{var t;return null===(t=wm(e))||void 0===t?void 0:t.map((e=>e.legalEntityId))},jm=e=>{var t,a;return null===(a=null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.find((t=>t.entityType===id.TRUST&&t.associatorId===e.id)))||void 0===a?void 0:a.legalEntityId},xm=e=>{const t=jm(e);return t?[t]:[]},Mm=(e,t)=>{var a;const r=jm(e);if(r)return null===(a=null==t?void 0:t.LegalEntity)||void 0===a?void 0:a[r]},Fm=e=>{const t=(e=>wm(e).reduce(((e,t)=>{var a;return e[t.type]=(null!==(a=e[t.type])&&void 0!==a?a:0)+1,e}),{}))(e);return Object.entries(Cm).every((([e,a])=>{var r;return!a.min||(null!==(r=null==t?void 0:t[e])&&void 0!==r?r:0>=a.min)}))},Vm=(e,t)=>Object.values(Um).filter((e=>0===(null==t?void 0:t.length)||(null==t?void 0:t.includes(e.id)))).map((t=>Object.assign(Object.assign({},t),{name:e.get(t.name),description:e.get(t.description)}))),Um={[Rm.DEFINED_BENEFICIARY]:{id:Rm.DEFINED_BENEFICIARY,name:"beneficiary",description:"beneficialOwnersOfTrustProperty",className:"adl-tag--light-blue"},[Rm.PROTECTOR]:{id:Rm.PROTECTOR,name:"protector",description:"personAppointmentUnderTrustInstrument",className:"adl-tag--green"},[Rm.SECONDARY_TRUSTEE]:{id:Rm.SECONDARY_TRUSTEE,name:"trustee",description:"legalOwnerOfProperty",className:"adl-tag--purple"},[Rm.SETTLOR]:{id:Rm.SETTLOR,name:"settlor",description:"entityEstablishingTrust",className:"adl-tag--teal"},[Rm.UBO_THROUGH_OWNERSHIP]:{id:Rm.UBO_THROUGH_OWNERSHIP,name:"ultimateBeneficialOwner",description:"entityOwning25OrMoreOfTrust",className:"adl-tag--basic"}},Bm={US:"EIN",AU:"ABN"},Wm=({taxId:e,country:t,exemptedFromTax:a=!1,entity:r})=>{var n,i;const o=W(r),s=null!==(i=null===(n=r.taxInformation)||void 0===n?void 0:n.reduce(((e,t)=>(e[t.country]=t,e)),{}))&&void 0!==i?i:{};return a?delete s[t]:s[t]={country:t,type:Bm[t],number:e},o.taxInformation=Object.values(s),"US"===t&&(o.vatNumber="",o.registrationNumber=""),o},Hm=Object.assign(Object.assign({},Um),Iu),qm=e=>{var t;return null===(t=Hm[e])||void 0===t?void 0:t.className},Gm=e=>{var t;return null===(t=Hm[e])||void 0===t?void 0:t.name},$m=e=>(null==e?void 0:e.entityAssociations)?e.entityAssociations.filter((t=>t.associatorId===e.id)):[],Xm=e=>$m(e).filter((e=>e.entityType===id.SOLE_PROPRIETORSHIP)).map((e=>e.legalEntityId)),Ym=e=>{var t;return null===(t=null==e?void 0:e.entityAssociations)||void 0===t?void 0:t.some((t=>t.entityType===id.SOLE_PROPRIETORSHIP&&t.associatorId===e.id))},Km=(e,t)=>{var a;const r=Xm(e)[0];if(r)return null===(a=null==t?void 0:t.LegalEntity)||void 0===a?void 0:a[r]};var zm;function Zm(e,t=!1){const a=[];for(const[r,n]of Object.entries(e)){if("object"!=typeof n&&(void 0!==n||t)){a.push(r);continue}const e=Zm(n).map((e=>`${r}.${e}`));a.push(...e)}return a}!function(e){e.VALID="valid",e.PENDING="pending",e.INVALID="invalid",e.REJECTED="rejected"}(zm||(zm={}));const Qm=(e,t,a,r)=>{if(!(null==r?void 0:r.length)||r.includes(a.id)&&ap(a))return Sd.EMPTY;const n=function(e,t,a){if(!(null==t?void 0:t[e]))return;const r=Object.entries(t[e]).filter((([e])=>a.includes(e))).map((([,e])=>e.status)).filter((e=>Jm.includes(e)));if(!r.length)return;return r.reduce(((e,t)=>t>e?t:e))}(e,t,r);return n||(ep(a)?Sd.PROCESSING:Sd.FINISHED)},Jm=[Sd.DETAILS_REQUIRED,Sd.DOWNLOAD,Sd.ERROR];const ep=e=>{var t;return Object.values(null!==(t=e.capabilities)&&void 0!==t?t:{}).some((e=>"pending"===e.verificationStatus))},tp={[id.INDIVIDUAL]:["name.firstName","name.lastName","residentialAddress.country"],[id.ORGANIZATION]:["legalName","registeredAddress.country"],[id.TRUST]:["name","registeredAddress.country"],[id.SOLE_PROPRIETORSHIP]:["name","registeredAddress.country"]};function ap(e){var t;const a=null==e?void 0:e.type;if(!a)return!0;if(null===(t=e.documentDetails)||void 0===t?void 0:t.length)return!1;const r=tp[a];return!Zm(e[a]).some((e=>!r.includes(e)))}const rp=[{id:Wd.MY_NAME,name:"myName",description:"myNameDescription",type:id.INDIVIDUAL},{id:Wd.MY_SOLE_TRADER_NAME,name:"mySoleTraderName",description:"mySoleTraderNameDescription",type:id.SOLE_PROPRIETORSHIP},{id:Wd.THE_COMPANY_I_WORK_FOR,name:"theCompanyIWorkFor",description:"theCompanyIWorkForDescription",type:id.ORGANIZATION}];rp.filter((e=>e.id!==Wd.MY_SOLE_TRADER_NAME));const np=(e,t=!1)=>{var a;return Ym(e)?Wd.MY_SOLE_TRADER_NAME:t||!ap(e)?null===(a=rp.find((({type:t})=>t===e.type)))||void 0===a?void 0:a.id:void 0},ip=e=>{var t;const a=Object.assign({},yp(e,cd));return a.type=id.INDIVIDUAL,a.individual.identificationData=op(e.personalDetails,a.individual.identificationData),(null===(t=a.individual.phone)||void 0===t?void 0:t.number)?a.individual.phone.type="mobile":delete a.individual.phone,a},op=(e,t)=>{var a,r;if(void 0!==e.idNumber||void 0!==e.idNumberExempt)return Object.assign(Object.assign({},t),{nationalIdExempt:null!==(a=t.nationalIdExempt)&&void 0!==a?a:!e.idNumber,type:null!==(r=e.typeOfIdentity)&&void 0!==r?r:"nationalIdNumber"})},sp=({data:e,legalEntity:t})=>{const a=yp(e,hd);return a.legalEntityId=t.id,a.type=od.BANK_ACCOUNT,a},dp=(e,t)=>{let a=yp(e,ld);return a=Object.assign(Object.assign({},a),{personalDetails:Object.assign(Object.assign(Object.assign({},null==a?void 0:a.personalDetails),t&&{firstName:"",lastName:""}),{isPartOfTrust:km(e),accountHolder:np(e,t)})}),a},lp=(e,t)=>{var a,r;let n;if(null==e?void 0:e.organization){n=yp(e,yd),(null===(a=e.organization)||void 0===a?void 0:a.principalPlaceOfBusiness)?n.companyRegistrationDetails.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_NOT_SAME:(n.companyRegistrationDetails||(n.companyRegistrationDetails={}),n.companyRegistrationDetails.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_SAME);const{taxInformation:t=[]}=e.organization;if(t.length){const{country:a}=e.organization.registeredAddress;n.companyDetails.taxId=null===(r=t.find((e=>e.country===a)))||void 0===r?void 0:r.number}}return n=Object.assign(Object.assign({},n),{companyType:Object.assign(Object.assign({},null==n?void 0:n.companyType),{isPartOfTrust:km(e),accountHolder:np(e,t)})}),n},cp=e=>{const t=Object.assign({},yp(e,bd));return t.organization.vatAbsenceReason&&(t.organization.vatNumber=""),e.companyDetails.taxId&&(t.organization=Wm({taxId:e.companyDetails.taxId,country:e.companyNameAndCountry.companyCountry,entity:t.organization})),t.type=id.ORGANIZATION,t},up=(e,t)=>i(void 0,void 0,void 0,(function*(){var a,r,n,i;if(e){const{idDocument:o,proofOfNationalId:s,proofOfResidence:d}=e,l="legalEntity";return(yield Promise.all([Nm({entityId:t,entityType:l,documentType:null==o?void 0:o.idDocumentType,page1:null===(a=null==o?void 0:o.idFrontPage)||void 0===a?void 0:a[0],page2:null===(r=null==o?void 0:o.idBackPage)||void 0===r?void 0:r[0]}),Nm({entityId:t,entityType:l,documentType:cc.PROOF_OF_NATIONAL_ID_NUMBER,page1:null===(n=null==s?void 0:s.proofOfNationalId)||void 0===n?void 0:n[0]}),Nm({entityId:t,entityType:l,documentType:cc.PROOF_OF_RESIDENCY,page1:null===(i=null==d?void 0:d.proofOfResidence)||void 0===i?void 0:i[0]})])).filter(Boolean)}})),mp=e=>{const t=(e=>{var t;return null===(t=cm[e])||void 0===t?void 0:t.find((e=>um.includes(e.type)&&Tm(e)))})(e)||null,a=_m(e,cc.PROOF_OF_RESIDENCY)||null,r=_m(e,cc.PROOF_OF_NATIONAL_ID_NUMBER)||null;return{idDocument:Object.assign(Object.assign(Object.assign({},(null==t?void 0:t.attachments[0])?{idFrontPage:[{name:vp(t,0)}]}:{}),(null==t?void 0:t.attachments[1])?{idBackPage:[{name:vp(t,1)}]}:{}),{idDocumentType:null==t?void 0:t.type}),proofOfResidence:a?[{name:vp(a)}]:null,proofOfNationalId:r?[{name:vp(r)}]:null}},pp=(e,t)=>i(void 0,void 0,void 0,(function*(){const{companyRegistrationDocument:{registrationDocument:a},companyTaxDocument:{taxDocument:r}}=e,n="legalEntity";return(yield Promise.all([Nm({entityId:t,entityType:n,documentType:cc.REGISTRATION_DOCUMENT,page1:null==a?void 0:a[0]}),Nm({entityId:t,entityType:n,documentType:cc.VAT_DOCUMENT,page1:null==r?void 0:r[0]})])).filter(Boolean)})),gp=(e,t)=>i(void 0,void 0,void 0,(function*(){const{payoutAccountDocuments:a={}}=e,{bankStatementDocument:r,description:n}=a,i=od.BANK_ACCOUNT;return(yield Promise.all([Nm({entityId:t,entityType:i,documentType:cc.BANK_STATEMENT,page1:null==r?void 0:r[0],description:n})])).filter(Boolean)})),yp=(e,t)=>{if(e){const a={};return Object.entries(t).forEach((([t,r])=>{const n=_p(e,r);void 0!==n&&bp(t,a,n)})),a}return null};function bp(e,t,a){const r=e.split("."),n=r.length;let i=t;r.forEach((function(e,t){t===n-1?i[e]=a:(i[e]||(i[e]={}),i=i[e])}))}const fp=e=>{const t=Object.assign({},yp(e,Td));return t.soleProprietorship.vatAbsenceReason&&(t.soleProprietorship.vatNumber=""),e.solePropRegistrationDetails.taxId&&(t.soleProprietorship=Wm({taxId:e.solePropRegistrationDetails.taxId,exemptedFromTax:e.solePropRegistrationDetails.exemptedFromTax,country:e.solePropNameAndCountry.companyCountry,entity:t.soleProprietorship})),e.solePropRegistrationDetails.exemptedFromRegistrationNumber&&(t.soleProprietorship.registrationNumber=""),t.type=id.SOLE_PROPRIETORSHIP,t},hp=(e,t)=>i(void 0,void 0,void 0,(function*(){var a;const r=null===(a=null==e?void 0:e.solePropConstitutionalDocument)||void 0===a?void 0:a.constitutionalDocument;return(yield Promise.all([Nm({entityId:t,entityType:"legalEntity",documentType:cc.CONSTITUTIONAL_DOCUMENT,page1:null==r?void 0:r[0]})])).filter(Boolean)})),vp=(e,t=0)=>{var a;return(null===(a=null==e?void 0:e.attachments)||void 0===a?void 0:a[t].pageName)||null};function _p(e,t){return t.split(".").reduce(((e,t)=>e&&void 0!==e[t]?e[t]:void 0),e)}function Np(e){const{userDetails:t,handleGetIdVerificationToken:a,onIdVerificationClose:r,onIdVerificationError:n,onIdVerificationComplete:o}=e,s="adyen-kyc-id-verification";let d=null;const l=e=>i(this,void 0,void 0,(function*(){const{init:t}=yield import("onfido-sdk-ui");try{d=t({token:e,containerId:s,disableAnalytics:!0,useModal:!1,isModalOpen:!1,onUserExit:r,onComplete:o,steps:[{type:"document",options:{documentTypes:{[sm.PASSPORT]:!0,[sm.DRIVING_LICENCE]:!0,[sm.NATIONAL_IDENTITY_CARD]:!0,[sm.RESIDENCE_PERMIT]:!1}}}]})}catch(e){n(e)}}));return le((()=>((()=>{i(this,void 0,void 0,(function*(){try{const{firstName:e,lastName:r,residencyCountry:n}=t,i={name:{firstName:e,lastName:r},country:n,origin:`${window.location.origin}/*`},{sdkToken:o}=yield a("",i);l(o)}catch(e){n(e)}}))})(),()=>{d&&d.tearDown()})),[]),C("div",{id:s,className:s})}const Op={idDocumentType:{validate:e=>!!e,errorMessage:"fieldIsRequired",modes:["blur","input"]},instantIdVerificationData:{validate:e=>!!e,errorMessage:"fieldIsRequired",modes:["blur","input"]}};const Ip=yt((function(e){var a;const{i18n:r}=We(),n=ue(null),i=ue(null),[o,s]=se({}),[d,l]=se({}),[c,u]=se(!1),m=ue({setState:null}),p=!((null==e?void 0:e.formVerificationErrors)&&0===(null===(a=Object.keys(null==e?void 0:e.formVerificationErrors))||void 0===a?void 0:a.length)),g=["instantIdVerificationData"],{data:y,valid:b,errors:f,isValid:h,triggerValidation:v,fieldProblems:_,handleChangeFor:N,setData:O,setValid:I}=ua(Object.assign(Object.assign({},e),{schema:e.showIdVerification?g:["idDocumentType"],defaultData:e.data,rules:p?null==e?void 0:e.validators:Op,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{var t,a,r,n;(null===(t=e.data)||void 0===t?void 0:t.idDocumentType)&&!c?(O("idDocumentType",null===(a=e.data)||void 0===a?void 0:a.idDocumentType),s({idFrontPage:null===(r=e.data)||void 0===r?void 0:r.idFrontPage}),l({idBackPage:null===(n=e.data)||void 0===n?void 0:n.idBackPage}),v()):p&&this.triggerValidation()}),[e.data]);const E=e=>{var t;if(e)return null===(t=dm.find((({id:t})=>e===t)))||void 0===t?void 0:t.hasBackPage},T=ra(e,r),A=!!y.idDocumentType,S=E(y.idDocumentType),R=["idDocumentType",...A?["idFrontPage"]:[],...S?["idBackPage"]:[]];this.triggerValidation=()=>{var e,t;v(),null===(e=null==n?void 0:n.current)||void 0===e||e.triggerValidation(),S&&(null===(t=null==i?void 0:i.current)||void 0===t||t.triggerValidation())},le((()=>{m.current.setState({type:"addToState",value:{data:y,valid:b,errors:f,fieldProblems:_,caller:"idDocument",dataStoreId:e.id,schema:e.showIdVerification?g:e.showManualUpload?R:["idDocumentType"]}})}),[y,b,f,h]);const D=()=>C(t.Fragment,{children:[C(Ms,{heading:r.get("idDocument")}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:T,id:"ariaErrorField"}),C("div",{className:"adyen-kyc-document-upload__subtitle",dangerouslySetInnerHTML:{__html:r.get("idUploadDocumentSubtitle",{values:{name:e.name}})}}),C(Ue,Object.assign({name:"idDocumentType",label:r.get("selectDocumentType"),errorMessage:f.idDocumentType?r.get(f.idDocumentType.errorMessage):null,isValid:b.idDocumentType},{children:Jt("select",{onChange:N("idDocumentType","input"),name:"idDocumentType",placeholder:r.get("selectDocument"),selected:y.idDocumentType,items:dm.map((({id:e,name:t})=>({id:e,name:r.get(t)})))})})),C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",r.get("requirements")]})),C(vc,Object.assign({className:"adyen-kyc-document-upload__requirements"},{children:[C(hc,{children:r.get("documentNotExpiredOrDamaged")}),E(y.idDocumentType)?C(hc,{children:r.get("includeFrontAndBack")}):C(hc,{children:r.get("providePageWithPhotoAndCode")}),C(hc,{children:r.get("fullDocumentVisible")}),C(hc,{children:r.get("imagesInColor")})]})),A&&C(mc,{type:y.idDocumentType,className:"adl-u-margin-y-16"}),A&&C(bc,{name:"idFrontPage",label:r.get("frontPage"),ref:n,defaultData:o,id:e.id,isOptional:p,iconPrefix:uc(y.idDocumentType,!0,!0)}),A&&S&&C("div",Object.assign({className:"adl-u-margin-top-16"},{children:C(bc,{name:"idBackPage",label:r.get("backPage"),ref:i,defaultData:d,id:e.id,isOptional:p,iconPrefix:uc(y.idDocumentType,!0,!1)})}))]}),k=e=>{O("instantIdVerificationData",e),I("instantIdVerificationData",!0)};return C("div",Object.assign({className:"adl-individual-document-upload adl-individual-document-upload--idDocument"},{children:[C(Yl,{onChange:({currentState:t,prevState:a,changeInitiatedBy:r})=>{var n,i,o,d,c,u,m,p;if("idDocument"===r&&(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.idDocument.idDocumentType)!==(null===(o=null===(i=null==a?void 0:a.data)||void 0===i?void 0:i.idDocument)||void 0===o?void 0:o.idDocumentType)){const a=null===(d=t.data)||void 0===d?void 0:d.idDocument,r=_m(e.legalEntityId,null==a?void 0:a.idDocumentType),n=(null===(c=null==a?void 0:a.idFrontPage)||void 0===c?void 0:c[0])instanceof File,i=(null===(u=null==a?void 0:a.idBackPage)||void 0===u?void 0:u[0])instanceof File;r?(!n&&(null===(m=r.attachments)||void 0===m?void 0:m[0])&&s({idFrontPage:[{name:vp(r,0)}]}),!i&&(null===(p=r.attachments)||void 0===p?void 0:p[1])&&l({idBackPage:[{name:vp(r,1)}]})):(n||s({idFrontPage:null}),i||l({idBackPage:null}))}}}),C(Ys,{stateRef:m}),(()=>{var a;return e.handleGetIdVerificationToken?!(null===(a=e.data)||void 0===a?void 0:a.idDocumentType)&&!e.data.instantIdVerificationData||c?!e.showManualUpload&&e.showIdVerification?C(t.Fragment,{children:[C(Np,{handleGetIdVerificationToken:e.handleGetIdVerificationToken,name:e.name,userDetails:e.userDetails,onIdVerificationComplete:e=>k(e),onIdVerificationError:e=>console.error(e)}),C("div",Object.assign({className:"adyen-kyc-document-upload__manual-upload"},{children:[r.get("canNotCompleteInstantVerification"),"\xa0",r.get("goBackAndProvideDocumentScans")]}))]}):D():C(t.Fragment,{children:[C(Ms,{heading:r.get("documentVerification")}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:T,id:"ariaErrorField"}),C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:r.get("youHaveSuccessfullyProvidedTheIdDocument")})),C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[C("span",{children:[r.get("madeAMistake"),"\xa0"]}),C("button",Object.assign({className:"adl-link",title:r.get("submitIdDocumentsAgain"),type:"button",onClick:()=>{u(!0),e.setShowManualUpload(!1),e.setShowIdVerification(!1),O("idDocumentType",void 0),I("idDocumentType",!1)}},{children:r.get("submitIdDocumentsAgain")}))]}))]}):(e.setShowManualUpload(!0),D())})()]}))}),((e,t)=>B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name&&e.showIdVerification===t.showIdVerification&&e.showManualUpload===t.showManualUpload)),Ep=[{id:"instantVerification",name:"takePhotoOriginalDocumentWithPhone",subtitle:"instant",description:"instantIDVerificationDescription",iconComponentDesktop:"instant-verification-desktop",iconComponentMobile:"instant-verification-mobile",provider:"provider-logo-onfido"},{id:"manualVerification",name:"uploadScanOriginalIDDocument",subtitle:"takesLonger",description:"manualIDVerificationDescription",iconComponentDesktop:"manual-verification-desktop",iconComponentMobile:"manual-verification-mobile"}];function Tp(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(null===e[t]||Ss(e[t]))&&delete e[t];return e}const Ap={data:{},allData:{},errors:{},valid:{},fieldProblems:{},isValid:!1};function Sp({defaultData:e={},children:t}){const a={currentState:{data:e,allData:e,valid:{},errors:{},fieldProblems:{},validityByForm:{}},prevState:{},changeInitiatedBy:null},r=function(){const[e,t]=se({}),[a,r]=se([]);return{reducer:function({currentState:r},n){var i,o,s,d,l;switch(n.type){case"addToState":{const s=null!==(i=n.value.dataStoreId)&&void 0!==i?i:n.value.caller,d=n.value.schema||null,l=d&&(null===(o=null==e?void 0:e[s])||void 0===o?void 0:o.toString())!==d.toString(),c=Object.assign(Object.assign({},r),{data:Object.assign(Object.assign({},r.data),{[s]:Object.assign(Object.assign({},r.data[s]),n.value.data)}),allData:Object.assign(Object.assign({},r.allData),{[s]:Object.assign(Object.assign({},r.allData[s]),Tp(n.value.data))}),errors:Object.assign(Object.assign({},r.errors),{[s]:Object.assign(Object.assign({},r.errors[s]),n.value.errors)}),valid:Object.assign(Object.assign({},r.valid),{[s]:Object.assign(Object.assign({},r.valid[s]),n.value.valid)}),fieldProblems:Object.assign(Object.assign({},r.fieldProblems),{[s]:Object.assign(Object.assign({},r.fieldProblems[s]),n.value.fieldProblems)})});if(l){t(Object.assign(Object.assign({},e),{[s]:d}));const a=d.reduce(((e,t)=>{var a;const r=c.data[s],n=c.allData[s],i=c.valid[s],o=c.errors[s],d=c.fieldProblems[s];return{data:Object.assign(Object.assign({},e.data),{[t]:null!==(a=r[t])&&void 0!==a?a:n[t]}),valid:Object.assign(Object.assign({},e.valid),{[t]:i[t]}),errors:Object.assign(Object.assign({},e.errors),{[t]:o[t]}),fieldProblems:Object.assign(Object.assign({},e.fieldProblems),{[t]:d[t]})}}),{data:{},valid:{},errors:{},fieldProblems:{}});c.data[s]=a.data,c.valid[s]=a.valid,c.errors[s]=a.errors,c.fieldProblems[s]=a.fieldProblems}return c.validityByForm=Object.assign(Object.assign({},c.validityByForm),{[s]:Object.values(c.valid[s]).every((e=>e))}),c.allValid=Object.values(c.validityByForm).every((e=>e)),c.isValid=a.length?a.every((e=>c.validityByForm[e])):c.allValid,{currentState:c,prevState:r,changeInitiatedBy:s}}case"resetState":{const e=null!==(d=null===(s=n.value)||void 0===s?void 0:s.dataStoreId)&&void 0!==d?d:null===(l=n.value)||void 0===l?void 0:l.caller;return{currentState:Ap,prevState:r,changeInitiatedBy:e}}default:throw new Error(`Unhandled action type: ${n.type}`)}},setCurrentForms:e=>{r(e)}}}(),[n,i]=de(r.reducer,a),o={state:n,dispatch:i,setActiveForms:r.setCurrentForms,getData:()=>{var e,t;return null!==(t=null===(e=null==n?void 0:n.currentState)||void 0===e?void 0:e.data)&&void 0!==t?t:{}}};return C(Xs.Provider,Object.assign({value:o},{children:t}))}const Rp=t.createContext(null);var Cp;function Dp(e){const t=ue(null),{label:r,subLabel:n,actionLabel:i,type:o,duration:s,onToastHide:d}=e,l=o===Cp.LOADING,c=o===Cp.SUCCESS,u=Ve("toast"),m=()=>{t.current.classList.remove("adl-toast--visible"),d()};return le((()=>{t.current.classList.add("adl-toast--visible"),setTimeout((()=>{m()}),s)}),[r]),C("div",Object.assign({ref:t,role:i?"alertdialog":"alert",className:"adl-toast","aria-labelledby":u},{children:[l&&C("div",Object.assign({className:"adl-toast__loader"},{children:C("div",{className:"adl-loading-indicator adl-loading-indicator--small adl-loading-indicator--dark"})})),!l&&o&&C("div",Object.assign({className:a("adl-toast__status",{"adl-toast__status--success":c,"adl-toast__status--error":!c})},{children:[c&&C(xe,{className:"adl-toast__status-icon",name:"checkmark"}),!c&&C(xe,{className:"adl-toast__status-icon",name:"cross"})]})),C("div",Object.assign({className:"adl-toast__message"},{children:[C("span",Object.assign({id:u,className:"adl-toast__title"},{children:r})),i&&C("button",Object.assign({className:"adl-link adl-toast__action",title:"performAction",type:"button",onClick:e.onToastAction},{children:i})),!l&&n&&C("span",Object.assign({className:"adl-toast__subtitle"},{children:n}))]})),!l&&C("button",Object.assign({className:"adl-toast__close",title:"close",type:"button",onClick:m},{children:C(xe,{name:"cross"})}))]}))}function kp({children:e}){const[t,a]=se(null);return C(Rp.Provider,Object.assign({value:{showToast:e=>{a(e)}}},{children:[!!t&&C("div",Object.assign({className:"adyen-kyc-dropin__toast-stack"},{children:C("div",Object.assign({className:"adyen-kyc-dropin__toast-context"},{children:C(Dp,Object.assign({},t,{onToastHide:()=>{a(null)}}))}))})),e]}))}!function(e){e.LOADING="loading",e.SUCCESS="success",e.ERROR="error"}(Cp||(Cp={})),Dp.defaultProps={duration:3500};const Lp={editPrefilledCountry:!0,changeLegalEntityType:!0,enableTrustFlow:!1};function wp({children:e,settings:t={}}){return C(Kd.Provider,Object.assign({value:{isSettingEnabled:e=>t&&e in t?t[e]:Lp[e]}},{children:e}))}const Pp={xsOnly:"adyen-layout-xs-only",md:"adyen-layout-md",lg:"adyen-layout-lg"},jp={md:680,lg:1024};class xp extends P{constructor(e){super(e),this.handleStateChange=({currentState:e})=>{this.setState(e)}}formatData(){return Object.assign({},this.state.data)}get isValid(){return!!this.state.isValid}assignLayout(e,t){let a=[];e.forEach((e=>{var r;const n=null===(r=e.contentBoxSize)||void 0===r?void 0:r[0].inlineSize;n?a=(e=>{const t=Object.entries(jp).reduce(((t,[a,r])=>(r<=e&&t.push(Pp[a]),t)),[]);return t.length>0?t:["adyen-layout-xs-only"]})(n):a.push(Pp.lg),t.classList.remove(...Object.values(Pp)),t.classList.add(...a)}))}renderDropinComponent(){return C("div",{children:"Placeholder for dropin component"})}render(){return C(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey,contextCountry:this.props.country,commonProps:{showInlineErrors:this.props.showInlineErrors},isReview:this.props.isReview},{children:C(Sp,Object.assign({defaultData:this.props.data},{children:C(wp,Object.assign({settings:this.props.settings},{children:[C(Yl,{owner:"Dropin",onChange:this.handleStateChange}),C("div",Object.assign({className:"adyen-kyc-dropin-container adl-u-position-relative"},{children:C(kp,{children:this.renderDropinComponent()})}))]}))}))}))}}const Mp=["idVerificationMethod"];function Fp(e){const{i18n:a,loadingContext:r}=We(),n=e.id,i=Mp,o=ue({setState:null}),s=`${r}static/images/id-verification-method`,{handleChangeFor:d,data:l,valid:c,errors:u,isValid:m,triggerValidation:p,fieldProblems:g}=ua(Object.assign(Object.assign({},e),{schema:i,defaultData:Object.assign(Object.assign({},e.data),{idVerificationMethod:"manualVerification"}),rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),y=ra(e,a);return this.triggerValidation=()=>{p(["idVerificationMethod"])},le((()=>{o.current.setState({type:"addToState",value:{data:l,valid:c,errors:u,fieldProblems:g,caller:n,dataStoreId:n,schema:i}})}),[l,c,u,m]),C("div",{children:[C(Ys,{owner:n,stateRef:o}),C("form",Object.assign({className:"adyen-kyc-verification-method"},{children:[C(Ms,{heading:a.get("verificationMethod")}),C("div",{dangerouslySetInnerHTML:{__html:a.get("idUploadDocumentSubtitle",{values:{name:e.name}})}}),C("div",{children:a.get("weAccept")}),C(vc,Object.assign({className:"adl-u-margin-bottom-16"},{children:[C(hc,{children:a.get("passport")}),C(hc,{children:a.get("identityCard")}),C(hc,{children:a.get("driversLicense")})]})),C(Ue,Object.assign({name:"verificationMethods",useLabelElement:!1,errorMessage:y.getErrorMessage("idVerificationMethod",u,g)},{children:C("div",Object.assign({className:"adyen-kyc-field-verification-methods"},{children:Ep.map((e=>C(zt,Object.assign({item:e,uniqueId:e.id,i18n:a,value:l.idVerificationMethod,onChange:d("idVerificationMethod"),name:e.id,labelClassName:"adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"},{children:[C(zt.Icon,{children:C("div",Object.assign({className:"adyen-kyc-radio-group-card__illustration"},{children:C("picture",{children:[C("source",{type:"image/svg+xml",media:`(min-width: ${jp.md}px)`,srcSet:`${s}/${e.iconComponentDesktop}.svg`}),C("source",{type:"image/svg+xml",media:`(max-width: ${jp.md}px)`,srcSet:`${s}/${e.iconComponentMobile}.svg`}),C("img",{srcSet:`${s}/${e.iconComponentDesktop}.svg`,alt:`${e.iconComponentDesktop}`})]})}))}),e.provider&&C(zt.Footer,{children:C("div",Object.assign({className:"adyen-kyc-field-verification-methods__footer"},{children:[a.get("poweredBy"),C("img",{src:`${s}/${e.provider}.svg`,alt:`${e.provider}-logo`})]}))})]}),e.id)))}))})),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:y,id:"ariaErrorField"}),C(ul,{page:"Instant verification with Onfido",title:a.get("howVerificationWithOnfidoWorks"),content:C(t.Fragment,{children:[C("div",Object.assign({className:"adl-u-margin-bottom-8"},{children:a.get("onfidoIsOurTrustedPartner")})),C(vc,Object.assign({className:"adyen-kyc-id-verification-method__guidance adl-u-margin-bottom-8"},{children:[C(hc,{children:a.get("usePhoneToScanId")}),C(hc,{children:a.get("onfidoWillGiveFeedbackInRealTime")}),C(hc,{children:a.get("theIdCheckWillBeAutomaticallyValidated")})]})),C("div",Object.assign({className:"adl-u-margin-bottom-8"},{children:a.get("adyenKeepsDataAsLongAsLegallyRequired")})),C(ed,Object.assign({href:"https://www.adyen.com/policies-and-disclaimer/privacy-policy-archive-21",external:!0},{children:a.get("learnMore")}))]}),titleId:"howVerificationWithOnfidoWorks",contentId:"howVerificationWithOnfidoWorksContent"})]}))]})}var Vp;!function(e){e.BANK_STATEMENT="bankStatement",e.UTILITY_BILL="utilityBill",e.GOVERNMENT_ISSUED_CORRESPONDENCE="governmentIssuedCorrespondence",e.TAXATION_DOCUMENT="taxationDocument",e.EXTRACT_FROM_MUNICIPAL_PERSONAL_RECORDS_DATABASE="extractFromMunicipalPersonalRecordsDatabase",e.SALARY_SLIP="salarySlip",e.MORTGAGE_STATEMENT="mortgageStatement",e.CERTIFICATE_OF_VOTER_REGISTRATION="certificateOfVoterRegistration"}(Vp||(Vp={}));const Up=[{id:Vp.BANK_STATEMENT,name:"bankStatement"},{id:Vp.UTILITY_BILL,name:"utilityBill"},{id:Vp.GOVERNMENT_ISSUED_CORRESPONDENCE,name:"governmentIssuedCorrespondence"},{id:Vp.TAXATION_DOCUMENT,name:"taxationDocument"},{id:Vp.EXTRACT_FROM_MUNICIPAL_PERSONAL_RECORDS_DATABASE,name:"extractFromMunicipalPersonalRecordsDatabase"},{id:Vp.SALARY_SLIP,name:"salarySlip"},{id:Vp.MORTGAGE_STATEMENT,name:"mortgageStatement"},{id:Vp.CERTIFICATE_OF_VOTER_REGISTRATION,name:"certificateOfVoterRegistration"}];const Bp=yt((function(e){var{ref:a,id:r}=e,i=n(e,["ref","id"]);const{i18n:o}=We(),[s,d]=se(Up[0].id),l=s===Vp.MORTGAGE_STATEMENT||s===Vp.CERTIFICATE_OF_VOTER_REGISTRATION,c=C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",o.get("requirements")]})),C(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[C(hc,{children:o.get("documentAddressedToName",{values:{name:i.name}})}),C(hc,{children:o.get("showAddressStateCountry")}),C(hc,{children:l?o.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:12}}):o.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:3}})}),C(hc,{children:o.get("fullDocumentVisibleWithReadableText")}),C(hc,{children:o.get("documentCannotBeDamaged")})]}))]});return C("div",{children:C(fc,Object.assign({},i,{name:i.name,documentField:"proofOfResidence",documentType:cc.PROOF_OF_RESIDENCY,ref:a,heading:o.get("proofOfResidence"),guidanceHeader:C("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:o.get("proofOfResidenceDocumentTypeLabel",{values:{name:i.name}})})),documentTypeSelect:{selectedType:s,setSelectedType:d,options:Up},guidanceContent:c,id:r}))})}),((e,t)=>B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&B(e.requiredFields,t.requiredFields)&&e.name===t.name)),Wp={personalDetails:{formId:"personalDetails",formName:"personalDetails",fields:im},address:{formId:"address",formName:"address",fields:["address"]},idVerificationMethod:{formId:"idVerificationMethod",formName:"verificationMethod",fields:["idVerificationMethod"]},idDocument:{formId:"idDocument",formName:"idDocument",fields:["idDocumentType","idFrontPage","idBackPage","idDocument"]},proofOfResidence:{formId:"proofOfResidence",formName:"proofOfResidence",fields:["proofOfResidence"]},proofOfNationalId:{formId:"proofOfNationalId",formName:"proofOfNationalId",fields:["proofOfNationalId"]}},Hp=Wp.personalDetails.formId,qp=Wp.address.formId,Gp=Wp.idDocument.formId,$p=Wp.idVerificationMethod.formId,Xp=Wp.proofOfResidence.formId,Yp=Wp.proofOfNationalId.formId,Kp=[$p,Gp,Xp,Yp];function zp({trackingConig:e={topLevelLegalEntity:{}},parentLegalEntity:t,legalEntity:a,task:r}){const{topLevelLegalEntity:n}=e,i={task:r,flow:null==n?void 0:n.type,topLevelLegalEntityId:n.id,topLevelLegalEntityType:n.type};return t&&(i.parentLegalEntityId=t.id,i.parentLegalEntityType=t.type),a&&(i.legalEntityId=a.id,i.legalEntityType=a.type),i}const Zp={BANK_CODE:"bankCode",BRANCH_CODE:"branchCode",COUNTRY:"country",NUMBER:"bankAccountNumber",BANK_CITY:"bankCity",SWIFT_CODE:"swiftCode",IBAN:"iban",OWNER_NAME:"accountHolder",BANK_NAME:"bankName",BANK_COUNTRY:"bankCountry",OWNER_CITY:"accountHolderCity"},Qp=[Zp.NUMBER,Zp.IBAN],Jp={AU:{branchCode:{label:"bsbNumber"}},BR:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},"CA--CAD":{branchCode:{label:"transitNumber"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},CA:{bankCode:{label:"institutionNumber"},branchCode:{label:"transitNumber"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},"GB--GBP":{branchCode:{label:"sortCode"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},GB:{branchCode:{label:"sortCode"},bankCity:{label:"bankCityTown"},bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},"GB--EUR":{bankStatementDocument:{label:"listitemVoidedChequeBankLetterBankStatementOnline"}},HK:{bankCode:{label:"clearingCode"},branchCode:{label:"branchCode"}},ID:{branchCode:{label:"clearingCode"}},NZ:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},"SG--SGD":{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},SG:{bankCode:{label:"bankCode"},branchCode:{label:"branchCode"}},US:{branchCode:{label:"achRoutingNumber"}}},eg=e=>{if(!e)return;if("bic_either8or11"===e)return{modes:["blur","input"],validate:e=>/^([a-zA-Z0-9]{8}|[a-zA-Z0-9]{11})$/.test(e),errorMessage:"validation8Or11Characters"};const[t,a,r]=e.split(":");if("iban"===t)return{modes:["blur","input"],validate:e=>js(e,+a),errorMessage:{translationKey:"validationCharacters",translationObject:{values:{length:a}}}};if("digits"===t){if(r){const e=new RegExp(`^\\d{${a},${r}}$`,"");return{modes:["blur","input"],validate:t=>e.test(t),errorMessage:{translationKey:"validationDigitsBetween",translationObject:{values:{start:a,end:r}}}}}const e=new RegExp(`^\\d{${a}}$`,"");return{modes:["blur","input"],validate:t=>e.test(t),errorMessage:{translationKey:"validationDigits",translationObject:{values:{length:a}}}}}},tg={role:{rule:"REQUIRED"},firstName:{rule:"REQUIRED"},lastName:{rule:"REQUIRED"},birthDate:{rule:"REQUIRED"},phoneNumber:{rule:"contactsIfRequiredForRole"},email:{rule:"contactsIfRequiredForRole"},jobTitle:{rule:"jobTitleIfRequiredForRole"},address:{rule:"REQUIRED"},residencyCountry:{rule:"REQUIRED"},proofOfResidence:{rule:"isProofOfResidenceRequired"},proofOfNationalId:{rule:"isProofOfNationalIdRequired"},isPartOfTrust:{rule:"partOfTrustFieldsOnlyAU"},accountHolder:{rule:"accountHolderIfCustomer"}},ag={idNumber:{rule:"REQUIRED",verify:"isVerificationAllowedForCountry"},idNumberExempt:{rule:"idNumberExemptIfApplicableCountry"},idDocument:{rule:"idDocumentIfIdNumberExempted"},idVerificationMethod:{rule:"idDocumentIfIdNumberExempted"}},rg={typeOfIdentity:{rule:"requiredIfCountryUsesMultipleTypesOfIdentity"},issuerState:{rule:"requiredIfIdentityTypeIsDriversLicense"},licenseCardNumber:{rule:"requiredIfIdentityTypeIsDriversLicense"}},ng={L0:V(["address","birthDate"]).from(tg),L1:tg,L1_ID:Object.assign(Object.assign(Object.assign({},tg),ag),rg),L1_IDO:Object.assign(Object.assign(Object.assign({},tg),ag),rg),L1_NAT:Object.assign(Object.assign(Object.assign(Object.assign({},tg),ag),rg),{nationality:{rule:"REQUIRED"}}),L1_IDDOC:{idDocument:{rule:"REQUIRED"}}},ig={US:{idNumber:{label:"socialSecurityNumber",placeholder:"SSNFormatUS"},idNumberExempt:{label:"uploadDocumentForSsn"}},CA:{idNumber:{label:"socialInsuranceNumber",placeholder:"SINFormatCA"},idNumberExempt:{label:"uploadDocumentForSsn"}},IT:{idNumber:{label:"codiceFiscale"}},BR:{idNumber:{label:"cadastroDePessoasFisicas"}},SE:{idNumber:{label:"personnummer"}},ES:{idNumber:{label:"dniNumber"}}},og={trustType:{rule:"REQUIRED"},legalName:{rule:"REQUIRED"},country:{rule:"REQUIRED"},taxId:{rule:"REQUIRED"},registrationAddress:{rule:"REQUIRED"},operationalAddress:{rule:"OPTIONAL"}},sg={L0:Object.assign({},og),L1:Object.assign({},og),L:Object.assign({},og)},dg={AU:{taxId:{label:"australianBusinessNumberAbn"}}},lg={legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"},tradingName:{rule:"REQUIRED"},registrationNumber:{rule:"SolePropsRegistrationNumberRules"},exemptedFromRegistrationNumber:{rule:"SolePropsExemptedFromRegistrationNumberRules"},registrationAddress:{rule:"REQUIRED"},stockExchangeMIC:{rule:"stockExchangeMICIfTypePublic"},stockISIN:{rule:"stockISINIfTypePublic"}},cg={L0:{legalCompanyName:{rule:"REQUIRED"},companyCountry:{rule:"REQUIRED"}},L1:Object.assign({},lg),L2:Object.assign({},lg),L:Object.assign(Object.assign({},lg),{vatNumber:{rule:"vatRules"},exemptedFromVat:{rule:"vatRules"},vatAbsenceReason:{rule:"vatRules"},taxId:{rule:"taxIdRules"},exemptedFromTax:{rule:"SolePropsExemptedFromTaxRules"}}),L_ConstDoc:{constitutionalDocument:{rule:"REQUIRED"}}},ug=xd;const mg=(e,t)=>(e&&Object.entries(e).forEach((([e,a])=>{t[e]=Object.assign(Object.assign({},t[e]),a)})),t);const pg=(e,t)=>null==t?void 0:t.some((t=>{var a,r;return(null===(a=null==t?void 0:t.fields)||void 0===a?void 0:a.includes(e))&&(null===(r=null==t?void 0:t.forms)||void 0===r?void 0:r.some((e=>e===Wp.idDocument.formId||e===Wp.proofOfResidence.formId||e===Wp.proofOfNationalId.formId||e===_c.companyRegistrationDocument.formId||e===_c.companyTaxDocument.formId||e===kc.solePropConstitutionalDocument.formId)))})),gg=({onNext:e,onBack:t,onHome:a,homeButtonLabel:r,backButtonLabel:n,nextButtonLabel:i,hideOnHomeButton:o,hideBackButton:s})=>C("div",Object.assign({className:"adyen-action-bar"},{children:[(t||e)&&C("div",Object.assign({className:"adyen-action-bar__action"},{children:[t&&!s&&C(Gc,{label:n,className:"adyen-action-bar__button",secondary:!0,onClick:()=>t(),testId:"backBtn"}),e&&C(Gc,{label:i,className:"adyen-action-bar__button",onClick:e,testId:"nextBtn"})]})),a&&r&&!o&&C("div",Object.assign({className:"adyen-action-bar__action"},{children:C(Gc,{className:"adyen-action-bar__button",label:r,secondary:!0,onClick:()=>a(),testId:"homeBtn"})}))]})),yg=()=>{const{i18n:e,isReview:t}=We();return t?C("div",Object.assign({className:"adl-review-alert"},{children:C(zs,{hasCloseButton:!1,type:Ks.WARNING,title:e.get("verifyCompanyInfoIsUpToDate")})})):null},bg={formId:"summary",formName:"summary"};function fg({data:e,forms:t,omittedKeys:a,gotoForm:r,labels:n,problems:i,trackNavigation:o=G,omittedForms:s=[]}){var d,l;const{i18n:c}=We(),u=(null==i?void 0:i.validationErrors)&&(null===(d=Object.values(null==i?void 0:i.validationErrors))||void 0===d?void 0:d.reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{})),m=(null==i?void 0:i.verificationErrors)&&(null===(l=Object.values(null==i?void 0:i.verificationErrors))||void 0===l?void 0:l.reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{})),p=ra({labels:n},c),g=(e,a)=>C("ul",Object.assign({className:"adyen-kyc-summary__heading-section"},{children:[C("li",{children:C("span",Object.assign({className:"adyen-kyc-summary__form-heading"},{children:e}))}),C("li",{children:C(Gc,{className:"adyen-kyc-summary__edit-form-button",ghost:!0,circle:!0,tertiary:!0,icon:"edit",onClick:()=>{o({fromForm:{formName:"summary",formId:"summary"},toForm:{formId:a,formName:e},component:"Pencil icon"}),(e=>{const a=t.findIndex((t=>t.formId===e));a>=0&&r(a)})(a)},title:c.get("edit"),label:c.get("edit"),labelHoverBox:!0})})]})),y=(e,t,a,r)=>C("li",Object.assign({className:"adyen-kyc-summary__item"},{children:[g(a,r),C("ul",Object.assign({className:"adyen-kyc-summary__content-section"},{children:f(e,t)}))]})),b=(e={},t,a)=>{const r=[];return e&&Object.entries(e).forEach((([e,n])=>{const i=c.get(null==t?void 0:t[e])||c.get(e);"object"==typeof n&&null!==n&&r.push(y(n,t,i,a))})),r},f=(e={},t={})=>{const r=[];return e&&Object.entries(e).forEach((([e,n])=>{const i=c.get(t[e])||c.get(e);"object"!=typeof n||null===n||(null==a?void 0:a.includes(e))?"string"!=typeof n||(null==a?void 0:a.includes(e))||r.push(C("li",Object.assign({className:"adyen-kyc-summary__data-item"},{children:[C("span",Object.assign({className:"adyen-kyc-summary__field"},{children:i})),C("span",Object.assign({className:"adyen-kyc-summary__data"},{children:n}))]}))):r.push(C("li",Object.assign({className:"adyen-kyc-summary__item-nested"},{children:C("ul",Object.assign({className:"adyen-kyc-summary__content-section-nested"},{children:f(n,t)}))})))})),r};return C("div",Object.assign({role:"region",className:"adyen-kyc-summary"},{children:[C("h2",Object.assign({className:"adyen-kyc-summary__heading"},{children:c.get("summary")})),C(yg,{}),C(qc,{validationErrors:u,verificationErrors:m,formUtils:p,id:"ariaErrorField"}),C("ul",Object.assign({className:"adyen-kyc-summary"},{children:(e=>{const a=[];return t.forEach((({formId:t,formName:r})=>{var i;const o=null==e?void 0:e[t];if(!o||Object.keys(o).every((e=>Ss(o[e])))||t===bg.formId||(null==s?void 0:s.includes(t)))return;const d=(null===(i=null==e?void 0:e[t])||void 0===i?void 0:i.hasInnerForms)?b(null==e?void 0:e[t],null==n?void 0:n[t],t):(null==e?void 0:e[t])?y(null==e?void 0:e[t],null==n?void 0:n[t],c.get(r),t):null;a.push(d)})),a})(e)}))]}))}const hg=e=>{const{content:t,footer:a}=e;return C("div",Object.assign({className:"adyen-kyc-dropin"},{children:[C("div",Object.assign({className:"adyen-kyc-dropin__content"},{children:C("div",Object.assign({className:"adyen-kyc-dropin__content-main"},{children:t}))})),a&&C("div",Object.assign({className:"adyen-kyc-dropin__footer-container"},{children:a}))]}))},vg=({trackNavigation:e,form:t,isActive:r,onClick:n,hasVerificationErrors:i})=>{const{i18n:o}=We();return C("li",Object.assign({className:a("adyen-kyc-form-navigation__item",{"adyen-kyc-form-navigation__item--active":r,"adyen-kyc-form-navigation__item--valid":t.isValid,"adyen-kyc-form-navigation__item--isnav":n}),onClick:()=>{e(),n()}},{children:[o.get(t.formName),t.hasServerValidationErrors&&C("span",Object.assign({className:"adyen-kyc-form-navigation__item-icon adyen-kyc-form-navigation__item-icon--error"},{children:C(Zs,{type:Ks.WARNING})})),t.isValid&&!t.hasServerValidationErrors&&!i&&C("span",Object.assign({className:"adyen-kyc-form-navigation__item-icon adyen-kyc-form-navigation__item-icon--success"},{children:C(xe,{name:"checkmark-small"})}))]}),t.formId)};function _g({forms:e,activeForm:t,gotoForm:r,validateForm:n,className:i,taskName:o,hasVerificationErrors:s,trackNavigation:d=G}){const{i18n:l}=We(),c=t=>null==e?void 0:e.findIndex((e=>e.formId===t.formId)),u=c(t)+1,m=null==e?void 0:e.length,p=(t,a)=>{const i=c(t),o=[...e];o.length=i;return o.every((e=>e.isValid))?((e,t)=>()=>{if(e.formId!==t.formId){const t=c(e);r(t)}})(t,a):a.isValid?null:n};return C("div",Object.assign({className:a("adyen-kyc-form-navigation",i)},{children:[C("div",Object.assign({className:"adyen-kyc-form-navigation__header"},{children:l.get(o)})),C("ul",Object.assign({className:"adyen-kyc-form-navigation__items"},{children:[e&&C("li",Object.assign({className:"adyen-kyc-form-navigation__home-button-item"},{children:C("span",Object.assign({className:"adyen-kyc-form-navigation__step-count"},{children:l.get("stepsX/YofForm",{values:{activeFormIndex:u,totalForms:m,taskName:o}})}))})),null==e?void 0:e.map((e=>C(vg,{form:e,isActive:e.formId===t.formId,onClick:p(e,t),trackNavigation:()=>d({fromForm:e,toForm:t,component:"FormNavigation"}),hasVerificationErrors:s},e.formId)))]}))]}))}function Ng({children:e,forms:t,setFormIndex:a}){return C(Qs.Provider,Object.assign({value:{setFormIndex:a,goToFormByFieldName:e=>{const r=t.findIndex((t=>{var a;return null===(a=null==t?void 0:t.fields)||void 0===a?void 0:a.some((t=>t===e))}));r>-1?a(r):console.error("No form was found to have that field so form navigation failed.")}}},{children:e}))}function Og(e,a){const{getComponentForms:r,parseConfiguration:n,rules:o,labels:s,getTaskName:d}=a;return a=>{var l,c,u;const{i18n:m,loadingContext:p,clientKey:g,contextCountry:y,setContextCountry:b,isReview:f,setPayoutDefaultCurrency:h}=We(),{isSettingEnabled:_}=zd(),{getData:N}=Kl(),{getOmittedKeys:O=null,formatData:I=null,omittedForms:E}=a.summary||{},T=r(a),A=d(a),[S]=se(f?[bg,...Object.values(T),bg]:[...Object.values(T),bg]),[R,D]=se(S),[k,L]=se(!1),[P,j]=se(!1),[x,M]=se(!1),[F,V]=se(!1),[U,B]=se(!1),[W,H]=se(null),[q,G]=se(!1),[X,Y]=se({}),[K,z]=se((()=>{var e,t,r,n;if((null===(e=null==a?void 0:a.problems)||void 0===e?void 0:e.remediationActions)&&Object.keys(null===(t=null==a?void 0:a.problems)||void 0===t?void 0:t.remediationActions).length>0){const e=Object.values(null===(r=null==a?void 0:a.problems)||void 0===r?void 0:r.remediationActions).flat().filter((e=>{var t;return(null===(t=e.forms)||void 0===t?void 0:t.length)>0}));if(1===e.length&&1===(null===(n=e[0])||void 0===n?void 0:n.forms.length)){const t=R.find((t=>{var a;return(null==t?void 0:t.formId)===(null===(a=e[0])||void 0===a?void 0:a.forms[0])}));if(t)return t}return R[R.length-1]}return R[0]})()),[Z,Q]=se({}),J=ue(null),[ee,te]=se(null),[ae,re]=se(Fu.SUCCESS),[ne,ie]=se(a.data),[oe,de]=se(a),[ce,me]=se(a.country||y),[pe,ge]=se(null),[ye,be]=se(null);le((()=>{!function(e){oc?Promise.resolve():v({loadingContext:e,path:"static/images/country-flags.svg"},null,"text").then((e=>{document.body.insertBefore(dc(e),document.body.firstChild),oc=!0}))}(p),lc(p)}),[p]),le((()=>{n&&ce&&(re(Fu.LOADING),$({loadingContext:p,clientKey:g,country:ce,capabilities:a.capabilities,legalEntityType:a.legalEntityType}).then((e=>{var t;const{matchingScenario:a,requiredFields:r,bankVerificationProviders:i}=e,o=null===(t=null==r?void 0:r.payout)||void 0===t?void 0:t.currency;o&&h(o);const s=n({requiredFields:r,matchingScenario:a,country:ce,bankVerificationAvailable:i&&!!i[ce]&&!!oe.handleGetBankVerificationVendors});te(s),be(r),ge(i),fe(s,ce,N(),_,r),re(Fu.SUCCESS)})).catch((e=>{console.warn("WARNING: Configuration failed - error:",e),re(Fu.SUCCESS)})))}),[ce]);const fe=(e,t,r,n,i)=>{var d,l;const c=function(e,t={},a={},r,n){var i;const o={},s={},d={},l={},c={},u={},m={},p={};if(e)return null===(i=Object.entries(r))||void 0===i||i.forEach((([r,i])=>{var g;null===(g=null==i?void 0:i.fields)||void 0===g||g.forEach((i=>{var g;const y=e[i],b=y&&("REQUIRED"===(null==y?void 0:y.rule)||(null==t?void 0:t[y.rule])&&"REQUIRED"===t[y.rule]()),f=pg(i,n)||b;f&&(o[r]=o[r]?[...o[r],i]:[i],d[r]=d[r]?[...d[r],i]:[i]);const h=y&&("OPTIONAL"===y.rule||(null==t?void 0:t[y.rule])&&"OPTIONAL"===t[y.rule]());if(!f&&h&&(s[r]=s[r]?[...s[r],i]:[i],d[r]=d[r]?[...d[r],i]:[i]),y){const e=(null===(g=null==a?void 0:a[i])||void 0===g?void 0:g.call(a))||y.label;e&&(c[r]=c[r]?Object.assign(Object.assign({},c[r]),{[i]:e}):{[i]:e}),y.verify&&("string"!=typeof y.verify||t[y.verify]())&&(l[r]=l[r]?[...l[r],i]:[i]),y.placeholder&&(u[r]=Object.assign(Object.assign({},u[r]||{}),{[i]:y.placeholder})),y.validators&&(m[r]=Object.assign(Object.assign({},m[r]||{}),{[i]:y.validators})),y.masked&&(p[r]=p[r]?[...p[r],i]:[i])}}))})),{requiredFields:o,optionalFields:s,allFields:d,labels:c,verifyFields:l,placeholders:u,validators:m,maskedFields:p}}(e,o?o({data:r,country:t,taskType:a.taskType,isSettingEnabled:n,requiredFields:i}):{},s?s(r,t):{},T,(null===(d=null==a?void 0:a.problems)||void 0===d?void 0:d.remediationActions)&&Object.values(null===(l=null==a?void 0:a.problems)||void 0===l?void 0:l.remediationActions));de(Object.assign(Object.assign(Object.assign({},a),c),{country:ce}))},he=({fromForm:e,toForm:t,component:r})=>{w.addEvent("Navigated form",{segmentation:Object.assign(Object.assign({},null==a?void 0:a.baseTrackingPayload),{component:r,from:e.formId,fromLabel:m.get(e.formName),to:t.formId,toLabel:m.get(t.formName)})})},ve=e=>{J.current.verifyForm?J.current.verifyForm(K.formId).then((t=>{t&&z(R[e])})):z(R[e])},_e=()=>{J.current.triggerCurrentFormValidation()},Ne=(e,t,r=!1)=>{var n,i;if(J.current.customNavigationHandler)return void J.current.customNavigationHandler();if(null===(n=X[K.formId])||void 0===n?void 0:n.onNext)return void(null===(i=X[K.formId])||void 0===i||i.onNext());const o=(null==oe?void 0:oe.allFields)||{};var s;if(Te(K))q?a.navigateBackToTaskList():a.onSubmit({data:N(),forms:R,allFields:o,setLoadingStatus:re});else if(Z[K.formId]||r){if(Ie())return void a.onSubmit({data:N(),forms:R,allFields:o,setLoadingStatus:re});const e=R.findIndex((e=>e.formId===K.formId))+1;ve(e);const t=R[e];he({fromForm:K,toForm:t,component:"ActionBar"}),s=K,w.addEvent("Completed form section",{segmentation:Object.assign(Object.assign({},null==a?void 0:a.baseTrackingPayload),{sectionName:s.formId})})}else _e()},Oe=()=>{if(Ee())a.handleBackClick&&a.handleBackClick();else{const e=R.findIndex((e=>e.formId===K.formId));if(e){const t=R[e],a=R[e-1];z(a),he({fromForm:t,toForm:a,component:"ActionBar"})}}},Ie=()=>R.findIndex((e=>e.formId===K.formId))===R.length-1,Ee=()=>0===R.findIndex((e=>e.formId===K.formId)),Te=e=>e.formId===bg.formId;le((()=>(a.eventEmitter.on("next",Ne),a.eventEmitter.on("back",Oe),a.eventEmitter.on("validate",_e),()=>{a.eventEmitter.off("next",Ne),a.eventEmitter.off("back",Ne),a.eventEmitter.off("validate",_e)})),[K,R]),le((()=>{const e=S.filter((e=>{return t=e.formId,!oe.requiredFields&&!oe.optionalFields||!!oe.requiredFields[t]||!!oe.optionalFields[t]||Te(e);var t}));D(e)}),[oe.requiredFields]),le((()=>{ie(a.data)}),[a.data]);const Ae=e=>{Q(e.validityByForm||e.valid),e.validityByForm||a.onChange(e)},Se=!k&&!x&&C(gg,{onNext:Ne,onBack:Oe,backButtonLabel:m.get("back"),nextButtonLabel:f?Te(K)?m.get("confirm"):m.get("next"):Ie()?m.get(null!=W?W:"submit"):m.get("next"),onHome:()=>i(this,void 0,void 0,(function*(){var e,t;const r=N();if((yield null===(e=a.hasDataChanged)||void 0===e?void 0:e.call(a,r))&&(null===(t=a.canSubmit)||void 0===t?void 0:t.call(a,r))){b(ce);const e=(null==oe?void 0:oe.allFields)||{};yield a.onSubmit({data:r,forms:R,allFields:e,setLoadingStatus:re})}else a.handleHomeClick()})),homeButtonLabel:a.homeButtonLabel,hideOnHomeButton:F,hideBackButton:U}),Re=C("div",Object.assign({className:"adyen-kyc-form-container"},{children:C(Vu,Object.assign({status:ae,formOpacityWhenLoading:.3,loaderSize:"large"},{children:C(Ng,Object.assign({setFormIndex:ve,forms:R},{children:[C(Yl,{owner:"FormComposer",onChange:({currentState:e})=>{Ae(e)}}),C(e,Object.assign({ref:J,forms:R,activeForm:K},oe,{data:ne,onChange:Ae,evaluateConfiguration:e=>fe(ee,ce,e,_,ye),onCountryChange:e=>{me(e)},legalEntityId:a.legalEntityId,problems:null==a?void 0:a.problems,onNext:Ne,onBack:Oe,setHideDropinLayout:L,setHideNavigation:j,setHideFooter:M,setCustomFormNavigationHandlers:(e,t,a)=>{Y(Object.assign(Object.assign({},X),{[e]:{onNext:t,onBack:a}}))},setHideOnHomeButton:V,setHideBackButton:B,setSubmitButtonLabel:H,setSkipSubmitAndGoTaskList:G,bankVerificationVendors:pe})),K.formId===bg.formId&&C("div",Object.assign({className:"adyen-kyc-form-wrapper"},{children:C(fg,{trackNavigation:he,data:I?I(N(),R):N(),omittedKeys:O?O(N()):null,omittedForms:E,forms:R,gotoForm:ve,labels:oe.labels,problems:null==a?void 0:a.problems})})),Se]}))}))})),Ce=!k&&!P&&C(Vu,Object.assign({status:ae,formOpacityWhenLoading:.3,showSpinner:!1,className:"adyen-kyc-dropin__sidebar-wrapper"},{children:C(_g,{forms:f?null:R.map((({formId:e,formName:t})=>{var r,n;return{formId:e,formName:t,isValid:Z[e],hasServerValidationErrors:void 0!==(null===(n=null===(r=null==a?void 0:a.problems)||void 0===r?void 0:r.validationErrors)||void 0===n?void 0:n[e])}})),activeForm:K,gotoForm:ve,validateForm:_e,taskName:A,trackNavigation:he,hasVerificationErrors:(null===(l=null==a?void 0:a.problems)||void 0===l?void 0:l.verificationErrors)&&(null===(u=Object.keys(null===(c=null==a?void 0:a.problems)||void 0===c?void 0:c.verificationErrors))||void 0===u?void 0:u.length)>0})})),De=C(t.Fragment,{children:[Ce,Re]});return a.hideDropinLayout?C(t.Fragment,{children:Re}):C(hg,{content:De})}}function Ig(){const e=ge(Rp);if(void 0===e)throw new Error("useToastContext must be used within a ToastProvider");return e}const Eg=(e,t)=>{if((null==e?void 0:e.invalidFields)&&(null==e?void 0:e.invalidFields.length)>0)return null==e?void 0:e.invalidFields.reduce(((e,a)=>{if(null==a?void 0:a.name){const r=Tg(null==a?void 0:a.name,t);r&&bp(r,e,!0)}return e}),{})},Tg=(e,t)=>{switch(t){case Rd.INDIVIDUAL:return _d[e];case Rd.COMPANY:return vd[e];case Rd.PAYOUT:case Rd.PAYIN:return Nd[e]}return null},Ag=Og((function(e){const{i18n:a}=We(),[r,n]=se(e.data),[i,o]=se(!1),[s,d]=se(!1),l=ue({setState:null});le((()=>{const t=Object.values(e.forms).reduce(((e,t)=>[...e,..."summary"!==t.formId?[t.formId]:[]]),[]);l.current.setActiveForms(t)}),[e.forms.toString()]),le((()=>()=>{l.current.setState({type:"resetState"})}),[]);const c={[Hp]:ue(null),[qp]:ue(null),[$p]:ue(null),[Gp]:ue(null),[Xp]:ue(null),[Yp]:ue(null)},u=Cd(e,Hp),m=Cd(e,qp),p=Cd(e,Gp),g=Cd(e,$p),y=Cd(e,Xp),b=Cd(e,Yp);this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==c?void 0:c[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()},this.verifyForm=e=>{var t,a;return(null===(a=null===(t=c[e])||void 0===t?void 0:t.current)||void 0===a?void 0:a.verifyForm)?c[e].current.verifyForm():Promise.resolve(!0)};const f=e=>{var t,a;return`${null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.firstName} ${null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.lastName}`},h=e=>{var t,a,r;return{firstName:null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.firstName,lastName:null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.lastName,residencyCountry:null===(r=null==e?void 0:e.personalDetails)||void 0===r?void 0:r.residencyCountry}},v=({currentState:t,prevState:a})=>{var r,i,l,c,u,m,p,g,y,b;(((e,t)=>{var a,r,n,i;const o=null===(r=null===(a=e.data)||void 0===a?void 0:a.personalDetails)||void 0===r?void 0:r.idNumberExempt,s=null===(i=null===(n=t.data)||void 0===n?void 0:n.personalDetails)||void 0===i?void 0:i.idNumberExempt;return null!=o&&null!=s&&s!==o})(a,t)||((e,t)=>{var a,r,n,i;return(null===(r=null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.personalDetails)||void 0===r?void 0:r.typeOfIdentity)!==(null===(i=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.personalDetails)||void 0===i?void 0:i.typeOfIdentity)})(a,t)||_(a,t))&&e.evaluateConfiguration(t.allData);const f=null===(i=null===(r=a.data)||void 0===r?void 0:r.personalDetails)||void 0===i?void 0:i.residencyCountry,h=null===(c=null===(l=t.data)||void 0===l?void 0:l.personalDetails)||void 0===c?void 0:c.residencyCountry;null!=h&&h!==f&&e.onCountryChange(h);const v=null===(m=null===(u=a.data)||void 0===u?void 0:u.idVerificationMethod)||void 0===m?void 0:m.idVerificationMethod,N=null===(g=null===(p=t.data)||void 0===p?void 0:p.idVerificationMethod)||void 0===g?void 0:g.idVerificationMethod;null!=N&&N!==v&&("instantVerification"===N?(d(!0),o(!1)):(o(!0),d(!1)));const O=null===(b=null===(y=t.data)||void 0===y?void 0:y.personalDetails)||void 0===b?void 0:b.accountHolder;this.customNavigationHandler=O===Wd.THE_COMPANY_I_WORK_FOR?()=>e.onTypeSwitch(id.ORGANIZATION):null,s&&t.validityByForm[Gp]&&e.onNext(null,null,!0),n(t.data)},_=(t,a)=>{var r,n,i,o;return e.taskType===Rd.DECISION_MAKER&&!U((null===(n=null===(r=t.data)||void 0===r?void 0:r.personalDetails)||void 0===n?void 0:n.role)||[],(null===(o=null===(i=a.data)||void 0===i?void 0:i.personalDetails)||void 0===o?void 0:o.role)||[])};return C("div",Object.assign({className:"adyen-kyc-individual"},{children:(N=e.activeForm,C(t.Fragment,{children:[C(Yl,{owner:"IndividualComponent",onChange:v}),C(Ys,{owner:"IndividualComponent",stateRef:l}),C("div",Object.assign({className:N.formId!==Hp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(om,Object.assign({},u,{data:Object.assign(Object.assign({},null==u?void 0:u.data),{residencyCountry:e.country}),ref:c[Hp],heading:a.get("providePersonalDetails"),taskType:e.taskType,id:Hp,allowedRoles:null==e?void 0:e.allowedRoles}))})),C("div",Object.assign({className:N.formId!==qp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C("div",{children:[C(Ms,{heading:a.get("providePersonalAddress")}),C(ul,{page:"Personal address",title:a.get("whyDoINeedToFillInThisInformation"),content:a.get("reasonForFillingIndividualAddressDetails"),titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingIndividualAddressDetails"}),C($c,Object.assign({},m,{ref:c[qp],data:Object.assign(Object.assign({},m.data),{country:e.country}),hideCountry:!0,id:qp,legalEntityId:e.legalEntityId,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))]})})),C("div",Object.assign({className:N.formId!==$p?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Fp,Object.assign({},g,{ref:c[$p],name:f(r),id:$p}))})),C("div",Object.assign({className:N.formId!==Gp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Ip,Object.assign({},p,{ref:c[Gp],name:f(r),userDetails:h(r),id:Gp,legalEntityId:e.legalEntityId,handleGetIdVerificationToken:e.handleGetIdVerificationToken,showManualUpload:i,setShowManualUpload:o,showIdVerification:s,setShowIdVerification:d}))})),C("div",Object.assign({className:N.formId!==Xp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Bp,Object.assign({},y,{ref:c[Xp],id:Xp,name:f(r)}))})),C("div",Object.assign({className:N.formId!==Yp?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(fc,Object.assign({},b,{documentField:"proofOfNationalId",documentType:cc.REGISTRATION_DOCUMENT,ref:c[Yp],heading:a.get("proofOfNationalId"),id:Yp}))}))]}))}));var N}),{getComponentForms:()=>Wp,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),ng[t])),{});return a=mg(ig[t],a),a}(e[id.INDIVIDUAL],t),rules:({data:e,country:t,taskType:a,isSettingEnabled:r})=>({idNumberExemptIfApplicableCountry:()=>{if($d.includes(t))return"REQUIRED"},idDocumentIfIdNumberExempted:()=>{var t;if(null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.idNumberExempt)return"REQUIRED"},isProofOfResidenceRequired:()=>{var t;if(null===(t=null==e?void 0:e.proofOfResidence)||void 0===t?void 0:t.proofOfResidence)return"REQUIRED"},isProofOfNationalIdRequired:()=>{var t;if(null===(t=null==e?void 0:e.proofOfNationalId)||void 0===t?void 0:t.proofOfNationalId)return"REQUIRED"},contactsIfRequiredForRole:()=>{var t,a;return(null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.role)?(null===(a=null==e?void 0:e.personalDetails)||void 0===a?void 0:a.role)&&e.personalDetails.role.includes(qd.SIGNATORY)?"REQUIRED":void 0:"REQUIRED"},jobTitleIfRequiredForRole:()=>{var t;if((null===(t=null==e?void 0:e.personalDetails)||void 0===t?void 0:t.role)&&e.personalDetails.role.some((e=>e===qd.SIGNATORY||e===qd.CONTROLLING_PERSON)))return"REQUIRED"},partOfTrustFieldsOnlyAU:()=>{if("AU"===t&&r("enableTrustFlow"))return"REQUIRED"},accountHolderIfCustomer:()=>{if(a===Rd.INDIVIDUAL)return"REQUIRED"},requiredIfCountryUsesMultipleTypesOfIdentity:()=>{if(Yd.includes(t))return"REQUIRED"},requiredIfIdentityTypeIsDriversLicense:()=>{var t;if("driversLicense"===(null===(t=e.personalDetails)||void 0===t?void 0:t.typeOfIdentity))return"REQUIRED"},isVerificationAllowedForCountry:()=>Xd.includes(t)}),getTaskName:()=>"individualDetails"});function Sg(e){var t,a,r,n,o,s;const{i18n:d,setLocale:l,setIsLegalEntityPartOfTrust:c,setAccountHolder:u}=We(),{showToast:m}=Ig(),{handleCreateDocument:p,handleGetDocument:y,handleUpdateDocument:b,handleAddressSearch:f,handleFindAddress:h,handleGetIdVerificationToken:v,handleGetIdVerificationStartCheck:_,taskType:N,trackingConig:O,parentLegalEntity:I,legalEntityResponse:E}=e;let T=dp(E,e.isTargetLegalEntityType);const A=ym(p,y,b),[S,R]=se(null);let D=[];const[k,L]=se(null==e?void 0:e.problems);if(N===Rd.DECISION_MAKER||N===Rd.TRUST_MEMBER_COMPANY_OWNER){if(null===(t=null==e?void 0:e.parentLegalEntity)||void 0===t?void 0:t.entityAssociations){const e=null===(a=null==I?void 0:I.entityAssociations)||void 0===a?void 0:a.filter((e=>e.legalEntityId===(null==E?void 0:E.id)));if(e&&e.length>0){const t=null===(r=e.find((e=>Boolean(e.jobTitle))))||void 0===r?void 0:r.jobTitle;T=Object.assign(Object.assign({},T),{personalDetails:Object.assign(Object.assign(Object.assign({},null==T?void 0:T.personalDetails),{role:null==e?void 0:e.map((e=>e.type))}),t&&{jobTitle:t})})}}D=Nu(I,N)}const[P,j]=se(T||e.data),x=zp({trackingConig:O,parentLegalEntity:I,legalEntity:E,task:N});le((()=>{w.addPageView("Individual dropin"),w.addEvent("Started individual task",{segmentation:Object.assign({},x)})}),[]),le((()=>{var t;e.eventEmitter.on("updateLocale",(e=>l(e)));const a=(null===(t=null==E?void 0:E.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];a.length&&A.fetchDocuments(a,null==E?void 0:E.id).then((()=>{const e=mp(null==E?void 0:E.id);j(Object.assign(Object.assign({},P),e))})).catch((()=>{m({label:d.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}))}),[]);const M=({dataSubmitted:t,legalEntity:a,idDocumentType:r})=>i(this,void 0,void 0,(function*(){let n;return(null==E?void 0:E.id)||(null==S?void 0:S.id)?n=yield e.handleUpdateLegalEntity(V("type").from(a),(null==E?void 0:E.id)||(null==S?void 0:S.id)):(n=yield e.handleCreateLegalEntity(a),R(a),w.addEvent("Added decision maker",{segmentation:Object.assign(Object.assign({},x),{legalEntityId:n.id,legalEntityType:n.type,countryOfRegistration:t.personalDetails.residencyCountry,roles:t.personalDetails.role})})),w.addEvent("Saved individual details",{segmentation:Object.assign(Object.assign({},x),{legalEntityId:n.id,legalEntityType:n.type,countryOfRegistration:t.personalDetails.residencyCountry,idDocumentType:r})}),n})),F=(e,t)=>i(this,void 0,void 0,(function*(){const a={legalEntityId:t,captureMetadata:e};yield _("",a)})),U=({forms:e,legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(G(e))if(H(a))yield F(a.idDocument.instantIdVerificationData,t.id);else{const e=yield up(a,t.id);yield A.uploadDocuments(e,t.id),null==e||e.forEach((e=>{w.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},x),{documentType:e.type,fileExtention:e.attachments.map((e=>Sm(e.pageName)))})})}))}})),H=e=>{var t;return!!(null===(t=e.idDocument)||void 0===t?void 0:t.instantIdVerificationData)},q=({legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){var r,n;const i=N===Rd.DECISION_MAKER||N===Rd.TRUST_MEMBER_COMPANY_OWNER?null===(r=null==a?void 0:a.personalDetails)||void 0===r?void 0:r.role:N===Rd.TRUST_MEMBER_INDIVIDUAL?null===(n=e.associationDetail)||void 0===n?void 0:n.types:null,o=$m(I);if(i&&((e,t)=>{var a;return(null===(a=$m(I).filter((a=>a.legalEntityId===e.id&&t.includes(a.type))))||void 0===a?void 0:a.length)!==t.length})(t,i)){const r={entityAssociations:[...i.map((e=>{var r;return{type:e,legalEntityId:t.id,jobTitle:null===(r=null==a?void 0:a.personalDetails)||void 0===r?void 0:r.jobTitle}}))||[],...o.filter((e=>e.legalEntityId!==t.id))||[]]};yield e.handleUpdateLegalEntity(r,I.id)}})),G=e=>e.some((e=>Kp.includes(e.formId))),$=g(d.locale),X=({idDocument:e,proofOfNationalId:t,proofOfResidence:a})=>{var r,n,i,o;return Object.assign(Object.assign(Object.assign({},((null==e?void 0:e.idDocumentType)||(null==e?void 0:e.instantIdVerificationData))&&{idDocument:Y(e)}),(null==t?void 0:t.proofOfNationalId)&&{proofOfNationalId:{fileName:null===(n=null===(r=t.proofOfNationalId)||void 0===r?void 0:r[0])||void 0===n?void 0:n.name}}),(null==a?void 0:a.proofOfResidence)&&{proofOfResidence:{fileName:null===(o=null===(i=a.proofOfResidence)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name}})},Y=e=>{var t,a,r,n,i,o;if(e){const s=H({idDocument:e})?lm.find((t=>e.instantIdVerificationData.document_front.type===t.id)):dm.find((({id:t})=>(null==e?void 0:e.idDocumentType)===t));return Object.assign({documentType:d.get(null==s?void 0:s.name)},(null==s?void 0:s.hasBackPage)?{frontPage:null===(a=null===(t=null==e?void 0:e.idFrontPage)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name,backPage:null===(n=null===(r=null==e?void 0:e.idBackPage)||void 0===r?void 0:r[0])||void 0===n?void 0:n.name}:{fileName:null===(o=null===(i=null==e?void 0:e.idFrontPage)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name})}};return C(Ag,{baseTrackingPayload:x,capabilities:e.capabilities,data:P,country:(null===(n=null==P?void 0:P.personalDetails)||void 0===n?void 0:n.residencyCountry)||(null===(s=null===(o=null==I?void 0:I.organization)||void 0===o?void 0:o.registeredAddress)||void 0===s?void 0:s.country),taskType:e.taskType,problems:k,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,handleBackClick:e.handleBackClick,handleGetIdVerificationToken:v,onSubmit:({data:t,forms:a,setLoadingStatus:r})=>i(this,void 0,void 0,(function*(){var n,i,o;r(Fu.LOADING);try{let s=ip(t);const d=null===(n=dm.find((({id:e})=>{var a;return(null===(a=t.idDocument)||void 0===a?void 0:a.idDocumentType)===e})))||void 0===n?void 0:n.id;w.addEvent("Provided individual details",{segmentation:Object.assign(Object.assign({},x),{countryOfRegistration:t.personalDetails.residencyCountry,idDocumentType:d})}),s=yield M({dataSubmitted:t,legalEntity:s,idDocumentType:d}),yield U({forms:a,legalEntity:s,dataSubmitted:t}),yield q({legalEntity:s,dataSubmitted:t}),c((null===(i=null==t?void 0:t.personalDetails)||void 0===i?void 0:i.isPartOfTrust)===Md.IS_PART_OF_TRUST),u(null===(o=null==t?void 0:t.personalDetails)||void 0===o?void 0:o.accountHolder),r(Fu.SUCCESS),null==e||e.onSubmit(t)}catch(e){if((null==e?void 0:e.errorCode)===st){const t=Eg(e,Rd.INDIVIDUAL);L(Object.assign(Object.assign({},k),{validationErrors:t}))}else m({label:d.get("failedToUpdateDetails"),type:Cp.ERROR});r(Fu.SUCCESS),w.addEvent("Encountered error individual details",{segmentation:Object.assign(Object.assign({},x),{errorCode:e.errorCode,errorMessage:e.title,errorType:"BE"})})}})),summary:{formatData:(e,t)=>{var a,r,n;let i=W(e);return(null===(a=i.personalDetails)||void 0===a?void 0:a.residencyCountry)&&(i.personalDetails.residencyCountry=$.getCountryName(i.personalDetails.residencyCountry)),i.address&&(i.address=Pe(i.address,$)),G(t)&&(Kp.forEach((e=>delete i[e])),i=Object.assign(Object.assign({},i),X(e))),(null===(r=null==i?void 0:i.personalDetails)||void 0===r?void 0:r.isPartOfTrust)&&(i.personalDetails.isPartOfTrust=d.get(Lm(i.personalDetails.isPartOfTrust))),(null===(n=null==i?void 0:i.personalDetails)||void 0===n?void 0:n.accountHolder)&&(i.personalDetails.accountHolder=d.get(i.personalDetails.accountHolder)),i},getOmittedKeys:t=>{var a;return[e.taskType===Rd.DECISION_MAKER?"role":null,(null===(a=t.personalDetails)||void 0===a?void 0:a.idNumberExempt)?"idNumber":null].filter(Boolean)}},hasDataChanged:e=>i(this,void 0,void 0,(function*(){const t=ip(e),a=yield up(e,"test");return!B(t,V(["documents","id"]).from(E||{}))||a.length>0})),canSubmit:t=>(e.taskType===Rd.DECISION_MAKER?sd.DECISIONMAKER:sd.INDIVIDUAL).every((e=>{const a=_p(t,e);return!Ss(a)||Array.isArray(e)&&e.length>0})),legalEntityType:id.INDIVIDUAL,legalEntityId:null==E?void 0:E.id,allowedRoles:D,handleAddressSearch:f,handleFindAddress:h,onTypeSwitch:e.onTypeSwitch})}const Rg=["ES","GB","US","IE"],Cg=["AT","CA","CH","FI","LT","LU","SE"],Dg=["US","CA","AU","HK","NZ","SG"],kg=["AU","HK","NZ","SG"],Lg=({data:e,country:t,taskType:a,isSettingEnabled:r})=>({stockExchangeMICIfTypePublic:()=>{var t;if((null===(t=null==e?void 0:e.companyType)||void 0===t?void 0:t.entityType)===Ld.PUBLIC_COMPANY)return"REQUIRED"},stockISINIfTypePublic:()=>{var t;if((null===(t=null==e?void 0:e.companyType)||void 0===t?void 0:t.entityType)===Ld.PUBLIC_COMPANY)return"REQUIRED"},vatRules:()=>{if(!Dg.includes(t))return"REQUIRED"},taxIdRules:()=>{if(Dg.includes(t))return"REQUIRED"},SolePropsExemptedFromTaxRules:()=>{if(Dg.includes(t))return"REQUIRED"},SolePropsExemptedFromRegistrationNumberRules:()=>{if(Cg.includes(t))return"REQUIRED"},SolePropsRegistrationNumberRules:()=>{if(!Rg.includes(t))return"REQUIRED"},partOfTrustFieldsOnlyAU:()=>{if("AU"===t&&r("enableTrustFlow"))return"REQUIRED"},registrationNumberRules:()=>{if(!Rg.includes(t))return"REQUIRED"},accountHolderIfCustomer:()=>{if(a===Rd.COMPANY)return"REQUIRED"},exemptedFromTaxRules:()=>{if(kg.includes(t))return"REQUIRED"}}),wg=Og((function(e){const{i18n:a}=We(),[r,n]=se(null),i={[Nc]:ue(null),[Oc]:ue(null),[Ic]:ue(null),[Ec]:ue(null),[Tc]:ue(null),[Ac]:ue(null)},o=Cd(e,Nc),s=Cd(e,Oc),d=Cd(e,Ic),l=Cd(e,Ec),c=Cd(e,Tc),u=Cd(e,Ac);this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==i?void 0:i[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const m=({currentState:t,prevState:a})=>{var r,i,o,s,d,l,c,u,m,p;const g=null===(i=null===(r=t.data)||void 0===r?void 0:r[Oc])||void 0===i?void 0:i.entityType;n(g);const y=null===(s=null===(o=a.data)||void 0===o?void 0:o[Nc])||void 0===s?void 0:s.companyCountry,b=null===(l=null===(d=t.data)||void 0===d?void 0:d[Nc])||void 0===l?void 0:l.companyCountry,f=null===(u=null===(c=t.data)||void 0===c?void 0:c[Oc])||void 0===u?void 0:u.accountHolder;null!=b&&b!==y&&e.onCountryChange(b),g!==(null===(p=null===(m=a.data)||void 0===m?void 0:m[Oc])||void 0===p?void 0:p.entityType)&&e.evaluateConfiguration(t.allData),this.customNavigationHandler=f===Wd.MY_NAME?()=>e.onTypeSwitch(id.INDIVIDUAL):null};return C("div",Object.assign({className:"adyen-kyc-company"},{children:(p=e.activeForm,C("div",Object.assign({className:"adyen-kyc-company"},{children:[C(Yl,{owner:"CompanyComponent",onChange:m}),C("div",Object.assign({className:p.formId!==Nc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(ic,Object.assign({},o,{data:Object.assign(Object.assign({},null==o?void 0:o.data),{companyCountry:e.country}),ref:i[Nc],heading:a.get("nameAndCountry"),id:Nc}))})),C("div",Object.assign({className:p.formId!==Oc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(al,Object.assign({},s,{ref:i[Oc],heading:a.get("companyStructure"),id:Oc}))})),C("div",Object.assign({className:p.formId!==Ic?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Zl,Object.assign({},d,{ref:i[Ic],heading:a.get("registrationDetails"),id:Ic,country:e.country,companyType:r}))})),C("div",Object.assign({className:p.formId!==Ec?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(yl,Object.assign({},l,{ref:i[Ec],heading:a.get("registeredAddress"),description:a.get("registeredAddressHeaderDescription"),id:Ec,country:e.country,problems:null==e?void 0:e.problems,handleAddressSearch:e.handleAddressSearch,handleFindAddress:e.handleFindAddress}))})),C("div",Object.assign({className:p.formId!==Tc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(fc,Object.assign({},c,{documentField:"registrationDocument",documentType:cc.REGISTRATION_DOCUMENT,ref:i[Tc],heading:a.get("registrationDocument"),guidanceContent:C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:a.get("registrationDocumentSubTitle")})),C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("requirements")]})),C(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[C(hc,{children:a.get("documentIssuedByGovernmentAuthority")}),C(hc,{children:a.get("dateOnDocumentNoOlderThanXMonths",{values:{noOfMonths:12}})})]})),C(ul,{page:"Company registration document",titleId:"whatIfDocumentIsMoreThan12MonthsOld",contentId:"ifDocumentMoreThan12months",title:a.get("whatIfDocumentIsMoreThan12MonthsOld"),content:a.get("ifDocumentMoreThan12months")})]}),id:Tc}))})),C("div",Object.assign({className:p.formId!==Ac?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(fc,Object.assign({},u,{documentField:"taxDocument",documentType:cc.VAT_DOCUMENT,ref:i[Ac],heading:a.get("taxDocument"),guidanceContent:C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:a.get("uploadTaxationDocument")})),C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",a.get("requirements")]})),C(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[C(hc,{children:a.get("containsNameOfCompany")}),C(hc,{children:a.get("documentShowsTaxIdOfCompany")}),C(hc,{children:a.get("issuedByTheTaxAuthority")})]}))]}),id:Ac}))}))]})))}));var p}),{getComponentForms:()=>_c,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),jd[t])),{});return a=mg(xd[t],a),a}}(null==e?void 0:e[id.ORGANIZATION],t),rules:Lg,labels:(e,t)=>({registrationNumber:()=>{var a,r,n,i;return"GB"===t&&(null===(a=null==e?void 0:e.companyType)||void 0===a?void 0:a.entityType)===Ld.NON_PROFIT_OR_CHARITABLE?"charityNumber":"FR"===t&&(null===(r=null==e?void 0:e.companyType)||void 0===r?void 0:r.entityType)===Ld.NON_PROFIT_OR_CHARITABLE?"RNA/SIREN/SIRETNumber":"AT"===t&&(null===(n=null==e?void 0:e.companyType)||void 0===n?void 0:n.entityType)===Ld.NON_PROFIT_OR_CHARITABLE||"AT"===t&&(null===(i=null==e?void 0:e.companyType)||void 0===i?void 0:i.entityType)===Ld.INCORPORATED_ASSOCIATION?"firmenbuchnummerOrZVR":void 0}}),getTaskName:()=>"companyDetails"});function Pg(e){var t;const{showToast:a}=Ig(),{i18n:r,setLocale:n,setIsLegalEntityPartOfTrust:o}=We(),{handleCreateDocument:s,handleGetDocument:d,handleUpdateDocument:l,handleAddressSearch:c,handleFindAddress:u,taskType:m,trackingConig:p,associationDetail:y,parentLegalEntity:b,legalEntityResponse:f,isTargetLegalEntityType:h}=e,v=lp(f,h),[_,N]=se(v||e.data),[O,I]=se(e.problems),E=zp({trackingConig:p,parentLegalEntity:b,legalEntity:f,task:m});le((()=>{w.addPageView("Company dropin"),w.addEvent("Started company task",{segmentation:E})}),[]);const T=({forms:e,legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(S(e)){const e=yield pp(a,t.id);e&&(yield R.uploadDocuments(e,t.id),e.forEach((e=>{w.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},E),{documentType:e.type,fileExtention:e.attachments.map((e=>Sm(e.pageName)))})})})))}})),A=({legalEntity:t})=>i(this,void 0,void 0,(function*(){if(m===Rd.TRUST_MEMBER_COMPANY){const a=$m(b),r=null==y?void 0:y.types;if(r&&D(b,r)){const n={entityAssociations:[...r.map((e=>({type:e,legalEntityId:t.id})))||[],...a.filter((e=>e.legalEntityId!==t.id))||[]]};yield e.handleUpdateLegalEntity(n,b.id)}}})),S=e=>e.some((e=>[_c.companyRegistrationDocument.formId,_c.companyTaxDocument.formId].includes(e.formId))),R=ym(s,d,l),D=(e,t)=>{var a;return(null===(a=$m(b).filter((a=>a.legalEntityId===e.id&&t.includes(a.type))))||void 0===a?void 0:a.length)!==t.length};le((()=>{var t;e.eventEmitter.on("updateLocale",(e=>n(e)));const i=(null===(t=null==f?void 0:f.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];try{i.length&&R.fetchDocuments(i,f.id).then((()=>{const e=(e=>{const t=_m(e,cc.REGISTRATION_DOCUMENT)||null,a=_m(e,cc.VAT_DOCUMENT)||null;return{companyRegistrationDocument:t?{registrationDocument:[{name:vp(t)}]}:null,companyTaxDocument:a?{taxDocument:[{name:vp(a)}]}:null}})(f.id);N(Object.assign(Object.assign({},_),e))})).catch((()=>{a({label:r.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}))}catch(e){a({label:r.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}}),[]);const k=g(r.locale),L=(e,t)=>{var a,r,n,i;return Object.assign(Object.assign({},(null==e?void 0:e.registrationDocument)&&{companyRegistrationDocument:{fileName:null===(r=null===(a=e.registrationDocument)||void 0===a?void 0:a[0])||void 0===r?void 0:r.name}}),(null==t?void 0:t.taxDocument)&&{companyTaxDocument:{fileName:null===(i=null===(n=t.taxDocument)||void 0===n?void 0:n[0])||void 0===i?void 0:i.name}})};return C(Sp,Object.assign({defaultData:v},{children:C(wg,{baseTrackingPayload:E,capabilities:e.capabilities,data:_,country:null===(t=null==_?void 0:_.companyNameAndCountry)||void 0===t?void 0:t.companyCountry,taskType:e.taskType,problems:O,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,handleBackClick:e.handleBackClick,onSubmit:({data:t,forms:n,setLoadingStatus:s})=>i(this,void 0,void 0,(function*(){var i;const d=lp(f,!1),l=((e,t)=>(Object.keys(t).forEach((a=>{Object.keys(t[a]).forEach((r=>{void 0===e[a][r]&&(Array.isArray(t[a][r])?e[a][r]=[]:e[a][r]="")}))})),e))(t,d);let c=cp(l);s(Fu.LOADING);const u={companyStructure:t.companyType.entityType,countryOfRegistration:t.companyNameAndCountry.companyCountry,legalEntityName:t.companyNameAndCountry.legalCompanyName,usedAdditionalAddress:t.companyRegistrationDetails.operationalAddressIsSame===rl.OPERATIONAL_ADDRESS_IS_NOT_SAME};try{w.addEvent("Provided company details",{segmentation:Object.assign(Object.assign({},E),u)}),c=(null==f?void 0:f.id)?yield e.handleUpdateLegalEntity(V("type").from(c),f.id):yield e.handleCreateLegalEntity(c),w.addEvent("Saved company details",{segmentation:Object.assign(Object.assign(Object.assign({},E),{legalEntityId:c.id,legalEntityType:c.type}),u)}),yield T({forms:n,legalEntity:c,dataSubmitted:t}),yield A({legalEntity:c}),o((null===(i=null==t?void 0:t.companyType)||void 0===i?void 0:i.isPartOfTrust)===Md.IS_PART_OF_TRUST),s(Fu.SUCCESS),null==e||e.onSubmit(t)}catch(e){if((null==e?void 0:e.errorCode)===st){const t=Eg(e,Rd.COMPANY);I(Object.assign(Object.assign({},O),{validationErrors:t}))}else a({label:r.get("failedToUpdateDetails"),type:Cp.ERROR});s(Fu.SUCCESS),w.addEvent("Encountered error company details",{segmentation:Object.assign(Object.assign({},E),{errorCode:e.errorCode,errorMessage:e.title,errorType:"BE"})})}})),legalEntityType:id.ORGANIZATION,summary:{formatData:(e,t)=>{var a,n,i,o,s,d,l,c,u;let m=W(e);if((null===(a=null==m?void 0:m.companyNameAndCountry)||void 0===a?void 0:a.companyCountry)&&(m.companyNameAndCountry.companyCountry=k.getCountryName(m.companyNameAndCountry.companyCountry)),null===(n=null==m?void 0:m.companyType)||void 0===n?void 0:n.entityType){const e=null===(i=Pd.find((e=>{var t;return e.id===(null===(t=m.companyType)||void 0===t?void 0:t.entityType)})))||void 0===i?void 0:i.name;m.companyType.entityType=r.get(e)}if((null===(o=null==m?void 0:m.companyType)||void 0===o?void 0:o.accountHolder)&&(m.companyType.accountHolder=r.get(null===(s=null==m?void 0:m.companyType)||void 0===s?void 0:s.accountHolder)),(null===(d=null==m?void 0:m.companyRegistrationDetails)||void 0===d?void 0:d.registrationAddress)&&(m.companyRegistrationDetails.hasInnerForms=!0,m.companyRegistrationDetails.registrationAddress=Pe(null==m?void 0:m.companyRegistrationDetails.registrationAddress,k)),(null===(l=null==m?void 0:m.companyRegistrationDetails)||void 0===l?void 0:l.operationalAddress)&&(m.companyRegistrationDetails.operationalAddress=Pe(null==m?void 0:m.companyRegistrationDetails.operationalAddress,k)),null===(c=m.companyDetails)||void 0===c?void 0:c.vatAbsenceReason){const e=Cl.find((e=>e===m.companyDetails.vatAbsenceReason));e&&(m.companyDetails.vatAbsenceReason=r.get(e))}return S(t)&&(Sc.forEach((e=>delete m[e])),m=Object.assign(Object.assign({},m),L(e.companyRegistrationDocument,e.companyTaxDocument))),(null===(u=null==m?void 0:m.companyType)||void 0===u?void 0:u.isPartOfTrust)&&(m.companyType.isPartOfTrust=r.get(Lm(m.companyType.isPartOfTrust))),m},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>i(this,void 0,void 0,(function*(){var t;const a=(null===(t=cp(e))||void 0===t?void 0:t.organization)||{},r=(null==f?void 0:f.organization)||{},n=yield pp(e,"");return!B(a,r)||n.length>0})),canSubmit:e=>sd.ORGANIZATION.every((t=>{const a=_p(e,t);return!Ss(a)})),handleAddressSearch:c,handleFindAddress:u,onTypeSwitch:e.onTypeSwitch})}))}function jg(){return C("div",{children:[C("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--small"}),C("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--large"}),C("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--small"}),C("div",{className:"adyen-kyc-shimmer adyen-kyc-shimmer--large"})]})}function xg({className:e,children:t}){return C("section",Object.assign({className:a("adl-card-group",e)},{children:t}))}const Mg={1:"h1",2:"h2",3:"h3",4:"h4",sub:"div"};function Fg({className:e,level:r,children:n}){const i=Mg[r]||Mg[1],o=a("adl-heading",`adl-heading--${r}`,e);return t.createElement(i,{className:o},n)}const Vg=({title:e,children:t})=>C("article",Object.assign({className:"adyen-task-list-group"},{children:[e&&C("header",Object.assign({className:"adyen-task-list-group__header"},{children:C(Fg,Object.assign({level:4},{children:e}))})),C("main",Object.assign({className:"adl-card__body"},{children:C(xg,Object.assign({className:"adyen-task-list-group__items"},{children:t}))}))]})),Ug=({className:e,problems:t})=>{const{i18n:a}=We();if((null==t?void 0:t.verificationErrors)&&Object.keys(t.verificationErrors).length>0){const r=Object.values(t.verificationErrors).reduce(((e,t)=>e=Object.assign(Object.assign({},e),t)),{}),n=Object.keys(r);if(1===n.length){const t=Object.values(r[n[0]]).flat();if(1===t.length){const r=a.get(`errorMessage_${n[0]}`),i=a.get(`remediationMessage_${t[0].code}`);return C(zs,{className:e,hasCloseButton:!1,type:Ks.ERROR,title:`${r}. ${i}`})}}}return C(zs,{className:e,hasCloseButton:!1,type:Ks.ERROR,title:a.get("verificationErrorMessage")})},Bg=({text:e,className:t,iconStatusClass:r,icon:n})=>{const i=a("adl-status",t),o=a("adl-status__icon",r);return C("div",Object.assign({className:i},{children:[C("span",Object.assign({className:o},{children:"loading"===n?C(Ze,{size:"xsmall",dot:!0}):C(xe,{name:n})})),C("span",Object.assign({className:"adl-status__text"},{children:e}))]}))},Wg=({status:e,downloadHandler:t})=>{const{i18n:a,isReview:r}=We(),n=e=>{e.stopPropagation(),t()};switch(e){case Sd.DOWNLOAD:return C("span",Object.assign({className:"adl-status--download",role:"button",tabIndex:0,icon:"download",onClick:n},{children:[a.get("download")," "]}));case Sd.FINISHED:return C(Bg,{className:"adl-status--finished",iconStatusClass:"adl-status__icon--finished",icon:"check",text:a.get("finished")});case Sd.ERROR:return C(Bg,{className:"adl-status--error",iconStatusClass:"adl-status__icon--error",icon:"info-circle",text:a.get("unsuccessful")});case Sd.PROCESSING:return C(Bg,{className:"",iconStatusClass:"",icon:"loading",text:a.get("processing")});case Sd.DETAILS_REQUIRED:case Sd.EMPTY:default:return C("span",Object.assign({className:"adl-task-status-details-required"},{children:r?a.get("verify"):a.get("go")}))}};function Hg({className:e,children:t,stateful:r,active:n,disabled:i,title:o,subTitle:s,onClick:d,onKeyDown:l}){const c=a("adl-card",e,{"adl-card--stateful":r,"adl-card--active":r&&n,"adl-card--disabled":i}),u=r&&0,m=r&&"button";return C("article",Object.assign({className:c,tabIndex:u,role:m,onClick:e=>{i||d(e)},onKeyDown:l},{children:[o&&C("header",Object.assign({className:"adl-card__header"},{children:[C(Fg,Object.assign({level:4},{children:o})),s&&C(Fg,Object.assign({level:"sub"},{children:s}))]})),C("main",Object.assign({className:"adl-card__body"},{children:t}))]}))}const qg=({title:e,tagline:t,icon:a,status:r,onNavigateToTask:n,disabled:i=!1,problems:o,downloadHandler:s})=>C(Hg,Object.assign({stateful:!0,onClick:()=>n(),onKeyDown:e=>{e.key===ot.enter&&n()},className:"adyen-task",disabled:i},{children:[C("div",Object.assign({className:"adyen-task-item"},{children:[C("div",Object.assign({className:"adyen-task-item__heading"},{children:[C("span",Object.assign({className:"adyen-task-item__icon-wrapper"},{children:C(xe,{name:a})})),C("div",Object.assign({className:"adyen-task-item__body"},{children:[C("span",Object.assign({className:"adyen-task-item__tagline"},{children:t})),C("span",Object.assign({className:"adyen-task-item__title"},{children:e}))]}))]})),C("aside",Object.assign({className:"adyen-task-item__status"},{children:[C(Wg,{status:r,downloadHandler:s}),C(xe,{className:"adl-u-color-grey-60",name:"chevron-right"})]}))]})),r===Sd.ERROR&&C(Ug,{className:"adyen-task-item-alert",problems:o})]}));var Gg;!function(e){e.BANK_ACCOUNT="BankAccount",e.LEGAL_ENTITY="LegalEntity",e.DOCUMENTS="Documents"}(Gg||(Gg={}));const $g=e=>{var t;return(null===(t=e.transferInstruments)||void 0===t?void 0:t.length)>0};function Xg({tasks:e,onNavigateToTask:a,legalEntityResponse:r,capabilityProblems:n,onPciDownload:i,pciStatus:o,serviceAgreementTypes:s}){var d,l,c,u,m,p,g,y,b,f;const{i18n:h,isLegalEntityPartOfTrust:v,accountHolder:_}=We(),N=e.some((e=>[Rd.INDIVIDUAL,Rd.COMPANY,Rd.DECISION_MAKER_OVERVIEW].includes(e))),O=v||Dm(r),I=e.some((e=>[Rd.SERVICE_AGREEMENT,Rd.PCI_DSS].includes(e))),E=e.some((e=>e===Rd.COMPANY)),T=_===Wd.MY_SOLE_TRADER_NAME||Ym(r),A=(null==r?void 0:r.transferInstruments)||[],S=(null===(d=null==r?void 0:r.organization)||void 0===d?void 0:d.legalName)||(null===(l=null==r?void 0:r.individual)||void 0===l?void 0:l.name),R=e.includes(Rd.PAYIN)&&!e.includes(Rd.PAYOUT),D=(r.type===id.ORGANIZATION&&!!(null===(c=null==r?void 0:r.entityAssociations)||void 0===c?void 0:c.length)||r.type===id.INDIVIDUAL&&!!(null==r?void 0:r.individual))&&e.includes(Rd.PCI_DSS),k="true"===(null==o?void 0:o.signingRequired)||!0===(null==o?void 0:o.signingRequired),L=!k&&(null==o?void 0:o.hasDocuments),w=!D||!k&&!(null==o?void 0:o.hasDocuments)||L,P=L||k,j=e.includes(Rd.SERVICE_AGREEMENT)&&(null==s?void 0:s.length)>0,x=!(r.type===id.ORGANIZATION&&hu(r).length||r.type===id.INDIVIDUAL&&!!(null==r?void 0:r.individual)),M=I&&(P||j),F=e=>a(R?Rd.PAYIN:Rd.PAYOUT,e);return C("div",{children:[N&&C(Vg,Object.assign({title:E?h.get("businessAccountDetailsDescription"):h.get("accountDetailsDescription")},{children:[C(yg,{}),e.includes(Rd.INDIVIDUAL)&&C(qg,{onNavigateToTask:()=>a(Rd.INDIVIDUAL),icon:"decision-maker",title:h.get("providePersonalDetails"),status:Qm(Gg.LEGAL_ENTITY,n,r,[r.id]),problems:null===(u=null==n?void 0:n.LegalEntity)||void 0===u?void 0:u[r.id]}),T&&C(qg,{onNavigateToTask:()=>a(Rd.SOLE_PROPRIETOR_COMPANY),icon:"company",title:h.get("enterSoleProprietorDetails"),status:Qm(Gg.LEGAL_ENTITY,n,r,Xm(r)),problems:Km(r,n)}),e.includes(Rd.COMPANY)&&C(qg,{onNavigateToTask:()=>a(Rd.COMPANY),icon:"company",title:h.get("provideCompanyDetails"),status:Qm(Gg.LEGAL_ENTITY,n,r,[r.id]),problems:null===(m=null==n?void 0:n.LegalEntity)||void 0===m?void 0:m[r.id]}),e.includes(Rd.DECISION_MAKER)&&C(qg,{onNavigateToTask:()=>a(Rd.DECISION_MAKER_OVERVIEW),icon:"decision-maker",title:h.get("addDecisionMakers"),status:Ou(r)?Qm(Gg.LEGAL_ENTITY,n,r,vu(r)):Sd.DETAILS_REQUIRED})]})),O&&C(Vg,Object.assign({title:h.get("trustDetailsDescription")},{children:[C(qg,{onNavigateToTask:()=>a(Rd.TRUST),icon:"trust",title:h.get("provideTrustDetails"),status:Qm(Gg.LEGAL_ENTITY,n,r,xm(r)),problems:Mm(r,n)}),C(qg,{onNavigateToTask:()=>a(Rd.TRUST_MEMBER_OVERVIEW),icon:"decision-maker",title:h.get("addTrustMembers"),status:Fm(r)?Qm(Gg.LEGAL_ENTITY,n,r,Pm(r)):Sd.DETAILS_REQUIRED})]})),(e.includes(Rd.PAYOUT)||e.includes(Rd.PAYIN))&&C(Vg,Object.assign({title:h.get(R?"payinAccountsDescription":"payoutAccountsDescription")},{children:A.length>0?C(t.Fragment,{children:[A.map((e=>{var t;return C(qg,{onNavigateToTask:()=>F(e.id),icon:"payout",title:e.accountIdentifier,tagline:h.get("payoutDetails"),status:$g(r)?Qm(Gg.BANK_ACCOUNT,n,r,[e.id]):Sd.DETAILS_REQUIRED,problems:null===(t=null==n?void 0:n.BankAccount)||void 0===t?void 0:t[e.id]})})),C(Hg,Object.assign({stateful:!0,onClick:()=>F(null),className:"adyen-task adl-add-payout",disabled:!S},{children:[C(xe,{name:"plus",className:"adl-u-padding-top-2 adl-u-margin-right-8"}),C("span",{children:h.get(R?"addExtraPayinAccount":"addExtraPayoutAccount")})]}))]}):C(qg,{onNavigateToTask:F,icon:"payout",title:h.get(R?"providePayinDetails":"providePayoutDetails"),status:$g(r)?Qm(Gg.BANK_ACCOUNT,n,r,[null===(g=null===(p=null==r?void 0:r.transferInstruments)||void 0===p?void 0:p[0])||void 0===g?void 0:g.id]):Sd.DETAILS_REQUIRED,disabled:!S,problems:null===(y=null==n?void 0:n.BankAccount)||void 0===y?void 0:y[null===(f=null===(b=null==r?void 0:r.transferInstruments)||void 0===b?void 0:b[0])||void 0===f?void 0:f.id]})})),M&&C(Vg,Object.assign({title:h.get("toCompleteProcessReviewAndSignOfficialDocumentation")},{children:[j&&s.map((e=>C(qg,{onNavigateToTask:()=>(e=>a(Rd.SERVICE_AGREEMENT,e))(e),icon:"contract",title:h.get("signServiceAgreement"),disabled:x,status:Sd.DETAILS_REQUIRED},e))),P&&C(qg,{onNavigateToTask:()=>!L&&a(Rd.PCI_DSS),icon:"pci",title:h.get("pciDssQuestionnaire"),status:L?Sd.DOWNLOAD:Sd.DETAILS_REQUIRED,downloadHandler:i,disabled:w})]}))]})}const Yg=({name:e,types:r,status:n,actions:i,reviewActions:o,problems:s,infoContent:d})=>{const{i18n:l,isReview:c}=We(),[u,m]=se(!1),p=a("adl-entity-association__more-actions-toggle",{"adl-entity-association__more-actions-toggle--open":u}),g=a("adl-entity-association__more-actions",{"adl-entity-association__more-actions--open":u});return C("div",Object.assign({className:"adl-entity-association"},{children:[C("div",Object.assign({className:"adl-entity-association__top"},{children:[C("h3",Object.assign({className:"adl-entity-association__title"},{children:e})),C("div",Object.assign({className:"adl-entity-association__info"},{children:c&&o?{reviewActions:o}:C(t.Fragment,{children:[C(Wg,{status:n}),i&&C("div",Object.assign({className:"adl-entity-association__actions"},{children:[C(Gc,{className:p,ghost:!0,icon:"more-horiz",onClick:()=>m(!u),title:l.get("toggleAssociationMenu",{values:{name:e}})}),C("div",Object.assign({className:g},{children:i}))]}))]})}))]})),C("div",{children:r.map((e=>C(ze,Object.assign({className:`adl-entity-association__tag ${qm(e)}`,isBasic:!0},{children:l.get(Gm(e))}),e)))}),n===Sd.ERROR&&C(Ug,{className:"adl-entity-association-alert",problems:s}),d]}))},Kg=({decisionMakerType:e,country:t})=>{const{i18n:a}=We();return C("div",Object.assign({className:"adl-decision-makers__box"},{children:[C(ze,Object.assign({className:`adl-u-margin-bottom-8 adl-decision-makers__tag ${qm(e)}`,isBasic:!0},{children:a.get(Gm(e))}),e),C("span",{dangerouslySetInnerHTML:{__html:a.get(bu(t)[e])}})]}))},zg=({trackingConig:e,parentLegalEntity:r,legalEntityResponse:n,capabilityProblems:o,onNavigateToIndividual:s,handleUpdateLegalEntity:d,navigateBackToTaskList:l,onDecisionMakerDelete:c})=>{var u,m;const{i18n:p}=We(),{showToast:g}=Ig(),y=fu(n),b=null===(m=null===(u=null==n?void 0:n.organization)||void 0===u?void 0:u.registeredAddress)||void 0===m?void 0:m.country,f=function(e){const t=pu(e).filter((e=>1===e.roleTypes.length)).map((e=>e.roleTypes[0]));return[...new Set(t)]}(b),h=null==y?void 0:y.reduce(((e,t)=>{var a;const r=e[t.legalEntityId],i=t.type;return e[t.legalEntityId]={legalEntityId:t.legalEntityId,types:r?[...r.types,i]:[i],status:Qm(Gg.LEGAL_ENTITY,o,n,[t.legalEntityId]),name:t.name,legalEntityType:t.entityType,problems:null===(a=null==o?void 0:o.LegalEntity)||void 0===a?void 0:a[t.legalEntityId]},e}),{}),v=h?Object.values(h):[],_=0===Nu(n,Rd.DECISION_MAKER).length,N=zp({trackingConig:e,parentLegalEntity:r,legalEntity:n,task:Rd.DECISION_MAKER_OVERVIEW}),O=e=>{s(e.legalEntityId),w.addEvent("Edited decision maker",{segmentation:Object.assign(Object.assign({},N),{legalEntityId:e.legalEntityId,legalEntityType:e.legalEntityType,roles:e.types})})},I=e=>C(t.Fragment,{children:[C(Gc,{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>O(e),label:p.get("edit"),title:p.get("editDecisionMakerDetails",{values:{decisionMaker:e.name}})}),C(Gc,{className:"adl-entity-association__delete",ghost:!0,icon:"bin",onClick:()=>(e=>i(void 0,void 0,void 0,(function*(){try{const t={entityAssociations:n.entityAssociations.filter((t=>t.legalEntityId!==e.legalEntityId))};yield d(t,n.id),c();const a=y.filter((t=>t.legalEntityId!==e.legalEntityId));w.addEvent("Removed decision maker",{segmentation:Object.assign(Object.assign({},N),{legalEntityId:e.legalEntityId,legalEntityType:e.legalEntityType,roles:e.types,remainingDecisionMakers:a})}),g({type:Cp.SUCCESS,label:p.get("successFullyRemovedDecisionMaker")})}catch(e){g({type:Cp.ERROR,label:p.get("failedToRemoveDecisionMaker")})}})))(e),label:p.get("remove"),title:p.get("removeDecisionMaker",{values:{decisionMaker:e.name}})})]}),E=e=>C(Gc,{showAsLink:!0,icon:"chevron-right",onClick:()=>O(e.legalEntityId),label:p.get("verify"),title:p.get("verifyDecisionMakerDetails",{values:{decisionMaker:e.name}})});return C(hg,{content:C(t.Fragment,{children:C("div",Object.assign({className:"adl-decision-makers adl-u-width-full"},{children:[C(Ms,{heading:p.get("decisionMaker"),description:p.get("decisionMakerDescription")}),C("div",Object.assign({className:"adl-decision-makers__container"},{children:f.map((e=>C(Kg,{decisionMakerType:e,country:b},e)))})),C(yg,{}),C(ul,{page:"Decision makers",title:p.get("whatIsTheDifferenceBetweenTheseRoles"),content:C("ul",Object.assign({className:"adl-guidance-list"},{children:f.map((e=>C("li",{dangerouslySetInnerHTML:{__html:p.get(`${"uboThroughControl"===e?"controllingPerson":"uboThroughOwnership"===e?"owner":e}GuideDescription`)}},e)))})),titleId:"whatIsTheDifferenceBetweenTheseRoles",contentId:"differenceBetweenAnOwnerControllingPersonAndSignatory"}),(null==v?void 0:v.length)>0?C("div",Object.assign({className:"adl-decision-makers__wrapper"},{children:v.map((e=>C(Yg,{types:e.types,legalEntityId:e.legalEntityId,name:e.name,status:e.status,actions:I(e),reviewActions:E(e),problems:null==e?void 0:e.problems},e.legalEntityId)))})):null,C(Gc,{secondary:!0,className:a("adl-decision-makers__add",{"adl-decision-makers__add--more":(null==v?void 0:v.length)>0}),icon:"plus",onClick:e=>{e.stopPropagation(),s()},label:p.get("addDecisionMaker"),disabled:_}),C(gg,{onHome:()=>{w.addEvent("Saved decision makers list",{segmentation:Object.assign(Object.assign({},N),{noOfDecisionMakers:y.length})}),l()},homeButtonLabel:p.get("saveAndGoToOverview")})]}))})})};var Zg;!function(e){e.BANK_STATEMENT="bankStatement",e.DEPOSIT_TICKET="depositTicket",e.SCREENSHOT_OF_BANK="screenshotOfOnlineBankingEnviroment",e.OFFICIAL_EMAIL="officialEmailOrALetterFromYourBank",e.CHEQUES="cheques",e.RELEVE_DIDENTITE="releveDidentiteBancaire"}(Zg||(Zg={}));const Qg=[{id:Zg.BANK_STATEMENT,name:"bankStatement"},{id:Zg.DEPOSIT_TICKET,name:"depositTicket"},{id:Zg.SCREENSHOT_OF_BANK,name:"screenshotOfOnlineBankingEnviroment"},{id:Zg.OFFICIAL_EMAIL,name:"officialEmailOrALetterFromYourBank"},{id:Zg.CHEQUES,name:"cheques"},{id:Zg.RELEVE_DIDENTITE,name:"releveDidentiteBancaire"}],Jg=["bankStatementDocument","description"];const ey=yt((function(e){var a,r;const{i18n:n,commonProps:i}=We(),o=ue(null),[s,d]=se({}),[l,c]=se(null),{country:u,optionalFields:m}=e,{handleChangeFor:p,data:g,valid:y,setValid:b,fieldProblems:f,errors:h,triggerValidation:v,setData:_}=ua(Object.assign(Object.assign({},e),{schema:["description"],defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{v()}),[]);const N=ra(e,n),O=ue({setState:null});return this.triggerValidation=()=>{N.isRequiredField("bankStatementDocument")&&o.current.triggerValidation()},le((()=>{var t;e.data.bankStatementDocument&&(d({bankStatementDocument:e.data.bankStatementDocument}),_("description",null===(t=e.data)||void 0===t?void 0:t.description))}),[e.data]),le((()=>{O.current.setState({type:"addToState",value:{data:g,valid:y,errors:h,fieldProblems:f,caller:e.id,dataStoreId:e.id,schema:Jg}})}),[g,y,h,f]),le((()=>{const e=m.includes("bankStatementDocument");e?b("bankStatementDocument",!0):e||(null==o?void 0:o.current)||b("bankStatementDocument",!1)}),[m]),C("form",Object.assign({className:"adyen-kyc-payout__bank-statement","aria-describedby":i.showInlineErrors?null:"ariaErrorField"},{children:[C(Ys,{owner:e.id,stateRef:O}),C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:N,id:"ariaErrorField"}),N.isVisibleField("bankStatementDocument")&&C(t.Fragment,{children:[C("div",Object.assign({className:"adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16"},{children:n.get("bankStatementDocumentTypeLabel",{values:{name:e.name}})})),C(Ue,Object.assign({name:"documentType",label:N.getLabel("bankStatementDocument","selectDocumentType"),className:"adyen-kyc-field--bankStatementDocumentType"},{children:Jt("select",{onChange:e=>c(e.target.value),name:"documentType",placeholder:n.get("selectDocument"),selected:l,items:(()=>{let e=Qg;return"FR"!==u&&(e=e.filter((e=>e.id!==Zg.RELEVE_DIDENTITE))),e.map((({id:e,name:t})=>({id:e,name:n.get(t)})))})()})})),l?C("div",{children:[C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",n.get("requirements")]})),C(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[C(hc,{children:n.get("accountHolderNameMatchesWithBusinessOrTradingName")}),C(hc,{children:n.get("accountNumberOrIbanVisible")}),C(hc,{children:n.get("dateOnDocumentNoOlderThanXMonths",{values:{numberOfMonths:12}})}),C(hc,{children:n.get("showsCountryOfBankAccount")}),C(hc,{children:n.get("hasTobeOfficialDocumentFromBank")})]})),C(mc,{type:cc.BANK_STATEMENT,className:"adl-u-margin-y-24"})]}):null,l||!Ss(null===(a=e.data)||void 0===a?void 0:a.bankStatementDocument)?C(Ue,Object.assign({className:"adyen-kyc-field--bankStatementDocument adyen-kyc-upload-field",name:"bankStatementDocument",isValid:y.bankStatementDocument},{children:C(bc,{name:"bankStatementDocument",ref:o,id:e.id,defaultData:s,isOptional:N.isOptionalField("bankStatementDocument"),iconPrefix:uc(cc.BANK_STATEMENT,!0)})})):null]}),l||!Ss(null===(r=e.data)||void 0===r?void 0:r.bankStatementDocument)?C(Ue,Object.assign({name:"description",label:N.getLabel("description"),helper:n.get("descriptionHelper"),errorMessage:N.getErrorMessage("description",h,f),isValid:y.description},{children:Jt("textArea",{name:"description",value:g.description,classNameModifiers:["description"],maxLength:200,onInput:p("description"),"aria-label":N.getLabel("description"),"aria-invalid":!y.description})})):null]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.optionalFields,t.optionalFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name)),ty=["bankAccountNumber"];function ay(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:ty,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:e.maskedFields}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"bankAccountNumber",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"bankAccountNumber",label:g.getLabel("bankAccountNumber"),classNameModifiers:["bankAccountNumber"],errorMessage:g.getErrorMessage("bankAccountNumber",c,m)||"",isValid:l.bankAccountNumber,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankAccountNumber",value:d.bankAccountNumber,readonly:g.isReadOnly("bankAccountNumber"),classNameModifiers:["bankAccountNumber"],onInput:s("bankAccountNumber","input"),onBlur:s("bankAccountNumber","blur"),"aria-required":!0,"aria-label":g.getLabel("bankAccountNumber"),"aria-invalid":!l.bankAccountNumber})}))]})}var ry;!function(e){e.AUD="AUD",e.BGN="BGN",e.BRL="BRL",e.CAD="CAD",e.CHF="CHF",e.CZK="CZK",e.DKK="DKK",e.EUR="EUR",e.GBP="GBP",e.HUF="HUF",e.HRK="HRK",e.PLN="PLN",e.NOK="NOK",e.RON="RON",e.SGD="SGD",e.SEK="SEK",e.USD="USD"}(ry||(ry={}));const ny={AUD:[ry.AUD],AUS:[ry.EUR],BE:[ry.EUR],BR:[ry.BRL],BG:[ry.BGN,ry.EUR],CA:[ry.CAD,ry.USD],HR:[ry.HRK,ry.EUR],CY:[ry.EUR],CZ:[ry.CZK,ry.EUR],DK:[ry.DKK,ry.EUR],EE:[ry.EUR],FI:[ry.EUR],FR:[ry.EUR],DE:[ry.EUR],GR:[ry.EUR],HU:[ry.HUF,ry.EUR],IE:[ry.EUR],IT:[ry.EUR],LV:[ry.EUR],LI:[ry.CHF,ry.EUR],LT:[ry.EUR],LU:[ry.EUR],MT:[ry.EUR],NL:[ry.EUR],NO:[ry.NOK,ry.EUR],PL:[ry.PLN,ry.EUR],PT:[ry.EUR],RO:[ry.RON,ry.EUR],SGD:[ry.SGD],SK:[ry.EUR],ES:[ry.EUR],SE:[ry.SEK,ry.EUR],CH:[ry.CHF,ry.EUR],GB:[ry.GBP,ry.EUR],US:[ry.USD]},iy=["swiftCode"];function oy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:iy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"swiftCode",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"swiftCode",label:g.getLabel("swiftCode"),classNameModifiers:["swiftCode"],errorMessage:g.getErrorMessage("swiftCode",c,m),isValid:l.swiftCode,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"swiftCode",value:d.swiftCode,readonly:g.isReadOnly("swiftCode"),onInput:s("swiftCode","input"),onBlur:s("swiftCode","blur"),"aria-required":!0,"aria-label":g.getLabel("swiftCode"),"aria-invalid":!l.swiftCode})}))]})}const sy=["branchCode"];function dy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:sy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"branchCode",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"branchCode",label:g.getLabel("branchCode"),classNameModifiers:["branchCode"],errorMessage:g.getErrorMessage("branchCode",c,m)||"",isValid:l.branchCode,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"branchCode",value:d.branchCode,readonly:g.isReadOnly("branchCode"),onInput:s("branchCode","input"),onBlur:s("branchCode","blur"),"aria-required":!0,"aria-label":g.getLabel("branchCode"),"aria-invalid":!l.branchCode})}))]})}const ly=["iban"],cy=(e,t)=>{const{iban:a}=e;return{iban:[...a,{modes:["blur","input"],validate:e=>null===function(e,t){if(Ss(e))return null;const a=e.replace(/ /g,"").toUpperCase(),r="validationPleaseEnterAValidIban";if(!/^([a-zA-Z0-9]{4} ){2,8}[a-zA-Z0-9]{1,4}|[a-zA-Z0-9]{12,34}$/.test(a))return r;const n=a.substring(0,2);if(t&&!t.includes(n))return r;const i={AL:"\\d{8}[\\dA-Z]{16}",AD:"\\d{8}[\\dA-Z]{12}",AT:"\\d{16}",AZ:"[\\dA-Z]{4}\\d{20}",BE:"\\d{12}",BH:"[A-Z]{4}[\\dA-Z]{14}",BA:"\\d{16}",BR:"\\d{23}[A-Z][\\dA-Z]",BG:"[A-Z]{4}\\d{6}[\\dA-Z]{8}",CR:"\\d{17}",HR:"\\d{17}",CY:"\\d{8}[\\dA-Z]{16}",CZ:"\\d{20}",DK:"\\d{14}",DO:"[A-Z]{4}\\d{20}",EE:"\\d{16}",FO:"\\d{14}",FI:"\\d{14}",FR:"\\d{10}[\\dA-Z]{11}\\d{2}",GE:"[\\dA-Z]{2}\\d{16}",DE:"\\d{18}",GI:"[A-Z]{4}[\\dA-Z]{15}",GR:"\\d{7}[\\dA-Z]{16}",GL:"\\d{14}",GT:"[\\dA-Z]{4}[\\dA-Z]{20}",HU:"\\d{24}",IS:"\\d{22}",IE:"[\\dA-Z]{4}\\d{14}",IL:"\\d{19}",IT:"[A-Z]\\d{10}[\\dA-Z]{12}",KZ:"\\d{3}[\\dA-Z]{13}",KW:"[A-Z]{4}[\\dA-Z]{22}",LV:"[A-Z]{4}[\\dA-Z]{13}",LB:"\\d{4}[\\dA-Z]{20}",LI:"\\d{5}[\\dA-Z]{12}",LT:"\\d{16}",LU:"\\d{3}[\\dA-Z]{13}",MK:"\\d{3}[\\dA-Z]{10}\\d{2}",MT:"[A-Z]{4}\\d{5}[\\dA-Z]{18}",MR:"\\d{23}",MU:"[A-Z]{4}\\d{19}[A-Z]{3}",MC:"\\d{10}[\\dA-Z]{11}\\d{2}",MD:"[\\dA-Z]{2}\\d{18}",ME:"\\d{18}",NL:"[A-Z]{4}\\d{10}",NO:"\\d{11}",PK:"[\\dA-Z]{4}\\d{16}",PS:"[\\dA-Z]{4}\\d{21}",PL:"\\d{26}",PT:"\\d{21}",RO:"[A-Z]{4}[\\dA-Z]{16}",SM:"[A-Z]\\d{10}[\\dA-Z]{12}",SA:"\\d{2}[\\dA-Z]{18}",RS:"\\d{18}",SK:"\\d{20}",SI:"\\d{15}",ES:"\\d{20}",SE:"\\d{20}",CH:"\\d{5}[\\dA-Z]{12}",TN:"\\d{20}",TR:"\\d{5}[\\dA-Z]{17}",AE:"\\d{3}\\d{16}",GB:"[A-Z]{4}\\d{14}",VG:"[\\dA-Z]{4}\\d{16}"}[n];if(void 0!==i&&!new RegExp(`^[A-Z]{2}\\d{2}${i}$`,"").test(a))return r;const o=a.substring(4,a.length)+a.substring(0,4);let s=!0,d="";for(let e=0;e<o.length;e+=1){const t=o.charAt(e);"0"!==t&&(s=!1),s||(d+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".indexOf(t))}let l=0;for(let e=0;e<d.length;e+=1)l=+`${l}${d.charAt(e)}`%97;return 1===l?null:r}(e,t),errorMessage:"validationPleaseEnterAValidIban"}]}};function uy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,country:i,validators:o}=e,s=ue({setState:null}),{handleChangeFor:d,data:l,valid:c,errors:u,isValid:m,fieldProblems:p,triggerValidation:g}=ua(Object.assign(Object.assign({},e),{schema:ly,rules:cy(o,i),defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors,maskedFields:e.maskedFields}));le((()=>{s.current.setState({type:"addToState",value:{data:l,valid:c,errors:u,fieldProblems:p,caller:"iban",dataStoreId:n}})}),[l,c,u,m]);const y=ra(e,a);return this.triggerValidation=g,C(t.Fragment,{children:[C(Ys,{stateRef:s}),C(Ue,Object.assign({name:"iban",label:y.getLabel("iban"),errorMessage:y.getErrorMessage("iban",u,p)||"",isValid:c.iban,showInlineErrors:r.showInlineErrors},{children:C(Vt,{name:"iban",value:l.iban,readonly:y.isReadOnly("iban"),classNameModifiers:["iban"],onInput:d("iban","blur"),onBlur:d("iban","blur"),"aria-required":!0,"aria-label":y.getLabel("iban"),"aria-invalid":!c.iban,transformInput:e=>e.toUpperCase()})}))]})}const my=["bankName"];function py(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:my,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"bankName",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"bankName",label:g.getLabel("bankName"),classNameModifiers:["bankName"],errorMessage:g.getErrorMessage("bankName",c,m)||"",isValid:l.bankName,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankName",value:d.bankName,readonly:g.isReadOnly("bankName"),onInput:s("bankName","input"),onBlur:s("bankName","blur"),"aria-required":!0,"aria-label":g.getLabel("bankName"),"aria-invalid":!l.bankName})}))]})}const gy=["bankCode"];function yy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:gy,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"bankCode",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"bankCode",label:g.getLabel("bankCode"),classNameModifiers:["bankCode"],errorMessage:g.getErrorMessage("bankCode",c,m)||"",isValid:l.bankCode,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankCode",value:d.bankCode,readonly:g.isReadOnly("bankCode"),onInput:s("bankCode","input"),onBlur:s("bankCode","blur"),"aria-required":!0,"aria-label":g.getLabel("bankCode"),"aria-invalid":!l.bankCode})}))]})}const by=["bankCity"];function fy(e){const{i18n:a,commonProps:r}=We(),{dataStoreId:n,validators:i}=e,o=ue({setState:null}),{handleChangeFor:s,data:d,valid:l,errors:c,isValid:u,fieldProblems:m,triggerValidation:p}=ua(Object.assign(Object.assign({},e),{schema:by,rules:i,defaultData:e.data,fieldProblems:null==e?void 0:e.fieldValidationErrors}));le((()=>{o.current.setState({type:"addToState",value:{data:d,valid:l,errors:c,fieldProblems:m,caller:"bankCity",dataStoreId:n}})}),[d,l,c,u]);const g=ra(e,a);return this.triggerValidation=p,C(t.Fragment,{children:[C(Ys,{stateRef:o}),C(Ue,Object.assign({name:"bankCity",label:g.getLabel("bankCity"),classNameModifiers:["bankCity"],errorMessage:g.getErrorMessage("bankCity",c,m),isValid:l.bankCity,showInlineErrors:r.showInlineErrors},{children:Jt("text",{name:"bankCity",value:d.bankCity,readonly:g.isReadOnly("bankCity"),onInput:s("bankCity","input"),onBlur:s("bankCity","blur"),"aria-required":!0,"aria-label":g.getLabel("bankCity"),"aria-invalid":!l.bankCity})}))]})}const hy=["accountHolder",...ly,...sy,...iy,"currency",...ty,...my,...gy];const vy=yt((function(e){const{i18n:t,commonProps:a,accountHolder:r}=We(),{legalEntityResponse:n}=e,i=e.requiredFields||hy,o=ue(null),s=ue(null),d=ue(null),l=ue(null),c=ue(null),u=ue(null),m=ue(null),p=ue({setState:null}),{data:g,valid:y,errors:b,isValid:f,handleChangeFor:h}=ua(Object.assign(Object.assign({},e),{defaultData:e.data,schema:i,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),v=ra(Object.assign(Object.assign({},e),{requiredFields:i}),t);le((()=>{p.current.setState({type:"addToState",value:{data:g,valid:y,errors:b,caller:e.id,dataStoreId:e.id}})}),[g,y,b,f]),this.triggerValidation=()=>{v.isRequiredField("bankAccountNumber")&&o.current.triggerValidation(),v.isRequiredField("branchCode")&&s.current.triggerValidation(),v.isRequiredField("swiftCode")&&l.current.triggerValidation(),v.isRequiredField("iban")&&c.current.triggerValidation(),v.isRequiredField("bankName")&&u.current.triggerValidation(),v.isRequiredField("bankCode")&&m.current.triggerValidation(),v.isRequiredField("bankCity")&&d.current.triggerValidation()};const _=Dd(e,ty),N=Dd(e,iy),O=Dd(e,ly),I=Dd(e,sy),E=Dd(e,my),T=Dd(e,gy),A=Dd(e,by),S=r===Wd.MY_SOLE_TRADER_NAME||Ym(n);return C("form",Object.assign({className:"adyen-kyc-individual__payout-account","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[C(Ys,{owner:e.id,stateRef:p}),C(Ms,{heading:e.heading}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:v,id:"ariaErrorField"}),C(ul,{page:"Payout account details",titleId:"whyDoINeedToFillInThisInformation",contentId:"reasonForFillingPayoutDetails",title:t.get("whyDoINeedToFillInThisInformation"),content:t.get("reasonForFillingPayoutDetails")}),v.isRequiredField("accountHolder")&&C(Ue,Object.assign({name:"accountHolder",label:v.getLabel("accountHolder"),helper:t.get(S?"accountHolderDescriptionSoleProp":n.type===id.ORGANIZATION?"accountHolderDescriptionCompany":"accountHolderDescriptionIndividual"),classNameModifiers:["accountHolder"],isValid:y.accountHolder,showInlineErrors:a.showInlineErrors},{children:Jt("text",{name:"accountHolder",value:g.accountHolder,placeholder:v.getPlaceholder("accountHolder"),readonly:!0,onInput:h("accountHolder","input"),onBlur:h("accountHolder","blur"),"aria-required":!0,"aria-label":v.getLabel("accountHolder"),"aria-invalid":!y.accountHolder,showInlineErrors:a.showInlineErrors})})),v.isRequiredField("bankAccountNumber")&&C(ay,Object.assign({},_,{dataStoreId:e.id,ref:o})),v.isRequiredField("iban")&&C(uy,Object.assign({},O,{dataStoreId:e.id,country:g.bankCountry,ref:c})),v.isRequiredField("swiftCode")&&C(oy,Object.assign({},N,{dataStoreId:e.id,ref:l})),v.isRequiredField("bankName")&&C(py,Object.assign({},E,{dataStoreId:e.id,ref:u})),v.isRequiredField("bankCode")&&C(yy,Object.assign({},T,{dataStoreId:e.id,ref:m})),v.isRequiredField("branchCode")&&C(dy,Object.assign({},I,{dataStoreId:e.id,ref:s})),v.isRequiredField("bankCity")&&C(fy,Object.assign({},A,{dataStoreId:e.id,ref:d}))]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.optionalFields,t.optionalFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name));var _y;!function(e){e.INSTANT_VERIFICATION="instantVerification",e.MANUAL_VERIFICATION="manualVerification"}(_y||(_y={}));class Ny extends Error{constructor(e,t){super(e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.sourceError=t;const a=[];t&&(t instanceof this.constructor&&a.push(`${this.name}: ${t.message}`),t.stack&&a.push(t.stack)),this.stack=a.join("\n")}}const Oy=["Tink","PayWithMyBank"],[Iy,Ey]=Oy,Ty=["account_verification_report_id","error"],Ay=["accounts","error","reference"],Sy=e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,Ry=e=>i(void 0,void 0,void 0,(function*(){try{yield e}catch(e){console.error(e)}return{error:"UNKNOWN_ERROR",message:"We couldn't complete the account check. Please try again later or provide account details manually."}}));let Cy;class Dy{constructor(e,t,a){this.mountInProgress=!1,this.waitForResponse=()=>i(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{this.listener=a=>i(this,void 0,void 0,(function*(){try{const t=yield this.handleMessage(a);if(!t)return;e(t)}catch(e){t(e)}})),window.addEventListener("message",this.listener)}))}));try{this.iframeUrl=new URL(t)}catch(e){throw new Ny("WIDGET_URL_MALFORMED",e)}this.iframeElement=e,this.iframeWindow=e.contentWindow,this.vendor=a}removeMessageEventListener(){this.listener&&(window.removeEventListener("message",this.listener),this.listener=void 0)}handleMessage({data:e,origin:t,source:a}){return i(this,void 0,void 0,(function*(){if(a!==this.iframeWindow||t!==this.iframeUrl.origin)return;if(this.vendor!==Iy&&(e=>Object.entries(e).some((([e])=>Ay.includes(e))))(e)){if(Object.getOwnPropertyNames(e).includes("error"))throw e;return e}if(!Rs(e))return;const r=(e=>{try{const t=JSON.parse(e);return Ty.includes(t.type)?t:"invalid"}catch(e){return"invalid"}})(e);if("invalid"===r)return;const n={errorHandler:Ry,errorLevel:null,loadingContext:""},i=new URL(this.iframeUrl.searchParams.get("redirect_uri")),o=i.searchParams;switch(i.pathname=i.pathname.replace(RegExp(`(${this.vendor})$`,"i"),"$1/json"),r.type){case"account_verification_report_id":o.set("account_verification_report_id",r.data);try{const e=yield _(Object.assign(Object.assign({},n),{path:i.href}));if((e=>Sy(e)&&"accounts"in e)(e))return e;throw e}catch(e){throw new Ny("WIDGET_ACCOUNT_COMMIT_FAILURE",e)}case"error":{let{status:e,message:t}=r.error;o.set("error",e),o.set("message",t);try{const a=yield _(Object.assign(Object.assign({},n),{path:i.href}));(e=>Sy(e)&&"error"in e&&"errorMessage"in e)(a)&&(e=a.error,t=a.errorMessage)}catch(e){console.error(e)}throw{error:e,message:t}}}}))}unmount(){if(this.mountInProgress)throw new Ny("Cannot unmount widget, mounting is still in progress");this.removeMessageEventListener(),(e=>{const t=e.parentNode;let a=t.firstChild;for(;a;)a!==e&&t.removeChild(a),a=a.nextSibling})(this.iframeElement),Cy=void 0}mount(){return i(this,void 0,void 0,(function*(){if(Cy)throw new Ny(`You can only have one ${this.constructor.name} mounted at a time`);if(Cy=this,this.mountInProgress)throw new Ny("Cannot mount widget, mounting is already in progress");this.mountInProgress=!0;try{yield new Promise(((e,t)=>{let a=setTimeout((()=>{this.mountInProgress=!1,t(new Ny("WIDGET_TIMEOUT"))}),1e4);const r=()=>{a&&clearTimeout(a),a=null};this.iframeElement.addEventListener("load",(()=>{r(),this.mountInProgress=!1,e()})),requestAnimationFrame((()=>{try{this.vendor===Iy&&this.iframeUrl.searchParams.set("iframe","true"),this.iframeElement.setAttribute("src",this.iframeUrl.href)}catch(e){r(),this.mountInProgress=!1,t(e)}}))}))}catch(e){throw new Ny("WIDGET_LAUNCH_FAILED",e)}}))}mountAndWaitForResponse(){return i(this,void 0,void 0,(function*(){yield this.mount();try{return yield this.waitForResponse()}finally{this.removeMessageEventListener()}}))}}const ky="adyen-kyc-bank-verification-widget",Ly=`${ky}-container`;function wy({url:e,vendor:t,widgetCallback:a}){const r=ue(null);return le((()=>{const n=r.current;let o,s;var d,l;return l=function r(d){var l,c;"adyen-kyc:empty-bank-verification-widget-container"===d.animationName&&(c=r,(l=n).removeEventListener("animationstart",c,!1),l.removeEventListener("MSAnimationStart",c,!1),l.removeEventListener("webkitAnimationStart",c,!1),o=document.createElement("iframe"),o.setAttribute("allowFullscreen","true"),o.classList.add(ky),d.target.appendChild(o),requestAnimationFrame((()=>i(this,void 0,void 0,(function*(){try{s=new Dy(o,e,t);const r=yield s.mountAndWaitForResponse();a({action:"verification_success",result:r})}catch(e){if(e instanceof Ny)switch(e.message){case"WIDGET_ACCOUNT_COMMIT_FAILURE":return a({action:"handle_verification_exception",err:e.sourceError});case"WIDGET_LAUNCH_FAILED":case"WIDGET_URL_MALFORMED":case"WIDGET_TIMEOUT":return a({action:"retry_verification"});default:throw e}return a({action:"handle_verification_exception",err:e})}})))))},(d=n).addEventListener("animationstart",l,!1),d.addEventListener("MSAnimationStart",l,!1),d.addEventListener("webkitAnimationStart",l,!1),n.classList.add(Ly),()=>{null==s||s.unmount(),null==o||o.remove()}}),[]),C("div",{ref:r})}const Py=["verifiedAccountHolder","verifiedBankCountry","verifiedBankName","verifiedCurrencyCode","verifiedAccountName","verifiedBankAccountNumber"],jy=t.createContext(null);function xy({getBankVerificationVendors:e,retrieveBankAccountInfo:a,setBankVerificationError:r,onBack:n,country:o}){const{i18n:s}=We(),[d,l]=se(!1),c=((e,t)=>{const[a,r]=se();return le((()=>{i(void 0,void 0,void 0,(function*(){const a=(yield t(e))[0];r(Oy.includes(a.name)?a:null)})).catch((e=>console.error(e)))}),[e,t]),a})(o,e),u=pe((e=>{l(!0);const t="Please try again later or provide account details manually.";switch(e.action){case"handle_verification_exception":{let a="We're are sorry, an error has occurred";const{err:i}=e;switch(!(i instanceof Error)&&i.error){case"USER_CANCELLED":a=null;break;case"CONNECTION_ERROR":case"GENERIC_ERROR":case"UNKNOWN_ERROR":{const e=i.message.split(/\.\s*/)[0];e&&(a=e);break}}a&&r({title:a,content:t}),n&&n();break}case"retry_verification":r({title:"Failed to initialize instant account verification process",content:t}),n&&n();break;default:{const{accounts:t}=e.result;a(t[0])}}}),[a,n,r]);return r(null),C("form",Object.assign({className:"adyen-kyc-bank-verification"},{children:c&&!d?C(t.Fragment,{children:[C(wy,{widgetCallback:u,url:c.redirectUrl,vendor:c.name}),C(gg,{onBack:()=>null==n?void 0:n(),backButtonLabel:s.get("goBack")})]}):void 0}))}var My=yt((function(e){const{getBankVerificationVendors:a,setBankVerificationError:r,onBack:n,hideDropinLayout:i}=e,{i18n:o,payoutDefaultCurrency:s}=We(),d=e.id,l=Py,c=ue({setState:null}),u=Py,{handleChangeFor:m,data:p,valid:g,errors:y,isValid:b,triggerValidation:f,fieldProblems:h}=ua(Object.assign(Object.assign({},e),{schema:l,defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),[v,_]=se(!1);return le((()=>{c.current.setState({type:"addToState",value:{data:p,valid:g,errors:y,fieldProblems:h,caller:d,dataStoreId:d,schema:u}})}),[p,g,y,b]),this.triggerValidation=()=>{f(["verifiedBankAccountNumber"])},le((()=>(i(!0),()=>i(!1))),[]),C(t.Fragment,{children:[C(Ys,{owner:d,stateRef:c}),v&&C(t.Fragment,{children:[C(Ms,{heading:e.heading}),C("div",Object.assign({className:"adyen-kyc-bank-verification-success"},{children:[C("span",{children:C("i",{className:"adyen-kyc-icon adyen-kyc-icon-checkmark-small adyen-kyc-bank-verification-success__checkmark-icon",role:"img","aria-hidden":"true"})}),C("span",{children:[" ",o.get("youSuccessfullyVerifiedAccount")]})]}))]}),"function"==typeof a&&!v&&C("div",Object.assign({className:"adyen-kyc-bank-verification-container"},{children:C(xy,{getBankVerificationVendors:a,retrieveBankAccountInfo:t=>{var a;m("verifiedBankAccountNumber")(t.number),m("verifiedAccountName")(t.name),m("verifiedBankName")(t.bankName),m("verifiedBankCountry")(e.country),m("verifiedAccountHolder")(e.data.verifiedAccountHolder),m("verifiedCurrencyCode")(null!==(a=e.data.verifiedCurrencyCode)&&void 0!==a?a:s),_(!0),i(!1),f()},setBankVerificationError:r,onBack:n,country:e.country})}))]})}));const Fy=["payoutVerificationMethod"];function Vy(e){var a;const{i18n:r,loadingContext:n}=We(),i=ge(jy),o=e.id,s=Fy,d=ue({setState:null});function l(){if(e.bankVerificationVendors)return"TRUSTLY"===e.bankVerificationVendors[e.country]?"trustly":"TINK"===e.bankVerificationVendors[e.country]?"tink":void 0}const c=`${n}static/images/payout-verification-method`,u=[{id:_y.INSTANT_VERIFICATION,name:"verifyViaMobileBankAppOrBankWebsite",subtitle:"instant",description:"instantVerificationDescription",iconComponentDesktop:"instant-verification-desktop",iconComponentMobile:"instant-verification-mobile",provider:`provider-logo-${l()}`},{id:_y.MANUAL_VERIFICATION,name:"provideAccountDetailsAndUploadBankStatement",subtitle:"mayTakeAFewHoursOrDays",description:"manualVerificationDescription",iconComponentDesktop:"manual-verification-desktop",iconComponentMobile:"manual-verification-mobile"}],m=g(r.locale),{handleChangeFor:p,data:y,valid:b,errors:f,isValid:h,triggerValidation:v,fieldProblems:_}=ua(Object.assign(Object.assign({},e),{schema:s,defaultData:Object.assign(Object.assign({},e.data),{payoutVerificationMethod:_y.INSTANT_VERIFICATION}),rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),N=ra(e,r);return le((()=>{d.current.setState({type:"addToState",value:{data:y,valid:b,errors:f,fieldProblems:_,caller:o,dataStoreId:o,schema:s}})}),[y,b,f,h]),this.triggerValidation=()=>{v(["payoutVerificationMethod"])},C("div",{children:[C(Ys,{owner:o,stateRef:d}),C("form",Object.assign({className:"adyen-kyc-verification-method"},{children:[C(Ms,{heading:e.heading}),i&&C(zs,Object.assign({type:Ks.ERROR,className:"adyen-kyc-instant-verification-error",title:i.title,hasCloseButton:!1},{children:i.content&&C("p",{children:i.content})})),C("p",{children:[" ",r.get("textToVerifyAccount")," "]}),C("div",Object.assign({className:"adyen-kyc-account-holder-information"},{children:[C("div",Object.assign({className:"adyen-kyc-account-holder-information__labels"},{children:[C("p",{children:r.get("accountHolder")}),C("p",{children:r.get("bankCountry")})]})),C("div",Object.assign({className:"adyen-kyc-account-holder-information__values"},{children:[C("p",{children:e.accountHolder}),C("p",{children:null!==(a=m.getCountryName(e.country))&&void 0!==a?a:e.country})]}))]})),C(Ue,Object.assign({name:"verificationMethods",useLabelElement:!1,errorMessage:N.getErrorMessage("payoutVerificationMethod",f,_)},{children:C("div",Object.assign({className:"adyen-kyc-field-verification-methods"},{children:u.map((e=>C(zt,Object.assign({item:e,uniqueId:e.id,i18n:r,value:y.payoutVerificationMethod,onChange:p("payoutVerificationMethod"),name:"verificationMethod",labelClassName:"adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"},{children:[C(zt.Icon,{children:C("div",Object.assign({className:"adyen-kyc-radio-group-card__illustration"},{children:C("picture",{children:[C("source",{type:"image/svg+xml",media:`(min-width: ${jp.md}px)`,srcSet:`${c}/${e.iconComponentDesktop}.svg`}),C("source",{type:"image/svg+xml",media:`(max-width: ${jp.md}px)`,srcSet:`${c}/${e.iconComponentMobile}.svg`}),C("img",{srcSet:`${c}/${e.iconComponentDesktop}.svg`,alt:`${e.iconComponentDesktop}`})]})}))}),e.provider&&C(zt.Footer,{children:C("div",Object.assign({className:"adyen-kyc-field-verification-methods__footer"},{children:[r.get("poweredBy"),C("img",{className:"adyen-kyc-field-verification-methods__icon",src:`${c}/${e.provider}.svg`,alt:`${e.provider}-logo`})]}))})]}),e.id)))}))})),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:N,id:"ariaErrorField"}),C(ul,{page:"Instant verification with partner",titleId:"howDoesVerificationWithOurPartnerWorks",contentId:"bankVerificationWithPartnerSteps",title:r.get("howDoesVerificationWithOurPartnerWorks",{values:{provider:r.get(l())}}),content:C(t.Fragment,{children:[C("p",{children:[" ",r.get("isOurTrustedPartnerHelpingSpeedUpSetup",{values:{provider:r.get(l())}})," "]}),C("ul",Object.assign({className:"adl-guidance-list"},{children:[C("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("selectTheBankToReceivePayouts")})),C("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("loginIntoYourBankingEnvironment")})),C("li",Object.assign({className:"adl-guidance-list__item"},{children:r.get("yourBankWillConfirmYourAccountDetails")}))]})),C("p",{children:r.get("adyenWillOnlyGetTemporaryAccess")}),C(ed,Object.assign({href:"https://www.adyen.com/policies-and-disclaimer/privacy-policy",external:!0},{children:r.get("learnMore")}))]})})]}))]})}const Uy=({country:e,verificationVendorsCallback:t,bankVerificationVendors:a})=>!!t&&a&&!!a[e],By=(e,t)=>{const a={payoutAccountDetails:{formId:"payoutAccountDetails",formName:e===Rd.PAYIN?"payinAccount":"payoutAccount",fields:hy},payoutAccountDocuments:{formId:"payoutAccountDocuments",formName:"bankStatement",fields:Jg},payoutAccountVerification:{formId:"payoutAccountVerification",formName:"instantVerification",fields:Py}};return t?Object.assign({payoutVerificationMethod:{formId:"payoutVerificationMethod",formName:"verificationMethod",fields:Fy}},a):a};const Wy=e=>{var t,a,r,n,i,o,s,d;return e.type===id.INDIVIDUAL?`${null!==(r=null===(a=null===(t=e.individual)||void 0===t?void 0:t.name)||void 0===a?void 0:a.firstName)&&void 0!==r?r:""} ${null!==(o=null===(i=null===(n=e.individual)||void 0===n?void 0:n.name)||void 0===i?void 0:i.lastName)&&void 0!==o?o:""}`:e.type===id.ORGANIZATION?null!==(d=null===(s=e.organization)||void 0===s?void 0:s.legalName)&&void 0!==d?d:"":void 0},Hy=e=>{var t,a;return e.type===id.INDIVIDUAL?null===(t=e.individual)||void 0===t?void 0:t.residentialAddress.country:e.type===id.ORGANIZATION?null===(a=e.organization)||void 0===a?void 0:a.registeredAddress.country:void 0},qy=Og((function(e){var t,a;const{i18n:r,loadingContext:n,clientKey:i}=We(),{activeForm:o,currentTask:s,legalEntityResponse:d,handleGetBankVerificationVendors:l}=e,u=Uy({country:e.country,bankVerificationVendors:e.bankVerificationVendors,verificationVendorsCallback:e.handleGetBankVerificationVendors}),[m,p]=(e=>{const[t,a]=se(null),r=ue(null),n=pe((()=>{r.current&&(clearTimeout(r.current),r.current=null)}),[]);return le((()=>{if(n(),t){if(e<=0)return;r.current=setTimeout((()=>{a(null),n()}),e)}return()=>n()}),[t,n,e]),[t,a]})(1e4),[g,y]=se(u),b=By(s,u),f=null===(t=b.payoutVerificationMethod)||void 0===t?void 0:t.formId,h=null===(a=b.payoutAccountVerification)||void 0===a?void 0:a.formId,v=b.payoutAccountDetails.formId,_=b.payoutAccountDocuments.formId,N={[f]:ue(null),[v]:ue(null),[_]:ue(null),[h]:ue(null)},I=Cd(e,f),E=Cd(e,h),T=Cd(e,v),A=Cd(e,_);this.triggerCurrentFormValidation=()=>{var t;null===(t=null==N?void 0:N[e.activeForm.formId])||void 0===t||t.current.triggerValidation()};const S=e=>e===Rd.PAYIN?r.get("payinAccount"):r.get("payoutAccount"),R=ra(A,r).isOptionalField("bankStatementDocument"),D=ue({setState:null});return le((()=>()=>{D.current.setState({type:"resetState"})}),[]),le((()=>{o.formId===bg.formId&&g&&(e.setSkipSubmitAndGoTaskList(!0),e.setHideOnHomeButton(!0),e.setHideBackButton(!0),e.setSubmitButtonLabel("continue"))}),[e.activeForm]),le((()=>{O(c,n,r.locale,i)}),[]),C("div",Object.assign({className:"adyen-kyc-payout"},{children:[C(Ys,{owner:"PayoutComponent",stateRef:D}),C(Yl,{owner:"PayoutComponent",onChange:({currentState:t})=>{var a,r,n;y((null===(r=null===(a=t.allData)||void 0===a?void 0:a.payoutVerificationMethod)||void 0===r?void 0:r.payoutVerificationMethod)===_y.INSTANT_VERIFICATION),(null===(n=t.allData)||void 0===n?void 0:n.payoutVerificationMethod)&&e.evaluateConfiguration(t.allData)}}),u&&C("div",Object.assign({className:o.formId!==f?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(jy.Provider,Object.assign({value:m},{children:C(Vy,Object.assign({},I,{ref:N[f],heading:S(s),id:f,country:e.country,accountHolder:e.accountHolder,bankVerificationVendors:e.bankVerificationVendors}))}))})),g?o.formId===h&&C("div",Object.assign({className:"adyen-kyc-form-wrapper"},{children:C(My,Object.assign({},E,{ref:N[h],heading:r.get("bankAccountVerification"),id:h,country:e.country,onBack:e.onBack,onNext:e.onNext,hideDropinLayout:t=>e.setHideDropinLayout(t),getBankVerificationVendors:l,setBankVerificationError:p}))})):C("div",Object.assign({className:o.formId!==v?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(vy,Object.assign({},T,{ref:N[v],heading:S(s),id:v,country:e.country,legalEntityResponse:d}))})),!g&&C("div",Object.assign({className:o.formId!==_?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(ey,Object.assign({},A,{ref:N[_],heading:r.get(R?"bankStatementOptional":"bankStatement"),id:_,country:e.country}))}))]}))}),{getComponentForms:e=>By(e.currentTask,Uy({country:e.country,bankVerificationVendors:e.bankVerificationVendors,verificationVendorsCallback:e.handleGetBankVerificationVendors})),parseConfiguration:({requiredFields:e,country:t,bankVerificationAvailable:a})=>{const{fields:r,bankStatementRequirement:n}=(null==e?void 0:e.payout)||{};return function({requiredFields:e,country:t,bankStatementRequirement:a,bankVerificationAvailable:r}){if(e){const n={modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"};let i={};return e.forEach((e=>{const t=Zp[e.Field.fieldName],a=e.Field.validationRule;t&&(i[t]=a?{rule:r?"manualVerification":"REQUIRED",validators:[eg(a),n]}:{rule:r?"manualVerification":"REQUIRED",validators:[n]},i[t].masked=Qp.includes(t))})),r&&(i.payoutVerificationMethod={rule:"REQUIRED"},i.verifiedAccountHolder={rule:"instantVerification"},i.verifiedBankCountry={rule:"instantVerification"},i.verifiedBankName={rule:"instantVerification"},i.verifiedCurrencyCode={rule:"instantVerification"},i.verifiedAccountName={rule:"instantVerification"},i.verifiedBankAccountNumber={rule:"instantVerification"},i.bankStatementDocument={rule:"bankStatementRequirement"},i.description={rule:"bankStatementDescription"}),!r&&a&&(i.bankStatementDocument={rule:a},i.description={rule:"OPTIONAL"}),i=mg(Jp[t],i),i}}({requiredFields:r,country:t,bankStatementRequirement:n,bankVerificationAvailable:a})},rules:({data:e,requiredFields:t})=>({manualVerification:()=>{var t;if(e.payoutVerificationMethod)return(null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.MANUAL_VERIFICATION?"REQUIRED":void 0},instantVerification:()=>{var t;return e.payoutVerificationMethod?(null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.INSTANT_VERIFICATION?"REQUIRED":void 0:"REQUIRED"},verifiedBankAccountNumber:()=>{var t;if((null===(t=null==e?void 0:e.payoutVerificationMethod)||void 0===t?void 0:t.payoutVerificationMethod)===_y.INSTANT_VERIFICATION)return"REQUIRED"},bankStatementRequirement:()=>{var a,r;if((null===(a=null==e?void 0:e.payoutVerificationMethod)||void 0===a?void 0:a.payoutVerificationMethod)===_y.MANUAL_VERIFICATION)return null===(r=null==t?void 0:t.payout)||void 0===r?void 0:r.bankStatementRequirement},bankStatementDescription:()=>{var a,r;if((null===(a=null==e?void 0:e.payoutVerificationMethod)||void 0===a?void 0:a.payoutVerificationMethod)===_y.MANUAL_VERIFICATION&&(null===(r=null==t?void 0:t.payout)||void 0===r?void 0:r.bankStatementRequirement))return"OPTIONAL"}}),getTaskName:e=>e.currentTask===Rd.PAYIN?"payinDetails":"payoutDetails",labels:()=>({verifiedAccountHolder:()=>"accountHolder",verifiedBankCountry:()=>"bankCountry",verifiedBankName:()=>"bankName",verifiedCurrencyCode:()=>"currencyCode",verifiedAccountName:()=>"accountName",verifiedBankAccountNumber:()=>"bankAccountNumber"})});function Gy(e){var t,a,r,n,o,s;const{transferInstrument:d,handleCreateDocument:l,handleGetDocument:c,handleUpdateDocument:u,handleUpdateTransferInstrument:m,handleCreateTransferInstrument:p,legalEntityResponse:y,trackingConig:b,accountHolder:f}=e,{loadingContext:h,clientKey:v}=We(),_=null!==(t=Hy(y))&&void 0!==t?t:e.country,[N,O]=se(),[I,E]=se(By(e.currentTask,Uy({country:_,bankVerificationVendors:null!==(a=e.bankVerificationVendors)&&void 0!==a?a:N,verificationVendorsCallback:e.handleGetBankVerificationVendors}))),[T,A]=se(!1),S=()=>i(this,void 0,void 0,(function*(){const t=yield $({loadingContext:h,clientKey:v,country:_,capabilities:e.capabilities,legalEntityType:e.legalEntityResponse.type});(null==t?void 0:t.bankVerificationProviders)&&(O(t.bankVerificationProviders),E(By(e.currentTask,Uy({country:_,bankVerificationVendors:t.bankVerificationProviders,verificationVendorsCallback:e.handleGetBankVerificationVendors}))))}));ce((()=>{e.handleGetBankVerificationVendors&&!e.bankVerificationVendors&&(A(!0),S().catch(console.error).finally((()=>{A(!1)})))}),[e.legalEntityResponse.type]);const{i18n:R,payoutDefaultCurrency:D}=We(),{showToast:k}=Ig(),[L,P]=se(e.problems),j=ym(l,c,u),x=(e=>yp(e,fd))(d),M=(null==x?void 0:x.payoutAccountDetails)||{},F=(null===(r=ny[_])||void 0===r?void 0:r.length)?ny[_][0]:null,U=D||F,H=f||Wy(y),q={payoutAccountDetails:Object.assign({accountHolder:H,bankCountry:_,currency:U},M),payoutVerificationMethod:{payoutVerificationMethod:_y.INSTANT_VERIFICATION},payoutAccountVerification:{verifiedAccountHolder:H,verifiedBankCountry:_}},[G,X]=se(q||e.data),Y=zp({trackingConig:b,task:e.taskType});le((()=>{w.addPageView("Payout dropin"),w.addEvent("Started payout task",{segmentation:Object.assign({},Y)})}),[]),le((()=>{var e;const t=(null===(e=null==d?void 0:d.documentDetails)||void 0===e?void 0:e.map((e=>e.id)))||[];t.length&&j.fetchDocuments(t,null==d?void 0:d.id).then((()=>{const e=(e=>{const t=_m(e,cc.BANK_STATEMENT)||null;return{bankStatementDocument:t?[{name:vp(t)}]:null,description:t.description}})(null==d?void 0:d.id);X(Object.assign(Object.assign({},G),{payoutAccountDocuments:e}))})).catch((()=>{k({label:R.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}))}),[]);const K=({forms:e,transferInstrument:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(Z(e)){const e=yield gp(a,t.id);e&&(yield j.uploadDocuments(e,t.id),e.forEach((e=>{w.addEvent("Saved document",{segmentation:Object.assign(Object.assign({},Y),{documentType:e.type,fileExtention:e.attachments.map((e=>Sm(e.pageName)))})})})))}})),z=({data:t,forms:a,setLoadingStatus:r})=>i(this,void 0,void 0,(function*(){var n;const i={documentType:cc.BANK_STATEMENT,bankCountry:_,bankCurrency:U};w.addEvent("Provided payout details",{segmentation:Object.assign(Object.assign({},Y),i)}),r(Fu.LOADING),t.payoutAccountDetails.bankCountry=_,t.payoutAccountDetails.currency=U,((e,t,a)=>{e.forEach((e=>{t[e]===(null==a?void 0:a[e])&&delete t[e]}))})(Qp,t.payoutAccountDetails,null==x?void 0:x.payoutAccountDetails);let o=sp({data:t,legalEntity:y});const s=null===(n=null==x?void 0:x.payoutAccountDetails)||void 0===n?void 0:n.transferInstrumentId;try{o=s?yield m(V("id").from(o),s):yield p(o),w.addEvent("Saved payout details",{segmentation:Object.assign(Object.assign({},Y),i)}),yield K({forms:a,transferInstrument:o,dataSubmitted:t}),r(Fu.SUCCESS),e.onSubmit(t)}catch(t){if((null==t?void 0:t.errorCode)===st){const a=Eg(t,e.currentTask);P(Object.assign(Object.assign({},L),{validationErrors:a}))}else k({label:R.get("failedToUpdateDetails"),type:Cp.ERROR});r(Fu.SUCCESS),w.addEvent("Encountered error payout details",{segmentation:Object.assign(Object.assign({},Y),{errorCode:t.errorCode,errorMessage:t.title,errorType:"BE"})})}})),Z=e=>e.some((e=>e.formId===I.payoutAccountDocuments.formId)),Q=e=>i(this,void 0,void 0,(function*(){if(null==d?void 0:d.id){const t=sp({data:e,legalEntity:y}),a=yield gp(e,d.id);return!B(t.bankAccount,null==d?void 0:d.bankAccount)||a.length>0}return!0})),J=e=>{const t=e.payoutAccountDetails;return Object.values(t).every(Boolean)},ee=g(R.locale),te=e=>{var t;const a=W(e);return(null===(t=a.payoutAccountDetails)||void 0===t?void 0:t.bankCountry)&&(a.payoutAccountDetails.bankCountry=ee.getCountryName(a.payoutAccountDetails.bankCountry)),(null==e?void 0:e.payoutAccountDocuments)&&(a.payoutAccountDocuments.bankStatementDocument=(e=>{var t,a;return Object.assign({},(null==e?void 0:e.bankStatementDocument)&&{bankStatementDocument:{fileName:null===(a=null===(t=e.bankStatementDocument)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name}})})(null==e?void 0:e.payoutAccountDocuments)),a};return T?C(jg,{}):C(qy,{baseTrackingPayload:Y,currentTask:e.currentTask,capabilities:e.capabilities,data:G,country:Hy(y)||e.country,problems:L,eventEmitter:e.eventEmitter,accountHolder:null!==(n=e.accountHolder)&&void 0!==n?n:Wy(e.legalEntityResponse),hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,legalEntityType:y.type,legalEntityResponse:y,summary:{formatData:te,getOmittedKeys:()=>["transferInstrumentId"],omittedForms:[null===(o=null==I?void 0:I.payoutVerificationMethod)||void 0===o?void 0:o.formId]},hasDataChanged:Q,canSubmit:J,onSubmit:z,handleBackClick:e.handleBackClick,handleCreateTransferInstrument:e.handleCreateTransferInstrument,handleUpdateTransferInstrument:e.handleUpdateTransferInstrument,handleGetBankVerificationVendors:e.handleGetBankVerificationVendors,bankVerificationVendors:null!==(s=e.bankVerificationVendors)&&void 0!==s?s:N,navigateBackToTaskList:e.navigateBackToTaskList})}var $y;!function(e){e.CASH_MANAGEMENT_TRUST="cashManagementTrust",e.CORPORATE_UNIT_TRUST="corporateUnitTrust",e.DECEASED_ESTATE="deceasedEstate",e.DISCRETIONARY_INVESTMENT_TRUST="discretionaryInvestmentTrust",e.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST="discretionaryServicesManagementTrust",e.DISCRETIONARY_TRADING_TRUST="discretionaryTradingTrust",e.FIRST_HOME_SAVER_ACCOUNTS_TRUST="firstHomeSaverAccountsTrust",e.FIXED_TRUST="fixedTrust",e.FIXED_UNIT_TRUST="fixedUnitTrust",e.HYBRID_TRUST="hybridTrust",e.LISTED_PUBLIC_UNIT_TRUST="listedPublicUnitTrust",e.OTHER_TRUST="otherTrust",e.POOLED_SUPERANNUATION_TRUST="pooledSuperannuationTrust",e.PUBLIC_TRADING_TRUST="publicTradingTrust",e.UNLISTED_PUBLIC_UNIT_TRUST="unlistedPublicUnitTrust"}($y||($y={}));const Xy=[{id:$y.CASH_MANAGEMENT_TRUST,name:"cashManagementTrust"},{id:$y.CORPORATE_UNIT_TRUST,name:"corporateUnitTrust"},{id:$y.DECEASED_ESTATE,name:"deceasedEstate"},{id:$y.DISCRETIONARY_INVESTMENT_TRUST,name:"discretionaryInvestmentTrust"},{id:$y.DISCRETIONARY_SERVICES_MANAGEMENT_TRUST,name:"discretionaryServicesManagementTrust"},{id:$y.DISCRETIONARY_TRADING_TRUST,name:"discretionaryTradingTrust"},{id:$y.FIRST_HOME_SAVER_ACCOUNTS_TRUST,name:"firstHomeSaverAccountsTrust"},{id:$y.FIXED_TRUST,name:"fixedTrust"},{id:$y.FIXED_UNIT_TRUST,name:"fixedUnitTrust"},{id:$y.HYBRID_TRUST,name:"hybridTrust"},{id:$y.LISTED_PUBLIC_UNIT_TRUST,name:"listedPublicUnitTrust"},{id:$y.OTHER_TRUST,name:"otherTrust"},{id:$y.POOLED_SUPERANNUATION_TRUST,name:"pooledSuperannuationTrust"},{id:$y.PUBLIC_TRADING_TRUST,name:"publicTradingTrust"},{id:$y.UNLISTED_PUBLIC_UNIT_TRUST,name:"unlistedPublicUnitTrust"}],Yy={trustType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},country:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},legalName:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}},Ky=["legalName","country","trustType","vatNumber"],zy=["AU"];function Zy(e){var a;const{i18n:r,commonProps:n}=We(),i=e.id,o=ue({setState:null}),s=ue(null),d=e.requiredFields||Ky,l=d.filter((e=>["trustType","legalName","country"].includes(e))),{handleChangeFor:c,data:u,valid:m,errors:p,setData:g,triggerValidation:y,fieldProblems:b}=ua(Object.assign(Object.assign({},e),{schema:l,defaultData:e.data,rules:e.validators||Yy,fieldProblems:null==e?void 0:e.fieldValidationErrors})),f=ra(e,r);this.triggerValidation=()=>{y(l),f.isRequiredField("vatNumber")&&s.current.triggerValidation()},le((()=>{o.current.setState({type:"addToState",value:{data:u,valid:m,errors:p,fieldProblems:b,caller:i,dataStoreId:i,schema:d}})}),[u,m,p]);const h=Dd(e,Dl);return le((()=>{1!==zy.length||u.country||(g("country",zy[0]),y(["country"]))}),[null===(a=e.data)||void 0===a?void 0:a.country]),C(t.Fragment,{children:[C(Ys,{owner:i,stateRef:o}),C("form",Object.assign({className:"adyen-kyc-trust__registration-details","aria-describedby":n.showInlineErrors?null:"ariaErrorField"},{children:[C(Ms,{heading:e.heading}),C(qc,{verificationErrors:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:f,id:"ariaErrorField"}),f.isRequiredField("country")&&C(aa,{label:f.getLabel("country","countryOfEstablishment"),allowedCountries:zy,classNameModifiers:["country"],errorMessage:f.getErrorMessage("country",p,b),onDropdownChange:c("country"),value:u.country,readOnly:!0}),f.isRequiredField("legalName")&&C(Ue,Object.assign({name:"legalName",label:f.getLabel("legalName","nameOfTrustAgreement"),classNameModifiers:["legalName"],errorMessage:f.getErrorMessage("legalName",p,b),isValid:m.legalName,showInlineErrors:n.showInlineErrors},{children:Jt("text",{name:"legalName",value:u.legalName,readonly:f.isReadOnly("legalName"),classNameModifiers:["legalName"],onInput:c("legalName","input"),onBlur:c("legalName","blur"),"aria-required":!0,"aria-label":f.getLabel("legalName"),"aria-invalid":!m.legalName})})),f.isRequiredField("trustType")&&C(Ue,Object.assign({name:"trustType",label:f.getLabel("trustType","typeOfTrustAgreement"),classNameModifiers:["trust-type"],errorMessage:f.getErrorMessage("trustType",p,b),isValid:m.trustType},{children:Jt("select",{name:"trustType",onChange:c("trustType","blur"),selected:u.trustType,items:Xy.map((({id:e,name:t})=>({id:e,name:r.get(t)})))})})),f.isRequiredField("vatNumber")&&C(kl,Object.assign({},h,{ref:s,dataStoreId:i,country:e.country}))]}))]})}const Qy=["trustDocument"];const Jy=yt((function(e){const{i18n:t,commonProps:a}=We(),r=ue(null),[n,i]=se({}),{data:o,valid:s,fieldProblems:d,errors:l}=ua(Object.assign(Object.assign({},e),{defaultData:e.data,rules:e.validators,fieldProblems:null==e?void 0:e.fieldValidationErrors})),c=ra(e,t),u=ue({setState:null});return this.triggerValidation=()=>{c.isRequiredField("trustDocument")&&r.current.triggerValidation()},le((()=>{e.data.trustDocument&&i({trustDocument:e.data.trustDocument})}),[e.data]),le((()=>{u.current.setState({type:"addToState",value:{data:o,valid:s,errors:l,fieldProblems:d,caller:e.id,dataStoreId:e.id,schema:Qy}})}),[o,s,l,d]),C("form",Object.assign({className:"adyen-kyc-trust__trust-document","aria-describedby":a.showInlineErrors?null:"ariaErrorField"},{children:[C(Ys,{owner:e.id,stateRef:u}),C(Ms,{heading:null==e?void 0:e.heading,description:null==e?void 0:e.description}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:c,id:"ariaErrorField"}),c.isVisibleField("trustDocument")&&C(Ue,Object.assign({className:"adyen-kyc-field--trustDocument adyen-kyc-upload-field",name:"trustDocument",isValid:s.trustDocument},{children:[C("div",Object.assign({className:"adyen-kyc-upload-field__subtitle"},{children:[" ",t.get("trustDocumentDescription")]})),C(vc,Object.assign({className:"adyen-kyc-upload-field__requirements"},{children:[C(hc,{children:t.get("nameOfTrust")}),C(hc,{children:t.get("fullLegalNamesOfAnyAppointers")}),C(hc,{children:t.get("dateDeedWasSigned")}),C(hc,{children:t.get("settlerDetailsIncl")}),C(hc,{children:t.get("trusteeDetailsIncl")}),C(hc,{children:t.get("beneficiariesDetailsIncl")})]})),C(bc,{name:"trustDocument",ref:r,id:e.id,defaultData:n,isOptional:c.isOptionalField("trustDocument")})]}))]}))}),((e,t)=>B(e.requiredFields,t.requiredFields)&&B(e.optionalFields,t.optionalFields)&&B(e.data,t.data)&&B(e.formVerificationErrors,t.formVerificationErrors)&&B(e.fieldValidationErrors,t.fieldValidationErrors)&&e.name===t.name));var eb=Jy;const tb={trustRegistrationDetails:{formId:"trustRegistrationDetails",formName:"registrationDetails",fields:[...Ky]},trustRegistrationAddress:{formId:"trustRegistrationAddress",formName:"registeredAddress",fields:[...ml]},trustDocument:{formId:"trustDocument",formName:"trustDocument",fields:[...Qy]}},ab=tb.trustRegistrationAddress.formId,rb=tb.trustRegistrationDetails.formId,nb=tb.trustDocument.formId;const ib=Og((function(e){const{i18n:t}=We(),a={[rb]:ue(null),[ab]:ue(null),[nb]:ue(null)};this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==a?void 0:a[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const r=Cd(e,rb),n=Cd(e,ab),i=Cd(e,nb),o=()=>{};return C("div",Object.assign({className:"adyen-kyc-trust"},{children:(s=e.activeForm,C("div",Object.assign({className:"adyen-kyc-trust"},{children:[C(Yl,{owner:"TrustComponent",onChange:o}),C("div",Object.assign({className:s.formId!==rb?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Zy,Object.assign({},r,{ref:a[rb],heading:t.get("registrationDetails"),id:rb,country:e.country}))})),C("div",Object.assign({className:s.formId!==ab?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(yl,Object.assign({},n,{ref:a[ab],heading:t.get("registeredAddress"),description:t.get("registeredAddressTrustHeaderDescription"),id:ab,country:e.country,problems:null==e?void 0:e.problems,labels:{operationalAddressIsSame:"isTrustOperationAddressSame"}}))})),C("div",Object.assign({className:s.formId!==nb?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(eb,Object.assign({},i,{ref:a[nb],heading:t.get("trustDocument"),id:nb}))}))]})))}));var s}),{getComponentForms:()=>tb,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),sg[t])),{});return a=mg(dg[t],a),a}}(null==e?void 0:e[id.TRUST],t),getTaskName:()=>"trustDetails"});function ob(e){const{parentLegalEntity:t,legalEntityResponse:a}=e,{i18n:r}=We(),n=(e=>{var t;let a;return(null==e?void 0:e.trust)&&(a=yp(e,Od),(null===(t=e.trust)||void 0===t?void 0:t.principalPlaceOfBusiness)?a.trustRegistrationAddress.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_NOT_SAME:(a.trustRegistrationAddress||(a.trustRegistrationAddress={}),a.trustRegistrationAddress.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_SAME)),a})(a),[o]=se(n||e.data),[s,d]=se(e.problems),l=g(r.locale),[c,u]=se(null),{showToast:m}=Ig();return C(ib,{capabilities:e.capabilities,data:o,country:"AU",problems:s,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,onSubmit:({data:n,setLoadingStatus:o})=>i(this,void 0,void 0,(function*(){o(Fu.LOADING);let i=(e=>{const t=Object.assign({},yp(e,Id));return t.trust.vatAbsenceReason&&(t.trust.vatNumber=""),t.type=id.TRUST,t})(n);try{if((null==a?void 0:a.id)||(null==c?void 0:c.id)?i=yield e.handleUpdateLegalEntity(V("type").from(i),(null==a?void 0:a.id)||(null==c?void 0:c.id)):(i=yield e.handleCreateLegalEntity(i),u(i)),!(null==a?void 0:a.id)){const a=Object.assign(Object.assign({},t),{entityAssociations:[{type:id.TRUST,legalEntityId:i.id},...t.entityAssociations||[]]});yield e.handleUpdateLegalEntity(V(["id","type","documents","transferInstruments","capabilities"]).from(a),a.id)}o(Fu.SUCCESS),m({label:r.get("successfullyUpdatedDetails"),type:Cp.SUCCESS}),null==e||e.onSubmit(n)}catch(e){if(m({label:r.get("failedToUpdateDetails"),type:Cp.ERROR}),(null==e?void 0:e.errorCode)===st){const t=Eg(e,Rd.TRUST);d(Object.assign(Object.assign({},s),{validationErrors:t}))}o(Fu.SUCCESS)}})),legalEntityType:id.TRUST,summary:{formatData:e=>{var t,a,n,i,o;const s=W(e);let d,c;if((null===(t=null==s?void 0:s.trustRegistrationDetails)||void 0===t?void 0:t.country)&&(d=l.getCountryName(s.trustRegistrationDetails.country)),null===(a=null==s?void 0:s.trustRegistrationDetails)||void 0===a?void 0:a.trustType){const e=null===(n=Xy.find((e=>{var t;return e.id===(null===(t=s.trustRegistrationDetails)||void 0===t?void 0:t.trustType)})))||void 0===n?void 0:n.name;c=r.get(e)}const u={nameOfTrustAgreement:e.trustRegistrationDetails.legalName,countryOfEstablishment:d,typeOfTrustAgreement:c,vatNumber:e.trustRegistrationDetails.vatNumber};return s.trustRegistrationDetails=u,(null===(i=null==s?void 0:s.trustRegistrationAddress)||void 0===i?void 0:i.registrationAddress)&&(s.trustRegistrationAddress.hasInnerForms=!0,s.trustRegistrationAddress.registrationAddress=Pe(null==s?void 0:s.trustRegistrationAddress.registrationAddress,l)),(null===(o=null==s?void 0:s.trustRegistrationAddress)||void 0===o?void 0:o.operationalAddress)&&(s.trustRegistrationAddress.operationalAddress=Pe(null==s?void 0:s.trustRegistrationAddress.operationalAddress,l)),s},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>i(this,void 0,void 0,(function*(){return!1})),canSubmit:e=>!1})}const sb=({parentLegalEntity:e,trustResponse:r,capabilityProblems:n,navigateBackToTaskList:o,onAddTrustMember:s,onAddTrustMemberOwner:d,handleUpdateLegalEntity:l,onTrustMemberDelete:c})=>{const{i18n:u}=We(),{showToast:m}=Ig(),p=wm(r),g=Wy(e),y=null==p?void 0:p.reduce(((e,t)=>{const a=e[t.legalEntityId],i=t.type;return e[t.legalEntityId]={legalEntityId:t.legalEntityId,types:a?[...a.types,i]:[i],status:Qm(Gg.LEGAL_ENTITY,n,r,[t.legalEntityId]),name:t.name,legalEntityType:t.entityType},e}),{}),b=y?Object.values(y):[],f=(e,t)=>{d(e,t,Rd.TRUST_MEMBER_COMPANY_OWNER)},h=(e,t)=>{var a;const r=t.entityAssociations;if(r)return null===(a=r.find((t=>t.associatorId===e&&t.type===Rm.UBO_THROUGH_OWNERSHIP)))||void 0===a?void 0:a.legalEntityId},v=e=>{const a=h(e.legalEntityId,r),n=C(t.Fragment,{children:[u.get("helpUsVerifyCompany")," ",C(ed,Object.assign({onClick:t=>{t.preventDefault(),f("",e.legalEntityId)},href:"to-company-owner"},{children:u.get("providePersonalDetailsOfOwner")}))]});if(e.legalEntityType===id.ORGANIZATION&&!a)return C(zs,{type:Ks.BASIC,hasCloseButton:!1,title:n,className:"adl-u-margin-top-16"})},_=e=>{const a=h(e.legalEntityId,r);return C(t.Fragment,{children:[C(Gc,{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>(e=>s(e))(e),label:u.get("editEntityDetails"),title:u.get("editTrustMember",{values:{trustMember:e.name}})}),e.legalEntityType===id.ORGANIZATION&&[C(Gc,a?{className:"adl-entity-association__edit",ghost:!0,icon:"edit",onClick:()=>f(a,e.legalEntityId),label:u.get("editEntityOwner"),title:u.get("editOwnerOfTrustMember",{values:{trustMember:e.name}})}:{className:"adl-entity-association__edit",ghost:!0,icon:"plus",onClick:()=>f("",e.legalEntityId),label:u.get("addEntityOwner"),title:u.get("addOwnerToTrustMember",{values:{trustMember:e.name}})})],C(Gc,{className:"adl-entity-association__delete",ghost:!0,icon:"bin",onClick:()=>{return t=e.legalEntityId,i(void 0,void 0,void 0,(function*(){try{const e={entityAssociations:$m(r).filter((e=>e.legalEntityId!==t))};yield l(e,r.id),c(),m({type:Cp.SUCCESS,label:u.get("successFullyRemovedTrustMember")})}catch(e){m({type:Cp.ERROR,label:u.get("failedToRemoveTrustMember")})}}));var t},label:u.get("remove"),title:u.get("removeTrustMember",{values:{trustMember:e.name}})})]})},N=C(t.Fragment,{});return C(hg,{content:C(t.Fragment,{children:C("div",Object.assign({className:"adl-trust-members adl-u-width-full"},{children:[C(Ms,{heading:u.get("trustMembers"),description:u.get("trustMembersDescription")}),C(yg,{}),C("div",Object.assign({className:"adl-trust-members__wrapper"},{children:[C(Yg,{types:[Rm.SECONDARY_TRUSTEE],legalEntityId:e.id,status:Qm(Gg.LEGAL_ENTITY,n,e,[e.id]),name:g,legalEntityType:e.type},e.id),b.map((e=>C(Yg,{types:e.types,legalEntityId:e.legalEntityId,status:e.status,name:e.name,legalEntityType:e.legalEntityType,actions:_(e),reviewActions:N,infoContent:v(e)},e.legalEntityId)))]})),C(Gc,{secondary:!0,className:a("adl-trust-members__add",{"adl-trust-members__add--more":(null==b?void 0:b.length)>0}),icon:"plus",onClick:e=>{e.stopPropagation(),s()},label:u.get("addTrustMember")}),C(gg,{onHome:o,homeButtonLabel:u.get("saveAndGoToOverview")})]}))})})},db=[{id:id.INDIVIDUAL,name:"naturalPersonTitle",description:"naturalPersonDescription"},{id:id.ORGANIZATION,name:"businessEntityTitle",description:"businessEntityDescription"}],lb={entityType:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},role:{modes:["blur"],validate:e=>!!(null==e?void 0:e.length),errorMessage:"fieldIsRequired"}};function cb(e){const{trustMember:t}=e,{i18n:a,commonProps:r}=We(),n={entityType:null==t?void 0:t.legalEntityType,role:null==t?void 0:t.types},i=e.requiredFields||["role","entityType"],{data:o,valid:s,errors:d,fieldProblems:l,handleChangeFor:c,isValid:u,triggerValidation:m}=ua(Object.assign(Object.assign({},e),{schema:i,rules:lb,defaultData:n,fieldProblems:null==e?void 0:e.fieldValidationErrors})),p=Object.values(Rm),g=p.filter((e=>e!==Rm.UBO_THROUGH_OWNERSHIP)),y=ra(e,a),[b,f]=se([]);return le((()=>{o.entityType===id.INDIVIDUAL?f(Vm(a,p)):o.entityType===id.ORGANIZATION&&f(Vm(a,g)),e.onChange({data:o,errors:d,valid:s})}),[o,u,a.languageCode,a.locale]),this.isValid=u,this.triggerValidation=m,C("form",Object.assign({className:"adyen-kyc-trust__role-and-entity-type adl-u-width-full"},{children:[C(Ms,{heading:a.get("roleAndEntityType")}),C(qc,{verificationErrors:null==e?void 0:e.formVerificationErrors,validationErrors:null==e?void 0:e.fieldValidationErrors,formUtils:y,id:"ariaErrorField"}),y.isRequiredField("entityType")&&C(Ue,Object.assign({name:"entityType",useLabelElement:!1,errorMessage:y.getErrorMessage("entityType",d,l),label:y.getLabel("entityType","whatTypeOfYourMembersEntity"),classNameModifiers:["entityType"],disabled:!!(null==t?void 0:t.legalEntityId)},{children:Jt("radioCard",{name:"entityType",items:db,value:o.entityType,i18n:a,readonly:y.isReadOnly("entityType"),onInput:c("entityType"),onChange:c("entityType"),"aria-required":!0,"aria-label":y.getLabel("entityType","whatTypeOfYourMembersEntity"),"aria-invalid":!s.entityType})})),C(Ue,Object.assign({name:"role",classNameModifiers:["role"],label:a.get("role"),errorMessage:y.getErrorMessage("role",d,l),isValid:s.role,disabled:!b.length},{children:Jt("select",{onChange:c("role","input"),name:"role",placeholder:a.get("rolePlaceholder"),selected:o.role,items:b,readonly:e.readOnly&&!!o.role,showInlineErrors:r.showInlineErrors,filterable:!1,isMulti:!0})}))]}))}const ub={roleAndEntityType:{formId:"roleAndEntityType",formName:"roleAndEntityType"},memberDetails:{formId:"memberDetails",formName:"memberDetails"},summary:{formId:"summary",formName:"summary"}},mb=ub.roleAndEntityType.formId;function pb(e){const{i18n:a}=We(),[r,n]=se(e.trustMember),o=ue(null),s={[mb]:o},d=(e=[],t=[])=>e.length!==t.length||!e.every((e=>t.includes(e))),l=C(_g,{forms:Object.values(ub).map((e=>{var t,a,r;return{formId:e.formId,formName:e.formName,isValid:null!==(r=null===(a=null===(t=s[e.formId])||void 0===t?void 0:t.current)||void 0===a?void 0:a.isValid)&&void 0!==r&&r}})),activeForm:ub.roleAndEntityType,taskName:"trustMembers"}),c=C(gg,{onNext:()=>{if(o.current.triggerValidation(),!o.current.isValid)return;const t=Object.assign(Object.assign({},e.trustMember),{legalEntityType:r.legalEntityType,types:r.types});e.navigateNext(t)},onHome:()=>i(this,void 0,void 0,(function*(){if(r.legalEntityId&&d(r.types,e.trustMember.types)){const t=$m(e.trust),a={entityAssociations:[...r.types.map((e=>({type:e,legalEntityId:r.legalEntityId})))||[],...t.filter((e=>e.legalEntityId!==r.legalEntityId))||[]]};yield e.handleUpdateLegalEntity(a,e.trust.id)}e.navigateBack()})),nextButtonLabel:a.get("next"),homeButtonLabel:a.get("saveAndGoToOverview")}),u=C(t.Fragment,{children:[l,C("div",Object.assign({className:"adyen-kyc-form-container"},{children:[C(cb,{ref:o,trustMember:e.trustMember,onChange:({data:t})=>{n(Object.assign(Object.assign({},e.trustMember),{legalEntityType:t.entityType,types:t.role}))}}),c]}))]});return C(hg,{content:u})}var gb,yb;function bb({content:e,styles:t}){const r=a({"adl-u-font-weight-semi-bold":null==t?void 0:t.includes(yb.Bold),"adyen-kyc-italic":null==t?void 0:t.includes(yb.Italic)});return C("span",Object.assign({className:r},{children:e}))}function fb({title:e,contentElements:t}){return C("section",Object.assign({className:"adl-u-margin-bottom-48"},{children:[C(Fg,Object.assign({level:2,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:C(bb,{content:e.content,styles:e.styles})})),C(Eb,{contentElements:t,isTopLevel:!0})]}))}function hb({title:e,label:t,isTopLevel:a,contentElements:r}){return a?C(cl,Object.assign({title:e.content},{children:C("section",Object.assign({className:"adyen-kyc-section-box",id:t},{children:C(Eb,{contentElements:r})}))})):C("section",Object.assign({id:t},{children:[C(Fg,Object.assign({level:2,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:C(bb,{content:e.content,styles:e.styles})})),C(Eb,{contentElements:r})]}))}function vb({isTopLevel:e,contentElements:t}){const r=a("adyen-kyc-paragraph",{"adl-u-margin-bottom-16":e});return C("p",Object.assign({className:r},{children:C(Eb,{contentElements:t})}))}!function(e){e.Chapter="chapter",e.Section="section",e.Paragraph="paragraph",e.Text="text",e.Weblink="weblink",e.List="list",e.Table="table",e.InternalReference="internalReference"}(gb||(gb={})),function(e){e.Bold="BOLD",e.Italic="ITALIC"}(yb||(yb={}));const _b=({url:e,displayText:t})=>C(ed,Object.assign({href:e},{children:t?C(bb,Object.assign({},t)):e}));function Nb({items:e,style:t}){return C(vc,Object.assign({ordered:t.ordered},{children:e.map(((e,t)=>C(hc,{children:[C(Eb,{contentElements:e.content}),e.subList&&C(Nb,{style:e.subList.style,items:e.subList.items})]},t)))}))}function Ob({rows:e,label:t,captions:a,titlePrefix:r,title:n}){return C("div",Object.assign({id:t},{children:[C("div",Object.assign({className:"adl-u-margin-y-8 adl-u-text-align-center"},{children:[r&&C(bb,Object.assign({},r)),n&&C(bb,Object.assign({},n))]})),C("table",Object.assign({className:"adl-table adl-table--condensed"},{children:[a&&C("caption",{children:C(Eb,{contentElements:a})}),C("tbody",Object.assign({className:"adl-table__body"},{children:e.map(((e,t)=>C("tr",Object.assign({className:"adl-table__row"},{children:e.map(((e,t)=>C("td",Object.assign({className:"adl-table__cell"},{children:C(Eb,{contentElements:e.elements})}),t)))}),t)))}))]}))]}))}function Ib({referencedLabel:e,displayText:t}){const a=t?t.content:e;return C(Gc,{onClick:()=>{const t=it(document.getElementById(e)),a=-1!==t&&t.querySelector("#"+e);null==a||a.scrollIntoView({behavior:"smooth"})},showAsLink:!0,label:a})}function Eb({contentElements:e,isTopLevel:t=!1,onExpandSection:a}){const r={chapter:fb,section:hb,paragraph:vb,text:bb,weblink:_b,list:Nb,table:Ob,internalReference:Ib,breakline:"br"},n=e.map((e=>C(r[e.type],Object.assign({},(e=>{switch(e.type){case gb.Chapter:return{title:e.title,contentElements:e.contentElements};case gb.Section:return{isTopLevel:t,title:e.title,label:e.label,contentElements:e.contentElements};case gb.Paragraph:return{isTopLevel:t,contentElements:e.contentElements};case gb.Text:return{content:e.content,styles:e.styles};case gb.Weblink:return{url:e.url,displayText:e.displayText};case gb.List:return{items:e.items,style:e.style};case gb.Table:return{rows:e.rows,label:e.label,captions:e.captions,titlePrefix:e.titlePrefix,title:e.title};case gb.InternalReference:return{referencedLabel:e.referencedLabel,displayText:e.displayText};default:return null}})(e)),`key-${e.type}-${Ve()}`)));return t?C(sl,Object.assign({onExpandSection:a},{children:n})):C("span",{children:n})}function Tb({contract:e,className:t,onExpandSection:r}){const n=a("adyen-contract-viewer",t);return C("main",Object.assign({className:n},{children:[C(Fg,Object.assign({level:1,className:"adl-u-margin-top-24 adl-u-margin-bottom-16"},{children:C(bb,{content:e.title.content,styles:e.title.styles})})),C(Eb,{contentElements:e.contentElements,onExpandSection:r,isTopLevel:!0})]}))}const Ab=["signer","acceptPci"];function Sb({legalEntity:e,pciTemplateResponse:a,handleHomeClick:r,handleLanguageChange:n,handleSign:o,taskType:s,trackingConig:d}){var l,c,u,m,p;const{i18n:g}=We(),{showToast:y}=Ig(),b=zp({trackingConig:d,legalEntity:e,task:s}),[f,h]=se(null),{handleChangeFor:v,triggerValidation:_,data:N,valid:O,isValid:I,errors:E}=ua({schema:Ab,rules:{signer:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},acceptPci:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}}}),T=a.pciTemplateReferences,A=JSON.parse(decodeURIComponent(escape(window.atob(a.content)))),S=[...new Map(null===(l=null==e?void 0:e.entityAssociations)||void 0===l?void 0:l.map((e=>[e.legalEntityId,e]))).values()],R=e.type===id.ORGANIZATION?S.map((({legalEntityId:e,name:t})=>({id:e,name:t}))):[{id:null==e?void 0:e.id,name:`${null===(c=null==e?void 0:e.individual)||void 0===c?void 0:c.name.firstName} ${null===(u=null==e?void 0:e.individual)||void 0===u?void 0:u.name.lastName}`}],D=()=>{w.addEvent("Returned to task overview from PCI",{segmentation:Object.assign({},b)}),r()};le((()=>{n()}),[g.locale]),le((()=>{w.addPageView("PCI dropin"),w.addEvent("Started PCI task",{segmentation:Object.assign({},b)})}),[]);const k=C(t.Fragment,{children:[C("span",{children:g.get("byClickingSignIAcknowledgeAndAgree")}),C("ul",{children:[C("li",{children:g.get("acknowledgePciRequirements")}),C("li",{children:g.get("basedOnTheAboveSignatory")})]})]}),L=C(Vu,Object.assign({status:f,formOpacityWhenLoading:.3,showSpinner:!1},{children:[C(Tb,{contract:A,onExpandSection:e=>{w.addEvent("Expanded PCI section",{segmentation:Object.assign(Object.assign({},b),{statementExtended:e})})}}),C(Ue,Object.assign({name:"signer",label:g.get("signer"),classNameModifiers:["col-50"],className:"adl-u-margin-y-32",errorMessage:g.get(null===(m=E.signer)||void 0===m?void 0:m.errorMessage),isValid:O.signer},{children:Jt("select",{onChange:v("signer","blur"),name:"signer",placeholder:g.get("selectSigner"),selected:N.signer,items:R})})),C(Ue,Object.assign({name:"acceptPci",errorMessage:g.get(null===(p=E.acceptPci)||void 0===p?void 0:p.errorMessage),isValid:O.acceptPci},{children:C(at,{label:k,checked:N.acceptPci,name:"acceptPci",onChange:v("acceptPci")})}))]})),P=C(gg,{onHome:D,homeButtonLabel:g.get("goToOverview"),onNext:()=>i(this,void 0,void 0,(function*(){if(w.addEvent("Clicked PCI signing",{segmentation:Object.assign({},b)}),_(),I)try{h(Fu.LOADING),yield o(e.id,{signedBy:N.signer,pciTemplateReferences:T}),h(Fu.SUCCESS),y({label:g.get("pciSignedSuccessfully"),type:Cp.SUCCESS}),w.addEvent("Succeeded PCI signing",{segmentation:Object.assign({},b)}),D()}catch(e){h(Fu.SUCCESS),y({label:g.get("pciSignFailed"),type:Cp.ERROR}),w.addEvent("Failed PCI signing",{segmentation:Object.assign({},b)})}else w.addEvent("Encountered PCI validation error",{segmentation:Object.assign(Object.assign({},b),{fields:Object.entries(O).filter((([,e])=>!e)).map((([e])=>e))})})})),nextButtonLabel:g.get("sign")});return C(hg,{content:L,footer:P})}const Rb=["signer","acceptServiceAgreement"];function Cb({legalEntity:e,serviceAgreement:t,handleHomeClick:a,handleLanguageChange:r,handleSign:n,taskType:o,trackingConig:s}){var d,l,c,u;const{i18n:m}=We(),{showToast:p}=Ig(),g=zp({trackingConig:s,legalEntity:e,task:o}),[y,b]=se(null),{handleChangeFor:f,triggerValidation:h,data:v,valid:_,isValid:N,errors:O}=ua({schema:Rb,rules:{signer:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"},acceptServiceAgreement:{modes:["blur"],validate:e=>!!e,errorMessage:"fieldIsRequired"}}}),I=JSON.parse(decodeURIComponent(escape(window.atob(t.document)))),E=e.type===id.ORGANIZATION?hu(e).map((({legalEntityId:e,name:t})=>({id:e,name:t}))):[{id:null==e?void 0:e.id,name:`${null===(d=null==e?void 0:e.individual)||void 0===d?void 0:d.name.firstName} ${null===(l=null==e?void 0:e.individual)||void 0===l?void 0:l.name.lastName}`}],T=()=>{w.addEvent("Returned to task overview from ToS",{segmentation:Object.assign({},g)}),a()};le((()=>{r(t.type)}),[m.locale]),le((()=>{w.addPageView("ToS dropin"),w.addEvent("Started ToS task",{segmentation:Object.assign({},g)})}),[]);const A=C(Vu,Object.assign({status:y,formOpacityWhenLoading:.3,showSpinner:!1},{children:[C(Tb,{contract:I,onExpandSection:e=>{w.addEvent("Expanded ToS section",{segmentation:Object.assign(Object.assign({},g),{statementExtended:e})})}}),C(Ue,Object.assign({name:"signer",label:m.get("signer"),classNameModifiers:["col-50"],className:"adl-u-margin-y-32",errorMessage:m.get(null===(c=O.signer)||void 0===c?void 0:c.errorMessage),isValid:_.signer},{children:Jt("select",{onChange:f("signer","blur"),name:"signer",placeholder:m.get("selectSigner"),selected:v.signer,items:E})})),C(Ue,Object.assign({name:"acceptServiceAgreement",errorMessage:m.get(null===(u=O.acceptServiceAgreement)||void 0===u?void 0:u.errorMessage),isValid:_.acceptServiceAgreement},{children:C(at,{label:m.get("iHaveReadAndIAcceptTheseTerms"),checked:v.acceptServiceAgreement,name:"acceptServiceAgreement",onChange:f("acceptServiceAgreement")})}))]})),S=C(gg,{onHome:T,homeButtonLabel:m.get("goToOverview"),onNext:()=>i(this,void 0,void 0,(function*(){if(w.addEvent("Clicked ToS signing",{segmentation:Object.assign({},g)}),h(),N)try{b(Fu.LOADING),yield n(e.id,t.termsOfServiceDocumentId,{acceptedBy:v.signer}),b(Fu.SUCCESS),p({label:m.get("serviceAgreementSignedSuccessfully"),type:Cp.SUCCESS}),w.addEvent("Succeeded ToS signing",{segmentation:Object.assign({},g)}),T()}catch(e){b(Fu.SUCCESS),p({label:m.get("serviceAgreementSignFailed"),type:Cp.ERROR}),w.addEvent("Failed ToS signing",{segmentation:Object.assign({},g)})}else w.addEvent("Encountered ToS validation error",{segmentation:Object.assign(Object.assign({},g),{fields:Object.entries(_).filter((([,e])=>!e)).map((([e])=>e))})})})),nextButtonLabel:m.get("sign")});return C(hg,{content:A,footer:S})}const Db=(e,t)=>i(void 0,void 0,void 0,(function*(){Lb(kb(e),t)})),kb=(e,t="application/octet-stream")=>{const a=window.atob(e),r=a.length,n=new Array(r);for(let e=0;e<r;e+=1)n[e]=a.charCodeAt(e);return new Blob([new Uint8Array(n)],{type:t})},Lb=(e,t)=>{if(void 0!==window.navigator.msSaveBlob)window.navigator.msSaveBlob(e,t);else{const a=window.URL.createObjectURL(e),r=document.createElement("a");r.style.display="none",r.href=a,r.setAttribute("download",t),void 0===r.download&&r.setAttribute("target","_blank"),document.body.appendChild(r),r.click(),document.body.removeChild(r),window.URL.revokeObjectURL(a)}},wb=Og((function(e){const{i18n:a}=We(),r={[Lc]:ue(null),[wc]:ue(null),[Pc]:ue(null),[jc]:ue(null)},[n,i]=se(null);this.isCurrentFormValid=()=>{var t;return null===(t=null==r?void 0:r[e.activeForm.formId])||void 0===t?void 0:t.current.isValid},this.triggerCurrentFormValidation=()=>{var t;return null===(t=null==r?void 0:r[e.activeForm.formId])||void 0===t?void 0:t.current.triggerValidation()};const o=Cd(e,Lc),s=Cd(e,Pc),d=Cd(e,wc),l=Cd(e,jc),c=({currentState:t,prevState:a})=>{var r,n,o,d,l,c,u;const m=null===(n=null===(r=a.data)||void 0===r?void 0:r[Lc])||void 0===n?void 0:n.companyCountry,p=null===(d=null===(o=t.data)||void 0===o?void 0:o[Lc])||void 0===d?void 0:d.companyCountry;null!=p&&p!==m&&e.onCountryChange(p);const g=null===(c=null===(l=t.data)||void 0===l?void 0:l[Lc])||void 0===c?void 0:c.legalCompanyName;i((null===(u=null==s?void 0:s.data)||void 0===u?void 0:u.tradingName)||g)};return C("div",Object.assign({className:"adyen-kyc-sol-prop"},{children:(u=e.activeForm,C(t.Fragment,{children:[C(Yl,{owner:"SolePropComponent",onChange:c}),C("div",Object.assign({className:u.formId!==Lc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(ic,Object.assign({},o,{data:Object.assign(Object.assign({},o.data),{companyCountry:e.country}),labels:{companyCountry:"countryOfEstablishment",legalCompanyName:"legalNameOfSoleProprietor"},ref:r[Lc],heading:a.get("nameAndCountry"),id:Lc}))})),C("div",Object.assign({className:u.formId!==Pc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Zl,Object.assign({},s,{data:Object.assign(Object.assign({},s.data),{tradingName:n}),ref:r[Pc],heading:a.get("registrationDetails"),id:Pc,country:e.country}))})),C("div",Object.assign({className:u.formId!==wc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(yl,Object.assign({},d,{ref:r[wc],heading:a.get("registeredAddress"),id:wc,country:e.country,problems:null==e?void 0:e.problems}))})),C("div",Object.assign({className:u.formId!==jc?"adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden":"adyen-kyc-form-wrapper"},{children:C(Dc,Object.assign({},l,{ref:r[jc],id:jc,legalEntityType:id.SOLE_PROPRIETORSHIP}))}))]}))}));var u}),{getComponentForms:()=>kc,parseConfiguration:({matchingScenario:e,country:t})=>function(e,t){if(e){let a=e.reduce(((e,t)=>Object.assign(Object.assign({},e),cg[t])),{});return a=mg(ug[t],a),a}}([e[id.TRUST]],t),rules:Lg,getTaskName:()=>"solePropDetails"});function Pb(e){var t;const{parentLegalEntity:a,legalEntityResponse:r,handleCreateDocument:n,handleGetDocument:o,handleUpdateDocument:s}=e,{i18n:d,setLocale:l}=We(),[c,u]=se(e.problems),m=g(d.locale),[p,y]=se(null),{showToast:b}=Ig(),[f,h]=se(((e,t)=>{var a;let r=(e=>{var t;let a;return(null==e?void 0:e.soleProprietorship)&&(a=yp(e,Ed),(null===(t=e.soleProprietorship)||void 0===t?void 0:t.principalPlaceOfBusiness)?a.solePropRegistrationAddress.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_NOT_SAME:(a.solePropRegistrationAddress||(a.solePropRegistrationAddress={}),a.solePropRegistrationAddress.operationalAddressIsSame=rl.OPERATIONAL_ADDRESS_IS_SAME)),a})(e);if(!(e=>{var t;const a=(null===(t=null==e?void 0:e.solePropRegistrationAddress)||void 0===t?void 0:t.registrationAddress)||{};return Object.entries(a).some((([e,t])=>"country"!==e&&Boolean(t)))})(r)){const e=null===(a=dp(t,!1))||void 0===a?void 0:a.address;r=Object.assign(Object.assign({},r),{solePropRegistrationAddress:Object.assign(Object.assign({},null==r?void 0:r.solePropRegistrationAddress),{registrationAddress:Object.assign({},e)})})}return r})(r,a)),v=e=>e.some((e=>[kc.solePropConstitutionalDocument.formId].includes(e.formId))),_=ym(n,o,s),N=({forms:e,legalEntity:t,dataSubmitted:a})=>i(this,void 0,void 0,(function*(){if(v(e)){const e=yield hp(a,t.id);e&&(yield _.uploadDocuments(e,t.id))}})),O=({legalEntity:t})=>i(this,void 0,void 0,(function*(){if(!(null==r?void 0:r.id)){const r={entityAssociations:[{type:id.SOLE_PROPRIETORSHIP,legalEntityId:t.id}]};yield e.handleUpdateLegalEntity(r,a.id)}}));le((()=>{var t;e.eventEmitter.on("updateLocale",(e=>l(e)));const a=(null===(t=null==r?void 0:r.documentDetails)||void 0===t?void 0:t.map((e=>e.id)))||[];try{a.length&&_.fetchDocuments(a,r.id).then((()=>{const e=(e=>{const t=_m(e,cc.CONSTITUTIONAL_DOCUMENT)||null;return{solePropConstitutionalDocument:t?{constitutionalDocument:[{name:vp(t)}]}:null}})(r.id);h(Object.assign(Object.assign({},f),e))})).catch((()=>{b({label:d.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}))}catch(e){b({label:d.get("failedToFetchRelevantDocuments"),type:Cp.ERROR})}}),[]);const I=e=>{var t,a;return Object.assign({},(null==e?void 0:e.constitutionalDocument)&&{solePropConstitutionalDocument:{fileName:null===(a=null===(t=e.constitutionalDocument)||void 0===t?void 0:t[0])||void 0===a?void 0:a.name}})};return C(wb,{capabilities:e.capabilities,data:f,country:(null===(t=null==f?void 0:f.solePropNameAndCountry)||void 0===t?void 0:t.companyCountry)||e.country,problems:c,eventEmitter:e.eventEmitter,hideDropinLayout:e.hideDropinLayout,onChange:e.onChange,handleHomeClick:e.handleHomeClick,homeButtonLabel:e.homeButtonLabel,onSubmit:({data:t,forms:a,setLoadingStatus:n})=>i(this,void 0,void 0,(function*(){n(Fu.LOADING);let i=fp(t);try{(null==r?void 0:r.id)||(null==p?void 0:p.id)?i=yield e.handleUpdateLegalEntity(V("type").from(i),(null==r?void 0:r.id)||(null==p?void 0:p.id)):(i=yield e.handleCreateLegalEntity(i),y(i)),yield N({forms:a,legalEntity:i,dataSubmitted:t}),yield O({legalEntity:i}),n(Fu.SUCCESS),b({label:d.get("successfullyUpdatedDetails"),type:Cp.SUCCESS}),null==e||e.onSubmit(t)}catch(e){if(b({label:d.get("failedToUpdateDetails"),type:Cp.ERROR}),(null==e?void 0:e.errorCode)===st){const t=Eg(e,Rd.TRUST);u(Object.assign(Object.assign({},c),{validationErrors:t}))}n(Fu.SUCCESS)}})),legalEntityType:id.TRUST,summary:{formatData:(e,t)=>{var a,r,n,i;let o,s=W(e);return(null===(a=null==s?void 0:s.solePropNameAndCountry)||void 0===a?void 0:a.companyCountry)&&(o=m.getCountryName(s.solePropNameAndCountry.companyCountry)),s.solePropNameAndCountry={legalNameOfSoleProprietor:null===(r=e.solePropNameAndCountry)||void 0===r?void 0:r.legalCompanyName,countryOfEstablishment:o},(null===(n=null==s?void 0:s.solePropRegistrationAddress)||void 0===n?void 0:n.registrationAddress)&&(s.solePropRegistrationAddress.hasInnerForms=!0,s.solePropRegistrationAddress.registrationAddress=Pe(null==s?void 0:s.solePropRegistrationAddress.registrationAddress,m)),(null===(i=null==s?void 0:s.solePropRegistrationAddress)||void 0===i?void 0:i.operationalAddress)&&(s.solePropRegistrationAddress.operationalAddress=Pe(null==s?void 0:s.solePropRegistrationAddress.operationalAddress,m)),v(t)&&(delete s[jc],s=Object.assign(Object.assign({},s),I(e.solePropConstitutionalDocument))),s},getOmittedKeys:()=>["operationalAddressIsSame"]},hasDataChanged:e=>i(this,void 0,void 0,(function*(){var t;const a=(null===(t=fp(e))||void 0===t?void 0:t.soleProprietorship)||{},n=(null==r?void 0:r.soleProprietorship)||{},i=yield hp(e,"");return!B(a,n)||i.length>0})),canSubmit:e=>sd.SOLE_PROPRIETORSHIP.every((t=>{const a=_p(e,t);return!Ss(a)}))})}function jb({targetLegalEntityType:e,handleHomeClick:a,onLegalEntityTypeChange:r,handleUpdateLegalEntity:n,legalEntityResponse:o}){const{i18n:s}=We(),[d,l]=se(null),{showToast:c}=Ig(),u=C(gg,{onHome:a,homeButtonLabel:s.get("noGoBack"),onNext:()=>i(this,void 0,void 0,(function*(){try{l(Fu.LOADING),yield n({type:e},o.id),c({label:s.get("successfullyUpdatedDetails"),type:Cp.SUCCESS}),r()}catch(e){c({label:s.get("failedToUpdateDetails"),type:Cp.ERROR})}finally{l(Fu.SUCCESS)}})),nextButtonLabel:e===id.ORGANIZATION?s.get("continueCompany"):s.get("continueIndividual")});return C(hg,{content:C(Vu,Object.assign({status:d,formOpacityWhenLoading:.3,showSpinner:!1},{children:[(e=>{switch(e){case id.ORGANIZATION:return C(t.Fragment,{children:[C("h2",Object.assign({className:"adyen-kyc-form-header__heading","data-testid":id.ORGANIZATION},{children:s.get("continueAsCompany")})),C("span",{children:s.get("indicatedPayoutToCompany")}),C("p",{children:s.get("continueSigningUpAsCompany")})]});case id.INDIVIDUAL:return C(t.Fragment,{children:[C("h2",Object.assign({className:"adyen-kyc-form-header__heading","data-testid":id.INDIVIDUAL},{children:s.get("continueAsIndividual")})),C("span",{children:s.get("indicatedPayoutToPersonalAccount")}),C("p",{children:s.get("continueSigningUpAsIndividual")})]});default:C("p",{children:"Change not supported"})}})(e),u]}))})}const xb=[Rd.DECISION_MAKER_OVERVIEW,Rd.TASKS_OVERVIEW];function Mb(e){var{capabilities:t,legalEntityResponse:a,eventEmitter:r,onSubmit:o,onChange:s,onLoad:d=(()=>{}),onNavigate:l=(()=>{})}=e,c=n(e,["capabilities","legalEntityResponse","eventEmitter","onSubmit","onChange","onLoad","onNavigate"]);const{showToast:u}=Ig(),{loadingContext:m,clientKey:p,contextCountry:g,setLocale:y,i18n:b}=We(),[f,h]=se(!1),[v,_]=se([]),[N,O]=se([Rd.TASKS_OVERVIEW]),[I,E]=se(a),[T,A]=se(null),[S,R]=se(null),[D,k]=se(null),[L,P]=se([]),[j,x]=se(null),[M,F]=se(null),[V,U]=se(null),[B,W]=se(null),[H,q]=se(null),[G,X]=se(Fc(a)),[Y,K]=se(null),[z,Z]=se(null),[Q,J]=se(null),[ee,te]=se();le((()=>{w.addPageView("Task list"),r.on("updateLocale",(e=>y(e)))}),[]),ce((()=>{h(!0),(()=>i(this,void 0,void 0,(function*(){const e=yield $({loadingContext:m,clientKey:p,country:g,capabilities:t,legalEntityType:I.type});(null==e?void 0:e.bankVerificationProviders)&&te(e.bankVerificationProviders),(null==e?void 0:e.taskList)&&(_(e.taskList),e.taskList.includes(Rd.PCI_DSS)&&(yield ue()),yield ge())})))().catch(console.error).finally((()=>{h(!1),d()}))}),[I.type,g]),le((()=>{let e=I;if(xb.includes(N[N.length-1])){if(!Y){const t=setInterval((()=>i(this,void 0,void 0,(function*(){(e=>{var t;return Object.values(null!==(t=null==e?void 0:e.capabilities)&&void 0!==t?t:{}).every((e=>e.verificationStatus===zm.VALID||e.verificationStatus===zm.REJECTED))})(e)?ae():e=yield be()}))),3e3);K(t)}}else ae()}),[N.length]);const ae=()=>{Y&&(clearInterval(Y),K(null))},re=e=>{O([...N,e]),l(e)},ne=(e,t)=>{switch(e){case Rd.PAYOUT:ve(Rd.PAYOUT,t);break;case Rd.PAYIN:ve(Rd.PAYIN,t);break;case Rd.TRUST:Ie(Rd.TRUST);break;case Rd.TRUST_MEMBER_OVERVIEW:Ie(Rd.TRUST_MEMBER_OVERVIEW);break;case Rd.PCI_DSS:Ee(Rd.PCI_DSS);break;case Rd.SOLE_PROPRIETOR_COMPANY:Oe(Rd.SOLE_PROPRIETOR_COMPANY);break;case Rd.SERVICE_AGREEMENT:Te(Rd.SERVICE_AGREEMENT,t);break;default:re(e)}},ie=(e=1)=>{if(N.length>1){N[N.length-(e+1)]===Rd.TASKS_OVERVIEW?(O([Rd.TASKS_OVERVIEW]),l(Rd.TASKS_OVERVIEW)):(O(N.slice(0,-1*e)),l(N[N.length-1]))}},oe=e=>{s(e,this)},de=(e,t)=>i(this,void 0,void 0,(function*(){o(e,this),yield be(),ie(t)})),ue=()=>i(this,void 0,void 0,(function*(){var e,t;if(I.id&&(null==c?void 0:c.handleGetPciStatus))try{const a=yield c.handleGetPciStatus(I.id);return a.hasDocuments=(null===(t=null===(e=yield null==c?void 0:c.handleGetPciQuestionnaires(I.id))||void 0===e?void 0:e.data)||void 0===t?void 0:t.length)>0,k(a),a}catch(e){console.warn(b.get("failedToGetPciStatus"))}})),me=()=>i(this,void 0,void 0,(function*(){const e=Xm(I)[0];if(e)try{const t=yield null==c?void 0:c.handleGetLegalEntity(e);Z(t)}catch(e){u(b.get("failedToFetchSoleProp"),{type:Cp.ERROR})}})),pe=()=>i(this,void 0,void 0,(function*(){const e=e=>i(this,void 0,void 0,(function*(){const t=yield c.handleGetPciTemplate(I.id,{language:e});A(t)}));try{yield e(b.locale.substring(0,2))}catch(t){const a="en";b.locale.substring(0,2)!==a&&(u({label:b.get("failedToGetPciTemplateInSelectedLanguageFallbackToEn"),type:Cp.ERROR}),yield e(a))}})),ge=()=>i(this,void 0,void 0,(function*(){if(I.id&&(null==c?void 0:c.handleGetServiceAgreementStatus))try{const e=yield c.handleGetServiceAgreementStatus(I.id);P(e.termsOfServiceTypes)}catch(e){console.warn(b.get("failedToGetServiceAgreementStatus"))}})),ye=e=>i(this,void 0,void 0,(function*(){const t=t=>i(this,void 0,void 0,(function*(){const a=yield c.handleGetServiceAgreement(I.id,{type:e,language:t});R(a)}));try{yield t(b.locale.substring(0,2))}catch(e){const a="en";b.locale.substring(0,2)!==a&&(u({label:b.get("failedToGetServiceAgreementInSelectedLanguageFallbackToEn"),type:Cp.ERROR}),yield t(a))}})),be=()=>i(this,void 0,void 0,(function*(){if(I.id&&(null==c?void 0:c.handleGetLegalEntity))try{const e=yield null==c?void 0:c.handleGetLegalEntity(I.id);return E(e),X(Fc(e)),e}catch(e){console.warn(b.get("failedToFetchLegalEntityDetails"))}})),fe=()=>i(this,void 0,void 0,(function*(){if(H.id&&(null==c?void 0:c.handleGetLegalEntity))try{const e=yield null==c?void 0:c.handleGetLegalEntity(H.id);return q(e),e}catch(e){console.warn(b.get("failedToFetchTrustDetails"))}})),he=(e,t,a=Rd.DECISION_MAKER)=>i(this,void 0,void 0,(function*(){if(t&&t!==I.id){const e=yield null==c?void 0:c.handleGetLegalEntity(t);U(e)}else U(I);if(e&&(null==c?void 0:c.handleGetLegalEntity))try{const t=yield null==c?void 0:c.handleGetLegalEntity(e);F(t),re(a)}catch(e){u({label:b.get("failedFetchingDecisionMaker"),type:Cp.ERROR})}else F(null),re(a)})),ve=(e,t)=>i(this,void 0,void 0,(function*(){if(t)try{yield Se(t),Ym(I)&&!z&&(yield me())}finally{re(e)}else x(null),re(e)})),_e=e=>{W(e||null),re(Rd.TRUST_MEMBER_ROLE_AND_TYPE)},Ne=e=>i(this,void 0,void 0,(function*(){try{if(null==e?void 0:e.legalEntityId){const t=yield null==c?void 0:c.handleGetLegalEntity(e.legalEntityId);F(t)}else F(null);W(e),re(e.legalEntityType===id.ORGANIZATION?Rd.TRUST_MEMBER_COMPANY:Rd.TRUST_MEMBER_INDIVIDUAL)}catch(e){u(b.get("failedToFetchTrustMemberDetails"),{type:Cp.ERROR})}})),Oe=e=>i(this,void 0,void 0,(function*(){try{yield me()}finally{re(e)}})),Ie=e=>i(this,void 0,void 0,(function*(){var t,a;const r=null===(a=null===(t=null==I?void 0:I.entityAssociations)||void 0===t?void 0:t.find((e=>e.type===id.TRUST)))||void 0===a?void 0:a.legalEntityId;if(r)try{const t=yield null==c?void 0:c.handleGetLegalEntity(r);q(t),re(e)}catch(e){u({label:b.get("failedToFetchTrustDetails"),type:Cp.ERROR})}else re(Rd.TRUST)})),Ee=e=>i(this,void 0,void 0,(function*(){try{yield pe(),re(e)}catch(e){u({label:b.get("failedToGetPciTemplate"),type:Cp.ERROR})}})),Te=(e,t)=>i(this,void 0,void 0,(function*(){if(L.length)try{yield ye(t),re(e)}catch(e){u({label:b.get("failedToGetServiceAgreement"),type:Cp.ERROR})}})),Ae=()=>i(this,void 0,void 0,(function*(){const e=zp({trackingConig:{topLevelLegalEntity:a},legalEntity:I,task:Rd.PCI_DSS});try{const t=yield null==c?void 0:c.handleGetPciQuestionnaires(I.id);for(const e of t.data){const t=yield null==c?void 0:c.handleDownloadPci(I.id,e.id);yield Db(t.content,t.id+".pdf")}}catch(e){u({label:b.get("failedToDownloadPci"),type:Cp.ERROR})}finally{w.addEvent("Downloaded signed PCI form",{segmentation:Object.assign({},e)})}})),Se=e=>i(this,void 0,void 0,(function*(){if(e&&(null==c?void 0:c.handleGetTransferInstrument))try{const t=yield null==c?void 0:c.handleGetTransferInstrument(e);x(t)}catch(e){u({label:b.get("failedToFetchPayoutAccount"),type:Cp.ERROR})}})),Re=e=>{var t;if(null==e?void 0:e.id)return null===(t=null==G?void 0:G.LegalEntity)||void 0===t?void 0:t[e.id]},Ce=()=>{var e;const t=null===(e=null==z?void 0:z.soleProprietorship)||void 0===e?void 0:e.name;return t||Wy(I)},De=e=>i(this,void 0,void 0,(function*(){yield fe(),yield de(e,2)})),ke=e=>{J(e),re(Rd.LEGAL_ENTITY_TYPE_SWITCHER)},Le=()=>{var e,n,s,d,l,u;const m=N[N.length-1];switch(m){case Rd.TASKS_OVERVIEW:return C(Xg,{onNavigateToTask:ne,tasks:v,legalEntityResponse:I,capabilityProblems:G,onPciDownload:Ae,pciStatus:D,serviceAgreementTypes:L});case Rd.DECISION_MAKER_OVERVIEW:return C(zg,{trackingConig:{topLevelLegalEntity:a},parentLegalEntity:V,legalEntityResponse:I,onNavigateToIndividual:he,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity,navigateBackToTaskList:ie,onDecisionMakerDelete:be,capabilityProblems:G});case Rd.INDIVIDUAL:return C(Sg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.INDIVIDUAL,parentLegalEntity:null,legalEntityResponse:I,problems:Re(I),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:e=>i(this,void 0,void 0,(function*(){o(e,this),yield be(),re(Rd.TASKS_OVERVIEW),J(null)})),handleHomeClick:()=>re(Rd.TASKS_OVERVIEW),homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken,onTypeSwitch:ke,isTargetLegalEntityType:Q===id.INDIVIDUAL}));case Rd.DECISION_MAKER:return C(Sg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.DECISION_MAKER,parentLegalEntity:V,legalEntityResponse:M,problems:Re(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:de,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Rd.TRUST_MEMBER_COMPANY_OWNER:return C(Sg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.TRUST_MEMBER_COMPANY_OWNER,parentLegalEntity:V,legalEntityResponse:M,problems:Re(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:e=>i(this,void 0,void 0,(function*(){yield fe(),yield de(e)})),handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Rd.TRUST_MEMBER_INDIVIDUAL:return C(Sg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.TRUST_MEMBER_INDIVIDUAL,parentLegalEntity:H,legalEntityResponse:M,problems:Re(M),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:De,handleBackClick:ie,handleHomeClick:()=>re(Rd.TRUST_MEMBER_OVERVIEW),homeButtonLabel:b.get("saveAndGoToOverview"),associationDetail:B,handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,handleGetIdVerificationToken:null==c?void 0:c.handleGetIdVerificationToken}));case Rd.COMPANY:return C(Pg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.COMPANY,legalEntityResponse:I,capabilities:t,problems:Re(I),onChange:oe,eventEmitter:r,onSubmit:e=>i(this,void 0,void 0,(function*(){o(e,this),yield be(),re(Rd.TASKS_OVERVIEW),J(null)})),handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress,onTypeSwitch:ke,isTargetLegalEntityType:Q===id.ORGANIZATION}));case Rd.TRUST_MEMBER_COMPANY:return C(Pg,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.TRUST_MEMBER_COMPANY,parentLegalEntity:H,legalEntityResponse:M,capabilities:t,problems:null===(e=null==G?void 0:G.LegalEntity)||void 0===e?void 0:e[I.id],onChange:oe,eventEmitter:r,onSubmit:De,handleBackClick:ie,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),associationDetail:B,handleAddressSearch:null==c?void 0:c.handleAddressSearch,handleFindAddress:null==c?void 0:c.handleFindAddress}));case Rd.PAYOUT:case Rd.PAYIN:return C(Gy,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.PAYOUT,problems:null===(n=null==G?void 0:G.BankAccount)||void 0===n?void 0:n[null==j?void 0:j.id],currentTask:m,transferInstrument:j,legalEntityResponse:I,accountHolder:Ce(),capabilities:t,onChange:oe,eventEmitter:r,onSubmit:de,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),bankVerificationVendors:ee,navigateBackToTaskList:ie}));case Rd.TRUST:return C(ob,Object.assign({},c,{trackingConig:{topLevelLegalEntity:a},taskType:Rd.TRUST,problems:null===(s=null==G?void 0:G.LegalEntity)||void 0===s?void 0:s[null==H?void 0:H.id],parentLegalEntity:I,legalEntityResponse:H,capabilities:t,onChange:oe,eventEmitter:r,onSubmit:de,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview")}));case Rd.TRUST_MEMBER_OVERVIEW:return C(sb,{parentLegalEntity:I,trustResponse:H,capabilityProblems:G,onAddTrustMember:_e,onAddTrustMemberOwner:he,navigateBackToTaskList:ie,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity,onTrustMemberDelete:fe});case Rd.TRUST_MEMBER_ROLE_AND_TYPE:return C(pb,{navigateNext:Ne,navigateBack:()=>i(this,void 0,void 0,(function*(){yield fe(),ie()})),trust:H,trustMember:B,handleUpdateLegalEntity:null==c?void 0:c.handleUpdateLegalEntity});case Rd.PCI_DSS:return C(Sb,{legalEntity:I,pciTemplateResponse:T,trackingConig:{topLevelLegalEntity:a},taskType:Rd.PCI_DSS,handleHomeClick:ie,handleLanguageChange:pe,handleSign:(...e)=>i(this,void 0,void 0,(function*(){yield c.handleSignPci(...e),yield ue()}))});case Rd.SOLE_PROPRIETOR_COMPANY:return C(Pb,Object.assign({},c,{taskType:Rd.SOLE_PROPRIETOR_COMPANY,parentLegalEntity:I,legalEntityResponse:z,capabilities:t,problems:null===(d=null==G?void 0:G.LegalEntity)||void 0===d?void 0:d[null==z?void 0:z.id],onChange:oe,eventEmitter:r,onSubmit:de,handleBackClick:ie,handleHomeClick:ie,homeButtonLabel:b.get("saveAndGoToOverview"),country:null===(u=null===(l=null==I?void 0:I.individual)||void 0===l?void 0:l.residentialAddress)||void 0===u?void 0:u.country}));case Rd.SERVICE_AGREEMENT:return C(Cb,{legalEntity:I,serviceAgreement:S,trackingConig:{topLevelLegalEntity:a},taskType:Rd.SERVICE_AGREEMENT,handleHomeClick:ie,handleLanguageChange:ye,handleSign:(...e)=>i(this,void 0,void 0,(function*(){yield c.handleSignServiceAgreement(...e),yield ge()}))});case Rd.LEGAL_ENTITY_TYPE_SWITCHER:return C(jb,Object.assign({},c,{targetLegalEntityType:Q,legalEntityResponse:a,handleHomeClick:ie,onLegalEntityTypeChange:()=>i(this,void 0,void 0,(function*(){yield be(),(()=>{switch(Q){case id.INDIVIDUAL:re(Rd.INDIVIDUAL);break;case id.ORGANIZATION:re(Rd.COMPANY)}})()}))}))}};return f?C(jg,{}):Le()}const Fb={individualDropin:class extends xp{renderDropinComponent(){return C(Sg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},individual:class extends P{render(){return C(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey,contextCountry:this.props.country},{children:C(Sg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,hideDropinLayout:!0}))}))}},personalDetails:class extends P{render(){return C(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey},{children:C(om,Object.assign({},this.props))}))}},address:class extends P{get data(){return this.state.data}get isValid(){return!!this.state.isValid}render(){return C(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,translations:this.props.translations,clientKey:this.props.clientKey},{children:C($c,Object.assign({ref:e=>{this.componentRef=e}},this.props,{onChange:this.setState}))}))}},contactDetails:class extends P{render(){return C(X,Object.assign({i18n:this.props.i18n,locale:this.props.locale,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations},{children:C(Pu,Object.assign({},this.props))}))}},company:class extends P{render(){return C(X,Object.assign({i18n:this.props.i18n,loadingContext:this.props.loadingContext,clientKey:this.props.clientKey,translations:this.props.translations,locale:this.props.locale,contextCountry:this.props.country},{children:C(Pg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,hideDropinLayout:!0}))}))}},companyDropin:class extends xp{renderDropinComponent(){return C(Pg,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},taskList:class extends xp{renderDropinComponent(){return C(Mb,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},payoutAccount:class extends xp{renderDropinComponent(){return C(Gy,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}},trustDropin:class extends xp{renderDropinComponent(){return C(ob,Object.assign({},this.props,{eventEmitter:this.eventEmitter,onChange:this.setState}))}}},Vb={type:"object",propertiesSchema:{registeredAddress:{type:"object",propertiesSchema:{country:{type:"string",required:!0}}}}},Ub={type:"object",propertiesSchema:{residentialAddress:{type:"object",propertiesSchema:{country:{type:"string",required:!0}}}}},Bb={id:{type:"string",required:!0},legalEntityId:{type:"string",required:!0},type:{type:"string",exactValue:["bankAccount","recurringDetail"],required:!0},bankAccount:{type:"object",propertiesSchema:{accountNumber:{type:"string"},accountType:{type:"string"},bankBicSwift:{type:"string"},bankCode:{type:"string"},bankName:{type:"string"},branchCode:{type:"string"},checkCode:{type:"string"},countryCode:{type:"string"},currencyCode:{type:"string"},iban:{type:"string"}}}},Wb={personalDetails:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{firstName:{type:"string",required:!0},lastName:{type:"string",required:!0},birthDate:{type:"string",required:!0},idNumber:{type:"string",required:!0},residencyCountry:{type:"string",required:!0},phoneNumber:{type:"string",required:!0},email:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},address:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{country:{type:"string"},city:{type:"string",required:!0},postalCode:{type:"string",required:!0},stateOrProvince:{type:"string",required:!0},houseNumberOrName:{type:"string",required:!0},street:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},contactDetails:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{phoneNumber:{type:"string",required:!0},email:{type:"string",required:!0},birthDate:{type:"string",required:!0},residencyCountry:{type:"string",required:!0},jobTitle:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},company:{propertiesSchema:{data:{type:"object",required:!0,propertiesSchema:{companyType:{type:"object",required:!0,propertiesSchema:{entityType:{type:"string",required:!0}}}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},individual:{propertiesSchema:{taskType:{type:"string"},data:{type:"object",required:!0,propertiesSchema:{firstName:{type:"string",required:!0},lastName:{type:"string",required:!0},birthDate:{type:"string",required:!0},idNumber:{type:"string",required:!0}}},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array",required:!0}}},payoutAccount:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},transferInstrument:{type:"object",propertiesSchema:Bb},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:["organization","individual"],required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Ub,organization:Vb}}}},companyDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"organization",required:!0},capabilities:{type:"object",required:!0},organization:Vb}}}},individualDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"individual",required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Ub}}}},trustDropin:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:"trust",required:!0},capabilities:{type:"object",required:!0},trust:Vb}}}},taskList:{propertiesSchema:{handleUpdateLegalEntity:{type:"function",required:!0},handleUpdateDocument:{type:"function",required:!0},handleCreateDocument:{type:"function",required:!0},handleGetDocument:{type:"function",required:!0},handleGetLegalEntity:{type:"function",required:!0},handleCreateLegalEntity:{type:"function",required:!0},onChange:{type:"function"},onSubmit:{type:"function"},onUserEvent:{type:"function"},readOnly:{type:"boolean"},country:{type:"string"},capabilities:{type:"array"},transferInstrument:{type:"object",propertiesSchema:Bb},legalEntityResponse:{type:"object",required:!0,propertiesSchema:{id:{type:"string",required:!0},type:{type:"string",exactValue:["organization","individual","trust"],required:!0},documents:{type:"array"},capabilities:{type:"object",required:!0},individual:Ub,organization:Vb}}}}},Hb=({expected:e,received:t,schemaParentsPaths:a})=>{for(const[r,n]of Object.entries(e)){const{type:e,exactValue:i,required:o,propertiesSchema:s}=n,d=t[r];if(o&&As(d))throw new Error(`\n\n"${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} is required, Please add it to the form creation options\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#adyenkyccreatedropincomponentname-componentname-options-options.\n `);if(o||!o&&!As(d)){if("array"===e&&!Array.isArray(d))throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} must be an array.`);if("array"!==e&&typeof d!==e)throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} must be a ${e}.`);if(i&&!Array.isArray(i)&&i!==d)throw new Error(`\n\n "${r}"${a.length>0?` inside "${a.join(" -> ")}"`:""} value should be equal to "${i}".`);if(i&&Array.isArray(i)&&!i.includes(d))throw new Error(`\n\n "${r}" ${a.length>0?` inside "${a.join(" -> ")}"`:""} value should be equal to one of: "${q(i,{type:"disjunction"})}"`);As(s)||(a.push(r),Hb({expected:s,received:d,schemaParentsPaths:a}),a.pop())}}};class qb{constructor(e){this.components=[],this.create=(e,t)=>{const a=this.getPropsForComponent(t);return this.validate(e,t),this.createForm(e,a)},this.update=e=>(this.setOptions(e),this.components.forEach((e=>e.update(this.getPropsForComponent(this.options)))),this),this.updateLocale=e=>(this.setOptions(e),this.components.forEach((e=>e.updateLocale(this.getPropsForComponent(this.options)))),this),this.remove=e=>(this.components=this.components.filter((t=>t._id!==e._id)),e.unmount(),this),this.setOptions=e=>{var t;return this.options=Object.assign(Object.assign({},this.options),e),(e=>{const t=["country","locale","clientKey","environment"].filter((t=>!e[t]));if(t.length>0)throw new Error(`\n\nPlease specify a ${q(t)} for the SDK to initialize!\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#configuration.\n `)})(this.options),this.options.loadingContext=(t=this.options.environment).endsWith("/")?t:`${t}/`,this.options.locale||(this.options.locale=o),this.modules={i18n:new S},this},this.getPropsForComponent=e=>Object.assign(Object.assign({},e),{i18n:this.modules.i18n}),this.setOptions(e)}createForm(e,t){const a=Fb[e],r=this.getPropsForComponent(t),n=new a(Object.assign(Object.assign({},this.options),r));return this.components.push(n),n}validate(e,t){(e=>{if(!e)throw new Error("\n\n No form Component was passed!\n\n- For more information please check: https://github.com/Adyen/adyen-kyc-components#adyenkyccreatedropincomponentname-componentname-options-options\n ");const t=Fb[e],a=Object.keys(Wb);if(!(t&&t.prototype instanceof P))throw new Error(`\n\n"${e}" is not a valid form Component. Please enter one of the following:\n- ${q(a)}.\n `)})(e),((e,t)=>{const a=Wb[e],{propertiesSchema:r}=a;As(r)||Hb({expected:r,received:t,schemaParentsPaths:[]})})(e,t)}}qb.version={version:void 0,revision:void 0,branch:void 0,buildId:void 0},module.exports=qb;