@adyen/kyc-components 3.10.4 → 3.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) 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 +928 -506
  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 +7796 -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 +2 -0
  103. package/dist/types/components/DocumentUpload/types.d.ts +4 -0
  104. package/dist/types/components/Dropins/PayoutDetailsDropin/components/PayoutDetailsDropinComponent.d.ts +0 -3
  105. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/ServiceAgreementDropinComponent.d.ts +2 -1
  106. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/components/useServiceAgreement.d.ts +1 -0
  107. package/dist/types/components/Dropins/ServiceAgreementDropinComponent/types.d.ts +6 -2
  108. package/dist/types/components/Dropins/types.d.ts +4 -2
  109. package/dist/types/components/Individual/types.d.ts +2 -3
  110. package/dist/types/components/PayoutDetails/types.d.ts +4 -3
  111. package/dist/types/components/RegistrationDocument/RegistrationDocumentComponent.d.ts +2 -0
  112. package/dist/types/components/RegistrationDocument/config.d.ts +3 -0
  113. package/dist/types/components/RegistrationDocument/index.d.ts +1 -0
  114. package/dist/types/components/RegistrationDocument/types.d.ts +15 -0
  115. package/dist/types/components/SoleProp/types.d.ts +2 -1
  116. package/dist/types/components/TaskList/types.d.ts +2 -2
  117. package/dist/types/components/TaxDocument/TaxDocumentComponent.d.ts +2 -0
  118. package/dist/types/components/TaxDocument/config.d.ts +3 -0
  119. package/dist/types/components/TaxDocument/index.d.ts +1 -0
  120. package/dist/types/components/TaxDocument/types.d.ts +15 -0
  121. package/dist/types/components/Trust/types.d.ts +2 -1
  122. package/dist/types/components/internal/BusinessRegistrationNumberField/types.d.ts +2 -2
  123. package/dist/types/components/internal/EntityAssociation/types.d.ts +2 -2
  124. package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCard.d.ts +1 -1
  125. package/dist/types/components/internal/FormFields/RadioGroupCard/RadioCardSelect.d.ts +3 -2
  126. package/dist/types/components/internal/FormFields/RadioGroupCard/RadioGroupCard.d.ts +1 -1
  127. package/dist/types/components/internal/FormFields/RadioGroupCard/types.d.ts +9 -3
  128. package/dist/types/components/internal/Icon/Icon.d.ts +4 -0
  129. package/dist/types/components/internal/Remove/types.d.ts +3 -3
  130. package/dist/types/components/internal/Summary/Summary.d.ts +1 -1
  131. package/dist/types/components/internal/Summary/types.d.ts +1 -0
  132. package/dist/types/components/internal/TaxInformationField/types.d.ts +2 -2
  133. package/dist/types/components/internal/VatNumberField/types.d.ts +2 -2
  134. package/dist/types/core/hooks/introduction/useHasSeenIntroduction.d.ts +1 -1
  135. package/dist/types/core/hooks/useBankConfigurationHandlers.d.ts +2 -1
  136. package/dist/types/core/hooks/useCompanySearch/types.d.ts +2 -2
  137. package/dist/types/core/hooks/useCompanySearchTaskSubmit.d.ts +3 -3
  138. package/dist/types/core/hooks/useForm/types.d.ts +11 -10
  139. package/dist/types/core/hooks/useFormComposer.d.ts +2 -2
  140. package/dist/types/core/hooks/useLocalStorage.d.ts +2 -2
  141. package/dist/types/core/models/api/contracts.d.ts +6 -0
  142. package/dist/types/core/models/api/get-configuration.d.ts +2 -1
  143. package/dist/types/core/models/form-rules.d.ts +2 -0
  144. package/dist/types/core/models/form.d.ts +1 -0
  145. package/dist/types/datasets/localized/companyTypeExamples/getCompanyTypeExamplesForCountry.d.ts +5 -0
  146. package/dist/types/datasets/localized/legalArrangementTypeExamples/getLegalArrangementTypeExamplesForCountry.d.ts +5 -0
  147. package/dist/types/datasets/localized/legalEntityTypeExamples/getBusinessTypeExamplesForCountry.d.ts +5 -0
  148. package/dist/types/utils/accountHolderUtils.d.ts +2 -0
  149. package/dist/types/utils/api/processCapabilitites.d.ts +2 -0
  150. package/dist/types/utils/getLegalEntityCountry.d.ts +3 -0
  151. package/dist/types/utils/useStateFromProp.d.ts +2 -2
  152. 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,
@@ -10733,6 +11109,7 @@ function AccountHolder(props) {
10733
11109
  dataStoreId
10734
11110
  }
10735
11111
  });
11112
+ setAccountHolder((data == null ? void 0 : data.accountHolder) ?? null);
10736
11113
  }, [data, errors, valid, dataStoreId]);
10737
11114
  const formUtils = formUtilities(props, i18n);
10738
11115
  const questionLabel = i18n.get("nameOfBankAccountHolder");
@@ -10744,9 +11121,6 @@ function AccountHolder(props) {
10744
11121
  label: questionLabel,
10745
11122
  errorMessage: formUtils.getErrorMessage("accountHolder", errors, fieldProblems),
10746
11123
  isValid: valid.accountHolder,
10747
- className: cx({
10748
- "adl-u-display-none": isNewEntryFlowEnabled
10749
- }),
10750
11124
  classNameModifiers: ["account-holder"],
10751
11125
  children: (childProps) => jsx(Select, {
10752
11126
  ...childProps,
@@ -10759,150 +11133,6 @@ function AccountHolder(props) {
10759
11133
  }) : null]
10760
11134
  });
10761
11135
  }
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
11136
  const companyTypeValidationRules = {
10907
11137
  entityType: {
10908
11138
  modes: ["blur"],
@@ -10957,6 +11187,7 @@ function CompanyTypeComponent(props) {
10957
11187
  });
10958
11188
  }, [data, valid, errors, isValid]);
10959
11189
  const companyTypeOptions = isNewEntryFlowEnabled ? companyTypes.filter((companyType2) => companyType2.id !== CompanyTypesValue.INCORPORATED_PARTNERSHIP && companyType2.id !== CompanyTypesValue.INCORPORATED_ASSOCIATION) : companyTypes;
11190
+ const companyTypeExamples2 = useCompanyTypeExamples(country2);
10960
11191
  return jsxs(Fragment, {
10961
11192
  children: [jsx(StateContextSetter, {
10962
11193
  owner: COMPANY_TYPE_ID,
@@ -10976,7 +11207,7 @@ function CompanyTypeComponent(props) {
10976
11207
  errorMessage: formUtils.getErrorMessage("entityType", errors, fieldProblems),
10977
11208
  label: formUtils.getLabel("entityType", "whatTypeOfCompanyDoYouHave"),
10978
11209
  classNameModifiers: ["entityType"],
10979
- children: (childProps) => jsx(RadioGroupCard, {
11210
+ children: (childProps) => jsx(EntityTypeRadioGroupCard, {
10980
11211
  ...childProps,
10981
11212
  name: "entityType",
10982
11213
  items: companyTypeOptions,
@@ -10985,7 +11216,8 @@ function CompanyTypeComponent(props) {
10985
11216
  onSelect: (item) => handleChangeFor("entityType")(item.id),
10986
11217
  "aria-required": true,
10987
11218
  "aria-label": formUtils.getLabel("entityType", "whatTypeOfCompanyDoYouHave"),
10988
- "aria-invalid": !valid.entityType
11219
+ "aria-invalid": !valid.entityType,
11220
+ examples: companyTypeExamples2
10989
11221
  })
10990
11222
  }), !isNewEntryFlowEnabled && formUtils.isRequiredField("accountHolder") && country2 && jsx(AccountHolder, {
10991
11223
  ...accountHolderProps,
@@ -11608,7 +11840,7 @@ function DocumentUploadComponent({
11608
11840
  })]
11609
11841
  });
11610
11842
  }
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);
11843
+ 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
11844
  function List({
11613
11845
  className,
11614
11846
  nested,
@@ -12754,6 +12986,221 @@ function RegistrationAddressComponent(props) {
12754
12986
  })]
12755
12987
  });
12756
12988
  }
12989
+ const ACCEPTED_DOCUMENTS_MAP$1 = {
12990
+ [CountryCodes.UnitedStates]: {
12991
+ [CompanyTypesValue.PRIVATE_COMPANY]: {
12992
+ header: "acceptedDocumentsForPrivateCompanies",
12993
+ documents: ["certificateOfIncorporation", "certificateOfFormation", "secretaryOfStateFiling"]
12994
+ },
12995
+ [CompanyTypesValue.PUBLIC_COMPANY]: {
12996
+ header: "acceptedDocumentsForPublicCompanies",
12997
+ documents: ["certificateOfIncorporation", "certificateOfFormation"]
12998
+ },
12999
+ [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
13000
+ header: "acceptedDocumentsForPublicCompanies",
13001
+ documents: ["certificateOfIncorporation", "certificateOfFormation"]
13002
+ },
13003
+ [CompanyTypesValue.GOVERNMENTAL_ORGANIZATION]: {
13004
+ header: "acceptedDocumentsForGovernment",
13005
+ documents: ["charter"]
13006
+ },
13007
+ [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
13008
+ header: "acceptedDocumentsForNonProfit",
13009
+ documents: ["articlesOfIncorporation", "meetingRecords", "secretaryOfStateRegDoc", "certificateOfIncumbency"]
13010
+ },
13011
+ [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
13012
+ header: "acceptedDocumentsForPartnerships",
13013
+ documents: ["partnerShipAgreement", "secretaryOfStateFiling"]
13014
+ }
13015
+ }
13016
+ };
13017
+ const GuidanceContent$1 = ({
13018
+ i18n,
13019
+ country: country2,
13020
+ companyType: companyType2
13021
+ }) => {
13022
+ var _a;
13023
+ const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP$1[country2]) == null ? void 0 : _a[companyType2];
13024
+ return jsx("div", {
13025
+ className: "adyen-kyc-upload-field__guidance",
13026
+ children: country2 === "US" ? jsxs(Fragment, {
13027
+ children: [acceptedDocGuidance && jsxs("div", {
13028
+ className: "adl-u-margin-bottom-24",
13029
+ children: [jsx("strong", {
13030
+ children: i18n.get(acceptedDocGuidance.header)
13031
+ }), jsx(List, {
13032
+ className: "adl-u-margin-left-8",
13033
+ children: acceptedDocGuidance.documents.map((document2) => jsx(ListItem, {
13034
+ children: i18n.get(document2)
13035
+ }, document2))
13036
+ })]
13037
+ }), jsxs("div", {
13038
+ className: "adl-u-margin-bottom-24",
13039
+ children: [jsx("strong", {
13040
+ children: i18n.get("documentRequirements")
13041
+ }), jsx(List, {
13042
+ className: "adl-u-margin-left-8",
13043
+ children: jsx(ListItem, {
13044
+ children: i18n.get("includesLegalCompanyName")
13045
+ })
13046
+ })]
13047
+ })]
13048
+ }) : jsxs(Fragment, {
13049
+ children: [jsxs("div", {
13050
+ className: "adl-u-margin-bottom-24",
13051
+ children: [jsxs("strong", {
13052
+ children: [" ", i18n.get("requirements")]
13053
+ }), jsxs(List, {
13054
+ className: "adyen-kyc-upload-field__requirements",
13055
+ children: [jsx(ListItem, {
13056
+ children: i18n.get("documentIssuedByGovernmentAuthority")
13057
+ }), jsx(ListItem, {
13058
+ children: i18n.get("dateOnDocumentNoOlderThanXMonths", {
13059
+ values: {
13060
+ numberOfMonths: 12
13061
+ }
13062
+ })
13063
+ })]
13064
+ })]
13065
+ }), jsx(ContextGuidance, {
13066
+ page: "Company registration document",
13067
+ titleId: "whatIfDocumentIsMoreThan12MonthsOld",
13068
+ contentId: "ifDocumentMoreThan12months",
13069
+ title: i18n.get("whatIfDocumentIsMoreThan12MonthsOld"),
13070
+ content: i18n.get("ifDocumentMoreThan12months")
13071
+ })]
13072
+ })
13073
+ });
13074
+ };
13075
+ function RegistrationDocumentComponent({
13076
+ id: id2,
13077
+ country: country2,
13078
+ companyType: companyType2 = CompanyTypesValue.PRIVATE_COMPANY,
13079
+ heading = "companyRegistrationDocumentHeading",
13080
+ description: description2 = "companyRegistrationDocumentFormDescription",
13081
+ ...props
13082
+ }) {
13083
+ const {
13084
+ i18n
13085
+ } = useI18nContext();
13086
+ return jsx(DocumentUpload, {
13087
+ ...props,
13088
+ id: id2,
13089
+ heading: i18n.get(heading),
13090
+ description: i18n.get(description2),
13091
+ documentField: "registrationDocument",
13092
+ documentType: DocumentType.REGISTRATION_DOCUMENT,
13093
+ guidanceContent: GuidanceContent$1({
13094
+ i18n,
13095
+ country: country2,
13096
+ companyType: companyType2
13097
+ }),
13098
+ companyType: companyType2,
13099
+ country: country2
13100
+ });
13101
+ }
13102
+ const ACCEPTED_DOCUMENTS_MAP = {
13103
+ [CountryCodes.UnitedStates]: {
13104
+ [CompanyTypesValue.PRIVATE_COMPANY]: {
13105
+ header: "acceptedDocumentsForPrivateCompanies",
13106
+ documents: ["irsCP575"]
13107
+ },
13108
+ [CompanyTypesValue.PUBLIC_COMPANY]: {
13109
+ header: "acceptedDocumentsForPublicCompanies",
13110
+ documents: ["annualReport", "secForm10k"]
13111
+ },
13112
+ [CompanyTypesValue.UNLISTED_PUBLIC_COMPANY]: {
13113
+ header: "acceptedDocumentsForPublicCompanies",
13114
+ documents: ["annualReport", "secForm10k"]
13115
+ },
13116
+ [CompanyTypesValue.NON_PROFIT_OR_CHARITABLE]: {
13117
+ header: "acceptedDocumentsForNonProfit",
13118
+ documents: ["annualReport"]
13119
+ },
13120
+ [CompanyTypesValue.INCORPORATED_PARTNERSHIP]: {
13121
+ header: "acceptedDocumentsForPartnerships",
13122
+ documents: ["irsScheduleK1"]
13123
+ }
13124
+ }
13125
+ };
13126
+ const GuidanceContent = ({
13127
+ i18n,
13128
+ country: country2,
13129
+ companyType: companyType2
13130
+ }) => {
13131
+ var _a;
13132
+ const acceptedDocGuidance = (_a = ACCEPTED_DOCUMENTS_MAP[country2]) == null ? void 0 : _a[companyType2];
13133
+ return jsx("div", {
13134
+ className: "adyen-kyc-upload-field__guidance",
13135
+ children: country2 === "US" ? jsxs(Fragment, {
13136
+ children: [acceptedDocGuidance && jsxs("div", {
13137
+ className: "adl-u-margin-bottom-24",
13138
+ children: [jsx("strong", {
13139
+ children: i18n.get(acceptedDocGuidance.header)
13140
+ }), jsx(List, {
13141
+ className: "adl-u-margin-left-8",
13142
+ children: acceptedDocGuidance.documents.map((document2) => jsx(ListItem, {
13143
+ children: i18n.get(document2)
13144
+ }, document2))
13145
+ })]
13146
+ }), jsxs("div", {
13147
+ className: "adl-u-margin-bottom-24",
13148
+ children: [jsx("strong", {
13149
+ children: i18n.get("documentRequirements")
13150
+ }), jsxs(List, {
13151
+ className: "adl-u-margin-left-8",
13152
+ children: [jsx(ListItem, {
13153
+ children: i18n.get("includesLegalCompanyName")
13154
+ }), jsx(ListItem, {
13155
+ children: i18n.get("includesEIN")
13156
+ })]
13157
+ })]
13158
+ })]
13159
+ }) : jsxs("div", {
13160
+ className: "adl-u-margin-bottom-24",
13161
+ children: [jsxs("div", {
13162
+ className: "adyen-kyc-upload-field__subtitle",
13163
+ children: [" ", i18n.get("requirements")]
13164
+ }), jsxs(List, {
13165
+ className: "adyen-kyc-upload-field__requirements",
13166
+ children: [jsx(ListItem, {
13167
+ children: i18n.get("containsNameOfCompany")
13168
+ }), jsx(ListItem, {
13169
+ children: i18n.get("documentShowsTaxIdOfCompany")
13170
+ }), jsx(ListItem, {
13171
+ children: i18n.get("issuedByTheTaxAuthority")
13172
+ })]
13173
+ })]
13174
+ })
13175
+ });
13176
+ };
13177
+ function TaxDocumentComponent({
13178
+ id: id2,
13179
+ country: country2,
13180
+ companyType: companyType2 = CompanyTypesValue.PRIVATE_COMPANY,
13181
+ heading = "companyTaxDocumentFormHeading",
13182
+ description: description2 = "companyTaxDocumentFormDescription",
13183
+ ...props
13184
+ }) {
13185
+ const {
13186
+ i18n
13187
+ } = useI18nContext();
13188
+ return jsx(DocumentUpload, {
13189
+ ...props,
13190
+ id: id2,
13191
+ heading: i18n.get(heading),
13192
+ description: i18n.get(description2),
13193
+ documentField: "taxDocument",
13194
+ documentType: DocumentType.PROOF_OF_ORGANIZATION_TAX_INFO,
13195
+ guidanceContent: GuidanceContent({
13196
+ i18n,
13197
+ country: country2,
13198
+ companyType: companyType2
13199
+ }),
13200
+ companyType: companyType2,
13201
+ country: country2
13202
+ });
13203
+ }
12757
13204
  const companyForms = {
12758
13205
  companyNameAndCountry: {
12759
13206
  formId: "companyNameAndCountry",
@@ -12778,11 +13225,15 @@ const companyForms = {
12778
13225
  companyRegistrationDocument: {
12779
13226
  formId: "companyRegistrationDocument",
12780
13227
  formName: "registrationDocument",
13228
+ formHeading: "companyRegistrationDocumentHeading",
13229
+ formDescription: "companyRegistrationDocumentFormDescription",
12781
13230
  fields: ["registrationDocument"]
12782
13231
  },
12783
13232
  companyTaxDocument: {
12784
13233
  formId: "companyTaxDocument",
12785
13234
  formName: "taxDocument",
13235
+ formHeading: "companyTaxDocumentFormHeading",
13236
+ formDescription: "companyTaxDocumentFormDescription",
12786
13237
  fields: ["taxDocument"]
12787
13238
  }
12788
13239
  };
@@ -12797,7 +13248,8 @@ function CompanyComponent(props) {
12797
13248
  const {
12798
13249
  i18n
12799
13250
  } = useI18nContext();
12800
- const [currentCompanyType, setCurrentCompanyType] = useState(null);
13251
+ const [currentCompanyType, setCurrentCompanyType] = useState(void 0);
13252
+ const [currentCountry, setCurrentCountry] = useState(props.country);
12801
13253
  const companyNameAndCountryFormProps = getFormProps(props, CompanyNameAndCountryFormID);
12802
13254
  const companyTypeFormProps = getFormProps(props, CompanyTypeFormID);
12803
13255
  const companyRegistrationDetailsFormProps = getFormProps(props, CompanyRegistrationDetailsFormID);
@@ -12813,6 +13265,7 @@ function CompanyComponent(props) {
12813
13265
  setCurrentCompanyType(companyType2);
12814
13266
  const companyCountryPrev = (_d = (_c = prevState.data) == null ? void 0 : _c[CompanyNameAndCountryFormID]) == null ? void 0 : _d.country;
12815
13267
  const companyCountry2 = (_f = (_e = currentState.data) == null ? void 0 : _e[CompanyNameAndCountryFormID]) == null ? void 0 : _f.country;
13268
+ setCurrentCountry(companyCountry2);
12816
13269
  const accountHolder2 = (_h = (_g = currentState.data) == null ? void 0 : _g[CompanyTypeFormID]) == null ? void 0 : _h.accountHolder;
12817
13270
  if (companyCountry2 != null && companyCountry2 !== companyCountryPrev) {
12818
13271
  props.onCountryChange(companyCountry2);
@@ -12868,51 +13321,32 @@ function CompanyComponent(props) {
12868
13321
  })
12869
13322
  }), jsx("div", {
12870
13323
  className: props.activeForm.formId !== CompanyRegistrationDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
12871
- children: jsx(DocumentUpload, {
13324
+ children: jsx(RegistrationDocumentComponent, {
12872
13325
  ...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
13326
+ id: companyForms.companyRegistrationDocument.formId,
13327
+ heading: companyForms.companyRegistrationDocument.formHeading,
13328
+ description: companyForms.companyRegistrationDocument.formDescription,
13329
+ country: currentCountry,
13330
+ companyType: currentCompanyType
12903
13331
  })
12904
13332
  }), jsx("div", {
12905
13333
  className: props.activeForm.formId !== CompanyTaxDocumentFormID ? "adyen-kyc-form-wrapper adyen-kyc-form-wrapper--hidden" : "adyen-kyc-form-wrapper",
12906
- children: jsx(DocumentUpload, {
13334
+ children: currentCountry === "US" ? jsx(TaxDocumentComponent, {
13335
+ ...companyTaxDocumentFormProps,
13336
+ id: CompanyTaxDocumentFormID,
13337
+ heading: companyForms.companyTaxDocument.formHeading,
13338
+ description: companyForms.companyTaxDocument.formDescription,
13339
+ country: currentCountry,
13340
+ companyType: currentCompanyType
13341
+ }) : jsx(DocumentUpload, {
12907
13342
  ...companyTaxDocumentFormProps,
12908
13343
  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", {
13344
+ documentType: DocumentType.VAT_DOCUMENT,
13345
+ heading: i18n.get(companyForms.companyTaxDocument.formHeading),
13346
+ description: i18n.get(companyForms.companyTaxDocument.formDescription),
13347
+ guidanceContent: jsxs("div", {
13348
+ className: "adl-u-margin-bottom-24",
13349
+ children: [jsxs("div", {
12916
13350
  className: "adyen-kyc-upload-field__subtitle",
12917
13351
  children: [" ", i18n.get("requirements")]
12918
13352
  }), jsxs(List, {
@@ -13116,7 +13550,8 @@ const COUNTRIES_WITH_IN_APP_SEARCH_COMPANY_VERIFICATION = [CountryCodes.UnitedSt
13116
13550
  const rules$2 = ({
13117
13551
  data,
13118
13552
  country: country2,
13119
- taskType
13553
+ taskType,
13554
+ isExperimentEnabled = () => false
13120
13555
  }) => ({
13121
13556
  countryRequiresStateOrProvince: () => {
13122
13557
  if (COUNTRIES_WITH_STATES_DATASET.includes(country2)) {
@@ -13181,7 +13616,7 @@ const rules$2 = ({
13181
13616
  }
13182
13617
  },
13183
13618
  accountHolderIfCustomer: () => {
13184
- if (taskType === TaskTypes.COMPANY) {
13619
+ if (taskType === TaskTypes.COMPANY && !isExperimentEnabled("EnableNewEntryFlow")) {
13185
13620
  return "REQUIRED";
13186
13621
  }
13187
13622
  },
@@ -13284,129 +13719,6 @@ const getObscuredAccountNumber = ({
13284
13719
  accountIdentifier,
13285
13720
  realLastFour
13286
13721
  }) => 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
13722
  const countryToTaxInfoTypeMap = {
13411
13723
  US: "EIN",
13412
13724
  AU: "ABN",
@@ -15389,7 +15701,9 @@ function IdVerificationMethodComponent(props) {
15389
15701
  optionName: (method) => methodsMetadata[method].name,
15390
15702
  optionDescription: (method) => methodsMetadata[method].description,
15391
15703
  className: "adyen-kyc-field-verification-methods",
15392
- optionLabelClassName: () => "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio",
15704
+ optionClassNames: () => ({
15705
+ label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"
15706
+ }),
15393
15707
  renderOptionIcon: (method) => jsx(IdVerificationMethodOptionIcon, {
15394
15708
  method,
15395
15709
  methodsMetadata
@@ -20795,7 +21109,9 @@ function PayoutVerificationMethod(props) {
20795
21109
  optionDescription: (method) => methodsMetadata[method].description,
20796
21110
  optionSubtitle: (method) => methodsMetadata[method].subtitle,
20797
21111
  className: "adyen-kyc-field-verification-methods",
20798
- optionLabelClassName: () => "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio",
21112
+ optionClassNames: () => ({
21113
+ label: "adyen-kyc-field-verification-methods__card adyen-kyc-radio-group-card--floating-radio"
21114
+ }),
20799
21115
  isOptionDisabled: (option) => props.bankInfoValidated || option === "instantVerification" && !instantVerificationAvailable,
20800
21116
  renderOptionIcon: (method) => jsx(PayoutVerificationMethodOptionIcon, {
20801
21117
  method,
@@ -21085,9 +21401,8 @@ function ConstitutionalDocumentUpload({
21085
21401
  i18n
21086
21402
  } = useI18nContext();
21087
21403
  const guidanceContent = jsxs("div", {
21088
- className: "adyen-kyc-upload-field__guidance",
21404
+ className: "adyen-kyc-upload-field__guidance adl-u-margin-bottom-24",
21089
21405
  children: [jsx("strong", {
21090
- className: "adyen-kyc-upload-field__subtitle",
21091
21406
  children: i18n.get("uploadOneOfTheseDocuments")
21092
21407
  }), jsx(List, {
21093
21408
  className: "adl-u-margin-left-8",
@@ -21097,7 +21412,7 @@ function ConstitutionalDocumentUpload({
21097
21412
  }) => jsx(ListItem, {
21098
21413
  children: i18n.get(name)
21099
21414
  }, id22))
21100
- }), jsx("div", {
21415
+ }), props.country !== "US" && jsx("div", {
21101
21416
  className: "adl-u-margin-y-16",
21102
21417
  children: jsxs("span", {
21103
21418
  children: [i18n.get("documentIssuedWithinLastYear"), " "]
@@ -22351,6 +22666,7 @@ const getEntityType = (baseEntityType, legalEntity, legalEntityId) => {
22351
22666
  }
22352
22667
  return (_b = (_a = legalEntity.entityAssociations) == null ? void 0 : _a.find((associations) => legalEntityId === associations.legalEntityId)) == null ? void 0 : _b.entityType;
22353
22668
  };
22669
+ const getCapabilities = (legalEntity) => Object.keys((legalEntity == null ? void 0 : legalEntity.capabilities) ?? {});
22354
22670
  function VerificationErrors({
22355
22671
  verificationErrors,
22356
22672
  formUtils
@@ -22496,7 +22812,8 @@ function Summary({
22496
22812
  trackNavigation: trackNavigation2 = noop,
22497
22813
  omittedForms = [],
22498
22814
  showFormHeader = true,
22499
- showSectionHeader = true
22815
+ showSectionHeader = true,
22816
+ showLegalCaption = false
22500
22817
  }) {
22501
22818
  var _a, _b;
22502
22819
  const {
@@ -22633,6 +22950,9 @@ function Summary({
22633
22950
  }), jsx("ul", {
22634
22951
  className: "adyen-kyc-summary",
22635
22952
  children: renderSummary(data)
22953
+ }), showLegalCaption && jsx("span", {
22954
+ className: "adyen-kyc-summary__legal-caption",
22955
+ children: i18n.get("summaryLegalCaption")
22636
22956
  })]
22637
22957
  });
22638
22958
  }
@@ -23504,8 +23824,9 @@ const getFieldsWithExistingData = (legalEntity, isExperimentEnabled) => {
23504
23824
  }
23505
23825
  return nonDocumentFields;
23506
23826
  };
23827
+ const getLegalEntityCountry = (legalEntityResponse) => legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? legalEntityResponse.individual.residentialAddress.country : legalEntityResponse.organization.registeredAddress.country;
23507
23828
  const organizationTypesToSkipCompanyStructureForm = ["partnershipIncorporated", "associationIncorporated"];
23508
- const getBusinessType = (businessTypeItems, accountHolder2, legalEntityType, companyTypesValue) => {
23829
+ const getBusinessType = (businessTypeItems, country2, accountHolder2, legalEntityType, companyTypesValue, capabilities = []) => {
23509
23830
  const findBusinessType = (id2) => businessTypeItems.find((bt) => bt.id === id2);
23510
23831
  if (organizationTypesToSkipCompanyStructureForm.includes(companyTypesValue ?? "")) {
23511
23832
  return findBusinessType("legalArrangement");
@@ -23520,7 +23841,13 @@ const getBusinessType = (businessTypeItems, accountHolder2, legalEntityType, com
23520
23841
  case LegalEntityType.ORGANIZATION:
23521
23842
  return findBusinessType("company");
23522
23843
  case LegalEntityType.INDIVIDUAL:
23523
- return findBusinessType("individual");
23844
+ if (allowIndividualWithoutSoleProp(capabilities)) {
23845
+ return findBusinessType("individual");
23846
+ }
23847
+ if (SOLE_PROP_COUNTRIES.includes(country2)) {
23848
+ return findBusinessType("soleProprietorship");
23849
+ }
23850
+ return findBusinessType("company");
23524
23851
  }
23525
23852
  };
23526
23853
  const businessTypes = [{
@@ -23537,20 +23864,39 @@ const businessTypes = [{
23537
23864
  id: "company",
23538
23865
  accountHolder: "theCompanyIWorkFor",
23539
23866
  name: "company",
23540
- description: "youUseCompanyBankAccount"
23867
+ description: "yourBusinessIsRegisteredAsASeparateLegalEntityFromItsOwners"
23541
23868
  }];
23869
+ const businessTypeIcons = {
23870
+ individual: "user",
23871
+ soleProprietorship: "user-business",
23872
+ company: "company-2",
23873
+ legalArrangement: "users-3"
23874
+ };
23542
23875
  const legalArrangementBusinessType = {
23543
23876
  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];
23877
+ name: "trustPartnershipOrAssociation",
23878
+ description: "youAreIndividualOrCompanyAndUseBankAccountInNameOfTrustPartnershipOrAssociation"
23879
+ };
23880
+ const getLegalArrangementDisplayOption = (country2) => ({
23881
+ ...legalArrangementBusinessType,
23882
+ ...!TRUST_COUNTRIES.includes(country2) ? {
23883
+ name: "partnershipOrAssociation",
23884
+ description: "youAreIndividualOrCompanyAndUseBankAccountInNameOfPartnershipOrAssociation"
23885
+ } : {}
23886
+ });
23887
+ const getBusinessTypeOptions = (country2, capabilities) => {
23888
+ const legalArrangementDisplayOption = getLegalArrangementDisplayOption(country2);
23889
+ const allowedBusinessTypes = businessTypes.filter((businessType) => {
23890
+ switch (businessType.id) {
23891
+ case "individual":
23892
+ return allowIndividualWithoutSoleProp(capabilities);
23893
+ case "soleProprietorship":
23894
+ return SOLE_PROP_COUNTRIES.includes(country2);
23895
+ default:
23896
+ return true;
23897
+ }
23898
+ });
23899
+ return [...allowedBusinessTypes, legalArrangementDisplayOption];
23554
23900
  };
23555
23901
  const legalArrangementItems = [{
23556
23902
  id: "aTrust",
@@ -23571,22 +23917,26 @@ const legalArrangementItems = [{
23571
23917
  id: "associationIncorporated",
23572
23918
  accountHolder: "theCompanyIWorkFor",
23573
23919
  name: "associationIncorporated",
23574
- description: "groupOfPeopleActingTogetherForNonCommercialPurpose"
23920
+ description: "yourAssociationIsRegisteredItWasSetUpForNonCommercialPurpose"
23575
23921
  }];
23576
- const getLegalArrangementOptions = (country2, experiments) => legalArrangementItems.filter((legalArrangementItem) => {
23922
+ const getLegalArrangementOptions = (country2, showUnsupportedEntityType) => legalArrangementItems.filter((legalArrangementItem) => {
23577
23923
  if (legalArrangementItem.id !== "aTrust" && legalArrangementItem.id !== "partnershipUnincorporated") {
23578
23924
  return true;
23579
23925
  }
23580
- if (legalArrangementItem.id === "partnershipUnincorporated" && (experiments == null ? void 0 : experiments.ShowUnsupportedEntityType)) {
23926
+ if (legalArrangementItem.id === "partnershipUnincorporated" && showUnsupportedEntityType) {
23581
23927
  return true;
23582
23928
  }
23583
- return country2 && TRUST_COUNTRIES.includes(country2);
23929
+ return TRUST_COUNTRIES.includes(country2);
23584
23930
  });
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);
23931
+ const useSelectionOptions = (legalEntityResponse) => {
23932
+ const {
23933
+ isExperimentEnabled
23934
+ } = useExperimentsContext();
23935
+ const showUnsupportedEntityType = isExperimentEnabled("ShowUnsupportedEntityType");
23936
+ const country2 = getLegalEntityCountry(legalEntityResponse);
23937
+ const capabilities = getCapabilities(legalEntityResponse);
23938
+ const businessTypeOptions = getBusinessTypeOptions(country2, capabilities);
23939
+ const legalArrangementOptions = getLegalArrangementOptions(country2, showUnsupportedEntityType);
23590
23940
  return {
23591
23941
  businessTypeOptions,
23592
23942
  legalArrangementOptions
@@ -23815,6 +24165,7 @@ const FormWrapper = ({
23815
24165
  handleHomeClick == null ? void 0 : handleHomeClick();
23816
24166
  }
23817
24167
  };
24168
+ const showLegalCaption = ["solePropDetails", "companyDetails"].includes(taskName);
23818
24169
  const summaryContent = jsx("div", {
23819
24170
  className: "adyen-kyc-form-wrapper",
23820
24171
  children: jsx(Summary, {
@@ -23829,7 +24180,8 @@ const FormWrapper = ({
23829
24180
  forms: forms2,
23830
24181
  gotoForm: gotoFormByFormIndex,
23831
24182
  labels: labels2,
23832
- problems
24183
+ problems,
24184
+ showLegalCaption
23833
24185
  })
23834
24186
  });
23835
24187
  const formFooter = !hideDropinLayout && !hideFooter && jsx(ActionBar, {
@@ -23948,8 +24300,9 @@ function CompanyDropinComponent({
23948
24300
  isSettingEnabled
23949
24301
  } = useSettingsContext();
23950
24302
  const {
23951
- setAccountHolder
23952
- } = useCoreContext();
24303
+ isExperimentEnabled
24304
+ } = useExperimentsContext();
24305
+ useCoreContext();
23953
24306
  const {
23954
24307
  i18n,
23955
24308
  setLocale
@@ -23994,7 +24347,8 @@ function CompanyDropinComponent({
23994
24347
  country: country2,
23995
24348
  taskType,
23996
24349
  requiredFields,
23997
- isSettingEnabled
24350
+ isSettingEnabled,
24351
+ isExperimentEnabled
23998
24352
  }), [country2, data, taskType, requiredFields, isSettingEnabled]);
23999
24353
  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
24354
  const {
@@ -24058,7 +24412,6 @@ function CompanyDropinComponent({
24058
24412
  }
24059
24413
  };
24060
24414
  const onSubmit = async () => {
24061
- var _a2;
24062
24415
  const dataSubmitted = data;
24063
24416
  const savedLegalEntityData = mapLegalEntityToCompany(legalEntityResponse, false);
24064
24417
  const filteredData = removeOldDataBySchema(dataSubmitted, savedLegalEntityData);
@@ -24099,9 +24452,6 @@ function CompanyDropinComponent({
24099
24452
  await attachAssociationToParentLegalEntity({
24100
24453
  legalEntity
24101
24454
  });
24102
- if (taskType === TaskTypes.COMPANY) {
24103
- setAccountHolder((_a2 = dataSubmitted == null ? void 0 : dataSubmitted.companyType) == null ? void 0 : _a2.accountHolder);
24104
- }
24105
24455
  setLoadingStatus("success");
24106
24456
  clearToasts();
24107
24457
  onExternalSubmit == null ? void 0 : onExternalSubmit(dataSubmitted);
@@ -24646,7 +24996,9 @@ const LookupResult = ({
24646
24996
  isInvalid,
24647
24997
  isSelected,
24648
24998
  onSelect: noop$1,
24649
- labelClassName: classes
24999
+ classNames: {
25000
+ label: classes
25001
+ }
24650
25002
  }), showAlert && jsx(LookupResultAlert, {
24651
25003
  i18n,
24652
25004
  type: alertType
@@ -24670,7 +25022,9 @@ const LookupResult = ({
24670
25022
  onSelect: () => selectAndVerify(tin, option),
24671
25023
  disabled: Boolean(verifiedCompany) || status === "loading" && !isSelected,
24672
25024
  loading: status === "loading" && isSelected,
24673
- labelClassName: classes
25025
+ classNames: {
25026
+ label: classes
25027
+ }
24674
25028
  }), showAlert && jsx(LookupResultAlert, {
24675
25029
  i18n,
24676
25030
  type: alertType
@@ -25903,12 +26257,14 @@ const forms = {
25903
26257
  companyRegistrationDocument: {
25904
26258
  formId: "companyRegistrationDocument",
25905
26259
  formName: "companyRegistrationDocumentFormName",
26260
+ formHeading: "companyRegistrationDocumentHeading",
25906
26261
  formDescription: "companyRegistrationDocumentFormDescription",
25907
26262
  fields: ["registrationDocument"]
25908
26263
  },
25909
26264
  companyTaxDocument: {
25910
26265
  formId: "companyTaxDocument",
25911
26266
  formName: "companyTaxDocumentFormName",
26267
+ formHeading: "companyTaxDocumentFormHeading",
25912
26268
  formDescription: "companyTaxDocumentFormDescription",
25913
26269
  fields: ["taxDocument"]
25914
26270
  }
@@ -26349,7 +26705,7 @@ function useCompanySearchTaskSubmit({
26349
26705
  };
26350
26706
  }
26351
26707
  function CompanySearchComponent(props) {
26352
- var _a, _b, _c;
26708
+ var _a, _b, _c, _d, _e;
26353
26709
  const {
26354
26710
  i18n
26355
26711
  } = useI18nContext();
@@ -26429,54 +26785,33 @@ function CompanySearchComponent(props) {
26429
26785
  })
26430
26786
  }), jsx("div", {
26431
26787
  className: formWrapperClasses(forms.companyRegistrationDocument.formId),
26432
- children: jsx(DocumentUpload, {
26788
+ children: jsx(RegistrationDocumentComponent, {
26433
26789
  ...getFormProps(props, forms.companyRegistrationDocument.formId),
26434
26790
  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
- })
26791
+ heading: forms.companyRegistrationDocument.formHeading,
26792
+ description: forms.companyRegistrationDocument.formDescription,
26793
+ country: country2,
26794
+ companyType: (_d = globalData.companyStructure) == null ? void 0 : _d.entityType
26465
26795
  })
26466
26796
  }), jsx("div", {
26467
26797
  className: formWrapperClasses(forms.companyTaxDocument.formId),
26468
- children: jsx(DocumentUpload, {
26798
+ children: country2 === "US" ? jsx(TaxDocumentComponent, {
26799
+ ...getFormProps(props, forms.companyTaxDocument.formId),
26800
+ id: forms.companyTaxDocument.formId,
26801
+ heading: forms.companyTaxDocument.formHeading,
26802
+ description: forms.companyTaxDocument.formDescription,
26803
+ country: country2,
26804
+ companyType: (_e = globalData.companyStructure) == null ? void 0 : _e.entityType
26805
+ }) : jsx(DocumentUpload, {
26469
26806
  ...getFormProps(props, forms.companyTaxDocument.formId),
26470
26807
  id: forms.companyTaxDocument.formId,
26471
- heading: i18n.get(forms.companyTaxDocument.formName),
26808
+ heading: i18n.get(forms.companyTaxDocument.formHeading),
26472
26809
  description: i18n.get(forms.companyTaxDocument.formDescription),
26473
26810
  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", {
26811
+ documentType: DocumentType.VAT_DOCUMENT,
26812
+ guidanceContent: jsxs("div", {
26813
+ className: "adl-u-margin-bottom-24",
26814
+ children: [jsxs("div", {
26480
26815
  className: "adyen-kyc-upload-field__subtitle",
26481
26816
  children: [" ", i18n.get("requirements")]
26482
26817
  }), jsxs(List, {
@@ -26570,7 +26905,7 @@ function CompanySearchDropinComponent({
26570
26905
  }, []);
26571
26906
  const getConfigurationData = useCallback(() => getConfiguration2({
26572
26907
  legalEntityType: LegalEntityType.ORGANIZATION,
26573
- capabilities: capabilities ?? Object.keys(legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities),
26908
+ capabilities: capabilities ?? getCapabilities(legalEntityResponse),
26574
26909
  country: country2
26575
26910
  }), [getConfiguration2, capabilities, country2, legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities]);
26576
26911
  const {
@@ -27141,6 +27476,38 @@ function AccountSetupRejected() {
27141
27476
  content
27142
27477
  });
27143
27478
  }
27479
+ 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") });
27480
+ const getLegalArrangementTypeExamplesForCountry = async (country2) => {
27481
+ const importForCountry = legalArrangementTypeExamples[`./${country2}.json`];
27482
+ if (!importForCountry) {
27483
+ console.warn(`No legal arrangement type examples available for ${country2}`);
27484
+ return {};
27485
+ }
27486
+ return (await importForCountry()).default;
27487
+ };
27488
+ const useLegalArrangementTypeExamples = (country2) => {
27489
+ const [examples, setExamples] = useState();
27490
+ useEffect(() => {
27491
+ getLegalArrangementTypeExamplesForCountry(country2).then(setExamples).catch(console.error);
27492
+ }, [country2]);
27493
+ return examples;
27494
+ };
27495
+ 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") });
27496
+ const getBusinessTypeExamplesForCountry = async (country2) => {
27497
+ const importForCountry = businessTypeExamples[`./${country2}.json`];
27498
+ if (!importForCountry) {
27499
+ console.warn(`No business type examples available for ${country2}`);
27500
+ return {};
27501
+ }
27502
+ return (await importForCountry()).default;
27503
+ };
27504
+ const useBusinessTypeExamples = (country2) => {
27505
+ const [examples, setExamples] = useState();
27506
+ useEffect(() => {
27507
+ getBusinessTypeExamplesForCountry(country2).then(setExamples).catch(console.error);
27508
+ }, [country2]);
27509
+ return examples;
27510
+ };
27144
27511
  const headingTypes = {
27145
27512
  1: ({
27146
27513
  children,
@@ -27242,6 +27609,9 @@ const businessTypeSelectionStepTitles = {
27242
27609
  /* CONFIRM_BUSINESS_SETUP_CHANGE */
27243
27610
  ]: "changeYourBusinessSetup"
27244
27611
  };
27612
+ const BusinessTypeIcon = (item) => jsx(Icon, {
27613
+ name: businessTypeIcons[item.id]
27614
+ });
27245
27615
  const BusinessTypeSelection = ({
27246
27616
  legalEntityResponse,
27247
27617
  accountHolder: accountHolder2,
@@ -27259,9 +27629,6 @@ const BusinessTypeSelection = ({
27259
27629
  const {
27260
27630
  showToast
27261
27631
  } = useToastContext();
27262
- const {
27263
- isExperimentEnabled
27264
- } = useExperimentsContext();
27265
27632
  const [loadingStatus, setLoadingStatus] = useState();
27266
27633
  const [currentStep, setCurrentStep] = useState(
27267
27634
  0
@@ -27277,14 +27644,13 @@ const BusinessTypeSelection = ({
27277
27644
  const {
27278
27645
  businessTypeOptions,
27279
27646
  legalArrangementOptions
27280
- } = getSelectionOptions(legalEntityResponse, {
27281
- ShowUnsupportedEntityType: isExperimentEnabled("ShowUnsupportedEntityType")
27282
- });
27647
+ } = useSelectionOptions(legalEntityResponse);
27283
27648
  const currentLegalEntityType = legalEntityResponse == null ? void 0 : legalEntityResponse.type;
27284
27649
  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();
27650
+ const capabilities = getCapabilities(legalEntityResponse);
27651
+ const country2 = getLegalEntityCountry(legalEntityResponse);
27652
+ 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);
27653
+ const defaultLegalArrangementType = legalArrangementOptions.find((item) => item.id === getDefaultLegalArrangementOrSuborganizationType(legalEntityResponse, accountHolder2));
27288
27654
  const defaultTrusteeType = legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? trusteeTypeItems[0] : trusteeTypeItems[1];
27289
27655
  const {
27290
27656
  handleChangeFor,
@@ -27428,6 +27794,8 @@ const BusinessTypeSelection = ({
27428
27794
  }
27429
27795
  };
27430
27796
  const isWeCannotSetUpAccountStep = currentStep === 2;
27797
+ const businessTypeExamples2 = useBusinessTypeExamples(country2);
27798
+ const legalArrangementTypeExamples2 = useLegalArrangementTypeExamples(country2);
27431
27799
  return jsx(LoaderWrapper, {
27432
27800
  status: loadingStatus,
27433
27801
  formOpacityWhenLoading: 0.3,
@@ -27449,15 +27817,17 @@ const BusinessTypeSelection = ({
27449
27817
  errorMessage: i18n.get((_i = errors.businessType) == null ? void 0 : _i.errorMessage),
27450
27818
  showErrorIconBottom: true,
27451
27819
  isValid: valid.businessType,
27452
- children: (childProps) => jsx(RadioGroupCard, {
27820
+ children: (childProps) => jsx(EntityTypeRadioGroupCard, {
27453
27821
  ...childProps,
27454
27822
  name: "businessType",
27455
27823
  items: businessTypeOptions,
27824
+ itemIcon: BusinessTypeIcon,
27456
27825
  selected: businessTypeOptions.find((type) => {
27457
27826
  var _a2;
27458
27827
  return type.id === ((_a2 = data.businessType) == null ? void 0 : _a2.id);
27459
27828
  }),
27460
- onSelect: (item) => handleChangeFor("businessType")(item)
27829
+ onSelect: (item) => handleChangeFor("businessType")(item),
27830
+ examples: businessTypeExamples2
27461
27831
  })
27462
27832
  }), currentStep === 1 && jsxs(Fragment, {
27463
27833
  children: [jsx(Field, {
@@ -27466,7 +27836,7 @@ const BusinessTypeSelection = ({
27466
27836
  errorMessage: i18n.get((_j = errors.legalArrangement) == null ? void 0 : _j.errorMessage),
27467
27837
  showErrorIconBottom: true,
27468
27838
  isValid: valid.legalArrangement,
27469
- children: (childProps) => jsx(RadioGroupCard, {
27839
+ children: (childProps) => jsx(EntityTypeRadioGroupCard, {
27470
27840
  ...childProps,
27471
27841
  name: "legalArrangement",
27472
27842
  items: legalArrangementOptions,
@@ -27474,7 +27844,8 @@ const BusinessTypeSelection = ({
27474
27844
  var _a2;
27475
27845
  return legalArrangementOption.id === ((_a2 = data.legalArrangement) == null ? void 0 : _a2.id);
27476
27846
  }),
27477
- onSelect: (item) => handleChangeFor("legalArrangement")(item)
27847
+ onSelect: (item) => handleChangeFor("legalArrangement")(item),
27848
+ examples: legalArrangementTypeExamples2
27478
27849
  })
27479
27850
  }), ((_k = data.legalArrangement) == null ? void 0 : _k.id) === "aTrust" && jsx(Field, {
27480
27851
  name: "trusteeType",
@@ -29471,9 +29842,7 @@ function IndividualDropinComponent({
29471
29842
  handleBackClick: externalBackClick
29472
29843
  }) {
29473
29844
  var _a, _b, _c, _d;
29474
- const {
29475
- setAccountHolder
29476
- } = useCoreContext();
29845
+ useCoreContext();
29477
29846
  const {
29478
29847
  i18n,
29479
29848
  setLocale
@@ -29488,6 +29857,9 @@ function IndividualDropinComponent({
29488
29857
  const {
29489
29858
  isEmbeddedDropin
29490
29859
  } = useAuthContext();
29860
+ const {
29861
+ isExperimentEnabled
29862
+ } = useExperimentsContext();
29491
29863
  let dataFromResponse = mapLegalEntityToIndividual(legalEntityResponse, isTargetLegalEntityType);
29492
29864
  const documentUtils = documentApiUtils(handleCreateDocument, handleGetDocument, handleUpdateDocument);
29493
29865
  let roleTypes = [];
@@ -29530,7 +29902,8 @@ function IndividualDropinComponent({
29530
29902
  data,
29531
29903
  country: country2,
29532
29904
  taskType,
29533
- isEmbeddedDropin
29905
+ isEmbeddedDropin,
29906
+ isExperimentEnabled
29534
29907
  }), [country2, data, taskType]);
29535
29908
  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
29909
  const {
@@ -29687,7 +30060,7 @@ function IndividualDropinComponent({
29687
30060
  }
29688
30061
  };
29689
30062
  const onSubmit = async () => {
29690
- var _a2, _b2, _c2, _d2;
30063
+ var _a2, _b2, _c2;
29691
30064
  setLoadingStatus("loading");
29692
30065
  const dataSubmitted = omitObscuredFieldsIfUnchanged(individualObscuredFields, data, dataFromResponse);
29693
30066
  if (!dataSubmitted) {
@@ -29726,9 +30099,6 @@ function IndividualDropinComponent({
29726
30099
  dataSubmitted
29727
30100
  });
29728
30101
  }
29729
- if (taskType === TaskTypes.INDIVIDUAL) {
29730
- setAccountHolder(((_d2 = dataSubmitted == null ? void 0 : dataSubmitted.personalDetails) == null ? void 0 : _d2.accountHolder) || null);
29731
- }
29732
30102
  setLoadingStatus("success");
29733
30103
  clearToasts();
29734
30104
  externalOnSubmit == null ? void 0 : externalOnSubmit(dataSubmitted);
@@ -29890,7 +30260,7 @@ function IndividualDropinComponent({
29890
30260
  hideNavigation,
29891
30261
  children: jsx(IndividualComponent, {
29892
30262
  ...derivedProps,
29893
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
30263
+ capabilities: getCapabilities(legalEntityResponse),
29894
30264
  data: {
29895
30265
  ...dataFromResponse,
29896
30266
  ...documents2
@@ -30008,7 +30378,6 @@ const rules$1 = ({
30008
30378
  }
30009
30379
  }
30010
30380
  });
30011
- const getRegistrationCountry = (legalEntityResponse) => legalEntityResponse.type === LegalEntityType.INDIVIDUAL ? legalEntityResponse.individual.residentialAddress.country : legalEntityResponse.organization.registeredAddress.country;
30012
30381
  const labels = () => ({
30013
30382
  verifiedAccountHolder: () => "accountHolder",
30014
30383
  verifiedBankCountry: () => "bankCountry",
@@ -30075,7 +30444,7 @@ function PayoutDetailsDropinComponent({
30075
30444
  const {
30076
30445
  getConfiguration: getConfiguration2
30077
30446
  } = useConfigurationApi();
30078
- const defaultPayoutCountry = getRegistrationCountry(legalEntityResponse);
30447
+ const defaultPayoutCountry = getLegalEntityCountry(legalEntityResponse);
30079
30448
  const existingPayoutDetails = transferInstrument ? mapTransferInstrumentToPayoutAccount(transferInstrument) : void 0;
30080
30449
  const [documents2, setDocuments] = useState();
30081
30450
  const fallbackCurrency = (_a = currencyByCountry[defaultPayoutCountry]) == null ? void 0 : _a[0];
@@ -31347,7 +31716,8 @@ const useServiceAgreement = ({
31347
31716
  try {
31348
31717
  const {
31349
31718
  termsOfServiceDocumentId,
31350
- document: document2
31719
+ document: document2,
31720
+ type
31351
31721
  } = await handleGetServiceAgreement(legalEntityId, {
31352
31722
  type: serviceAgreementType,
31353
31723
  language: agreementLanguage
@@ -31359,7 +31729,8 @@ const useServiceAgreement = ({
31359
31729
  const contract = JSON.parse(decodeURIComponent(escape(window.atob(document2))));
31360
31730
  setServiceAgreement({
31361
31731
  id: termsOfServiceDocumentId,
31362
- contract
31732
+ contract,
31733
+ type
31363
31734
  });
31364
31735
  setLoading("success");
31365
31736
  } catch (err) {
@@ -31391,6 +31762,7 @@ const serviceAgreementTypesTranslationMapping = {
31391
31762
  function ServiceAgreementDropinComponent({
31392
31763
  legalEntityResponse,
31393
31764
  handleGetServiceAgreement,
31765
+ handleDownloadAcceptedTermsOfServiceDocument,
31394
31766
  handleHomeClick,
31395
31767
  handleSign,
31396
31768
  taskType,
@@ -31411,19 +31783,25 @@ function ServiceAgreementDropinComponent({
31411
31783
  task: taskType
31412
31784
  });
31413
31785
  const [loadingStatus, setLoadingStatus] = useState();
31786
+ const signedForms = serviceAgreementAcceptanceInfos.map((serviceAgreementAcceptanceInfo) => ({
31787
+ formId: serviceAgreementAcceptanceInfo.id,
31788
+ serviceAgreementType: serviceAgreementAcceptanceInfo.type,
31789
+ acceptanceId: serviceAgreementAcceptanceInfo.id,
31790
+ acceptedByName: serviceAgreementAcceptanceInfo.acceptedByName,
31791
+ formName: serviceAgreementTypesTranslationMapping[serviceAgreementAcceptanceInfo.type],
31792
+ isValid: true
31793
+ }));
31414
31794
  const formsToBeSigned = serviceAgreementTypes.map((serviceAgreementType) => ({
31415
31795
  formId: serviceAgreementType,
31796
+ serviceAgreementType,
31416
31797
  formName: serviceAgreementTypesTranslationMapping[serviceAgreementType],
31417
31798
  isValid: false
31418
31799
  }));
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);
31800
+ const forms2 = [...signedForms, ...formsToBeSigned];
31801
+ const [activeFormIndex, setActiveFormIndex] = useState(0);
31802
+ const [activeForm, setActiveForm] = useState(forms2[activeFormIndex]);
31803
+ const canSign = (serviceAgreementTypes == null ? void 0 : serviceAgreementTypes.includes(activeForm.serviceAgreementType)) && !activeForm.acceptanceId;
31804
+ const canDownload = !!handleDownloadAcceptedTermsOfServiceDocument && !!activeForm.acceptanceId;
31427
31805
  const handleServiceAgreementIsNotAvailableInThatLanguage = useCallback(() => {
31428
31806
  showToast({
31429
31807
  label: i18n.get("failedToGetServiceAgreementInSelectedLanguageFallbackToEn"),
@@ -31437,7 +31815,7 @@ function ServiceAgreementDropinComponent({
31437
31815
  handleGetServiceAgreement,
31438
31816
  handleServiceAgreementIsNotAvailableInThatLanguage,
31439
31817
  legalEntityId: legalEntityResponse.id,
31440
- serviceAgreementType: activeForm.formId,
31818
+ serviceAgreementType: activeForm.serviceAgreementType,
31441
31819
  language: i18n.languageCode
31442
31820
  });
31443
31821
  const {
@@ -31467,9 +31845,9 @@ function ServiceAgreementDropinComponent({
31467
31845
  ...baseTrackingPayload
31468
31846
  }
31469
31847
  });
31848
+ triggerValidation();
31470
31849
  if (loadingStatus === "loading" || !serviceAgreement || !data.signer)
31471
31850
  return;
31472
- triggerValidation();
31473
31851
  if (isValid) {
31474
31852
  try {
31475
31853
  setLoadingStatus("loading");
@@ -31486,6 +31864,8 @@ function ServiceAgreementDropinComponent({
31486
31864
  ...baseTrackingPayload
31487
31865
  }
31488
31866
  });
31867
+ data.acceptServiceAgreement = false;
31868
+ data.signer = void 0;
31489
31869
  } catch {
31490
31870
  setLoadingStatus("success");
31491
31871
  showToast({
@@ -31524,12 +31904,10 @@ function ServiceAgreementDropinComponent({
31524
31904
  });
31525
31905
  };
31526
31906
  useEffect(() => {
31527
- if (forms2.length) {
31528
- setActiveForm(forms2[0]);
31529
- } else {
31530
- goHome();
31531
- }
31532
- }, [serviceAgreementTypes]);
31907
+ if (!serviceAgreementAcceptanceInfos.length)
31908
+ return;
31909
+ gotoForm(serviceAgreementAcceptanceInfos.length - 1);
31910
+ }, [serviceAgreementAcceptanceInfos]);
31533
31911
  useEffect(() => {
31534
31912
  userEvents.addPageView("ToS dropin");
31535
31913
  userEvents.addEvent("Started ToS task", {
@@ -31537,27 +31915,38 @@ function ServiceAgreementDropinComponent({
31537
31915
  ...baseTrackingPayload
31538
31916
  }
31539
31917
  });
31918
+ const initialFormIndex = forms2.length === signedForms.length ? 0 : signedForms.length;
31919
+ gotoForm(initialFormIndex);
31540
31920
  }, []);
31541
31921
  const gotoForm = (index) => {
31542
31922
  setActiveForm(forms2[index]);
31923
+ setActiveFormIndex(index);
31924
+ };
31925
+ const onDownloadAcceptedTermsOfServiceDocument = async () => {
31926
+ try {
31927
+ if (!canDownload)
31928
+ return;
31929
+ const response = await handleDownloadAcceptedTermsOfServiceDocument(legalEntityResponse.id, activeForm.acceptanceId);
31930
+ await downloadFile(response.document, `${i18n.get(activeForm.formName)}.pdf`);
31931
+ } catch (e) {
31932
+ showToast({
31933
+ label: i18n.get("failedToDownloadAcceptedServiceAgreementDocument"),
31934
+ type: ToastType.ERROR
31935
+ });
31936
+ }
31543
31937
  };
31544
- const sidebar = jsxs(LoaderWrapper, {
31938
+ const sidebar = jsx(LoaderWrapper, {
31545
31939
  status: loadingStatus,
31546
31940
  formOpacityWhenLoading: 0.3,
31547
31941
  showSpinner: false,
31548
31942
  className: "adyen-kyc-dropin__sidebar-wrapper",
31549
- children: [!!formsToBeSigned.length && jsx(FormNavigation, {
31550
- forms: formsToBeSigned,
31943
+ children: !!forms2.length && jsx(FormNavigation, {
31944
+ forms: forms2,
31551
31945
  activeForm,
31552
31946
  gotoForm,
31553
31947
  taskName: "signServiceAgreement",
31554
31948
  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
- })]
31949
+ })
31561
31950
  });
31562
31951
  const content = jsxs(LoaderWrapper, {
31563
31952
  status: loadingStatus,
@@ -31600,11 +31989,35 @@ function ServiceAgreementDropinComponent({
31600
31989
  onChange: handleChangeFor("acceptServiceAgreement")
31601
31990
  })
31602
31991
  })]
31992
+ }), canDownload && jsx(Card, {
31993
+ stateful: true,
31994
+ className: "adl-u-margin-top-32",
31995
+ onClick: onDownloadAcceptedTermsOfServiceDocument,
31996
+ onKeyDown: handleKeys(["Enter"], onDownloadAcceptedTermsOfServiceDocument ?? noop),
31997
+ children: jsxs("div", {
31998
+ className: "adyen-kyc-download-card",
31999
+ children: [activeForm.acceptedByName && jsx("div", {
32000
+ className: "adyen-kyc-download-card__name",
32001
+ children: activeForm.acceptedByName
32002
+ }), jsx(Status, {
32003
+ className: "adl-status--finished adyen-kyc-download-card__status",
32004
+ iconStatusClass: "adl-status__icon--finished",
32005
+ icon: "check",
32006
+ text: i18n.get("signed")
32007
+ }), jsx(Icon, {
32008
+ className: "adyen-kyc-download-card__icon",
32009
+ name: "download"
32010
+ })]
32011
+ })
31603
32012
  }), jsx(ActionBar, {
31604
32013
  onHome: goHome,
31605
32014
  homeButtonLabel: i18n.get("goToOverview"),
31606
- onNext: canSign ? handleSignClick : void 0,
31607
- nextButtonLabel: canSign ? i18n.get("sign") : void 0
32015
+ onNext: canSign ? handleSignClick : () => gotoForm(activeFormIndex + 1),
32016
+ nextButtonLabel: i18n.get(canSign ? "sign" : "next"),
32017
+ nextButtonDisabled: !canSign && activeFormIndex === forms2.length - 1,
32018
+ onBack: () => gotoForm(activeFormIndex - 1),
32019
+ hideBackButton: activeFormIndex === 0,
32020
+ backButtonLabel: i18n.get("previous")
31608
32021
  })]
31609
32022
  });
31610
32023
  return jsx(DropinLayout, {
@@ -32308,7 +32721,7 @@ function DropinComposerComponent({
32308
32721
  const [pciTemplateResponse, setPciTemplateResponse] = useState(null);
32309
32722
  const [pciStatus, setPciStatus] = useState(null);
32310
32723
  const [serviceAgreementTypes, setServiceAgreementTypes] = useState([]);
32311
- const [serviceAgreementAcceptanceInfos, setServiceAgreementAcceptanceInfos] = useState([]);
32724
+ const [serviceAgreementAcceptanceInfosWithNames, setServiceAgreementAcceptanceInfosWithNames] = useState([]);
32312
32725
  const [transferInstrument, setTransferInstrument] = useState(null);
32313
32726
  const rootLegalEntityCountry = rootLegalEntity.type === LegalEntityType.INDIVIDUAL ? rootLegalEntity.individual.residentialAddress.country : rootLegalEntity.organization.registeredAddress.country;
32314
32727
  const [capabilityProblems, setCapabilityProblems] = useState(getCapabilityProblems(legalEntityResponse, rootLegalEntityCountry, isExperimentEnabled));
@@ -32368,11 +32781,19 @@ function DropinComposerComponent({
32368
32781
  return;
32369
32782
  getPciTemplate2().catch(logger$b.error);
32370
32783
  }, [getPciTemplate2, tasks]);
32784
+ const addFetchedAcceptedByName = async (acceptanceInfo) => {
32785
+ const acceptedByEntity = await (args == null ? void 0 : args.handleGetLegalEntity(acceptanceInfo.acceptedBy));
32786
+ return {
32787
+ ...acceptanceInfo,
32788
+ acceptedByName: getLegalEntityNameBasedOnType(acceptedByEntity)
32789
+ };
32790
+ };
32371
32791
  const getServiceAgreementAcceptanceInfos = async () => {
32372
32792
  if (rootLegalEntity.id && (args == null ? void 0 : args.handleGetServiceAgreementAcceptanceInfos)) {
32373
32793
  try {
32374
32794
  const response = await args.handleGetServiceAgreementAcceptanceInfos(rootLegalEntity.id);
32375
- setServiceAgreementAcceptanceInfos(response.data);
32795
+ const serviceAgreementAcceptanceInfosWithNames2 = await Promise.all(response.data.map(addFetchedAcceptedByName));
32796
+ setServiceAgreementAcceptanceInfosWithNames(serviceAgreementAcceptanceInfosWithNames2);
32376
32797
  } catch (e) {
32377
32798
  logger$b.warn(i18n.get("failedToGetServiceAgreementStatus"));
32378
32799
  }
@@ -32851,7 +33272,7 @@ function DropinComposerComponent({
32851
33272
  onPciDownload,
32852
33273
  pciStatus,
32853
33274
  serviceAgreementTypes,
32854
- serviceAgreementAcceptanceInfos,
33275
+ serviceAgreementAcceptanceInfos: serviceAgreementAcceptanceInfosWithNames,
32855
33276
  isReview: reviewRequired,
32856
33277
  hasRequiredTrustMemberCount: hasRequiredTrustMemberCount(trustMembers2),
32857
33278
  onTransferInstrumentDelete: deleteTransferInstrument2
@@ -32881,7 +33302,7 @@ function DropinComposerComponent({
32881
33302
  legalEntityResponse: rootLegalEntity,
32882
33303
  country: rootLegalEntityCountry,
32883
33304
  problems: getLegalEntityProblems(rootLegalEntity),
32884
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33305
+ capabilities: getCapabilities(legalEntityResponse),
32885
33306
  onChange: componentOnChange,
32886
33307
  eventEmitter,
32887
33308
  onSubmit: async (data) => {
@@ -32919,7 +33340,7 @@ function DropinComposerComponent({
32919
33340
  legalEntityResponse: associatedLegalEntity,
32920
33341
  country: rootLegalEntityCountry,
32921
33342
  problems: getLegalEntityProblems(associatedLegalEntity),
32922
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33343
+ capabilities: getCapabilities(legalEntityResponse),
32923
33344
  onChange: componentOnChange,
32924
33345
  eventEmitter,
32925
33346
  onSubmit: componentOnSubmit,
@@ -32944,7 +33365,7 @@ function DropinComposerComponent({
32944
33365
  legalEntityResponse: associatedLegalEntity,
32945
33366
  problems: getLegalEntityProblems(associatedLegalEntity),
32946
33367
  country: rootLegalEntityCountry,
32947
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33368
+ capabilities: getCapabilities(legalEntityResponse),
32948
33369
  onChange: componentOnChange,
32949
33370
  eventEmitter,
32950
33371
  onSubmit: async (data) => {
@@ -32972,7 +33393,7 @@ function DropinComposerComponent({
32972
33393
  legalEntityResponse: associatedLegalEntity,
32973
33394
  country: rootLegalEntityCountry,
32974
33395
  problems: getLegalEntityProblems(associatedLegalEntity),
32975
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33396
+ capabilities: getCapabilities(legalEntityResponse),
32976
33397
  onChange: componentOnChange,
32977
33398
  eventEmitter,
32978
33399
  onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 2),
@@ -32998,7 +33419,7 @@ function DropinComposerComponent({
32998
33419
  taskType: TaskTypes.COMPANY,
32999
33420
  taskName: hasTrust ? "companyTrusteeDetails" : "companyDetails",
33000
33421
  legalEntityResponse: rootLegalEntity,
33001
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33422
+ capabilities: getCapabilities(legalEntityResponse),
33002
33423
  problems: getLegalEntityProblems(rootLegalEntity),
33003
33424
  onChange: componentOnChange,
33004
33425
  eventEmitter,
@@ -33025,7 +33446,7 @@ function DropinComposerComponent({
33025
33446
  taskType: TaskTypes.COMPANY_SEARCH,
33026
33447
  taskName: hasTrust ? "companyTrusteeDetails" : "companyDetails",
33027
33448
  legalEntityResponse: rootLegalEntity,
33028
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33449
+ capabilities: getCapabilities(legalEntityResponse),
33029
33450
  problems: getLegalEntityProblems(rootLegalEntity),
33030
33451
  homeButtonLabel: i18n.get("saveAndGoToOverview"),
33031
33452
  country: legalEntityResponse.organization.registeredAddress.country ?? contextCountry,
@@ -33058,7 +33479,7 @@ function DropinComposerComponent({
33058
33479
  taskType: TaskTypes.TRUST_MEMBER_COMPANY,
33059
33480
  parentLegalEntity: associatedLegalArrangement,
33060
33481
  legalEntityResponse: associatedLegalEntity,
33061
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33482
+ capabilities: getCapabilities(legalEntityResponse),
33062
33483
  problems: (_d = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _d[rootLegalEntity.id],
33063
33484
  onChange: componentOnChange,
33064
33485
  eventEmitter,
@@ -33085,7 +33506,7 @@ function DropinComposerComponent({
33085
33506
  associatedLegalArrangement,
33086
33507
  refreshLegalEntity,
33087
33508
  accountHolder: getPayoutAccountHolderName(rootLegalEntity, i18n),
33088
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33509
+ capabilities: getCapabilities(legalEntityResponse),
33089
33510
  onChange: componentOnChange,
33090
33511
  eventEmitter,
33091
33512
  onSubmit: componentOnSubmit,
@@ -33111,7 +33532,7 @@ function DropinComposerComponent({
33111
33532
  problems: (_f = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _f[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
33112
33533
  parentLegalEntity: rootLegalEntity,
33113
33534
  legalEntityResponse: associatedLegalArrangement,
33114
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33535
+ capabilities: getCapabilities(legalEntityResponse),
33115
33536
  onChange: componentOnChange,
33116
33537
  eventEmitter,
33117
33538
  onSubmit: (data) => refreshLegalArrangementAndRunOnSubmit(data, 1),
@@ -33163,7 +33584,7 @@ function DropinComposerComponent({
33163
33584
  taskType: TaskTypes.SOLE_PROPRIETOR_COMPANY,
33164
33585
  parentLegalEntity: rootLegalEntity,
33165
33586
  legalEntityResponse: associatedLegalArrangement,
33166
- capabilities: Object.keys((legalEntityResponse == null ? void 0 : legalEntityResponse.capabilities) ?? {}),
33587
+ capabilities: getCapabilities(legalEntityResponse),
33167
33588
  problems: (_i = capabilityProblems == null ? void 0 : capabilityProblems.LegalEntity) == null ? void 0 : _i[associatedLegalArrangement == null ? void 0 : associatedLegalArrangement.id],
33168
33589
  onChange: componentOnChange,
33169
33590
  eventEmitter,
@@ -33182,8 +33603,9 @@ function DropinComposerComponent({
33182
33603
  },
33183
33604
  taskType: TaskTypes.SERVICE_AGREEMENT,
33184
33605
  serviceAgreementTypes,
33185
- serviceAgreementAcceptanceInfos,
33606
+ serviceAgreementAcceptanceInfos: serviceAgreementAcceptanceInfosWithNames,
33186
33607
  handleGetServiceAgreement: args.handleGetServiceAgreement,
33608
+ handleDownloadAcceptedTermsOfServiceDocument: args.handleDownloadAcceptedTermsOfServiceDocument,
33187
33609
  handleHomeClick: navigateBack,
33188
33610
  handleSign: async (...params) => {
33189
33611
  await args.handleSignServiceAgreement(...params);
@@ -35026,7 +35448,7 @@ const ConfigurationApiProvider = ({
35026
35448
  isEmbeddedDropin,
35027
35449
  loadingContext
35028
35450
  } = authContext;
35029
- const sdkVersion = "3.10.4";
35451
+ const sdkVersion = "3.11.0";
35030
35452
  useAnalytics({
35031
35453
  onUserEvent,
35032
35454
  legalEntityId: rootLegalEntityId,