@adyen/kyc-components 3.10.4 → 3.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/dist/es/AT-0q_5SJBQ.js +24 -0
  2. package/dist/es/AT-BgQV6hNb.js +29 -0
  3. package/dist/es/AT-njBxlQEe.js +25 -0
  4. package/dist/es/AU-C8Ubk0YW.js +19 -0
  5. package/dist/es/AU-DFQDmtVS.js +22 -0
  6. package/dist/es/AU-Dqj7rU9m.js +31 -0
  7. package/dist/es/BE-B9YzjIbl.js +21 -0
  8. package/dist/es/BE-C2-55587.js +20 -0
  9. package/dist/es/BE-DXN0rypg.js +25 -0
  10. package/dist/es/BR-B9ECFEsA.js +30 -0
  11. package/dist/es/BR-Cm5wlqzu.js +26 -0
  12. package/dist/es/BR-DRRnRMe_.js +24 -0
  13. package/dist/es/CA-CcUb1PsZ.js +28 -0
  14. package/dist/es/CA-DF_5NHUp.js +16 -0
  15. package/dist/es/CA-GPzRNbT4.js +19 -0
  16. package/dist/es/CH-BN1IKzah.js +20 -0
  17. package/dist/es/CH-DQ7wM16k.js +20 -0
  18. package/dist/es/CH-DS_pPGGY.js +20 -0
  19. package/dist/es/CZ-BC067qOt.js +24 -0
  20. package/dist/es/CZ-BC6mPfpV.js +28 -0
  21. package/dist/es/CZ-CGN19Iaf.js +24 -0
  22. package/dist/es/DE-BPXDYsIg.js +31 -0
  23. package/dist/es/DE-C2b48uc9.js +26 -0
  24. package/dist/es/DE-CWIcy4sf.js +25 -0
  25. package/dist/es/DK-CUV7SrN_.js +23 -0
  26. package/dist/es/DK-DQdJTd7G.js +24 -0
  27. package/dist/es/DK-DzkpuGcK.js +22 -0
  28. package/dist/es/ES-CXBTHBlj.js +24 -0
  29. package/dist/es/ES-DlS7RO1p.js +24 -0
  30. package/dist/es/ES-kwu_f0TB.js +33 -0
  31. package/dist/es/FI-D9lkf5Ag.js +20 -0
  32. package/dist/es/FI-DJJ7pR5Q.js +22 -0
  33. package/dist/es/FI-DrPckuaI.js +25 -0
  34. package/dist/es/FR-C62B055T.js +22 -0
  35. package/dist/es/FR-CgtCG2F8.js +28 -0
  36. package/dist/es/FR-CmqiYchK.js +26 -0
  37. package/dist/es/GB-BsDyOPB2.js +19 -0
  38. package/dist/es/GB-C3gyya0v.js +23 -0
  39. package/dist/es/GB-CyOmxXhp.js +31 -0
  40. package/dist/es/HK-BHvvteyC.js +16 -0
  41. package/dist/es/HK-DL3Ev2gw.js +22 -0
  42. package/dist/es/HK-aqSN9boX.js +19 -0
  43. package/dist/es/HR-BYmZgEjN.js +22 -0
  44. package/dist/es/HR-BuR2eqt5.js +23 -0
  45. package/dist/es/HR-lqt3S_K0.js +24 -0
  46. package/dist/es/HU-BeWCk1sl.js +21 -0
  47. package/dist/es/HU-CXniaSYg.js +21 -0
  48. package/dist/es/HU-Cy7JJAmz.js +24 -0
  49. package/dist/es/IE-BqkOpYi0.js +29 -0
  50. package/dist/es/IE-DY6xU4Nq.js +16 -0
  51. package/dist/es/IE-ncc5PJTM.js +19 -0
  52. package/dist/es/IT-DIpVZHWq.js +25 -0
  53. package/dist/es/IT-DUpC-s62.js +24 -0
  54. package/dist/es/IT-o8X0Ep0w.js +24 -0
  55. package/dist/es/LT-DYEMsFLH.js +25 -0
  56. package/dist/es/LT-YEft7Aof.js +27 -0
  57. package/dist/es/LT-vsmh_veZ.js +16 -0
  58. package/dist/es/NL-Bl-zh21O.js +24 -0
  59. package/dist/es/NL-C0CXV7LQ.js +26 -0
  60. package/dist/es/NL-D4GPWO-k.js +18 -0
  61. package/dist/es/NO-6kmy-zV2.js +24 -0
  62. package/dist/es/NO-BWDB_9Zh.js +28 -0
  63. package/dist/es/NO-C2rMiNW_.js +16 -0
  64. package/dist/es/PL-B6DmYhdz.js +23 -0
  65. package/dist/es/PL-Cci2LxIN.js +24 -0
  66. package/dist/es/PL-DfF0yMD3.js +25 -0
  67. package/dist/es/PT-CiWuVvP4.js +23 -0
  68. package/dist/es/PT-ClgahH9J.js +25 -0
  69. package/dist/es/PT-_SJeajc_.js +29 -0
  70. package/dist/es/RO-B_4Ca0mt.js +20 -0
  71. package/dist/es/RO-CbO4Kr4f.js +16 -0
  72. package/dist/es/RO-DzjKAzZD.js +24 -0
  73. package/dist/es/SE-BJB_aDpP.js +26 -0
  74. package/dist/es/SE-ClnBSAdx.js +21 -0
  75. package/dist/es/SE-L3pYtteT.js +24 -0
  76. package/dist/es/SG-BCG6hbHH.js +19 -0
  77. package/dist/es/SG-Bys5Yryz.js +25 -0
  78. package/dist/es/SG-CQ7yymJt.js +21 -0
  79. package/dist/es/SI-CKmjaPXK.js +22 -0
  80. package/dist/es/SI-Dba9CKmF.js +25 -0
  81. package/dist/es/SI-DdcTeBdP.js +24 -0
  82. package/dist/es/SK-BHbQeHKV.js +21 -0
  83. package/dist/es/SK-DOx6jvRF.js +24 -0
  84. package/dist/es/SK-DdRSQwOF.js +28 -0
  85. package/dist/es/US-BfGmXLD9.js +19 -0
  86. package/dist/es/US-CtLttEVX.js +26 -0
  87. package/dist/es/US-Dxp45Utb.js +17 -0
  88. package/dist/es/adyen-kyc-components.es.js +986 -524
  89. package/dist/es/company-2-JG34IScE.js +8 -0
  90. package/dist/es/user-D6swzlYs.js +11 -0
  91. package/dist/es/user-business-CwS5j1qX.js +11 -0
  92. package/dist/es/users-3-BdjQ9rEA.js +8 -0
  93. package/dist/style.css +7798 -5870
  94. package/dist/types/components/BankVerification/BankVerification.d.ts +1 -1
  95. package/dist/types/components/BankVerification/types.d.ts +5 -5
  96. package/dist/types/components/BusinessTypeSelection/component/EntityTypeRadioGroupCard.d.ts +11 -0
  97. package/dist/types/components/BusinessTypeSelection/utils.d.ts +6 -3
  98. package/dist/types/components/Company/component/CompanyComponent.d.ts +4 -0
  99. package/dist/types/components/Company/types.d.ts +2 -1
  100. package/dist/types/components/CompanyBasics/types.d.ts +3 -3
  101. package/dist/types/components/CompanyLookup/types.d.ts +4 -4
  102. package/dist/types/components/CompanySearch/forms.d.ts +3 -1
  103. package/dist/types/components/CompanySearch/types.d.ts +2 -0
  104. package/dist/types/components/CompanyStructure/component/CompanyStructureComponent.d.ts +1 -1
  105. package/dist/types/components/CompanyStructure/types.d.ts +4 -1
  106. package/dist/types/components/DocumentUpload/types.d.ts +4 -0
  107. package/dist/types/components/Dropins/CompanySearchDropin/components/CompanySearchDropinComponent.d.ts +1 -1
  108. package/dist/types/components/Dropins/CompanySearchDropin/types.d.ts +1 -0
  109. package/dist/types/components/Dropins/PayoutDetailsDropin/components/PayoutDetailsDropinComponent.d.ts +0 -3
  110. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/ServiceAgreementDropinComponent.d.ts +2 -1
  111. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/useServiceAgreement.d.ts +1 -0
  112. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +6 -2
  113. package/dist/types/components/Dropins/types.d.ts +4 -2
  114. package/dist/types/components/Individual/types.d.ts +2 -3
  115. package/dist/types/components/PayoutDetails/types.d.ts +4 -3
  116. package/dist/types/components/RegistrationDocument/RegistrationDocumentComponent.d.ts +2 -0
  117. package/dist/types/components/RegistrationDocument/config.d.ts +3 -0
  118. package/dist/types/components/RegistrationDocument/index.d.ts +1 -0
  119. package/dist/types/components/RegistrationDocument/types.d.ts +15 -0
  120. package/dist/types/components/SoleProp/types.d.ts +2 -1
  121. package/dist/types/components/TaskList/types.d.ts +2 -2
  122. package/dist/types/components/TaxDocument/TaxDocumentComponent.d.ts +2 -0
  123. package/dist/types/components/TaxDocument/config.d.ts +3 -0
  124. package/dist/types/components/TaxDocument/index.d.ts +1 -0
  125. package/dist/types/components/TaxDocument/types.d.ts +15 -0
  126. package/dist/types/components/Trust/types.d.ts +2 -1
  127. package/dist/types/components/internal/BusinessRegistrationNumberField/types.d.ts +2 -2
  128. package/dist/types/components/internal/EntityAssociation/types.d.ts +2 -2
  129. package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCard.d.ts +1 -1
  130. package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCardSelect.d.ts +3 -2
  131. package/dist/types/components/internal/FormFields/RadioGroupCard/RadioGroupCard.d.ts +1 -1
  132. package/dist/types/components/internal/FormFields/RadioGroupCard/types.d.ts +9 -3
  133. package/dist/types/components/internal/Icon/Icon.d.ts +4 -0
  134. package/dist/types/components/internal/Remove/types.d.ts +3 -3
  135. package/dist/types/components/internal/Summary/Summary.d.ts +1 -1
  136. package/dist/types/components/internal/Summary/types.d.ts +1 -0
  137. package/dist/types/components/internal/TaxInformationField/types.d.ts +2 -2
  138. package/dist/types/components/internal/VatNumberField/types.d.ts +2 -2
  139. package/dist/types/core/hooks/introduction/useHasSeenIntroduction.d.ts +1 -1
  140. package/dist/types/core/hooks/useBankConfigurationHandlers.d.ts +2 -1
  141. package/dist/types/core/hooks/useCompanySearch/types.d.ts +2 -2
  142. package/dist/types/core/hooks/useCompanySearchTaskSubmit.d.ts +5 -4
  143. package/dist/types/core/hooks/useForm/types.d.ts +11 -10
  144. package/dist/types/core/hooks/useFormComposer.d.ts +2 -2
  145. package/dist/types/core/hooks/useLocalStorage.d.ts +2 -2
  146. package/dist/types/core/models/api/contracts.d.ts +6 -0
  147. package/dist/types/core/models/api/get-configuration.d.ts +2 -1
  148. package/dist/types/core/models/form-rules.d.ts +2 -0
  149. package/dist/types/core/models/form.d.ts +1 -0
  150. package/dist/types/datasets/localized/companyTypeExamples/getCompanyTypeExamplesForCountry.d.ts +5 -0
  151. package/dist/types/datasets/localized/legalArrangementTypeExamples/getLegalArrangementTypeExamplesForCountry.d.ts +5 -0
  152. package/dist/types/datasets/localized/legalEntityTypeExamples/getBusinessTypeExamplesForCountry.d.ts +5 -0
  153. package/dist/types/utils/accountHolderUtils.d.ts +2 -0
  154. package/dist/types/utils/api/processCapabilitites.d.ts +2 -0
  155. package/dist/types/utils/getLegalEntityCountry.d.ts +3 -0
  156. package/dist/types/utils/mapping/companySearch/mapLegalEntityToCompanySearchSchema.d.ts +1 -1
  157. package/dist/types/utils/useStateFromProp.d.ts +2 -2
  158. package/package.json +1 -1
@@ -16,6 +16,16 @@ const useConfigurationApi = () => {
16
16
  }
17
17
  return configurationApi;
18
18
  };
19
+ const ExperimentsContext = createContext({
20
+ isExperimentEnabled: () => false
21
+ });
22
+ function useExperimentsContext() {
23
+ const context = useContext(ExperimentsContext);
24
+ if (context === void 0) {
25
+ throw new Error("useExperimentContext must be used within a ExperimentProvider");
26
+ }
27
+ return context;
28
+ }
19
29
  const smartling = {
20
30
  placeholder_format: "YAML",
21
31
  translate_paths: [
@@ -115,6 +125,7 @@ const browse = "Browse";
115
125
  const supports = "Supports: %{fileTypes}. Size up to %{maxSize}. Maximum %{maxFiles} page.";
116
126
  const complete = "Complete";
117
127
  const summary$1 = "Summary";
128
+ const summaryLegalCaption = "By submitting this summary you are confirming the following; I confirm (on behalf of the company that I am authorized to represent), that the information and supporting documentation provided during this KYC process is accurate and up-to-date, and therefore correctly represents the current state of affairs.";
118
129
  const selectDocument = "Select a document";
119
130
  const passport = "Passport";
120
131
  const passportNumber = "Passport number";
@@ -152,9 +163,9 @@ const verifyPrefilledInfoIsCorrect = "Verify if your prefilled information is co
152
163
  const legalStructureHeader = "Tell us your legal structure";
153
164
  const whatTypeOfCompanyDoYouHave = "What type of company do you have?";
154
165
  const privateCompanyTitle = "Private company";
155
- const privateCompanyDescription = "Owned privately. The shareholders don’t necessarily trade on public exchanges (like the stock market).";
166
+ const privateCompanyDescription = "Your company is owned privately and not traded on a public stock exchange. ";
156
167
  const publicCompanyTitle = "Public company";
157
- const publicCompanyDescription = "Owned by public shareholders. They’re also required to disclose financial information to the public regularly.";
168
+ const publicCompanyDescription = "Your company is traded on a public stock exchange, and has to disclose financial information to the public regularly.";
158
169
  const partnershipIncorporated = "Incorporated partnership";
159
170
  const partnershipUnincorporated = "Unincorporated partnership";
160
171
  const partnershipIncorporatedDescription = "An agreement between two or more people who run a business together.";
@@ -162,9 +173,9 @@ const partnershipUnincorporatedDescription = "You or your partners are personall
162
173
  const partnershipIncorporatedNewEntryFlowDescription = "You and your partners have limited liability for business debts.";
163
174
  const partnershipUnincorporatedNewEntryFlowDescription = "You or your partners are personally liable for business debts.";
164
175
  const nonProfitOrCharitableOrgTitle = "Non-profit or charitable organization";
165
- const nonProfitOrCharitableOrgDescription = "An organization that has an official status as not for profit or tax exempt, sometimes called an NGO.";
176
+ const nonProfitOrCharitableOrgDescription = "Your organization has official non-profit or tax-exempt status.";
166
177
  const governmentalOrganizationTitle = "Governmental organization";
167
- const governmentalOrganizationDescription = "Owned by the government or state.";
178
+ const governmentalOrganizationDescription = "Your organization is owned by the government or state.";
168
179
  const associationIncorporated = "Incorporated association";
169
180
  const associationIncorporatedDescription = "A registered entity without profit that's organized around a purpose such as recreation, culture, or charity.";
170
181
  const jobTitle = "Job title";
@@ -279,7 +290,7 @@ const failedToGetPciTemplate = "Failed to get PCI template";
279
290
  const failedToGetPciTemplateInSelectedLanguageFallbackToEn = "Failed to get the PCI template in the selected language. Falling back to English.";
280
291
  const failedToDownloadPci = "Failed to download PCI document(s)";
281
292
  const signServiceAgreement = "Sign services agreement";
282
- const signedDocuments = "Signed documents";
293
+ const failedToDownloadAcceptedServiceAgreementDocument = "Failed to download accepted service agreement document";
283
294
  const paymentProcessingTerms = "Payment Processing Terms";
284
295
  const accountHolderTerms = "Account Holder Terms";
285
296
  const capitalUserTerms = "Capital User Terms";
@@ -350,6 +361,7 @@ const decisionMakers = "Decision-makers";
350
361
  const goToIntroduction = "How does it work?";
351
362
  const goToOverview = "Go to overview";
352
363
  const goToOverviewFromIntroduction = "Skip intro";
364
+ const previous = "Previous";
353
365
  const saveAndGoToOverview = "Save and go to overview";
354
366
  const pleaseEnsureTheFollowing = "Please ensure the following section is fulfilled to complete the review of your data.";
355
367
  const edit = "Edit";
@@ -651,11 +663,11 @@ const sorryWeCantSetUpAnAccountForYou = "Sorry, we can’t set up an account for
651
663
  const changeYourBusinessSetup = "Change your business setup?";
652
664
  const someInformationWillNotBeSaved = "Some information that you entered previously will not be saved. ";
653
665
  const yesChange = "Yes, change";
654
- const youAreNotSoleProprietorAndUseBankAccount = "You’re not a sole proprietor and you use a personal bank account.";
666
+ const youAreNotSoleProprietorAndUseBankAccount = "You’re not a registered sole proprietor, and you use a bank account in your name.";
655
667
  const soleProprietorship = "Sole proprietorship";
656
- const youAreRegisteredSoleProprietorAndUseBankAccount = "You’re a registered sole proprietor and you use a bank account in your name or sole proprietorship’s name.";
668
+ const youAreRegisteredSoleProprietorAndUseBankAccount = "You’re a registered sole proprietor, and you use a bank account in your name or sole proprietorship’s name.";
657
669
  const company = "Company";
658
- const youUseCompanyBankAccount = "You use a company bank account.";
670
+ const yourBusinessIsRegisteredAsASeparateLegalEntityFromItsOwners = "Your business is registered as a separate legal entity from its owners.";
659
671
  const trust = "Trust";
660
672
  const trustPartnershipOrAssociation = "Trust, partnership, or association";
661
673
  const partnershipOrAssociation = "Partnership, or association";
@@ -668,7 +680,7 @@ const association = "Association";
668
680
  const partnership = "Partnership";
669
681
  const youAreTrusteeManagingTheTrustForBeneficiaries = "You’re a trustee managing the trust for beneficiaries.";
670
682
  const jointlyOwnedBusinessWhereTwoOrMorePeopleOperateAndShareProfits = "A jointly owned business where two or more people operate and share profits.";
671
- const groupOfPeopleActingTogetherForNonCommercialPurpose = "A group of people acting together for a non-commercial purpose.";
683
+ const yourAssociationIsRegisteredItWasSetUpForNonCommercialPurpose = "Your association is registered. It was set up for recreational, cultural, or non-profit purposes.";
672
684
  const ourFinancialServicesAreNotAvailableYetForPartnershipsAndAssociations = "Our financial services aren’t available yet for partnerships and associations";
673
685
  const needHelpYouCanAlwaysReachOutToCustomerSupport = "Need help? You can always reach out to customer support.";
674
686
  const myName = "My name";
@@ -777,6 +789,26 @@ const goBackAndProvideDocumentScans = "Go back and provide document scans";
777
789
  const identityCard = "Identity card";
778
790
  const uploadOneOfTheFollowing = "Upload one of the following so we can verify your information:";
779
791
  const uploadOneOfTheseDocuments = "Upload one of these documents:";
792
+ const acceptedDocumentsForPrivateCompanies = "Accepted documents for private companies";
793
+ const acceptedDocumentsForPublicCompanies = "Accepted documents for public companies";
794
+ const acceptedDocumentsForPartnerships = "Accepted documents for partnerships";
795
+ const acceptedDocumentsForGovernment = "Accepted documents for government agencies";
796
+ const acceptedDocumentsForNonProfit = "Accepted documents for non-profit organizations";
797
+ const includesLegalCompanyName = "Includes the legal name of your company";
798
+ const includesEIN = "Includes your EIN (Employer Identification Number)";
799
+ const irsCP575 = "IRS CP 575 letter";
800
+ const secForm10k = "SEC Form 10-K";
801
+ const annualReport = "Annual Report";
802
+ const irsScheduleK1 = "IRS Schedule K-1 (Form 1065)";
803
+ const certificateOfIncorporation = "Certificate of incorporation";
804
+ const certificateOfFormation = "Certificate of formation";
805
+ const secretaryOfStateFiling = "Secretary of State filing";
806
+ const partnerShipAgreement = "Partnership agreement";
807
+ const charter = "Charter";
808
+ const articlesOfIncorporation = "Articles of incorporation";
809
+ const meetingRecords = "Board of directors' meeting records of decisions";
810
+ const secretaryOfStateRegDoc = "Registration document from Secretary of State";
811
+ const certificateOfIncumbency = "Certificate of incumbency";
780
812
  const documentIssuedWithinLastYear = "The document must be issued in the last 12 months. If it is older, make sure it contains a signature and a statement of affairs from the last 12 months.";
781
813
  const learnMore = "Learn more";
782
814
  const doingBusinessAsNameFiling = "Doing business as (DBA) filing";
@@ -898,9 +930,11 @@ const companyStructureFormName = "Company structure";
898
930
  const companyStructureFormDescription = "What type of company do you have?";
899
931
  const companyOtherDetailsFormName = "Other details";
900
932
  const companyRegistrationDocumentFormName = "Registration document";
901
- const companyRegistrationDocumentFormDescription = "Please upload your companies registration document so we can verify your information.";
933
+ const companyRegistrationDocumentHeading = "Upload a registration document";
934
+ const companyRegistrationDocumentFormDescription = "We need an official document to verify your organization’s details.";
902
935
  const companyTaxDocumentFormName = "Tax document";
903
- const companyTaxDocumentFormDescription = "Please upload your companies tax documents so we can verify your information.";
936
+ const companyTaxDocumentFormHeading = "Upload a tax document";
937
+ const companyTaxDocumentFormDescription = "We need an official document to verify your organization’s tax details.";
904
938
  const errorMessage_1_10 = "Information couldn’t be verified";
905
939
  const errorMessage_1_11 = "Document didn’t meet requirements";
906
940
  const errorMessage_1_12 = "Legal entity declined";
@@ -1264,6 +1298,7 @@ const missingDetailsToPerformPayouts = "We are missing some details in order to
1264
1298
  const completeAddingAccount = "Complete adding account";
1265
1299
  const removeThisBankAccount = "Remove this bank account";
1266
1300
  const editDetails = "Edit details";
1301
+ const eg_ = "E.g. %{examples}";
1267
1302
  const defaultTrans = {
1268
1303
  smartling,
1269
1304
  close,
@@ -1356,6 +1391,7 @@ const defaultTrans = {
1356
1391
  supports,
1357
1392
  complete,
1358
1393
  summary: summary$1,
1394
+ summaryLegalCaption,
1359
1395
  selectDocument,
1360
1396
  passport,
1361
1397
  passportNumber,
@@ -1520,7 +1556,7 @@ const defaultTrans = {
1520
1556
  failedToGetPciTemplateInSelectedLanguageFallbackToEn,
1521
1557
  failedToDownloadPci,
1522
1558
  signServiceAgreement,
1523
- signedDocuments,
1559
+ failedToDownloadAcceptedServiceAgreementDocument,
1524
1560
  paymentProcessingTerms,
1525
1561
  accountHolderTerms,
1526
1562
  capitalUserTerms,
@@ -1591,6 +1627,7 @@ const defaultTrans = {
1591
1627
  goToIntroduction,
1592
1628
  goToOverview,
1593
1629
  goToOverviewFromIntroduction,
1630
+ previous,
1594
1631
  saveAndGoToOverview,
1595
1632
  pleaseEnsureTheFollowing,
1596
1633
  edit,
@@ -1901,7 +1938,7 @@ const defaultTrans = {
1901
1938
  soleProprietorship,
1902
1939
  youAreRegisteredSoleProprietorAndUseBankAccount,
1903
1940
  company,
1904
- youUseCompanyBankAccount,
1941
+ yourBusinessIsRegisteredAsASeparateLegalEntityFromItsOwners,
1905
1942
  trust,
1906
1943
  trustPartnershipOrAssociation,
1907
1944
  partnershipOrAssociation,
@@ -1914,7 +1951,7 @@ const defaultTrans = {
1914
1951
  partnership,
1915
1952
  youAreTrusteeManagingTheTrustForBeneficiaries,
1916
1953
  jointlyOwnedBusinessWhereTwoOrMorePeopleOperateAndShareProfits,
1917
- groupOfPeopleActingTogetherForNonCommercialPurpose,
1954
+ yourAssociationIsRegisteredItWasSetUpForNonCommercialPurpose,
1918
1955
  ourFinancialServicesAreNotAvailableYetForPartnershipsAndAssociations,
1919
1956
  needHelpYouCanAlwaysReachOutToCustomerSupport,
1920
1957
  myName,
@@ -2025,6 +2062,26 @@ const defaultTrans = {
2025
2062
  identityCard,
2026
2063
  uploadOneOfTheFollowing,
2027
2064
  uploadOneOfTheseDocuments,
2065
+ acceptedDocumentsForPrivateCompanies,
2066
+ acceptedDocumentsForPublicCompanies,
2067
+ acceptedDocumentsForPartnerships,
2068
+ acceptedDocumentsForGovernment,
2069
+ acceptedDocumentsForNonProfit,
2070
+ includesLegalCompanyName,
2071
+ includesEIN,
2072
+ irsCP575,
2073
+ secForm10k,
2074
+ annualReport,
2075
+ irsScheduleK1,
2076
+ certificateOfIncorporation,
2077
+ certificateOfFormation,
2078
+ secretaryOfStateFiling,
2079
+ partnerShipAgreement,
2080
+ charter,
2081
+ articlesOfIncorporation,
2082
+ meetingRecords,
2083
+ secretaryOfStateRegDoc,
2084
+ certificateOfIncumbency,
2028
2085
  documentIssuedWithinLastYear,
2029
2086
  learnMore,
2030
2087
  doingBusinessAsNameFiling,
@@ -2147,8 +2204,10 @@ const defaultTrans = {
2147
2204
  companyStructureFormDescription,
2148
2205
  companyOtherDetailsFormName,
2149
2206
  companyRegistrationDocumentFormName,
2207
+ companyRegistrationDocumentHeading,
2150
2208
  companyRegistrationDocumentFormDescription,
2151
2209
  companyTaxDocumentFormName,
2210
+ companyTaxDocumentFormHeading,
2152
2211
  companyTaxDocumentFormDescription,
2153
2212
  errorMessage_1_10,
2154
2213
  errorMessage_1_11,
@@ -2512,7 +2571,8 @@ const defaultTrans = {
2512
2571
  missingDetailsToPerformPayouts,
2513
2572
  completeAddingAccount,
2514
2573
  removeThisBankAccount,
2515
- editDetails
2574
+ editDetails,
2575
+ eg_
2516
2576
  };
2517
2577
  const FALLBACK_LOCALE = "en-US";
2518
2578
  const defaultTranslation = Object.entries(defaultTrans).reduce((acc, [translationKey, translationValue]) => translationKey !== "smartling" ? {
@@ -2724,16 +2784,6 @@ const useCoreContext = () => {
2724
2784
  throw Error("You need a <CoreProvider> to use core context");
2725
2785
  return context;
2726
2786
  };
2727
- const ExperimentsContext = createContext({
2728
- isExperimentEnabled: () => false
2729
- });
2730
- function useExperimentsContext() {
2731
- const context = useContext(ExperimentsContext);
2732
- if (context === void 0) {
2733
- throw new Error("useExperimentContext must be used within a ExperimentProvider");
2734
- }
2735
- return context;
2736
- }
2737
2787
  var SettingNames = /* @__PURE__ */ ((SettingNames2) => {
2738
2788
  SettingNames2["AcceptedCountries"] = "acceptedCountries";
2739
2789
  SettingNames2["AllowBankAccountFormatSelection"] = "allowBankAccountFormatSelection";
@@ -2981,6 +3031,7 @@ const icons = {
2981
3031
  "chevron-right": lazy(() => import("./chevron-right-DczMHcvL.js")),
2982
3032
  "chevron-up": lazy(() => import("./chevron-up-BLtnROd5.js")),
2983
3033
  company: lazy(() => import("./company-D5_F_6SW.js")),
3034
+ "company-2": lazy(() => import("./company-2-JG34IScE.js")),
2984
3035
  contract: lazy(() => import("./contract-C6wDy9zU.js")),
2985
3036
  "controlling-person": lazy(() => import("./controlling-person-C4KoSyi2.js")),
2986
3037
  cross: lazy(() => import("./cross-BadGfrgB.js")),
@@ -3004,6 +3055,9 @@ const icons = {
3004
3055
  signatory: lazy(() => import("./signatory-BVoLPYPu.js")),
3005
3056
  store: lazy(() => import("./store-D2z639xh.js")),
3006
3057
  trust: lazy(() => import("./trust-CpcaQaV7.js")),
3058
+ user: lazy(() => import("./user-D6swzlYs.js")),
3059
+ "user-business": lazy(() => import("./user-business-CwS5j1qX.js")),
3060
+ "users-3": lazy(() => import("./users-3-BdjQ9rEA.js")),
3007
3061
  warning: lazy(() => import("./warning-99uFf1WU.js")),
3008
3062
  wrong: lazy(() => import("./wrong-1wvh7nZe.js"))
3009
3063
  };
@@ -10378,6 +10432,210 @@ const countryConfig$3 = {
10378
10432
  }
10379
10433
  }
10380
10434
  };
10435
+ const companyTypeExamples = /* @__PURE__ */ Object.assign({ "./AT.json": () => import("./AT-BgQV6hNb.js"), "./AU.json": () => import("./AU-Dqj7rU9m.js"), "./BE.json": () => import("./BE-DXN0rypg.js"), "./BR.json": () => import("./BR-B9ECFEsA.js"), "./CA.json": () => import("./CA-CcUb1PsZ.js"), "./CH.json": () => import("./CH-DQ7wM16k.js"), "./CZ.json": () => import("./CZ-BC6mPfpV.js"), "./DE.json": () => import("./DE-BPXDYsIg.js"), "./DK.json": () => import("./DK-DzkpuGcK.js"), "./ES.json": () => import("./ES-kwu_f0TB.js"), "./FI.json": () => import("./FI-DrPckuaI.js"), "./FR.json": () => import("./FR-CgtCG2F8.js"), "./GB.json": () => import("./GB-CyOmxXhp.js"), "./HK.json": () => import("./HK-DL3Ev2gw.js"), "./HR.json": () => import("./HR-BYmZgEjN.js"), "./HU.json": () => import("./HU-CXniaSYg.js"), "./IE.json": () => import("./IE-BqkOpYi0.js"), "./IT.json": () => import("./IT-o8X0Ep0w.js"), "./LT.json": () => import("./LT-YEft7Aof.js"), "./NL.json": () => import("./NL-C0CXV7LQ.js"), "./NO.json": () => import("./NO-BWDB_9Zh.js"), "./PL.json": () => import("./PL-Cci2LxIN.js"), "./PT.json": () => import("./PT-_SJeajc_.js"), "./RO.json": () => import("./RO-B_4Ca0mt.js"), "./SE.json": () => import("./SE-BJB_aDpP.js"), "./SG.json": () => import("./SG-Bys5Yryz.js"), "./SI.json": () => import("./SI-Dba9CKmF.js"), "./SK.json": () => import("./SK-DdRSQwOF.js"), "./US.json": () => import("./US-CtLttEVX.js") });
10436
+ const getCompanyTypeExamplesForCountry = async (country2) => {
10437
+ const importForCountry = companyTypeExamples[`./${country2}.json`];
10438
+ if (!importForCountry) {
10439
+ console.warn(`No company type examples available for ${country2}`);
10440
+ return {};
10441
+ }
10442
+ return (await importForCountry()).default;
10443
+ };
10444
+ const useCompanyTypeExamples = (country2) => {
10445
+ const [examples, setExamples] = useState();
10446
+ useEffect(() => {
10447
+ getCompanyTypeExamplesForCountry(country2).then(setExamples).catch(console.error);
10448
+ }, [country2]);
10449
+ return examples;
10450
+ };
10451
+ const RadioCard = ({
10452
+ optionId,
10453
+ optionName,
10454
+ optionDescription,
10455
+ optionSubtitle,
10456
+ name,
10457
+ uniqueId,
10458
+ isInvalid,
10459
+ isSelected,
10460
+ onSelect,
10461
+ classNames,
10462
+ disabled,
10463
+ loading: loading2,
10464
+ icon,
10465
+ body,
10466
+ footer
10467
+ }) => {
10468
+ const {
10469
+ i18n
10470
+ } = useI18nContext();
10471
+ return jsxs("label", {
10472
+ htmlFor: uniqueId,
10473
+ className: cx(["adl-radio-card", classNames == null ? void 0 : classNames.label, {
10474
+ "adl-radio-card--disabled": disabled
10475
+ }]),
10476
+ children: [icon && jsx("div", {
10477
+ className: cx("adl-radio-card__icon", classNames == null ? void 0 : classNames.icon),
10478
+ "aria-hidden": "true",
10479
+ children: icon
10480
+ }), jsxs("div", {
10481
+ className: "adl-radio-card__content",
10482
+ children: [jsx("div", {
10483
+ className: "adl-radio-card__header adl-u-display-flex adl-u-align-items-center",
10484
+ children: jsxs("div", {
10485
+ className: cx(["adl-label", "adyen-kyc-radio-group-card__label", classNames == null ? void 0 : classNames.header, {
10486
+ "adyen-kyc-radio-group-card__label--invalid": isInvalid
10487
+ }]),
10488
+ children: [optionSubtitle && jsx("div", {
10489
+ className: "adyen-kyc-radio-group-card__subtitle",
10490
+ children: i18n.get(optionSubtitle) ?? optionSubtitle
10491
+ }), i18n.get(optionName) ?? optionName]
10492
+ })
10493
+ }), jsx("div", {
10494
+ className: cx("adl-radio-card__body", classNames == null ? void 0 : classNames.body),
10495
+ children: body ?? (optionDescription && i18n.get(optionDescription)) ?? optionDescription
10496
+ }), footer && jsx("div", {
10497
+ className: cx("adl-radio-card__footer", classNames == null ? void 0 : classNames.footer),
10498
+ children: footer
10499
+ })]
10500
+ }), loading2 ? jsx("span", {
10501
+ className: "adl-radio-card__loading-icon",
10502
+ children: jsx(Loader, {
10503
+ size: "xsmall",
10504
+ dot: true
10505
+ })
10506
+ }) : jsx(InputRadio, {
10507
+ id: uniqueId,
10508
+ type: "radio",
10509
+ checked: isSelected,
10510
+ className: "adyen-kyc-radio-group-card__input",
10511
+ name,
10512
+ onChange: onSelect,
10513
+ onClick: onSelect,
10514
+ value: optionId,
10515
+ "aria-checked": isSelected,
10516
+ disabled
10517
+ })]
10518
+ }, optionId);
10519
+ };
10520
+ function RadioCardSelect({
10521
+ options,
10522
+ name,
10523
+ onSelect,
10524
+ selected,
10525
+ isInvalid,
10526
+ uniqueId,
10527
+ className,
10528
+ optionId,
10529
+ optionName,
10530
+ optionDescription,
10531
+ optionSubtitle,
10532
+ optionClassNames,
10533
+ renderOptionIcon,
10534
+ renderOptionBody,
10535
+ renderOptionFooter,
10536
+ isOptionDisabled
10537
+ }) {
10538
+ const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
10539
+ return jsx("div", {
10540
+ className: className ?? "adyen-kyc-radio-group-card",
10541
+ children: options.map((option) => jsx(RadioCard, {
10542
+ optionId: optionId(option),
10543
+ optionName: optionName(option),
10544
+ optionDescription: optionDescription == null ? void 0 : optionDescription(option),
10545
+ optionSubtitle: optionSubtitle == null ? void 0 : optionSubtitle(option),
10546
+ uniqueId: getUniqueId(uniqueIdBase),
10547
+ isInvalid,
10548
+ isSelected: selected === option,
10549
+ onSelect: () => onSelect(option),
10550
+ name,
10551
+ classNames: optionClassNames == null ? void 0 : optionClassNames(option),
10552
+ icon: renderOptionIcon == null ? void 0 : renderOptionIcon(option),
10553
+ body: renderOptionBody == null ? void 0 : renderOptionBody(option),
10554
+ footer: renderOptionFooter == null ? void 0 : renderOptionFooter(option),
10555
+ disabled: isOptionDisabled == null ? void 0 : isOptionDisabled(option)
10556
+ }, optionId(option)))
10557
+ });
10558
+ }
10559
+ function RadioGroupCard({
10560
+ items,
10561
+ name,
10562
+ onSelect,
10563
+ selected,
10564
+ isInvalid,
10565
+ uniqueId,
10566
+ className,
10567
+ itemClassNames,
10568
+ itemIcon,
10569
+ itemBody,
10570
+ itemFooter,
10571
+ isItemDisabled
10572
+ }) {
10573
+ const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
10574
+ return jsx("div", {
10575
+ className: className ?? "adyen-kyc-radio-group-card",
10576
+ children: items.map((item) => jsx(RadioCard, {
10577
+ optionId: item.id,
10578
+ optionName: item.name,
10579
+ optionDescription: item.description,
10580
+ optionSubtitle: item.subtitle,
10581
+ uniqueId: getUniqueId(uniqueIdBase),
10582
+ isInvalid,
10583
+ isSelected: selected === item,
10584
+ onSelect: () => onSelect(item),
10585
+ name,
10586
+ classNames: itemClassNames == null ? void 0 : itemClassNames(item),
10587
+ icon: itemIcon == null ? void 0 : itemIcon(item),
10588
+ body: itemBody == null ? void 0 : itemBody(item),
10589
+ footer: itemFooter == null ? void 0 : itemFooter(item),
10590
+ disabled: isItemDisabled == null ? void 0 : isItemDisabled(item)
10591
+ }, item.id))
10592
+ });
10593
+ }
10594
+ const EntityTypeRadioGroupCard = ({
10595
+ examples,
10596
+ ...baseProps
10597
+ }) => jsx(RadioGroupCard, {
10598
+ ...baseProps,
10599
+ itemBody: (
10600
+ // eslint-disable-next-line react/no-unstable-nested-components
10601
+ (option) => option.description ? jsx(EntityTypeSelectionRadioCardBody, {
10602
+ description: option.description,
10603
+ examples: examples == null ? void 0 : examples[option.id]
10604
+ }) : void 0
10605
+ ),
10606
+ itemClassNames: () => ({
10607
+ header: "adyen-kyc-entity-type-radio-group-card__header",
10608
+ icon: "adyen-kyc-entity-type-radio-group-card__icon",
10609
+ label: "adyen-kyc-entity-type-radio-group-card__container",
10610
+ body: "adyen-kyc-entity-type-radio-group-card__body"
10611
+ })
10612
+ });
10613
+ const EntityTypeSelectionRadioCardBody = ({
10614
+ description: description2,
10615
+ examples
10616
+ }) => {
10617
+ const {
10618
+ i18n
10619
+ } = useI18nContext();
10620
+ if (!examples)
10621
+ return jsx("span", {
10622
+ children: i18n.get(description2)
10623
+ });
10624
+ return jsxs(Fragment, {
10625
+ children: [jsx("span", {
10626
+ className: "adyen-kyc-entity-type-radio-group-card__description",
10627
+ children: i18n.get(description2)
10628
+ }), jsxs("span", {
10629
+ className: "adyen-kyc-entity-type-radio-group-card__examples",
10630
+ children: [i18n.get({
10631
+ key: "eg_",
10632
+ values: {
10633
+ examples: examples.join(", ")
10634
+ }
10635
+ }), "."]
10636
+ })]
10637
+ });
10638
+ };
10381
10639
  var TrustMemberTypes = /* @__PURE__ */ ((TrustMemberTypes2) => {
10382
10640
  TrustMemberTypes2["DEFINED_BENEFICIARY"] = "definedBeneficiary";
10383
10641
  TrustMemberTypes2["UNDEFINED_BENEFICIARY"] = "undefinedBeneficiary";
@@ -10489,13 +10747,6 @@ const TRUST_DEFAULT_DESCRIPTIONS_MAP = {
10489
10747
  /* SETTLOR */
10490
10748
  ]: "provideAtLeastOneSettlor"
10491
10749
  };
10492
- var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
10493
- DecisionMakerType2["CONTROLLING_PERSON"] = "uboThroughControl";
10494
- DecisionMakerType2["OWNER"] = "uboThroughOwnership";
10495
- DecisionMakerType2["SIGNATORY"] = "signatory";
10496
- DecisionMakerType2["DIRECTOR"] = "director";
10497
- return DecisionMakerType2;
10498
- })(DecisionMakerType || {});
10499
10750
  var TaskTypes = /* @__PURE__ */ ((TaskTypes2) => {
10500
10751
  TaskTypes2["BUSINESS_TYPE_SELECTION"] = "BUSINESS_TYPE_SELECTION";
10501
10752
  TaskTypes2["INTRODUCTION"] = "INTRODUCTION";
@@ -10534,6 +10785,138 @@ var TaskStatus = /* @__PURE__ */ ((TaskStatus2) => {
10534
10785
  TaskStatus2[TaskStatus2["REMOVING"] = 9] = "REMOVING";
10535
10786
  return TaskStatus2;
10536
10787
  })(TaskStatus || {});
10788
+ const getDirectEntityAssociations = (rootLE, legalEntityId) => {
10789
+ var _a;
10790
+ return ((_a = rootLE == null ? void 0 : rootLE.entityAssociations) == null ? void 0 : _a.filter((association2) => association2.associatorId === legalEntityId)) ?? [];
10791
+ };
10792
+ const getOwnEntityAssociations = (legalEntity) => getDirectEntityAssociations(legalEntity, legalEntity.id);
10793
+ const getOwnSoleProprietorshipIdArray = (legalEntity) => {
10794
+ const ownAssociations = getOwnEntityAssociations(legalEntity);
10795
+ return ownAssociations.filter((ea) => ea.entityType === LegalEntityType.SOLE_PROPRIETORSHIP).map((ea) => ea.legalEntityId).filter((id2) => id2 !== void 0);
10796
+ };
10797
+ const hasSolePropInLegalEntity = (rootLegalEntity) => {
10798
+ var _a;
10799
+ return ((_a = rootLegalEntity.entityAssociations) == null ? void 0 : _a.some((ea) => ea.entityType === LegalEntityType.SOLE_PROPRIETORSHIP && ea.associatorId === rootLegalEntity.id)) ?? false;
10800
+ };
10801
+ const getOwnSolePropProblems = (rootLegalEntity, capabilityProblems) => {
10802
+ var _a;
10803
+ const solePropLegalEntityId = getOwnSoleProprietorshipIdArray(rootLegalEntity)[0];
10804
+ return (_a = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _a[solePropLegalEntityId];
10805
+ };
10806
+ const hasOwnEntityAssociationOfType = (type, entityAssociations, legalEntityId) => (entityAssociations == null ? void 0 : entityAssociations.some((ea) => ea.type === type && ea.associatorId === legalEntityId)) ?? false;
10807
+ const removeEntityAssociationByType = (type, entityAssociations, legalEntityId) => entityAssociations.filter((ea) => ea.type !== type || ea.associatorId !== legalEntityId);
10808
+ const isRootLegalEntity = (legalEntity, taskType) => legalEntity.type === LegalEntityType.INDIVIDUAL && taskType === TaskTypes.INDIVIDUAL || legalEntity.type === LegalEntityType.ORGANIZATION && taskType === TaskTypes.COMPANY || legalEntity.type === LegalEntityType.ORGANIZATION && taskType === TaskTypes.COMPANY_SEARCH;
10809
+ const filterOutUnwantedAssociationsIfRootLE = (taskType, legalEntity, accountHolder2) => {
10810
+ if (!(legalEntity == null ? void 0 : legalEntity.entityAssociations)) {
10811
+ return void 0;
10812
+ }
10813
+ let entityAssociations = getOwnEntityAssociations(legalEntity);
10814
+ if (!isRootLegalEntity(legalEntity, taskType)) {
10815
+ return entityAssociations;
10816
+ }
10817
+ if (accountHolder2 !== "mySoleProprietorName" && hasOwnEntityAssociationOfType(LegalEntityType.SOLE_PROPRIETORSHIP, entityAssociations, legalEntity.id)) {
10818
+ entityAssociations = removeEntityAssociationByType(LegalEntityType.SOLE_PROPRIETORSHIP, entityAssociations, legalEntity.id);
10819
+ }
10820
+ if (accountHolder2 !== "aTrust" && hasOwnEntityAssociationOfType(LegalEntityType.TRUST, entityAssociations, legalEntity.id)) {
10821
+ entityAssociations = removeEntityAssociationByType(LegalEntityType.TRUST, entityAssociations, legalEntity.id);
10822
+ }
10823
+ return entityAssociations;
10824
+ };
10825
+ var VerificationStatus = /* @__PURE__ */ ((VerificationStatus2) => {
10826
+ VerificationStatus2["VALID"] = "valid";
10827
+ VerificationStatus2["PENDING"] = "pending";
10828
+ VerificationStatus2["INVALID"] = "invalid";
10829
+ VerificationStatus2["REJECTED"] = "rejected";
10830
+ return VerificationStatus2;
10831
+ })(VerificationStatus || {});
10832
+ function getNestedPropertyKeys(obj, includeUndefined = false) {
10833
+ const fieldNames = [];
10834
+ Object.entries(obj).forEach(([key, value]) => {
10835
+ if (typeof value === "object" && value !== null) {
10836
+ const nested = getNestedPropertyKeys(value).map((name) => `${key}.${name}`);
10837
+ fieldNames.push(...nested);
10838
+ return;
10839
+ }
10840
+ if (value !== void 0 || includeUndefined) {
10841
+ fieldNames.push(key);
10842
+ }
10843
+ });
10844
+ return fieldNames;
10845
+ }
10846
+ const getTaskStatus = (type, capabilityProblems, rootLegalEntity, entityIds, skipPendingCapabilitiesCheck = false) => {
10847
+ if (!(entityIds == null ? void 0 : entityIds.length) || entityIds.includes(rootLegalEntity.id) && isEmptyEntity(rootLegalEntity))
10848
+ return TaskStatus.EMPTY;
10849
+ const importantCapabilityStatus = checkForImportantCapabilityStatus(type, capabilityProblems, entityIds);
10850
+ if (importantCapabilityStatus)
10851
+ return importantCapabilityStatus;
10852
+ if (!skipPendingCapabilitiesCheck && hasPendingCapabilities(rootLegalEntity))
10853
+ return TaskStatus.PROCESSING;
10854
+ return TaskStatus.FINISHED;
10855
+ };
10856
+ const IMPORTANT_STATUSES = [TaskStatus.DETAILS_REQUIRED, TaskStatus.DOWNLOAD, TaskStatus.ERROR, TaskStatus.PROCESSING];
10857
+ function checkForImportantCapabilityStatus(type, capabilityProblems, entityIds) {
10858
+ if (!(capabilityProblems == null ? void 0 : capabilityProblems[type]) || !entityIds)
10859
+ return;
10860
+ const importantStatuses = Object.entries(capabilityProblems[type] ?? {}).filter(([key]) => entityIds == null ? void 0 : entityIds.includes(key)).map(([, value]) => value.status).filter((status) => status !== void 0 && IMPORTANT_STATUSES.includes(status));
10861
+ if (!importantStatuses.length)
10862
+ return;
10863
+ return importantStatuses.reduce((prev, curr) => curr > prev ? curr : prev);
10864
+ }
10865
+ const hasPendingCapabilities = (legalEntityResponse) => Object.values(legalEntityResponse.capabilities ?? {}).some((capability) => capability.verificationStatus === "pending");
10866
+ const hasResolvedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).every((capability) => capability.verificationStatus !== VerificationStatus.PENDING);
10867
+ const hasRejectedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).some((capability) => capability.verificationStatus === VerificationStatus.REJECTED);
10868
+ const emptyFieldsForIndividual = ["name.firstName", "name.lastName", "residentialAddress.country"];
10869
+ const emptyFieldsForOrganization = ["legalName", "registeredAddress.country"];
10870
+ const emptyFieldsForTrust = ["name", "registeredAddress.country"];
10871
+ const emptyFieldsForSoleProp = ["name", "registeredAddress.country"];
10872
+ const emptyFieldsByEntityType = {
10873
+ [LegalEntityType.INDIVIDUAL]: emptyFieldsForIndividual,
10874
+ [LegalEntityType.ORGANIZATION]: emptyFieldsForOrganization,
10875
+ [LegalEntityType.TRUST]: emptyFieldsForTrust,
10876
+ [LegalEntityType.SOLE_PROPRIETORSHIP]: emptyFieldsForSoleProp
10877
+ };
10878
+ function isEmptyEntity(legalEntity) {
10879
+ var _a;
10880
+ const type = legalEntity == null ? void 0 : legalEntity.type;
10881
+ if (!type)
10882
+ return true;
10883
+ if ((_a = legalEntity.documentDetails) == null ? void 0 : _a.length)
10884
+ return false;
10885
+ const minimumFields = emptyFieldsByEntityType[type];
10886
+ const typeSpecificSection = legalEntity[type];
10887
+ if (!typeSpecificSection)
10888
+ return true;
10889
+ const fieldsOnEntity = getNestedPropertyKeys(typeSpecificSection);
10890
+ return !fieldsOnEntity.some((field) => !minimumFields.includes(field));
10891
+ }
10892
+ const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "receiveFromTransferInstrument", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
10893
+ const entityTypeToCorrespondingAccountHolderOption = {
10894
+ [LegalEntityType.INDIVIDUAL]: "myName",
10895
+ [LegalEntityType.ORGANIZATION]: "theCompanyIWorkFor",
10896
+ [LegalEntityType.SOLE_PROPRIETORSHIP]: "mySoleProprietorName",
10897
+ [LegalEntityType.TRUST]: "aTrust"
10898
+ };
10899
+ const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false) => {
10900
+ if (!(legalEntityResponse == null ? void 0 : legalEntityResponse.type))
10901
+ return void 0;
10902
+ if (hasOwnEntityAssociationOfType(LegalEntityType.SOLE_PROPRIETORSHIP, legalEntityResponse.entityAssociations, legalEntityResponse.id)) {
10903
+ return "mySoleProprietorName";
10904
+ }
10905
+ if (hasOwnEntityAssociationOfType(LegalEntityType.TRUST, legalEntityResponse.entityAssociations, legalEntityResponse.id)) {
10906
+ return "aTrust";
10907
+ }
10908
+ if (isTypeChanging || !isEmptyEntity(legalEntityResponse)) {
10909
+ return entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type];
10910
+ }
10911
+ };
10912
+ const allowIndividualWithoutSoleProp = (capabilities) => !(capabilities == null ? void 0 : capabilities.map((c) => c.replace("Commercial", "").replace("Consumer", "")).some((c) => capabilitiesToPreventTypeChange.includes(c)));
10913
+ var DecisionMakerType = /* @__PURE__ */ ((DecisionMakerType2) => {
10914
+ DecisionMakerType2["CONTROLLING_PERSON"] = "uboThroughControl";
10915
+ DecisionMakerType2["OWNER"] = "uboThroughOwnership";
10916
+ DecisionMakerType2["SIGNATORY"] = "signatory";
10917
+ DecisionMakerType2["DIRECTOR"] = "director";
10918
+ return DecisionMakerType2;
10919
+ })(DecisionMakerType || {});
10537
10920
  const REQUIRED = "REQUIRED";
10538
10921
  const SOLE_PROP_COUNTRIES = [CountryCodes.Austria, CountryCodes.Australia, CountryCodes.Belgium, CountryCodes.Bulgaria, CountryCodes.Canada, CountryCodes.Croatia, CountryCodes.Cyprus, CountryCodes.CzechRepublic, CountryCodes.Denmark, CountryCodes.Estonia, CountryCodes.Finland, CountryCodes.France, CountryCodes.Germany, CountryCodes.Gibraltar, CountryCodes.Greece, CountryCodes.Guernsey, CountryCodes.HongKong, CountryCodes.Hungary, CountryCodes.Ireland, CountryCodes.IsleOfMan, CountryCodes.Italy, CountryCodes.Jersey, CountryCodes.Latvia, CountryCodes.Liechtenstein, CountryCodes.Lithuania, CountryCodes.Luxembourg, CountryCodes.Malta, CountryCodes.Monaco, CountryCodes.Netherlands, CountryCodes.NewZealand, CountryCodes.Norway, CountryCodes.Poland, CountryCodes.Portugal, CountryCodes.PuertoRico, CountryCodes.Romania, CountryCodes.Singapore, CountryCodes.Slovakia, CountryCodes.Slovenia, CountryCodes.Spain, CountryCodes.Sweden, CountryCodes.Switzerland, CountryCodes.UnitedKingdom, CountryCodes.UnitedStates];
10539
10922
  const ID_NUMBER_EXEMPT_COUNTRIES = [CountryCodes.Canada, CountryCodes.UnitedStates];
@@ -10550,7 +10933,8 @@ const rules$3 = ({
10550
10933
  data,
10551
10934
  country: country2,
10552
10935
  taskType,
10553
- isEmbeddedDropin
10936
+ isEmbeddedDropin,
10937
+ isExperimentEnabled = () => false
10554
10938
  }) => ({
10555
10939
  isDirectorIdNumberRequiredForCountry: () => {
10556
10940
  var _a, _b, _c, _d, _e;
@@ -10621,7 +11005,7 @@ const rules$3 = ({
10621
11005
  }
10622
11006
  },
10623
11007
  accountHolderIfCustomer: () => {
10624
- if (taskType === TaskTypes.INDIVIDUAL && !isEmbeddedDropin) {
11008
+ if (taskType === TaskTypes.INDIVIDUAL && !isEmbeddedDropin && !(isExperimentEnabled == null ? void 0 : isExperimentEnabled("EnableNewEntryFlow"))) {
10625
11009
  return REQUIRED;
10626
11010
  }
10627
11011
  },
@@ -10667,7 +11051,6 @@ function getAvailableAccountHolderOptions(legalEntityType, isChangeOfLegalEntity
10667
11051
  return [];
10668
11052
  }
10669
11053
  }
10670
- const capabilitiesToPreventTypeChange = ["receivePayments", "issueCard", "useCard", "withdrawFromAtm", "withdrawFromAtmInRestrictedCountries", "receiveFromTransferInstrument", "useCardInRestrictedCountries", "useCardInRestrictedIndustries", "issueBankAccount", "sendToThirdParty", "receiveFromThirdParty", "getGrantOffers", "receiveGrants"];
10671
11054
  function AccountHolder(props) {
10672
11055
  var _a;
10673
11056
  const {
@@ -10681,15 +11064,12 @@ function AccountHolder(props) {
10681
11064
  capabilities
10682
11065
  } = props;
10683
11066
  const {
10684
- accountHolder: accountHolder2
11067
+ setAccountHolder
10685
11068
  } = useCoreContext();
10686
11069
  const {
10687
11070
  isSettingEnabled
10688
11071
  } = useSettingsContext();
10689
- const {
10690
- isExperimentEnabled
10691
- } = useExperimentsContext();
10692
- const isChangeToMyNameAllowed = !(capabilities == null ? void 0 : capabilities.map((c) => c.replace("Commercial", "").replace("Consumer", "")).some((c) => capabilitiesToPreventTypeChange.includes(c)));
11072
+ const isChangeToMyNameAllowed = allowIndividualWithoutSoleProp(capabilities ?? []);
10693
11073
  const accountHolderOptions = getAvailableAccountHolderOptions(props.legalEntityType, isSettingEnabled(SettingNames.AllowLegalEntityTypeChange), TRUST_COUNTRIES.includes(props.country), SOLE_PROP_COUNTRIES.includes(props.country), isChangeToMyNameAllowed).map((accountHolderOption) => ({
10694
11074
  id: accountHolderOption,
10695
11075
  name: i18n.get(accountHolderOption),
@@ -10704,10 +11084,6 @@ function AccountHolder(props) {
10704
11084
  const defaultData = {
10705
11085
  accountHolder: isDefaultOptionAvailable ? (_a = props.data) == null ? void 0 : _a.accountHolder : void 0
10706
11086
  };
10707
- const isNewEntryFlowEnabled = isExperimentEnabled("EnableNewEntryFlow");
10708
- if (isNewEntryFlowEnabled && defaultData) {
10709
- defaultData.accountHolder = accountHolder2 || defaultData.accountHolder;
10710
- }
10711
11087
  const {
10712
11088
  handleChangeFor,
10713
11089
  data,
@@ -10722,8 +11098,13 @@ function AccountHolder(props) {
10722
11098
  fieldProblems: props == null ? void 0 : props.fieldValidationErrors
10723
11099
  });
10724
11100
  useEffect(() => {
10725
- var _a2, _b;
10726
- (_b = (_a2 = stateRef.current) == null ? void 0 : _a2.setState) == null ? void 0 : _b.call(_a2, {
11101
+ var _a2, _b, _c;
11102
+ (_a2 = props.onChange) == null ? void 0 : _a2.call(props, {
11103
+ data,
11104
+ valid,
11105
+ errors
11106
+ });
11107
+ (_c = (_b = stateRef.current) == null ? void 0 : _b.setState) == null ? void 0 : _c.call(_b, {
10727
11108
  type: "addToState",
10728
11109
  value: {
10729
11110
  data,
@@ -10733,6 +11114,7 @@ function AccountHolder(props) {
10733
11114
  dataStoreId
10734
11115
  }
10735
11116
  });
11117
+ setAccountHolder((data == null ? void 0 : data.accountHolder) ?? null);
10736
11118
  }, [data, errors, valid, dataStoreId]);
10737
11119
  const formUtils = formUtilities(props, i18n);
10738
11120
  const questionLabel = i18n.get("nameOfBankAccountHolder");
@@ -10744,9 +11126,6 @@ function AccountHolder(props) {
10744
11126
  label: questionLabel,
10745
11127
  errorMessage: formUtils.getErrorMessage("accountHolder", errors, fieldProblems),
10746
11128
  isValid: valid.accountHolder,
10747
- className: cx({
10748
- "adl-u-display-none": isNewEntryFlowEnabled
10749
- }),
10750
11129
  classNameModifiers: ["account-holder"],
10751
11130
  children: (childProps) => jsx(Select, {
10752
11131
  ...childProps,
@@ -10759,150 +11138,6 @@ function AccountHolder(props) {
10759
11138
  }) : null]
10760
11139
  });
10761
11140
  }
10762
- const RadioCard = ({
10763
- optionId,
10764
- optionName,
10765
- optionDescription,
10766
- optionSubtitle,
10767
- name,
10768
- uniqueId,
10769
- isInvalid,
10770
- isSelected,
10771
- onSelect,
10772
- labelClassName,
10773
- className,
10774
- disabled,
10775
- loading: loading2,
10776
- icon,
10777
- body,
10778
- footer
10779
- }) => {
10780
- const {
10781
- i18n
10782
- } = useI18nContext();
10783
- return jsxs("label", {
10784
- htmlFor: uniqueId,
10785
- className: cx(["adl-radio-card", labelClassName, {
10786
- "adl-radio-card--disabled": disabled
10787
- }]),
10788
- children: [icon && jsx("div", {
10789
- className: "adl-u-margin-bottom-16 adl-radio-card__icon",
10790
- "aria-hidden": "true",
10791
- children: icon
10792
- }), jsxs("div", {
10793
- className: "adl-radio-card__content",
10794
- children: [jsxs("div", {
10795
- className: "adl-radio-card__header adl-u-display-flex adl-u-align-items-center",
10796
- children: [jsxs("div", {
10797
- className: cx(["adl-label", "adyen-kyc-radio-group-card__label", "adl-u-margin-bottom-16", className, {
10798
- "adyen-kyc-radio-group-card__label--invalid": isInvalid
10799
- }]),
10800
- children: [optionSubtitle && jsx("div", {
10801
- className: "adyen-kyc-radio-group-card__subtitle",
10802
- children: i18n.get(optionSubtitle) ?? optionSubtitle
10803
- }), i18n.get(optionName) ?? optionName]
10804
- }), loading2 ? jsx("span", {
10805
- className: "adl-radio-card__loading-icon",
10806
- children: jsx(Loader, {
10807
- size: "xsmall",
10808
- dot: true
10809
- })
10810
- }) : jsx(InputRadio, {
10811
- id: uniqueId,
10812
- type: "radio",
10813
- checked: isSelected,
10814
- className: "adyen-kyc-radio-group-card__input",
10815
- name,
10816
- onChange: onSelect,
10817
- onClick: onSelect,
10818
- value: optionId,
10819
- "aria-checked": isSelected,
10820
- disabled
10821
- })]
10822
- }), jsx("div", {
10823
- className: "adl-radio-card__body adl-u-margin-bottom-16",
10824
- children: body ?? (optionDescription && i18n.get(optionDescription)) ?? optionDescription
10825
- }), footer && jsx("div", {
10826
- className: "adl-u-margin-bottom-16",
10827
- children: footer
10828
- })]
10829
- })]
10830
- }, optionId);
10831
- };
10832
- function RadioCardSelect({
10833
- options,
10834
- name,
10835
- onSelect,
10836
- selected,
10837
- isInvalid,
10838
- uniqueId,
10839
- className,
10840
- optionId,
10841
- optionName,
10842
- optionDescription,
10843
- optionSubtitle,
10844
- optionLabelClassName,
10845
- renderOptionIcon,
10846
- renderOptionBody,
10847
- renderOptionFooter,
10848
- isOptionDisabled
10849
- }) {
10850
- const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
10851
- return jsx("div", {
10852
- className: className ?? "adyen-kyc-radio-group-card",
10853
- children: options.map((option) => jsx(RadioCard, {
10854
- optionId: optionId(option),
10855
- optionName: optionName(option),
10856
- optionDescription: optionDescription == null ? void 0 : optionDescription(option),
10857
- optionSubtitle: optionSubtitle == null ? void 0 : optionSubtitle(option),
10858
- uniqueId: getUniqueId(uniqueIdBase),
10859
- isInvalid,
10860
- isSelected: selected === option,
10861
- onSelect: () => onSelect(option),
10862
- name,
10863
- labelClassName: optionLabelClassName == null ? void 0 : optionLabelClassName(option),
10864
- icon: renderOptionIcon == null ? void 0 : renderOptionIcon(option),
10865
- body: renderOptionBody == null ? void 0 : renderOptionBody(option),
10866
- footer: renderOptionFooter == null ? void 0 : renderOptionFooter(option),
10867
- disabled: isOptionDisabled == null ? void 0 : isOptionDisabled(option)
10868
- }, optionId(option)))
10869
- });
10870
- }
10871
- function RadioGroupCard({
10872
- items,
10873
- name,
10874
- onSelect,
10875
- selected,
10876
- isInvalid,
10877
- uniqueId,
10878
- className,
10879
- itemLabelClassName,
10880
- itemIcon,
10881
- itemBody,
10882
- itemFooter,
10883
- isItemDisabled
10884
- }) {
10885
- const uniqueIdBase = uniqueId == null ? void 0 : uniqueId.replace(/[0-9]/g, "").substring(0, uniqueId.lastIndexOf("-"));
10886
- return jsx("div", {
10887
- className: className ?? "adyen-kyc-radio-group-card",
10888
- children: items.map((item) => jsx(RadioCard, {
10889
- optionId: item.id,
10890
- optionName: item.name,
10891
- optionDescription: item.description,
10892
- optionSubtitle: item.subtitle,
10893
- uniqueId: getUniqueId(uniqueIdBase),
10894
- isInvalid,
10895
- isSelected: selected === item,
10896
- onSelect: () => onSelect(item),
10897
- name,
10898
- labelClassName: itemLabelClassName == null ? void 0 : itemLabelClassName(item),
10899
- icon: itemIcon == null ? void 0 : itemIcon(item),
10900
- body: itemBody == null ? void 0 : itemBody(item),
10901
- footer: itemFooter == null ? void 0 : itemFooter(item),
10902
- disabled: isItemDisabled == null ? void 0 : isItemDisabled(item)
10903
- }, item.id))
10904
- });
10905
- }
10906
11141
  const companyTypeValidationRules = {
10907
11142
  entityType: {
10908
11143
  modes: ["blur"],
@@ -10957,6 +11192,7 @@ function CompanyTypeComponent(props) {
10957
11192
  });
10958
11193
  }, [data, valid, errors, isValid]);
10959
11194
  const companyTypeOptions = isNewEntryFlowEnabled ? companyTypes.filter((companyType2) => companyType2.id !== CompanyTypesValue.INCORPORATED_PARTNERSHIP && companyType2.id !== CompanyTypesValue.INCORPORATED_ASSOCIATION) : companyTypes;
11195
+ const companyTypeExamples2 = useCompanyTypeExamples(country2);
10960
11196
  return jsxs(Fragment, {
10961
11197
  children: [jsx(StateContextSetter, {
10962
11198
  owner: COMPANY_TYPE_ID,
@@ -10976,7 +11212,7 @@ function CompanyTypeComponent(props) {
10976
11212
  errorMessage: formUtils.getErrorMessage("entityType", errors, fieldProblems),
10977
11213
  label: formUtils.getLabel("entityType", "whatTypeOfCompanyDoYouHave"),
10978
11214
  classNameModifiers: ["entityType"],
10979
- children: (childProps) => jsx(RadioGroupCard, {
11215
+ children: (childProps) => jsx(EntityTypeRadioGroupCard, {
10980
11216
  ...childProps,
10981
11217
  name: "entityType",
10982
11218
  items: companyTypeOptions,
@@ -10985,7 +11221,8 @@ function CompanyTypeComponent(props) {
10985
11221
  onSelect: (item) => handleChangeFor("entityType")(item.id),
10986
11222
  "aria-required": true,
10987
11223
  "aria-label": formUtils.getLabel("entityType", "whatTypeOfCompanyDoYouHave"),
10988
- "aria-invalid": !valid.entityType
11224
+ "aria-invalid": !valid.entityType,
11225
+ examples: companyTypeExamples2
10989
11226
  })
10990
11227
  }), !isNewEntryFlowEnabled && formUtils.isRequiredField("accountHolder") && country2 && jsx(AccountHolder, {
10991
11228
  ...accountHolderProps,
@@ -11608,7 +11845,7 @@ function DocumentUploadComponent({
11608
11845
  })]
11609
11846
  });
11610
11847
  }
11611
- const DocumentUpload = memo(DocumentUploadComponent, (prevProps, nextProps) => prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.documentTypeSelect, nextProps.documentTypeSelect) && prevProps.documentField === nextProps.documentField && prevProps.name === nextProps.name);
11848
+ const DocumentUpload = memo(DocumentUploadComponent, (prevProps, nextProps) => prevProps.shouldValidate === nextProps.shouldValidate && objectsDeepEqual(prevProps.requiredFields, nextProps.requiredFields) && objectsDeepEqual(prevProps.data, nextProps.data) && objectsDeepEqual(prevProps.formVerificationErrors, nextProps.formVerificationErrors) && objectsDeepEqual(prevProps.fieldValidationErrors, nextProps.fieldValidationErrors) && objectsDeepEqual(prevProps.documentTypeSelect, nextProps.documentTypeSelect) && prevProps.documentField === nextProps.documentField && prevProps.name === nextProps.name && prevProps.country === nextProps.country && prevProps.companyType === nextProps.companyType);
11612
11849
  function List({
11613
11850
  className,
11614
11851
  nested,
@@ -12754,6 +12991,221 @@ function RegistrationAddressComponent(props) {
12754
12991
  })]
12755
12992
  });
12756
12993
  }
12994
+ const ACCEPTED_DOCUMENTS_MAP$1 = {
12995
+ [CountryCodes.UnitedStates]: {
12996
+ [CompanyTypesValue.PRIVATE_COMPANY]: {
12997
+ header: "acceptedDocumentsForPrivateCompanies",
12998
+ documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling"]
12999
+ },
13000
+ [CompanyTypesValue.PUBLIC_COMPANY]: {
13001
+ header: "acceptedDocumentsForPublicCompanies",
13002
+ documents: ["certificateOfIncorporation", "certificateOfFormation"]
13003
+ },
13004
+ [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
13005
+ header: "acceptedDocumentsForPublicCompanies",
13006
+ documents: ["certificateOfIncorporation", "certificateOfFormation"]
13007
+ },
13008
+ [CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
13009
+ header: "acceptedDocumentsForGovernment",
13010
+ documents: ["charter"]
13011
+ },
13012
+ [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
13013
+ header: "acceptedDocumentsForNonProfit",
13014
+ documents: ["articlesOfIncorporation", "meetingRecords", "secretaryOfStateRegDoc", "certificateOfIncumbency"]
13015
+ },
13016
+ [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
13017
+ header: "acceptedDocumentsForPartnerships",
13018
+ documents: ["partnerShipAgreement", "secretaryOfStateFiling"]
13019
+ }
13020
+ }
13021
+ };
13022
+ const GuidanceContent$1 = ({
13023
+ i18n,
13024
+ country: country2,
13025
+ companyType: companyType2
13026
+ }) => {
13027
+ var _a;
13028
+ const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country2]) == null ? void 0 : _a[companyType2];
13029
+ return jsx("div", {
13030
+ className: "adyen-kyc-upload-field__guidance",
13031
+ children: country2 === "US" ? jsxs(Fragment, {
13032
+ children: [acceptedDocGuidance && jsxs("div", {
13033
+ className: "adl-u-margin-bottom-24",
13034
+ children: [jsx("strong", {
13035
+ children: i18n.get(acceptedDocGuidance.header)
13036
+ }), jsx(List, {
13037
+ className: "adl-u-margin-left-8",
13038
+ children: acceptedDocGuidance.documents.map((document2) => jsx(ListItem, {
13039
+ children: i18n.get(document2)
13040
+ }, document2))
13041
+ })]
13042
+ }), jsxs("div", {
13043
+ className: "adl-u-margin-bottom-24",
13044
+ children: [jsx("strong", {
13045
+ children: i18n.get("documentRequirements")
13046
+ }), jsx(List, {
13047
+ className: "adl-u-margin-left-8",
13048
+ children: jsx(ListItem, {
13049
+ children: i18n.get("includesLegalCompanyName")
13050
+ })
13051
+ })]
13052
+ })]
13053
+ }) : jsxs(Fragment, {
13054
+ children: [jsxs("div", {
13055
+ className: "adl-u-margin-bottom-24",
13056
+ children: [jsxs("strong", {
13057
+ children: [" ", i18n.get("requirements")]
13058
+ }), jsxs(List, {
13059
+ className: "adyen-kyc-upload-field__requirements",
13060
+ children: [jsx(ListItem, {
13061
+ children: i18n.get("documentIssuedByGovernmentAuthority")
13062
+ }), jsx(ListItem, {
13063
+ children: i18n.get("dateOnDocumentNoOlderThanXMonths", {
13064
+ values: {
13065
+ numberOfMonths: 12
13066
+ }
13067
+ })
13068
+ })]
13069
+ })]
13070
+ }), jsx(ContextGuidance, {
13071
+ page: "Company registration document",
13072
+ titleId: "whatIfDocumentIsMoreThan12MonthsOld",
13073
+ contentId: "ifDocumentMoreThan12months",
13074
+ title: i18n.get("whatIfDocumentIsMoreThan12MonthsOld"),
13075
+ content: i18n.get("ifDocumentMoreThan12months")
13076
+ })]
13077
+ })
13078
+ });
13079
+ };
13080
+ function RegistrationDocumentComponent({
13081
+ id: id2,
13082
+ country: country2,
13083
+ companyType: companyType2 = CompanyTypesValue.PRIVATE_COMPANY,
13084
+ heading = "companyRegistrationDocumentHeading",
13085
+ description: description2 = "companyRegistrationDocumentFormDescription",
13086
+ ...props
13087
+ }) {
13088
+ const {
13089
+ i18n
13090
+ } = useI18nContext();
13091
+ return jsx(DocumentUpload, {
13092
+ ...props,
13093
+ id: id2,
13094
+ heading: i18n.get(heading),
13095
+ description: i18n.get(description2),
13096
+ documentField: "registrationDocument",
13097
+ documentType: DocumentType.REGISTRATION_DOCUMENT,
13098
+ guidanceContent: GuidanceContent$1({
13099
+ i18n,
13100
+ country: country2,
13101
+ companyType: companyType2
13102
+ }),
13103
+ companyType: companyType2,
13104
+ country: country2
13105
+ });
13106
+ }
13107
+ const ACCEPTED_DOCUMENTS_MAP = {
13108
+ [CountryCodes.UnitedStates]: {
13109
+ [CompanyTypesValue.PRIVATE_COMPANY]: {
13110
+ header: "acceptedDocumentsForPrivateCompanies",
13111
+ documents: ["irsCP575"]
13112
+ },
13113
+ [CompanyTypesValue.PUBLIC_COMPANY]: {
13114
+ header: "acceptedDocumentsForPublicCompanies",
13115
+ documents: ["annualReport", "secForm10k"]
13116
+ },
13117
+ [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
13118
+ header: "acceptedDocumentsForPublicCompanies",
13119
+ documents: ["annualReport", "secForm10k"]
13120
+ },
13121
+ [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
13122
+ header: "acceptedDocumentsForNonProfit",
13123
+ documents: ["annualReport"]
13124
+ },
13125
+ [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
13126
+ header: "acceptedDocumentsForPartnerships",
13127
+ documents: ["irsScheduleK1"]
13128
+ }
13129
+ }
13130
+ };
13131
+ const GuidanceContent = ({
13132
+ i18n,
13133
+ country: country2,
13134
+ companyType: companyType2
13135
+ }) => {
13136
+ var _a;
13137
+ const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country2]) == null ? void 0 : _a[companyType2];
13138
+ return jsx("div", {
13139
+ className: "adyen-kyc-upload-field__guidance",
13140
+ children: country2 === "US" ? jsxs(Fragment, {
13141
+ children: [acceptedDocGuidance && jsxs("div", {
13142
+ className: "adl-u-margin-bottom-24",
13143
+ children: [jsx("strong", {
13144
+ children: i18n.get(acceptedDocGuidance.header)
13145
+ }), jsx(List, {
13146
+ className: "adl-u-margin-left-8",
13147
+ children: acceptedDocGuidance.documents.map((document2) => jsx(ListItem, {
13148
+ children: i18n.get(document2)
13149
+ }, document2))
13150
+ })]
13151
+ }), jsxs("div", {
13152
+ className: "adl-u-margin-bottom-24",
13153
+ children: [jsx("strong", {
13154
+ children: i18n.get("documentRequirements")
13155
+ }), jsxs(List, {
13156
+ className: "adl-u-margin-left-8",
13157
+ children: [jsx(ListItem, {
13158
+ children: i18n.get("includesLegalCompanyName")
13159
+ }), jsx(ListItem, {
13160
+ children: i18n.get("includesEIN")
13161
+ })]
13162
+ })]
13163
+ })]
13164
+ }) : jsxs("div", {
13165
+ className: "adl-u-margin-bottom-24",
13166
+ children: [jsxs("div", {
13167
+ className: "adyen-kyc-upload-field__subtitle",
13168
+ children: [" ", i18n.get("requirements")]
13169
+ }), jsxs(List, {
13170
+ className: "adyen-kyc-upload-field__requirements",
13171
+ children: [jsx(ListItem, {
13172
+ children: i18n.get("containsNameOfCompany")
13173
+ }), jsx(ListItem, {
13174
+ children: i18n.get("documentShowsTaxIdOfCompany")
13175
+ }), jsx(ListItem, {
13176
+ children: i18n.get("issuedByTheTaxAuthority")
13177
+ })]
13178
+ })]
13179
+ })
13180
+ });
13181
+ };
13182
+ function TaxDocumentComponent({
13183
+ id: id2,
13184
+ country: country2,
13185
+ companyType: companyType2 = CompanyTypesValue.PRIVATE_COMPANY,
13186
+ heading = "companyTaxDocumentFormHeading",
13187
+ description: description2 = "companyTaxDocumentFormDescription",
13188
+ ...props
13189
+ }) {
13190
+ const {
13191
+ i18n
13192
+ } = useI18nContext();
13193
+ return jsx(DocumentUpload, {
13194
+ ...props,
13195
+ id: id2,
13196
+ heading: i18n.get(heading),
13197
+ description: i18n.get(description2),
13198
+ documentField: "taxDocument",
13199
+ documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
13200
+ guidanceContent: GuidanceContent({
13201
+ i18n,
13202
+ country: country2,
13203
+ companyType: companyType2
13204
+ }),
13205
+ companyType: companyType2,
13206
+ country: country2
13207
+ });
13208
+ }
12757
13209
  const companyForms = {
12758
13210
  companyNameAndCountry: {
12759
13211
  formId: "companyNameAndCountry",
@@ -12778,11 +13230,15 @@ const companyForms = {
12778
13230
  companyRegistrationDocument: {
12779
13231
  formId: "companyRegistrationDocument",
12780
13232
  formName: "registrationDocument",
13233
+ formHeading: "companyRegistrationDocumentHeading",
13234
+ formDescription: "companyRegistrationDocumentFormDescription",
12781
13235
  fields: ["registrationDocument"]
12782
13236
  },
12783
13237
  companyTaxDocument: {
12784
13238
  formId: "companyTaxDocument",
12785
13239
  formName: "taxDocument",
13240
+ formHeading: "companyTaxDocumentFormHeading",
13241
+ formDescription: "companyTaxDocumentFormDescription",
12786
13242
  fields: ["taxDocument"]
12787
13243
  }
12788
13244
  };
@@ -12797,7 +13253,8 @@ function CompanyComponent(props) {
12797
13253
  const {
12798
13254
  i18n
12799
13255
  } = useI18nContext();
12800
- const [currentCompanyType, setCurrentCompanyType] = useState(null);
13256
+ const [currentCompanyType, setCurrentCompanyType] = useState(void 0);
13257
+ const [currentCountry, setCurrentCountry] = useState(props.country);
12801
13258
  const companyNameAndCountryFormProps = getFormProps(props, CompanyNameAndCountryFormID);
12802
13259
  const companyTypeFormProps = getFormProps(props, CompanyTypeFormID);
12803
13260
  const companyRegistrationDetailsFormProps = getFormProps(props, CompanyRegistrationDetailsFormID);
@@ -12813,6 +13270,7 @@ function CompanyComponent(props) {
12813
13270
  setCurrentCompanyType(companyType2);
12814
13271
  const companyCountryPrev = (_d = (_c = prevState.data) == null ? void 0 : _c[CompanyNameAndCountryFormID]) == null ? void 0 : _d.country;
12815
13272
  const companyCountry2 = (_f = (_e = currentState.data) == null ? void 0 : _e[CompanyNameAndCountryFormID]) == null ? void 0 : _f.country;
13273
+ setCurrentCountry(companyCountry2);
12816
13274
  const accountHolder2 = (_h = (_g = currentState.data) == null ? void 0 : _g[CompanyTypeFormID]) == null ? void 0 : _h.accountHolder;
12817
13275
  if (companyCountry2 != null && companyCountry2 !== companyCountryPrev) {
12818
13276
  props.onCountryChange(companyCountry2);
@@ -12868,51 +13326,32 @@ function CompanyComponent(props) {
12868
13326
  })
12869
13327
  }), jsx("div", {
12870
13328
  className: props.activeForm.formId !== CompanyRegistrationDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
12871
- children: jsx(DocumentUpload, {
13329
+ children: jsx(RegistrationDocumentComponent, {
12872
13330
  ...companyRegistrationDocumentFormProps,
12873
- documentField: "registrationDocument",
12874
- documentType: DocumentType.REGISTRATION_DOCUMENT,
12875
- heading: i18n.get("registrationDocument"),
12876
- guidanceContent: jsxs(Fragment, {
12877
- children: [jsx("div", {
12878
- className: "adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16",
12879
- children: i18n.get("registrationDocumentSubTitle")
12880
- }), jsxs("div", {
12881
- className: "adyen-kyc-upload-field__subtitle",
12882
- children: [" ", i18n.get("requirements")]
12883
- }), jsxs(List, {
12884
- className: "adyen-kyc-upload-field__requirements",
12885
- children: [jsx(ListItem, {
12886
- children: i18n.get("documentIssuedByGovernmentAuthority")
12887
- }), jsx(ListItem, {
12888
- children: i18n.get("dateOnDocumentNoOlderThanXMonths", {
12889
- values: {
12890
- numberOfMonths: 12
12891
- }
12892
- })
12893
- })]
12894
- }), jsx(ContextGuidance, {
12895
- page: "Company registration document",
12896
- titleId: "whatIfDocumentIsMoreThan12MonthsOld",
12897
- contentId: "ifDocumentMoreThan12months",
12898
- title: i18n.get("whatIfDocumentIsMoreThan12MonthsOld"),
12899
- content: i18n.get("ifDocumentMoreThan12months")
12900
- })]
12901
- }),
12902
- id: CompanyRegistrationDocumentFormID
13331
+ id: companyForms.companyRegistrationDocument.formId,
13332
+ heading: companyForms.companyRegistrationDocument.formHeading,
13333
+ description: companyForms.companyRegistrationDocument.formDescription,
13334
+ country: currentCountry,
13335
+ companyType: currentCompanyType
12903
13336
  })
12904
13337
  }), jsx("div", {
12905
13338
  className: props.activeForm.formId !== CompanyTaxDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
12906
- children: jsx(DocumentUpload, {
13339
+ children: currentCountry === "US" ? jsx(TaxDocumentComponent, {
13340
+ ...companyTaxDocumentFormProps,
13341
+ id: CompanyTaxDocumentFormID,
13342
+ heading: companyForms.companyTaxDocument.formHeading,
13343
+ description: companyForms.companyTaxDocument.formDescription,
13344
+ country: currentCountry,
13345
+ companyType: currentCompanyType
13346
+ }) : jsx(DocumentUpload, {
12907
13347
  ...companyTaxDocumentFormProps,
12908
13348
  documentField: "taxDocument",
12909
- documentType: props.country === "US" ? DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO : DocumentType.VAT_DOCUMENT,
12910
- heading: i18n.get("taxDocument"),
12911
- guidanceContent: jsxs(Fragment, {
12912
- children: [jsx("div", {
12913
- className: "adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16",
12914
- children: i18n.get("uploadTaxationDocument")
12915
- }), jsxs("div", {
13349
+ documentType: DocumentType.VAT_DOCUMENT,
13350
+ heading: i18n.get(companyForms.companyTaxDocument.formHeading),
13351
+ description: i18n.get(companyForms.companyTaxDocument.formDescription),
13352
+ guidanceContent: jsxs("div", {
13353
+ className: "adl-u-margin-bottom-24",
13354
+ children: [jsxs("div", {
12916
13355
  className: "adyen-kyc-upload-field__subtitle",
12917
13356
  children: [" ", i18n.get("requirements")]
12918
13357
  }), jsxs(List, {
@@ -13116,7 +13555,8 @@ const COUNTRIES_WITH_IN_APP_SEARCH_COMPANY_VERIFICATION = [CountryCodes.UnitedSt
13116
13555
  const rules$2 = ({
13117
13556
  data,
13118
13557
  country: country2,
13119
- taskType
13558
+ taskType,
13559
+ isExperimentEnabled = () => false
13120
13560
  }) => ({
13121
13561
  countryRequiresStateOrProvince: () => {
13122
13562
  if (COUNTRIES_WITH_STATES_DATASET.includes(country2)) {
@@ -13181,7 +13621,7 @@ const rules$2 = ({
13181
13621
  }
13182
13622
  },
13183
13623
  accountHolderIfCustomer: () => {
13184
- if (taskType === TaskTypes.COMPANY) {
13624
+ if (taskType === TaskTypes.COMPANY && !isExperimentEnabled("EnableNewEntryFlow")) {
13185
13625
  return "REQUIRED";
13186
13626
  }
13187
13627
  },
@@ -13284,129 +13724,6 @@ const getObscuredAccountNumber = ({
13284
13724
  accountIdentifier,
13285
13725
  realLastFour
13286
13726
  }) => realLastFour ? `*******${realLastFour}` : accountIdentifier;
13287
- const getDirectEntityAssociations = (rootLE, legalEntityId) => {
13288
- var _a;
13289
- return ((_a = rootLE == null ? void 0 : rootLE.entityAssociations) == null ? void 0 : _a.filter((association2) => association2.associatorId === legalEntityId)) ?? [];
13290
- };
13291
- const getOwnEntityAssociations = (legalEntity) => getDirectEntityAssociations(legalEntity, legalEntity.id);
13292
- const getOwnSoleProprietorshipIdArray = (legalEntity) => {
13293
- const ownAssociations = getOwnEntityAssociations(legalEntity);
13294
- return ownAssociations.filter((ea) => ea.entityType === LegalEntityType.SOLE_PROPRIETORSHIP).map((ea) => ea.legalEntityId).filter((id2) => id2 !== void 0);
13295
- };
13296
- const hasSolePropInLegalEntity = (rootLegalEntity) => {
13297
- var _a;
13298
- return ((_a = rootLegalEntity.entityAssociations) == null ? void 0 : _a.some((ea) => ea.entityType === LegalEntityType.SOLE_PROPRIETORSHIP && ea.associatorId === rootLegalEntity.id)) ?? false;
13299
- };
13300
- const getOwnSolePropProblems = (rootLegalEntity, capabilityProblems) => {
13301
- var _a;
13302
- const solePropLegalEntityId = getOwnSoleProprietorshipIdArray(rootLegalEntity)[0];
13303
- return (_a = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _a[solePropLegalEntityId];
13304
- };
13305
- const hasOwnEntityAssociationOfType = (type, entityAssociations, legalEntityId) => (entityAssociations == null ? void 0 : entityAssociations.some((ea) => ea.type === type && ea.associatorId === legalEntityId)) ?? false;
13306
- const removeEntityAssociationByType = (type, entityAssociations, legalEntityId) => entityAssociations.filter((ea) => ea.type !== type || ea.associatorId !== legalEntityId);
13307
- const isRootLegalEntity = (legalEntity, taskType) => legalEntity.type === LegalEntityType.INDIVIDUAL && taskType === TaskTypes.INDIVIDUAL || legalEntity.type === LegalEntityType.ORGANIZATION && taskType === TaskTypes.COMPANY || legalEntity.type === LegalEntityType.ORGANIZATION && taskType === TaskTypes.COMPANY_SEARCH;
13308
- const filterOutUnwantedAssociationsIfRootLE = (taskType, legalEntity, accountHolder2) => {
13309
- if (!(legalEntity == null ? void 0 : legalEntity.entityAssociations)) {
13310
- return void 0;
13311
- }
13312
- let entityAssociations = getOwnEntityAssociations(legalEntity);
13313
- if (!isRootLegalEntity(legalEntity, taskType)) {
13314
- return entityAssociations;
13315
- }
13316
- if (accountHolder2 !== "mySoleProprietorName" && hasOwnEntityAssociationOfType(LegalEntityType.SOLE_PROPRIETORSHIP, entityAssociations, legalEntity.id)) {
13317
- entityAssociations = removeEntityAssociationByType(LegalEntityType.SOLE_PROPRIETORSHIP, entityAssociations, legalEntity.id);
13318
- }
13319
- if (accountHolder2 !== "aTrust" && hasOwnEntityAssociationOfType(LegalEntityType.TRUST, entityAssociations, legalEntity.id)) {
13320
- entityAssociations = removeEntityAssociationByType(LegalEntityType.TRUST, entityAssociations, legalEntity.id);
13321
- }
13322
- return entityAssociations;
13323
- };
13324
- var VerificationStatus = /* @__PURE__ */ ((VerificationStatus2) => {
13325
- VerificationStatus2["VALID"] = "valid";
13326
- VerificationStatus2["PENDING"] = "pending";
13327
- VerificationStatus2["INVALID"] = "invalid";
13328
- VerificationStatus2["REJECTED"] = "rejected";
13329
- return VerificationStatus2;
13330
- })(VerificationStatus || {});
13331
- function getNestedPropertyKeys(obj, includeUndefined = false) {
13332
- const fieldNames = [];
13333
- Object.entries(obj).forEach(([key, value]) => {
13334
- if (typeof value === "object" && value !== null) {
13335
- const nested = getNestedPropertyKeys(value).map((name) => `${key}.${name}`);
13336
- fieldNames.push(...nested);
13337
- return;
13338
- }
13339
- if (value !== void 0 || includeUndefined) {
13340
- fieldNames.push(key);
13341
- }
13342
- });
13343
- return fieldNames;
13344
- }
13345
- const getTaskStatus = (type, capabilityProblems, rootLegalEntity, entityIds, skipPendingCapabilitiesCheck = false) => {
13346
- if (!(entityIds == null ? void 0 : entityIds.length) || entityIds.includes(rootLegalEntity.id) && isEmptyEntity(rootLegalEntity))
13347
- return TaskStatus.EMPTY;
13348
- const importantCapabilityStatus = checkForImportantCapabilityStatus(type, capabilityProblems, entityIds);
13349
- if (importantCapabilityStatus)
13350
- return importantCapabilityStatus;
13351
- if (!skipPendingCapabilitiesCheck && hasPendingCapabilities(rootLegalEntity))
13352
- return TaskStatus.PROCESSING;
13353
- return TaskStatus.FINISHED;
13354
- };
13355
- const IMPORTANT_STATUSES = [TaskStatus.DETAILS_REQUIRED, TaskStatus.DOWNLOAD, TaskStatus.ERROR, TaskStatus.PROCESSING];
13356
- function checkForImportantCapabilityStatus(type, capabilityProblems, entityIds) {
13357
- if (!(capabilityProblems == null ? void 0 : capabilityProblems[type]) || !entityIds)
13358
- return;
13359
- const importantStatuses = Object.entries(capabilityProblems[type] ?? {}).filter(([key]) => entityIds == null ? void 0 : entityIds.includes(key)).map(([, value]) => value.status).filter((status) => status !== void 0 && IMPORTANT_STATUSES.includes(status));
13360
- if (!importantStatuses.length)
13361
- return;
13362
- return importantStatuses.reduce((prev, curr) => curr > prev ? curr : prev);
13363
- }
13364
- const hasPendingCapabilities = (legalEntityResponse) => Object.values(legalEntityResponse.capabilities ?? {}).some((capability) => capability.verificationStatus === "pending");
13365
- const hasResolvedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).every((capability) => capability.verificationStatus !== VerificationStatus.PENDING);
13366
- const hasRejectedCapabilities = (legalEntityResponse) => Object.values((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}).some((capability) => capability.verificationStatus === VerificationStatus.REJECTED);
13367
- const emptyFieldsForIndividual = ["name.firstName", "name.lastName", "residentialAddress.country"];
13368
- const emptyFieldsForOrganization = ["legalName", "registeredAddress.country"];
13369
- const emptyFieldsForTrust = ["name", "registeredAddress.country"];
13370
- const emptyFieldsForSoleProp = ["name", "registeredAddress.country"];
13371
- const emptyFieldsByEntityType = {
13372
- [LegalEntityType.INDIVIDUAL]: emptyFieldsForIndividual,
13373
- [LegalEntityType.ORGANIZATION]: emptyFieldsForOrganization,
13374
- [LegalEntityType.TRUST]: emptyFieldsForTrust,
13375
- [LegalEntityType.SOLE_PROPRIETORSHIP]: emptyFieldsForSoleProp
13376
- };
13377
- function isEmptyEntity(legalEntity) {
13378
- var _a;
13379
- const type = legalEntity == null ? void 0 : legalEntity.type;
13380
- if (!type)
13381
- return true;
13382
- if ((_a = legalEntity.documentDetails) == null ? void 0 : _a.length)
13383
- return false;
13384
- const minimumFields = emptyFieldsByEntityType[type];
13385
- const typeSpecificSection = legalEntity[type];
13386
- if (!typeSpecificSection)
13387
- return true;
13388
- const fieldsOnEntity = getNestedPropertyKeys(typeSpecificSection);
13389
- return !fieldsOnEntity.some((field) => !minimumFields.includes(field));
13390
- }
13391
- const entityTypeToCorrespondingAccountHolderOption = {
13392
- [LegalEntityType.INDIVIDUAL]: "myName",
13393
- [LegalEntityType.ORGANIZATION]: "theCompanyIWorkFor",
13394
- [LegalEntityType.SOLE_PROPRIETORSHIP]: "mySoleProprietorName",
13395
- [LegalEntityType.TRUST]: "aTrust"
13396
- };
13397
- const getDefaultAccountHolderType = (legalEntityResponse, isTypeChanging = false) => {
13398
- if (!(legalEntityResponse == null ? void 0 : legalEntityResponse.type))
13399
- return void 0;
13400
- if (hasOwnEntityAssociationOfType(LegalEntityType.SOLE_PROPRIETORSHIP, legalEntityResponse.entityAssociations, legalEntityResponse.id)) {
13401
- return "mySoleProprietorName";
13402
- }
13403
- if (hasOwnEntityAssociationOfType(LegalEntityType.TRUST, legalEntityResponse.entityAssociations, legalEntityResponse.id)) {
13404
- return "aTrust";
13405
- }
13406
- if (isTypeChanging || !isEmptyEntity(legalEntityResponse)) {
13407
- return entityTypeToCorrespondingAccountHolderOption[legalEntityResponse.type];
13408
- }
13409
- };
13410
13727
  const countryToTaxInfoTypeMap = {
13411
13728
  US: "EIN",
13412
13729
  AU: "ABN",
@@ -15389,7 +15706,9 @@ function IdVerificationMethodComponent(props) {
15389
15706
  optionName: (method) => methodsMetadata[method].name,
15390
15707
  optionDescription: (method) => methodsMetadata[method].description,
15391
15708
  className: "adyen-kyc-field-verification-methods",
15392
- optionLabelClassName: () => "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio",
15709
+ optionClassNames: () => ({
15710
+ label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"
15711
+ }),
15393
15712
  renderOptionIcon: (method) => jsx(IdVerificationMethodOptionIcon, {
15394
15713
  method,
15395
15714
  methodsMetadata
@@ -20795,7 +21114,9 @@ function PayoutVerificationMethod(props) {
20795
21114
  optionDescription: (method) => methodsMetadata[method].description,
20796
21115
  optionSubtitle: (method) => methodsMetadata[method].subtitle,
20797
21116
  className: "adyen-kyc-field-verification-methods",
20798
- optionLabelClassName: () => "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio",
21117
+ optionClassNames: () => ({
21118
+ label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"
21119
+ }),
20799
21120
  isOptionDisabled: (option) => props.bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
20800
21121
  renderOptionIcon: (method) => jsx(PayoutVerificationMethodOptionIcon, {
20801
21122
  method,
@@ -21085,9 +21406,8 @@ function ConstitutionalDocumentUpload({
21085
21406
  i18n
21086
21407
  } = useI18nContext();
21087
21408
  const guidanceContent = jsxs("div", {
21088
- className: "adyen-kyc-upload-field__guidance",
21409
+ className: "adyen-kyc-upload-field__guidance adl-u-margin-bottom-24",
21089
21410
  children: [jsx("strong", {
21090
- className: "adyen-kyc-upload-field__subtitle",
21091
21411
  children: i18n.get("uploadOneOfTheseDocuments")
21092
21412
  }), jsx(List, {
21093
21413
  className: "adl-u-margin-left-8",
@@ -21097,7 +21417,7 @@ function ConstitutionalDocumentUpload({
21097
21417
  }) => jsx(ListItem, {
21098
21418
  children: i18n.get(name)
21099
21419
  }, id22))
21100
- }), jsx("div", {
21420
+ }), props.country !== "US" && jsx("div", {
21101
21421
  className: "adl-u-margin-y-16",
21102
21422
  children: jsxs("span", {
21103
21423
  children: [i18n.get("documentIssuedWithinLastYear"), " "]
@@ -22351,6 +22671,7 @@ const getEntityType = (baseEntityType, legalEntity, legalEntityId) => {
22351
22671
  }
22352
22672
  return (_b = (_a = legalEntity.entityAssociations) == null ? void 0 : _a.find((associations) => legalEntityId === associations.legalEntityId)) == null ? void 0 : _b.entityType;
22353
22673
  };
22674
+ const getCapabilities = (legalEntity) => Object.keys((legalEntity == null ? void 0 : legalEntity.capabilities) ?? {});
22354
22675
  function VerificationErrors({
22355
22676
  verificationErrors,
22356
22677
  formUtils
@@ -22496,7 +22817,8 @@ function Summary({
22496
22817
  trackNavigation: trackNavigation2 = noop,
22497
22818
  omittedForms = [],
22498
22819
  showFormHeader = true,
22499
- showSectionHeader = true
22820
+ showSectionHeader = true,
22821
+ showLegalCaption = false
22500
22822
  }) {
22501
22823
  var _a, _b;
22502
22824
  const {
@@ -22633,6 +22955,9 @@ function Summary({
22633
22955
  }), jsx("ul", {
22634
22956
  className: "adyen-kyc-summary",
22635
22957
  children: renderSummary(data)
22958
+ }), showLegalCaption && jsx("span", {
22959
+ className: "adyen-kyc-summary__legal-caption",
22960
+ children: i18n.get("summaryLegalCaption")
22636
22961
  })]
22637
22962
  });
22638
22963
  }
@@ -23504,8 +23829,9 @@ const getFieldsWithExistingData = (legalEntity, isExperimentEnabled) => {
23504
23829
  }
23505
23830
  return nonDocumentFields;
23506
23831
  };
23832
+ const getLegalEntityCountry = (legalEntityResponse) => legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? legalEntityResponse.individual.residentialAddress.country : legalEntityResponse.organization.registeredAddress.country;
23507
23833
  const organizationTypesToSkipCompanyStructureForm = ["partnershipIncorporated", "associationIncorporated"];
23508
- const getBusinessType = (businessTypeItems, accountHolder2, legalEntityType, companyTypesValue) => {
23834
+ const getBusinessType = (businessTypeItems, country2, accountHolder2, legalEntityType, companyTypesValue, capabilities = []) => {
23509
23835
  const findBusinessType = (id2) => businessTypeItems.find((bt) => bt.id === id2);
23510
23836
  if (organizationTypesToSkipCompanyStructureForm.includes(companyTypesValue ?? "")) {
23511
23837
  return findBusinessType("legalArrangement");
@@ -23520,7 +23846,13 @@ const getBusinessType = (businessTypeItems, accountHolder2, legalEntityType, com
23520
23846
  case LegalEntityType.ORGANIZATION:
23521
23847
  return findBusinessType("company");
23522
23848
  case LegalEntityType.INDIVIDUAL:
23523
- return findBusinessType("individual");
23849
+ if (allowIndividualWithoutSoleProp(capabilities)) {
23850
+ return findBusinessType("individual");
23851
+ }
23852
+ if (SOLE_PROP_COUNTRIES.includes(country2)) {
23853
+ return findBusinessType("soleProprietorship");
23854
+ }
23855
+ return findBusinessType("company");
23524
23856
  }
23525
23857
  };
23526
23858
  const businessTypes = [{
@@ -23537,20 +23869,39 @@ const businessTypes = [{
23537
23869
  id: "company",
23538
23870
  accountHolder: "theCompanyIWorkFor",
23539
23871
  name: "company",
23540
- description: "youUseCompanyBankAccount"
23872
+ description: "yourBusinessIsRegisteredAsASeparateLegalEntityFromItsOwners"
23541
23873
  }];
23874
+ const businessTypeIcons = {
23875
+ individual: "user",
23876
+ soleProprietorship: "user-business",
23877
+ company: "company-2",
23878
+ legalArrangement: "users-3"
23879
+ };
23542
23880
  const legalArrangementBusinessType = {
23543
23881
  id: "legalArrangement",
23544
- name: "partnershipOrAssociation",
23545
- description: "youAreIndividualOrCompanyAndUseBankAccountInNameOfPartnershipOrAssociation"
23546
- };
23547
- const getBusinessTypeOptions = (country2) => {
23548
- const businessTypeOptionsWithSolePropConfig = country2 && SOLE_PROP_COUNTRIES.includes(country2) && businessTypes || businessTypes.filter((businessType) => businessType.id !== "soleProprietorship");
23549
- return country2 && TRUST_COUNTRIES.includes(country2) ? [...businessTypeOptionsWithSolePropConfig, {
23550
- ...legalArrangementBusinessType,
23551
- name: "trustPartnershipOrAssociation",
23552
- description: "youAreIndividualOrCompanyAndUseBankAccountInNameOfTrustPartnershipOrAssociation"
23553
- }] : [...businessTypeOptionsWithSolePropConfig, legalArrangementBusinessType];
23882
+ name: "trustPartnershipOrAssociation",
23883
+ description: "youAreIndividualOrCompanyAndUseBankAccountInNameOfTrustPartnershipOrAssociation"
23884
+ };
23885
+ const getLegalArrangementDisplayOption = (country2) => ({
23886
+ ...legalArrangementBusinessType,
23887
+ ...!TRUST_COUNTRIES.includes(country2) ? {
23888
+ name: "partnershipOrAssociation",
23889
+ description: "youAreIndividualOrCompanyAndUseBankAccountInNameOfPartnershipOrAssociation"
23890
+ } : {}
23891
+ });
23892
+ const getBusinessTypeOptions = (country2, capabilities) => {
23893
+ const legalArrangementDisplayOption = getLegalArrangementDisplayOption(country2);
23894
+ const allowedBusinessTypes = businessTypes.filter((businessType) => {
23895
+ switch (businessType.id) {
23896
+ case "individual":
23897
+ return allowIndividualWithoutSoleProp(capabilities);
23898
+ case "soleProprietorship":
23899
+ return SOLE_PROP_COUNTRIES.includes(country2);
23900
+ default:
23901
+ return true;
23902
+ }
23903
+ });
23904
+ return [...allowedBusinessTypes, legalArrangementDisplayOption];
23554
23905
  };
23555
23906
  const legalArrangementItems = [{
23556
23907
  id: "aTrust",
@@ -23571,22 +23922,26 @@ const legalArrangementItems = [{
23571
23922
  id: "associationIncorporated",
23572
23923
  accountHolder: "theCompanyIWorkFor",
23573
23924
  name: "associationIncorporated",
23574
- description: "groupOfPeopleActingTogetherForNonCommercialPurpose"
23925
+ description: "yourAssociationIsRegisteredItWasSetUpForNonCommercialPurpose"
23575
23926
  }];
23576
- const getLegalArrangementOptions = (country2, experiments) => legalArrangementItems.filter((legalArrangementItem) => {
23927
+ const getLegalArrangementOptions = (country2, showUnsupportedEntityType) => legalArrangementItems.filter((legalArrangementItem) => {
23577
23928
  if (legalArrangementItem.id !== "aTrust" && legalArrangementItem.id !== "partnershipUnincorporated") {
23578
23929
  return true;
23579
23930
  }
23580
- if (legalArrangementItem.id === "partnershipUnincorporated" && (experiments == null ? void 0 : experiments.ShowUnsupportedEntityType)) {
23931
+ if (legalArrangementItem.id === "partnershipUnincorporated" && showUnsupportedEntityType) {
23581
23932
  return true;
23582
23933
  }
23583
- return country2 && TRUST_COUNTRIES.includes(country2);
23934
+ return TRUST_COUNTRIES.includes(country2);
23584
23935
  });
23585
- const getSelectionOptions = (legalEntityResponse, experiments) => {
23586
- var _a, _b, _c, _d;
23587
- const country2 = legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? (_b = (_a = legalEntityResponse.individual) == null ? void 0 : _a.residentialAddress) == null ? void 0 : _b.country : (_d = (_c = legalEntityResponse.organization) == null ? void 0 : _c.registeredAddress) == null ? void 0 : _d.country;
23588
- const businessTypeOptions = getBusinessTypeOptions(country2);
23589
- const legalArrangementOptions = getLegalArrangementOptions(country2, experiments);
23936
+ const useSelectionOptions = (legalEntityResponse) => {
23937
+ const {
23938
+ isExperimentEnabled
23939
+ } = useExperimentsContext();
23940
+ const showUnsupportedEntityType = isExperimentEnabled("ShowUnsupportedEntityType");
23941
+ const country2 = getLegalEntityCountry(legalEntityResponse);
23942
+ const capabilities = getCapabilities(legalEntityResponse);
23943
+ const businessTypeOptions = getBusinessTypeOptions(country2, capabilities);
23944
+ const legalArrangementOptions = getLegalArrangementOptions(country2, showUnsupportedEntityType);
23590
23945
  return {
23591
23946
  businessTypeOptions,
23592
23947
  legalArrangementOptions
@@ -23815,6 +24170,7 @@ const FormWrapper = ({
23815
24170
  handleHomeClick == null ? void 0 : handleHomeClick();
23816
24171
  }
23817
24172
  };
24173
+ const showLegalCaption = ["solePropDetails", "companyDetails"].includes(taskName);
23818
24174
  const summaryContent = jsx("div", {
23819
24175
  className: "adyen-kyc-form-wrapper",
23820
24176
  children: jsx(Summary, {
@@ -23829,7 +24185,8 @@ const FormWrapper = ({
23829
24185
  forms: forms2,
23830
24186
  gotoForm: gotoFormByFormIndex,
23831
24187
  labels: labels2,
23832
- problems
24188
+ problems,
24189
+ showLegalCaption
23833
24190
  })
23834
24191
  });
23835
24192
  const formFooter = !hideDropinLayout && !hideFooter && jsx(ActionBar, {
@@ -23948,8 +24305,9 @@ function CompanyDropinComponent({
23948
24305
  isSettingEnabled
23949
24306
  } = useSettingsContext();
23950
24307
  const {
23951
- setAccountHolder
23952
- } = useCoreContext();
24308
+ isExperimentEnabled
24309
+ } = useExperimentsContext();
24310
+ useCoreContext();
23953
24311
  const {
23954
24312
  i18n,
23955
24313
  setLocale
@@ -23994,7 +24352,8 @@ function CompanyDropinComponent({
23994
24352
  country: country2,
23995
24353
  taskType,
23996
24354
  requiredFields,
23997
- isSettingEnabled
24355
+ isSettingEnabled,
24356
+ isExperimentEnabled
23998
24357
  }), [country2, data, taskType, requiredFields, isSettingEnabled]);
23999
24358
  const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, companyForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
24000
24359
  const {
@@ -24058,7 +24417,6 @@ function CompanyDropinComponent({
24058
24417
  }
24059
24418
  };
24060
24419
  const onSubmit = async () => {
24061
- var _a2;
24062
24420
  const dataSubmitted = data;
24063
24421
  const savedLegalEntityData = mapLegalEntityToCompany(legalEntityResponse, false);
24064
24422
  const filteredData = removeOldDataBySchema(dataSubmitted, savedLegalEntityData);
@@ -24099,9 +24457,6 @@ function CompanyDropinComponent({
24099
24457
  await attachAssociationToParentLegalEntity({
24100
24458
  legalEntity
24101
24459
  });
24102
- if (taskType === TaskTypes.COMPANY) {
24103
- setAccountHolder((_a2 = dataSubmitted == null ? void 0 : dataSubmitted.companyType) == null ? void 0 : _a2.accountHolder);
24104
- }
24105
24460
  setLoadingStatus("success");
24106
24461
  clearToasts();
24107
24462
  onExternalSubmit == null ? void 0 : onExternalSubmit(dataSubmitted);
@@ -24646,7 +25001,9 @@ const LookupResult = ({
24646
25001
  isInvalid,
24647
25002
  isSelected,
24648
25003
  onSelect: noop$1,
24649
- labelClassName: classes
25004
+ classNames: {
25005
+ label: classes
25006
+ }
24650
25007
  }), showAlert && jsx(LookupResultAlert, {
24651
25008
  i18n,
24652
25009
  type: alertType
@@ -24670,7 +25027,9 @@ const LookupResult = ({
24670
25027
  onSelect: () => selectAndVerify(tin, option),
24671
25028
  disabled: Boolean(verifiedCompany) || status === "loading" && !isSelected,
24672
25029
  loading: status === "loading" && isSelected,
24673
- labelClassName: classes
25030
+ classNames: {
25031
+ label: classes
25032
+ }
24674
25033
  }), showAlert && jsx(LookupResultAlert, {
24675
25034
  i18n,
24676
25035
  type: alertType
@@ -25789,8 +26148,9 @@ const CompanyStructureValidation = {
25789
26148
  }
25790
26149
  };
25791
26150
  const COMPANY_STRUCTURE_FORM_ID = "companyStructure";
25792
- const companyStructureFields = ["entityType"];
26151
+ const companyStructureFields = ["entityType", "accountHolder"];
25793
26152
  function CompanyStructureComponent({
26153
+ id: id2,
25794
26154
  data,
25795
26155
  labels: labels2,
25796
26156
  heading,
@@ -25798,7 +26158,9 @@ function CompanyStructureComponent({
25798
26158
  formVerificationErrors,
25799
26159
  fieldValidationErrors,
25800
26160
  requiredFields,
25801
- kompanyVerifiedData
26161
+ country: country2,
26162
+ kompanyVerifiedData,
26163
+ ...props
25802
26164
  }) {
25803
26165
  var _a;
25804
26166
  const {
@@ -25848,6 +26210,19 @@ function CompanyStructureComponent({
25848
26210
  });
25849
26211
  }, [formSchema, formData, formErrors, formValid, formFieldProblems, updateStateSlice]);
25850
26212
  const companyTypeOptions = isNewEntryFlowEnabled ? companyTypes.filter((companyType2) => companyType2.id !== CompanyTypesValue.INCORPORATED_PARTNERSHIP && companyType2.id !== CompanyTypesValue.INCORPORATED_ASSOCIATION) : companyTypes;
26213
+ const companyTypeExamples2 = useCompanyTypeExamples(country2);
26214
+ const accountHolderProps = getFieldProps({
26215
+ id: id2,
26216
+ data,
26217
+ labels: labels2,
26218
+ heading,
26219
+ description: description2,
26220
+ formVerificationErrors,
26221
+ fieldValidationErrors,
26222
+ requiredFields,
26223
+ country: country2,
26224
+ ...props
26225
+ }, accountHolderFields);
25851
26226
  return jsxs("form", {
25852
26227
  children: [jsx(FormHeader, {
25853
26228
  heading,
@@ -25862,18 +26237,24 @@ function CompanyStructureComponent({
25862
26237
  useLabelElement: false,
25863
26238
  errorMessage: formUtils.getErrorMessage("entityType", formErrors, formFieldProblems),
25864
26239
  classNameModifiers: ["entityType"],
25865
- children: (childProps) => jsx(RadioGroupCard, {
26240
+ children: (childProps) => jsx(EntityTypeRadioGroupCard, {
25866
26241
  ...childProps,
25867
26242
  "aria-required": true,
25868
26243
  "aria-label": formUtils.getLabel("entityType", "whatTypeOfCompanyDoYouHave"),
25869
26244
  "aria-invalid": !formValid.entityType,
25870
26245
  name: "entityType",
25871
26246
  items: companyTypeOptions,
25872
- selected: companyTypeOptions.find((type) => type.id === (formData == null ? void 0 : formData.entityType)),
26247
+ selected: companyTypeOptions.find((type) => type.id === formData.entityType),
25873
26248
  readonly: disabled,
25874
- isItemDisabled: () => disabled,
25875
- onSelect: (item) => handleChangeFor("entityType")(item.id)
26249
+ onSelect: (item) => handleChangeFor("entityType")(item.id),
26250
+ examples: companyTypeExamples2
25876
26251
  })
26252
+ }), !isNewEntryFlowEnabled && country2 && jsx(AccountHolder, {
26253
+ ...accountHolderProps,
26254
+ dataStoreId: id2,
26255
+ legalEntityType: LegalEntityType.ORGANIZATION,
26256
+ country: country2,
26257
+ onChange: (value) => handleChangeFor("accountHolder")(value.data.accountHolder)
25877
26258
  })]
25878
26259
  });
25879
26260
  }
@@ -25903,12 +26284,14 @@ const forms = {
25903
26284
  companyRegistrationDocument: {
25904
26285
  formId: "companyRegistrationDocument",
25905
26286
  formName: "companyRegistrationDocumentFormName",
26287
+ formHeading: "companyRegistrationDocumentHeading",
25906
26288
  formDescription: "companyRegistrationDocumentFormDescription",
25907
26289
  fields: ["registrationDocument"]
25908
26290
  },
25909
26291
  companyTaxDocument: {
25910
26292
  formId: "companyTaxDocument",
25911
26293
  formName: "companyTaxDocumentFormName",
26294
+ formHeading: "companyTaxDocumentFormHeading",
25912
26295
  formDescription: "companyTaxDocumentFormDescription",
25913
26296
  fields: ["taxDocument"]
25914
26297
  }
@@ -26139,7 +26522,7 @@ const mapApiDocumentToCompanySearchDocuments = (entityId) => {
26139
26522
  } : void 0
26140
26523
  };
26141
26524
  };
26142
- const mapLegalEntityToCompanySearchSchema = (legalEntity) => {
26525
+ const mapLegalEntityToCompanySearchSchema = (legalEntity, isChangingType) => {
26143
26526
  const companySearchSchema = {
26144
26527
  companyBasics: {},
26145
26528
  companyRegistrationAddress: {},
@@ -26184,7 +26567,10 @@ const mapLegalEntityToCompanySearchSchema = (legalEntity) => {
26184
26567
  case "companyStructure": {
26185
26568
  return {
26186
26569
  ...componentData,
26187
- [key]: value
26570
+ [key]: {
26571
+ ...value,
26572
+ accountHolder: getDefaultAccountHolderType(legalEntity, isChangingType)
26573
+ }
26188
26574
  };
26189
26575
  }
26190
26576
  case "companyRegistrationDocument": {
@@ -26215,6 +26601,7 @@ function useCompanySearchTaskSubmit({
26215
26601
  legalEntityResponse,
26216
26602
  problems,
26217
26603
  baseTrackingPayload,
26604
+ isTargetLegalEntityType,
26218
26605
  documentUtils,
26219
26606
  setProblems,
26220
26607
  setLoadingStatus,
@@ -26276,7 +26663,7 @@ function useCompanySearchTaskSubmit({
26276
26663
  legalEntityName: ((_c = data.companyBasics) == null ? void 0 : _c.legalCompanyName) ?? null,
26277
26664
  usedAdditionalAddress: ((_d = data.companyRegistrationAddress) == null ? void 0 : _d.operationalAddressIsSame) === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
26278
26665
  };
26279
- const savedLegalEntityData = mapLegalEntityToCompanySearchSchema(legalEntityResponse);
26666
+ const savedLegalEntityData = mapLegalEntityToCompanySearchSchema(legalEntityResponse, isTargetLegalEntityType);
26280
26667
  const filteredData = removeOldDataBySchema(data, savedLegalEntityData);
26281
26668
  const legalEntity = {
26282
26669
  ...mapCompanySearchSchemaToLegalEntity(filteredData),
@@ -26349,7 +26736,7 @@ function useCompanySearchTaskSubmit({
26349
26736
  };
26350
26737
  }
26351
26738
  function CompanySearchComponent(props) {
26352
- var _a, _b, _c;
26739
+ var _a, _b, _c, _d, _e, _f;
26353
26740
  const {
26354
26741
  i18n
26355
26742
  } = useI18nContext();
@@ -26365,12 +26752,14 @@ function CompanySearchComponent(props) {
26365
26752
  handleCompanyDeepSearch,
26366
26753
  handleGetCompanyDataset,
26367
26754
  handleRefreshCompanyDataset,
26368
- handleVerifyTin
26755
+ handleVerifyTin,
26756
+ onTypeSwitch
26369
26757
  } = props;
26370
26758
  const globalData = useGlobalData();
26371
26759
  const [kompanyAddress, setKompanyAddress] = useState();
26372
26760
  const [kompanyVerifiedData, setKompanyVerifiedData] = useState();
26373
26761
  const formWrapperClasses = (formId) => (activeForm == null ? void 0 : activeForm.formId) !== formId ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper";
26762
+ this.customNavigationHandler = ((_a = globalData.companyStructure) == null ? void 0 : _a.accountHolder) === "myName" ? () => onTypeSwitch == null ? void 0 : onTypeSwitch(LegalEntityType.INDIVIDUAL) : null;
26374
26763
  return jsxs("div", {
26375
26764
  className: "adyen-kyc-company",
26376
26765
  children: [jsx("div", {
@@ -26380,7 +26769,7 @@ function CompanySearchComponent(props) {
26380
26769
  id: forms.companyBasics.formId,
26381
26770
  heading: i18n.get(forms.companyBasics.formName),
26382
26771
  country: country2,
26383
- companyType: (_a = globalData == null ? void 0 : globalData.companyStructure) == null ? void 0 : _a.entityType,
26772
+ companyType: (_b = globalData == null ? void 0 : globalData.companyStructure) == null ? void 0 : _b.entityType,
26384
26773
  isTopLevelEntity,
26385
26774
  baseTrackingPayload,
26386
26775
  handleCompanyIndexSearch,
@@ -26414,6 +26803,7 @@ function CompanySearchComponent(props) {
26414
26803
  id: forms.companyStructure.formId,
26415
26804
  heading: i18n.get(forms.companyStructure.formName),
26416
26805
  description: i18n.get(forms.companyStructure.formDescription),
26806
+ country: country2,
26417
26807
  kompanyVerifiedData
26418
26808
  })
26419
26809
  }), jsx("div", {
@@ -26423,60 +26813,39 @@ function CompanySearchComponent(props) {
26423
26813
  id: forms.companyOtherDetails.formId,
26424
26814
  heading: i18n.get(forms.companyOtherDetails.formName),
26425
26815
  country: country2,
26426
- legalCompanyName: (_b = globalData == null ? void 0 : globalData.companyBasics) == null ? void 0 : _b.legalCompanyName,
26427
- companyType: (_c = globalData == null ? void 0 : globalData.companyStructure) == null ? void 0 : _c.entityType,
26816
+ legalCompanyName: (_c = globalData == null ? void 0 : globalData.companyBasics) == null ? void 0 : _c.legalCompanyName,
26817
+ companyType: (_d = globalData == null ? void 0 : globalData.companyStructure) == null ? void 0 : _d.entityType,
26428
26818
  kompanyVerifiedData
26429
26819
  })
26430
26820
  }), jsx("div", {
26431
26821
  className: formWrapperClasses(forms.companyRegistrationDocument.formId),
26432
- children: jsx(DocumentUpload, {
26822
+ children: jsx(RegistrationDocumentComponent, {
26433
26823
  ...getFormProps(props, forms.companyRegistrationDocument.formId),
26434
26824
  id: forms.companyRegistrationDocument.formId,
26435
- heading: i18n.get(forms.companyRegistrationDocument.formName),
26436
- description: i18n.get(forms.companyRegistrationDocument.formDescription),
26437
- documentField: "registrationDocument",
26438
- documentType: DocumentType.REGISTRATION_DOCUMENT,
26439
- guidanceContent: jsxs(Fragment, {
26440
- children: [jsx("div", {
26441
- className: "adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16",
26442
- children: i18n.get("registrationDocumentSubTitle")
26443
- }), jsxs("div", {
26444
- className: "adyen-kyc-upload-field__subtitle",
26445
- children: [" ", i18n.get("requirements")]
26446
- }), jsxs(List, {
26447
- className: "adyen-kyc-upload-field__requirements",
26448
- children: [jsx(ListItem, {
26449
- children: i18n.get("documentIssuedByGovernmentAuthority")
26450
- }), jsx(ListItem, {
26451
- children: i18n.get("dateOnDocumentNoOlderThanXMonths", {
26452
- values: {
26453
- numberOfMonths: 12
26454
- }
26455
- })
26456
- })]
26457
- }), jsx(ContextGuidance, {
26458
- page: "Company registration document",
26459
- titleId: "whatIfDocumentIsMoreThan12MonthsOld",
26460
- contentId: "ifDocumentMoreThan12months",
26461
- title: i18n.get("whatIfDocumentIsMoreThan12MonthsOld"),
26462
- content: i18n.get("ifDocumentMoreThan12months")
26463
- })]
26464
- })
26825
+ heading: forms.companyRegistrationDocument.formHeading,
26826
+ description: forms.companyRegistrationDocument.formDescription,
26827
+ country: country2,
26828
+ companyType: (_e = globalData.companyStructure) == null ? void 0 : _e.entityType
26465
26829
  })
26466
26830
  }), jsx("div", {
26467
26831
  className: formWrapperClasses(forms.companyTaxDocument.formId),
26468
- children: jsx(DocumentUpload, {
26832
+ children: country2 === "US" ? jsx(TaxDocumentComponent, {
26469
26833
  ...getFormProps(props, forms.companyTaxDocument.formId),
26470
26834
  id: forms.companyTaxDocument.formId,
26471
- heading: i18n.get(forms.companyTaxDocument.formName),
26835
+ heading: forms.companyTaxDocument.formHeading,
26836
+ description: forms.companyTaxDocument.formDescription,
26837
+ country: country2,
26838
+ companyType: (_f = globalData.companyStructure) == null ? void 0 : _f.entityType
26839
+ }) : jsx(DocumentUpload, {
26840
+ ...getFormProps(props, forms.companyTaxDocument.formId),
26841
+ id: forms.companyTaxDocument.formId,
26842
+ heading: i18n.get(forms.companyTaxDocument.formHeading),
26472
26843
  description: i18n.get(forms.companyTaxDocument.formDescription),
26473
26844
  documentField: "taxDocument",
26474
- documentType: country2 === "US" ? DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO : DocumentType.VAT_DOCUMENT,
26475
- guidanceContent: jsxs(Fragment, {
26476
- children: [jsx("div", {
26477
- className: "adyen-kyc-document-upload__subtitle adl-u-margin-bottom-16",
26478
- children: i18n.get("uploadTaxationDocument")
26479
- }), jsxs("div", {
26845
+ documentType: DocumentType.VAT_DOCUMENT,
26846
+ guidanceContent: jsxs("div", {
26847
+ className: "adl-u-margin-bottom-24",
26848
+ children: [jsxs("div", {
26480
26849
  className: "adyen-kyc-upload-field__subtitle",
26481
26850
  children: [" ", i18n.get("requirements")]
26482
26851
  }), jsxs(List, {
@@ -26498,6 +26867,7 @@ function CompanySearchDropinComponent({
26498
26867
  country: parentCountry,
26499
26868
  problems: propProblems,
26500
26869
  legalEntityResponse,
26870
+ isTargetLegalEntityType,
26501
26871
  parentLegalEntity,
26502
26872
  trackingConfig,
26503
26873
  eventEmitter,
@@ -26519,7 +26889,8 @@ function CompanySearchDropinComponent({
26519
26889
  handleCompanyDeepSearch,
26520
26890
  handleGetCompanyDataset,
26521
26891
  handleRefreshCompanyDataset,
26522
- handleVerifyTin
26892
+ handleVerifyTin,
26893
+ onTypeSwitch
26523
26894
  }) {
26524
26895
  var _a, _b, _c, _d;
26525
26896
  const {
@@ -26545,7 +26916,7 @@ function CompanySearchDropinComponent({
26545
26916
  isExperimentEnabled
26546
26917
  } = useExperimentsContext();
26547
26918
  const [loadingStatus, setLoadingStatus] = useState("success");
26548
- const [initialData, setInitialData] = useState(mapLegalEntityToCompanySearchSchema(legalEntityResponse));
26919
+ const [initialData, setInitialData] = useState(mapLegalEntityToCompanySearchSchema(legalEntityResponse, Boolean(isTargetLegalEntityType)));
26549
26920
  const country2 = useMemo(() => {
26550
26921
  var _a2;
26551
26922
  return ((_a2 = currentState.data.companyBasics) == null ? void 0 : _a2.country) ?? parentCountry;
@@ -26570,7 +26941,7 @@ function CompanySearchDropinComponent({
26570
26941
  }, []);
26571
26942
  const getConfigurationData = useCallback(() => getConfiguration2({
26572
26943
  legalEntityType: LegalEntityType.ORGANIZATION,
26573
- capabilities: capabilities ?? Object.keys(legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities),
26944
+ capabilities: capabilities ?? getCapabilities(legalEntityResponse),
26574
26945
  country: country2
26575
26946
  }), [getConfiguration2, capabilities, country2, legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities]);
26576
26947
  const {
@@ -26631,6 +27002,7 @@ function CompanySearchDropinComponent({
26631
27002
  legalEntityResponse,
26632
27003
  problems,
26633
27004
  baseTrackingPayload,
27005
+ isTargetLegalEntityType: Boolean(isTargetLegalEntityType),
26634
27006
  documentUtils,
26635
27007
  setProblems,
26636
27008
  setLoadingStatus,
@@ -26689,6 +27061,7 @@ function CompanySearchDropinComponent({
26689
27061
  activeForm,
26690
27062
  shouldValidate,
26691
27063
  isTopLevelEntity: taskType === TaskTypes.COMPANY_SEARCH,
27064
+ onTypeSwitch,
26692
27065
  baseTrackingPayload,
26693
27066
  handleAddressSearch,
26694
27067
  handleFindAddress,
@@ -27141,6 +27514,38 @@ function AccountSetupRejected() {
27141
27514
  content
27142
27515
  });
27143
27516
  }
27517
+ const legalArrangementTypeExamples = /* @__PURE__ */ Object.assign({ "./AT.json": () => import("./AT-njBxlQEe.js"), "./AU.json": () => import("./AU-DFQDmtVS.js"), "./BE.json": () => import("./BE-C2-55587.js"), "./BR.json": () => import("./BR-DRRnRMe_.js"), "./CA.json": () => import("./CA-DF_5NHUp.js"), "./CH.json": () => import("./CH-DS_pPGGY.js"), "./CZ.json": () => import("./CZ-CGN19Iaf.js"), "./DE.json": () => import("./DE-CWIcy4sf.js"), "./DK.json": () => import("./DK-CUV7SrN_.js"), "./ES.json": () => import("./ES-CXBTHBlj.js"), "./FI.json": () => import("./FI-D9lkf5Ag.js"), "./FR.json": () => import("./FR-C62B055T.js"), "./GB.json": () => import("./GB-C3gyya0v.js"), "./HK.json": () => import("./HK-BHvvteyC.js"), "./HR.json": () => import("./HR-BuR2eqt5.js"), "./HU.json": () => import("./HU-BeWCk1sl.js"), "./IE.json": () => import("./IE-DY6xU4Nq.js"), "./IT.json": () => import("./IT-DIpVZHWq.js"), "./LT.json": () => import("./LT-vsmh_veZ.js"), "./NL.json": () => import("./NL-D4GPWO-k.js"), "./NO.json": () => import("./NO-C2rMiNW_.js"), "./PL.json": () => import("./PL-B6DmYhdz.js"), "./PT.json": () => import("./PT-CiWuVvP4.js"), "./RO.json": () => import("./RO-CbO4Kr4f.js"), "./SE.json": () => import("./SE-ClnBSAdx.js"), "./SG.json": () => import("./SG-CQ7yymJt.js"), "./SI.json": () => import("./SI-CKmjaPXK.js"), "./SK.json": () => import("./SK-BHbQeHKV.js"), "./US.json": () => import("./US-Dxp45Utb.js") });
27518
+ const getLegalArrangementTypeExamplesForCountry = async (country2) => {
27519
+ const importForCountry = legalArrangementTypeExamples[`./${country2}.json`];
27520
+ if (!importForCountry) {
27521
+ console.warn(`No legal arrangement type examples available for ${country2}`);
27522
+ return {};
27523
+ }
27524
+ return (await importForCountry()).default;
27525
+ };
27526
+ const useLegalArrangementTypeExamples = (country2) => {
27527
+ const [examples, setExamples] = useState();
27528
+ useEffect(() => {
27529
+ getLegalArrangementTypeExamplesForCountry(country2).then(setExamples).catch(console.error);
27530
+ }, [country2]);
27531
+ return examples;
27532
+ };
27533
+ const businessTypeExamples = /* @__PURE__ */ Object.assign({ "./AT.json": () => import("./AT-0q_5SJBQ.js"), "./AU.json": () => import("./AU-C8Ubk0YW.js"), "./BE.json": () => import("./BE-B9YzjIbl.js"), "./BR.json": () => import("./BR-Cm5wlqzu.js"), "./CA.json": () => import("./CA-GPzRNbT4.js"), "./CH.json": () => import("./CH-BN1IKzah.js"), "./CZ.json": () => import("./CZ-BC067qOt.js"), "./DE.json": () => import("./DE-C2b48uc9.js"), "./DK.json": () => import("./DK-DQdJTd7G.js"), "./ES.json": () => import("./ES-DlS7RO1p.js"), "./FI.json": () => import("./FI-DJJ7pR5Q.js"), "./FR.json": () => import("./FR-CmqiYchK.js"), "./GB.json": () => import("./GB-BsDyOPB2.js"), "./HK.json": () => import("./HK-aqSN9boX.js"), "./HR.json": () => import("./HR-lqt3S_K0.js"), "./HU.json": () => import("./HU-Cy7JJAmz.js"), "./IE.json": () => import("./IE-ncc5PJTM.js"), "./IT.json": () => import("./IT-DUpC-s62.js"), "./LT.json": () => import("./LT-DYEMsFLH.js"), "./NL.json": () => import("./NL-Bl-zh21O.js"), "./NO.json": () => import("./NO-6kmy-zV2.js"), "./PL.json": () => import("./PL-DfF0yMD3.js"), "./PT.json": () => import("./PT-ClgahH9J.js"), "./RO.json": () => import("./RO-DzjKAzZD.js"), "./SE.json": () => import("./SE-L3pYtteT.js"), "./SG.json": () => import("./SG-BCG6hbHH.js"), "./SI.json": () => import("./SI-DdcTeBdP.js"), "./SK.json": () => import("./SK-DOx6jvRF.js"), "./US.json": () => import("./US-BfGmXLD9.js") });
27534
+ const getBusinessTypeExamplesForCountry = async (country2) => {
27535
+ const importForCountry = businessTypeExamples[`./${country2}.json`];
27536
+ if (!importForCountry) {
27537
+ console.warn(`No business type examples available for ${country2}`);
27538
+ return {};
27539
+ }
27540
+ return (await importForCountry()).default;
27541
+ };
27542
+ const useBusinessTypeExamples = (country2) => {
27543
+ const [examples, setExamples] = useState();
27544
+ useEffect(() => {
27545
+ getBusinessTypeExamplesForCountry(country2).then(setExamples).catch(console.error);
27546
+ }, [country2]);
27547
+ return examples;
27548
+ };
27144
27549
  const headingTypes = {
27145
27550
  1: ({
27146
27551
  children,
@@ -27242,6 +27647,9 @@ const businessTypeSelectionStepTitles = {
27242
27647
  /* CONFIRM_BUSINESS_SETUP_CHANGE */
27243
27648
  ]: "changeYourBusinessSetup"
27244
27649
  };
27650
+ const BusinessTypeIcon = (item) => jsx(Icon, {
27651
+ name: businessTypeIcons[item.id]
27652
+ });
27245
27653
  const BusinessTypeSelection = ({
27246
27654
  legalEntityResponse,
27247
27655
  accountHolder: accountHolder2,
@@ -27259,9 +27667,6 @@ const BusinessTypeSelection = ({
27259
27667
  const {
27260
27668
  showToast
27261
27669
  } = useToastContext();
27262
- const {
27263
- isExperimentEnabled
27264
- } = useExperimentsContext();
27265
27670
  const [loadingStatus, setLoadingStatus] = useState();
27266
27671
  const [currentStep, setCurrentStep] = useState(
27267
27672
  0
@@ -27277,14 +27682,13 @@ const BusinessTypeSelection = ({
27277
27682
  const {
27278
27683
  businessTypeOptions,
27279
27684
  legalArrangementOptions
27280
- } = getSelectionOptions(legalEntityResponse, {
27281
- ShowUnsupportedEntityType: isExperimentEnabled("ShowUnsupportedEntityType")
27282
- });
27685
+ } = useSelectionOptions(legalEntityResponse);
27283
27686
  const currentLegalEntityType = legalEntityResponse == null ? void 0 : legalEntityResponse.type;
27284
27687
  const currentCompanyTypesValue = (_a = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _a.type;
27285
- const defaultBusinessType = getBusinessType(businessTypeOptions, accountHolder2, legalEntityResponse == null ? void 0 : legalEntityResponse.type, (_b = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _b.type);
27286
- const getDefaultLegalArrangementSelection = () => legalArrangementOptions.find((item) => item.id === getDefaultLegalArrangementOrSuborganizationType(legalEntityResponse, accountHolder2));
27287
- const defaultLegalArrangementType = getDefaultLegalArrangementSelection();
27688
+ const capabilities = getCapabilities(legalEntityResponse);
27689
+ const country2 = getLegalEntityCountry(legalEntityResponse);
27690
+ const defaultBusinessType = getBusinessType(businessTypeOptions, country2, accountHolder2, legalEntityResponse == null ? void 0 : legalEntityResponse.type, (_b = legalEntityResponse == null ? void 0 : legalEntityResponse.organization) == null ? void 0 : _b.type, capabilities);
27691
+ const defaultLegalArrangementType = legalArrangementOptions.find((item) => item.id === getDefaultLegalArrangementOrSuborganizationType(legalEntityResponse, accountHolder2));
27288
27692
  const defaultTrusteeType = legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? trusteeTypeItems[0] : trusteeTypeItems[1];
27289
27693
  const {
27290
27694
  handleChangeFor,
@@ -27428,6 +27832,8 @@ const BusinessTypeSelection = ({
27428
27832
  }
27429
27833
  };
27430
27834
  const isWeCannotSetUpAccountStep = currentStep === 2;
27835
+ const businessTypeExamples2 = useBusinessTypeExamples(country2);
27836
+ const legalArrangementTypeExamples2 = useLegalArrangementTypeExamples(country2);
27431
27837
  return jsx(LoaderWrapper, {
27432
27838
  status: loadingStatus,
27433
27839
  formOpacityWhenLoading: 0.3,
@@ -27449,15 +27855,17 @@ const BusinessTypeSelection = ({
27449
27855
  errorMessage: i18n.get((_i = errors.businessType) == null ? void 0 : _i.errorMessage),
27450
27856
  showErrorIconBottom: true,
27451
27857
  isValid: valid.businessType,
27452
- children: (childProps) => jsx(RadioGroupCard, {
27858
+ children: (childProps) => jsx(EntityTypeRadioGroupCard, {
27453
27859
  ...childProps,
27454
27860
  name: "businessType",
27455
27861
  items: businessTypeOptions,
27862
+ itemIcon: BusinessTypeIcon,
27456
27863
  selected: businessTypeOptions.find((type) => {
27457
27864
  var _a2;
27458
27865
  return type.id === ((_a2 = data.businessType) == null ? void 0 : _a2.id);
27459
27866
  }),
27460
- onSelect: (item) => handleChangeFor("businessType")(item)
27867
+ onSelect: (item) => handleChangeFor("businessType")(item),
27868
+ examples: businessTypeExamples2
27461
27869
  })
27462
27870
  }), currentStep === 1 && jsxs(Fragment, {
27463
27871
  children: [jsx(Field, {
@@ -27466,7 +27874,7 @@ const BusinessTypeSelection = ({
27466
27874
  errorMessage: i18n.get((_j = errors.legalArrangement) == null ? void 0 : _j.errorMessage),
27467
27875
  showErrorIconBottom: true,
27468
27876
  isValid: valid.legalArrangement,
27469
- children: (childProps) => jsx(RadioGroupCard, {
27877
+ children: (childProps) => jsx(EntityTypeRadioGroupCard, {
27470
27878
  ...childProps,
27471
27879
  name: "legalArrangement",
27472
27880
  items: legalArrangementOptions,
@@ -27474,7 +27882,8 @@ const BusinessTypeSelection = ({
27474
27882
  var _a2;
27475
27883
  return legalArrangementOption.id === ((_a2 = data.legalArrangement) == null ? void 0 : _a2.id);
27476
27884
  }),
27477
- onSelect: (item) => handleChangeFor("legalArrangement")(item)
27885
+ onSelect: (item) => handleChangeFor("legalArrangement")(item),
27886
+ examples: legalArrangementTypeExamples2
27478
27887
  })
27479
27888
  }), ((_k = data.legalArrangement) == null ? void 0 : _k.id) === "aTrust" && jsx(Field, {
27480
27889
  name: "trusteeType",
@@ -29471,9 +29880,7 @@ function IndividualDropinComponent({
29471
29880
  handleBackClick: externalBackClick
29472
29881
  }) {
29473
29882
  var _a, _b, _c, _d;
29474
- const {
29475
- setAccountHolder
29476
- } = useCoreContext();
29883
+ useCoreContext();
29477
29884
  const {
29478
29885
  i18n,
29479
29886
  setLocale
@@ -29488,6 +29895,9 @@ function IndividualDropinComponent({
29488
29895
  const {
29489
29896
  isEmbeddedDropin
29490
29897
  } = useAuthContext();
29898
+ const {
29899
+ isExperimentEnabled
29900
+ } = useExperimentsContext();
29491
29901
  let dataFromResponse = mapLegalEntityToIndividual(legalEntityResponse, isTargetLegalEntityType);
29492
29902
  const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
29493
29903
  let roleTypes = [];
@@ -29530,7 +29940,8 @@ function IndividualDropinComponent({
29530
29940
  data,
29531
29941
  country: country2,
29532
29942
  taskType,
29533
- isEmbeddedDropin
29943
+ isEmbeddedDropin,
29944
+ isExperimentEnabled
29534
29945
  }), [country2, data, taskType]);
29535
29946
  const derivedProps = useMemo(() => getPropsFromConfigurations(fieldConfigurations, individualForms, (problems == null ? void 0 : problems.remediationActions) ? Object.values(problems == null ? void 0 : problems.remediationActions) : [], (problems == null ? void 0 : problems.missingData) ?? [], legalEntityResponse ? getFieldsWithExistingData(legalEntityResponse) : [], fieldsFromCustomRules), [fieldConfigurations, fieldsFromCustomRules, problems == null ? void 0 : problems.remediationActions]);
29536
29947
  const {
@@ -29687,7 +30098,7 @@ function IndividualDropinComponent({
29687
30098
  }
29688
30099
  };
29689
30100
  const onSubmit = async () => {
29690
- var _a2, _b2, _c2, _d2;
30101
+ var _a2, _b2, _c2;
29691
30102
  setLoadingStatus("loading");
29692
30103
  const dataSubmitted = omitObscuredFieldsIfUnchanged(individualObscuredFields, data, dataFromResponse);
29693
30104
  if (!dataSubmitted) {
@@ -29726,9 +30137,6 @@ function IndividualDropinComponent({
29726
30137
  dataSubmitted
29727
30138
  });
29728
30139
  }
29729
- if (taskType === TaskTypes.INDIVIDUAL) {
29730
- setAccountHolder(((_d2 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _d2.accountHolder) || null);
29731
- }
29732
30140
  setLoadingStatus("success");
29733
30141
  clearToasts();
29734
30142
  externalOnSubmit == null ? void 0 : externalOnSubmit(dataSubmitted);
@@ -29890,7 +30298,7 @@ function IndividualDropinComponent({
29890
30298
  hideNavigation,
29891
30299
  children: jsx(IndividualComponent, {
29892
30300
  ...derivedProps,
29893
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
30301
+ capabilities: getCapabilities(legalEntityResponse),
29894
30302
  data: {
29895
30303
  ...dataFromResponse,
29896
30304
  ...documents2
@@ -30008,7 +30416,6 @@ const rules$1 = ({
30008
30416
  }
30009
30417
  }
30010
30418
  });
30011
- const getRegistrationCountry = (legalEntityResponse) => legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? legalEntityResponse.individual.residentialAddress.country : legalEntityResponse.organization.registeredAddress.country;
30012
30419
  const labels = () => ({
30013
30420
  verifiedAccountHolder: () => "accountHolder",
30014
30421
  verifiedBankCountry: () => "bankCountry",
@@ -30075,7 +30482,7 @@ function PayoutDetailsDropinComponent({
30075
30482
  const {
30076
30483
  getConfiguration: getConfiguration2
30077
30484
  } = useConfigurationApi();
30078
- const defaultPayoutCountry = getRegistrationCountry(legalEntityResponse);
30485
+ const defaultPayoutCountry = getLegalEntityCountry(legalEntityResponse);
30079
30486
  const existingPayoutDetails = transferInstrument ? mapTransferInstrumentToPayoutAccount(transferInstrument) : void 0;
30080
30487
  const [documents2, setDocuments] = useState();
30081
30488
  const fallbackCurrency = (_a = currencyByCountry[defaultPayoutCountry]) == null ? void 0 : _a[0];
@@ -31347,7 +31754,8 @@ const useServiceAgreement = ({
31347
31754
  try {
31348
31755
  const {
31349
31756
  termsOfServiceDocumentId,
31350
- document: document2
31757
+ document: document2,
31758
+ type
31351
31759
  } = await handleGetServiceAgreement(legalEntityId, {
31352
31760
  type: serviceAgreementType,
31353
31761
  language: agreementLanguage
@@ -31359,7 +31767,8 @@ const useServiceAgreement = ({
31359
31767
  const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
31360
31768
  setServiceAgreement({
31361
31769
  id: termsOfServiceDocumentId,
31362
- contract
31770
+ contract,
31771
+ type
31363
31772
  });
31364
31773
  setLoading("success");
31365
31774
  } catch (err) {
@@ -31391,6 +31800,7 @@ const serviceAgreementTypesTranslationMapping = {
31391
31800
  function ServiceAgreementDropinComponent({
31392
31801
  legalEntityResponse,
31393
31802
  handleGetServiceAgreement,
31803
+ handleDownloadAcceptedTermsOfServiceDocument,
31394
31804
  handleHomeClick,
31395
31805
  handleSign,
31396
31806
  taskType,
@@ -31411,19 +31821,25 @@ function ServiceAgreementDropinComponent({
31411
31821
  task: taskType
31412
31822
  });
31413
31823
  const [loadingStatus, setLoadingStatus] = useState();
31824
+ const signedForms = serviceAgreementAcceptanceInfos.map((serviceAgreementAcceptanceInfo) => ({
31825
+ formId: serviceAgreementAcceptanceInfo.id,
31826
+ serviceAgreementType: serviceAgreementAcceptanceInfo.type,
31827
+ acceptanceId: serviceAgreementAcceptanceInfo.id,
31828
+ acceptedByName: serviceAgreementAcceptanceInfo.acceptedByName,
31829
+ formName: serviceAgreementTypesTranslationMapping[serviceAgreementAcceptanceInfo.type],
31830
+ isValid: true
31831
+ }));
31414
31832
  const formsToBeSigned = serviceAgreementTypes.map((serviceAgreementType) => ({
31415
31833
  formId: serviceAgreementType,
31834
+ serviceAgreementType,
31416
31835
  formName: serviceAgreementTypesTranslationMapping[serviceAgreementType],
31417
31836
  isValid: false
31418
31837
  }));
31419
- const signedForms = serviceAgreementAcceptanceInfos.map((serviceAgreementAcceptanceInfo) => ({
31420
- formId: serviceAgreementAcceptanceInfo.type,
31421
- formName: serviceAgreementTypesTranslationMapping[serviceAgreementAcceptanceInfo.type],
31422
- isValid: true
31423
- }));
31424
- const forms2 = [...formsToBeSigned, ...signedForms];
31425
- const [activeForm, setActiveForm] = useState(forms2[0]);
31426
- const canSign = serviceAgreementTypes.includes(activeForm.formId);
31838
+ const forms2 = [...signedForms, ...formsToBeSigned];
31839
+ const [activeFormIndex, setActiveFormIndex] = useState(0);
31840
+ const [activeForm, setActiveForm] = useState(forms2[activeFormIndex]);
31841
+ const canSign = (serviceAgreementTypes == null ? void 0 : serviceAgreementTypes.includes(activeForm.serviceAgreementType)) && !activeForm.acceptanceId;
31842
+ const canDownload = !!handleDownloadAcceptedTermsOfServiceDocument && !!activeForm.acceptanceId;
31427
31843
  const handleServiceAgreementIsNotAvailableInThatLanguage = useCallback(() => {
31428
31844
  showToast({
31429
31845
  label: i18n.get("failedToGetServiceAgreementInSelectedLanguageFallbackToEn"),
@@ -31437,7 +31853,7 @@ function ServiceAgreementDropinComponent({
31437
31853
  handleGetServiceAgreement,
31438
31854
  handleServiceAgreementIsNotAvailableInThatLanguage,
31439
31855
  legalEntityId: legalEntityResponse.id,
31440
- serviceAgreementType: activeForm.formId,
31856
+ serviceAgreementType: activeForm.serviceAgreementType,
31441
31857
  language: i18n.languageCode
31442
31858
  });
31443
31859
  const {
@@ -31467,9 +31883,9 @@ function ServiceAgreementDropinComponent({
31467
31883
  ...baseTrackingPayload
31468
31884
  }
31469
31885
  });
31886
+ triggerValidation();
31470
31887
  if (loadingStatus === "loading" || !serviceAgreement || !data.signer)
31471
31888
  return;
31472
- triggerValidation();
31473
31889
  if (isValid) {
31474
31890
  try {
31475
31891
  setLoadingStatus("loading");
@@ -31486,6 +31902,8 @@ function ServiceAgreementDropinComponent({
31486
31902
  ...baseTrackingPayload
31487
31903
  }
31488
31904
  });
31905
+ data.acceptServiceAgreement = false;
31906
+ data.signer = void 0;
31489
31907
  } catch {
31490
31908
  setLoadingStatus("success");
31491
31909
  showToast({
@@ -31524,12 +31942,10 @@ function ServiceAgreementDropinComponent({
31524
31942
  });
31525
31943
  };
31526
31944
  useEffect(() => {
31527
- if (forms2.length) {
31528
- setActiveForm(forms2[0]);
31529
- } else {
31530
- goHome();
31531
- }
31532
- }, [serviceAgreementTypes]);
31945
+ if (!serviceAgreementAcceptanceInfos.length)
31946
+ return;
31947
+ gotoForm(serviceAgreementAcceptanceInfos.length - 1);
31948
+ }, [serviceAgreementAcceptanceInfos]);
31533
31949
  useEffect(() => {
31534
31950
  userEvents.addPageView("ToS dropin");
31535
31951
  userEvents.addEvent("Started ToS task", {
@@ -31537,27 +31953,38 @@ function ServiceAgreementDropinComponent({
31537
31953
  ...baseTrackingPayload
31538
31954
  }
31539
31955
  });
31956
+ const initialFormIndex = forms2.length === signedForms.length ? 0 : signedForms.length;
31957
+ gotoForm(initialFormIndex);
31540
31958
  }, []);
31541
31959
  const gotoForm = (index) => {
31542
31960
  setActiveForm(forms2[index]);
31961
+ setActiveFormIndex(index);
31543
31962
  };
31544
- const sidebar = jsxs(LoaderWrapper, {
31963
+ const onDownloadAcceptedTermsOfServiceDocument = async () => {
31964
+ try {
31965
+ if (!canDownload)
31966
+ return;
31967
+ const response = await handleDownloadAcceptedTermsOfServiceDocument(legalEntityResponse.id, activeForm.acceptanceId);
31968
+ await downloadFile(response.document, `${i18n.get(activeForm.formName)}.pdf`);
31969
+ } catch (e) {
31970
+ showToast({
31971
+ label: i18n.get("failedToDownloadAcceptedServiceAgreementDocument"),
31972
+ type: ToastType.ERROR
31973
+ });
31974
+ }
31975
+ };
31976
+ const sidebar = jsx(LoaderWrapper, {
31545
31977
  status: loadingStatus,
31546
31978
  formOpacityWhenLoading: 0.3,
31547
31979
  showSpinner: false,
31548
31980
  className: "adyen-kyc-dropin__sidebar-wrapper",
31549
- children: [!!formsToBeSigned.length && jsx(FormNavigation, {
31550
- forms: formsToBeSigned,
31981
+ children: !!forms2.length && jsx(FormNavigation, {
31982
+ forms: forms2,
31551
31983
  activeForm,
31552
31984
  gotoForm,
31553
31985
  taskName: "signServiceAgreement",
31554
31986
  className: "adl-u-margin-bottom-24"
31555
- }), !!signedForms.length && jsx(FormNavigation, {
31556
- forms: signedForms,
31557
- activeForm,
31558
- gotoForm: (index) => gotoForm(formsToBeSigned.length + index),
31559
- taskName: "signedDocuments"
31560
- })]
31987
+ })
31561
31988
  });
31562
31989
  const content = jsxs(LoaderWrapper, {
31563
31990
  status: loadingStatus,
@@ -31600,11 +32027,35 @@ function ServiceAgreementDropinComponent({
31600
32027
  onChange: handleChangeFor("acceptServiceAgreement")
31601
32028
  })
31602
32029
  })]
32030
+ }), canDownload && jsx(Card, {
32031
+ stateful: true,
32032
+ className: "adl-u-margin-top-32",
32033
+ onClick: onDownloadAcceptedTermsOfServiceDocument,
32034
+ onKeyDown: handleKeys(["Enter"], onDownloadAcceptedTermsOfServiceDocument ?? noop),
32035
+ children: jsxs("div", {
32036
+ className: "adyen-kyc-download-card",
32037
+ children: [activeForm.acceptedByName && jsx("div", {
32038
+ className: "adyen-kyc-download-card__name",
32039
+ children: activeForm.acceptedByName
32040
+ }), jsx(Status, {
32041
+ className: "adl-status--finished adyen-kyc-download-card__status",
32042
+ iconStatusClass: "adl-status__icon--finished",
32043
+ icon: "check",
32044
+ text: i18n.get("signed")
32045
+ }), jsx(Icon, {
32046
+ className: "adyen-kyc-download-card__icon",
32047
+ name: "download"
32048
+ })]
32049
+ })
31603
32050
  }), jsx(ActionBar, {
31604
32051
  onHome: goHome,
31605
32052
  homeButtonLabel: i18n.get("goToOverview"),
31606
- onNext: canSign ? handleSignClick : void 0,
31607
- nextButtonLabel: canSign ? i18n.get("sign") : void 0
32053
+ onNext: canSign ? handleSignClick : () => gotoForm(activeFormIndex + 1),
32054
+ nextButtonLabel: i18n.get(canSign ? "sign" : "next"),
32055
+ nextButtonDisabled: !canSign && activeFormIndex === forms2.length - 1,
32056
+ onBack: () => gotoForm(activeFormIndex - 1),
32057
+ hideBackButton: activeFormIndex === 0,
32058
+ backButtonLabel: i18n.get("previous")
31608
32059
  })]
31609
32060
  });
31610
32061
  return jsx(DropinLayout, {
@@ -32308,7 +32759,7 @@ function DropinComposerComponent({
32308
32759
  const [pciTemplateResponse, setPciTemplateResponse] = useState(null);
32309
32760
  const [pciStatus, setPciStatus] = useState(null);
32310
32761
  const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
32311
- const [serviceAgreementAcceptanceInfos, setServiceAgreementAcceptanceInfos] = useState([]);
32762
+ const [serviceAgreementAcceptanceInfosWithNames, setServiceAgreementAcceptanceInfosWithNames] = useState([]);
32312
32763
  const [transferInstrument, setTransferInstrument] = useState(null);
32313
32764
  const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
32314
32765
  const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry, isExperimentEnabled));
@@ -32368,11 +32819,19 @@ function DropinComposerComponent({
32368
32819
  return;
32369
32820
  getPciTemplate2().catch(logger$b.error);
32370
32821
  }, [getPciTemplate2, tasks]);
32822
+ const addFetchedAcceptedByName = async (acceptanceInfo) => {
32823
+ const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
32824
+ return {
32825
+ ...acceptanceInfo,
32826
+ acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
32827
+ };
32828
+ };
32371
32829
  const getServiceAgreementAcceptanceInfos = async () => {
32372
32830
  if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
32373
32831
  try {
32374
32832
  const response = await args.handleGetServiceAgreementAcceptanceInfos(rootLegalEntity.id);
32375
- setServiceAgreementAcceptanceInfos(response.data);
32833
+ const serviceAgreementAcceptanceInfosWithNames2 = await Promise.all(response.data.map(addFetchedAcceptedByName));
32834
+ setServiceAgreementAcceptanceInfosWithNames(serviceAgreementAcceptanceInfosWithNames2);
32376
32835
  } catch (e) {
32377
32836
  logger$b.warn(i18n.get("failedToGetServiceAgreementStatus"));
32378
32837
  }
@@ -32851,7 +33310,7 @@ function DropinComposerComponent({
32851
33310
  onPciDownload,
32852
33311
  pciStatus,
32853
33312
  serviceAgreementTypes,
32854
- serviceAgreementAcceptanceInfos,
33313
+ serviceAgreementAcceptanceInfos: serviceAgreementAcceptanceInfosWithNames,
32855
33314
  isReview: reviewRequired,
32856
33315
  hasRequiredTrustMemberCount: hasRequiredTrustMemberCount(trustMembers2),
32857
33316
  onTransferInstrumentDelete: deleteTransferInstrument2
@@ -32881,7 +33340,7 @@ function DropinComposerComponent({
32881
33340
  legalEntityResponse: rootLegalEntity,
32882
33341
  country: rootLegalEntityCountry,
32883
33342
  problems: getLegalEntityProblems(rootLegalEntity),
32884
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33343
+ capabilities: getCapabilities(legalEntityResponse),
32885
33344
  onChange: componentOnChange,
32886
33345
  eventEmitter,
32887
33346
  onSubmit: async (data) => {
@@ -32919,7 +33378,7 @@ function DropinComposerComponent({
32919
33378
  legalEntityResponse: associatedLegalEntity,
32920
33379
  country: rootLegalEntityCountry,
32921
33380
  problems: getLegalEntityProblems(associatedLegalEntity),
32922
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33381
+ capabilities: getCapabilities(legalEntityResponse),
32923
33382
  onChange: componentOnChange,
32924
33383
  eventEmitter,
32925
33384
  onSubmit: componentOnSubmit,
@@ -32944,7 +33403,7 @@ function DropinComposerComponent({
32944
33403
  legalEntityResponse: associatedLegalEntity,
32945
33404
  problems: getLegalEntityProblems(associatedLegalEntity),
32946
33405
  country: rootLegalEntityCountry,
32947
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33406
+ capabilities: getCapabilities(legalEntityResponse),
32948
33407
  onChange: componentOnChange,
32949
33408
  eventEmitter,
32950
33409
  onSubmit: async (data) => {
@@ -32972,7 +33431,7 @@ function DropinComposerComponent({
32972
33431
  legalEntityResponse: associatedLegalEntity,
32973
33432
  country: rootLegalEntityCountry,
32974
33433
  problems: getLegalEntityProblems(associatedLegalEntity),
32975
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33434
+ capabilities: getCapabilities(legalEntityResponse),
32976
33435
  onChange: componentOnChange,
32977
33436
  eventEmitter,
32978
33437
  onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 2),
@@ -32998,7 +33457,7 @@ function DropinComposerComponent({
32998
33457
  taskType: TaskTypes.COMPANY,
32999
33458
  taskName: hasTrust ? "companyTrusteeDetails" : "companyDetails",
33000
33459
  legalEntityResponse: rootLegalEntity,
33001
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33460
+ capabilities: getCapabilities(legalEntityResponse),
33002
33461
  problems: getLegalEntityProblems(rootLegalEntity),
33003
33462
  onChange: componentOnChange,
33004
33463
  eventEmitter,
@@ -33025,7 +33484,7 @@ function DropinComposerComponent({
33025
33484
  taskType: TaskTypes.COMPANY_SEARCH,
33026
33485
  taskName: hasTrust ? "companyTrusteeDetails" : "companyDetails",
33027
33486
  legalEntityResponse: rootLegalEntity,
33028
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33487
+ capabilities: getCapabilities(legalEntityResponse),
33029
33488
  problems: getLegalEntityProblems(rootLegalEntity),
33030
33489
  homeButtonLabel: i18n.get("saveAndGoToOverview"),
33031
33490
  country: legalEntityResponse.organization.registeredAddress.country ?? contextCountry,
@@ -33047,7 +33506,9 @@ function DropinComposerComponent({
33047
33506
  handleCompanyDeepSearch: args.handleCompanyDeepSearch,
33048
33507
  handleGetCompanyDataset: args.handleGetCompanyDataset,
33049
33508
  handleRefreshCompanyDataset: args.handleRefreshCompanyDataset,
33050
- handleVerifyTin: args.handleVerifyTin
33509
+ handleVerifyTin: args.handleVerifyTin,
33510
+ onTypeSwitch: navigateToTypeSwitcher,
33511
+ isTargetLegalEntityType: legalEntityType === LegalEntityType.ORGANIZATION
33051
33512
  });
33052
33513
  case TaskTypes.TRUST_MEMBER_COMPANY:
33053
33514
  return jsx(CompanyDropinComponent, {
@@ -33058,7 +33519,7 @@ function DropinComposerComponent({
33058
33519
  taskType: TaskTypes.TRUST_MEMBER_COMPANY,
33059
33520
  parentLegalEntity: associatedLegalArrangement,
33060
33521
  legalEntityResponse: associatedLegalEntity,
33061
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33522
+ capabilities: getCapabilities(legalEntityResponse),
33062
33523
  problems: (_d = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _d[rootLegalEntity.id],
33063
33524
  onChange: componentOnChange,
33064
33525
  eventEmitter,
@@ -33085,7 +33546,7 @@ function DropinComposerComponent({
33085
33546
  associatedLegalArrangement,
33086
33547
  refreshLegalEntity,
33087
33548
  accountHolder: getPayoutAccountHolderName(rootLegalEntity, i18n),
33088
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33549
+ capabilities: getCapabilities(legalEntityResponse),
33089
33550
  onChange: componentOnChange,
33090
33551
  eventEmitter,
33091
33552
  onSubmit: componentOnSubmit,
@@ -33111,7 +33572,7 @@ function DropinComposerComponent({
33111
33572
  problems: (_f = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _f[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
33112
33573
  parentLegalEntity: rootLegalEntity,
33113
33574
  legalEntityResponse: associatedLegalArrangement,
33114
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33575
+ capabilities: getCapabilities(legalEntityResponse),
33115
33576
  onChange: componentOnChange,
33116
33577
  eventEmitter,
33117
33578
  onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 1),
@@ -33163,7 +33624,7 @@ function DropinComposerComponent({
33163
33624
  taskType: TaskTypes.SOLE_PROPRIETOR_COMPANY,
33164
33625
  parentLegalEntity: rootLegalEntity,
33165
33626
  legalEntityResponse: associatedLegalArrangement,
33166
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33627
+ capabilities: getCapabilities(legalEntityResponse),
33167
33628
  problems: (_i = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _i[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
33168
33629
  onChange: componentOnChange,
33169
33630
  eventEmitter,
@@ -33182,8 +33643,9 @@ function DropinComposerComponent({
33182
33643
  },
33183
33644
  taskType: TaskTypes.SERVICE_AGREEMENT,
33184
33645
  serviceAgreementTypes,
33185
- serviceAgreementAcceptanceInfos,
33646
+ serviceAgreementAcceptanceInfos: serviceAgreementAcceptanceInfosWithNames,
33186
33647
  handleGetServiceAgreement: args.handleGetServiceAgreement,
33648
+ handleDownloadAcceptedTermsOfServiceDocument: args.handleDownloadAcceptedTermsOfServiceDocument,
33187
33649
  handleHomeClick: navigateBack,
33188
33650
  handleSign: async (...params) => {
33189
33651
  await args.handleSignServiceAgreement(...params);
@@ -35026,7 +35488,7 @@ const ConfigurationApiProvider = ({
35026
35488
  isEmbeddedDropin,
35027
35489
  loadingContext
35028
35490
  } = authContext;
35029
- const sdkVersion = "3.10.4";
35491
+ const sdkVersion = "3.11.1";
35030
35492
  useAnalytics({
35031
35493
  onUserEvent,
35032
35494
  legalEntityId: rootLegalEntityId,