@adyen/kyc-components 3.44.4 → 3.45.0

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.
Files changed (74) hide show
  1. package/dist/es/adyen-kyc-components.es.js +910 -540
  2. package/dist/es/{bg-BG-QPFxclBg.js → bg-BG-Q7jr61oX.js} +15 -5
  3. package/dist/es/{cs-CZ-D98JAc2J.js → cs-CZ-DWt-8d0a.js} +15 -5
  4. package/dist/es/{da-DK-JJdd-72W.js → da-DK-DzKDKodb.js} +15 -5
  5. package/dist/es/{de-DE-B3G3sEfd.js → de-DE-CTrlEFB7.js} +15 -5
  6. package/dist/es/digital-wallet-with-local-currencies-DSaDbAY9.js +51 -0
  7. package/dist/es/{el-GR-WBOtRfZs.js → el-GR-BEyHixTO.js} +15 -5
  8. package/dist/es/{es-ES-CCwOsWXd.js → es-ES-C5YKWCME.js} +15 -5
  9. package/dist/es/{et-EE-x3X0uhbQ.js → et-EE-UTwEA7KT.js} +15 -5
  10. package/dist/es/{fi-FI-BokVSTrO.js → fi-FI-Dlg3u-HY.js} +15 -5
  11. package/dist/es/{fr-FR-DnF3nBoi.js → fr-FR-BrL2V-lF.js} +15 -5
  12. package/dist/es/{hr-HR-D13VSiNt.js → hr-HR-CR1NpsoY.js} +15 -5
  13. package/dist/es/{hu-HU-iSy_89_F.js → hu-HU-BkmzV8oZ.js} +15 -5
  14. package/dist/es/{it-IT-PufivMUr.js → it-IT-BR75YMjD.js} +15 -5
  15. package/dist/es/{lt-LT-6u0igm3A.js → lt-LT-Cm17tGP4.js} +15 -5
  16. package/dist/es/{lv-LV-DTOcOGw6.js → lv-LV-Bj0D7n67.js} +15 -5
  17. package/dist/es/{nl-NL-BpaSvRsy.js → nl-NL-bhqLkBQz.js} +15 -5
  18. package/dist/es/{no-NO-M-DUT2ve.js → no-NO-CrzRhfMh.js} +15 -5
  19. package/dist/es/{pl-PL-o8cP2y_m.js → pl-PL-BcncZK0S.js} +15 -5
  20. package/dist/es/{pt-PT-dvdILY5G.js → pt-PT-Bwx0xHGg.js} +15 -5
  21. package/dist/es/{ro-RO-Cvknah2F.js → ro-RO-Bj9nLST9.js} +15 -5
  22. package/dist/es/{sk-SK-Dgkkymw-.js → sk-SK-CI2V7naC.js} +15 -5
  23. package/dist/es/{sl-SI-CTExVFKJ.js → sl-SI-Dg4cE1ea.js} +15 -5
  24. package/dist/es/{sv-SE-BAfNO7ZF.js → sv-SE-DPB5qLHu.js} +15 -5
  25. package/dist/style.css +132 -8
  26. package/dist/types/components/Address/AddressForm.d.ts +0 -9
  27. package/dist/types/components/Address/FieldContainer.d.ts +2 -1
  28. package/dist/types/components/Address/utils.d.ts +1 -1
  29. package/dist/types/components/Company/Company.d.ts +1 -1
  30. package/dist/types/components/ContactDetails/ContactDetails.d.ts +0 -5
  31. package/dist/types/components/DebugWrapper/DebugModal.d.ts +1 -4
  32. package/dist/types/components/DebugWrapper/DebugTaskStatuses.d.ts +1 -1
  33. package/dist/types/components/DebugWrapper/DebugWrapper.d.ts +1 -4
  34. package/dist/types/components/DebugWrapper/debugInfo.d.ts +2 -2
  35. package/dist/types/components/Dropins/PciDropin/PciDropin.d.ts +1 -1
  36. package/dist/types/components/Dropins/PciDropin/types.d.ts +0 -1
  37. package/dist/types/components/Dropins/SourceOfFundsDropin/SourceOfFundsGettingStarted/SourceOfFundsGettingStarted.d.ts +10 -0
  38. package/dist/types/components/Dropins/SourceOfFundsDropin/SourceOfFundsHelpModal/SourceOfFundsHelpModal.d.ts +4 -0
  39. package/dist/types/components/Dropins/SourceOfFundsDropin/types.d.ts +1 -1
  40. package/dist/types/components/Dropins/types.d.ts +1 -1
  41. package/dist/types/components/Individual/types.d.ts +1 -1
  42. package/dist/types/components/Name/Name.d.ts +0 -11
  43. package/dist/types/components/PayoutAccount/PayoutAccount.d.ts +1 -3
  44. package/dist/types/components/PhoneInput/PhoneInput.d.ts +0 -5
  45. package/dist/types/components/SoleProp/SoleProp.d.ts +1 -1
  46. package/dist/types/components/TaskList/types.d.ts +4 -4
  47. package/dist/types/components/ui/atoms/Button/Button.d.ts +1 -1
  48. package/dist/types/components/ui/atoms/Button/Button.types.d.ts +2 -0
  49. package/dist/types/components/ui/atoms/Description/Description.d.ts +10 -0
  50. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +2 -0
  51. package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -1
  52. package/dist/types/components/ui/molecules/Card/types.d.ts +2 -0
  53. package/dist/types/core/context/ConfigurationApiContext/ConfigurationApiProvider.d.ts +1 -2
  54. package/dist/types/core/context/CoreProvider.d.ts +1 -2
  55. package/dist/types/core/hooks/useAnalytics.d.ts +1 -2
  56. package/dist/types/core/hooks/useComponentApi.d.ts +1 -0
  57. package/dist/types/core/models/api/accountIdentification.d.ts +8 -1
  58. package/dist/types/core/models/api/analytics.d.ts +0 -1
  59. package/dist/types/core/models/api/get-tasks.d.ts +1 -1
  60. package/dist/types/core/models/errors/entity-problems.d.ts +1 -1
  61. package/dist/types/core/user-events.d.ts +5 -0
  62. package/dist/types/core/utils.d.ts +2 -2
  63. package/dist/types/stores/globalStore/StoreProvider.d.ts +21 -0
  64. package/dist/types/stores/{taskStore → globalStore}/calculateTaskStatus.d.ts +1 -1
  65. package/dist/types/stores/{taskStore → globalStore}/determineTaskIdentifiers.d.ts +1 -1
  66. package/dist/types/stores/globalStore/globalStore.d.ts +58 -0
  67. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  68. package/dist/types/utils/mapping/componentApiMapping.d.ts +3 -0
  69. package/package.json +1 -1
  70. package/dist/types/stores/taskStore/taskStore.d.ts +0 -48
  71. /package/dist/types/stores/{taskStore → globalStore}/get-task-status.d.ts +0 -0
  72. /package/dist/types/stores/{taskStore → globalStore}/isEmptyEntity.d.ts +0 -0
  73. /package/dist/types/stores/{taskStore → globalStore}/taskStatus.d.ts +0 -0
  74. /package/dist/types/stores/{taskStore → globalStore}/taskTypes.d.ts +0 -0
@@ -81,9 +81,9 @@ const defaultLocaleTranslations = {
81
81
  accountHolderTerms: "Account Holder Terms",
82
82
  accountName: "Account name",
83
83
  accountNumber: "Account number",
84
+ accountNumberFullOrPartialVisible: "Includes your full or partial account number",
84
85
  accountNumberOrIbanVisible: "Includes your account number or IBAN",
85
86
  accountNumberVisible: "Includes your account number",
86
- accountNumberFullOrPartialVisible: "Includes your full or partial account number",
87
87
  accountVerification: "Account Verification",
88
88
  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.",
89
89
  actionNeeded: "Action needed",
@@ -97,13 +97,13 @@ const defaultLocaleTranslations = {
97
97
  addExtraBankAccount: "Add extra bank account",
98
98
  addExtraPayinAccount: "Add extra payin account",
99
99
  addExtraPayoutAccount: "Add extra payout account",
100
- addingAndVerifiyingABankAccount: "Adding and verifying a bank account with this method typically takes up to 3 business days.",
101
100
  addManually: "Add manually",
102
101
  addMissingBankDetails: "We are missing your bank details in order to perform payouts, please add your bank account.",
103
102
  addOwnerToTrustMember: "Add owner of %{trustMember}",
104
103
  addPayoutAccount: "Add a payout account",
105
104
  addTrustMember: "Add trust member",
106
105
  addYourselfAsSigner: "Add yourself as a signer",
106
+ addingAndVerifiyingABankAccount: "Adding and verifying a bank account with this method typically takes up to 3 business days.",
107
107
  additionalInformation: "Additional information",
108
108
  additionalInformationFormHeading: "Additional business details",
109
109
  additionalInformationFormName: "Additional details",
@@ -114,6 +114,7 @@ const defaultLocaleTranslations = {
114
114
  adoptionCertificate: "Adoption certificate",
115
115
  adyenKeepsDataAsLongAsLegallyRequired: "Adyen only keeps your data for as long as we're legally required to. It won't be used for any other purposes or by other third parties than those stated.",
116
116
  adyenWillOnlyGetTemporaryAccess: "Adyen will only gain temporary access to your bank details, and your data is never shared with third parties.",
117
+ allCapabilitiesValid: "All capabilities are valid",
117
118
  anAssociation: "An association",
118
119
  anLEIIsAUniqueCode: "An LEI is a unique code that identifies legal entities, including companies, who engage in financial transactions.",
119
120
  andResubmit: "and submit again.",
@@ -150,6 +151,7 @@ const defaultLocaleTranslations = {
150
151
  bankAccountNameWithSoleProprietor: "Bank account must be in your name (<strong>%{individualLegalName}</strong>) or sole proprietorship's name (<strong>%{soleProprietorshipName}</strong>)",
151
152
  bankAccountNameWithTrust: "The bank account must be in your trust's name (<strong>%{trusteeName} as trustee for %{trustLegalName} trading as %{trustTradingName}</strong>)",
152
153
  bankAccountNameWithTrust_US: "The bank account must be in your trust's name (<strong>%{trusteeName} as trustee for %{trustLegalName} doing business as %{trustTradingName}</strong>)",
154
+ bankAccountNeeded: "A bank account is needed.",
153
155
  bankAccountNumber: "Account number",
154
156
  bankAccountToHaveSameNameAsTrust: "The bank account holder has to have the same name as your trust",
155
157
  bankAccountVerification: "Bank account verification",
@@ -278,8 +280,8 @@ const defaultLocaleTranslations = {
278
280
  constitutionalDocument: "Constitutional document",
279
281
  constitutionalDocument__header: "Upload a constitutional document",
280
282
  constitutionalDocument__headerDescription: "This helps to verify your details.",
281
- constitutionalDocument__trust__headerDescription: "This helps to verify your trust details.",
282
283
  constitutionalDocument__soleProprietorship__headerDescription: "This helps to verify your sole proprietorship details.",
284
+ constitutionalDocument__trust__headerDescription: "This helps to verify your trust details.",
283
285
  contactDetails: "Contact Details",
284
286
  containsNameOfCompany: "Contains the name of your company or organization",
285
287
  "continue": "Continue",
@@ -303,12 +305,14 @@ const defaultLocaleTranslations = {
303
305
  currencyPlaceholder: "Select a currency code",
304
306
  customerSupport: "Customer support",
305
307
  cyRegistrationNumber: "Αριθμός Εγγραφής",
308
+ dataMissingError: "We are missing required data.",
309
+ dataReviewNeeded: "A data review is neeced.",
306
310
  dateCannotBeInTheFuture: "Date cannot be in the future",
307
- datedInTheLastXMonths: "Dated in the last %{number} months",
308
311
  dateOfIncorporation: "Date of incorporation",
309
312
  dateOfTotalAssetsCalculation: "The date on which total assets and annual turnover were calculated is often the balance sheet date.",
310
313
  dateOnDocumentNoOlderThanXMonths: "Date on the document is no older than %{numberOfMonths} months",
311
314
  datePlaceholder: "dd/mm/yyyy",
315
+ datedInTheLastXMonths: "Dated in the last %{number} months",
312
316
  dbaName: "Doing Business As (DBA) name",
313
317
  deceased: "My settlor is deceased",
314
318
  deceasedEstate: "Deceased estate",
@@ -394,8 +398,8 @@ const defaultLocaleTranslations = {
394
398
  enterNCharactersWithAMixForExample: "Enter %{numChars} characters, with a mix of letters and numbers. For example, %{example}",
395
399
  enterNDigitsAndThen1LetterForExample: "Enter %{numDigits} digits and then 1 letter. For example, %{example}",
396
400
  enterNDigitsForExample: "Enter %{numDigits} digits. For example, %{example}",
397
- enterNLettersAndThenXToYDigitsForExample: "Enter %{numLetters} letters and then %{minDigits} to %{maxDigits} digits. For example, %{example}",
398
401
  enterNLetterPrefixOptionallyAndThenXToYDigitsForExample: "Enter %{minDigits} or %{maxDigits} digits, with or without a %{numChars}-letter prefix. For example, %{example1} or %{example2}",
402
+ enterNLettersAndThenXToYDigitsForExample: "Enter %{numLetters} letters and then %{minDigits} to %{maxDigits} digits. For example, %{example}",
399
403
  enterNameExactlyAsAppearInID: "Enter your first name(s) exactly as it appears on your identity document",
400
404
  enterSettlorsFirstNameExactlyAsItAppearsInID: "Enter the settlor's first name(s) exactly as it appears on their identity document",
401
405
  enterSettlorsLastNameExactlyAsItAppearsInID: "Enter the settlor's last name(s) exactly as it appears on their identity document",
@@ -716,6 +720,12 @@ const defaultLocaleTranslations = {
716
720
  getSetUpInstantly: "Get set up instantly",
717
721
  getYourBusinessVerifiedDetails: "Get your business's verified details instantly and skip uploading documents.",
718
722
  getYourVerifiedDetailsInstantly: "Get your verified details instantly and skip uploading documents.",
723
+ gettingStarted: "Get Started",
724
+ gettingStartedBody: "Tell us about where funds used with our financial products are coming from. We need to know this information to ensure our financial products are used in a safe and secure manner.",
725
+ gettingStartedHeading: "Funding sources for financial products",
726
+ gettingStartedHelp: "Why do we collect this information?",
727
+ gettingStartedHelpModalDescription: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam quis facilisis ipsum. Integer nisi nibh, tincidunt vel tortor ac, mollis rhoncus neque. Aliquam efficitur tortor eu neque laoreet accumsan. Etiam semper tortor nec iaculis fermentum. Aenean quis sollicitudin diam. Sed ultrices odio vitae est blandit, eu egestas tellus condimentum. In lectus nunc, luctus condimentum sapien malesuada, consequat lobortis risus. ",
728
+ gettingStartedHelpModalTitle: "Why do we collect source of funds?",
719
729
  goBack: "Go back",
720
730
  goBackAndProvideDocumentScans: "Go back and provide document scans",
721
731
  goToIntroduction: "How does it work?",
@@ -787,10 +797,10 @@ const defaultLocaleTranslations = {
787
797
  infoInUploadedDocumentIsTrue: "All information in the uploaded document must be true and up-to-date.",
788
798
  informationCouldNotBeSubmitted: "Information couldn't be submitted",
789
799
  instant: "Instant",
790
- instantlyAddAndVerifyABankAccount: "Instantly add and verify a bank account for payouts",
791
800
  instantIDVerificationDescription: "Take a photo of a passport, identity card, or driver's license.",
792
801
  instantVerification: "Instant verification",
793
802
  instantVerificationDescription: "Log in to your bank account and get instantly verified.",
803
+ instantlyAddAndVerifyABankAccount: "Instantly add and verify a bank account for payouts",
794
804
  instantlyConnectAndVerifyYourBankAccount: "Instantly connect and verify your bank account",
795
805
  institutionNumber: "Institution number",
796
806
  internalCompanyDocument: "Internal company document",
@@ -833,6 +843,7 @@ const defaultLocaleTranslations = {
833
843
  introductionScreenTrustMemberDescriptionP2: "Where to find this information",
834
844
  introductionScreenTrustMemberTitle: "Trust members",
835
845
  introductionScreenTrustTitle: "Trust details",
846
+ invalidCapabilities: "Some capabilities are invalid.",
836
847
  invalidDateOfBirth: "Please enter a valid date of birth",
837
848
  invalidDateOfIncorporation: "Please enter a valid date of incorporation",
838
849
  invalidEmail: "Please enter a valid email",
@@ -861,6 +872,7 @@ const defaultLocaleTranslations = {
861
872
  invalidFormatIdentityNumberSG: "Please use the NRIC format: S1234567A",
862
873
  invalidFormatIdentityNumberUS: "Please provide last 4 digits",
863
874
  invalidFormatIdentityNumberUS9: "Please use the SSN format: XXXXXXXXX",
875
+ invalidInputError: "There was an invalid input error:",
864
876
  invalidNumberOfEmployees: "Please enter a valid number",
865
877
  invalidPhoneNumber: "Please enter a valid phone number",
866
878
  irdDocument: "IRD document",
@@ -909,6 +921,7 @@ const defaultLocaleTranslations = {
909
921
  legalRepresentative: "Legal representative",
910
922
  legalRepresentativeDetails: "Legal representative details",
911
923
  legalRepresentativeFor: "legal representative for: %{firstName} %{lastName}",
924
+ legalRepresentativeNeeded: "The user is underage, therefore a legal representative is needed.",
912
925
  letUsKnowTheBankAccountToSendReceiveFunds: "Let us know the bank account you use to send or receive funds.",
913
926
  liRegistrationNumber: "Unternehmensnummer",
914
927
  licenceVersionNumber: "Licence version number",
@@ -929,11 +942,11 @@ const defaultLocaleTranslations = {
929
942
  maintenanceModeMessage: "We're currently undergoing maintenance — please keep this page open until maintenance is complete to avoid losing unsaved changes.",
930
943
  makeSureToHaveYourTrustDeed: "Make sure to have your trust deed in hand to complete this information accurately.",
931
944
  manualIDVerificationDescription: "May take a few days. Upload a copy of a passport, identity, or driver's license.",
945
+ manualUpload: "Manual upload",
946
+ manualVerificationDescription: "You also have to provide the bank account details.",
932
947
  manuallyAddAccount: "Manually add account",
933
948
  manuallyAddAccountQuestion: "Manually add account?",
934
949
  manuallyAddAccountSlower: "Manually add account (slower)",
935
- manualUpload: "Manual upload",
936
- manualVerificationDescription: "You also have to provide the bank account details.",
937
950
  maxFileSize: "Max file size: %{maxSize}. Maximal 1 page.",
938
951
  maximumFileSizeExceeded: "Maximum file size exceeded",
939
952
  mayTakeAFewDays: "May take a few days",
@@ -944,6 +957,8 @@ const defaultLocaleTranslations = {
944
957
  missingCompanyDetails: "Missing company details or root entity",
945
958
  missingMultipleDecisionMakers: "You haven't added all required decision-makers",
946
959
  missingPhoneCountryCode: "Select a country code",
960
+ missingRequiredDecisionMakers: "We don't yet have sufficient decision makers.",
961
+ missingRequiredTrustMembers: "We don't yet have sufficient trust members.",
947
962
  momsregistreringsnummer: "Momsregistreringsnummer",
948
963
  momsregistreringsnummerCVR: "Momsregistreringsnummer (CVR)",
949
964
  mortgageStatement: "Mortgage statement",
@@ -962,12 +977,14 @@ const defaultLocaleTranslations = {
962
977
  naturalPersonDescription: "He/she doesn't have any business.",
963
978
  naturalPersonTitle: "Natural person",
964
979
  needHelpYouCanAlwaysReachOutToCustomerSupport: "Need help? You can always reach out to customer support.",
980
+ newEntityAlwaysEmpty: "We still need to create this entity.",
965
981
  next: "Next",
966
982
  nie: "NIE",
967
983
  no: "No",
968
984
  noGlare: "No glare",
969
985
  noGoBack: "No, go back",
970
986
  noIdontKnow: "No, or I don't know",
987
+ noIssuesFound: "No issues found.",
971
988
  noOptionsFound: "No options found",
972
989
  nominee: "Nominee",
973
990
  nonProfitOrCharitableOrgDescription: "Your organization has official non-profit or tax-exempt status.",
@@ -1050,6 +1067,8 @@ const defaultLocaleTranslations = {
1050
1067
  pciDssQuestionnaire: "PCI DSS questionnaire",
1051
1068
  pciSignFailed: "PCI signing failed",
1052
1069
  pciSignedSuccessfully: "PCI signed successfully",
1070
+ pendingCapabilities: "Some capabilities are still pending.",
1071
+ pendingStatusError: "There is an error with a pending status.",
1053
1072
  personAppointmentUnderTrustInstrument: "The person appointed under the trust instrument to direct or restrain the trustees in relation to their administration of the trust.",
1054
1073
  personalDetails: "Personal details",
1055
1074
  personnummer: "Personnummer",
@@ -1101,6 +1120,7 @@ const defaultLocaleTranslations = {
1101
1120
  publicCompanyTitle: "Public company",
1102
1121
  publicTradingTrust: "Public trading trust",
1103
1122
  ranIntoTechnicalError: "We ran into a technical error",
1123
+ reason: "Reason",
1104
1124
  reasonForFillingCompanyAddressDetails: "We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we'll 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.",
1105
1125
  reasonForFillingCompanyRegistrationDetails: "We have to make sure the businesses using our services will not be misusing the funds or causing harm. To do that, we'll 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.",
1106
1126
  reasonForFillingIndividualAddressDetails: "We have to make sure that everyone who uses our services is who they say they are. To do that, we'll 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.",
@@ -1199,10 +1219,12 @@ const defaultLocaleTranslations = {
1199
1219
  retrieveMyInfoBusiness: "Retrieve Myinfo business",
1200
1220
  retrieveMyinfoBusinessWith: "Retrieve Myinfo business with",
1201
1221
  retrieveMyinfoWith: "Retrieve Myinfo with",
1222
+ returnToTaskList: "Return to task list",
1202
1223
  reviewTheInformationBelowAndCorrectMistakesOr: "Review the information below and correct any mistakes, or",
1203
1224
  rnaNumber: "RNA number",
1204
1225
  role: "Role",
1205
1226
  roleAndEntityType: "Role and entity type",
1227
+ rootLegalEntityIsEmpty: "The root legal entity only has the minimum data (is empty).",
1206
1228
  routingNumber: "Routing number",
1207
1229
  routingNumberVisible: "Includes your routing number",
1208
1230
  salarySlip: "Salary slip",
@@ -1274,6 +1296,7 @@ const defaultLocaleTranslations = {
1274
1296
  sourceOfFunds: "Source of funds",
1275
1297
  ssn: "SSN",
1276
1298
  stamregister: "Stamregister erhverv (SE-nummer)",
1299
+ start: "Start",
1277
1300
  startANewSessionFromTheSamePlaceYouOriginallyAccessed: "Start a new session from the same place you originally accessed this page.",
1278
1301
  startTypingTheAddress: "Start typing the address",
1279
1302
  state: "State",
@@ -1307,6 +1330,7 @@ const defaultLocaleTranslations = {
1307
1330
  summaryTaxExemptionLegalCaption_3: "You are an authorized representative and signatory on behalf of the legal entity for which the VAT information was provided.",
1308
1331
  supportedFileTypes: "Supported file types: %{fileTypes}",
1309
1332
  swiftCode: "Swift code",
1333
+ task: "Task",
1310
1334
  taxDocument: "Tax document",
1311
1335
  taxFiling: "Tax filing",
1312
1336
  taxFiling__US: "Tax filing such as Schedule SE (Form 1040)",
@@ -1384,6 +1408,7 @@ const defaultLocaleTranslations = {
1384
1408
  unsuccessful: "Unsuccessful",
1385
1409
  unsupportedFiletype: "Unsupported filetype",
1386
1410
  upToFiles: "Up to %{maxFiles} file(s).",
1411
+ update: "Update",
1387
1412
  updateTheInformation: "Update the information",
1388
1413
  uploadABankStatement: "Upload a bank statement",
1389
1414
  uploadADocument: "Upload a document",
@@ -1476,23 +1501,7 @@ const defaultLocaleTranslations = {
1476
1501
  yourIbanShouldBeginWith_: "Your IBAN should begin with %{countryCode}.",
1477
1502
  yourLoanApplicationHasBeenReceived: "Thank you for providing your additional information. The data provided is being reviewed. You'll be notified if anything else is needed.",
1478
1503
  zentralesVereinsregisterId: "Zentrales Vereinsregister ID",
1479
- zipCode: "ZIP code",
1480
- invalidInputError: "There was an invalid input error:",
1481
- bankAccountNeeded: "A bank account is needed.",
1482
- noIssuesFound: "No issues found.",
1483
- newEntityAlwaysEmpty: "We still need to create this entity.",
1484
- missingRequiredDecisionMakers: "We don't yet have sufficient decision makers.",
1485
- missingRequiredTrustMembers: "We don't yet have sufficient trust members.",
1486
- rootLegalEntityIsEmpty: "The root legal entity only has the minimum data (is empty).",
1487
- legalRepresentativeNeeded: "The user is underage, therefore a legal representative is needed.",
1488
- dataMissingError: "We are missing required data.",
1489
- dataReviewNeeded: "A data review is neeced.",
1490
- pendingStatusError: "There is an error with a pending status.",
1491
- pendingCapabilities: "Some capabilities are still pending.",
1492
- invalidCapabilities: "Some capabilities are invalid.",
1493
- allCapabilitiesValid: "All capabilities are valid",
1494
- task: "Task",
1495
- reason: "Reason"
1504
+ zipCode: "ZIP code"
1496
1505
  };
1497
1506
  const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1498
1507
  __proto__: null,
@@ -2394,6 +2403,9 @@ const images = {
2394
2403
  ),
2395
2404
  "trustly-logo": lazy(
2396
2405
  () => import("./trustly-logo-YJslAOYF.js")
2406
+ ),
2407
+ "source-of-funds": lazy(
2408
+ () => import("./digital-wallet-with-local-currencies-DSaDbAY9.js")
2397
2409
  )
2398
2410
  };
2399
2411
  const svgs = {
@@ -2456,6 +2468,7 @@ const Button = ({
2456
2468
  className,
2457
2469
  role,
2458
2470
  small,
2471
+ large,
2459
2472
  block,
2460
2473
  critical,
2461
2474
  shaded,
@@ -2469,6 +2482,7 @@ const Button = ({
2469
2482
  onKeyDown,
2470
2483
  loading = false,
2471
2484
  testId,
2485
+ ariaLabel,
2472
2486
  underline
2473
2487
  }) => {
2474
2488
  const onClickHandler = (event) => {
@@ -2496,6 +2510,7 @@ const Button = ({
2496
2510
  "adyen-kyc-button--block": block,
2497
2511
  "adyen-kyc-button--critical": critical,
2498
2512
  "adyen-kyc-button--small": small && label,
2513
+ "adyen-kyc-button--large": large && label,
2499
2514
  "adyen-kyc-button--shaded": shaded && icon && tertiary,
2500
2515
  // disallow shaded effect if not just tertiary icon
2501
2516
  "adyen-kyc-button--icon": icon && label && !small
@@ -2503,6 +2518,7 @@ const Button = ({
2503
2518
  return /* @__PURE__ */ jsx(
2504
2519
  "button",
2505
2520
  {
2521
+ "aria-label": ariaLabel,
2506
2522
  "aria-disabled": disabled,
2507
2523
  "data-testid": testId,
2508
2524
  className: buttonClasses,
@@ -5016,7 +5032,7 @@ function CountryOfGoverningLawField({
5016
5032
  }
5017
5033
  function FormHeader({
5018
5034
  heading,
5019
- description,
5035
+ description: description2,
5020
5036
  headingComponent,
5021
5037
  descriptionComponent,
5022
5038
  classNames
@@ -5028,8 +5044,8 @@ function FormHeader({
5028
5044
  return headingComponent;
5029
5045
  };
5030
5046
  const renderDescription = () => {
5031
- if (description) {
5032
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-header__description", children: description });
5047
+ if (description2) {
5048
+ return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-header__description", children: description2 });
5033
5049
  }
5034
5050
  return descriptionComponent;
5035
5051
  };
@@ -8628,6 +8644,7 @@ class UserEvents {
8628
8644
  constructor() {
8629
8645
  this.queue = [];
8630
8646
  this.subscriptions = /* @__PURE__ */ new Set();
8647
+ this.baseTrackingPayload = {};
8631
8648
  }
8632
8649
  add(...args) {
8633
8650
  this.queue.push(...args);
@@ -8642,7 +8659,8 @@ class UserEvents {
8642
8659
  * Adds an analytics event. Optionally can include a payload.
8643
8660
  */
8644
8661
  addEvent(key, event) {
8645
- this.add(["add_event", { key, ...event }]);
8662
+ const completeEvent = { ...this.baseTrackingPayload, ...event };
8663
+ this.add(["add_event", { key, ...completeEvent }]);
8646
8664
  this.notifySubscribers();
8647
8665
  }
8648
8666
  /**
@@ -8685,6 +8703,10 @@ class UserEvents {
8685
8703
  subscribe(callback) {
8686
8704
  this.subscriptions.add(callback);
8687
8705
  }
8706
+ /** Sets params that are sent on every event */
8707
+ setBaseTrackingPayload(baseTrackingPayload) {
8708
+ this.baseTrackingPayload = baseTrackingPayload;
8709
+ }
8688
8710
  /**
8689
8711
  * Removes a subscribed callback
8690
8712
  */
@@ -11458,13 +11480,13 @@ const EntityTypeRadioGroupCard = ({
11458
11480
  }
11459
11481
  );
11460
11482
  const EntityTypeSelectionRadioCardBody = ({
11461
- description,
11483
+ description: description2,
11462
11484
  examples
11463
11485
  }) => {
11464
11486
  const { i18n } = useI18nContext();
11465
- if (!examples) return /* @__PURE__ */ jsx("span", { children: i18n.get(description) });
11487
+ if (!examples) return /* @__PURE__ */ jsx("span", { children: i18n.get(description2) });
11466
11488
  return /* @__PURE__ */ jsxs(Fragment, { children: [
11467
- /* @__PURE__ */ jsx("span", { className: "adyen-kyc-entity-type-radio-group-card__description", children: i18n.get(description) }),
11489
+ /* @__PURE__ */ jsx("span", { className: "adyen-kyc-entity-type-radio-group-card__description", children: i18n.get(description2) }),
11468
11490
  /* @__PURE__ */ jsxs("span", { className: "adyen-kyc-entity-type-radio-group-card__examples", children: [
11469
11491
  i18n.get({ key: "forExample_", values: { examples: examples.join(", ") } }),
11470
11492
  "."
@@ -12337,7 +12359,7 @@ const financialInfoValidationRules = {
12337
12359
  }
12338
12360
  };
12339
12361
  const financialInformationReportedValueOptions = "adyen-kyc-financial-information-reported-value-options";
12340
- const styles$a = {
12362
+ const styles$c = {
12341
12363
  "financial-information-reported-value-options": "adyen-kyc-financial-information-reported-value-options",
12342
12364
  financialInformationReportedValueOptions
12343
12365
  };
@@ -12385,7 +12407,7 @@ const InputCurrency = ({
12385
12407
  };
12386
12408
  const reportedValue = "adyen-kyc-reported-value";
12387
12409
  const reportedValueInput = "adyen-kyc-reported-value-input";
12388
- const styles$9 = {
12410
+ const styles$b = {
12389
12411
  "reported-value": "adyen-kyc-reported-value",
12390
12412
  reportedValue,
12391
12413
  "reported-value-input": "adyen-kyc-reported-value-input",
@@ -12402,7 +12424,7 @@ const ReportedValue = ({
12402
12424
  isValid
12403
12425
  }) => {
12404
12426
  const { i18n } = useI18nContext();
12405
- return /* @__PURE__ */ jsx("div", { className: styles$9.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
12427
+ return /* @__PURE__ */ jsx("div", { className: styles$b.reportedValue, children: /* @__PURE__ */ jsx(Field, { name: fieldName, errorMessage, isValid, helper, children: (childProps) => /* @__PURE__ */ jsx(
12406
12428
  InputCurrency,
12407
12429
  {
12408
12430
  ...childProps,
@@ -12410,7 +12432,7 @@ const ReportedValue = ({
12410
12432
  currency,
12411
12433
  amount,
12412
12434
  onAmountChanged,
12413
- className: styles$9.reportedValueInput,
12435
+ className: styles$b.reportedValueInput,
12414
12436
  "aria-label": label
12415
12437
  }
12416
12438
  ) }) });
@@ -12547,7 +12569,7 @@ function FinancialInformation(props) {
12547
12569
  ],
12548
12570
  onChange: updateReportedValueOption,
12549
12571
  showContentOnlyOnSelected: true,
12550
- className: styles$a.financialInformationReportedValueOptions
12572
+ className: styles$c.financialInformationReportedValueOptions
12551
12573
  }
12552
12574
  )
12553
12575
  }
@@ -12975,11 +12997,11 @@ const SearchAddress = ({
12975
12997
  }
12976
12998
  return formattedText;
12977
12999
  };
12978
- const getHighlightedText2 = ({ text, highlight, description }) => {
13000
+ const getHighlightedText2 = ({ text, highlight, description: description2 }) => {
12979
13001
  let formattedText = [];
12980
13002
  if (highlight === "") {
12981
- if (description) {
12982
- formattedText.push(`${text}, ${description}`);
13003
+ if (description2) {
13004
+ formattedText.push(`${text}, ${description2}`);
12983
13005
  } else {
12984
13006
  formattedText.push(text);
12985
13007
  }
@@ -12988,9 +13010,9 @@ const SearchAddress = ({
12988
13010
  formattedText = getFormattedText2(highlightItems[0].split(","), text);
12989
13011
  if (highlightItems.length > 1) {
12990
13012
  formattedText.push(`, `);
12991
- formattedText.push(/* @__PURE__ */ jsx(Fragment, { children: getFormattedText2(highlightItems[1].split(","), description) }));
12992
- } else if (description) {
12993
- formattedText.push(`, ${description}`);
13013
+ formattedText.push(/* @__PURE__ */ jsx(Fragment, { children: getFormattedText2(highlightItems[1].split(","), description2) }));
13014
+ } else if (description2) {
13015
+ formattedText.push(`, ${description2}`);
12994
13016
  }
12995
13017
  }
12996
13018
  return formattedText;
@@ -13352,7 +13374,7 @@ const addressValidationRulesV4 = (country, i18n) => {
13352
13374
  function AddressForm(props) {
13353
13375
  const {
13354
13376
  data: dataProp,
13355
- requiredFields: requiredFieldsProp,
13377
+ requiredFields: requiredFieldsProp = ADDRESS_SCHEMA,
13356
13378
  optionalFields: optionalFieldsProp = ["otherAddressInformation"],
13357
13379
  fieldValidationErrors: fieldValidationErrorsProp,
13358
13380
  formVerificationErrors: formVerificationErrorsProp,
@@ -13581,14 +13603,6 @@ function AddressForm(props) {
13581
13603
  }
13582
13604
  );
13583
13605
  }
13584
- AddressForm.defaultProps = {
13585
- data: {},
13586
- onChange: () => {
13587
- },
13588
- visibility: "editable",
13589
- requiredFields: ADDRESS_SCHEMA,
13590
- countryCode: null
13591
- };
13592
13606
  const logger$I = createLogger("AddressFieldContainer");
13593
13607
  const formatAddressItem = (item) => {
13594
13608
  if (item.description.includes("Addresses")) {
@@ -13636,12 +13650,12 @@ const getFormattedText = (highlightItems, text) => {
13636
13650
  const getHighlightedText = ({
13637
13651
  text = "",
13638
13652
  highlight = "",
13639
- description = ""
13653
+ description: description2 = ""
13640
13654
  }) => {
13641
13655
  let formattedText = [];
13642
13656
  if (highlight === "") {
13643
- if (description) {
13644
- formattedText.push(`${text}, ${description}`);
13657
+ if (description2) {
13658
+ formattedText.push(`${text}, ${description2}`);
13645
13659
  } else {
13646
13660
  formattedText.push(text);
13647
13661
  }
@@ -13650,9 +13664,9 @@ const getHighlightedText = ({
13650
13664
  formattedText = getFormattedText(highlightItems[0].split(","), text);
13651
13665
  if (highlightItems.length > 1) {
13652
13666
  formattedText.push(`, `);
13653
- formattedText.push(/* @__PURE__ */ jsx(Fragment, { children: getFormattedText(highlightItems[1].split(","), description) }));
13654
- } else if (description) {
13655
- formattedText.push(`, ${description}`);
13667
+ formattedText.push(/* @__PURE__ */ jsx(Fragment, { children: getFormattedText(highlightItems[1].split(","), description2) }));
13668
+ } else if (description2) {
13669
+ formattedText.push(`, ${description2}`);
13656
13670
  }
13657
13671
  }
13658
13672
  return formattedText;
@@ -14135,7 +14149,7 @@ function RegistrationAddress(props) {
14135
14149
  const {
14136
14150
  id,
14137
14151
  heading,
14138
- description,
14152
+ description: description2,
14139
14153
  handleAddressSearch,
14140
14154
  handleFindAddress,
14141
14155
  country,
@@ -14214,7 +14228,7 @@ function RegistrationAddress(props) {
14214
14228
  };
14215
14229
  return /* @__PURE__ */ jsxs(Fragment, { children: [
14216
14230
  /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
14217
- /* @__PURE__ */ jsx(FormHeader, { heading, description }),
14231
+ /* @__PURE__ */ jsx(FormHeader, { heading, description: description2 }),
14218
14232
  /* @__PURE__ */ jsx(
14219
14233
  ErrorPanel,
14220
14234
  {
@@ -14394,7 +14408,7 @@ function RegistrationDocument({
14394
14408
  country,
14395
14409
  companyType = CompanyTypesValue.PRIVATE_COMPANY,
14396
14410
  heading = "companyRegistrationDocumentFormHeading",
14397
- description = "companyRegistrationDocumentFormDescription",
14411
+ description: description2 = "companyRegistrationDocumentFormDescription",
14398
14412
  ...props
14399
14413
  }) {
14400
14414
  const { i18n } = useI18nContext();
@@ -14404,7 +14418,7 @@ function RegistrationDocument({
14404
14418
  ...props,
14405
14419
  id,
14406
14420
  heading: i18n.get(heading),
14407
- description: i18n.get(description),
14421
+ description: i18n.get(description2),
14408
14422
  documentField: "registrationDocument",
14409
14423
  documentType: DocumentType.REGISTRATION_DOCUMENT,
14410
14424
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, { country, companyType }),
@@ -14493,7 +14507,7 @@ function TaxDocument({
14493
14507
  country,
14494
14508
  companyType = CompanyTypesValue.PRIVATE_COMPANY,
14495
14509
  heading = "companyTaxDocumentFormHeading",
14496
- description = "companyTaxDocumentFormDescription",
14510
+ description: description2 = "companyTaxDocumentFormDescription",
14497
14511
  ...props
14498
14512
  }) {
14499
14513
  const { i18n } = useI18nContext();
@@ -14503,7 +14517,7 @@ function TaxDocument({
14503
14517
  ...props,
14504
14518
  id,
14505
14519
  heading: i18n.get(heading),
14506
- description: i18n.get(description),
14520
+ description: i18n.get(description2),
14507
14521
  documentField: "taxDocument",
14508
14522
  documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
14509
14523
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType }),
@@ -14531,7 +14545,7 @@ function ProofOfDirectorDocument({
14531
14545
  id,
14532
14546
  country,
14533
14547
  heading = "uploadYourOrganizationProofOfDirector",
14534
- description = "weNeedAnOfficialDocument",
14548
+ description: description2 = "weNeedAnOfficialDocument",
14535
14549
  ...props
14536
14550
  }) {
14537
14551
  const { i18n } = useI18nContext();
@@ -14542,7 +14556,7 @@ function ProofOfDirectorDocument({
14542
14556
  ...props,
14543
14557
  id,
14544
14558
  heading: i18n.get(heading),
14545
- description: i18n.get(description),
14559
+ description: i18n.get(description2),
14546
14560
  documentField: "proofOfDirector",
14547
14561
  documentType: DocumentType.PROOF_OF_DIRECTOR,
14548
14562
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, {}),
@@ -14907,7 +14921,7 @@ const createDocumentRequest = async ({
14907
14921
  documentType,
14908
14922
  page1,
14909
14923
  page2,
14910
- description,
14924
+ description: description2,
14911
14925
  existingDocument
14912
14926
  }) => {
14913
14927
  const pagesToUpload = [page1, page2].filter(
@@ -14916,14 +14930,14 @@ const createDocumentRequest = async ({
14916
14930
  const [page1ToUpload, page2ToUpload] = pagesToUpload;
14917
14931
  const [encodedPage1, encodedPage2] = await Promise.all(pagesToUpload.map(fileToBase64));
14918
14932
  if (!encodedPage1) {
14919
- if (existingDocument && existingDocument.description !== description) {
14933
+ if (existingDocument && existingDocument.description !== description2) {
14920
14934
  return {
14921
14935
  owner: {
14922
14936
  id: entityId,
14923
14937
  type: entityType
14924
14938
  },
14925
14939
  type: documentType,
14926
- description: description || `Document type: ${documentType}`
14940
+ description: description2 || `Document type: ${documentType}`
14927
14941
  };
14928
14942
  }
14929
14943
  return;
@@ -14934,7 +14948,7 @@ const createDocumentRequest = async ({
14934
14948
  type: entityType
14935
14949
  },
14936
14950
  type: documentType,
14937
- description: description || `Document type: ${documentType}`,
14951
+ description: description2 || `Document type: ${documentType}`,
14938
14952
  attachments: [
14939
14953
  ...page1ToUpload && page2ToUpload && encodedPage1 && encodedPage2 ? [
14940
14954
  createAttachment(encodedPage1, page1ToUpload.name, "front"),
@@ -15301,6 +15315,14 @@ const getAccountIdentificationFromPayoutAccountSchema = (payoutAccount, bankCoun
15301
15315
  accountNumber: payoutAccount.bankAccountNumber,
15302
15316
  bsbCode: payoutAccount.branchCode
15303
15317
  };
15318
+ case CountryCodes.Brazil:
15319
+ return {
15320
+ type: "brLocal",
15321
+ accountNumber: payoutAccount.bankAccountNumber,
15322
+ ispbCode: payoutAccount.bankCode,
15323
+ bankName: payoutAccount.bankName,
15324
+ branchCode: payoutAccount.branchCode
15325
+ };
15304
15326
  case CountryCodes.Canada:
15305
15327
  return {
15306
15328
  type: "caLocal",
@@ -16090,7 +16112,7 @@ const mapLegalEntityToSoleProp = (legalEntity) => {
16090
16112
  return solePropCompData;
16091
16113
  };
16092
16114
  const mapSolePropToLegalEntity = (data) => {
16093
- var _a, _b;
16115
+ var _a, _b, _c, _d;
16094
16116
  const requestObj = {
16095
16117
  ...formatObject(data, solePropApiKeyMapping)
16096
16118
  };
@@ -16116,6 +16138,7 @@ const mapSolePropToLegalEntity = (data) => {
16116
16138
  mapFinancialInformationToFinancialReport(data.solePropFinancialInformation)
16117
16139
  ];
16118
16140
  }
16141
+ requestObj.soleProprietorship.doingBusinessAs = ((_c = data.solePropRegistrationDetails) == null ? void 0 : _c.dbaName) || ((_d = data.solePropRegistrationDetails) == null ? void 0 : _d.tradingName) || "";
16119
16142
  requestObj.type = LegalEntityType.SOLE_PROPRIETORSHIP;
16120
16143
  return requestObj;
16121
16144
  };
@@ -16280,7 +16303,7 @@ const mapApiDocumentToSolePropDocuments = (entityId) => {
16280
16303
  };
16281
16304
  const mapPayoutDocumentsToApiDocuments = async (data, entityId) => {
16282
16305
  const { payoutAccountDocuments = {} } = data;
16283
- const { bankStatementDocument, description } = payoutAccountDocuments;
16306
+ const { bankStatementDocument, description: description2 } = payoutAccountDocuments;
16284
16307
  const entityType = TransferInstrumentType.BANK_ACCOUNT;
16285
16308
  const existingDocument = getDocument$1(entityId, DocumentType.BANK_STATEMENT);
16286
16309
  return createDocumentRequest({
@@ -16288,7 +16311,7 @@ const mapPayoutDocumentsToApiDocuments = async (data, entityId) => {
16288
16311
  entityType,
16289
16312
  documentType: DocumentType.BANK_STATEMENT,
16290
16313
  page1: bankStatementDocument == null ? void 0 : bankStatementDocument[0],
16291
- description,
16314
+ description: description2,
16292
16315
  existingDocument
16293
16316
  });
16294
16317
  };
@@ -16536,7 +16559,7 @@ const useIdVerificationToken = ({
16536
16559
  };
16537
16560
  const loaderWrapperLoader = "adyen-kyc-loader-wrapper-loader";
16538
16561
  const loaderWrapperLoaderActive = "adyen-kyc-loader-wrapper-loader-active";
16539
- const styles$8 = {
16562
+ const styles$a = {
16540
16563
  "loader-wrapper-loader": "adyen-kyc-loader-wrapper-loader",
16541
16564
  loaderWrapperLoader,
16542
16565
  "loader-wrapper-loader-active": "adyen-kyc-loader-wrapper-loader-active",
@@ -16553,13 +16576,13 @@ const LoaderWrapper = ({
16553
16576
  const opacitySyle = status === "loading" ? {
16554
16577
  opacity: formOpacityWhenLoading
16555
16578
  } : { opacity: 1 };
16556
- const loaderWrapperClass = cx(styles$8.loaderWrapperLoader, {
16557
- [styles$8.loaderWrapperLoaderActive]: status === "loading" && showSpinner
16579
+ const loaderWrapperClass = cx(styles$a.loaderWrapperLoader, {
16580
+ [styles$a.loaderWrapperLoaderActive]: status === "loading" && showSpinner
16558
16581
  });
16559
- const overlayClass = cx(styles$8.loaderWrapper, className);
16582
+ const overlayClass = cx(styles$a.loaderWrapper, className);
16560
16583
  return /* @__PURE__ */ jsxs("div", { className: overlayClass, style: { position: "relative" }, children: [
16561
16584
  /* @__PURE__ */ jsx("div", { className: loaderWrapperClass, children: /* @__PURE__ */ jsx(Loader, { size: loaderSize }) }),
16562
- /* @__PURE__ */ jsx("div", { className: styles$8.loaderWrapperForm, style: opacitySyle, children })
16585
+ /* @__PURE__ */ jsx("div", { className: styles$a.loaderWrapperForm, style: opacitySyle, children })
16563
16586
  ] });
16564
16587
  };
16565
16588
  const containerId = "adyen-kyc-id-verification";
@@ -16815,8 +16838,8 @@ const IdVerificationMethodOptionIcon = ({
16815
16838
  method
16816
16839
  }) => {
16817
16840
  const { i18n } = useI18nContext();
16818
- const { description, svgName } = idVerificationMethodsMetadata[method];
16819
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-radio-group-card__illustration", children: /* @__PURE__ */ jsx(Svg, { type: "image", name: svgName, title: i18n.get(description) }) });
16841
+ const { description: description2, svgName } = idVerificationMethodsMetadata[method];
16842
+ return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-radio-group-card__illustration", children: /* @__PURE__ */ jsx(Svg, { type: "image", name: svgName, title: i18n.get(description2) }) });
16820
16843
  };
16821
16844
  const IdVerificationMethodOptionFooter = ({
16822
16845
  method
@@ -17217,9 +17240,6 @@ function PhoneInput(props) {
17217
17240
  )
17218
17241
  ] });
17219
17242
  }
17220
- PhoneInput.defaultProps = {
17221
- phoneLabel: "telephoneNumber"
17222
- };
17223
17243
  const MemoizedPhoneInput = memo(
17224
17244
  PhoneInput,
17225
17245
  (prevProps, nextProps) => prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate
@@ -17606,9 +17626,6 @@ const MemoizedContactDetails = memo(
17606
17626
  ContactDetails,
17607
17627
  (prevProps, nextProps) => prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.labels, nextProps.labels) && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors)
17608
17628
  );
17609
- ContactDetails.defaultProps = {
17610
- data: {}
17611
- };
17612
17629
  const CountryIdNumberPatterns = {
17613
17630
  [CountryCodes.Brazil]: /^\d{11}$/,
17614
17631
  [CountryCodes.Canada]: /^\d{9}$/,
@@ -18451,11 +18468,11 @@ const makeSelectItemForRole = (role, i18n) => {
18451
18468
  roleMetadata
18452
18469
  ).join("\n")}`
18453
18470
  );
18454
- const { name, description, variant } = metadata;
18471
+ const { name, description: description2, variant } = metadata;
18455
18472
  return {
18456
18473
  id: role,
18457
18474
  name: i18n.get(name),
18458
- description: description ? i18n.get(description) : void 0,
18475
+ description: description2 ? i18n.get(description2) : void 0,
18459
18476
  className: `adyen-kyc-tag--${variant}`
18460
18477
  };
18461
18478
  };
@@ -18957,13 +18974,6 @@ const MemoizedName = memo(
18957
18974
  Name,
18958
18975
  (prevProps, nextProps) => prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors)
18959
18976
  );
18960
- Name.defaultProps = {
18961
- data: {},
18962
- onChange: () => {
18963
- },
18964
- visibility: "editable",
18965
- validationRules: nameValidationRules
18966
- };
18967
18977
  const personalDetailsValidationRules = {
18968
18978
  birthDate: [
18969
18979
  {
@@ -20844,7 +20854,7 @@ const BankDocumentRequirements = ({
20844
20854
  const bankDocumentValidationRules = {
20845
20855
  description: {
20846
20856
  modes: ["blur"],
20847
- validate: (description) => description ? bankStatementDescriptionPattern.test(description) : true,
20857
+ validate: (description2) => description2 ? bankStatementDescriptionPattern.test(description2) : true,
20848
20858
  errorMessage: "invalidFormatBankStatementDescription"
20849
20859
  }
20850
20860
  };
@@ -20862,7 +20872,7 @@ function BankDocument(props) {
20862
20872
  validators: validators2,
20863
20873
  data: bankData,
20864
20874
  id,
20865
- description,
20875
+ description: description2,
20866
20876
  heading
20867
20877
  } = props;
20868
20878
  const { i18n } = useI18nContext();
@@ -20942,7 +20952,7 @@ function BankDocument(props) {
20942
20952
  );
20943
20953
  return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-bank-document", children: [
20944
20954
  /* @__PURE__ */ jsx(StateContextSetter, { owner: id, stateRef }),
20945
- /* @__PURE__ */ jsx(FormHeader, { heading, description }),
20955
+ /* @__PURE__ */ jsx(FormHeader, { heading, description: description2 }),
20946
20956
  /* @__PURE__ */ jsx(
20947
20957
  ErrorPanel,
20948
20958
  {
@@ -21770,6 +21780,10 @@ function BankVerification(props) {
21770
21780
  triggerValidation();
21771
21781
  await (refreshLegalEntity == null ? void 0 : refreshLegalEntity());
21772
21782
  };
21783
+ const handleOnBack = () => {
21784
+ setHideVerificationWidget(false);
21785
+ onBack == null ? void 0 : onBack();
21786
+ };
21773
21787
  useEffect(() => {
21774
21788
  var _a, _b;
21775
21789
  (_b = (_a = stateRef.current).setState) == null ? void 0 : _b.call(_a, {
@@ -21809,13 +21823,13 @@ function BankVerification(props) {
21809
21823
  vendor: provider.name,
21810
21824
  setBankVerificationError,
21811
21825
  setHideVerificationWidget,
21812
- onBack,
21826
+ onBack: handleOnBack,
21813
21827
  retrieveBankAccountInfo,
21814
21828
  createTrustedTransferInstrument: createTrustedTransferInstrument2,
21815
21829
  handleBankVerificationError: handleBankVerificationError2
21816
21830
  }
21817
21831
  ),
21818
- /* @__PURE__ */ jsx(ActionBar, { onBack: () => onBack == null ? void 0 : onBack(), backButtonLabel: i18n.get("goBack") })
21832
+ /* @__PURE__ */ jsx(ActionBar, { onBack: handleOnBack, backButtonLabel: i18n.get("goBack") })
21819
21833
  ] }) : void 0 })
21820
21834
  }
21821
21835
  )
@@ -22957,10 +22971,6 @@ function PayoutAccount(props) {
22957
22971
  )
22958
22972
  ] });
22959
22973
  }
22960
- const MemoizedPayoutAccount = memo(
22961
- PayoutAccount,
22962
- (prevProps, nextProps) => objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.optionalFields, nextProps.optionalFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && prevProps.country === nextProps.country && prevProps.shouldValidate === nextProps.shouldValidate && prevProps.arePayoutAccountDetailsInvalid === nextProps.arePayoutAccountDetailsInvalid && prevProps.invalidFieldNames === nextProps.invalidFieldNames
22963
- );
22964
22974
  const eeaCountries = [
22965
22975
  CountryCodes.Austria,
22966
22976
  CountryCodes.Belgium,
@@ -23039,7 +23049,7 @@ const payoutVerificationMethods = ["instantVerification", "manualVerification"];
23039
23049
  const skeleton = "adyen-kyc-skeleton";
23040
23050
  const skeletonCircle = "adyen-kyc-skeleton-circle";
23041
23051
  const skeletonText = "adyen-kyc-skeleton-text";
23042
- const styles$7 = {
23052
+ const styles$9 = {
23043
23053
  skeleton,
23044
23054
  "skeleton-circle": "adyen-kyc-skeleton-circle",
23045
23055
  skeletonCircle,
@@ -23052,9 +23062,9 @@ const Skeleton = ({
23052
23062
  height = "1em",
23053
23063
  width
23054
23064
  }) => {
23055
- const classNames = cx(styles$7.skeleton, {
23056
- [styles$7.skeletonCircle]: circle,
23057
- [styles$7.skeletonText]: text
23065
+ const classNames = cx(styles$9.skeleton, {
23066
+ [styles$9.skeletonCircle]: circle,
23067
+ [styles$9.skeletonText]: text
23058
23068
  });
23059
23069
  return /* @__PURE__ */ jsx("div", { className: classNames, style: { height, width } });
23060
23070
  };
@@ -23062,7 +23072,7 @@ const preferInstantVerificationMethod = "adyen-kyc-prefer-instant-verification-m
23062
23072
  const preferInstantVerificationMethodCard = "adyen-kyc-prefer-instant-verification-method-card";
23063
23073
  const preferInstantVerificationMethodInstantButton = "adyen-kyc-prefer-instant-verification-method-instant-button";
23064
23074
  const preferInstantVerificationMethodModalFooter = "adyen-kyc-prefer-instant-verification-method-modal-footer";
23065
- const styles$6 = {
23075
+ const styles$8 = {
23066
23076
  "prefer-instant-verification-method": "adyen-kyc-prefer-instant-verification-method",
23067
23077
  preferInstantVerificationMethod,
23068
23078
  "prefer-instant-verification-method-card": "adyen-kyc-prefer-instant-verification-method-card",
@@ -23074,6 +23084,8 @@ const styles$6 = {
23074
23084
  };
23075
23085
  function Card({
23076
23086
  className,
23087
+ headerClassName,
23088
+ bodyClassName,
23077
23089
  children,
23078
23090
  stateful,
23079
23091
  active,
@@ -23095,9 +23107,10 @@ function Card({
23095
23107
  "adyen-kyc-card--fetching": fetching,
23096
23108
  "adyen-kyc-card--secondary": background === "secondary"
23097
23109
  });
23098
- const headerClassNames = cx("adyen-kyc-card__header", {
23110
+ const headerClassNames = cx("adyen-kyc-card__header", headerClassName, {
23099
23111
  "adyen-kyc-card__header--button": headerButton
23100
23112
  });
23113
+ const bodyClassNames = cx("adyen-kyc-card__body", bodyClassName);
23101
23114
  const tabIndex = stateful ? 0 : void 0;
23102
23115
  const role = stateful ? "button" : void 0;
23103
23116
  const onClickHandler = (e) => {
@@ -23127,7 +23140,7 @@ function Card({
23127
23140
  ] }),
23128
23141
  headerButton && headerButton
23129
23142
  ] }),
23130
- children && /* @__PURE__ */ jsx("div", { role: "region", className: "adyen-kyc-card__body", children }),
23143
+ children && /* @__PURE__ */ jsx("div", { role: "region", className: bodyClassNames, children }),
23131
23144
  warning && /* @__PURE__ */ jsx(Alert, { className: "adyen-kyc-card__warning", title: warningMessage, variant: "warning" })
23132
23145
  ]
23133
23146
  }
@@ -23161,8 +23174,9 @@ const Modal = ({ children, size = "medium", onBack, onClose }) => {
23161
23174
  "adyen-kyc-modal--with-backButton": onBack
23162
23175
  }),
23163
23176
  onClose,
23177
+ role: "dialog",
23164
23178
  children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-modal__wrapper", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-modal__main", children: [
23165
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-modal-button", children: /* @__PURE__ */ jsx(Button, { tertiary: true, "aria-label": "close", icon: "cross", onClick: onClose, shaded: true }) }),
23179
+ /* @__PURE__ */ jsx("div", { className: "adyen-kyc-modal-button", children: /* @__PURE__ */ jsx(Button, { tertiary: true, ariaLabel: "close", icon: "cross", onClick: onClose, shaded: true }) }),
23166
23180
  children
23167
23181
  ] }) })
23168
23182
  }
@@ -23234,7 +23248,7 @@ const PreferInstantVerificationMethod = ({
23234
23248
  label: hideVerificationWidget ? i18n.get("addAccountWith", {
23235
23249
  values: { providerName: iconName ? "" : provider.name }
23236
23250
  }) : void 0,
23237
- className: styles$6.preferInstantVerificationMethodInstantButton,
23251
+ className: styles$8.preferInstantVerificationMethodInstantButton,
23238
23252
  onClick: handleClickInstantButton,
23239
23253
  disabled: bankInfoValidated,
23240
23254
  loading: !hideVerificationWidget,
@@ -23242,8 +23256,8 @@ const PreferInstantVerificationMethod = ({
23242
23256
  iconPosition: "right",
23243
23257
  block: true
23244
23258
  }
23245
- ) : /* @__PURE__ */ jsx(Card, { background: "secondary", className: styles$6.preferInstantVerificationMethodCard, children: i18n.get("unfortunatelyAnInstantProvider") });
23246
- return /* @__PURE__ */ jsxs("div", { className: styles$6.preferInstantVerificationMethod, children: [
23259
+ ) : /* @__PURE__ */ jsx(Card, { background: "secondary", className: styles$8.preferInstantVerificationMethodCard, children: i18n.get("unfortunatelyAnInstantProvider") });
23260
+ return /* @__PURE__ */ jsxs("div", { className: styles$8.preferInstantVerificationMethod, children: [
23247
23261
  loadingStatus === "loading" ? /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-margin-bottom-8", children: /* @__PURE__ */ jsx(Skeleton, { height: "2.5rem" }) }) : InstantButton,
23248
23262
  /* @__PURE__ */ jsx(
23249
23263
  Button,
@@ -23281,7 +23295,7 @@ const PreferInstantVerificationMethod = ({
23281
23295
  isModalOpen ? /* @__PURE__ */ jsxs(Modal, { size: "small", onClose: () => setIsModalOpen(false), children: [
23282
23296
  /* @__PURE__ */ jsx(ModalHeader, { children: i18n.get("manuallyAddAccountQuestion") }),
23283
23297
  /* @__PURE__ */ jsx(ModalContent, { children: i18n.get("addingAndVerifiyingABankAccount") }),
23284
- /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$6.preferInstantVerificationMethodModalFooter, children: [
23298
+ /* @__PURE__ */ jsx(ModalFooter, { children: /* @__PURE__ */ jsxs("div", { className: styles$8.preferInstantVerificationMethodModalFooter, children: [
23285
23299
  /* @__PURE__ */ jsx(Button, { label: i18n.get("yesContinue"), onClick: handleClickContinue, secondary: true }),
23286
23300
  /* @__PURE__ */ jsx(Button, { onClick: () => setIsModalOpen(false), label: i18n.get("cancel") })
23287
23301
  ] }) })
@@ -23293,8 +23307,8 @@ const PayoutVerificationMethodOptionIcon = ({
23293
23307
  methodsMetadata
23294
23308
  }) => {
23295
23309
  const { i18n } = useI18nContext();
23296
- const { description, svgName } = methodsMetadata[method];
23297
- return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-radio-group-card__illustration", children: /* @__PURE__ */ jsx(Svg, { type: "image", name: svgName, title: i18n.get(description) }) });
23310
+ const { description: description2, svgName } = methodsMetadata[method];
23311
+ return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-radio-group-card__illustration", children: /* @__PURE__ */ jsx(Svg, { type: "image", name: svgName, title: i18n.get(description2) }) });
23298
23312
  };
23299
23313
  const PayoutVerificationMethodOptionFooter = ({
23300
23314
  method,
@@ -23452,7 +23466,7 @@ function PayoutVerificationMethod(props) {
23452
23466
  }
23453
23467
  }
23454
23468
  );
23455
- const description = /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-margin-bottom-12", children: canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
23469
+ const description2 = /* @__PURE__ */ jsx("div", { className: "adyen-kyc-u-margin-bottom-12", children: canChangeEntityType ? /* @__PURE__ */ jsx(AccountHolderDescriptionFragment, { legalEntityResponse }) : /* @__PURE__ */ jsxs(Typography, { children: [
23456
23470
  i18n.get("textToVerifyAccount"),
23457
23471
  " ",
23458
23472
  /* @__PURE__ */ jsx(
@@ -23465,7 +23479,7 @@ function PayoutVerificationMethod(props) {
23465
23479
  )
23466
23480
  ] }) });
23467
23481
  return /* @__PURE__ */ jsxs("form", { className: "adyen-kyc-payout-verification-method", children: [
23468
- !enableEmphasizedCredentialBankingFlow ? /* @__PURE__ */ jsx(FormHeader, { heading, descriptionComponent: description }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-payout-verification-method__header", children: [
23482
+ !enableEmphasizedCredentialBankingFlow ? /* @__PURE__ */ jsx(FormHeader, { heading, descriptionComponent: description2 }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-payout-verification-method__header", children: [
23469
23483
  /* @__PURE__ */ jsx(
23470
23484
  Svg,
23471
23485
  {
@@ -23478,7 +23492,7 @@ function PayoutVerificationMethod(props) {
23478
23492
  /* @__PURE__ */ jsx(Typography, { variant: "title-l", el: "h2", children: i18n.get("instantlyAddAndVerifyABankAccount") }),
23479
23493
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-payout-verification-method__description", children: [
23480
23494
  /* @__PURE__ */ jsx(Typography, { children: i18n.get("securelyUseYourBanksWebsite") }),
23481
- description
23495
+ description2
23482
23496
  ] })
23483
23497
  ] }),
23484
23498
  instantVerificationError && /* @__PURE__ */ jsx(
@@ -23765,7 +23779,7 @@ function PayoutDetails(props) {
23765
23779
  {
23766
23780
  className: (activeForm == null ? void 0 : activeForm.formId) !== payoutSteps.payoutAccountDetails.formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
23767
23781
  children: /* @__PURE__ */ jsx(
23768
- MemoizedPayoutAccount,
23782
+ PayoutAccount,
23769
23783
  {
23770
23784
  ...payoutAccountFormProps,
23771
23785
  heading: taskHeading,
@@ -26812,7 +26826,7 @@ const structuredListListItem = "adyen-kyc-structured-list-list-item";
26812
26826
  const adyenLayoutMd = "adyen-layout-md";
26813
26827
  const structuredListLabel = "adyen-kyc-structured-list-label";
26814
26828
  const structuredListValue = "adyen-kyc-structured-list-value";
26815
- const styles$5 = {
26829
+ const styles$7 = {
26816
26830
  "structured-list": "adyen-kyc-structured-list",
26817
26831
  structuredList,
26818
26832
  "structured-list-list-item": "adyen-kyc-structured-list-list-item",
@@ -26826,9 +26840,9 @@ const styles$5 = {
26826
26840
  };
26827
26841
  const StructuredList = ({ items }) => {
26828
26842
  const { i18n } = useI18nContext();
26829
- return /* @__PURE__ */ jsx("dl", { className: styles$5.structuredList, children: items.map((item) => /* @__PURE__ */ jsxs("div", { className: styles$5.structuredListListItem, children: [
26830
- /* @__PURE__ */ jsx("dt", { className: styles$5.structuredListLabel, children: i18n.get(item.labelKey) }),
26831
- /* @__PURE__ */ jsx("dd", { className: styles$5.structuredListValue, children: item.value })
26843
+ return /* @__PURE__ */ jsx("dl", { className: styles$7.structuredList, children: items.map((item) => /* @__PURE__ */ jsxs("div", { className: styles$7.structuredListListItem, children: [
26844
+ /* @__PURE__ */ jsx("dt", { className: styles$7.structuredListLabel, children: i18n.get(item.labelKey) }),
26845
+ /* @__PURE__ */ jsx("dd", { className: styles$7.structuredListValue, children: item.value })
26832
26846
  ] }, item.labelKey)) });
26833
26847
  };
26834
26848
  function VerifiedBusinessCard({
@@ -26902,6 +26916,7 @@ const ADDITIONAL_INFORMATION_FIELDS = [
26902
26916
  ...STOCK_EXCHANGE_MIC_FIELD,
26903
26917
  ...STOCK_ISIN_FIELD,
26904
26918
  ...STOCK_TICKER_SYMBOL_FIELD,
26919
+ ...EINVOICING_CODE_FIELD,
26905
26920
  "legalFormDescription",
26906
26921
  ...registrationAddressFields
26907
26922
  ];
@@ -26911,7 +26926,7 @@ function AdditionalInformation({
26911
26926
  placeholders,
26912
26927
  helperText,
26913
26928
  heading,
26914
- description,
26929
+ description: description2,
26915
26930
  readOnly,
26916
26931
  shouldValidate,
26917
26932
  formVerificationErrors,
@@ -27221,7 +27236,7 @@ function AdditionalInformation({
27221
27236
  return i18n.get("registeredBusinessAddressDescription");
27222
27237
  }, [datasetUtils, (_e = formData == null ? void 0 : formData.registrationAddress) == null ? void 0 : _e.country, i18n]);
27223
27238
  return /* @__PURE__ */ jsxs("form", { id: ADDITIONAL_INFORMATION_FORM_ID, className: "adyen-kyc-additional-information", children: [
27224
- /* @__PURE__ */ jsx(FormHeader, { heading, description }),
27239
+ /* @__PURE__ */ jsx(FormHeader, { heading, description: description2 }),
27225
27240
  /* @__PURE__ */ jsx(
27226
27241
  ErrorPanel,
27227
27242
  {
@@ -27911,7 +27926,7 @@ function BasicInformation({
27911
27926
  placeholders,
27912
27927
  helperText,
27913
27928
  heading,
27914
- description,
27929
+ description: description2,
27915
27930
  readOnly,
27916
27931
  shouldValidate,
27917
27932
  formVerificationErrors,
@@ -27955,7 +27970,7 @@ function BasicInformation({
27955
27970
  "EnableCountryOfGoverningLawForUKCompanies"
27956
27971
  );
27957
27972
  const formDescription = /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-header__description", children: [
27958
- description,
27973
+ description2,
27959
27974
  " ",
27960
27975
  /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/privacy-policy", external: true, children: i18n.get("basicInformationFormDescriptionLink") })
27961
27976
  ] });
@@ -28324,7 +28339,7 @@ function CompanyStructure({
28324
28339
  data,
28325
28340
  labels: labels2,
28326
28341
  heading,
28327
- description,
28342
+ description: description2,
28328
28343
  formVerificationErrors,
28329
28344
  fieldValidationErrors,
28330
28345
  requiredFields,
@@ -28394,7 +28409,7 @@ function CompanyStructure({
28394
28409
  const companyTypeRadioOptions = canChangeEntityType && accountHolder !== "aTrust" ? companyTypeOptions.filter((companyType) => !excludedTypes.includes(companyType)) : companyTypeOptions;
28395
28410
  const companyTypeExamples2 = useCompanyTypeExamples(country);
28396
28411
  return /* @__PURE__ */ jsxs("form", { children: [
28397
- /* @__PURE__ */ jsx(FormHeader, { heading, description }),
28412
+ /* @__PURE__ */ jsx(FormHeader, { heading, description: description2 }),
28398
28413
  /* @__PURE__ */ jsx(
28399
28414
  ErrorPanel,
28400
28415
  {
@@ -30522,7 +30537,7 @@ function BusinessDetailsDropin({
30522
30537
  findBusiness
30523
30538
  ]);
30524
30539
  const backClick = useCallback(() => {
30525
- if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country)) return handleBackClick == null ? void 0 : handleBackClick();
30540
+ if (!COUNTRIES_USING_COMPANY_SEARCH.includes(currentCountry)) return handleBackClick == null ? void 0 : handleBackClick();
30526
30541
  switch (activeForm.formId) {
30527
30542
  case "basicInformation": {
30528
30543
  return showBusinessSelection ? setShowBusinessSelection(false) : void 0;
@@ -30548,12 +30563,12 @@ function BusinessDetailsDropin({
30548
30563
  return handleBackClick == null ? void 0 : handleBackClick();
30549
30564
  }
30550
30565
  }, [
30551
- activeForm.formId,
30552
- country,
30566
+ currentCountry,
30553
30567
  handleBackClick,
30568
+ activeForm.formId,
30569
+ showBusinessSelection,
30554
30570
  searching,
30555
30571
  searchResults,
30556
- showBusinessSelection,
30557
30572
  verifiedBusiness
30558
30573
  ]);
30559
30574
  const proceedToManualDataEntry = useCallback(async () => {
@@ -31563,11 +31578,11 @@ const mapRootLegalEntityToTrustMember = (rootLegalEntity) => ({
31563
31578
  legalEntityId: rootLegalEntity.id,
31564
31579
  name: getLegalEntityNameBasedOnType(rootLegalEntity)
31565
31580
  });
31566
- const mapUndefinedBeneficiaryInfoToTrustMembers = (undefinedBeneficiaryInfo) => undefinedBeneficiaryInfo.map(({ reference, description }) => ({
31581
+ const mapUndefinedBeneficiaryInfoToTrustMembers = (undefinedBeneficiaryInfo) => undefinedBeneficiaryInfo.map(({ reference, description: description2 }) => ({
31567
31582
  trustMemberType: "undefinedBeneficiary",
31568
31583
  roles: [TrustMemberTypes.UNDEFINED_BENEFICIARY],
31569
31584
  reference,
31570
- description
31585
+ description: description2
31571
31586
  }));
31572
31587
  const getTrustMembers = (trustLE, rootLegalEntity, exemptSettlorLE) => {
31573
31588
  var _a;
@@ -32780,6 +32795,211 @@ function useStore(api, selector = identity) {
32780
32795
  React.useDebugValue(slice);
32781
32796
  return slice;
32782
32797
  }
32798
+ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
32799
+ const trackedConnections = /* @__PURE__ */ new Map();
32800
+ const getTrackedConnectionState = (name) => {
32801
+ const api = trackedConnections.get(name);
32802
+ if (!api) return {};
32803
+ return Object.fromEntries(
32804
+ Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])
32805
+ );
32806
+ };
32807
+ const extractConnectionInformation = (store, extensionConnector, options) => {
32808
+ if (store === void 0) {
32809
+ return {
32810
+ type: "untracked",
32811
+ connection: extensionConnector.connect(options)
32812
+ };
32813
+ }
32814
+ const existingConnection = trackedConnections.get(options.name);
32815
+ if (existingConnection) {
32816
+ return { type: "tracked", store, ...existingConnection };
32817
+ }
32818
+ const newConnection = {
32819
+ connection: extensionConnector.connect(options),
32820
+ stores: {}
32821
+ };
32822
+ trackedConnections.set(options.name, newConnection);
32823
+ return { type: "tracked", store, ...newConnection };
32824
+ };
32825
+ const devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {
32826
+ const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;
32827
+ let extensionConnector;
32828
+ try {
32829
+ extensionConnector = (enabled != null ? enabled : (__vite_import_meta_env__ ? "production" : void 0) !== "production") && window.__REDUX_DEVTOOLS_EXTENSION__;
32830
+ } catch (e) {
32831
+ }
32832
+ if (!extensionConnector) {
32833
+ return fn(set, get, api);
32834
+ }
32835
+ const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);
32836
+ let isRecording = true;
32837
+ api.setState = (state, replace, nameOrAction) => {
32838
+ const r = set(state, replace);
32839
+ if (!isRecording) return r;
32840
+ const action = nameOrAction === void 0 ? { type: anonymousActionType || "anonymous" } : typeof nameOrAction === "string" ? { type: nameOrAction } : nameOrAction;
32841
+ if (store === void 0) {
32842
+ connection == null ? void 0 : connection.send(action, get());
32843
+ return r;
32844
+ }
32845
+ connection == null ? void 0 : connection.send(
32846
+ {
32847
+ ...action,
32848
+ type: `${store}/${action.type}`
32849
+ },
32850
+ {
32851
+ ...getTrackedConnectionState(options.name),
32852
+ [store]: api.getState()
32853
+ }
32854
+ );
32855
+ return r;
32856
+ };
32857
+ const setStateFromDevtools = (...a) => {
32858
+ const originalIsRecording = isRecording;
32859
+ isRecording = false;
32860
+ set(...a);
32861
+ isRecording = originalIsRecording;
32862
+ };
32863
+ const initialState = fn(api.setState, get, api);
32864
+ if (connectionInformation.type === "untracked") {
32865
+ connection == null ? void 0 : connection.init(initialState);
32866
+ } else {
32867
+ connectionInformation.stores[connectionInformation.store] = api;
32868
+ connection == null ? void 0 : connection.init(
32869
+ Object.fromEntries(
32870
+ Object.entries(connectionInformation.stores).map(([key, store2]) => [
32871
+ key,
32872
+ key === connectionInformation.store ? initialState : store2.getState()
32873
+ ])
32874
+ )
32875
+ );
32876
+ }
32877
+ if (api.dispatchFromDevtools && typeof api.dispatch === "function") {
32878
+ let didWarnAboutReservedActionType = false;
32879
+ const originalDispatch = api.dispatch;
32880
+ api.dispatch = (...a) => {
32881
+ if ((__vite_import_meta_env__ ? "production" : void 0) !== "production" && a[0].type === "__setState" && !didWarnAboutReservedActionType) {
32882
+ console.warn(
32883
+ '[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'
32884
+ );
32885
+ didWarnAboutReservedActionType = true;
32886
+ }
32887
+ originalDispatch(...a);
32888
+ };
32889
+ }
32890
+ connection.subscribe((message) => {
32891
+ var _a;
32892
+ switch (message.type) {
32893
+ case "ACTION":
32894
+ if (typeof message.payload !== "string") {
32895
+ console.error(
32896
+ "[zustand devtools middleware] Unsupported action format"
32897
+ );
32898
+ return;
32899
+ }
32900
+ return parseJsonThen(
32901
+ message.payload,
32902
+ (action) => {
32903
+ if (action.type === "__setState") {
32904
+ if (store === void 0) {
32905
+ setStateFromDevtools(action.state);
32906
+ return;
32907
+ }
32908
+ if (Object.keys(action.state).length !== 1) {
32909
+ console.error(
32910
+ `
32911
+ [zustand devtools middleware] Unsupported __setState action format.
32912
+ When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
32913
+ and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
32914
+ `
32915
+ );
32916
+ }
32917
+ const stateFromDevtools = action.state[store];
32918
+ if (stateFromDevtools === void 0 || stateFromDevtools === null) {
32919
+ return;
32920
+ }
32921
+ if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {
32922
+ setStateFromDevtools(stateFromDevtools);
32923
+ }
32924
+ return;
32925
+ }
32926
+ if (!api.dispatchFromDevtools) return;
32927
+ if (typeof api.dispatch !== "function") return;
32928
+ api.dispatch(action);
32929
+ }
32930
+ );
32931
+ case "DISPATCH":
32932
+ switch (message.payload.type) {
32933
+ case "RESET":
32934
+ setStateFromDevtools(initialState);
32935
+ if (store === void 0) {
32936
+ return connection == null ? void 0 : connection.init(api.getState());
32937
+ }
32938
+ return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
32939
+ case "COMMIT":
32940
+ if (store === void 0) {
32941
+ connection == null ? void 0 : connection.init(api.getState());
32942
+ return;
32943
+ }
32944
+ return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
32945
+ case "ROLLBACK":
32946
+ return parseJsonThen(message.state, (state) => {
32947
+ if (store === void 0) {
32948
+ setStateFromDevtools(state);
32949
+ connection == null ? void 0 : connection.init(api.getState());
32950
+ return;
32951
+ }
32952
+ setStateFromDevtools(state[store]);
32953
+ connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));
32954
+ });
32955
+ case "JUMP_TO_STATE":
32956
+ case "JUMP_TO_ACTION":
32957
+ return parseJsonThen(message.state, (state) => {
32958
+ if (store === void 0) {
32959
+ setStateFromDevtools(state);
32960
+ return;
32961
+ }
32962
+ if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {
32963
+ setStateFromDevtools(state[store]);
32964
+ }
32965
+ });
32966
+ case "IMPORT_STATE": {
32967
+ const { nextLiftedState } = message.payload;
32968
+ const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;
32969
+ if (!lastComputedState) return;
32970
+ if (store === void 0) {
32971
+ setStateFromDevtools(lastComputedState);
32972
+ } else {
32973
+ setStateFromDevtools(lastComputedState[store]);
32974
+ }
32975
+ connection == null ? void 0 : connection.send(
32976
+ null,
32977
+ // FIXME no-any
32978
+ nextLiftedState
32979
+ );
32980
+ return;
32981
+ }
32982
+ case "PAUSE_RECORDING":
32983
+ return isRecording = !isRecording;
32984
+ }
32985
+ return;
32986
+ }
32987
+ });
32988
+ return initialState;
32989
+ };
32990
+ const devtools = devtoolsImpl;
32991
+ const parseJsonThen = (stringified, f) => {
32992
+ let parsed;
32993
+ try {
32994
+ parsed = JSON.parse(stringified);
32995
+ } catch (e) {
32996
+ console.error(
32997
+ "[zustand devtools middleware] Could not parse the received json",
32998
+ e
32999
+ );
33000
+ }
33001
+ if (parsed !== void 0) f(parsed);
33002
+ };
32783
33003
  var dist = {};
32784
33004
  (function(exports) {
32785
33005
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
@@ -33114,17 +33334,23 @@ const mapReceivedTaskType = (taskType) => {
33114
33334
  return taskType;
33115
33335
  }
33116
33336
  };
33117
- const logger$s = createLogger("taskStore");
33337
+ const logger$s = createLogger("globalStore");
33118
33338
  const computed = dist.createComputed(
33119
33339
  ({
33120
33340
  taskTypes,
33121
33341
  rootLegalEntity,
33122
33342
  accountHolder,
33123
- capabilityProblems,
33124
- legalRepresentative,
33125
- transferInstruments,
33126
- trustMembers
33343
+ trustMembers,
33344
+ isExperimentEnabled
33127
33345
  }) => {
33346
+ const rootLegalEntityCountry = getLegalEntityCountry(rootLegalEntity);
33347
+ const capabilityProblems = getCapabilityProblems(
33348
+ rootLegalEntity,
33349
+ rootLegalEntityCountry,
33350
+ isExperimentEnabled
33351
+ );
33352
+ const legalRepresentative = getLegalRepresentative(rootLegalEntity);
33353
+ const transferInstruments = rootLegalEntity.transferInstruments ?? [];
33128
33354
  const tasks = determineTaskIdentifiers({
33129
33355
  taskTypes,
33130
33356
  rootLegalEntity,
@@ -33152,45 +33378,46 @@ const computed = dist.createComputed(
33152
33378
  return acc;
33153
33379
  }, {});
33154
33380
  return {
33381
+ capabilityProblems,
33382
+ transferInstruments,
33383
+ legalRepresentative,
33384
+ rootLegalEntityCountry,
33155
33385
  tasks,
33156
33386
  taskStatuses
33157
33387
  };
33158
33388
  }
33159
33389
  );
33160
- const createTaskStore = () => createStore(
33161
- computed((set) => ({
33162
- // Defaults
33163
- taskTypes: [],
33164
- rootLegalEntity: void 0,
33165
- accountHolder: void 0,
33166
- capabilityProblems: void 0,
33167
- legalRepresentative: void 0,
33168
- trustMembers: [],
33169
- transferInstruments: [],
33170
- setTaskTypes: (taskTypes) => set({ taskTypes }),
33171
- setRootLegalEntity: (rootLegalEntity) => set({ rootLegalEntity }),
33172
- setAccountHolder: (accountHolder) => set({ accountHolder }),
33173
- setCapabilityProblems: (capabilityProblems) => set({ capabilityProblems }),
33174
- setLegalRepresentative: (legalRepresentative) => set({ legalRepresentative }),
33175
- setTrustMembers: (trustMembers) => set({ trustMembers }),
33176
- setTransferInstruments: (transferInstruments) => set({ transferInstruments }),
33177
- updateRootLegalEntityAndAssociated: (inputs) => set(inputs)
33178
- }))
33390
+ const createGlobalStore = ({
33391
+ rootLegalEntity,
33392
+ isExperimentEnabled
33393
+ }) => createStore(
33394
+ computed(
33395
+ devtools(
33396
+ (set) => ({
33397
+ // Defaults
33398
+ rootLegalEntity,
33399
+ taskTypes: [],
33400
+ accountHolder: void 0,
33401
+ trustMembers: [],
33402
+ setRootLegalEntity: (rootLegalEntity2) => set({ rootLegalEntity: rootLegalEntity2 }),
33403
+ setTaskTypes: (taskTypes) => set({ taskTypes }),
33404
+ setAccountHolder: (accountHolder) => set({ accountHolder }),
33405
+ setTrustMembers: (trustMembers) => set({ trustMembers }),
33406
+ isExperimentEnabled
33407
+ })
33408
+ )
33409
+ )
33179
33410
  );
33180
- const TaskContext = createContext(null);
33181
- function useTaskStore(selector) {
33182
- const store = useContext(TaskContext);
33411
+ const StoreContext = createContext(null);
33412
+ function useGlobalStore(selector) {
33413
+ const store = useContext(StoreContext);
33183
33414
  if (!store) {
33184
- throw new Error("`useTaskStore()` must be called from within a `TaskContext.Provider`");
33415
+ throw new Error("`useGlobalStore()` must be called from within a `StoreContext.Provider`");
33185
33416
  }
33186
- return useStore(
33187
- store,
33188
- selector
33189
- /* to avoid eslint error for "calling a hook conditionally" */
33190
- );
33417
+ return useStore(store, selector);
33191
33418
  }
33192
- const useTasks = () => useTaskStore((state) => state.tasks);
33193
- const useTaskStatuses = () => useTaskStore((state) => state.taskStatuses);
33419
+ const useTasks = () => useGlobalStore((state) => state.tasks);
33420
+ const useTaskStatuses = () => useGlobalStore((state) => state.taskStatuses);
33194
33421
  const useGetTaskStatus = () => {
33195
33422
  const taskStatuses = useTaskStatuses();
33196
33423
  return useCallback(
@@ -36071,11 +36298,11 @@ function PayoutDetailsDropin({
36071
36298
  );
36072
36299
  }
36073
36300
  const outlinedIcon = "adyen-kyc-outlined-icon";
36074
- const styles$4 = {
36301
+ const styles$6 = {
36075
36302
  "outlined-icon": "adyen-kyc-outlined-icon",
36076
36303
  outlinedIcon
36077
36304
  };
36078
- const OutlinedIcon = ({ name }) => /* @__PURE__ */ jsx("div", { className: styles$4.outlinedIcon, children: /* @__PURE__ */ jsx(Icon, { name }) });
36305
+ const OutlinedIcon = ({ name }) => /* @__PURE__ */ jsx("div", { className: styles$6.outlinedIcon, children: /* @__PURE__ */ jsx(Icon, { name }) });
36079
36306
  const Splashscreen = ({ title, subtitle, icon, buttonText, onClick }) => {
36080
36307
  const { i18n } = useI18nContext();
36081
36308
  return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-splashscreen", children: [
@@ -36099,10 +36326,6 @@ function ContractViewer({ contract, className, onExpandSection }) {
36099
36326
  }, [contract, adyenDocumentViewer, onExpandSection]);
36100
36327
  return /* @__PURE__ */ jsx("div", { ref: container, className: classNames });
36101
36328
  }
36102
- const EmbeddedActionBar = ({ left, right }) => /* @__PURE__ */ jsxs("footer", { className: "adyen-kyc-embedded-action-bar", children: [
36103
- /* @__PURE__ */ jsx("section", { children: left }),
36104
- /* @__PURE__ */ jsx("section", { className: "adyen-kyc-embedded-action-bar-right", children: right })
36105
- ] });
36106
36329
  const pciValidationRules = {
36107
36330
  signer: {
36108
36331
  modes: ["blur"],
@@ -36123,7 +36346,6 @@ function PciDropin({
36123
36346
  handleSign,
36124
36347
  taskType = TaskTypes.PCI_DSS,
36125
36348
  trackingConfig,
36126
- asEmbedded = false,
36127
36349
  asModal = false,
36128
36350
  needsSigning = true,
36129
36351
  // TODO: move up to upcoming layout
@@ -36208,7 +36430,7 @@ function PciDropin({
36208
36430
  userEvents.addEvent("Started PCI task", {
36209
36431
  segmentation: { ...baseTrackingPayload }
36210
36432
  });
36211
- }, []);
36433
+ }, [baseTrackingPayload]);
36212
36434
  const acceptPciLabel = /* @__PURE__ */ jsxs(Fragment, { children: [
36213
36435
  /* @__PURE__ */ jsx("span", { children: i18n.get("byClickingSignIAcknowledgeAndAgree") }),
36214
36436
  /* @__PURE__ */ jsxs("ul", { children: [
@@ -36216,69 +36438,65 @@ function PciDropin({
36216
36438
  /* @__PURE__ */ jsx("li", { children: i18n.get("basedOnTheAboveSignatory") })
36217
36439
  ] })
36218
36440
  ] });
36219
- const content = /* @__PURE__ */ jsxs(LoaderWrapper, { status: loadingStatus, formOpacityWhenLoading: 0.3, showSpinner: false, children: [
36220
- hasExpired && /* @__PURE__ */ jsx(ExpiredBanner, {}),
36221
- /* @__PURE__ */ jsx(ContractViewer, { contract: pciQuestionnaire, onExpandSection: handleExpandSection }),
36222
- /* @__PURE__ */ jsx(
36223
- Field,
36224
- {
36225
- name: "signer",
36226
- label: i18n.get("signer"),
36227
- classNameModifiers: ["col-50"],
36228
- className: "adyen-kyc-u-margin-y-32",
36229
- errorMessage: i18n.get((_c = errors.signer) == null ? void 0 : _c.errorMessage),
36230
- isValid: valid.signer,
36231
- children: (childProps) => /* @__PURE__ */ jsx(
36232
- Select,
36233
- {
36234
- ...childProps,
36235
- onChange: handleChangeFor("signer", "blur"),
36236
- name: "signer",
36237
- placeholder: i18n.get("selectSigner"),
36238
- selected: data.signer,
36239
- items: signers
36240
- }
36241
- )
36242
- }
36243
- ),
36244
- /* @__PURE__ */ jsx(
36245
- Field,
36441
+ return /* @__PURE__ */ jsxs(MaybeModal, { inline: !asModal, onClose: handleCloseClick, children: [
36442
+ /* @__PURE__ */ jsx(ModalContent, { children: !needsSigning ? /* @__PURE__ */ jsx(
36443
+ Splashscreen,
36246
36444
  {
36247
- name: "acceptPci",
36248
- errorMessage: i18n.get((_d = errors.acceptPci) == null ? void 0 : _d.errorMessage),
36249
- isValid: valid.acceptPci,
36250
- showErrorIconBottom: true,
36251
- children: (childProps) => /* @__PURE__ */ jsx(
36252
- Checkbox,
36253
- {
36254
- ...childProps,
36255
- label: acceptPciLabel,
36256
- checked: data.acceptPci ?? false,
36257
- name: "acceptPci",
36258
- onChange: handleChangeFor("acceptPci")
36259
- }
36260
- )
36445
+ icon: "check",
36446
+ title: i18n.get("serviceAgreementSignedAndDated"),
36447
+ onClick: handleCloseClick
36261
36448
  }
36262
- )
36449
+ ) : /* @__PURE__ */ jsxs(LoaderWrapper, { status: loadingStatus, formOpacityWhenLoading: 0.3, showSpinner: false, children: [
36450
+ hasExpired && /* @__PURE__ */ jsx(ExpiredBanner, {}),
36451
+ /* @__PURE__ */ jsx(ContractViewer, { contract: pciQuestionnaire, onExpandSection: handleExpandSection }),
36452
+ /* @__PURE__ */ jsx(
36453
+ Field,
36454
+ {
36455
+ name: "signer",
36456
+ label: i18n.get("signer"),
36457
+ classNameModifiers: ["col-50"],
36458
+ className: "adyen-kyc-u-margin-y-32",
36459
+ errorMessage: i18n.get((_c = errors.signer) == null ? void 0 : _c.errorMessage),
36460
+ isValid: valid.signer,
36461
+ children: (childProps) => /* @__PURE__ */ jsx(
36462
+ Select,
36463
+ {
36464
+ ...childProps,
36465
+ onChange: handleChangeFor("signer", "blur"),
36466
+ name: "signer",
36467
+ placeholder: i18n.get("selectSigner"),
36468
+ selected: data.signer,
36469
+ items: signers
36470
+ }
36471
+ )
36472
+ }
36473
+ ),
36474
+ /* @__PURE__ */ jsx(
36475
+ Field,
36476
+ {
36477
+ name: "acceptPci",
36478
+ errorMessage: i18n.get((_d = errors.acceptPci) == null ? void 0 : _d.errorMessage),
36479
+ isValid: valid.acceptPci,
36480
+ showErrorIconBottom: true,
36481
+ children: (childProps) => /* @__PURE__ */ jsx(
36482
+ Checkbox,
36483
+ {
36484
+ ...childProps,
36485
+ label: acceptPciLabel,
36486
+ checked: data.acceptPci ?? false,
36487
+ name: "acceptPci",
36488
+ onChange: handleChangeFor("acceptPci")
36489
+ }
36490
+ )
36491
+ }
36492
+ )
36493
+ ] }) }),
36494
+ /* @__PURE__ */ jsxs(ModalFooter, { children: [
36495
+ /* @__PURE__ */ jsx("div", { style: { flex: "1" } }),
36496
+ /* @__PURE__ */ jsx(Button, { label: i18n.get("finishLater"), secondary: true, icon: "save", onClick: goHome }),
36497
+ /* @__PURE__ */ jsx(Button, { label: i18n.get("sign"), onClick: handleSignClick })
36498
+ ] })
36263
36499
  ] });
36264
- const footer = !asEmbedded ? /* @__PURE__ */ jsx(ActionBar, { onHome: goHome, onNext: handleSignClick, nextButtonLabel: i18n.get("sign") }) : /* @__PURE__ */ jsx(EmbeddedActionBar, { right: /* @__PURE__ */ jsx(Button, { label: i18n.get("sign"), onClick: handleSignClick }) });
36265
- const endScreen = !needsSigning && /* @__PURE__ */ jsx(
36266
- Splashscreen,
36267
- {
36268
- icon: "check",
36269
- title: i18n.get("serviceAgreementSignedAndDated"),
36270
- onClick: handleCloseClick
36271
- }
36272
- );
36273
- return /* @__PURE__ */ jsx(
36274
- DropinLayout,
36275
- {
36276
- showAsModal: asModal,
36277
- onClose: handleCloseClick,
36278
- content: endScreen || content,
36279
- footer
36280
- }
36281
- );
36282
36500
  }
36283
36501
  const convertExistingSettlorExemptionReasons = (existingReasons) => {
36284
36502
  if (!existingReasons || !existingReasons.length) return ["noneOfTheAbove"];
@@ -36438,7 +36656,7 @@ const roleAndTypeValidationRules = {
36438
36656
  },
36439
36657
  descriptionUndefinedBeneficiary: {
36440
36658
  modes: ["blur"],
36441
- validate: (description) => !isEmpty$1(description),
36659
+ validate: (description2) => !isEmpty$1(description2),
36442
36660
  errorMessage: "fieldIsRequired"
36443
36661
  },
36444
36662
  settlorExemptionReason: {
@@ -36771,12 +36989,12 @@ const TrustRoleAndEntityType = (props) => {
36771
36989
  ] });
36772
36990
  };
36773
36991
  const settlorExemptionReasonsList = "adyen-kyc-settlor-exemption-reasons-list";
36774
- const styles$3 = {
36992
+ const styles$5 = {
36775
36993
  "settlor-exemption-reasons-list": "adyen-kyc-settlor-exemption-reasons-list",
36776
36994
  settlorExemptionReasonsList
36777
36995
  };
36778
36996
  const formatRolesForSummary = (roles, i18n) => roles.map((role) => i18n.get(getRoleName(role))).join(", ");
36779
- const formatSettlorExemptionReasonsForSummary = (reasons, i18n) => /* @__PURE__ */ jsx("ul", { className: styles$3.settlorExemptionReasonsList, children: reasons.map((reason) => /* @__PURE__ */ jsx("li", { children: i18n.get(reason) }, reason)) });
36997
+ const formatSettlorExemptionReasonsForSummary = (reasons, i18n) => /* @__PURE__ */ jsx("ul", { className: styles$5.settlorExemptionReasonsList, children: reasons.map((reason) => /* @__PURE__ */ jsx("li", { children: i18n.get(reason) }, reason)) });
36780
36998
  const formatRoleAndEntityTypeSummary = (data, i18n, isOrganizationSettlorWithExemptionEnabled) => {
36781
36999
  var _a, _b;
36782
37000
  const { trustMemberType, roles } = data;
@@ -37048,6 +37266,10 @@ function RoleAndTypeDropin({
37048
37266
  ] });
37049
37267
  return /* @__PURE__ */ jsx(DropinLayout, { content });
37050
37268
  }
37269
+ const EmbeddedActionBar = ({ left, right }) => /* @__PURE__ */ jsxs("footer", { className: "adyen-kyc-embedded-action-bar", children: [
37270
+ /* @__PURE__ */ jsx("section", { children: left }),
37271
+ /* @__PURE__ */ jsx("section", { className: "adyen-kyc-embedded-action-bar-right", children: right })
37272
+ ] });
37051
37273
  const serviceAgreementValidationRules = {
37052
37274
  signer: { modes: ["blur"], validate: (signer) => !!signer, errorMessage: "fieldIsRequired" },
37053
37275
  acceptServiceAgreement: {
@@ -38369,7 +38591,7 @@ const sourceOfFundsTellUsMoreValidations = {
38369
38591
  ],
38370
38592
  description: {
38371
38593
  modes: ["blur"],
38372
- validate: (description) => !isEmpty$1(description),
38594
+ validate: (description2) => !isEmpty$1(description2),
38373
38595
  errorMessage: "fieldIsRequired"
38374
38596
  }
38375
38597
  };
@@ -38583,7 +38805,7 @@ function SourceOfFunds(props) {
38583
38805
  const { i18n } = useI18nContext();
38584
38806
  const { activeForm } = props;
38585
38807
  const formWrapperClasses = (formId) => (activeForm == null ? void 0 : activeForm.formId) !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
38586
- const renderActiveForm = () => /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
38808
+ return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-wrapper", children: [
38587
38809
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses("sourceOfFundsType"), children: /* @__PURE__ */ jsx(
38588
38810
  SourceOfFundsType,
38589
38811
  {
@@ -38598,8 +38820,224 @@ function SourceOfFunds(props) {
38598
38820
  ) }),
38599
38821
  /* @__PURE__ */ jsx("div", { className: formWrapperClasses("companySourceOfFunds"), children: /* @__PURE__ */ jsx("div", { children: i18n.get("uploadADocument") }) })
38600
38822
  ] });
38601
- return /* @__PURE__ */ jsx("div", { children: renderActiveForm() });
38602
38823
  }
38824
+ const description = "adyen-kyc-description";
38825
+ const descriptionSectionField = "adyen-kyc-description-section-field";
38826
+ const adyenLayoutXsOnly = "adyen-layout-xs-only";
38827
+ const descriptionSectionLabel = "adyen-kyc-description-section-label";
38828
+ const descriptionSectionData = "adyen-kyc-description-section-data";
38829
+ const styles$4 = {
38830
+ description,
38831
+ "description-section-field": "adyen-kyc-description-section-field",
38832
+ descriptionSectionField,
38833
+ "adyen-layout-xs-only": "adyen-layout-xs-only",
38834
+ adyenLayoutXsOnly,
38835
+ "description-section-label": "adyen-kyc-description-section-label",
38836
+ descriptionSectionLabel,
38837
+ "description-section-data": "adyen-kyc-description-section-data",
38838
+ descriptionSectionData
38839
+ };
38840
+ const Description = ({ className, list }) => {
38841
+ const descriptionClassNames = cx(styles$4.description, className);
38842
+ return /* @__PURE__ */ jsx("dl", { className: descriptionClassNames, children: list.map(({ term, details }, index) => /* @__PURE__ */ jsxs("div", { className: styles$4.descriptionSectionField, children: [
38843
+ /* @__PURE__ */ jsx("dt", { className: styles$4.descriptionSectionLabel, children: term }),
38844
+ /* @__PURE__ */ jsx("dd", { className: styles$4.descriptionSectionData, children: details })
38845
+ ] }, index)) });
38846
+ };
38847
+ const sourceOfFunds = "adyen-kyc-source-of-funds";
38848
+ const sourceOfFundsGettingStarted = "adyen-kyc-source-of-funds-getting-started";
38849
+ const sourceOfFundsGettingStartedIcon = "adyen-kyc-source-of-funds-getting-started-icon";
38850
+ const sourceOfFundsGettingStartedHeading = "adyen-kyc-source-of-funds-getting-started-heading";
38851
+ const sourceOfFundsGettingStartedBody = "adyen-kyc-source-of-funds-getting-started-body";
38852
+ const sourceOfFundsGettingStartedHelpHeader = "adyen-kyc-source-of-funds-getting-started-help-header";
38853
+ const sourceOfFundsGettingStartedHelpBody = "adyen-kyc-source-of-funds-getting-started-help-body";
38854
+ const sourceOfFundsGettingStartedCards = "adyen-kyc-source-of-funds-getting-started-cards";
38855
+ const sourceOfFundsGettingStartedCardsCard = "adyen-kyc-source-of-funds-getting-started-cards-card";
38856
+ const sourceOfFundsGettingStartedCardsCardHeader = "adyen-kyc-source-of-funds-getting-started-cards-card-header";
38857
+ const sourceOfFundsGettingStartedCardsCardBody = "adyen-kyc-source-of-funds-getting-started-cards-card-body";
38858
+ const sourceOfFundsGettingStartedCardsCardDescription = "adyen-kyc-source-of-funds-getting-started-cards-card-description";
38859
+ const sourceOfFundsGettingStartedActions = "adyen-kyc-source-of-funds-getting-started-actions";
38860
+ const sourceOfFundsGettingStartedHelpButton = "adyen-kyc-source-of-funds-getting-started-help-button";
38861
+ const sourceOfFundsGettingStartedPrimaryButton = "adyen-kyc-source-of-funds-getting-started-primary-button";
38862
+ const styles$3 = {
38863
+ "source-of-funds": "adyen-kyc-source-of-funds",
38864
+ sourceOfFunds,
38865
+ "source-of-funds-getting-started": "adyen-kyc-source-of-funds-getting-started",
38866
+ sourceOfFundsGettingStarted,
38867
+ "source-of-funds-getting-started-icon": "adyen-kyc-source-of-funds-getting-started-icon",
38868
+ sourceOfFundsGettingStartedIcon,
38869
+ "source-of-funds-getting-started-heading": "adyen-kyc-source-of-funds-getting-started-heading",
38870
+ sourceOfFundsGettingStartedHeading,
38871
+ "source-of-funds-getting-started-body": "adyen-kyc-source-of-funds-getting-started-body",
38872
+ sourceOfFundsGettingStartedBody,
38873
+ "source-of-funds-getting-started-help-header": "adyen-kyc-source-of-funds-getting-started-help-header",
38874
+ sourceOfFundsGettingStartedHelpHeader,
38875
+ "source-of-funds-getting-started-help-body": "adyen-kyc-source-of-funds-getting-started-help-body",
38876
+ sourceOfFundsGettingStartedHelpBody,
38877
+ "source-of-funds-getting-started-cards": "adyen-kyc-source-of-funds-getting-started-cards",
38878
+ sourceOfFundsGettingStartedCards,
38879
+ "source-of-funds-getting-started-cards-card": "adyen-kyc-source-of-funds-getting-started-cards-card",
38880
+ sourceOfFundsGettingStartedCardsCard,
38881
+ "source-of-funds-getting-started-cards-card-header": "adyen-kyc-source-of-funds-getting-started-cards-card-header",
38882
+ sourceOfFundsGettingStartedCardsCardHeader,
38883
+ "source-of-funds-getting-started-cards-card-body": "adyen-kyc-source-of-funds-getting-started-cards-card-body",
38884
+ sourceOfFundsGettingStartedCardsCardBody,
38885
+ "source-of-funds-getting-started-cards-card-description": "adyen-kyc-source-of-funds-getting-started-cards-card-description",
38886
+ sourceOfFundsGettingStartedCardsCardDescription,
38887
+ "source-of-funds-getting-started-actions": "adyen-kyc-source-of-funds-getting-started-actions",
38888
+ sourceOfFundsGettingStartedActions,
38889
+ "source-of-funds-getting-started-help-button": "adyen-kyc-source-of-funds-getting-started-help-button",
38890
+ sourceOfFundsGettingStartedHelpButton,
38891
+ "source-of-funds-getting-started-primary-button": "adyen-kyc-source-of-funds-getting-started-primary-button",
38892
+ sourceOfFundsGettingStartedPrimaryButton
38893
+ };
38894
+ const SourceOfFundsGettingStarted = ({
38895
+ handleGettingStartedClick,
38896
+ handleCancelClick,
38897
+ handleHelpClick,
38898
+ handleSourceOfFundsClick,
38899
+ businessLines
38900
+ }) => {
38901
+ var _a;
38902
+ const { i18n } = useI18nContext();
38903
+ const hasSourceOfFunds = (businessLines == null ? void 0 : businessLines.length) > 0 && !isEmpty((_a = businessLines[0]) == null ? void 0 : _a.sourceOfFunds);
38904
+ const mapBusinessLines = useCallback(
38905
+ (lines) => lines.map((line) => {
38906
+ var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j;
38907
+ const mappedSourceOfFunds = [
38908
+ { term: "Source of Funds Type", details: (_a2 = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _a2.type },
38909
+ {
38910
+ term: "Adyen Processed Funds",
38911
+ details: (_c = (_b = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _b.adyenProcessedFunds) == null ? void 0 : _c.toString()
38912
+ },
38913
+ {
38914
+ term: "Amount",
38915
+ details: `${(_e = (_d = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _d.amount) == null ? void 0 : _e.value} ${(_g = (_f = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _f.amount) == null ? void 0 : _g.currency}`
38916
+ },
38917
+ { term: "Date of Source Event", details: (_h = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _h.dateOfSourceEvent },
38918
+ { term: "Website", details: (_i = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _i.website }
38919
+ ];
38920
+ const editOrStart = (_j = line == null ? void 0 : line.sourceOfFunds) == null ? void 0 : _j.type;
38921
+ const SoF = mapSourceOfFundToSourceOfFundsSchema(line);
38922
+ return /* @__PURE__ */ jsx(
38923
+ Card,
38924
+ {
38925
+ className: styles$3.sourceOfFundsGettingStartedCardsCard,
38926
+ headerClassName: styles$3.sourceOfFundsGettingStartedCardsCardHeader,
38927
+ bodyClassName: styles$3.sourceOfFundsGettingStartedCardsCardBody,
38928
+ title: line == null ? void 0 : line.service,
38929
+ stateful: true,
38930
+ onClick: () => handleSourceOfFundsClick(SoF),
38931
+ headerButton: /* @__PURE__ */ jsx(
38932
+ Button,
38933
+ {
38934
+ secondary: !!editOrStart,
38935
+ testId: "source-of-funds-getting-card-secondary-button",
38936
+ label: editOrStart ? i18n.get("update") : i18n.get("start"),
38937
+ onClick: () => handleSourceOfFundsClick(SoF)
38938
+ }
38939
+ ),
38940
+ children: editOrStart && /* @__PURE__ */ jsx(
38941
+ Description,
38942
+ {
38943
+ className: styles$3.sourceOfFundsGettingStartedCardsCardDescription,
38944
+ list: mappedSourceOfFunds
38945
+ }
38946
+ )
38947
+ },
38948
+ line.id
38949
+ );
38950
+ }),
38951
+ [handleSourceOfFundsClick, i18n]
38952
+ );
38953
+ return /* @__PURE__ */ jsxs(
38954
+ "div",
38955
+ {
38956
+ className: styles$3.sourceOfFundsGettingStarted,
38957
+ "data-testid": "source-of-funds-getting-started",
38958
+ children: [
38959
+ !hasSourceOfFunds && /* @__PURE__ */ jsx(
38960
+ Svg,
38961
+ {
38962
+ type: "image",
38963
+ testId: "source-of-funds-getting-started-icon",
38964
+ name: "source-of-funds",
38965
+ className: styles$3.sourceOfFundsGettingStartedIcon
38966
+ }
38967
+ ),
38968
+ /* @__PURE__ */ jsx(Typography, { className: styles$3.sourceOfFundsGettingStartedHeading, el: "h2", variant: "title-l", children: i18n.get("gettingStartedHeading") }),
38969
+ /* @__PURE__ */ jsx("div", { className: styles$3.sourceOfFundsGettingStartedBody, children: /* @__PURE__ */ jsx(Typography, { children: i18n.get("gettingStartedBody") }) }),
38970
+ hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
38971
+ /* @__PURE__ */ jsx("div", { className: styles$3.sourceOfFundsGettingStartedCards, children: mapBusinessLines(businessLines) }),
38972
+ handleCancelClick && /* @__PURE__ */ jsx(
38973
+ Button,
38974
+ {
38975
+ tertiary: true,
38976
+ block: true,
38977
+ large: true,
38978
+ testId: "source-of-funds-getting-return-button",
38979
+ className: styles$3.sourceOfFundsGettingStartedCancelButton,
38980
+ onClick: handleCancelClick,
38981
+ label: i18n.get("returnToTaskList")
38982
+ }
38983
+ )
38984
+ ] }),
38985
+ !hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment, { children: [
38986
+ handleHelpClick && /* @__PURE__ */ jsx(
38987
+ Button,
38988
+ {
38989
+ tertiary: true,
38990
+ block: true,
38991
+ className: styles$3.sourceOfFundsGettingStartedHelpButton,
38992
+ onClick: handleHelpClick,
38993
+ testId: "source-of-funds-getting-help-button",
38994
+ label: i18n.get("gettingStartedHelp")
38995
+ }
38996
+ ),
38997
+ /* @__PURE__ */ jsxs("div", { className: styles$3.sourceOfFundsGettingStartedActions, children: [
38998
+ /* @__PURE__ */ jsx(
38999
+ Button,
39000
+ {
39001
+ large: true,
39002
+ className: styles$3.sourceOfFundsGettingStartedPrimaryButton,
39003
+ label: i18n.get("gettingStarted"),
39004
+ block: true,
39005
+ testId: "source-of-funds-getting-primary-button",
39006
+ onClick: handleGettingStartedClick
39007
+ }
39008
+ ),
39009
+ handleCancelClick && /* @__PURE__ */ jsx(
39010
+ Button,
39011
+ {
39012
+ tertiary: true,
39013
+ block: true,
39014
+ large: true,
39015
+ testId: "source-of-funds-getting-cancel-button",
39016
+ onClick: handleCancelClick,
39017
+ label: i18n.get("cancel")
39018
+ }
39019
+ )
39020
+ ] })
39021
+ ] })
39022
+ ]
39023
+ }
39024
+ );
39025
+ };
39026
+ const SourceOfFundsHelpModal = ({ handleModalClose }) => {
39027
+ const { i18n } = useI18nContext();
39028
+ return /* @__PURE__ */ jsxs(Modal, { onClose: handleModalClose, children: [
39029
+ /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsx(
39030
+ Typography,
39031
+ {
39032
+ variant: "title-l",
39033
+ el: "h3",
39034
+ className: styles$3.sourceOfFundsGettingStartedHelpHeader,
39035
+ children: i18n.get("gettingStartedHelpModalTitle")
39036
+ }
39037
+ ) }),
39038
+ /* @__PURE__ */ jsx(ModalContent, { children: /* @__PURE__ */ jsx(Typography, { className: styles$3.sourceOfFundsGettingStartedHelpBody, children: i18n.get("gettingStartedHelpModalDescription") }) })
39039
+ ] });
39040
+ };
38603
39041
  const logger$n = createLogger("SourceOfFundsDropin");
38604
39042
  const sourceOfFundsForms = {
38605
39043
  sourceOfFundsType: {
@@ -38634,6 +39072,9 @@ function SourceOfFundsDropin({
38634
39072
  const [loadingStatus, setLoadingStatus] = useState("success");
38635
39073
  const [activeBusinessLine, setActiveBusinessLine] = useState();
38636
39074
  const [activeSourceOfFund, setActiveSourceOfFund] = useState({});
39075
+ const [allBusinessLines, setAllBusinessLines] = useState([]);
39076
+ const [gettingStarted, setGettingStarted] = useState(true);
39077
+ const [gettingStartedHelpModal, setGettingStartedHelpModal] = useState(false);
38637
39078
  const formRef = useRef(null);
38638
39079
  const {
38639
39080
  state: { currentState }
@@ -38648,12 +39089,13 @@ function SourceOfFundsDropin({
38648
39089
  getBusinessLines2(legalEntityResponse.id).then((response) => {
38649
39090
  if (response) {
38650
39091
  const firstBusinessLine = response[0];
39092
+ const sourceOfFundsMap = response.map(
39093
+ (businessLine) => mapSourceOfFundToSourceOfFundsSchema(businessLine)
39094
+ );
38651
39095
  if (firstBusinessLine) {
38652
39096
  setActiveBusinessLine(firstBusinessLine);
38653
- if (firstBusinessLine == null ? void 0 : firstBusinessLine.sourceOfFunds) {
38654
- const firstSourceOfFund = mapSourceOfFundToSourceOfFundsSchema(firstBusinessLine);
38655
- setActiveSourceOfFund(firstSourceOfFund);
38656
- }
39097
+ setActiveSourceOfFund(sourceOfFundsMap[0]);
39098
+ setAllBusinessLines(response);
38657
39099
  }
38658
39100
  }
38659
39101
  }).catch(() => {
@@ -38711,6 +39153,16 @@ function SourceOfFundsDropin({
38711
39153
  logger$n.log("Submitting data");
38712
39154
  setLoadingStatus("success");
38713
39155
  }, []);
39156
+ const handleGettingStarted = useCallback(() => {
39157
+ setGettingStarted(!gettingStarted);
39158
+ }, [gettingStarted]);
39159
+ const handleSourceOfFundsClick = (SoF) => {
39160
+ setActiveSourceOfFund(SoF);
39161
+ setGettingStarted(false);
39162
+ };
39163
+ const handleHelpClick = () => {
39164
+ setGettingStartedHelpModal(!gettingStartedHelpModal);
39165
+ };
38714
39166
  const {
38715
39167
  handleNextClick,
38716
39168
  handleBackClick,
@@ -38726,37 +39178,51 @@ function SourceOfFundsDropin({
38726
39178
  forms,
38727
39179
  onSubmit: handleSubmit
38728
39180
  });
38729
- return /* @__PURE__ */ jsx(
38730
- FormWrapper,
38731
- {
38732
- taskName: "sourceOfFunds",
38733
- gotoFormByFormIndex,
38734
- hideSidebar: true,
38735
- loadingStatus,
38736
- forms,
38737
- activeForm,
38738
- validateForm: () => setShouldValidate(true),
38739
- baseTrackingPayload,
38740
- onSubmit: handleSubmit,
38741
- problems,
38742
- canSubmit: canSubmitForm,
38743
- handleNextClick,
38744
- handleBackClick,
38745
- handleHomeClick,
38746
- steps,
38747
- children: loading ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsx(
38748
- SourceOfFunds,
38749
- {
38750
- country,
38751
- activeForm,
38752
- shouldValidate,
38753
- activeBusinessLine,
38754
- ref: formRef,
38755
- data: activeSourceOfFund
38756
- }
38757
- )
38758
- }
38759
- );
39181
+ return /* @__PURE__ */ jsx("div", { className: styles$3.sourceOfFunds, children: loading ? /* @__PURE__ */ jsx(Loader, { size: "medium" }) : /* @__PURE__ */ jsxs(Fragment, { children: [
39182
+ gettingStarted && /* @__PURE__ */ jsx(
39183
+ SourceOfFundsGettingStarted,
39184
+ {
39185
+ handleCancelClick: handleHomeClick,
39186
+ handleGettingStartedClick: handleGettingStarted,
39187
+ businessLines: allBusinessLines,
39188
+ handleHelpClick,
39189
+ handleSourceOfFundsClick
39190
+ }
39191
+ ),
39192
+ !gettingStarted && /* @__PURE__ */ jsx(
39193
+ FormWrapper,
39194
+ {
39195
+ taskName: "sourceOfFunds",
39196
+ gotoFormByFormIndex,
39197
+ hideSidebar: true,
39198
+ loadingStatus,
39199
+ forms,
39200
+ activeForm,
39201
+ validateForm: () => setShouldValidate(true),
39202
+ baseTrackingPayload,
39203
+ onSubmit: handleSubmit,
39204
+ problems,
39205
+ canSubmit: canSubmitForm,
39206
+ handleNextClick,
39207
+ showBackButton: true,
39208
+ handleBackClick: steps.current === 0 ? handleGettingStarted : handleBackClick,
39209
+ handleHomeClick,
39210
+ steps,
39211
+ children: /* @__PURE__ */ jsx(
39212
+ SourceOfFunds,
39213
+ {
39214
+ country,
39215
+ activeForm,
39216
+ shouldValidate,
39217
+ activeBusinessLine,
39218
+ ref: formRef,
39219
+ data: activeSourceOfFund
39220
+ }
39221
+ )
39222
+ }
39223
+ ),
39224
+ gettingStartedHelpModal && /* @__PURE__ */ jsx(SourceOfFundsHelpModal, { handleModalClose: handleHelpClick })
39225
+ ] }) });
38760
39226
  }
38761
39227
  const PAGES_WITH_POLLING = [TaskTypes.DECISION_MAKER_OVERVIEW, TaskTypes.TASKS_OVERVIEW];
38762
39228
  const logger$m = createLogger("DropinComposer");
@@ -38774,7 +39240,7 @@ function DropinComposer({
38774
39240
  const { setCanSeeEntitySelection } = useCanSeeEntitySelection(legalEntityResponse.id);
38775
39241
  const { i18n } = useI18nContext();
38776
39242
  const { getConfiguration: getConfiguration2 } = useConfigurationApi();
38777
- const { isExperimentEnabled, refreshExperiments } = useExperimentsContext();
39243
+ const { isExperimentEnabled } = useExperimentsContext();
38778
39244
  const { showToast } = useToastContext();
38779
39245
  const [isLoadingConfiguration, setIsLoadingConfiguration] = useState(false);
38780
39246
  const { setHasSeenSingpassSelection } = useHasSeenSingpassSelection({
@@ -38783,9 +39249,14 @@ function DropinComposer({
38783
39249
  const { setHasSeenIntroduction } = useHasSeenIntroduction({
38784
39250
  legalEntityId: legalEntityResponse.id
38785
39251
  });
38786
- const [rootLegalEntity, setRootLegalEntity] = useState(legalEntityResponse);
38787
- const taskStore = useTaskStore();
38788
- const taskTypes = useTaskStore((state) => state.taskTypes);
39252
+ const setRootLegalEntity = useGlobalStore((state) => state.setRootLegalEntity);
39253
+ const setTaskTypes = useGlobalStore((state) => state.setTaskTypes);
39254
+ const setTrustMembers = useGlobalStore((state) => state.setTrustMembers);
39255
+ const setAccountHolderInGlobalStore = useGlobalStore((state) => state.setAccountHolder);
39256
+ const rootLegalEntity = useGlobalStore((state) => state.rootLegalEntity);
39257
+ const rootLegalEntityCountry = useGlobalStore((state) => state.rootLegalEntityCountry);
39258
+ const taskTypes = useGlobalStore((state) => state.taskTypes);
39259
+ const capabilityProblems = useGlobalStore((state) => state.capabilityProblems);
38789
39260
  const capabilities = useMemo(() => getCapabilities(rootLegalEntity), [rootLegalEntity]);
38790
39261
  const {
38791
39262
  isEligibleForSingpass,
@@ -38802,7 +39273,6 @@ function DropinComposer({
38802
39273
  handleOpenSingpassAuthorizationLink: args.handleOpenSingpassAuthorizationLink
38803
39274
  });
38804
39275
  const singpassTabRef = useRef(null);
38805
- const rootLegalEntityCountry = getLegalEntityCountry(rootLegalEntity);
38806
39276
  const [associatedLegalEntity, setAssociatedLegalEntity] = useState();
38807
39277
  const {
38808
39278
  associatedLegalArrangement,
@@ -38828,9 +39298,6 @@ function DropinComposer({
38828
39298
  const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
38829
39299
  const [serviceAgreementAcceptanceInfos, setServiceAgreementAcceptanceInfos] = useState([]);
38830
39300
  const [transferInstrument, setTransferInstrument] = useState();
38831
- const [capabilityProblems, setCapabilityProblems] = useState(
38832
- getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry, isExperimentEnabled)
38833
- );
38834
39301
  const { currentTask, previousTask, navigateTo, navigateBack } = useNavigation({
38835
39302
  legalEntity: legalEntityResponse,
38836
39303
  onNavigate,
@@ -38849,7 +39316,7 @@ function DropinComposer({
38849
39316
  () => (associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.trust) ? allowMoreRolesForMainRootTrustee ? getRootTrusteeTrustMembers(associatedLegalArrangement, rootLegalEntity, exemptSettlor) : getTrustMembers(associatedLegalArrangement, rootLegalEntity, exemptSettlor) : [],
38850
39317
  [rootLegalEntity, associatedLegalArrangement, exemptSettlor, allowMoreRolesForMainRootTrustee]
38851
39318
  );
38852
- useEffect(() => taskStore.setTrustMembers(trustMembers), [trustMembers]);
39319
+ useEffect(() => setTrustMembers(trustMembers), [trustMembers]);
38853
39320
  const getLegalEntityProblems = (le) => {
38854
39321
  var _a2;
38855
39322
  if (le == null ? void 0 : le.id) {
@@ -38946,30 +39413,12 @@ function DropinComposer({
38946
39413
  logger$m.warn("Failed to fetch legal entity details", e);
38947
39414
  return rootLegalEntity;
38948
39415
  }
38949
- }, [rootLegalEntity.id, args.handleGetLegalEntity, i18n]);
38950
- const updateLegalEntityAndCapabilityProblems = useCallback(
38951
- (updatedLegalEntity) => {
38952
- const updatedCapabilityProblems = getCapabilityProblems(
38953
- updatedLegalEntity,
38954
- getLegalEntityCountry(updatedLegalEntity),
38955
- isExperimentEnabled
38956
- );
38957
- setRootLegalEntity(updatedLegalEntity);
38958
- setCapabilityProblems(updatedCapabilityProblems);
38959
- taskStore.updateRootLegalEntityAndAssociated({
38960
- rootLegalEntity: updatedLegalEntity,
38961
- capabilityProblems: updatedCapabilityProblems,
38962
- legalRepresentative: getLegalRepresentative(updatedLegalEntity),
38963
- transferInstruments: updatedLegalEntity.transferInstruments ?? []
38964
- });
38965
- },
38966
- [isExperimentEnabled]
38967
- );
39416
+ }, [rootLegalEntity, args.handleGetLegalEntity]);
38968
39417
  const refreshLegalEntity = useCallback(async () => {
38969
39418
  const legalEntity = await retrieveLegalEntity();
38970
- updateLegalEntityAndCapabilityProblems(legalEntity);
39419
+ setRootLegalEntity(legalEntity);
38971
39420
  return legalEntity;
38972
- }, [retrieveLegalEntity, updateLegalEntityAndCapabilityProblems]);
39421
+ }, [retrieveLegalEntity]);
38973
39422
  const deleteTransferInstrument2 = async (id) => {
38974
39423
  try {
38975
39424
  await args.handleDeleteTransferInstrument(id);
@@ -39265,7 +39714,7 @@ function DropinComposer({
39265
39714
  legalEntityType: rootLegalEntity.type
39266
39715
  });
39267
39716
  if (data == null ? void 0 : data.taskList) {
39268
- taskStore.setTaskTypes(data.taskList);
39717
+ setTaskTypes(data.taskList);
39269
39718
  if (data.taskList.includes(TaskTypes.PCI_DSS)) {
39270
39719
  await getPciStatus2();
39271
39720
  }
@@ -39287,7 +39736,7 @@ function DropinComposer({
39287
39736
  usePolling({
39288
39737
  poller: retrieveLegalEntity,
39289
39738
  pollingInterval: 3e3,
39290
- onNewValueReceived: updateLegalEntityAndCapabilityProblems,
39739
+ onNewValueReceived: setRootLegalEntity,
39291
39740
  skip: (
39292
39741
  // Stop polling when not on an applicable page
39293
39742
  // or the LE has fully resolved capabilities
@@ -39298,15 +39747,7 @@ function DropinComposer({
39298
39747
  const newAccountHolder = getDefaultAccountHolderType(rootLegalEntity, false, accountHolder);
39299
39748
  if (newAccountHolder !== accountHolder) setAccountHolder(newAccountHolder);
39300
39749
  }, [accountHolder, rootLegalEntity]);
39301
- useEffect(() => {
39302
- taskStore.updateRootLegalEntityAndAssociated({
39303
- rootLegalEntity,
39304
- capabilityProblems,
39305
- legalRepresentative: getLegalRepresentative(rootLegalEntity),
39306
- transferInstruments: rootLegalEntity.transferInstruments ?? []
39307
- });
39308
- }, []);
39309
- useEffect(() => taskStore.setAccountHolder(accountHolder), [accountHolder]);
39750
+ useEffect(() => setAccountHolderInGlobalStore(accountHolder), [accountHolder]);
39310
39751
  const singpassBanner = isEligibleForSingpass ? /* @__PURE__ */ jsx(
39311
39752
  SingpassBanner,
39312
39753
  {
@@ -39354,9 +39795,6 @@ function DropinComposer({
39354
39795
  onComplete: async (newAccountHolder) => {
39355
39796
  setAccountHolder(newAccountHolder);
39356
39797
  setCanSeeEntitySelection(false);
39357
- if (refreshExperiments) {
39358
- refreshExperiments();
39359
- }
39360
39798
  await refreshLegalEntity();
39361
39799
  navigateTo("default");
39362
39800
  },
@@ -39832,7 +40270,7 @@ function DropinComposer({
39832
40270
  capabilities,
39833
40271
  problems: getLegalEntityProblems(rootLegalEntity),
39834
40272
  onSubmit: handleOnSubmit,
39835
- handleHomeClick: navigateBack
40273
+ handleHomeClick: () => navigateTo(TaskTypes.TASKS_OVERVIEW)
39836
40274
  }
39837
40275
  );
39838
40276
  default:
@@ -40456,76 +40894,77 @@ const verifyTin = async (context, data) => {
40456
40894
  );
40457
40895
  };
40458
40896
  const COMPONENTS_API_VERSION = "v1";
40897
+ const makeComponentApi = (rootLegalEntityId, base) => {
40898
+ const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
40899
+ const loadingContextWithRootLEAuth = `${loadingContext}legalEntities/`;
40900
+ const baseRequestContext = {
40901
+ loadingContext: loadingContextWithRootLEAuth,
40902
+ legalEntityId: rootLegalEntityId
40903
+ };
40904
+ return {
40905
+ getLegalEntity: async (legalEntityId) => getLegalEntity(baseRequestContext, legalEntityId),
40906
+ updateLegalEntity: async (legalEntity, legalEntityId) => updateLegalEntity(baseRequestContext, legalEntity, legalEntityId),
40907
+ createLegalEntity: async (legalEntity) => createLegalEntity(baseRequestContext, legalEntity),
40908
+ getTransferInstrument: async (transferInstrumentId) => getTransferInstrument(baseRequestContext, transferInstrumentId),
40909
+ getBankVerificationVendor: async (country, openBankingPartnerConfigId, locale) => getBankVerificationVendor(baseRequestContext, country, openBankingPartnerConfigId, locale),
40910
+ getDocument: async (documentId) => getDocument(baseRequestContext, documentId),
40911
+ createDocument: async (document2, ownerId) => createDocument(baseRequestContext, document2, ownerId),
40912
+ updateDocument: async (document2, documentId, ownerId) => updateDocument(baseRequestContext, document2, documentId, ownerId),
40913
+ createTransferInstrument: async (transferInstrument) => createTransferInstrument(baseRequestContext, transferInstrument),
40914
+ updateTransferInstrument: async (transferInstrument, transferInstrumentId) => updateTransferInstrument(baseRequestContext, transferInstrument, transferInstrumentId),
40915
+ createTrustedTransferInstrument: async (code, state) => createTrustedTransferInstrument(baseRequestContext, code, state),
40916
+ deleteTransferInstrument: async (transferInstrumentId) => deleteTransferInstrument(baseRequestContext, transferInstrumentId),
40917
+ handleBankVerificationError: async (errorCode, errorMessage, state, metadata) => handleBankVerificationError(baseRequestContext, errorCode, errorMessage, state, metadata),
40918
+ searchAddress: async (address) => searchAddress(baseRequestContext, address),
40919
+ getAddress: async (address) => getAddress(baseRequestContext, address),
40920
+ getIdVerificationToken: async (legalEntityId, data) => getIdverificationToken(baseRequestContext, data),
40921
+ idVerificationStartCheck: async (legalEntityId, data) => idVerificationStartcheck(baseRequestContext, data),
40922
+ getTransferInstruments: async () => getTransferInstruments(baseRequestContext),
40923
+ getOnboardingStatus: async () => getOnboardingStatus(baseRequestContext),
40924
+ generateOnboardingLink: async (config) => generateOnboardingLink(baseRequestContext, config),
40925
+ getPciStatus: async (legalEntityId, data) => getPciStatus({ ...baseRequestContext, legalEntityId }, data),
40926
+ getPciTemplate: async (legalEntityId, data) => getPciTemplate({ ...baseRequestContext, legalEntityId }, data),
40927
+ signPci: async (legalEntityId, data) => signPci({ ...baseRequestContext, legalEntityId }, data),
40928
+ getPciQuestionnaires: async (legalEntityId) => getPciQuestionnaires({ ...baseRequestContext, legalEntityId }),
40929
+ downloadPci: async (legalEntityId, pciReference) => downloadPci({ ...baseRequestContext, legalEntityId }, pciReference),
40930
+ getServiceAgreementAcceptanceInfos: async (legalEntityId) => getServiceAgreementAcceptanceInfos({ ...baseRequestContext, legalEntityId }),
40931
+ getServiceAgreementStatus: async (legalEntityId) => getServiceAgreementStatus({ ...baseRequestContext, legalEntityId }),
40932
+ getServiceAgreement: async (legalEntityId, serviceAgreementRequest) => getServiceAgreement({ ...baseRequestContext, legalEntityId }, serviceAgreementRequest),
40933
+ acceptServiceAgreement: async (legalEntityId, termsOfServiceDocumentId, data) => acceptServiceAgreement(
40934
+ { ...baseRequestContext, legalEntityId },
40935
+ termsOfServiceDocumentId,
40936
+ data
40937
+ ),
40938
+ getAcceptedServiceAgreement: async (legalEntityId, termsOfServiceAcceptanceReference) => getAcceptedServiceAgreement(
40939
+ { ...baseRequestContext, legalEntityId },
40940
+ termsOfServiceAcceptanceReference,
40941
+ "JSON"
40942
+ ),
40943
+ downloadAcceptedServiceAgreement: async (legalEntityId, termsOfServiceAcceptanceReference) => getAcceptedServiceAgreement(
40944
+ { ...baseRequestContext, legalEntityId },
40945
+ termsOfServiceAcceptanceReference,
40946
+ "PDF"
40947
+ ),
40948
+ downloadUnacceptedServiceAgreement: async (legalEntityId, serviceAgreementRequest) => getServiceAgreement({ ...baseRequestContext, legalEntityId }, serviceAgreementRequest),
40949
+ confirmDataReview: async (legalEntityId) => confirmDataReview({ ...baseRequestContext, legalEntityId }),
40950
+ getProviderStatus: async (request) => getProviderStatus(baseRequestContext, request),
40951
+ companyIndexSearch: async (request) => companyIndexSearch(baseRequestContext, request),
40952
+ companyDeepSearch: async (request) => companyDeepSearch(baseRequestContext, request),
40953
+ companyRegistrationNumberIndexSearch: async (request) => companyRegistrationNumberIndexSearch(baseRequestContext, request),
40954
+ companyRegistrationNumberDeepSearch: async (request) => companyRegistrationNumberDeepSearch(baseRequestContext, request),
40955
+ getCompanyDataset: async (request) => getCompanyDataset(baseRequestContext, request),
40956
+ refreshCompanyDataset: async (request) => refreshCompanyDataset(baseRequestContext, request),
40957
+ clearCompanyData: async () => clearCompanyData(baseRequestContext),
40958
+ verifyTin: async (request) => verifyTin(baseRequestContext, request)
40959
+ };
40960
+ };
40459
40961
  const useComponentApi = (rootLegalEntityId) => {
40460
40962
  const authContext = useAuthContext();
40461
40963
  if (!authContext.isEmbeddedDropin) {
40462
40964
  throw new Error("Cannot use component API outside an embedded dropin");
40463
40965
  }
40464
40966
  const { loadingContext: base } = authContext;
40465
- return useMemo(() => {
40466
- const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
40467
- const loadingContextWithRootLEAuth = `${loadingContext}legalEntities/`;
40468
- const baseRequestContext = {
40469
- loadingContext: loadingContextWithRootLEAuth,
40470
- legalEntityId: rootLegalEntityId
40471
- };
40472
- return {
40473
- getLegalEntity: async (legalEntityId) => getLegalEntity(baseRequestContext, legalEntityId),
40474
- updateLegalEntity: async (legalEntity, legalEntityId) => updateLegalEntity(baseRequestContext, legalEntity, legalEntityId),
40475
- createLegalEntity: async (legalEntity) => createLegalEntity(baseRequestContext, legalEntity),
40476
- getTransferInstrument: async (transferInstrumentId) => getTransferInstrument(baseRequestContext, transferInstrumentId),
40477
- getBankVerificationVendor: async (country, openBankingPartnerConfigId, locale) => getBankVerificationVendor(baseRequestContext, country, openBankingPartnerConfigId, locale),
40478
- getDocument: async (documentId) => getDocument(baseRequestContext, documentId),
40479
- createDocument: async (document2, ownerId) => createDocument(baseRequestContext, document2, ownerId),
40480
- updateDocument: async (document2, documentId, ownerId) => updateDocument(baseRequestContext, document2, documentId, ownerId),
40481
- createTransferInstrument: async (transferInstrument) => createTransferInstrument(baseRequestContext, transferInstrument),
40482
- updateTransferInstrument: async (transferInstrument, transferInstrumentId) => updateTransferInstrument(baseRequestContext, transferInstrument, transferInstrumentId),
40483
- createTrustedTransferInstrument: async (code, state) => createTrustedTransferInstrument(baseRequestContext, code, state),
40484
- deleteTransferInstrument: async (transferInstrumentId) => deleteTransferInstrument(baseRequestContext, transferInstrumentId),
40485
- handleBankVerificationError: async (errorCode, errorMessage, state, metadata) => handleBankVerificationError(baseRequestContext, errorCode, errorMessage, state, metadata),
40486
- searchAddress: async (address) => searchAddress(baseRequestContext, address),
40487
- getAddress: async (address) => getAddress(baseRequestContext, address),
40488
- getIdVerificationToken: async (legalEntityId, data) => getIdverificationToken(baseRequestContext, data),
40489
- idVerificationStartCheck: async (legalEntityId, data) => idVerificationStartcheck(baseRequestContext, data),
40490
- getTransferInstruments: async () => getTransferInstruments(baseRequestContext),
40491
- getOnboardingStatus: async () => getOnboardingStatus(baseRequestContext),
40492
- generateOnboardingLink: async (config) => generateOnboardingLink(baseRequestContext, config),
40493
- getPciStatus: async (legalEntityId, data) => getPciStatus({ ...baseRequestContext, legalEntityId }, data),
40494
- getPciTemplate: async (legalEntityId, data) => getPciTemplate({ ...baseRequestContext, legalEntityId }, data),
40495
- signPci: async (legalEntityId, data) => signPci({ ...baseRequestContext, legalEntityId }, data),
40496
- getPciQuestionnaires: async (legalEntityId) => getPciQuestionnaires({ ...baseRequestContext, legalEntityId }),
40497
- downloadPci: async (legalEntityId, pciReference) => downloadPci({ ...baseRequestContext, legalEntityId }, pciReference),
40498
- getServiceAgreementAcceptanceInfos: async (legalEntityId) => getServiceAgreementAcceptanceInfos({ ...baseRequestContext, legalEntityId }),
40499
- getServiceAgreementStatus: async (legalEntityId) => getServiceAgreementStatus({ ...baseRequestContext, legalEntityId }),
40500
- getServiceAgreement: async (legalEntityId, serviceAgreementRequest) => getServiceAgreement({ ...baseRequestContext, legalEntityId }, serviceAgreementRequest),
40501
- acceptServiceAgreement: async (legalEntityId, termsOfServiceDocumentId, data) => acceptServiceAgreement(
40502
- { ...baseRequestContext, legalEntityId },
40503
- termsOfServiceDocumentId,
40504
- data
40505
- ),
40506
- getAcceptedServiceAgreement: async (legalEntityId, termsOfServiceAcceptanceReference) => getAcceptedServiceAgreement(
40507
- { ...baseRequestContext, legalEntityId },
40508
- termsOfServiceAcceptanceReference,
40509
- "JSON"
40510
- ),
40511
- downloadAcceptedServiceAgreement: async (legalEntityId, termsOfServiceAcceptanceReference) => getAcceptedServiceAgreement(
40512
- { ...baseRequestContext, legalEntityId },
40513
- termsOfServiceAcceptanceReference,
40514
- "PDF"
40515
- ),
40516
- downloadUnacceptedServiceAgreement: async (legalEntityId, serviceAgreementRequest) => getServiceAgreement({ ...baseRequestContext, legalEntityId }, serviceAgreementRequest),
40517
- confirmDataReview: async (legalEntityId) => confirmDataReview({ ...baseRequestContext, legalEntityId }),
40518
- getProviderStatus: async (request) => getProviderStatus(baseRequestContext, request),
40519
- companyIndexSearch: async (request) => companyIndexSearch(baseRequestContext, request),
40520
- companyDeepSearch: async (request) => companyDeepSearch(baseRequestContext, request),
40521
- companyRegistrationNumberIndexSearch: async (request) => companyRegistrationNumberIndexSearch(baseRequestContext, request),
40522
- companyRegistrationNumberDeepSearch: async (request) => companyRegistrationNumberDeepSearch(baseRequestContext, request),
40523
- getCompanyDataset: async (request) => getCompanyDataset(baseRequestContext, request),
40524
- refreshCompanyDataset: async (request) => refreshCompanyDataset(baseRequestContext, request),
40525
- clearCompanyData: async () => clearCompanyData(baseRequestContext),
40526
- verifyTin: async (request) => verifyTin(baseRequestContext, request)
40527
- };
40528
- }, [base, rootLegalEntityId]);
40967
+ return useMemo(() => makeComponentApi(rootLegalEntityId, base), [rootLegalEntityId, base]);
40529
40968
  };
40530
40969
  const logger$l = createLogger("AcceptTermsOfService");
40531
40970
  function AcceptTermsOfServiceComponent({
@@ -41670,8 +42109,7 @@ function SignPCIComponent({
41670
42109
  handleSign,
41671
42110
  handleCloseClick: handleOnClose,
41672
42111
  asModal: isModalView,
41673
- needsSigning,
41674
- asEmbedded: true
42112
+ needsSigning
41675
42113
  }
41676
42114
  ) : null;
41677
42115
  }
@@ -43977,30 +44415,34 @@ const convertToEmbeddedEvent = (eventQueueItem, sessionData) => {
43977
44415
  const isObject2 = typeof event === "object";
43978
44416
  const eventName = isObject2 ? event.key : event;
43979
44417
  const eventData = isObject2 ? event.segmentation : {};
44418
+ const baseParams = eventQueueItem[1] ?? {};
44419
+ const { legalEntityId, countryCode, capabilities } = baseParams;
43980
44420
  return {
43981
44421
  eventType,
43982
44422
  eventName,
43983
44423
  ...sessionData,
43984
- eventData: eventData ?? {}
44424
+ eventData: { legalEntityId, countryCode, capabilities, ...eventData }
43985
44425
  };
43986
44426
  };
43987
- const useAnalytics = ({
43988
- onUserEvent,
43989
- legalEntityId,
43990
- sdkVersion,
43991
- componentName
43992
- }) => {
44427
+ const useAnalytics = ({ onUserEvent, sdkVersion, componentName }) => {
43993
44428
  const { i18n } = useI18nContext();
43994
44429
  const { isEmbeddedDropin, loadingContext: base } = useAuthContext();
44430
+ const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
44431
+ const countryCode = useGlobalStore((store) => store.rootLegalEntityCountry);
44432
+ const capabilities = Object.keys(rootLegalEntity.capabilities ?? {});
44433
+ const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
44434
+ userEvents.setBaseTrackingPayload({
44435
+ legalEntityId: rootLegalEntity.id,
44436
+ countryCode,
44437
+ capabilities
44438
+ });
43995
44439
  (async () => {
43996
- const loadingContext = `${base}api/${COMPONENTS_API_VERSION}/`;
43997
44440
  if (isEmbeddedDropin) {
43998
44441
  try {
43999
44442
  const sessionData = {
44000
44443
  sdkVersion,
44001
44444
  componentName,
44002
- userAgent: navigator.userAgent,
44003
- legalEntityId
44445
+ userAgent: navigator.userAgent
44004
44446
  };
44005
44447
  const sessionResponse = await getAnalyticsSession(loadingContext, sessionData);
44006
44448
  if (!(sessionResponse == null ? void 0 : sessionResponse.id)) {
@@ -44397,15 +44839,14 @@ const getKycExternalApi = ({
44397
44839
  const ConfigurationApiProvider = ({
44398
44840
  children,
44399
44841
  onUserEvent,
44400
- rootLegalEntityId,
44401
44842
  componentName
44402
44843
  }) => {
44403
44844
  const authContext = useAuthContext();
44404
44845
  const { isEmbeddedDropin, loadingContext } = authContext;
44405
- const sdkVersion = "3.44.4";
44846
+ const sdkVersion = "3.45.0";
44847
+ const rootLegalEntityId = useGlobalStore((store) => store.rootLegalEntity.id);
44406
44848
  useAnalytics({
44407
44849
  onUserEvent,
44408
- legalEntityId: rootLegalEntityId,
44409
44850
  sdkVersion,
44410
44851
  componentName
44411
44852
  });
@@ -44449,10 +44890,10 @@ const useAllowedCountries = () => {
44449
44890
  const logger$3 = createLogger("CoreProvider");
44450
44891
  const CoreProvider = ({
44451
44892
  contextCountry: initialContextCountry,
44452
- rootLegalEntityId,
44453
44893
  children
44454
44894
  }) => {
44455
44895
  const [contextCountry, setContextCountry] = useState(initialContextCountry);
44896
+ const rootLegalEntityId = useGlobalStore((store) => store.rootLegalEntity.id);
44456
44897
  const { accountHolder, setAccountHolder } = useAccountHolder(rootLegalEntityId);
44457
44898
  const [accountFormat, setAccountFormat] = useState("local");
44458
44899
  const [idVerificationProviderId, setIdVerificationProviderId] = useState();
@@ -44523,7 +44964,7 @@ const useAllowedLocales = () => {
44523
44964
  }, []);
44524
44965
  return allowedLocales;
44525
44966
  };
44526
- const localeImports = /* @__PURE__ */ Object.assign({ "./locales/bg-BG.json": () => import("./bg-BG-QPFxclBg.js"), "./locales/cs-CZ.json": () => import("./cs-CZ-D98JAc2J.js"), "./locales/da-DK.json": () => import("./da-DK-JJdd-72W.js"), "./locales/de-DE.json": () => import("./de-DE-B3G3sEfd.js"), "./locales/el-GR.json": () => import("./el-GR-WBOtRfZs.js"), "./locales/en-US.instructions.json": () => import("./en-US.instructions-DLPEHGI-.js"), "./locales/en-US.json": () => Promise.resolve().then(() => enUS), "./locales/es-ES.json": () => import("./es-ES-CCwOsWXd.js"), "./locales/et-EE.json": () => import("./et-EE-x3X0uhbQ.js"), "./locales/fi-FI.json": () => import("./fi-FI-BokVSTrO.js"), "./locales/fr-FR.json": () => import("./fr-FR-DnF3nBoi.js"), "./locales/hr-HR.json": () => import("./hr-HR-D13VSiNt.js"), "./locales/hu-HU.json": () => import("./hu-HU-iSy_89_F.js"), "./locales/it-IT.json": () => import("./it-IT-PufivMUr.js"), "./locales/lt-LT.json": () => import("./lt-LT-6u0igm3A.js"), "./locales/lv-LV.json": () => import("./lv-LV-DTOcOGw6.js"), "./locales/nl-NL.json": () => import("./nl-NL-BpaSvRsy.js"), "./locales/no-NO.json": () => import("./no-NO-M-DUT2ve.js"), "./locales/pl-PL.json": () => import("./pl-PL-o8cP2y_m.js"), "./locales/pt-PT.json": () => import("./pt-PT-dvdILY5G.js"), "./locales/ro-RO.json": () => import("./ro-RO-Cvknah2F.js"), "./locales/sk-SK.json": () => import("./sk-SK-Dgkkymw-.js"), "./locales/sl-SI.json": () => import("./sl-SI-CTExVFKJ.js"), "./locales/sv-SE.json": () => import("./sv-SE-BAfNO7ZF.js") });
44967
+ const localeImports = /* @__PURE__ */ Object.assign({ "./locales/bg-BG.json": () => import("./bg-BG-Q7jr61oX.js"), "./locales/cs-CZ.json": () => import("./cs-CZ-DWt-8d0a.js"), "./locales/da-DK.json": () => import("./da-DK-DzKDKodb.js"), "./locales/de-DE.json": () => import("./de-DE-CTrlEFB7.js"), "./locales/el-GR.json": () => import("./el-GR-BEyHixTO.js"), "./locales/en-US.instructions.json": () => import("./en-US.instructions-DLPEHGI-.js"), "./locales/en-US.json": () => Promise.resolve().then(() => enUS), "./locales/es-ES.json": () => import("./es-ES-C5YKWCME.js"), "./locales/et-EE.json": () => import("./et-EE-UTwEA7KT.js"), "./locales/fi-FI.json": () => import("./fi-FI-Dlg3u-HY.js"), "./locales/fr-FR.json": () => import("./fr-FR-BrL2V-lF.js"), "./locales/hr-HR.json": () => import("./hr-HR-CR1NpsoY.js"), "./locales/hu-HU.json": () => import("./hu-HU-BkmzV8oZ.js"), "./locales/it-IT.json": () => import("./it-IT-BR75YMjD.js"), "./locales/lt-LT.json": () => import("./lt-LT-Cm17tGP4.js"), "./locales/lv-LV.json": () => import("./lv-LV-Bj0D7n67.js"), "./locales/nl-NL.json": () => import("./nl-NL-bhqLkBQz.js"), "./locales/no-NO.json": () => import("./no-NO-CrzRhfMh.js"), "./locales/pl-PL.json": () => import("./pl-PL-BcncZK0S.js"), "./locales/pt-PT.json": () => import("./pt-PT-Bwx0xHGg.js"), "./locales/ro-RO.json": () => import("./ro-RO-Bj9nLST9.js"), "./locales/sk-SK.json": () => import("./sk-SK-CI2V7naC.js"), "./locales/sl-SI.json": () => import("./sl-SI-Dg4cE1ea.js"), "./locales/sv-SE.json": () => import("./sv-SE-DPB5qLHu.js") });
44527
44968
  const loadLocale = async (locale) => {
44528
44969
  const importForLocale = localeImports[`./locales/${locale}.json`];
44529
44970
  if (!importForLocale) {
@@ -45241,30 +45682,24 @@ const DebugMetadata = ({
45241
45682
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-debug-modal__meta", children: /* @__PURE__ */ jsx(DebugTable, { data: rows }) });
45242
45683
  };
45243
45684
  const logger = createLogger("DebugModal");
45244
- const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
45685
+ const DebugModal = ({ onExit }) => {
45245
45686
  const { isExperimentEnabled } = useExperimentsContext();
45246
45687
  const { getSetting } = useSettingsContext();
45247
- const [legalEntityData, setLegalEntityData] = useState();
45248
45688
  const [debugInfoCopied, setDebugInfoCopied] = useState(false);
45249
45689
  const { i18n } = useI18nContext();
45250
45690
  const [tab, setTab] = useState("metadata");
45691
+ const rootLegalEntity = useGlobalStore((store) => store.rootLegalEntity);
45251
45692
  const metadata = {
45252
- sdkVersion: "3.44.4",
45693
+ sdkVersion: "3.45.0",
45253
45694
  locale: i18n.locale,
45254
- rootLegalEntityId
45695
+ rootLegalEntityId: rootLegalEntity.id
45255
45696
  };
45256
45697
  const experiments = listToRecord(valuesOf(ExperimentNames), isExperimentEnabled);
45257
45698
  const settings = listToRecord(valuesOf(SettingNames), getSetting);
45258
45699
  const taskStatuses = useTaskStatuses();
45259
- const fetchLegalEntityData = async () => {
45260
- if (!getRootLegalEntity) return;
45261
- const rootLegalEntity = await getRootLegalEntity();
45262
- const data = {
45263
- rootLegalEntity,
45264
- rootLegalEntityType: rootLegalEntity.type
45265
- };
45266
- setLegalEntityData(data);
45267
- return data;
45700
+ const legalEntityData = {
45701
+ rootLegalEntity,
45702
+ rootLegalEntityType: rootLegalEntity.type
45268
45703
  };
45269
45704
  const copyToClipboard = async () => {
45270
45705
  const toCopy = {
@@ -45272,7 +45707,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
45272
45707
  experiments,
45273
45708
  settings,
45274
45709
  taskStatuses,
45275
- legalEntityData: await fetchLegalEntityData()
45710
+ legalEntityData
45276
45711
  };
45277
45712
  await window.navigator.clipboard.writeText(JSON.stringify(toCopy, null, 2));
45278
45713
  setDebugInfoCopied(true);
@@ -45280,12 +45715,6 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
45280
45715
  setDebugInfoCopied(false);
45281
45716
  }, 5e3);
45282
45717
  };
45283
- const changeTab = (tab2) => {
45284
- if (tab2 === "legalEntityData") {
45285
- fetchLegalEntityData().catch(logger.error);
45286
- }
45287
- setTab(tab2);
45288
- };
45289
45718
  return /* @__PURE__ */ jsxs(Modal, { size: "fullscreen", onClose: onExit, children: [
45290
45719
  /* @__PURE__ */ jsx(ModalHeader, { children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-debug-modal__header", children: [
45291
45720
  /* @__PURE__ */ jsx("h1", { children: "Debug" }),
@@ -45294,7 +45723,7 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
45294
45723
  Tabs,
45295
45724
  {
45296
45725
  activeTab: tab,
45297
- onChange: changeTab,
45726
+ onChange: (tab2) => setTab(tab2),
45298
45727
  tabs: [
45299
45728
  {
45300
45729
  name: "metadata",
@@ -45346,13 +45775,8 @@ const DebugModal = ({ rootLegalEntityId, onExit, getRootLegalEntity }) => {
45346
45775
  ] }) }) })
45347
45776
  ] });
45348
45777
  };
45349
- const DebugWrapper = ({
45350
- rootLegalEntityId,
45351
- handleGetLegalEntity,
45352
- children
45353
- }) => {
45778
+ const DebugWrapper = ({ children }) => {
45354
45779
  const [debugUiOpen, setDebugUiOpen] = useState(false);
45355
- const { isEmbeddedDropin } = useAuthContext();
45356
45780
  const { isSettingEnabled } = useSettingsContext();
45357
45781
  const debugUiAllowed = isSettingEnabled("allowDebugUi");
45358
45782
  useEffect(() => {
@@ -45363,93 +45787,54 @@ const DebugWrapper = ({
45363
45787
  }
45364
45788
  };
45365
45789
  document.addEventListener("keydown", handleKeyDown);
45366
- return () => {
45367
- document.removeEventListener("keydown", handleKeyDown);
45368
- };
45790
+ return () => document.removeEventListener("keydown", handleKeyDown);
45369
45791
  }, [debugUiAllowed]);
45370
45792
  const isOpen = debugUiAllowed && debugUiOpen;
45371
- if (isEmbeddedDropin) {
45372
- return /* @__PURE__ */ jsx(
45373
- EmbeddedDebug,
45374
- {
45375
- isOpen,
45376
- rootLegalEntityId,
45377
- closeDebugUi: () => setDebugUiOpen(false),
45378
- children
45379
- }
45380
- );
45381
- }
45382
- if (handleGetLegalEntity) {
45383
- return /* @__PURE__ */ jsx(
45384
- HODebug,
45385
- {
45386
- isOpen,
45387
- rootLegalEntityId,
45388
- handleGetLegalEntity,
45389
- closeDebugUi: () => setDebugUiOpen(false),
45390
- children
45391
- }
45392
- );
45393
- }
45394
45793
  return /* @__PURE__ */ jsxs(Fragment, { children: [
45395
- isOpen ? /* @__PURE__ */ jsx(DebugModal, { rootLegalEntityId, onExit: () => setDebugUiOpen(false) }) : null,
45794
+ isOpen ? /* @__PURE__ */ jsx(DebugModal, { onExit: () => setDebugUiOpen(false) }) : null,
45396
45795
  children
45397
45796
  ] });
45398
45797
  };
45399
- const EmbeddedDebug = ({ rootLegalEntityId, closeDebugUi, isOpen, children }) => {
45400
- const { getLegalEntity: getLegalEntity2 } = useComponentApi(rootLegalEntityId);
45401
- const getRootLegalEntity = useCallback(
45402
- () => getLegalEntity2(rootLegalEntityId),
45403
- [getLegalEntity2, rootLegalEntityId]
45404
- );
45405
- return /* @__PURE__ */ jsxs(Fragment, { children: [
45406
- isOpen ? /* @__PURE__ */ jsx(
45407
- DebugModal,
45408
- {
45409
- rootLegalEntityId,
45410
- getRootLegalEntity,
45411
- onExit: closeDebugUi
45412
- }
45413
- ) : null,
45414
- children
45415
- ] });
45416
- };
45417
- const HODebug = ({
45418
- isOpen,
45419
- children,
45420
- rootLegalEntityId,
45798
+ const StoreProvider = ({
45799
+ legalEntityId,
45800
+ legalEntityResponse,
45421
45801
  handleGetLegalEntity,
45422
- closeDebugUi
45802
+ children
45423
45803
  }) => {
45424
- const getRootLegalEntity = useCallback(
45425
- () => handleGetLegalEntity(rootLegalEntityId),
45426
- [handleGetLegalEntity, rootLegalEntityId]
45427
- );
45428
- return /* @__PURE__ */ jsxs(Fragment, { children: [
45429
- isOpen ? /* @__PURE__ */ jsx(
45430
- DebugModal,
45431
- {
45432
- rootLegalEntityId,
45433
- getRootLegalEntity,
45434
- onExit: closeDebugUi
45804
+ const authContext = useAuthContext();
45805
+ const { isExperimentEnabled } = useExperimentsContext();
45806
+ const [store, setStore] = useState();
45807
+ useEffect(() => {
45808
+ const fetchRootLegalEntity = async () => {
45809
+ if (legalEntityResponse) return legalEntityResponse;
45810
+ if (!legalEntityId) {
45811
+ throw new Error("Either `legalEntityId` or `legalEntityResponse` must be provided.");
45435
45812
  }
45436
- ) : null,
45437
- children
45438
- ] });
45439
- };
45440
- const getRootLegalEntityId = (componentProps) => {
45441
- if ("legalEntityId" in componentProps) return componentProps.legalEntityId;
45442
- if ("legalEntityResponse" in componentProps) return componentProps.legalEntityResponse.id;
45443
- throw new Error("You must provide either `legalEntityId` or `legalEntityResponse`");
45813
+ if (authContext.isEmbeddedDropin) {
45814
+ const { getLegalEntity: getLegalEntity2 } = makeComponentApi(legalEntityId, authContext.loadingContext);
45815
+ return getLegalEntity2(legalEntityId);
45816
+ }
45817
+ if (handleGetLegalEntity) return handleGetLegalEntity(legalEntityId);
45818
+ throw new Error("`handleGetLegalEntity()` not provided");
45819
+ };
45820
+ const initializeStore = async () => {
45821
+ const rootLegalEntity = await fetchRootLegalEntity();
45822
+ const store2 = createGlobalStore({ rootLegalEntity, isExperimentEnabled });
45823
+ setStore(store2);
45824
+ };
45825
+ initializeStore().catch(console.error);
45826
+ }, []);
45827
+ useEffect(() => {
45828
+ store == null ? void 0 : store.setState({ isExperimentEnabled });
45829
+ }, [isExperimentEnabled]);
45830
+ if (!store) return /* @__PURE__ */ jsx(Skeleton, {});
45831
+ return /* @__PURE__ */ jsx(StoreContext.Provider, { value: store, children });
45444
45832
  };
45445
45833
  class UIElement extends BaseElement {
45446
45834
  constructor() {
45447
45835
  super(...arguments);
45448
45836
  this.render = () => {
45449
45837
  const Component = this.props.component;
45450
- const rootLegalEntityId = getRootLegalEntityId(
45451
- this.props.componentProps
45452
- );
45453
45838
  return /* @__PURE__ */ jsx(SettingsProvider, { settings: this.props.settings, children: /* @__PURE__ */ jsx(
45454
45839
  ExperimentsContextProvider,
45455
45840
  {
@@ -45462,51 +45847,36 @@ class UIElement extends BaseElement {
45462
45847
  getSdkToken: this.props.getSdkToken,
45463
45848
  clientKey: this.props.clientKey,
45464
45849
  loadingContext: this.props.loadingContext,
45465
- children: /* @__PURE__ */ jsx(
45850
+ children: /* @__PURE__ */ jsx(StoreProvider, { ...this.props.componentProps, children: /* @__PURE__ */ jsx(
45466
45851
  ConfigurationApiProvider,
45467
45852
  {
45468
- rootLegalEntityId,
45469
45853
  onUserEvent: this.props.onUserEvent,
45470
45854
  componentName: this.props.componentName,
45471
- children: /* @__PURE__ */ jsx(
45472
- CoreProvider,
45855
+ children: /* @__PURE__ */ jsx(CoreProvider, { contextCountry: this.props.contextCountry, children: /* @__PURE__ */ jsx(
45856
+ I18nProvider,
45473
45857
  {
45474
- contextCountry: this.props.contextCountry,
45475
- rootLegalEntityId,
45476
- children: /* @__PURE__ */ jsx(TaskContext.Provider, { value: createTaskStore(), children: /* @__PURE__ */ jsx(
45477
- I18nProvider,
45858
+ locale: this.props.locale,
45859
+ customTranslations: this.props.customTranslations,
45860
+ eventEmitter: this.eventEmitter,
45861
+ children: /* @__PURE__ */ jsx(
45862
+ ExpiryProvider,
45478
45863
  {
45479
- locale: this.props.locale,
45480
- customTranslations: this.props.customTranslations,
45864
+ expiry: this.props.expiry,
45865
+ refreshExpiry: this.props.refreshExpiry,
45481
45866
  eventEmitter: this.eventEmitter,
45482
- children: /* @__PURE__ */ jsx(
45483
- ExpiryProvider,
45867
+ children: /* @__PURE__ */ jsx(DebugWrapper, { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container-wrapper", children: /* @__PURE__ */ jsx(AutoResizer, { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container", children: /* @__PURE__ */ jsx(ToastContextProvider, { children: /* @__PURE__ */ jsx(StateProvider, { children: /* @__PURE__ */ jsx(
45868
+ Component,
45484
45869
  {
45485
- expiry: this.props.expiry,
45486
- refreshExpiry: this.props.refreshExpiry,
45487
- eventEmitter: this.eventEmitter,
45488
- children: /* @__PURE__ */ jsx(
45489
- DebugWrapper,
45490
- {
45491
- rootLegalEntityId,
45492
- handleGetLegalEntity: "handleGetLegalEntity" in this.props.componentProps ? this.props.componentProps.handleGetLegalEntity : void 0,
45493
- children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container-wrapper", children: /* @__PURE__ */ jsx(AutoResizer, { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-ui-element-container", children: /* @__PURE__ */ jsx(ToastContextProvider, { children: /* @__PURE__ */ jsx(StateProvider, { children: /* @__PURE__ */ jsx(
45494
- Component,
45495
- {
45496
- ...this.props.componentProps,
45497
- onUnmount: this.remove
45498
- }
45499
- ) }) }) }) }) })
45500
- }
45501
- )
45870
+ ...this.props.componentProps,
45871
+ onUnmount: this.remove
45502
45872
  }
45503
- )
45873
+ ) }) }) }) }) }) })
45504
45874
  }
45505
- ) })
45875
+ )
45506
45876
  }
45507
- )
45877
+ ) })
45508
45878
  }
45509
- )
45879
+ ) })
45510
45880
  }
45511
45881
  )
45512
45882
  }