@adyen/kyc-components 3.84.3 → 3.85.0-beta.2

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 (336) hide show
  1. package/dist/{AcceptTermsOfServiceComponent-CBGVGhCW.js → AcceptTermsOfServiceComponent-CJR2_QBv.js} +15 -13
  2. package/dist/Accordion-CiEmIhNX.js +88 -0
  3. package/dist/{AccountSetupRejected-iWgw_f_y.js → AccountSetupRejected-BjJaN_L0.js} +4 -4
  4. package/dist/{Address-t4VOfLT-.js → Address-DvpndZyX.js} +10 -10
  5. package/dist/{Alert-BeizfGIR.js → Alert-ZQaJKZwM.js} +3 -75
  6. package/dist/{Avatar-DuU-qQK8.js → Avatar-Bg9ZnJVR.js} +1 -1
  7. package/dist/{BusinessDetailsDropin-DvcYg_X0.js → BusinessDetailsMultiformDropin-FeI19Yeu.js} +2124 -250
  8. package/dist/{BusinessFinancingComponent-CtKIHS5N.js → BusinessFinancingComponent-P6tUs_cF.js} +5 -5
  9. package/dist/{BusinessFinancingDropin-lPPamXGa.js → BusinessFinancingDropin-5PQROpGM.js} +105 -62
  10. package/dist/{BusinessFinancingPage-Di-Nv2Ml.js → BusinessFinancingPage-Z7KdR2Wb.js} +4 -4
  11. package/dist/{BusinessTypeSelectionPage-BXdmcFx7.js → BusinessTypeSelectionPage-CEiJxKFT.js} +7 -7
  12. package/dist/{Card-B1eYN1iZ.js → Card-DeKeyEgr.js} +4 -4
  13. package/dist/{CountryField-DePvueIq.js → CountryField-DpZS-UHE.js} +82 -291
  14. package/dist/{CreateIndividualComponent-BF8U9HmX.js → CreateIndividualComponent-uV41ZKqu.js} +6 -6
  15. package/dist/{CreateTransferInstrumentComponent-Rd6n91ch.js → CreateTransferInstrumentComponent--fLgxkGc.js} +6 -6
  16. package/dist/{Currency-CCNB-Owq.js → Currency-dvDSJvr6.js} +6 -6
  17. package/dist/{CustomerSupport-dzWyAxLD.js → CustomerSupport-BsSMzVHV.js} +9 -8
  18. package/dist/{DebugModal-Db4z3HFJ.js → DebugModal-CDJit0my.js} +128 -42
  19. package/dist/{DecisionMakerDetailsPage-CQ5uaVPM.js → DecisionMakerDetailsPage-WUOxEF2W.js} +7 -7
  20. package/dist/{DecisionMakers-BjZNaC3U.js → DecisionMakers--fCz0mrC.js} +149 -115
  21. package/dist/Divider-CQmSV-3K.js +239 -0
  22. package/dist/{Dropzone-DS3DzY-A.js → Dropzone-CjTl0Cl4.js} +4 -4
  23. package/dist/{EmbeddedStatus-COuKpXSJ.js → EmbeddedStatus-BfyrjDBn.js} +3 -3
  24. package/dist/{EndStateLayout-DHbUjBQL.js → EndStateLayout-DtnC_jmT.js} +1 -1
  25. package/dist/{FormNavigation-C8985odz.js → FormNavigation-BVFCNan3.js} +3 -3
  26. package/dist/Image-3OQ_b33w.js +22 -0
  27. package/dist/{IndividualOnfidoDropin-BnPU46GN.js → IndividualOnfidoDropin-DxGZH7qE.js} +64 -41
  28. package/dist/{InputDate-BqYvvnqX.js → InputDate-Lj3IQq5B.js} +2 -2
  29. package/dist/{InputText-rkMNHFYM.js → InputText-DqycMV0z.js} +3 -3
  30. package/dist/{Introduction-BsZibeHx.js → Introduction-B_eEyK4D.js} +4 -4
  31. package/dist/{JpAddress-7_Wvn6w-.js → JpAddress-DbmfH7ao.js} +7 -7
  32. package/dist/LandingLayout-DAR4uCsx.js +60 -0
  33. package/dist/{LegalRepresentativeDetailsPage-BLoNELP2.js → LegalRepresentativeDetailsPage-JtrwqFp_.js} +5 -5
  34. package/dist/Link-BePoWmqK.js +35 -0
  35. package/dist/ListItem-AIDLbwJg.js +69 -0
  36. package/dist/{ManageIndividualComponent-DuMx-hok.js → ManageIndividualComponent-CdI1XXUO.js} +5 -5
  37. package/dist/{ManageTermsOfServiceComponent-BPJJxecg.js → ManageTermsOfServiceComponent-C9C7j-Ig.js} +5 -5
  38. package/dist/{ManageTransferInstrumentComponent-D13HhKpC.js → ManageTransferInstrumentComponent-j3e19U67.js} +12 -12
  39. package/dist/{MaskedInput-DK17jkn8.js → MaskedInput-BBpUba4Q.js} +5 -5
  40. package/dist/MaybeModal-BfUZzrFT.js +25 -0
  41. package/dist/{Modal-CeWqn3jD.js → Modal-QC3t2pZm.js} +1 -1
  42. package/dist/OnboardingDropinComponent-CR_pOocw.js +4274 -0
  43. package/dist/{PayoutDetailsDropin-CxXIfBo2.js → PayoutDetailsDropin-C4ZOkpq_.js} +311 -81
  44. package/dist/RadioGroup-B0eqJ4-H.js +144 -0
  45. package/dist/{RegistrationAddress-coO57t4c.js → RegistrationAddress-DEZgJ98J.js} +36 -33
  46. package/dist/{Review-BFb6Ykw1.js → Review-BH30PNwx.js} +8 -7
  47. package/dist/RootBusinessDetailsPage-CB6RWU2g.js +61 -0
  48. package/dist/{OnboardingDropinComponent-BlMzaK2Z.js → RootBusinessLinesPage-CtY_KP7f.js} +845 -5342
  49. package/dist/{RootIndividualDetailsPage-BEe-U1FO.js → RootIndividualDetailsPage-C6TUZLlV.js} +5 -5
  50. package/dist/{SignPCIComponent-D5KQ4t2I.js → SignPCIComponent-Lc4CIjC7.js} +10 -8
  51. package/dist/{SingpassSelection-wIFBjJkx.js → SingpassSelection-Cwocy94c.js} +5 -4
  52. package/dist/SoleProprietorshipPage-DIotXS-E.js +60 -0
  53. package/dist/{SourceOfFundsPage-B0js4JTw.js → SourceOfFundsPage-D6X8IktQ.js} +37 -32
  54. package/dist/{StepProgressIndicator-axxG6zQK.js → StepProgressIndicator-BRtUTJA2.js} +1 -1
  55. package/dist/{StoreProvider-BulXd4Hf.js → StoreProvider-DX9X_rtC.js} +107 -102
  56. package/dist/{TaskItemStatus-DykYxx-L.js → TaskItemStatus-DTxnqkA5.js} +3 -3
  57. package/dist/{TaxInformationField-vBwS4Gdq.js → TaxInformationField-CAhkfn-Q.js} +28 -26
  58. package/dist/{TaxReportingDropin-T-05itkR.js → TaxReportingDropin-zqqyQfEx.js} +17 -13
  59. package/dist/{TileGroup-CWIb67Fa.js → TileGroup-DPM4gpzr.js} +4 -4
  60. package/dist/{TrustDetailsPage-XpVwVUFb.js → TrustDetailsPage-BaqBKpei.js} +24 -22
  61. package/dist/{TrustMemberCompanyPage-CPZ8ZzqF.js → TrustMemberCompanyPage-DQvZ4BOf.js} +22 -9
  62. package/dist/{TrustMemberIndividualPage-um9OLnSy.js → TrustMemberIndividualPage-Du6IjMHg.js} +5 -5
  63. package/dist/{UnincorporatedPartnershipIndividualPage-CvQOUpDy.js → UnincorporatedPartnershipIndividualPage-ii0O1m-J.js} +5 -5
  64. package/dist/UnincorporatedPartnershipMemberCompanyPage-X3m8PR8H.js +76 -0
  65. package/dist/{ViewVerificationStatusComponent-aOEFCjUd.js → ViewVerificationStatusComponent-wM09RJoi.js} +4 -4
  66. package/dist/adyen-business-financing.js +3 -3
  67. package/dist/adyen-individual-configuration.js +3 -3
  68. package/dist/adyen-individual-status.js +3 -3
  69. package/dist/adyen-kyc-components.js +20 -20
  70. package/dist/adyen-onboarding.js +2 -2
  71. package/dist/adyen-terms-of-service-management.js +3 -3
  72. package/dist/adyen-terms-of-service-status.js +3 -3
  73. package/dist/adyen-transfer-instrument-configuration.js +3 -3
  74. package/dist/adyen-transfer-instrument-management.js +3 -3
  75. package/dist/adyen-verification-status.js +3 -3
  76. package/dist/analytics-CSO2dqDO.js +123 -0
  77. package/dist/{bafinUtils-DOsm2O1i.js → bafinUtils-lxvWZZEW.js} +8 -57
  78. package/dist/{bg-BG-B37z4fjM.js → bg-BG-BIOMFPaW.js} +3 -1
  79. package/dist/bg-BG-BLe6BCNz.js +13 -0
  80. package/dist/bg-BG-BPsOhDfg.js +13 -0
  81. package/dist/bg-BG-fr-xfUBV.js +110 -0
  82. package/dist/commonValidators-B3Rif_Pi.js +24 -0
  83. package/dist/cs-CZ-C0sNB1Fm.js +110 -0
  84. package/dist/cs-CZ-CHzJM-ii.js +13 -0
  85. package/dist/{cs-CZ-2D8o2KB0.js → cs-CZ-DNWTRefA.js} +3 -1
  86. package/dist/cs-CZ-xoLsda7i.js +13 -0
  87. package/dist/da-DK-8dk9Q_Wk.js +110 -0
  88. package/dist/{da-DK-CplImqOX.js → da-DK-D-PlwKvZ.js} +3 -1
  89. package/dist/da-DK-D-TJghBi.js +13 -0
  90. package/dist/da-DK-XNMYSp7w.js +13 -0
  91. package/dist/{de-DE-DNOzlYEY.js → de-DE-4GAd_srm.js} +3 -1
  92. package/dist/de-DE-BI7AAdOv.js +13 -0
  93. package/dist/de-DE-CCmlaL2F.js +13 -0
  94. package/dist/de-DE-CCyKie8B.js +110 -0
  95. package/dist/debugStore-BvbyN1Oi.js +14 -0
  96. package/dist/dropinUtils-BB4B9BSv.js +196 -0
  97. package/dist/el-GR-D7zMcBtK.js +110 -0
  98. package/dist/{el-GR-DAFcmbwE.js → el-GR-Ddnh0NhQ.js} +3 -1
  99. package/dist/el-GR-DoCIcce-.js +13 -0
  100. package/dist/el-GR-kYiInIQ9.js +13 -0
  101. package/dist/{en-US-CEc3gxgl.js → en-US-BCFNoF5y.js} +2 -1
  102. package/dist/en-US-BwDZ0WHW.js +110 -0
  103. package/dist/en-US-DYpvuCLO.js +13 -0
  104. package/dist/{en-US-xHi63gSK.js → en-US-DjF6iC7G.js} +12 -1
  105. package/dist/{es-ES-BPI-KmDv.js → es-ES-C4lENXHH.js} +3 -1
  106. package/dist/es-ES-CJMsyMAc.js +13 -0
  107. package/dist/es-ES-CnNU6AJv.js +13 -0
  108. package/dist/es-ES-JvAvmB2A.js +110 -0
  109. package/dist/{et-EE-CMXpGRz8.js → et-EE-3EQr-1cj.js} +3 -1
  110. package/dist/et-EE-BR4OXRfV.js +13 -0
  111. package/dist/et-EE-SJf3_Ega.js +110 -0
  112. package/dist/et-EE-sB7wkSA3.js +13 -0
  113. package/dist/fi-FI-BbqwYcLI.js +13 -0
  114. package/dist/{fi-FI-C5SwgUIc.js → fi-FI-Byvvcxxq.js} +3 -1
  115. package/dist/fi-FI-Cy2hAl0B.js +110 -0
  116. package/dist/fi-FI-u5GxMZsq.js +13 -0
  117. package/dist/{fieldConfigurations-BBmPG-CS.js → fieldConfigurations-QIDm3nkC.js} +12 -306
  118. package/dist/fr-FR-BmW46mYd.js +110 -0
  119. package/dist/fr-FR-CMjrAkKl.js +13 -0
  120. package/dist/fr-FR-Cr-Y1vIy.js +13 -0
  121. package/dist/{fr-FR-CAqqgh3X.js → fr-FR-E_UubsZ-.js} +3 -1
  122. package/dist/{getName-N_Hu5gE7.js → getName-DQuF2UWl.js} +2 -2
  123. package/dist/{hasDataChanged-C32ujCoA.js → hasDataChanged-QgzClnGa.js} +2 -2
  124. package/dist/hr-HR-Bhsop3CT.js +13 -0
  125. package/dist/hr-HR-D8cBxUFa.js +13 -0
  126. package/dist/{hr-HR-oTvJUvqr.js → hr-HR-TVOgDkBf.js} +3 -1
  127. package/dist/hr-HR-c1Si_0s4.js +110 -0
  128. package/dist/hu-HU-BVfkOdJe.js +13 -0
  129. package/dist/hu-HU-CibGC8KY.js +110 -0
  130. package/dist/hu-HU-D2j1ISVk.js +13 -0
  131. package/dist/{hu-HU-DA-bZKop.js → hu-HU-DRONW_47.js} +3 -1
  132. package/dist/{iframeWidget-iA0G4IZI.js → iframeWidget-LY36YmR3.js} +4 -4
  133. package/dist/{isEmpty-CD8E4UFi.js → isEmpty-uIgxe5k7.js} +2 -2
  134. package/dist/it-IT-BMjuva_2.js +110 -0
  135. package/dist/it-IT-C7Sg1k4p.js +13 -0
  136. package/dist/it-IT-CwA8megO.js +13 -0
  137. package/dist/{it-IT-CpKAGuyU.js → it-IT-DuBLJIdz.js} +3 -1
  138. package/dist/{ja-JP-7DhgV_0J.js → ja-JP-CCnzjx-u.js} +28 -2
  139. package/dist/{ja-JP-C4569I8p.js → ja-JP-CJ_j_HAA.js} +3 -1
  140. package/dist/ja-JP-Cr_qjpZ2.js +110 -0
  141. package/dist/ja-JP-GSbqID7o.js +13 -0
  142. package/dist/{localizeDateString-DHsCnGIt.js → localizeDateString-BKtxO1zQ.js} +1 -1
  143. package/dist/lt-LT-C5nNCk4_.js +13 -0
  144. package/dist/{lt-LT-DfJ0ojxY.js → lt-LT-CBBDNCnp.js} +3 -1
  145. package/dist/lt-LT-DSiutpRl.js +13 -0
  146. package/dist/lt-LT-DjNjg3Pl.js +110 -0
  147. package/dist/lv-LV-BpRfRfMz.js +110 -0
  148. package/dist/lv-LV-C62XiDE5.js +13 -0
  149. package/dist/lv-LV-CEK8Re4d.js +13 -0
  150. package/dist/{lv-LV-d0ldbfMh.js → lv-LV-CtIe38WU.js} +3 -1
  151. package/dist/{mapExistingFile-CZ8JIq0y.js → mapExistingFile-BfHRGybY.js} +4 -4
  152. package/dist/{mapJpAddressSchemaToAddressLocalizations-CYDc6_WR.js → mapJpAddressSchemaToAddressLocalizations-Bh2EFFbk.js} +53 -6
  153. package/dist/{mapLegalEntityToIndividualOnfidoSchema-DpDvE22C.js → mapLegalEntityToIndividualOnfidoSchema-ixUzJxt_.js} +4 -4
  154. package/dist/{mapTransferInstrumentToPayoutAccount-B_Z8lux3.js → mapTransferInstrumentToPayoutAccount-DqDMLrLp.js} +6 -3
  155. package/dist/nl-NL-BOJ6zuBr.js +13 -0
  156. package/dist/{nl-NL-DdVmtkAu.js → nl-NL-CE4l8R5l.js} +3 -1
  157. package/dist/nl-NL-DOQPxTX-.js +13 -0
  158. package/dist/nl-NL-oaBDOlm6.js +110 -0
  159. package/dist/{no-NO-C0WUoV9N.js → no-NO-B1_YJlMP.js} +3 -1
  160. package/dist/no-NO-BTrfxWS7.js +110 -0
  161. package/dist/no-NO-Cp3-tDMw.js +13 -0
  162. package/dist/no-NO-CuwTDFSf.js +13 -0
  163. package/dist/pl-PL-1-MrLPXu.js +13 -0
  164. package/dist/pl-PL-C72GTDxW.js +110 -0
  165. package/dist/pl-PL-CtDHmbhp.js +13 -0
  166. package/dist/{pl-PL-Byfw9EGz.js → pl-PL-DGYFY42P.js} +3 -1
  167. package/dist/process-field-configurations-CPiaN7XP.js +304 -0
  168. package/dist/pt-BR-Br_cHzGx.js +13 -0
  169. package/dist/{pt-BR-DUUAs_Pm.js → pt-BR-Co8OqKh-.js} +3 -1
  170. package/dist/pt-BR-CtFCi7U4.js +110 -0
  171. package/dist/pt-BR-DnKEuslh.js +13 -0
  172. package/dist/pt-PT-CLwCij2I.js +13 -0
  173. package/dist/pt-PT-XAn7WGle.js +110 -0
  174. package/dist/pt-PT-cjbtYBUX.js +13 -0
  175. package/dist/{pt-PT-BVZxK7ae.js → pt-PT-pKLoM66X.js} +3 -1
  176. package/dist/{resolveEnvironment-HVVOrOBr.js → resolveEnvironment-B9LzegI4.js} +3 -3
  177. package/dist/ro-RO-CGhIjlpU.js +13 -0
  178. package/dist/ro-RO-Cmk-sVDr.js +13 -0
  179. package/dist/{ro-RO-Ck3Azc56.js → ro-RO-D3rQ93wa.js} +3 -1
  180. package/dist/ro-RO-qX8X1Q1m.js +110 -0
  181. package/dist/{rules-CpkxtBrw.js → rules-BMGZ46_e.js} +9 -5
  182. package/dist/sk-SK-Bo5nvxWQ.js +13 -0
  183. package/dist/sk-SK-CjdK4BKW.js +110 -0
  184. package/dist/{sk-SK-jxAlqkeI.js → sk-SK-CmH1I1tp.js} +3 -1
  185. package/dist/sk-SK-Do6CKNU4.js +13 -0
  186. package/dist/sl-SI-CrTRlNnN.js +13 -0
  187. package/dist/sl-SI-cY-L2ma-.js +13 -0
  188. package/dist/{sl-SI-CjvFCQ3H.js → sl-SI-hnlbW1OT.js} +3 -1
  189. package/dist/sl-SI-lPxRRPsh.js +110 -0
  190. package/dist/style.css +577 -544
  191. package/dist/styles-CLV89_hH.js +577 -544
  192. package/dist/{sv-SE-CSjJPRt1.js → sv-SE-7Cbo1oic.js} +3 -1
  193. package/dist/sv-SE-BPpQ-05i.js +110 -0
  194. package/dist/sv-SE-BtwPrLEA.js +13 -0
  195. package/dist/sv-SE-WPziDPQa.js +13 -0
  196. package/dist/types/components/BankAccount/fields/BankAccountFormat/types.d.ts +2 -1
  197. package/dist/types/components/BankAccount/fields/PreferredCurrency/PreferredCurrency.d.ts +10 -0
  198. package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +2 -0
  199. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutCountryDetails.d.ts +3 -0
  200. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/types.d.ts +11 -0
  201. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +6 -0
  202. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -0
  203. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/utils.d.ts +2 -0
  204. package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +3 -2
  205. package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +2 -1
  206. package/dist/types/components/BankAccount/mapping/mapTransferInstrumentToPayoutAccount.d.ts +1 -1
  207. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +2 -0
  208. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +1 -1
  209. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +3 -2
  210. package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +5 -3
  211. package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +3 -3
  212. package/dist/types/components/Business/forms/TaxDocument/types.d.ts +3 -3
  213. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -1
  214. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +0 -1
  215. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiform.d.ts +2 -1
  216. package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +5 -0
  217. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBasicCompanyInformation.d.ts +0 -1
  218. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBusinessInformation.d.ts +0 -1
  219. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +0 -1
  220. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingOwnershipStructure.d.ts +0 -1
  221. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +0 -1
  222. package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +3 -0
  223. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +3 -0
  224. package/dist/types/components/Shared/devex/DebugListener/DebugFormData.d.ts +1 -0
  225. package/dist/types/components/Shared/devex/DebugListener/debugStore.d.ts +5 -0
  226. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  227. package/dist/types/components/SoleProprietorship/pages/SoleProprietorshipPage.d.ts +1 -2
  228. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +1 -2
  229. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +1 -2
  230. package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +1 -2
  231. package/dist/types/context/ExperimentContext/types.d.ts +4 -8
  232. package/dist/types/core/models/api/transfer-instrument.d.ts +2 -0
  233. package/dist/types/core/process-field-configurations.d.ts +2 -2
  234. package/dist/types/datasets/generators/getAccountFormatForCountry.d.ts +1 -0
  235. package/dist/types/stores/globalStore/taskTypes.d.ts +1 -1
  236. package/dist/types/{core → utils}/analytics.d.ts +5 -5
  237. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  238. package/dist/{types-YZCbv6wT.js → types-B8B2a7MQ.js} +2 -2
  239. package/dist/{types-Cnytncbd.js → types-DHmyPbAn.js} +5 -9
  240. package/dist/{types-DREIZpxT.js → types-DhTTtRCo.js} +2 -2
  241. package/dist/{useAssociatedLegalEntity-CtPwbvkG.js → useAssociatedLegalEntity-Ga-FKuMn.js} +1 -1
  242. package/dist/{useDataset-BhtLJw8i.js → useDataset-DZSHpx6s.js} +3 -3
  243. package/dist/{useForm-CkDciBI3.js → useForm-Dj2YKs6k.js} +8 -79
  244. package/dist/useFormContext-DW_Slas-.js +222 -0
  245. package/dist/{useGlobalData-BUgIp9O-.js → useGlobalData-DpDm0x5x.js} +10 -8
  246. package/dist/{RadioGroup-CDIi5JOR.js → useMultiForm-B07GoQbD.js} +6 -339
  247. package/dist/{useOnboardingStatus-C617NeV-.js → useOnboardingStatus-Cn0R_NIZ.js} +1 -1
  248. package/dist/{useScenarios-pcYq7HkO.js → useScenarios-Dt2xmzlt.js} +2 -2
  249. package/dist/{useTermsOfServiceStatus-DAhlGfSf.js → useTermsOfServiceStatus-D6iXFeAp.js} +1 -1
  250. package/dist/{useToastContext-SPgtDHvP.js → useToastContext-9176-zEj.js} +2 -2
  251. package/dist/{useUnincorporatedPartnershipMembers-AfBFy7Yl.js → useUnincorporatedPartnershipMembers-6JvFEoTe.js} +5 -5
  252. package/dist/{utils-C6VZF1lW.js → utils-BbfCeKoQ.js} +7 -7
  253. package/dist/{utils-DKPIAe71.js → utils-C3YOzi3q.js} +2 -2
  254. package/dist/{utils-CfNHCh35.js → utils-Cnzy9BrL.js} +3 -3
  255. package/dist/{validate-0hhEAEOS.js → validate-3hlm9O5d.js} +7 -7
  256. package/dist/{validate-nQU_m5nS.js → validate-C5RnmxAh.js} +2 -2
  257. package/dist/{validate-zp9cKIZQ.js → validate-CchLxW_F.js} +3 -3
  258. package/dist/{validationError-C4LAQpBz.js → validationError-9xZhdWqV.js} +2 -2
  259. package/package.json +4 -4
  260. package/dist/RootBusinessDetailsPage-BsbiSuH4.js +0 -1977
  261. package/dist/SoleProprietorshipPage-BKxqOwer.js +0 -49
  262. package/dist/UnincorporatedPartnershipMemberCompanyPage-BPEUAWOw.js +0 -63
  263. package/dist/analytics-_iYLDAnN.js +0 -61
  264. package/dist/bg-BG-B8A8D_hg.js +0 -47
  265. package/dist/bg-BG-CC5Y7izP.js +0 -13
  266. package/dist/bg-BG-DPkib_ah.js +0 -13
  267. package/dist/cs-CZ-B0dmNTJm.js +0 -13
  268. package/dist/cs-CZ-B7A0WNBx.js +0 -47
  269. package/dist/cs-CZ-E0sZTsrs.js +0 -13
  270. package/dist/da-DK-9M2wm0kt.js +0 -47
  271. package/dist/da-DK-HNKnBXb5.js +0 -13
  272. package/dist/da-DK-quX5LuPc.js +0 -13
  273. package/dist/de-DE-1wVDROIy.js +0 -13
  274. package/dist/de-DE-B2QaSUv3.js +0 -13
  275. package/dist/de-DE-CLuLBUrb.js +0 -47
  276. package/dist/el-GR-BKT02owO.js +0 -13
  277. package/dist/el-GR-BN7mIwED.js +0 -47
  278. package/dist/el-GR-C2BsVqjY.js +0 -13
  279. package/dist/en-US-BEgdeTV4.js +0 -13
  280. package/dist/en-US-BWtUZoXL.js +0 -47
  281. package/dist/es-ES-DCkqCwAK.js +0 -13
  282. package/dist/es-ES-Dc4Z3rGg.js +0 -13
  283. package/dist/es-ES-i_Fk7A9r.js +0 -47
  284. package/dist/et-EE-DKJ8Kn8O.js +0 -47
  285. package/dist/et-EE-DbRebqzm.js +0 -13
  286. package/dist/et-EE-sGRn_-QJ.js +0 -13
  287. package/dist/fi-FI-BQxUuIP0.js +0 -13
  288. package/dist/fi-FI-BXJbm9sZ.js +0 -13
  289. package/dist/fi-FI-CF4-CyIe.js +0 -47
  290. package/dist/fr-FR-C4LPqbx5.js +0 -47
  291. package/dist/fr-FR-DvgcaqM8.js +0 -13
  292. package/dist/fr-FR-t2k348rx.js +0 -13
  293. package/dist/hr-HR-BiZNiGG9.js +0 -13
  294. package/dist/hr-HR-Dlw8mrQW.js +0 -13
  295. package/dist/hr-HR-TslbqIeE.js +0 -47
  296. package/dist/hu-HU-6VmfqBr5.js +0 -13
  297. package/dist/hu-HU-CgBQ5Skc.js +0 -47
  298. package/dist/hu-HU-DLynQejq.js +0 -13
  299. package/dist/it-IT-BXsakLEg.js +0 -47
  300. package/dist/it-IT-BgdxIaNM.js +0 -13
  301. package/dist/it-IT-PJbf57vA.js +0 -13
  302. package/dist/ja-JP-B--vgrAi.js +0 -47
  303. package/dist/ja-JP-BBzuYv6e.js +0 -13
  304. package/dist/lt-LT-57A37eCA.js +0 -13
  305. package/dist/lt-LT-C_sT0Isz.js +0 -13
  306. package/dist/lt-LT-UnMr3oB3.js +0 -47
  307. package/dist/lv-LV-7VOOOEZ-.js +0 -13
  308. package/dist/lv-LV-C54zKY0H.js +0 -47
  309. package/dist/lv-LV-Cwzt1ESp.js +0 -13
  310. package/dist/nl-NL-A444CaCG.js +0 -47
  311. package/dist/nl-NL-D0wVWeHf.js +0 -13
  312. package/dist/nl-NL-DiH4q7K-.js +0 -13
  313. package/dist/no-NO-BeVzpadb.js +0 -13
  314. package/dist/no-NO-D57T2p2M.js +0 -47
  315. package/dist/no-NO-JHMzV-ae.js +0 -13
  316. package/dist/pl-PL-0BphD78z.js +0 -13
  317. package/dist/pl-PL-B3RxZ32y.js +0 -47
  318. package/dist/pl-PL-De41L6O6.js +0 -13
  319. package/dist/pt-BR-BvAy7bfZ.js +0 -13
  320. package/dist/pt-BR-CjfX1fDM.js +0 -47
  321. package/dist/pt-BR-D7RCymsU.js +0 -13
  322. package/dist/pt-PT-BH1abg6H.js +0 -13
  323. package/dist/pt-PT-CgXkfMUc.js +0 -13
  324. package/dist/pt-PT-D79GMAC5.js +0 -47
  325. package/dist/ro-RO-1W3Bw0U7.js +0 -13
  326. package/dist/ro-RO-Dj-2um-k.js +0 -47
  327. package/dist/ro-RO-raS4E2ww.js +0 -13
  328. package/dist/sk-SK-BTujkOgF.js +0 -13
  329. package/dist/sk-SK-Es-5xiuY.js +0 -13
  330. package/dist/sk-SK-JN-Ll7bm.js +0 -47
  331. package/dist/sl-SI-BT9PpQII.js +0 -13
  332. package/dist/sl-SI-Cq4LxAvb.js +0 -13
  333. package/dist/sl-SI-nUZNETVU.js +0 -47
  334. package/dist/sv-SE-8dFj9z4D.js +0 -47
  335. package/dist/sv-SE-Csib2Zj_.js +0 -13
  336. package/dist/sv-SE-EbNvb_L7.js +0 -13
@@ -2,49 +2,55 @@
2
2
  {
3
3
  try {
4
4
  let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
5
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "1bb3a0ed-7111-40b8-96cc-ab2659700d86", e._sentryDebugIdIdentifier = "sentry-dbid-1bb3a0ed-7111-40b8-96cc-ab2659700d86");
5
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "a1fc772e-b3dc-49bf-a81c-7f515c8d1f45", e._sentryDebugIdIdentifier = "sentry-dbid-a1fc772e-b3dc-49bf-a81c-7f515c8d1f45");
6
6
  } catch (e) {
7
7
  }
8
8
  }
9
9
  ;
10
10
  import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
- import { b as useApiContext, a7 as useMutation, k as httpPost, j as useQuery, q as skipToken, u as useTranslation, ah as useI18nContext, a9 as isEmpty, i as isUndefinedOrNull, ac as CountryCodes, bA as isISIN, B as Button, c as useLegalEntity, R as ROOT_LE, X as useExperimentsContext, x as Typography, L as Loader, a8 as entriesOf, P as useAnalyticsContext, m as useSettingsContext, N as createLogger, aK as useQueryClient, M as TaskTypes, y as LegalEntityTypes, an as businessDetailsComponentsKeyMapping, bB as solePropBusinessDetailsKeyMapping, ak as objectsDeepEqual, aw as keysOf, bC as solePropBusinessDetailsApiKeyMapping, as as businessDetailsApiKeyMapping, b1 as filterOutUnwantedAssociationsIfRootLE, a$ as drop, aa as getOwnEntityAssociations, aM as doArraysMatch, ar as getCapabilityProblems, bD as solePropBusinessDetailsDocumentMapping, bz as businessDetailsDocumentMapping } from "./StoreProvider-BulXd4Hf.js";
11
+ import { b as useApiContext, aD as useMutation, k as httpPost, j as useQuery, q as skipToken, u as useTranslation, af as useI18nContext, aa as isEmpty, i as isUndefinedOrNull, a9 as CountryCodes, bA as isISIN, B as Button, c as useLegalEntity, R as ROOT_LE, X as useExperimentsContext, x as Typography, L as Loader, aC as entriesOf, P as useAnalyticsContext, m as useSettingsContext, N as createLogger, aF as useQueryClient, M as TaskTypes, y as LegalEntityTypes, al as businessDetailsComponentsKeyMapping, bB as solePropBusinessDetailsKeyMapping, ai as objectsDeepEqual, aG as keysOf, bC as solePropBusinessDetailsApiKeyMapping, bp as businessDetailsApiKeyMapping, a$ as filterOutUnwantedAssociationsIfRootLE, aZ as drop, a7 as getOwnEntityAssociations, aJ as doArraysMatch, ap as getCapabilityProblems, bD as solePropBusinessDetailsDocumentMapping, bE as businessDetailsDocumentMapping } from "./StoreProvider-DX9X_rtC.js";
12
12
  import { useEffect, useCallback, useState, useMemo, useRef } from "preact/hooks";
13
- import { S as StateCodesUS, d as TAX_INFORMATION_FIELD, r as requestingBanking, c as requestingIssuing, f as exemptedFromTaxDefaultFieldMetadata, h as exemptedFromTaxDefaultFieldConfig, t as taxInformationDefaultFieldMetadata, b as taxInformationDefaultFieldConfig, T as TaxInformationField, j as COUNTRY_OF_GOVERNING_LAW_POSSIBLE, C as COUNTRIES_USING_COMPANY_SEARCH, M as MemoizedDocumentUpload, k as isRegistrationNumberAbsentStateV4Scenario, l as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, m as getCompanyRegistrationNumberOptions, n as countryToTaxInfoTypeMap, e as rules, g as getFieldsWithExistingData } from "./TaxInformationField-vBwS4Gdq.js";
14
- import { R as RadioGroup, u as useFormContext, c as useCreateLegalEntity, d as useUpdateLegalEntity } from "./RadioGroup-CDIi5JOR.js";
15
- import { S as SettingNames, I as InputText } from "./InputText-rkMNHFYM.js";
16
- import { h as hasDataChanged } from "./hasDataChanged-C32ujCoA.js";
17
- import { u as useGlobalDataSlice, a as useGlobalData, c as useStateContext, F as FormWrapper } from "./useGlobalData-BUgIp9O-.js";
18
- import { u as useToastContext } from "./useToastContext-SPgtDHvP.js";
19
- import { u as useDebouncedCallback, g as getAssociatedLeAnalyticsPayload } from "./analytics-_iYLDAnN.js";
20
- import { d as validateNotEmptyOnBlur, h as validatePatternOnBlur, r as resolveFieldMetadata, k as validateJaKanaLegalCompanyName, l as validateJaHaniLegalCompanyName, a as useAccountHolder, i as composePerScenarioFormConfigurations, c as getPropsFromConfigurations } from "./fieldConfigurations-BBmPG-CS.js";
21
- import { c as createFormUtils, H as Header, a as Link, m as mergeFieldMetadataIntoProps, E as ErrorPanel, C as CountryField, S as StackLayout, e as COUNTRY_FIELD, n as getFormProps, s as summaryItem, g as getRequiredForms, b as addValidityToForms, u as useFormComposer } from "./CountryField-DePvueIq.js";
22
- import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-CZ8JIq0y.js";
23
- import { S as StructuredList, a as datasetUtilities, C as Confirm } from "./useDataset-BhtLJw8i.js";
24
- import { E as EntityTypeRadioGroupCard, o as organizationTypesToSkipCompanyStructureForm } from "./utils-C6VZF1lW.js";
25
- import { a as getDocument, c as createDocumentRequest, b as getFileExtention, d as documentApiUtils } from "./validate-zp9cKIZQ.js";
13
+ import { R as RadioGroup, u as useCreateLegalEntity, a as useUpdateLegalEntity } from "./RadioGroup-B0eqJ4-H.js";
14
+ import { S as SettingNames, I as InputText } from "./InputText-DqycMV0z.js";
15
+ import { h as hasDataChanged } from "./hasDataChanged-QgzClnGa.js";
16
+ import { u as useGlobalDataSlice, a as useGlobalData, c as useStateContext, F as FormWrapper } from "./useGlobalData-DpDm0x5x.js";
17
+ import { u as useToastContext } from "./useToastContext-9176-zEj.js";
18
+ import { c as composePerScenarioFormConfigurations, g as getPropsFromConfigurations } from "./process-field-configurations-CPiaN7XP.js";
19
+ import { c as validateNotEmptyOnBlur, f as validatePatternOnBlur, r as resolveFieldMetadata, h as validateJaKanaLegalCompanyName, i as validateJaHaniLegalCompanyName, a as useAccountHolder } from "./fieldConfigurations-QIDm3nkC.js";
20
+ import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer, t as trackNavigation } from "./dropinUtils-BB4B9BSv.js";
21
+ import { u as uppercase, m as mapExistingFile, g as getPageName, b as useScenarioConfiguration } from "./mapExistingFile-BfHRGybY.js";
22
+ import { S as StructuredList, a as datasetUtilities, C as Confirm } from "./useDataset-DZSHpx6s.js";
23
+ import { E as EntityTypeRadioGroupCard, o as organizationTypesToSkipCompanyStructureForm } from "./utils-BbfCeKoQ.js";
24
+ import { C as Checkbox, u as useDebouncedCallback, g as getAssociatedLeAnalyticsPayload } from "./analytics-CSO2dqDO.js";
25
+ import { a as getDocument, c as createDocumentRequest, b as getFileExtention, d as documentApiUtils } from "./validate-CchLxW_F.js";
26
+ import { S as StateCodesUS, c as TAX_INFORMATION_FIELD, r as requestingBanking, d as requestingIssuing, e as exemptedFromTaxDefaultFieldMetadata, f as exemptedFromTaxDefaultFieldConfig, t as taxInformationDefaultFieldMetadata, b as taxInformationDefaultFieldConfig, T as TaxInformationField, C as COUNTRY_OF_GOVERNING_LAW_POSSIBLE, h as COUNTRIES_USING_COMPANY_SEARCH, M as MemoizedDocumentUpload, j as isRegistrationNumberAbsentStateV4Scenario, k as COUNTRIES_THAT_USE_TAX_ID_INSTEAD_OF_VAT, l as getCompanyRegistrationNumberOptions, m as countryToTaxInfoTypeMap, n as rules, g as getFieldsWithExistingData } from "./TaxInformationField-CAhkfn-Q.js";
26
27
  import cx from "classnames";
27
- import { C as CompanyTypesValues, h as handleKeys } from "./bafinUtils-DOsm2O1i.js";
28
- import { D as DBA_NAME_FIELD, B as BUSINESS_REGISTRATION_NUMBER_FIELD, V as VAT_NUMBER_FIELD, j as registrationAddressFields, v as vatAbsenceReasonMetadata, d as defaultFieldMetadata$1, k as getDefaultVatNumberType, a as defaultFieldConfig$1, i as exemptFromRegistrationNumberDefaultFieldMetadata, l as exemptFromRegistrationNumberDefaultFieldConfig, r as registrationNumberDefaultFieldMetadata, m as getDefaultRegistrationNumberType, b as registrationNumberDefaultFieldConfig, c as doingBusinessAsFieldMetadata, e as doingBusinessAsAbsentFieldMetadata, f as DBANameField, g as BusinessRegistrationNumberField, h as VatNumberField, M as MemoizedConstitutionalDocument, n as inferCompanyRegistrationNumberType } from "./RegistrationAddress-coO57t4c.js";
29
- import { F as Field, a as useForm, C as Checkbox, L as LoaderWrapper } from "./useForm-CkDciBI3.js";
30
- import { I as InputNumber, c as InputCurrency, b as CURRENCY_FIELD, C as Currency, L as LegalFormField, m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./Currency-CCNB-Owq.js";
31
- import { c as currencyByCountry } from "./types-YZCbv6wT.js";
32
- import { I as InputDate, f as formatDateObj } from "./InputDate-BqYvvnqX.js";
28
+ import { C as CompanyTypesValues, h as handleKeys } from "./bafinUtils-lxvWZZEW.js";
29
+ import { D as DBA_NAME_FIELD, B as BUSINESS_REGISTRATION_NUMBER_FIELD, V as VAT_NUMBER_FIELD, r as registrationAddressFields, v as vatAbsenceReasonMetadata, d as defaultFieldMetadata$1, g as getDefaultVatNumberType, a as defaultFieldConfig$1, e as exemptFromRegistrationNumberDefaultFieldMetadata, b as exemptFromRegistrationNumberDefaultFieldConfig, c as registrationNumberDefaultFieldMetadata, f as getDefaultRegistrationNumberType, h as registrationNumberDefaultFieldConfig, i as doingBusinessAsFieldMetadata, j as doingBusinessAsAbsentFieldMetadata, k as DBANameField, l as BusinessRegistrationNumberField, m as VatNumberField, M as MemoizedConstitutionalDocument, n as inferCompanyRegistrationNumberType } from "./RegistrationAddress-DEZgJ98J.js";
30
+ import { c as createFormUtils, H as Header, m as mergeFieldMetadataIntoProps, E as ErrorPanel, C as CountryField, S as StackLayout, a as COUNTRY_FIELD, h as getFormProps, s as summaryItem, d as summaryStep } from "./CountryField-DpZS-UHE.js";
31
+ import { u as useFormContext, F as FormContextProvider, a as FormFlow } from "./useFormContext-DW_Slas-.js";
32
+ import { u as useMultiForm } from "./useMultiForm-B07GoQbD.js";
33
+ import { c as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, d as applyVerifiedBusinessData$1, o as operationalAddressIsSameIds, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, e as StateField, i as isDateOlderThanAYear } from "./Address-DvpndZyX.js";
34
+ import { F as Field, a as useForm, L as LoaderWrapper } from "./useForm-Dj2YKs6k.js";
35
+ import { I as InputNumber, c as InputCurrency, b as CURRENCY_FIELD, C as Currency, L as LegalFormField, m as mapFinancialReportsToFinancialInformation, a as mapFinancialInformationToFinancialReport } from "./Currency-dvDSJvr6.js";
36
+ import { c as currencyByCountry } from "./types-B8B2a7MQ.js";
37
+ import { I as InputDate, f as formatDateObj } from "./InputDate-Lj3IQq5B.js";
33
38
  import { Suspense, lazy } from "preact/compat";
34
- import { c as useAddressCleanse, f as formatAddressForCleanse, m as mapAddressData, e as applyVerifiedBusinessData, o as operationalAddressIsSameIds, A as Address, g as getNestedTrustedFields, S as STATE_FIELD, d as StateField, i as isDateOlderThanAYear } from "./Address-t4VOfLT-.js";
35
- import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-DK17jkn8.js";
36
- import { p as Divider, I as INDUSTRY_CODE_FIELD, g as industryCodeFieldMetadata, h as IndustryCodeField, o as LEGAL_COMPANY_NAME_FIELD, j as defaultFieldMetadataV4, k as defaultFieldMetadata$2, l as defaultFieldConfigV4, m as defaultFieldConfig$2 } from "./OnboardingDropinComponent-BlMzaK2Z.js";
37
- import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, m as mapAddressLabels, c as getKeyForField } from "./utils-CfNHCh35.js";
39
+ import { M as MaskedInput, m as makeMask, d as alphanumericInputs, b as alphaInputs, n as numericInputs } from "./MaskedInput-BBpUba4Q.js";
40
+ import { D as Divider, I as INDUSTRY_CODE_FIELD, i as industryCodeFieldMetadata, a as IndustryCodeField } from "./Divider-CQmSV-3K.js";
41
+ import { g as getAddressSchemaForCountry, C as COUNTRIES_WITH_STATES_DATASET, a as getAddressSchemaLabelsByCountry, m as mapAddressLabels, c as getKeyForField } from "./utils-Cnzy9BrL.js";
38
42
  import { signal } from "@preact/signals";
39
- import { u as useAllowedCountries, m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-CYDc6_WR.js";
40
- import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-CeWqn3jD.js";
41
- import { a as Alert } from "./Alert-BeizfGIR.js";
42
- import { C as Card } from "./Card-B1eYN1iZ.js";
43
+ import { L as Link } from "./Link-BePoWmqK.js";
44
+ import { t as toFullWidth, u as useAllowedCountries, m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-Bh2EFFbk.js";
45
+ import { K as KEYBOARD_KEYS, M as Modal, a as ModalContent } from "./Modal-QC3t2pZm.js";
46
+ import { L as LEGAL_COMPANY_NAME_FIELD, g as defaultFieldMetadataV4, h as defaultFieldMetadata$2, j as defaultFieldConfigV4, k as defaultFieldConfig$2 } from "./OnboardingDropinComponent-CR_pOocw.js";
47
+ import { a as Alert } from "./Alert-ZQaJKZwM.js";
48
+ import { C as Card } from "./Card-DeKeyEgr.js";
43
49
  import { b as mapAddressLocalizationToJpAddressSchema, a as mapApiScriptLocalizationToSchemaFields, m as mapSchemaFieldsToApiScriptLocalization } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
44
50
  import { f as formatObject, g as getProp } from "./utils-DNSfZiio.js";
45
51
  import { f as formatCurrency } from "./formatCurrency-CMOSdJMB.js";
46
- import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-C4LAQpBz.js";
47
- import { i as isEmpty$1 } from "./isEmpty-CD8E4UFi.js";
52
+ import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-9xZhdWqV.js";
53
+ import { i as isEmpty$1 } from "./isEmpty-uIgxe5k7.js";
48
54
  const clearCompanyData = async (legalEntityId, baseUrl) => {
49
55
  return httpPost({
50
56
  baseUrl,
@@ -937,8 +943,8 @@ function VerifiedBusinessCard({
937
943
  /* @__PURE__ */ jsx("div", { className: "adyen-kyc-verified-business-card__expand-button", children: /* @__PURE__ */ jsx(Button, { variant: "link", onClick: () => setExpanded(!expanded), children: expanded ? i18n.get("hideDetails") : i18n.get("showDetails") }) })
938
944
  ] });
939
945
  }
940
- const LazyJpAddress = lazy(
941
- async () => (await import("./JpAddress-7_Wvn6w-.js")).JpAddress
946
+ const LazyJpAddress$1 = lazy(
947
+ async () => (await import("./JpAddress-DbmfH7ao.js")).JpAddress
942
948
  );
943
949
  const ADDITIONAL_INFORMATION_FORM_ID = "additionalInformation";
944
950
  const ADDITIONAL_INFORMATION_FIELDS = [
@@ -1241,7 +1247,7 @@ function AdditionalInformation({
1241
1247
  };
1242
1248
  }, [verifiedBusiness$1, basicInformation?.stateOrProvince, country]);
1243
1249
  useEffect(() => {
1244
- applyVerifiedBusinessData(verifiedBusiness$1, handleChangeFor);
1250
+ applyVerifiedBusinessData$1(verifiedBusiness$1, handleChangeFor);
1245
1251
  if (basicInformation && verifiedBusiness$1?.name) {
1246
1252
  basicInformation.legalCompanyName = verifiedBusiness$1.name;
1247
1253
  }
@@ -1547,7 +1553,7 @@ function AdditionalInformation({
1547
1553
  /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: registrationAddressDescription })
1548
1554
  ] }),
1549
1555
  country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
1550
- LazyJpAddress,
1556
+ LazyJpAddress$1,
1551
1557
  {
1552
1558
  id: ADDITIONAL_INFORMATION_FORM_ID,
1553
1559
  addressType: "registrationAddress",
@@ -1606,7 +1612,7 @@ function AdditionalInformation({
1606
1612
  }
1607
1613
  ),
1608
1614
  formData.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && (country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
1609
- LazyJpAddress,
1615
+ LazyJpAddress$1,
1610
1616
  {
1611
1617
  id: ADDITIONAL_INFORMATION_FORM_ID,
1612
1618
  addressType: "operationalAddress",
@@ -1642,52 +1648,6 @@ function AdditionalInformation({
1642
1648
  ] });
1643
1649
  }
1644
1650
  const JAPANESE_LEGAL_COMPANY_NAME_FIELDS = ["jaHaniLegalCompanyName", "jaKanaLegalCompanyName"];
1645
- const toFullWidth = (value) => {
1646
- const halfWidthKatakana = [..."。「」、・ヲァィゥェォャュョッーアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゙゚"];
1647
- const fullWidthKatakana = [
1648
- ..."。「」、・ヲァィゥェォャュョッーアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン゛゜"
1649
- ];
1650
- const hangul1 = { name: "hangul1", halfRE: /[ᄀ-ᄒ]/, fullRE: /[ᆨ-ᇂ]/, delta: -60921 };
1651
- const hangul2 = { name: "hangul2", halfRE: /[ᅡ-ᅵ]/, fullRE: /[ᅡ-ᅵ]/, delta: -61025 };
1652
- const latin = { name: "latin", halfRE: /[!-~]/, fullRE: /[!-~]/, delta: 65248 };
1653
- const extras = {
1654
- half: "¢£¬¯¦¥₩ |←↑→↓■°",
1655
- full: "¢£¬ ̄¦¥₩ │←↑→↓■○"
1656
- };
1657
- const converters = [latin, hangul1, hangul2];
1658
- const convertLatinHangul = (c) => {
1659
- for (let j = 0; j < converters.length; j += 1) {
1660
- const converter = converters[j];
1661
- const isHalfWidth = converter.halfRE.test(c);
1662
- if (isHalfWidth) {
1663
- return String.fromCharCode(c.charCodeAt(0) + converter.delta);
1664
- }
1665
- }
1666
- return null;
1667
- };
1668
- let result = "";
1669
- for (let i = 0; i < value.length; i += 1) {
1670
- const c = value[i];
1671
- const convertedChar = convertLatinHangul(c);
1672
- if (convertedChar) {
1673
- result += convertedChar;
1674
- continue;
1675
- }
1676
- const indexOfHalfWidthKatakana = halfWidthKatakana.indexOf(c);
1677
- if (indexOfHalfWidthKatakana >= 0) {
1678
- const fullWidthKatakanaCharacter = fullWidthKatakana[indexOfHalfWidthKatakana];
1679
- result += fullWidthKatakanaCharacter;
1680
- continue;
1681
- }
1682
- const indexOfHalfWidthExtras = extras.half.indexOf(c);
1683
- if (indexOfHalfWidthExtras >= 0) {
1684
- result += extras.full[indexOfHalfWidthExtras];
1685
- continue;
1686
- }
1687
- result += c;
1688
- }
1689
- return result;
1690
- };
1691
1651
  function useLegalCompanyNameField({
1692
1652
  data,
1693
1653
  valid,
@@ -2752,13 +2712,13 @@ const documentTypes$2 = [
2752
2712
  { id: "Business registry statement", name: "businessRegistryStatement" }
2753
2713
  ];
2754
2714
  const GuidanceContent$4 = () => {
2755
- const { i18n } = useI18nContext();
2715
+ const { t } = useTranslation(["common", "business"]);
2756
2716
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
2757
- /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
2717
+ /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
2758
2718
  /* @__PURE__ */ jsxs("ul", { children: [
2759
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesTheDirectorsFullName") }),
2760
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesEvidenceOfTheIndividualsRole") }),
2761
- /* @__PURE__ */ jsx("li", { children: i18n.get("issuedOrSignedByALegalRepresentative") })
2719
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheDirectorsFullName"], { ns: "business" }) }),
2720
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRole"], { ns: "business" }) }),
2721
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
2762
2722
  ] })
2763
2723
  ] }) });
2764
2724
  };
@@ -2769,15 +2729,15 @@ function ProofOfDirectorDocument({
2769
2729
  description = "weNeedAnOfficialDocument",
2770
2730
  ...props
2771
2731
  }) {
2772
- const { i18n } = useI18nContext();
2732
+ const { t } = useTranslation("common");
2773
2733
  const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$2[0].id);
2774
2734
  return /* @__PURE__ */ jsx(
2775
2735
  MemoizedDocumentUpload,
2776
2736
  {
2777
2737
  ...props,
2778
2738
  id,
2779
- heading: i18n.get(heading),
2780
- description: i18n.get(description),
2739
+ heading: t(($) => $[heading]),
2740
+ description: t(($) => $[description]),
2781
2741
  documentField: "proofOfDirector",
2782
2742
  documentType: "proofOfDirector",
2783
2743
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$4, {}),
@@ -2800,27 +2760,40 @@ const documentTypes$1 = [
2800
2760
  }
2801
2761
  ];
2802
2762
  const GuidanceContent$3 = ({ selectedDocumentName }) => {
2803
- const { i18n } = useI18nContext();
2763
+ const { t } = useTranslation(["common", "business"]);
2804
2764
  const [showGuidanceModal, setShowGuidanceModal] = useState(false);
2805
2765
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
2806
- /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
2766
+ /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
2807
2767
  selectedDocumentName === "Certified Organizational chart" ? /* @__PURE__ */ jsxs("ul", { children: [
2808
- /* @__PURE__ */ jsx("li", { children: i18n.get("showsOwnershipAndControllingRelations") }),
2809
- /* @__PURE__ */ jsx("li", { children: i18n.get("entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration") }),
2810
- /* @__PURE__ */ jsx("li", { children: i18n.get("signedByALawyerAccountantAuditorWithinTheLast6Months") })
2768
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["showsOwnershipAndControllingRelations"], { ns: "business" }) }),
2769
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"], {
2770
+ ns: "business"
2771
+ }) }),
2772
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["signedByALawyerAccountantAuditorWithinTheLast6Months"], {
2773
+ ns: "business"
2774
+ }) })
2811
2775
  ] }) : /* @__PURE__ */ jsxs("ul", { children: [
2812
- /* @__PURE__ */ jsx("li", { children: i18n.get("oneOrganizationalChartShowingOwnershipAndControllingRelations") }),
2776
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["oneOrganizationalChartShowingOwnershipAndControllingRelations"], {
2777
+ ns: "business"
2778
+ }) }),
2813
2779
  /* @__PURE__ */ jsxs("ul", { children: [
2814
- /* @__PURE__ */ jsx("li", { children: i18n.get("entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration") }),
2780
+ /* @__PURE__ */ jsx("li", { children: t(
2781
+ ($) => $["entitiesMustIncludeANameLegalStructureAndCountryRegionOfRegistration"],
2782
+ {
2783
+ ns: "business"
2784
+ }
2785
+ ) }),
2815
2786
  /* @__PURE__ */ jsxs("li", { children: [
2816
2787
  /* @__PURE__ */ jsxs("span", { children: [
2817
- i18n.get("one"),
2788
+ t(($) => $["one"]),
2818
2789
  " "
2819
2790
  ] }),
2820
- /* @__PURE__ */ jsx(Button, { onClick: () => setShowGuidanceModal(true), variant: "link", children: i18n.get("supportingDocument") }),
2791
+ /* @__PURE__ */ jsx(Button, { onClick: () => setShowGuidanceModal(true), variant: "link", children: t(($) => $["supportingDocument"], { ns: "common" }) }),
2821
2792
  /* @__PURE__ */ jsxs("span", { children: [
2822
2793
  " ",
2823
- i18n.get("describingTheOrganizationAndItsUBOSignedWithinTheLast6Months")
2794
+ t(($) => $["describingTheOrganizationAndItsUBOSignedWithinTheLast6Months"], {
2795
+ ns: "business"
2796
+ })
2824
2797
  ] })
2825
2798
  ] })
2826
2799
  ] })
@@ -2830,7 +2803,7 @@ const GuidanceContent$3 = ({ selectedDocumentName }) => {
2830
2803
  {
2831
2804
  size: "small",
2832
2805
  onClose: () => setShowGuidanceModal(false),
2833
- ariaLabel: i18n.get("whichDocumentsQualifyToProveOwnership"),
2806
+ ariaLabel: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" }),
2834
2807
  children: /* @__PURE__ */ jsxs(ModalContent, { children: [
2835
2808
  /* @__PURE__ */ jsx(
2836
2809
  Typography,
@@ -2838,24 +2811,24 @@ const GuidanceContent$3 = ({ selectedDocumentName }) => {
2838
2811
  el: "h1",
2839
2812
  variant: "title-l",
2840
2813
  className: "adyen-kyc-u-margin-bottom-32 adyen-kyc-u-margin-top-32",
2841
- children: i18n.get("whichDocumentsQualifyToProveOwnership")
2814
+ children: t(($) => $["whichDocumentsQualifyToProveOwnership"], { ns: "business" })
2842
2815
  }
2843
2816
  ),
2844
- /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: i18n.get("theDocumentsWeCanAcceptToProveOwnershipAre") }),
2817
+ /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["theDocumentsWeCanAcceptToProveOwnershipAre"], { ns: "business" }) }),
2845
2818
  /* @__PURE__ */ jsxs("ul", { children: [
2846
- /* @__PURE__ */ jsx("li", { children: i18n.get("securitiesRegister") }),
2847
- /* @__PURE__ */ jsx("li", { children: i18n.get("shareholderRegister") }),
2848
- /* @__PURE__ */ jsx("li", { children: i18n.get("ultimateBeneficialOwnerRegister") }),
2849
- /* @__PURE__ */ jsx("li", { children: i18n.get("articlesOfIncorporation") }),
2850
- /* @__PURE__ */ jsx("li", { children: i18n.get("annualReports") }),
2851
- /* @__PURE__ */ jsx("li", { children: i18n.get("annualReturns") }),
2852
- /* @__PURE__ */ jsx("li", { children: i18n.get("certificateOfCorporateStatus") }),
2853
- /* @__PURE__ */ jsx("li", { children: i18n.get("shareholderAgreements") }),
2854
- /* @__PURE__ */ jsx("li", { children: i18n.get("assignmentAgreements") }),
2855
- /* @__PURE__ */ jsx("li", { children: i18n.get("partnershipAgreements") }),
2856
- /* @__PURE__ */ jsx("li", { children: i18n.get("boardOfDirectorsMeetingRecords") }),
2857
- /* @__PURE__ */ jsx("li", { children: i18n.get("registrationDocument") }),
2858
- /* @__PURE__ */ jsx("li", { children: i18n.get("certificateOfIncumbency") })
2819
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["securitiesRegister"], { ns: "business" }) }),
2820
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderRegister"], { ns: "business" }) }),
2821
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["ultimateBeneficialOwnerRegister"], { ns: "business" }) }),
2822
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["articlesOfIncorporation"], { ns: "business" }) }),
2823
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["annualReports"], { ns: "business" }) }),
2824
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["annualReturns"], { ns: "business" }) }),
2825
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfCorporateStatus"], { ns: "business" }) }),
2826
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["shareholderAgreements"], { ns: "business" }) }),
2827
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["assignmentAgreements"], { ns: "business" }) }),
2828
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["partnershipAgreements"], { ns: "business" }) }),
2829
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["boardOfDirectorsMeetingRecords"], { ns: "business" }) }),
2830
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["registrationDocument"], { ns: "business" }) }),
2831
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["certificateOfIncumbency"], { ns: "business" }) })
2859
2832
  ] })
2860
2833
  ] })
2861
2834
  }
@@ -2869,7 +2842,7 @@ function ProofOfOwnershipDocument({
2869
2842
  description = "weNeedAnOfficialDocumentForOwnership",
2870
2843
  ...props
2871
2844
  }) {
2872
- const { i18n } = useI18nContext();
2845
+ const { t } = useTranslation(["common", "business"]);
2873
2846
  const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes$1[0].id);
2874
2847
  const supportsMultiple = selectedDocumentName === DOC_TYPE_FOR_MULTI_UPLOAD;
2875
2848
  useEffect(() => {
@@ -2882,13 +2855,13 @@ function ProofOfOwnershipDocument({
2882
2855
  {
2883
2856
  ...props,
2884
2857
  id,
2885
- heading: i18n.get(heading),
2886
- description: i18n.get(description),
2858
+ heading: t(($) => $[heading]),
2859
+ description: t(($) => $[description]),
2887
2860
  documentField: "proofOfOwnership",
2888
2861
  documentType: "proofOfOwnership",
2889
2862
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$3, { selectedDocumentName }),
2890
2863
  country,
2891
- label: i18n.get("uploadYourDocuments"),
2864
+ label: t(($) => $["uploadYourDocuments"], { ns: "business" }),
2892
2865
  documentTypeSelect: {
2893
2866
  selectedType: selectedDocumentName,
2894
2867
  setSelectedType: setSelectedDocumentName,
@@ -2897,7 +2870,7 @@ function ProofOfOwnershipDocument({
2897
2870
  hidePageCount: true,
2898
2871
  supportsMultipleUploads: supportsMultiple,
2899
2872
  maxNumberOfFiles: supportsMultiple ? 2 : 1,
2900
- extraDropzoneDescription: supportsMultiple ? i18n.get("oneOrganizationalChartAndOneSupportingDocument") : void 0
2873
+ extraDropzoneDescription: supportsMultiple ? t(($) => $["oneOrganizationalChartAndOneSupportingDocument"], { ns: "business" }) : void 0
2901
2874
  }
2902
2875
  );
2903
2876
  }
@@ -2906,13 +2879,13 @@ const documentTypes = [
2906
2879
  { id: "Internal company document", name: "internalCompanyDocument" }
2907
2880
  ];
2908
2881
  const GuidanceContent$2 = () => {
2909
- const { i18n } = useI18nContext();
2882
+ const { t } = useTranslation(["common", "business"]);
2910
2883
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
2911
- /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
2884
+ /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
2912
2885
  /* @__PURE__ */ jsxs("ul", { children: [
2913
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesTheSignatorysFullName") }),
2914
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesEvidenceOfTheIndividualsRoleSignatory") }),
2915
- /* @__PURE__ */ jsx("li", { children: i18n.get("issuedOrSignedByALegalRepresentative") })
2886
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["includesTheSignatorysFullName"], { ns: "business" }) }),
2887
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["includesEvidenceOfTheIndividualsRoleSignatory"], { ns: "business" }) }),
2888
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedOrSignedByALegalRepresentative"], { ns: "business" }) })
2916
2889
  ] })
2917
2890
  ] }) });
2918
2891
  };
@@ -2923,15 +2896,15 @@ function ProofOfSignatoryDocument({
2923
2896
  description = "weNeedAnOfficialDocumentSignatory",
2924
2897
  ...props
2925
2898
  }) {
2926
- const { i18n } = useI18nContext();
2899
+ const { t } = useTranslation("common");
2927
2900
  const [selectedDocumentName, setSelectedDocumentName] = useState(documentTypes[0].id);
2928
2901
  return /* @__PURE__ */ jsx(
2929
2902
  MemoizedDocumentUpload,
2930
2903
  {
2931
2904
  ...props,
2932
2905
  id,
2933
- heading: i18n.get(heading),
2934
- description: i18n.get(description),
2906
+ heading: t(($) => $[heading]),
2907
+ description: t(($) => $[description]),
2935
2908
  documentField: "proofOfSignatory",
2936
2909
  documentType: "proofOfSignatory",
2937
2910
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$2, {}),
@@ -3018,23 +2991,20 @@ const GuidanceContent$1 = ({
3018
2991
  country,
3019
2992
  companyType
3020
2993
  }) => {
3021
- const { i18n } = useI18nContext();
2994
+ const { t } = useTranslation(["common", "business"]);
3022
2995
  const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP$1[country]?.[companyType];
3023
2996
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
3024
2997
  acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
3025
- /* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
3026
- /* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: i18n.get(document) }, i)) })
2998
+ /* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
2999
+ /* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
3027
3000
  ] }),
3028
3001
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
3029
- /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
3030
- /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: i18n.get("includesLegalCompanyName") }) })
3002
+ /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
3003
+ /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }) })
3031
3004
  ] })
3032
3005
  ] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
3033
- /* @__PURE__ */ jsxs("strong", { children: [
3034
- " ",
3035
- i18n.get("documentRequirements")
3036
- ] }),
3037
- /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: i18n.get("documentIssuedByGovernmentAuthority") }) })
3006
+ /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
3007
+ /* @__PURE__ */ jsx("ul", { children: /* @__PURE__ */ jsx("li", { children: t(($) => $["documentIssuedByGovernmentAuthority"], { ns: "business" }) }) })
3038
3008
  ] }) });
3039
3009
  };
3040
3010
  function RegistrationDocument({
@@ -3045,14 +3015,14 @@ function RegistrationDocument({
3045
3015
  description = "companyRegistrationDocumentFormDescription",
3046
3016
  ...props
3047
3017
  }) {
3048
- const { i18n } = useI18nContext();
3018
+ const { t } = useTranslation("common");
3049
3019
  return /* @__PURE__ */ jsx(
3050
3020
  MemoizedDocumentUpload,
3051
3021
  {
3052
3022
  ...props,
3053
3023
  id,
3054
- heading: i18n.get(heading),
3055
- description: i18n.get(description),
3024
+ heading: t(($) => $[heading]),
3025
+ description: t(($) => $[description]),
3056
3026
  documentField: "registrationDocument",
3057
3027
  documentType: "registrationDocument",
3058
3028
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent$1, { country, companyType }),
@@ -3113,26 +3083,26 @@ const GuidanceContent = ({
3113
3083
  country,
3114
3084
  companyType
3115
3085
  }) => {
3116
- const { i18n } = useI18nContext();
3086
+ const { t } = useTranslation(["common", "business"]);
3117
3087
  const acceptedDocGuidance = ACCEPTED_DOCUMENTS_MAP[country]?.[companyType];
3118
3088
  return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__guidance", children: country === "US" ? /* @__PURE__ */ jsxs(Fragment, { children: [
3119
3089
  acceptedDocGuidance && /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
3120
- /* @__PURE__ */ jsx("strong", { children: i18n.get(acceptedDocGuidance.header) }),
3121
- /* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: i18n.get(document) }, i)) })
3090
+ /* @__PURE__ */ jsx("strong", { children: t(($) => $[acceptedDocGuidance.header], { ns: "business" }) }),
3091
+ /* @__PURE__ */ jsx("ul", { children: acceptedDocGuidance.documents.map((document, i) => /* @__PURE__ */ jsx("li", { children: t(($) => $[document], { ns: "business" }) }, i)) })
3122
3092
  ] }),
3123
3093
  /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
3124
- /* @__PURE__ */ jsx("strong", { children: i18n.get("documentRequirements") }),
3094
+ /* @__PURE__ */ jsx("strong", { children: t(($) => $["documentRequirements"], { ns: "common" }) }),
3125
3095
  /* @__PURE__ */ jsxs("ul", { children: [
3126
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesLegalCompanyName") }),
3127
- /* @__PURE__ */ jsx("li", { children: i18n.get("includesEIN") })
3096
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["includesLegalCompanyName"], { ns: "business" }) }),
3097
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["includesEIN"], { ns: "business" }) })
3128
3098
  ] })
3129
3099
  ] })
3130
3100
  ] }) : /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
3131
- /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__subtitle", children: i18n.get("documentRequirements") }),
3101
+ /* @__PURE__ */ jsx("div", { className: "adyen-kyc-upload-field__subtitle", children: t(($) => $["documentRequirements"], { ns: "common" }) }),
3132
3102
  /* @__PURE__ */ jsxs("ul", { children: [
3133
- /* @__PURE__ */ jsx("li", { children: i18n.get("containsNameOfCompany") }),
3134
- /* @__PURE__ */ jsx("li", { children: i18n.get("documentShowsTaxIdOfCompany") }),
3135
- /* @__PURE__ */ jsx("li", { children: i18n.get("issuedByTheTaxAuthority") })
3103
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
3104
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
3105
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
3136
3106
  ] })
3137
3107
  ] }) });
3138
3108
  };
@@ -3144,14 +3114,14 @@ function TaxDocument({
3144
3114
  description = "companyTaxDocumentFormDescription",
3145
3115
  ...props
3146
3116
  }) {
3147
- const { i18n } = useI18nContext();
3117
+ const { t } = useTranslation("common");
3148
3118
  return /* @__PURE__ */ jsx(
3149
3119
  MemoizedDocumentUpload,
3150
3120
  {
3151
3121
  ...props,
3152
3122
  id,
3153
- heading: i18n.get(heading),
3154
- description: i18n.get(description),
3123
+ heading: t(($) => $[heading]),
3124
+ description: t(($) => $[description]),
3155
3125
  documentField: "taxDocument",
3156
3126
  documentType: "proofOfOrganizationTaxInfo",
3157
3127
  guidanceContent: /* @__PURE__ */ jsx(GuidanceContent, { country, companyType }),
@@ -3161,6 +3131,40 @@ function TaxDocument({
3161
3131
  }
3162
3132
  );
3163
3133
  }
3134
+ const applyVerifiedBusinessData = (form, country, verifiedData) => {
3135
+ if (!verifiedData) return;
3136
+ form.handleChangeFor("legalCompanyName", "basicInformation")(verifiedData.name);
3137
+ form.handleChangeFor(
3138
+ "entityType",
3139
+ "companyStructure"
3140
+ )(mapOrganizationTypeToCompanyType(verifiedData.organizationType));
3141
+ const verifiedAddress = verifiedData.isPrincipalAddress || verifiedData.state && form.data?.basicInformation?.stateOrProvince !== verifiedData.state ? { operationalAddress: { ...mapAddressData(verifiedData), country } } : {
3142
+ registrationAddress: {
3143
+ ...mapAddressData(verifiedData),
3144
+ country,
3145
+ stateOrProvince: form.data?.basicInformation?.stateOrProvince
3146
+ }
3147
+ };
3148
+ if (verifiedData.isPrincipalAddress) {
3149
+ form.handleChangeFor(
3150
+ "operationalAddressIsSame",
3151
+ "additionalInformation",
3152
+ "input"
3153
+ )(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
3154
+ }
3155
+ if (verifiedAddress.registrationAddress) {
3156
+ form.handleChangeFor(
3157
+ "registrationAddress",
3158
+ "additionalInformation"
3159
+ )(verifiedAddress.registrationAddress);
3160
+ }
3161
+ if (verifiedAddress.operationalAddress) {
3162
+ form.handleChangeFor(
3163
+ "operationalAddress",
3164
+ "additionalInformation"
3165
+ )(verifiedAddress.operationalAddress);
3166
+ }
3167
+ };
3164
3168
  const BUSINESS_SELECTION_FIELDS = [
3165
3169
  "hasSelectedBusiness"
3166
3170
  ];
@@ -3219,40 +3223,6 @@ function BusinessSelectionMultiform({
3219
3223
  (fieldName, mode) => form.handleChangeFor(fieldName, "businessSelection", mode),
3220
3224
  [form]
3221
3225
  );
3222
- const applyVerifiedBusinessData2 = (verifiedData) => {
3223
- if (!verifiedData) return;
3224
- form.handleChangeFor("legalCompanyName", "basicInformation")(verifiedData.name);
3225
- form.handleChangeFor(
3226
- "entityType",
3227
- "companyStructure"
3228
- )(mapOrganizationTypeToCompanyType(verifiedData.organizationType));
3229
- const verifiedAddress = verifiedData.isPrincipalAddress || verifiedData.state && form.data?.basicInformation?.stateOrProvince !== verifiedData.state ? { operationalAddress: { ...mapAddressData(verifiedData), country } } : {
3230
- registrationAddress: {
3231
- ...mapAddressData(verifiedData),
3232
- country,
3233
- stateOrProvince: form.data?.basicInformation?.stateOrProvince
3234
- }
3235
- };
3236
- if (verifiedData.isPrincipalAddress) {
3237
- form.handleChangeFor(
3238
- "operationalAddressIsSame",
3239
- "additionalInformation",
3240
- "input"
3241
- )(operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME);
3242
- }
3243
- if (verifiedAddress.registrationAddress) {
3244
- form.handleChangeFor(
3245
- "registrationAddress",
3246
- "additionalInformation"
3247
- )(verifiedAddress.registrationAddress);
3248
- }
3249
- if (verifiedAddress.operationalAddress) {
3250
- form.handleChangeFor(
3251
- "operationalAddress",
3252
- "additionalInformation"
3253
- )(verifiedAddress.operationalAddress);
3254
- }
3255
- };
3256
3226
  const handleSelectBusiness = async (result) => {
3257
3227
  if ((!selectedBusinessId || selectedBusinessId !== result.id) && currentTin) {
3258
3228
  userEvents.addPageEvent("Clicked button", {
@@ -3274,7 +3244,7 @@ function BusinessSelectionMultiform({
3274
3244
  }
3275
3245
  };
3276
3246
  const handleConfirmSelection = async () => {
3277
- applyVerifiedBusinessData2(verifiedBusiness.value);
3247
+ applyVerifiedBusinessData(form, country, verifiedBusiness.value);
3278
3248
  handleChange("hasSelectedBusiness", "blur")(true);
3279
3249
  handleNextClick();
3280
3250
  };
@@ -3487,6 +3457,7 @@ const documentFormsIds = [
3487
3457
  ];
3488
3458
  function BusinessDetails(props) {
3489
3459
  const { i18n } = useI18nContext();
3460
+ const { t } = useTranslation("business");
3490
3461
  const { companyStructure } = useGlobalData();
3491
3462
  const {
3492
3463
  country,
@@ -3592,9 +3563,9 @@ function BusinessDetails(props) {
3592
3563
  i18n.get("requirements")
3593
3564
  ] }),
3594
3565
  /* @__PURE__ */ jsxs("ul", { children: [
3595
- /* @__PURE__ */ jsx("li", { children: i18n.get("containsNameOfCompany") }),
3596
- /* @__PURE__ */ jsx("li", { children: i18n.get("documentShowsTaxIdOfCompany") }),
3597
- /* @__PURE__ */ jsx("li", { children: i18n.get("issuedByTheTaxAuthority") })
3566
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
3567
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
3568
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
3598
3569
  ] })
3599
3570
  ] })
3600
3571
  }
@@ -5207,62 +5178,1965 @@ function BusinessDetailsDropin({
5207
5178
  }
5208
5179
  );
5209
5180
  }
5181
+ const LazyJpAddress = lazy(
5182
+ async () => (await import("./JpAddress-DbmfH7ao.js")).JpAddress
5183
+ );
5184
+ function AdditionalInformationMultiform({
5185
+ id,
5186
+ country,
5187
+ companyType,
5188
+ shouldValidate,
5189
+ heading = "additionalInformationFormHeading",
5190
+ description,
5191
+ validationErrors = {},
5192
+ verificationErrors = {}
5193
+ }) {
5194
+ const { t, i18n } = useTranslation(["common", "business", "businessLines"]);
5195
+ const { form } = useFormContext();
5196
+ const { isExperimentEnabled } = useExperimentsContext();
5197
+ const { data: rootLegalEntity } = useLegalEntity(ROOT_LE);
5198
+ const verifiedBusiness$1 = verifiedBusiness.value;
5199
+ const showVerified = !!verifiedBusiness$1;
5200
+ const showStockData = companyType === CompanyTypesValues.PUBLIC_COMPANY;
5201
+ const addressSchema = getAddressSchemaForCountry(country).filter(
5202
+ (field) => !COUNTRIES_WITH_STATES_DATASET.includes(country) ? field !== "stateOrProvince" : true
5203
+ );
5204
+ const currentCountryTaxInformation = form.data?.additionalInformation?.taxInformation?.find(
5205
+ (taxId) => taxId.country === country
5206
+ );
5207
+ const businessLineTypes = [];
5208
+ if (requestingBanking(rootLegalEntity)) {
5209
+ businessLineTypes.push("banking");
5210
+ }
5211
+ if (requestingIssuing(rootLegalEntity)) {
5212
+ businessLineTypes.push("issuing");
5213
+ }
5214
+ const [addressToCheck, setAddressToCheck] = useDebouncedState(500);
5215
+ const { data: cleansedRegistrationAddress } = useAddressCleanse(
5216
+ {
5217
+ text: addressToCheck,
5218
+ country
5219
+ },
5220
+ { enabled: Boolean(addressToCheck) }
5221
+ );
5222
+ const mustProvideOperationalAddress = cleansedRegistrationAddress?.poBox ?? false;
5223
+ useEffect(
5224
+ () => setAddressToCheck(
5225
+ formatAddressForCleanse(form.data?.additionalInformation?.registrationAddress ?? {})
5226
+ ),
5227
+ [form.data?.additionalInformation?.registrationAddress, setAddressToCheck]
5228
+ );
5229
+ const verifiedAddress = useMemo(() => {
5230
+ if (!verifiedBusiness$1) return void 0;
5231
+ return verifiedBusiness$1.isPrincipalAddress || verifiedBusiness$1.state && form.data?.basicInformation?.stateOrProvince !== verifiedBusiness$1.state ? { operationalAddress: { ...mapAddressData(verifiedBusiness$1), country } } : {
5232
+ registrationAddress: {
5233
+ ...mapAddressData(verifiedBusiness$1),
5234
+ country,
5235
+ stateOrProvince: form.data?.basicInformation?.stateOrProvince
5236
+ }
5237
+ };
5238
+ }, [verifiedBusiness$1, form.data?.basicInformation?.stateOrProvince, country]);
5239
+ const handleChangeFor = useCallback(
5240
+ (fieldName, mode) => form.handleChangeFor(fieldName, "additionalInformation", mode),
5241
+ [form]
5242
+ );
5243
+ const handleRegistrationAddressChange = (state) => {
5244
+ handleChangeFor("registrationAddress")(state.data);
5245
+ form.setValid("registrationAddress", Boolean(state.isValid), "additionalInformation");
5246
+ };
5247
+ const handleOperationalAddressChange = (state) => {
5248
+ handleChangeFor("operationalAddress")(state.data);
5249
+ form.setValid("operationalAddress", Boolean(state.isValid), "additionalInformation");
5250
+ };
5251
+ const handleOperationalAddressIsSameChange = useCallback(
5252
+ (isChecked) => {
5253
+ if (isChecked) {
5254
+ handleChangeFor("operationalAddressIsSame")(
5255
+ operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME
5256
+ );
5257
+ form.setValid("operationalAddress", true, "additionalInformation");
5258
+ } else {
5259
+ handleChangeFor("operationalAddressIsSame")(
5260
+ operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME
5261
+ );
5262
+ }
5263
+ },
5264
+ [form, handleChangeFor]
5265
+ );
5266
+ if (form.data?.additionalInformation?.operationalAddressIsSame === null) {
5267
+ handleOperationalAddressIsSameChange(true);
5268
+ }
5269
+ useEffect(() => {
5270
+ if (mustProvideOperationalAddress && form.data?.additionalInformation?.operationalAddressIsSame !== operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME) {
5271
+ handleOperationalAddressIsSameChange(false);
5272
+ }
5273
+ }, [
5274
+ handleOperationalAddressIsSameChange,
5275
+ mustProvideOperationalAddress,
5276
+ form.data?.additionalInformation?.operationalAddressIsSame
5277
+ ]);
5278
+ const formUtils = useMemo(() => {
5279
+ const initialProps = {
5280
+ data: form.data?.additionalInformation ?? {},
5281
+ fieldValidationErrors: validationErrors,
5282
+ formVerificationErrors: verificationErrors,
5283
+ allFields: form.allFields?.additionalInformation ?? [],
5284
+ requiredFields: form.requiredFields?.additionalInformation ?? [],
5285
+ optionalFields: form.optionalFields?.additionalInformation ?? [],
5286
+ trustedFields: form.trustedFields?.additionalInformation ?? [],
5287
+ obscuredFields: form.obscuredFields?.additionalInformation ?? [],
5288
+ errors: form.errors?.additionalInformation ?? {},
5289
+ valid: form.valid?.additionalInformation ?? {},
5290
+ handleFieldChange: handleChangeFor
5291
+ };
5292
+ const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
5293
+ switch (field) {
5294
+ case "hasDoingBusinessAs":
5295
+ return mergeFieldMetadataIntoProps(
5296
+ "hasDoingBusinessAs",
5297
+ doingBusinessAsAbsentFieldMetadata,
5298
+ acc
5299
+ );
5300
+ case "doingBusinessAs":
5301
+ return mergeFieldMetadataIntoProps("doingBusinessAs", doingBusinessAsFieldMetadata, acc);
5302
+ case "registrationNumber":
5303
+ return mergeFieldMetadataIntoProps(
5304
+ field,
5305
+ resolveFieldMetadata(
5306
+ registrationNumberDefaultFieldConfig[country],
5307
+ {
5308
+ companyType,
5309
+ registrationNumberType: form.data?.additionalInformation?.registrationNumberType,
5310
+ isExperimentEnabled
5311
+ },
5312
+ registrationNumberDefaultFieldMetadata
5313
+ ),
5314
+ acc
5315
+ );
5316
+ case "taxInformation":
5317
+ return mergeFieldMetadataIntoProps(
5318
+ field,
5319
+ resolveFieldMetadata(
5320
+ taxInformationDefaultFieldConfig[country],
5321
+ {
5322
+ taxIdNumberType: currentCountryTaxInformation?.type,
5323
+ companyType
5324
+ },
5325
+ taxInformationDefaultFieldMetadata
5326
+ ),
5327
+ acc
5328
+ );
5329
+ case "vatNumber":
5330
+ return mergeFieldMetadataIntoProps(
5331
+ field,
5332
+ resolveFieldMetadata(
5333
+ defaultFieldConfig$1[country],
5334
+ { vatNumberType: form.data?.additionalInformation?.vatNumberType },
5335
+ defaultFieldMetadata$1
5336
+ ),
5337
+ acc
5338
+ );
5339
+ case "vatAbsenceReason":
5340
+ return mergeFieldMetadataIntoProps("vatAbsenceReason", vatAbsenceReasonMetadata, acc);
5341
+ case "eInvoicingCode":
5342
+ return mergeFieldMetadataIntoProps("eInvoicingCode", eInvoicingCodeFieldMetadata, acc);
5343
+ case "industryCodes":
5344
+ return mergeFieldMetadataIntoProps("industryCodes", industryCodeFieldMetadata, acc);
5345
+ case "dateOfIncorporation":
5346
+ return mergeFieldMetadataIntoProps(
5347
+ "dateOfIncorporation",
5348
+ dateOfIncorporationFieldMetadata,
5349
+ acc
5350
+ );
5351
+ case "stockExchangeMIC":
5352
+ return mergeFieldMetadataIntoProps(
5353
+ "stockExchangeMIC",
5354
+ stockExchangeMICFieldMetadata,
5355
+ acc
5356
+ );
5357
+ case "stockISIN":
5358
+ return mergeFieldMetadataIntoProps("stockISIN", stockISINFieldMetadata, acc);
5359
+ case "stockTickerSymbol":
5360
+ return mergeFieldMetadataIntoProps(
5361
+ "stockTickerSymbol",
5362
+ stockTickerSymbolFieldMetadata,
5363
+ acc
5364
+ );
5365
+ case "legalForm":
5366
+ return mergeFieldMetadataIntoProps("legalForm", legalFormFieldMetadata, acc);
5367
+ default:
5368
+ return acc;
5369
+ }
5370
+ }, initialProps);
5371
+ return createFormUtils(formUtilProps ?? initialProps, t);
5372
+ }, [
5373
+ companyType,
5374
+ country,
5375
+ currentCountryTaxInformation?.type,
5376
+ form.allFields?.additionalInformation,
5377
+ form.data?.additionalInformation,
5378
+ form.errors?.additionalInformation,
5379
+ form.obscuredFields?.additionalInformation,
5380
+ form.optionalFields?.additionalInformation,
5381
+ form.requiredFields?.additionalInformation,
5382
+ form.trustedFields?.additionalInformation,
5383
+ form.valid?.additionalInformation,
5384
+ handleChangeFor,
5385
+ t,
5386
+ isExperimentEnabled,
5387
+ validationErrors,
5388
+ verificationErrors
5389
+ ]);
5390
+ const showField = (fieldKeys) => fieldKeys.some((field) => formUtils.isRequiredField(field) || formUtils.isOptionalField(field));
5391
+ const datasetUtils = datasetUtilities(i18n.language);
5392
+ const registrationAddressDescription = useMemo(() => {
5393
+ if (country) {
5394
+ return ["US", "NL", "CZ"].includes(country) ? t(($) => $["youBusinessOfficalAddressInTheCounty"], {
5395
+ ns: "business",
5396
+ country: datasetUtils.getCountryName(country)
5397
+ }) : t(($) => $["youBusinessOfficalAddressInCounty"], {
5398
+ ns: "business",
5399
+ country: datasetUtils.getCountryName(country)
5400
+ });
5401
+ }
5402
+ return t(($) => $["youBusinessOfficalAddress"], { ns: "business" });
5403
+ }, [country, datasetUtils, t]);
5404
+ return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-additional-information", children: [
5405
+ /* @__PURE__ */ jsx(
5406
+ Header,
5407
+ {
5408
+ title: t(($) => $[heading], { ns: "common" }),
5409
+ description: description ? t(($) => $[description], { ns: "common" }) : void 0
5410
+ }
5411
+ ),
5412
+ /* @__PURE__ */ jsx(
5413
+ ErrorPanel,
5414
+ {
5415
+ id: "ariaErrorField",
5416
+ verificationErrors,
5417
+ validationErrors,
5418
+ formUtils
5419
+ }
5420
+ ),
5421
+ /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__content", children: [
5422
+ showVerified && /* @__PURE__ */ jsxs("section", { children: [
5423
+ /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["verifiedInformation"], { ns: "business" }) }) }),
5424
+ /* @__PURE__ */ jsx(
5425
+ VerifiedBusinessCard,
5426
+ {
5427
+ verifiedBusiness: verifiedBusiness$1,
5428
+ verifiedAddress: verifiedAddress?.registrationAddress ?? verifiedAddress?.operationalAddress
5429
+ }
5430
+ )
5431
+ ] }),
5432
+ /* @__PURE__ */ jsxs("section", { children: [
5433
+ showVerified && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["otherBusinessInformation"], { ns: "business" }) }) }),
5434
+ /* @__PURE__ */ jsxs("fieldset", { children: [
5435
+ showField(LEGAL_FORM_FIELDS) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5436
+ LegalFormField,
5437
+ {
5438
+ name: "legalForm",
5439
+ countryCode: country,
5440
+ data: {
5441
+ legalForm: formUtils.getFieldData(
5442
+ form.data?.additionalInformation ?? {},
5443
+ LEGAL_FORM_FIELDS
5444
+ )?.legalForm
5445
+ },
5446
+ valid: formUtils.getFieldValid(
5447
+ form.valid?.additionalInformation ?? {},
5448
+ LEGAL_FORM_FIELDS
5449
+ ),
5450
+ errorMessage: form.errors.additionalInformation?.legalForm?.errorMessage,
5451
+ handleChangeFor,
5452
+ readonly: false,
5453
+ label: formUtils.getLabel("legalForm", "businessStructure")
5454
+ }
5455
+ ) }),
5456
+ showField(DBA_NAME_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5457
+ DBANameField,
5458
+ {
5459
+ data: formUtils.getFieldData(
5460
+ form.data?.additionalInformation ?? {},
5461
+ DBA_NAME_FIELD
5462
+ ),
5463
+ valid: formUtils.getFieldValid(
5464
+ form.valid?.additionalInformation ?? {},
5465
+ DBA_NAME_FIELD
5466
+ ),
5467
+ errors: formUtils.getFieldErrors(
5468
+ form.errors?.additionalInformation ?? {},
5469
+ validationErrors,
5470
+ DBA_NAME_FIELD
5471
+ ),
5472
+ labels: formUtils.getFieldLabels(DBA_NAME_FIELD, {
5473
+ hasDoingBusinessAs: "hasDba"
5474
+ }),
5475
+ readonly: formUtils.isReadOnly("doingBusinessAs"),
5476
+ handleChangeFor
5477
+ }
5478
+ ) }),
5479
+ showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5480
+ BusinessRegistrationNumberField,
5481
+ {
5482
+ data: formUtils.getFieldData(
5483
+ form.data?.additionalInformation ?? {},
5484
+ BUSINESS_REGISTRATION_NUMBER_FIELD
5485
+ ),
5486
+ valid: formUtils.getFieldValid(
5487
+ form.valid?.additionalInformation ?? {},
5488
+ BUSINESS_REGISTRATION_NUMBER_FIELD
5489
+ ),
5490
+ errors: formUtils.getFieldErrors(
5491
+ form.errors?.additionalInformation ?? {},
5492
+ validationErrors,
5493
+ BUSINESS_REGISTRATION_NUMBER_FIELD
5494
+ ),
5495
+ labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
5496
+ exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
5497
+ }),
5498
+ mask: formUtils.getMask("registrationNumber"),
5499
+ guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
5500
+ placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
5501
+ helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
5502
+ readonly: formUtils.isReadOnly("registrationNumber"),
5503
+ optional: formUtils.isOptionalField("registrationNumber"),
5504
+ shouldValidate,
5505
+ handleChangeFor,
5506
+ country,
5507
+ canExempt: showField(["exemptedFromRegistrationNumber"]),
5508
+ companyType
5509
+ }
5510
+ ) }),
5511
+ showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5512
+ TaxInformationField,
5513
+ {
5514
+ data: formUtils.getFieldData(
5515
+ form.data?.additionalInformation ?? {},
5516
+ TAX_INFORMATION_FIELD
5517
+ ),
5518
+ valid: formUtils.getFieldValid(
5519
+ form.valid?.additionalInformation ?? {},
5520
+ TAX_INFORMATION_FIELD
5521
+ ),
5522
+ errors: formUtils.getFieldErrors(
5523
+ form.errors?.additionalInformation ?? {},
5524
+ validationErrors,
5525
+ TAX_INFORMATION_FIELD
5526
+ ),
5527
+ labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
5528
+ exemptedFromTax: "iDontHaveATaxId"
5529
+ }),
5530
+ mask: formUtils.getMask("taxInformation"),
5531
+ guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
5532
+ readonly: formUtils.isReadOnly("taxInformation"),
5533
+ shouldValidate,
5534
+ handleChangeFor,
5535
+ canExempt: showField(["exemptedFromTax"]),
5536
+ country,
5537
+ entityType: companyType,
5538
+ defaultData: form.defaultData?.additionalInformation?.taxInformation,
5539
+ registrationNumber: form.data?.additionalInformation?.registrationNumber
5540
+ }
5541
+ ) }),
5542
+ showField(VAT_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5543
+ VatNumberField,
5544
+ {
5545
+ data: formUtils.getFieldData(
5546
+ form.data?.additionalInformation ?? {},
5547
+ VAT_NUMBER_FIELD
5548
+ ),
5549
+ valid: formUtils.getFieldValid(
5550
+ form.valid?.additionalInformation ?? {},
5551
+ VAT_NUMBER_FIELD
5552
+ ),
5553
+ errors: formUtils.getFieldErrors(
5554
+ form.errors?.additionalInformation ?? {},
5555
+ validationErrors,
5556
+ VAT_NUMBER_FIELD
5557
+ ),
5558
+ labels: formUtils.getFieldLabels(VAT_NUMBER_FIELD, {
5559
+ exemptedFromVat: "iDontHaveAVatNumber"
5560
+ }),
5561
+ mask: formUtils.getMask("vatNumber"),
5562
+ guidanceText: formUtils.getFieldGuidanceText(VAT_NUMBER_FIELD),
5563
+ placeholders: formUtils.getFieldPlaceholders(VAT_NUMBER_FIELD),
5564
+ readonly: formUtils.isReadOnly("vatNumber"),
5565
+ handleChangeFor,
5566
+ country,
5567
+ canExempt: showField(["exemptedFromVat"]),
5568
+ shouldValidate
5569
+ }
5570
+ ) }),
5571
+ formUtils.isRequiredField("eInvoicingCode", false) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5572
+ EInvoicingCodeField,
5573
+ {
5574
+ data: formUtils.getFieldData(
5575
+ form.data?.additionalInformation ?? {},
5576
+ EINVOICING_CODE_FIELD
5577
+ ),
5578
+ valid: formUtils.getFieldValid(
5579
+ form.valid?.additionalInformation ?? {},
5580
+ EINVOICING_CODE_FIELD
5581
+ ),
5582
+ errors: formUtils.getFieldErrors(
5583
+ form.errors?.additionalInformation ?? {},
5584
+ validationErrors,
5585
+ EINVOICING_CODE_FIELD
5586
+ ),
5587
+ labels: formUtils.getFieldLabels(EINVOICING_CODE_FIELD),
5588
+ placeholders: formUtils.getFieldPlaceholders(EINVOICING_CODE_FIELD),
5589
+ mask: formUtils.getMask("eInvoicingCode"),
5590
+ guidanceText: formUtils.getFieldGuidanceText(EINVOICING_CODE_FIELD),
5591
+ readonly: formUtils.isReadOnly("eInvoicingCode"),
5592
+ handleChangeFor
5593
+ }
5594
+ ) }),
5595
+ showField(INDUSTRY_CODE_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5596
+ IndustryCodeField,
5597
+ {
5598
+ data: formUtils.getFieldData(
5599
+ form.data?.additionalInformation ?? {},
5600
+ INDUSTRY_CODE_FIELD
5601
+ ),
5602
+ valid: formUtils.getFieldValid(
5603
+ form.valid?.additionalInformation ?? {},
5604
+ INDUSTRY_CODE_FIELD
5605
+ ),
5606
+ errors: formUtils.getFieldErrors(
5607
+ form.errors?.additionalInformation ?? {},
5608
+ validationErrors,
5609
+ INDUSTRY_CODE_FIELD
5610
+ ),
5611
+ labels: {
5612
+ industryCodes: t(($) => $["industry"], {
5613
+ ns: "businessLines"
5614
+ })
5615
+ },
5616
+ guidanceText: {
5617
+ industryCodes: t(($) => $["primaryIndustryCodeGuidance"], {
5618
+ ns: "businessLines"
5619
+ })
5620
+ },
5621
+ readonly: formUtils.isReadOnly("industryCodes"),
5622
+ handleChangeFor,
5623
+ businessLineTypes,
5624
+ single: true
5625
+ }
5626
+ ) }),
5627
+ showField(DATE_OF_INCORPORATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5628
+ DateOfIncorporationField,
5629
+ {
5630
+ data: formUtils.getFieldData(
5631
+ form.data?.additionalInformation ?? {},
5632
+ DATE_OF_INCORPORATION_FIELD
5633
+ ),
5634
+ valid: formUtils.getFieldValid(
5635
+ form.valid?.additionalInformation ?? {},
5636
+ DATE_OF_INCORPORATION_FIELD
5637
+ ),
5638
+ errors: formUtils.getFieldErrors(
5639
+ form.errors?.additionalInformation ?? {},
5640
+ validationErrors,
5641
+ DATE_OF_INCORPORATION_FIELD
5642
+ ),
5643
+ labels: formUtils.getFieldLabels(DATE_OF_INCORPORATION_FIELD),
5644
+ placeholders: formUtils.getFieldPlaceholders(DATE_OF_INCORPORATION_FIELD, {
5645
+ dateOfIncorporation: "datePlaceholder"
5646
+ }),
5647
+ readonly: formUtils.isReadOnly("dateOfIncorporation"),
5648
+ handleChangeFor
5649
+ }
5650
+ ) })
5651
+ ] })
5652
+ ] }),
5653
+ showStockData && /* @__PURE__ */ jsxs("section", { children: [
5654
+ /* @__PURE__ */ jsx("div", { className: "adyen-kyc-additional-information__section-heading", children: /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["stockExchangeInformation"], { ns: "business" }) }) }),
5655
+ /* @__PURE__ */ jsxs("fieldset", { children: [
5656
+ showField(STOCK_EXCHANGE_MIC_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5657
+ StockExchangeMICField,
5658
+ {
5659
+ data: formUtils.getFieldData(
5660
+ form.data?.additionalInformation ?? {},
5661
+ STOCK_EXCHANGE_MIC_FIELD
5662
+ ),
5663
+ valid: formUtils.getFieldValid(
5664
+ form.valid?.additionalInformation ?? {},
5665
+ STOCK_EXCHANGE_MIC_FIELD
5666
+ ),
5667
+ errors: formUtils.getFieldErrors(
5668
+ form.errors?.additionalInformation ?? {},
5669
+ validationErrors,
5670
+ STOCK_EXCHANGE_MIC_FIELD
5671
+ ),
5672
+ labels: formUtils.getFieldLabels(STOCK_EXCHANGE_MIC_FIELD),
5673
+ placeholders: formUtils.getFieldPlaceholders(STOCK_EXCHANGE_MIC_FIELD),
5674
+ mask: formUtils.getMask("stockExchangeMIC"),
5675
+ guidanceText: formUtils.getFieldGuidanceText(STOCK_EXCHANGE_MIC_FIELD),
5676
+ readonly: formUtils.isReadOnly("stockExchangeMIC"),
5677
+ shouldValidate,
5678
+ handleChangeFor
5679
+ }
5680
+ ) }),
5681
+ showField(STOCK_ISIN_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5682
+ StockISINField,
5683
+ {
5684
+ data: formUtils.getFieldData(
5685
+ form.data?.additionalInformation ?? {},
5686
+ STOCK_ISIN_FIELD
5687
+ ),
5688
+ valid: formUtils.getFieldValid(
5689
+ form.valid?.additionalInformation ?? {},
5690
+ STOCK_ISIN_FIELD
5691
+ ),
5692
+ errors: formUtils.getFieldErrors(
5693
+ form.errors?.additionalInformation ?? {},
5694
+ validationErrors,
5695
+ STOCK_ISIN_FIELD
5696
+ ),
5697
+ labels: formUtils.getFieldLabels(STOCK_ISIN_FIELD),
5698
+ placeholders: formUtils.getFieldPlaceholders(STOCK_ISIN_FIELD),
5699
+ mask: formUtils.getMask("stockISIN"),
5700
+ guidanceText: formUtils.getFieldGuidanceText(STOCK_ISIN_FIELD),
5701
+ readonly: formUtils.isReadOnly("stockISIN"),
5702
+ shouldValidate,
5703
+ handleChangeFor
5704
+ }
5705
+ ) }),
5706
+ showField(STOCK_TICKER_SYMBOL_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
5707
+ StockTickerSymbolField,
5708
+ {
5709
+ data: formUtils.getFieldData(
5710
+ form.data?.additionalInformation ?? {},
5711
+ STOCK_TICKER_SYMBOL_FIELD
5712
+ ),
5713
+ valid: formUtils.getFieldValid(
5714
+ form.valid?.additionalInformation ?? {},
5715
+ STOCK_TICKER_SYMBOL_FIELD
5716
+ ),
5717
+ errors: formUtils.getFieldErrors(
5718
+ form.errors?.additionalInformation ?? {},
5719
+ validationErrors,
5720
+ STOCK_TICKER_SYMBOL_FIELD
5721
+ ),
5722
+ labels: formUtils.getFieldLabels(STOCK_TICKER_SYMBOL_FIELD),
5723
+ placeholders: formUtils.getFieldPlaceholders(STOCK_TICKER_SYMBOL_FIELD),
5724
+ mask: formUtils.getMask("stockTickerSymbol"),
5725
+ guidanceText: formUtils.getFieldGuidanceText(STOCK_TICKER_SYMBOL_FIELD),
5726
+ readonly: formUtils.isReadOnly("stockTickerSymbol"),
5727
+ shouldValidate,
5728
+ handleChangeFor
5729
+ }
5730
+ ) })
5731
+ ] })
5732
+ ] }),
5733
+ /* @__PURE__ */ jsxs("section", { "data-testid": "registeredBusinessAddress", children: [
5734
+ /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
5735
+ /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["registeredBusinessAddress"], { ns: "business" }) }),
5736
+ /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: registrationAddressDescription })
5737
+ ] }),
5738
+ country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
5739
+ LazyJpAddress,
5740
+ {
5741
+ id: ADDITIONAL_INFORMATION_FORM_ID,
5742
+ addressType: "registrationAddress",
5743
+ data: { ...form.data.additionalInformation?.registrationAddress, country },
5744
+ shouldValidate,
5745
+ onChange: handleRegistrationAddressChange
5746
+ }
5747
+ ) }) : /* @__PURE__ */ jsx(
5748
+ Address,
5749
+ {
5750
+ id: ADDITIONAL_INFORMATION_FORM_ID,
5751
+ addressType: "registrationAddress",
5752
+ data: {
5753
+ ...form.data.additionalInformation?.registrationAddress,
5754
+ country
5755
+ },
5756
+ labels: getAddressSchemaLabelsByCountry(country),
5757
+ requiredFields: addressSchema,
5758
+ shouldValidate,
5759
+ hideCountry: true,
5760
+ optionalFields: ["otherAddressInformation"],
5761
+ readOnlyFields: verifiedBusiness$1?.state && verifiedBusiness$1?.state === form.data.basicInformation?.stateOrProvince ? ["stateOrProvince"] : [],
5762
+ trustedFields: getNestedTrustedFields(
5763
+ "registrationAddress",
5764
+ form.data.additionalInformation,
5765
+ form.trustedFields?.additionalInformation
5766
+ ),
5767
+ onChange: handleRegistrationAddressChange,
5768
+ verifiedBusiness: verifiedBusiness$1,
5769
+ verifiedAddress: verifiedAddress?.registrationAddress,
5770
+ condensed: true
5771
+ }
5772
+ )
5773
+ ] }),
5774
+ /* @__PURE__ */ jsxs("section", { "data-testid": "principalPlaceOfBusiness", children: [
5775
+ /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-additional-information__section-heading", children: [
5776
+ /* @__PURE__ */ jsx(Typography, { el: "h3", variant: "title", children: t(($) => $["principalPlaceOfBusiness"], { ns: "business" }) }),
5777
+ /* @__PURE__ */ jsx(Typography, { el: "p", variant: "body", children: t(($) => $["thePhysicalLocationWhereABusiness"], { ns: "business" }) })
5778
+ ] }),
5779
+ !mustProvideOperationalAddress && /* @__PURE__ */ jsx(
5780
+ Field,
5781
+ {
5782
+ el: "fieldset",
5783
+ name: "operationalAddressIsSame",
5784
+ errorMessage: form.errors?.additionalInformation?.operationalAddressIsSame?.errorMessage,
5785
+ isValid: form.valid?.additionalInformation?.operationalAddressIsSame,
5786
+ children: (childProps) => /* @__PURE__ */ jsx(
5787
+ Checkbox,
5788
+ {
5789
+ ...childProps,
5790
+ "aria-required": formUtils.isRequiredField("operationalAddressIsSame"),
5791
+ "aria-invalid": !form.valid?.additionalInformation?.operationalAddressIsSame,
5792
+ name: "operationalAddressIsSame",
5793
+ label: formUtils.getLabel("sameAsRegisteredAddress"),
5794
+ checked: form.data?.additionalInformation?.operationalAddressIsSame ? form.data?.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_SAME : true,
5795
+ onChange: handleOperationalAddressIsSameChange
5796
+ }
5797
+ )
5798
+ }
5799
+ ),
5800
+ form.data?.additionalInformation?.operationalAddressIsSame === operationalAddressIsSameIds.OPERATIONAL_ADDRESS_IS_NOT_SAME && (country === CountryCodes.Japan ? /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Loader, {}), children: /* @__PURE__ */ jsx(
5801
+ LazyJpAddress,
5802
+ {
5803
+ id: ADDITIONAL_INFORMATION_FORM_ID,
5804
+ addressType: "operationalAddress",
5805
+ data: { ...form.data.additionalInformation.operationalAddress, country },
5806
+ shouldValidate,
5807
+ onChange: handleOperationalAddressChange
5808
+ }
5809
+ ) }) : /* @__PURE__ */ jsx(
5810
+ Address,
5811
+ {
5812
+ id: ADDITIONAL_INFORMATION_FORM_ID,
5813
+ addressType: "operationalAddress",
5814
+ data: {
5815
+ ...form.defaultData?.additionalInformation?.operationalAddress,
5816
+ country
5817
+ },
5818
+ labels: getAddressSchemaLabelsByCountry(country),
5819
+ requiredFields: addressSchema,
5820
+ shouldValidate,
5821
+ hideCountry: true,
5822
+ optionalFields: ["otherAddressInformation"],
5823
+ trustedFields: getNestedTrustedFields(
5824
+ "operationalAddress",
5825
+ form.data?.additionalInformation,
5826
+ form.trustedFields?.additionalInformation
5827
+ ),
5828
+ onChange: handleOperationalAddressChange,
5829
+ verifiedBusiness: verifiedBusiness$1,
5830
+ verifiedAddress: verifiedAddress?.operationalAddress,
5831
+ condensed: true
5832
+ }
5833
+ ))
5834
+ ] })
5835
+ ] })
5836
+ ] });
5837
+ }
5838
+ [
5839
+ ...COUNTRY_FIELD,
5840
+ ...LEGAL_COMPANY_NAME_FIELD,
5841
+ "jaHaniLegalCompanyName",
5842
+ "jaKanaLegalCompanyName",
5843
+ ...TAX_INFORMATION_FIELD,
5844
+ ...STATE_FIELD,
5845
+ ...BUSINESS_REGISTRATION_NUMBER_FIELD,
5846
+ ...COUNTRY_OF_GOVERNING_LAW_FIELD
5847
+ ];
5848
+ const FormDescription = ({ description }) => {
5849
+ const { t } = useTranslation("common");
5850
+ return /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-form-header__description", children: [
5851
+ t(($) => $[description]),
5852
+ " ",
5853
+ /* @__PURE__ */ jsx(Link, { href: "https://www.adyen.com/privacy-policy", external: true, children: t(($) => $["privacyStatement"]) })
5854
+ ] });
5855
+ };
5856
+ function BasicInformationMultiform({
5857
+ id,
5858
+ country,
5859
+ shouldValidate,
5860
+ heading = "basicInformationFormHeading",
5861
+ description = "basicInformationFormDescription",
5862
+ validationErrors = {},
5863
+ verificationErrors = {},
5864
+ isTopLevelEntity,
5865
+ disableCountry,
5866
+ companyType
5867
+ }) {
5868
+ const { t } = useTranslation("common");
5869
+ const { isSettingEnabled } = useSettingsContext();
5870
+ const { isExperimentEnabled } = useExperimentsContext();
5871
+ const { form } = useFormContext();
5872
+ const allowedCountries = useAllowedCountries();
5873
+ const isAllowedEditPrefilledCountry = isSettingEnabled(SettingNames.AllowPrefilledCountryEdit);
5874
+ const state = form.data?.basicInformation?.stateOrProvince;
5875
+ const currentCountryTaxInformation = form.data?.basicInformation?.taxInformation?.find(
5876
+ (tax) => tax.country === country
5877
+ );
5878
+ const handleChangeFor = useCallback(
5879
+ (fieldName, mode) => form.handleChangeFor(fieldName, "basicInformation", mode),
5880
+ [form]
5881
+ );
5882
+ const formUtils = useMemo(() => {
5883
+ const initialProps = {
5884
+ data: form.data?.basicInformation ?? {},
5885
+ fieldValidationErrors: validationErrors,
5886
+ formVerificationErrors: verificationErrors,
5887
+ allFields: form.allFields?.basicInformation ?? [],
5888
+ requiredFields: form.requiredFields?.basicInformation ?? [],
5889
+ optionalFields: form.optionalFields?.basicInformation ?? [],
5890
+ trustedFields: form.trustedFields?.basicInformation ?? [],
5891
+ obscuredFields: form.obscuredFields?.basicInformation ?? [],
5892
+ errors: form.errors?.basicInformation ?? {},
5893
+ valid: form.valid?.basicInformation ?? {},
5894
+ handleFieldChange: handleChangeFor
5895
+ };
5896
+ const formUtilProps = initialProps.allFields?.reduce((acc, field) => {
5897
+ switch (field) {
5898
+ case "country":
5899
+ return acc;
5900
+ case "legalCompanyName":
5901
+ return mergeFieldMetadataIntoProps(
5902
+ field,
5903
+ resolveFieldMetadata(
5904
+ isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
5905
+ { isBusiness: true },
5906
+ isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
5907
+ ),
5908
+ acc
5909
+ );
5910
+ case "countryOfGoverningLaw":
5911
+ return acc;
5912
+ case "stateOrProvince":
5913
+ return mergeFieldMetadataIntoProps(
5914
+ field,
5915
+ resolveFieldMetadata(
5916
+ defaultFieldConfig[country],
5917
+ { isBusiness: true },
5918
+ defaultFieldMetadata
5919
+ ),
5920
+ acc
5921
+ );
5922
+ case "taxInformation":
5923
+ return mergeFieldMetadataIntoProps(
5924
+ field,
5925
+ resolveFieldMetadata(
5926
+ taxInformationDefaultFieldConfig[country],
5927
+ {
5928
+ taxIdNumberType: currentCountryTaxInformation?.type,
5929
+ companyType
5930
+ },
5931
+ taxInformationDefaultFieldMetadata
5932
+ ),
5933
+ acc
5934
+ );
5935
+ case "registrationNumber":
5936
+ return mergeFieldMetadataIntoProps(
5937
+ field,
5938
+ resolveFieldMetadata(
5939
+ registrationNumberDefaultFieldConfig[country],
5940
+ {
5941
+ companyType,
5942
+ registrationNumberType: form.data?.additionalInformation?.registrationNumberType,
5943
+ state,
5944
+ isExperimentEnabled
5945
+ },
5946
+ registrationNumberDefaultFieldMetadata
5947
+ ),
5948
+ acc
5949
+ );
5950
+ case "jaHaniLegalCompanyName":
5951
+ return mergeFieldMetadataIntoProps(
5952
+ field,
5953
+ resolveFieldMetadata(
5954
+ localizedLegalCompanyNameFieldConfig.jaHaniLegalCompanyName.config,
5955
+ {},
5956
+ localizedLegalCompanyNameFieldConfig.jaHaniLegalCompanyName.metadata
5957
+ ),
5958
+ acc
5959
+ );
5960
+ case "jaKanaLegalCompanyName":
5961
+ return mergeFieldMetadataIntoProps(
5962
+ field,
5963
+ resolveFieldMetadata(
5964
+ localizedLegalCompanyNameFieldConfig.jaKanaLegalCompanyName.config,
5965
+ {},
5966
+ localizedLegalCompanyNameFieldConfig.jaKanaLegalCompanyName.metadata
5967
+ ),
5968
+ acc
5969
+ );
5970
+ default:
5971
+ return acc;
5972
+ }
5973
+ }, initialProps);
5974
+ return createFormUtils(formUtilProps ?? initialProps, t);
5975
+ }, [
5976
+ companyType,
5977
+ country,
5978
+ currentCountryTaxInformation?.type,
5979
+ form.allFields?.basicInformation,
5980
+ form.data?.additionalInformation?.registrationNumberType,
5981
+ form.data?.basicInformation,
5982
+ form.errors?.basicInformation,
5983
+ form.obscuredFields?.basicInformation,
5984
+ form.optionalFields?.basicInformation,
5985
+ form.requiredFields?.basicInformation,
5986
+ form.trustedFields?.basicInformation,
5987
+ form.valid?.basicInformation,
5988
+ handleChangeFor,
5989
+ isExperimentEnabled,
5990
+ state,
5991
+ t,
5992
+ validationErrors,
5993
+ verificationErrors
5994
+ ]);
5995
+ const showField = (fieldKeys) => fieldKeys.some((field) => {
5996
+ switch (field) {
5997
+ case "registrationNumberType":
5998
+ case "registrationNumber": {
5999
+ return (formUtils.isRequiredField(field) || formUtils.isOptionalField(field)) && form.data.basicInformation?.stateOrProvince;
6000
+ }
6001
+ default:
6002
+ return formUtils.isRequiredField(field) || formUtils.isOptionalField(field);
6003
+ }
6004
+ });
6005
+ const legalCompanyNameFields = useLegalCompanyNameField({
6006
+ data: form.data.basicInformation ?? {},
6007
+ valid: form.valid.basicInformation ?? {},
6008
+ errors: form.errors.basicInformation ?? {},
6009
+ fieldProblems: form.fieldProblems.basicInformation ?? {},
6010
+ country,
6011
+ formUtils,
6012
+ handleChange: handleChangeFor
6013
+ });
6014
+ return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-basic-information", children: [
6015
+ /* @__PURE__ */ jsx(Header, { title: t(($) => $[heading]), children: /* @__PURE__ */ jsx(FormDescription, { slot: "description", description }) }),
6016
+ /* @__PURE__ */ jsx(
6017
+ ErrorPanel,
6018
+ {
6019
+ id: "ariaErrorField",
6020
+ verificationErrors,
6021
+ validationErrors,
6022
+ formUtils
6023
+ }
6024
+ ),
6025
+ /* @__PURE__ */ jsx("fieldset", { children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
6026
+ CountryField,
6027
+ {
6028
+ data: formUtils.getFieldData(form.data?.basicInformation ?? {}, COUNTRY_FIELD),
6029
+ valid: formUtils.getFieldValid(form.valid?.basicInformation ?? {}, COUNTRY_FIELD),
6030
+ errors: formUtils.getFieldErrors(
6031
+ form.errors?.basicInformation ?? {},
6032
+ validationErrors,
6033
+ COUNTRY_FIELD
6034
+ ),
6035
+ labels: formUtils.getFieldLabels(COUNTRY_FIELD, {
6036
+ country: "countryRegionOfEstablishment"
6037
+ }),
6038
+ readonly: formUtils.isReadOnly("country") || !isAllowedEditPrefilledCountry || Boolean(disableCountry),
6039
+ handleChangeFor,
6040
+ allowedCountries: isTopLevelEntity ? allowedCountries : void 0
6041
+ }
6042
+ ) }) }),
6043
+ /* @__PURE__ */ jsxs("fieldset", { children: [
6044
+ COUNTRY_OF_GOVERNING_LAW_POSSIBLE.includes(country) && showField(COUNTRY_OF_GOVERNING_LAW_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
6045
+ CountryOfGoverningLawField,
6046
+ {
6047
+ data: formUtils.getFieldData(
6048
+ form.data?.basicInformation ?? {},
6049
+ COUNTRY_OF_GOVERNING_LAW_FIELD
6050
+ ),
6051
+ country,
6052
+ valid: formUtils.getFieldValid(
6053
+ form.valid?.basicInformation ?? {},
6054
+ COUNTRY_OF_GOVERNING_LAW_FIELD
6055
+ ),
6056
+ errors: formUtils.getFieldErrors(
6057
+ form.errors?.basicInformation ?? {},
6058
+ validationErrors,
6059
+ COUNTRY_OF_GOVERNING_LAW_FIELD
6060
+ ),
6061
+ labels: formUtils.getFieldLabels(COUNTRY_OF_GOVERNING_LAW_FIELD),
6062
+ readonly: false,
6063
+ allowedCountries: isTopLevelEntity ? allowedCountries : void 0,
6064
+ handleChangeFor
6065
+ }
6066
+ ) }),
6067
+ // fields shown here are abstracted by useLegalCompanyNameField
6068
+ legalCompanyNameFields.map((field) => /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
6069
+ Field,
6070
+ {
6071
+ name: field?.name ?? "",
6072
+ label: field?.label,
6073
+ helper: field?.helper,
6074
+ errorMessage: field?.errorMessage,
6075
+ isValid: Boolean(field?.isValid),
6076
+ children: (childProps) => /* @__PURE__ */ jsx(
6077
+ InputText,
6078
+ {
6079
+ ...childProps,
6080
+ "aria-required": true,
6081
+ "aria-invalid": !field?.isValid,
6082
+ name: field?.name,
6083
+ value: field?.value,
6084
+ readonly: field?.readonly,
6085
+ onInput: field ? field.onInput : () => {
6086
+ },
6087
+ transformInput: field?.transformInput,
6088
+ transformMode: field?.transformMode,
6089
+ onBlur: field?.onBlur,
6090
+ onKeyDown: field?.onKeyDown
6091
+ }
6092
+ )
6093
+ },
6094
+ field?.name
6095
+ ) }, field?.name)),
6096
+ showField(TAX_INFORMATION_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
6097
+ TaxInformationField,
6098
+ {
6099
+ data: formUtils.getFieldData(
6100
+ form.data?.basicInformation ?? {},
6101
+ TAX_INFORMATION_FIELD
6102
+ ),
6103
+ valid: formUtils.getFieldValid(
6104
+ form.valid?.basicInformation ?? {},
6105
+ TAX_INFORMATION_FIELD
6106
+ ),
6107
+ errors: formUtils.getFieldErrors(
6108
+ form.errors?.basicInformation ?? {},
6109
+ validationErrors,
6110
+ TAX_INFORMATION_FIELD
6111
+ ),
6112
+ labels: formUtils.getFieldLabels(TAX_INFORMATION_FIELD, {
6113
+ exemptedFromTax: "iDontHaveATaxId"
6114
+ }),
6115
+ mask: formUtils.getMask("taxInformation"),
6116
+ placeholders: formUtils.getFieldPlaceholders(TAX_INFORMATION_FIELD),
6117
+ guidanceText: formUtils.getFieldGuidanceText(TAX_INFORMATION_FIELD),
6118
+ readonly: formUtils.isReadOnly("taxInformation"),
6119
+ shouldValidate,
6120
+ handleChangeFor,
6121
+ canExempt: showField(["exemptedFromTax"]),
6122
+ registrationNumber: form.data.additionalInformation?.registrationNumber,
6123
+ country,
6124
+ entityType: companyType,
6125
+ defaultData: form.defaultData?.basicInformation?.taxInformation
6126
+ }
6127
+ ) }),
6128
+ showField(STATE_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
6129
+ StateField,
6130
+ {
6131
+ data: formUtils.getFieldData(form.data?.basicInformation ?? {}, STATE_FIELD),
6132
+ valid: formUtils.getFieldValid(form.valid?.basicInformation ?? {}, STATE_FIELD),
6133
+ errors: formUtils.getFieldErrors(
6134
+ form.errors?.basicInformation ?? {},
6135
+ validationErrors,
6136
+ STATE_FIELD
6137
+ ),
6138
+ labels: formUtils.getFieldLabels(STATE_FIELD),
6139
+ placeholders: formUtils.getFieldPlaceholders(STATE_FIELD),
6140
+ readonly: formUtils.isReadOnly("stateOrProvince"),
6141
+ handleChangeFor,
6142
+ selectedCountry: country
6143
+ }
6144
+ ) }),
6145
+ showField(BUSINESS_REGISTRATION_NUMBER_FIELD) && /* @__PURE__ */ jsx("div", { className: "adyen-kyc-field-wrapper", children: /* @__PURE__ */ jsx(
6146
+ BusinessRegistrationNumberField,
6147
+ {
6148
+ data: formUtils.getFieldData(
6149
+ form.data?.basicInformation ?? {},
6150
+ BUSINESS_REGISTRATION_NUMBER_FIELD
6151
+ ),
6152
+ valid: formUtils.getFieldValid(
6153
+ form.valid?.basicInformation ?? {},
6154
+ BUSINESS_REGISTRATION_NUMBER_FIELD
6155
+ ),
6156
+ errors: formUtils.getFieldErrors(
6157
+ form.errors?.basicInformation ?? {},
6158
+ validationErrors,
6159
+ BUSINESS_REGISTRATION_NUMBER_FIELD
6160
+ ),
6161
+ labels: formUtils.getFieldLabels(BUSINESS_REGISTRATION_NUMBER_FIELD, {
6162
+ exemptedFromRegistrationNumber: "iDontHaveARegistrationNumber"
6163
+ }),
6164
+ mask: formUtils.getMask("registrationNumber"),
6165
+ guidanceText: formUtils.getFieldGuidanceText(BUSINESS_REGISTRATION_NUMBER_FIELD),
6166
+ placeholders: formUtils.getFieldPlaceholders(BUSINESS_REGISTRATION_NUMBER_FIELD),
6167
+ helperText: formUtils.getFieldHelperText(BUSINESS_REGISTRATION_NUMBER_FIELD),
6168
+ readonly: formUtils.isReadOnly("registrationNumber"),
6169
+ optional: formUtils.isOptionalField("registrationNumber"),
6170
+ shouldValidate,
6171
+ handleChangeFor,
6172
+ country,
6173
+ canExempt: showField(["exemptedFromRegistrationNumber"]),
6174
+ companyType
6175
+ }
6176
+ ) })
6177
+ ] })
6178
+ ] });
6179
+ }
6180
+ function CompanyStructureMultiform({
6181
+ id,
6182
+ country,
6183
+ heading = "companyStructureFormName",
6184
+ description = "companyStructureFormDescription",
6185
+ validationErrors = {},
6186
+ verificationErrors = {}
6187
+ }) {
6188
+ const { t } = useTranslation(["common", "business"]);
6189
+ const { form } = useFormContext();
6190
+ const { accountHolder } = useAccountHolder();
6191
+ const { isSettingEnabled } = useSettingsContext();
6192
+ const canChangeEntityType = isSettingEnabled(SettingNames.AllowLegalEntityTypeChange);
6193
+ const formUtils = createFormUtils(
6194
+ { requiredFields: form.requiredFields?.companyStructure ?? [] },
6195
+ t
6196
+ );
6197
+ const excludedTypes = [
6198
+ CompanyTypesValues.INCORPORATED_PARTNERSHIP,
6199
+ CompanyTypesValues.INCORPORATED_ASSOCIATION
6200
+ ];
6201
+ if (isBankAccountRequestedForOrganization.value) {
6202
+ excludedTypes.push(CompanyTypesValues.GOVERNMENTAL_ORGANIZATION);
6203
+ }
6204
+ const companyTypeRadioOptions = canChangeEntityType && accountHolder !== "aTrust" && accountHolder !== "anUnincorporatedPartnership" ? companyTypeOptions.filter((companyType) => !excludedTypes.includes(companyType)) : companyTypeOptions;
6205
+ const companyTypeExamples2 = useCompanyTypeExamples(country);
6206
+ return /* @__PURE__ */ jsxs("form", { id, className: "adyen-kyc-company-structure", children: [
6207
+ /* @__PURE__ */ jsx(Header, { title: t(($) => $[heading]), description: t(($) => $[description]) }),
6208
+ /* @__PURE__ */ jsx(
6209
+ ErrorPanel,
6210
+ {
6211
+ id: "ariaErrorField",
6212
+ verificationErrors,
6213
+ validationErrors,
6214
+ formUtils
6215
+ }
6216
+ ),
6217
+ /* @__PURE__ */ jsx(
6218
+ Field,
6219
+ {
6220
+ el: "fieldset",
6221
+ name: "entityType",
6222
+ errorMessage: formUtils.getErrorMessage(
6223
+ "entityType",
6224
+ form.errors?.companyStructure,
6225
+ validationErrors
6226
+ ),
6227
+ isValid: form.valid?.companyStructure?.entityType,
6228
+ children: (childProps) => /* @__PURE__ */ jsx(
6229
+ EntityTypeRadioGroupCard,
6230
+ {
6231
+ ...childProps,
6232
+ name: "entityType",
6233
+ options: companyTypeRadioOptions,
6234
+ optionId: (option) => companyTypeMetadata[option].id,
6235
+ optionName: (option) => t(($) => $[companyTypeMetadata[option].name], { ns: "business" }),
6236
+ optionDescription: (option) => t(($) => $[companyTypeMetadata[option].description], { ns: "business" }),
6237
+ selected: form.data?.companyStructure?.entityType,
6238
+ onSelect: form.handleChangeFor("entityType", "companyStructure"),
6239
+ examples: companyTypeExamples2,
6240
+ "aria-required": true,
6241
+ "aria-invalid": !form.valid?.companyStructure?.entityType
6242
+ }
6243
+ )
6244
+ }
6245
+ )
6246
+ ] });
6247
+ }
6248
+ function BusinessDetailsMultiform({
6249
+ taskType,
6250
+ country,
6251
+ activeForm,
6252
+ shouldValidate,
6253
+ problems = {},
6254
+ handleNextClick,
6255
+ handleBackClick,
6256
+ setLoadingStatus,
6257
+ isTopLevelEntity
6258
+ }) {
6259
+ const { t } = useTranslation(["common", "business"]);
6260
+ const { form } = useFormContext();
6261
+ const companyType = taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY ? CompanyTypesValues.SOLE_PROPRIETORSHIP : form.data.companyStructure?.entityType;
6262
+ function handleChange(formName, fieldName, mode) {
6263
+ return form.handleChangeFor(fieldName, formName, mode);
6264
+ }
6265
+ const renderActiveForm = (activeForm2) => {
6266
+ switch (activeForm2.formId) {
6267
+ case "basicInformation":
6268
+ return /* @__PURE__ */ jsx(
6269
+ BasicInformationMultiform,
6270
+ {
6271
+ id: activeForm2.formId,
6272
+ country,
6273
+ shouldValidate,
6274
+ heading: activeForm2.formHeading,
6275
+ description: activeForm2.formDescription,
6276
+ validationErrors: problems.validationErrors?.[activeForm2.formId],
6277
+ verificationErrors: problems.verificationErrors?.[activeForm2.formId],
6278
+ companyType,
6279
+ isTopLevelEntity,
6280
+ disableCountry: taskType === TaskTypes.SOLE_PROPRIETOR_COMPANY
6281
+ }
6282
+ );
6283
+ case "businessSelection":
6284
+ return /* @__PURE__ */ jsx(
6285
+ BusinessSelectionMultiform,
6286
+ {
6287
+ id: activeForm2.formId,
6288
+ country,
6289
+ shouldValidate,
6290
+ heading: activeForm2.formHeading,
6291
+ description: activeForm2.formDescription,
6292
+ validationErrors: problems.validationErrors?.[activeForm2.formId],
6293
+ verificationErrors: problems.verificationErrors?.[activeForm2.formId],
6294
+ handleNextClick,
6295
+ handleBackClick,
6296
+ setLoadingStatus
6297
+ }
6298
+ );
6299
+ case "companyStructure":
6300
+ return /* @__PURE__ */ jsx(
6301
+ CompanyStructureMultiform,
6302
+ {
6303
+ id: activeForm2.formId,
6304
+ country,
6305
+ shouldValidate,
6306
+ heading: activeForm2.formHeading,
6307
+ description: activeForm2.formDescription,
6308
+ validationErrors: problems.validationErrors?.[activeForm2.formId],
6309
+ verificationErrors: problems.verificationErrors?.[activeForm2.formId]
6310
+ }
6311
+ );
6312
+ case "additionalInformation":
6313
+ return /* @__PURE__ */ jsx(
6314
+ AdditionalInformationMultiform,
6315
+ {
6316
+ id: activeForm2.formId,
6317
+ country,
6318
+ companyType,
6319
+ shouldValidate,
6320
+ heading: activeForm2.formHeading,
6321
+ description: activeForm2.formDescription,
6322
+ validationErrors: problems.validationErrors?.[activeForm2.formId],
6323
+ verificationErrors: problems.verificationErrors?.[activeForm2.formId]
6324
+ }
6325
+ );
6326
+ case "companyTaxDocument":
6327
+ return country === "US" ? /* @__PURE__ */ jsx(
6328
+ TaxDocument,
6329
+ {
6330
+ id: activeForm2.formId,
6331
+ country,
6332
+ companyType,
6333
+ shouldValidate,
6334
+ heading: activeForm2.formHeading,
6335
+ description: activeForm2.formDescription,
6336
+ fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
6337
+ formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
6338
+ data: form.data.companyTaxDocument,
6339
+ errors: form.errors.companyTaxDocument,
6340
+ valid: form.valid.companyTaxDocument,
6341
+ allFields: form.allFields?.companyTaxDocument,
6342
+ requiredFields: form.requiredFields?.companyTaxDocument,
6343
+ optionalFields: form.optionalFields?.companyTaxDocument,
6344
+ trustedFields: form.trustedFields?.companyTaxDocument,
6345
+ handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument")
6346
+ }
6347
+ ) : /* @__PURE__ */ jsx(
6348
+ MemoizedDocumentUpload,
6349
+ {
6350
+ id: activeForm2.formId,
6351
+ country,
6352
+ companyType,
6353
+ shouldValidate,
6354
+ heading: activeForm2.formHeading,
6355
+ description: activeForm2.formDescription,
6356
+ fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
6357
+ formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {},
6358
+ data: form.data.companyTaxDocument,
6359
+ errors: form.errors.companyTaxDocument,
6360
+ valid: form.valid.companyTaxDocument,
6361
+ allFields: form.allFields?.companyTaxDocument,
6362
+ requiredFields: form.requiredFields?.companyTaxDocument,
6363
+ optionalFields: form.optionalFields?.companyTaxDocument,
6364
+ trustedFields: form.trustedFields?.companyTaxDocument,
6365
+ handleFieldChange: () => handleChange("companyTaxDocument", "taxDocument"),
6366
+ documentField: "taxDocument",
6367
+ documentType: "vatDocument",
6368
+ hidePageCount: true,
6369
+ guidanceContent: /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-u-margin-bottom-24", children: [
6370
+ /* @__PURE__ */ jsxs("div", { className: "adyen-kyc-upload-field__subtitle", children: [
6371
+ " ",
6372
+ t(($) => $["requirements"], { ns: "common" })
6373
+ ] }),
6374
+ /* @__PURE__ */ jsxs("ul", { children: [
6375
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["containsNameOfCompany"], { ns: "business" }) }),
6376
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["documentShowsTaxIdOfCompany"], { ns: "business" }) }),
6377
+ /* @__PURE__ */ jsx("li", { children: t(($) => $["issuedByTheTaxAuthority"], { ns: "business" }) })
6378
+ ] })
6379
+ ] })
6380
+ }
6381
+ );
6382
+ case "companyRegistrationDocument":
6383
+ return /* @__PURE__ */ jsx(
6384
+ RegistrationDocument,
6385
+ {
6386
+ id: activeForm2.formId,
6387
+ heading: activeForm2.formHeading,
6388
+ description: activeForm2.formDescription,
6389
+ country,
6390
+ companyType,
6391
+ data: form.data.companyRegistrationDocument,
6392
+ errors: form.errors.companyRegistrationDocument,
6393
+ valid: form.valid.companyRegistrationDocument,
6394
+ allFields: form.allFields?.companyRegistrationDocument,
6395
+ requiredFields: form.requiredFields?.companyRegistrationDocument,
6396
+ optionalFields: form.optionalFields?.companyRegistrationDocument,
6397
+ trustedFields: form.trustedFields?.companyRegistrationDocument,
6398
+ handleFieldChange: () => handleChange("companyRegistrationDocument", "registrationDocument"),
6399
+ shouldValidate,
6400
+ fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
6401
+ formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
6402
+ }
6403
+ );
6404
+ case "companyProofOfDirectorDocument":
6405
+ return /* @__PURE__ */ jsx(
6406
+ ProofOfDirectorDocument,
6407
+ {
6408
+ id: activeForm2.formId,
6409
+ heading: activeForm2.formHeading,
6410
+ description: activeForm2.formDescription,
6411
+ country,
6412
+ data: form.data?.companyProofOfDirectorDocument,
6413
+ errors: form.errors.companyProofOfDirectorDocument,
6414
+ valid: form.valid.companyProofOfDirectorDocument,
6415
+ allFields: form.allFields?.companyProofOfDirectorDocument,
6416
+ requiredFields: form.requiredFields?.companyProofOfDirectorDocument,
6417
+ optionalFields: form.optionalFields?.companyProofOfDirectorDocument,
6418
+ trustedFields: form.trustedFields?.companyProofOfDirectorDocument,
6419
+ handleFieldChange: () => handleChange("companyProofOfDirectorDocument", "proofOfDirector"),
6420
+ shouldValidate,
6421
+ fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
6422
+ formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
6423
+ }
6424
+ );
6425
+ case "companyProofOfSignatoryDocument":
6426
+ return /* @__PURE__ */ jsx(
6427
+ ProofOfSignatoryDocument,
6428
+ {
6429
+ id: activeForm2.formId,
6430
+ heading: activeForm2.formHeading,
6431
+ description: activeForm2.formDescription,
6432
+ country,
6433
+ data: form.data?.companyProofOfSignatoryDocument,
6434
+ errors: form.errors.companyProofOfSignatoryDocument,
6435
+ valid: form.valid.companyProofOfSignatoryDocument,
6436
+ allFields: form.allFields?.companyProofOfSignatoryDocument,
6437
+ requiredFields: form.requiredFields?.companyProofOfSignatoryDocument,
6438
+ optionalFields: form.optionalFields?.companyProofOfSignatoryDocument,
6439
+ trustedFields: form.trustedFields?.companyProofOfSignatoryDocument,
6440
+ handleFieldChange: () => handleChange("companyProofOfSignatoryDocument", "proofOfSignatory"),
6441
+ shouldValidate,
6442
+ fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
6443
+ formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
6444
+ }
6445
+ );
6446
+ case "companyProofOfOwnershipDocument":
6447
+ return /* @__PURE__ */ jsx(
6448
+ ProofOfOwnershipDocument,
6449
+ {
6450
+ id: activeForm2.formId,
6451
+ heading: activeForm2.formHeading,
6452
+ description: activeForm2.formDescription,
6453
+ country,
6454
+ data: form.data?.companyProofOfOwnershipDocument,
6455
+ errors: form.errors.companyProofOfOwnershipDocument,
6456
+ valid: form.valid.companyProofOfOwnershipDocument,
6457
+ allFields: form.allFields?.companyProofOfOwnershipDocument,
6458
+ requiredFields: form.requiredFields?.companyProofOfOwnershipDocument,
6459
+ optionalFields: form.optionalFields?.companyProofOfOwnershipDocument,
6460
+ trustedFields: form.trustedFields?.companyProofOfOwnershipDocument,
6461
+ handleFieldChange: () => handleChange("companyProofOfOwnershipDocument", "proofOfOwnership"),
6462
+ shouldValidate,
6463
+ fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
6464
+ formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
6465
+ }
6466
+ );
6467
+ case "companyConstitutionalDocument":
6468
+ return /* @__PURE__ */ jsx(
6469
+ MemoizedConstitutionalDocument,
6470
+ {
6471
+ id: activeForm2.formId,
6472
+ legalEntityType: LegalEntityTypes.SOLE_PROPRIETORSHIP,
6473
+ country,
6474
+ data: form.data?.companyConstitutionalDocument,
6475
+ errors: form.errors.companyConstitutionalDocument,
6476
+ valid: form.valid.companyConstitutionalDocument,
6477
+ allFields: form.allFields?.companyConstitutionalDocument,
6478
+ requiredFields: form.requiredFields?.companyConstitutionalDocument,
6479
+ optionalFields: form.optionalFields?.companyConstitutionalDocument,
6480
+ trustedFields: form.trustedFields?.companyConstitutionalDocument,
6481
+ handleFieldChange: () => handleChange("companyConstitutionalDocument", "constitutionalDocument"),
6482
+ shouldValidate,
6483
+ fieldValidationErrors: problems.validationErrors?.[activeForm2.formId] ?? {},
6484
+ formVerificationErrors: problems.verificationErrors?.[activeForm2.formId] ?? {}
6485
+ }
6486
+ );
6487
+ case "companyFinancialInformation":
6488
+ return /* @__PURE__ */ jsx(
6489
+ FinancialInformation,
6490
+ {
6491
+ multiForm: form,
6492
+ id: activeForm2.formId,
6493
+ country,
6494
+ heading: t(($) => $[activeForm2.formHeading]),
6495
+ description: activeForm2.formDescription,
6496
+ data: form.data?.companyFinancialInformation,
6497
+ allFields: form.allFields?.companyFinancialInformation,
6498
+ requiredFields: form.requiredFields?.companyFinancialInformation,
6499
+ optionalFields: form.optionalFields?.companyFinancialInformation,
6500
+ trustedFields: form.trustedFields?.companyFinancialInformation,
6501
+ shouldValidate
6502
+ }
6503
+ );
6504
+ default:
6505
+ return null;
6506
+ }
6507
+ };
6508
+ return /* @__PURE__ */ jsx("div", { className: "adyen-kyc-business-details", children: /* @__PURE__ */ jsx("div", { className: "adyen-kyc-form-wrapper", children: renderActiveForm(activeForm) }) });
6509
+ }
6510
+ function buildRequiredForms({
6511
+ config: { country, forms, requiredFields, optionalFields, isValid, problems },
6512
+ options
6513
+ }) {
6514
+ const usesBusinessSelection = COUNTRIES_USING_COMPANY_SEARCH.includes(country);
6515
+ const filteredForms = Object.values(forms).filter(({ formId }) => {
6516
+ if (usesBusinessSelection) {
6517
+ if (formId === "businessSelection" && (options?.hasNoSearchResults || isVerifiedSingleCompanySearchResult.value))
6518
+ return false;
6519
+ if (formId === "companyStructure" && verifiedBusiness.value?.legalForm) return false;
6520
+ }
6521
+ if (requiredFields || optionalFields) {
6522
+ return Boolean(requiredFields?.[formId]) || Boolean(optionalFields?.[formId]);
6523
+ }
6524
+ return true;
6525
+ });
6526
+ const requiredForms = options?.skipSummary ? filteredForms : [...filteredForms, summaryStep];
6527
+ return addValidityToForms(requiredForms, isValid, problems);
6528
+ }
6529
+ function basicInformationValidators({
6530
+ country,
6531
+ taxIdNumberType,
6532
+ companyType,
6533
+ registrationNumberType,
6534
+ state,
6535
+ isExperimentEnabled
6536
+ }) {
6537
+ return {
6538
+ country: CountryFieldValidation().country,
6539
+ countryOfGoverningLaw: CountryOfGoverningLawFieldValidation().countryOfGoverningLaw,
6540
+ legalCompanyName: resolveFieldMetadata(
6541
+ isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldConfigV4[country] : defaultFieldConfig$2[country],
6542
+ { isBusiness: true },
6543
+ isExperimentEnabled("StrictNameAndAddressValidationV4") ? defaultFieldMetadataV4 : defaultFieldMetadata$2
6544
+ )?.validators,
6545
+ taxInformation: resolveFieldMetadata(
6546
+ taxInformationDefaultFieldConfig[country],
6547
+ {
6548
+ taxIdNumberType,
6549
+ companyType
6550
+ },
6551
+ taxInformationDefaultFieldMetadata
6552
+ )?.validators,
6553
+ stateOrProvince: resolveFieldMetadata(
6554
+ defaultFieldConfig[country],
6555
+ { isBusiness: true },
6556
+ defaultFieldMetadata
6557
+ )?.validators,
6558
+ registrationNumber: resolveFieldMetadata(
6559
+ registrationNumberDefaultFieldConfig[country],
6560
+ {
6561
+ companyType,
6562
+ registrationNumberType,
6563
+ state,
6564
+ isExperimentEnabled
6565
+ },
6566
+ registrationNumberDefaultFieldMetadata
6567
+ )?.validators
6568
+ };
6569
+ }
6570
+ function businessSelectionValidators() {
6571
+ return {
6572
+ hasSelectedBusiness: {
6573
+ modes: ["blur", "input"],
6574
+ validate: (value) => typeof value === "boolean",
6575
+ // indicates a selection was made
6576
+ errorMessage: "fieldIsRequired"
6577
+ }
6578
+ };
6579
+ }
6580
+ function additionalInformationValidators({
6581
+ country,
6582
+ taxIdNumberType,
6583
+ companyType,
6584
+ registrationNumberType,
6585
+ vatNumberType,
6586
+ isExperimentEnabled
6587
+ }) {
6588
+ return {
6589
+ hasDoingBusinessAs: doingBusinessAsAbsentFieldMetadata.validators,
6590
+ doingBusinessAs: doingBusinessAsFieldMetadata.validators,
6591
+ registrationNumber: resolveFieldMetadata(
6592
+ registrationNumberDefaultFieldConfig[country],
6593
+ {
6594
+ companyType,
6595
+ registrationNumberType,
6596
+ isExperimentEnabled
6597
+ },
6598
+ registrationNumberDefaultFieldMetadata
6599
+ )?.validators,
6600
+ exemptedFromRegistrationNumber: exemptFromRegistrationNumberDefaultFieldMetadata.validators,
6601
+ taxInformation: resolveFieldMetadata(
6602
+ taxInformationDefaultFieldConfig[country],
6603
+ {
6604
+ taxIdNumberType,
6605
+ companyType
6606
+ },
6607
+ taxInformationDefaultFieldMetadata
6608
+ ).validators,
6609
+ vatNumber: resolveFieldMetadata(
6610
+ defaultFieldConfig$1[country],
6611
+ { vatNumberType },
6612
+ defaultFieldMetadata$1
6613
+ ).validators,
6614
+ vatAbsenceReason: vatAbsenceReasonMetadata.validators,
6615
+ eInvoicingCode: eInvoicingCodeFieldMetadata.validators,
6616
+ industryCodes: industryCodeFieldMetadata.validators,
6617
+ dateOfIncorporation: dateOfIncorporationFieldMetadata.validators,
6618
+ stockExchangeMIC: stockExchangeMICFieldMetadata.validators,
6619
+ stockISIN: stockISINFieldMetadata.validators,
6620
+ stockTickerSymbol: stockTickerSymbolFieldMetadata.validators
6621
+ };
6622
+ }
6623
+ function BusinessDetailsMultiformDropin({
6624
+ taskType = TaskTypes.BUSINESS_DETAILS,
6625
+ country: propCountry,
6626
+ problems: propProblems,
6627
+ legalEntityResponse,
6628
+ associatedLegalArrangement,
6629
+ // initially undefined when creating entity
6630
+ nestedLegalEntity,
6631
+ // initially undefined when creating entity
6632
+ nestedLegalEntityDetails,
6633
+ // has entity roles for association logic
6634
+ onSubmit: onExternalSubmit,
6635
+ handleHomeClick,
6636
+ asModal = false
6637
+ }) {
6638
+ const { t, i18n } = useTranslation(["common", "business"]);
6639
+ const { baseUrl, rootLegalEntityId } = useApiContext();
6640
+ const userEvents = useAnalyticsContext();
6641
+ const { showToast } = useToastContext();
6642
+ const queryClient = useQueryClient();
6643
+ const { isExperimentEnabled } = useExperimentsContext();
6644
+ const { isSettingEnabled } = useSettingsContext();
6645
+ const { accountHolder, setAccountHolder } = useAccountHolder();
6646
+ const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
6647
+ const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
6648
+ const isSoleProp = accountHolder === "mySoleProprietorName";
6649
+ const isAssociationTaskType = !taskType ? accountHolder !== "theCompanyIWorkFor" : taskType !== TaskTypes.BUSINESS_DETAILS;
6650
+ const legalEntityType = !isSoleProp ? LegalEntityTypes.ORGANIZATION : LegalEntityTypes.SOLE_PROPRIETORSHIP;
6651
+ const subjectEntity = !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement : nestedLegalEntity;
6652
+ const [country, setCountry] = useState(propCountry);
6653
+ const [documents, setDocuments] = useState();
6654
+ const [problems, setProblems] = useState(propProblems ?? {});
6655
+ const [loadingStatus, setLoadingStatus] = useState("success");
6656
+ const [derivedProps, setDerivedProps] = useState();
6657
+ const [trustedFields, setTrustedFields] = useState(subjectEntity?.trustedFields ?? void 0);
6658
+ const defaultForms = useMemo(() => getForms(country), [country]);
6659
+ const documentUtils = documentApiUtils({
6660
+ baseUrl: baseUrl.value,
6661
+ rootLegalEntityId: rootLegalEntityId.value
6662
+ });
6663
+ useEffect(() => {
6664
+ if (!subjectEntity?.documentDetails?.length) return;
6665
+ documentUtils.fetchDocuments(subjectEntity.documentDetails, subjectEntity?.id).then(() => {
6666
+ setDocuments(mapApiDocumentToBusinessDetailsDocuments(subjectEntity?.id));
6667
+ }).catch(() => {
6668
+ showToast({
6669
+ label: t(($) => $["failedToFetchRelevantDocuments"], { ns: "common" }),
6670
+ variant: "error"
6671
+ });
6672
+ });
6673
+ }, [subjectEntity?.documentDetails, subjectEntity?.id]);
6674
+ const associatedLeTrackingParams = useMemo(
6675
+ () => getAssociatedLeAnalyticsPayload({
6676
+ associatedLegalEntity: associatedLegalArrangement
6677
+ }),
6678
+ [associatedLegalArrangement]
6679
+ );
6680
+ const handleTrackNavigation = useCallback(
6681
+ (props) => {
6682
+ trackNavigation({
6683
+ ...props,
6684
+ additionalTrackingParams: associatedLeTrackingParams
6685
+ });
6686
+ },
6687
+ [associatedLeTrackingParams]
6688
+ );
6689
+ useEffect(() => {
6690
+ userEvents.updateBaseTrackingPayload({ task: taskType });
6691
+ userEvents.addTaskEvent("Landed on page", {
6692
+ actionType: "start",
6693
+ ...subjectEntity?.id && subjectEntity?.type && {
6694
+ legalEntityId: subjectEntity.id,
6695
+ entityType: subjectEntity.type
6696
+ },
6697
+ ...associatedLeTrackingParams
6698
+ });
6699
+ }, []);
6700
+ const parseConfiguration = useCallback(
6701
+ ({ scenarios }) => composePerScenarioFormConfigurations(scenarios, businessDetailsFieldsPerScenario),
6702
+ []
6703
+ );
6704
+ const { fieldConfigurations } = useScenarioConfiguration({
6705
+ legalEntityType,
6706
+ parseConfiguration,
6707
+ setLoadingStatus,
6708
+ country
6709
+ });
6710
+ const defaultData = useMemo(
6711
+ () => ({
6712
+ ...mapLegalEntityToBusinessDetailsSchema(
6713
+ !isAssociationTaskType ? legalEntityResponse : isSoleProp ? associatedLegalArrangement ?? legalEntityResponse : nestedLegalEntity,
6714
+ isSoleProp ? legalEntityResponse : void 0,
6715
+ isExperimentEnabled
6716
+ ),
6717
+ ...documents
6718
+ }),
6719
+ [
6720
+ isAssociationTaskType,
6721
+ legalEntityResponse,
6722
+ isSoleProp,
6723
+ associatedLegalArrangement,
6724
+ nestedLegalEntity,
6725
+ isExperimentEnabled,
6726
+ documents
6727
+ ]
6728
+ );
6729
+ const buildFieldValidations = useCallback(
6730
+ (data) => {
6731
+ const taxInfo = data?.basicInformation?.taxInformation ?? data?.additionalInformation?.taxInformation;
6732
+ const taxIdType = taxInfo?.length ? taxInfo.find((taxId) => taxId.country === country)?.type : void 0;
6733
+ const regNumberType = data?.basicInformation?.registrationNumberType ?? data?.additionalInformation?.registrationNumberType;
6734
+ return {
6735
+ basicInformation: basicInformationValidators({
6736
+ country,
6737
+ state: data?.basicInformation?.stateOrProvince,
6738
+ companyType: data?.companyStructure?.entityType,
6739
+ taxIdNumberType: taxIdType,
6740
+ registrationNumberType: regNumberType,
6741
+ isExperimentEnabled
6742
+ }),
6743
+ businessSelection: businessSelectionValidators(),
6744
+ companyStructure: CompanyStructureValidation,
6745
+ additionalInformation: additionalInformationValidators({
6746
+ country,
6747
+ taxIdNumberType: taxIdType,
6748
+ companyType: data?.companyStructure?.entityType,
6749
+ registrationNumberType: regNumberType,
6750
+ vatNumberType: data?.additionalInformation?.vatNumberType,
6751
+ isExperimentEnabled
6752
+ }),
6753
+ financialInformation: financialInfoValidationWithEmployeesRules
6754
+ };
6755
+ },
6756
+ [country, isExperimentEnabled]
6757
+ );
6758
+ const multiForm = useMultiForm({
6759
+ defaultData,
6760
+ allFields: derivedProps?.allFields,
6761
+ requiredFields: derivedProps?.requiredFields,
6762
+ optionalFields: derivedProps?.optionalFields,
6763
+ obscuredFields: derivedProps?.obscuredFields,
6764
+ trustedFields: derivedProps?.trustedFields,
6765
+ rules: buildFieldValidations
6766
+ });
6767
+ const isTinMatched = tinMatched.value;
6768
+ const customRules = useMemo(
6769
+ () => rules({
6770
+ data: multiForm.data,
6771
+ country,
6772
+ taskType,
6773
+ isExperimentEnabled,
6774
+ isSettingEnabled,
6775
+ accountHolder,
6776
+ tinMatched: isTinMatched,
6777
+ rootLegalEntity: legalEntityResponse
6778
+ }),
6779
+ [
6780
+ multiForm.data,
6781
+ country,
6782
+ taskType,
6783
+ isExperimentEnabled,
6784
+ isSettingEnabled,
6785
+ accountHolder,
6786
+ isTinMatched,
6787
+ legalEntityResponse
6788
+ ]
6789
+ );
6790
+ useEffect(() => {
6791
+ const props = getPropsFromConfigurations({
6792
+ scenarioConfiguration: fieldConfigurations,
6793
+ forms: defaultForms,
6794
+ remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
6795
+ dataMissingErrors: problems?.missingData ?? [],
6796
+ fieldsWithExistingData: subjectEntity ? subjectEntity.type === LegalEntityTypes.SOLE_PROPRIETORSHIP ? getFieldsWithExistingData(
6797
+ subjectEntity,
6798
+ solePropBusinessDetailsApiKeyMapping,
6799
+ solePropBusinessDetailsDocumentMapping
6800
+ ) : getFieldsWithExistingData(
6801
+ subjectEntity,
6802
+ businessDetailsApiKeyMapping,
6803
+ businessDetailsDocumentMapping
6804
+ ) : [],
6805
+ customRules,
6806
+ legalEntityType: subjectEntity?.type,
6807
+ legalEntityTrustedFields: trustedFields
6808
+ });
6809
+ setDerivedProps(props);
6810
+ }, [
6811
+ customRules,
6812
+ defaultForms,
6813
+ subjectEntity,
6814
+ problems?.missingData,
6815
+ problems?.remediationActions,
6816
+ trustedFields,
6817
+ fieldConfigurations
6818
+ ]);
6819
+ const [prevCountry, setPrevCountry] = useState(multiForm.data.basicInformation?.country);
6820
+ if (multiForm.data.basicInformation?.country && prevCountry !== multiForm.data.basicInformation?.country) {
6821
+ setCountry(multiForm.data?.basicInformation?.country);
6822
+ setPrevCountry(multiForm.data.basicInformation?.country);
6823
+ setTrustedFields(void 0);
6824
+ verifiedBusiness.value = void 0;
6825
+ tinMatched.value = void 0;
6826
+ businessMismatchModalOpen.value = false;
6827
+ }
6828
+ const [forms, setForms] = useState(
6829
+ buildRequiredForms({
6830
+ config: {
6831
+ country,
6832
+ forms: defaultForms,
6833
+ requiredFields: derivedProps?.requiredFields,
6834
+ optionalFields: derivedProps?.optionalFields,
6835
+ isValid: multiForm.isValid ?? {},
6836
+ problems
6837
+ },
6838
+ options: {
6839
+ hasNoSearchResults: false
6840
+ }
6841
+ })
6842
+ );
6843
+ const updateForms = useCallback(
6844
+ ({ searchResults }) => {
6845
+ const updatedForms = buildRequiredForms({
6846
+ config: {
6847
+ country,
6848
+ forms: defaultForms,
6849
+ requiredFields: derivedProps?.requiredFields,
6850
+ optionalFields: derivedProps?.optionalFields,
6851
+ isValid: multiForm.isValid ?? {},
6852
+ problems
6853
+ },
6854
+ options: {
6855
+ hasNoSearchResults: searchResults && !searchResults.length
6856
+ }
6857
+ });
6858
+ setForms(updatedForms);
6859
+ return updatedForms;
6860
+ },
6861
+ [
6862
+ country,
6863
+ defaultForms,
6864
+ derivedProps?.optionalFields,
6865
+ derivedProps?.requiredFields,
6866
+ multiForm.isValid,
6867
+ problems
6868
+ ]
6869
+ );
6870
+ const summaryData = useMemo(
6871
+ () => formatDataForSummary(multiForm.data, forms, t, i18n.language, isExperimentEnabled),
6872
+ [multiForm.data, forms, t, i18n.language, isExperimentEnabled]
6873
+ );
6874
+ const submitTask = useCallback(() => {
6875
+ setAccountHolder(accountHolder);
6876
+ return submit({
6877
+ additionalTrackingParams: associatedLeTrackingParams,
6878
+ data: multiForm.data,
6879
+ legalEntityResponse,
6880
+ associatedLegalArrangement,
6881
+ nestedLegalEntity,
6882
+ nestedLegalEntityDetails,
6883
+ problems,
6884
+ taskType: taskType ?? TaskTypes.BUSINESS_DETAILS,
6885
+ accountHolder: accountHolder ?? "theCompanyIWorkFor",
6886
+ forms,
6887
+ documentUtils,
6888
+ t,
6889
+ showToast,
6890
+ setLoadingStatus,
6891
+ setProblems,
6892
+ handleUpdateLegalEntity: updateLegalEntity,
6893
+ createLegalEntity,
6894
+ onExternalSubmit,
6895
+ isExperimentEnabled,
6896
+ userEvents
6897
+ });
6898
+ }, [
6899
+ setAccountHolder,
6900
+ accountHolder,
6901
+ associatedLeTrackingParams,
6902
+ multiForm.data,
6903
+ legalEntityResponse,
6904
+ associatedLegalArrangement,
6905
+ nestedLegalEntity,
6906
+ nestedLegalEntityDetails,
6907
+ problems,
6908
+ taskType,
6909
+ forms,
6910
+ documentUtils,
6911
+ t,
6912
+ showToast,
6913
+ updateLegalEntity,
6914
+ createLegalEntity,
6915
+ onExternalSubmit,
6916
+ isExperimentEnabled,
6917
+ userEvents
6918
+ ]);
6919
+ const {
6920
+ handleNextClick,
6921
+ handleBackClick,
6922
+ activeForm,
6923
+ shouldValidate,
6924
+ gotoFormByFormIndex,
6925
+ steps
6926
+ } = useFormComposer({
6927
+ problems,
6928
+ navigationTrackingParams: associatedLeTrackingParams,
6929
+ forms,
6930
+ onSubmit: submitTask,
6931
+ triggerValidation: multiForm.triggerValidation
6932
+ });
6933
+ const handleBusinessMismatchContinue = () => {
6934
+ setTrustedFields([]);
6935
+ businessMismatchModalOpen.value = false;
6936
+ handleNextClick();
6937
+ };
6938
+ const handleBusinessMismatchCancel = () => {
6939
+ handleBackClick?.();
6940
+ businessMismatchModalOpen.value = false;
6941
+ tinMatched.value = false;
6942
+ };
6943
+ const companySearchQueryInput = {
6944
+ name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
6945
+ country: multiForm.data?.basicInformation?.country,
6946
+ state: multiForm.data?.basicInformation?.stateOrProvince,
6947
+ registrationNumber: multiForm.data?.basicInformation?.registrationNumber
6948
+ };
6949
+ const verifyTinQueryInput = {
6950
+ name: multiForm.data.basicInformation?.legalCompanyName ?? "",
6951
+ tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
6952
+ };
6953
+ const {
6954
+ data: companySearchResponse,
6955
+ isLoading: searchingCompanies,
6956
+ isError: searchingError
6957
+ } = useCompanySearch(companySearchQueryInput, {
6958
+ enabled: false
6959
+ });
6960
+ useEffect(() => {
6961
+ if (!searchingCompanies && companySearchResponse?.results) {
6962
+ userEvents.addPageEvent("Success", {
6963
+ actionType: "submit",
6964
+ returnValue: "companySearch",
6965
+ additionalData: {
6966
+ numberOfResults: companySearchResponse?.results.length
6967
+ },
6968
+ ...subjectEntity?.id && subjectEntity?.type && {
6969
+ legalEntityId: subjectEntity.id,
6970
+ entityType: subjectEntity.type
6971
+ },
6972
+ ...associatedLeTrackingParams
6973
+ });
6974
+ }
6975
+ }, [
6976
+ searchingCompanies,
6977
+ userEvents,
6978
+ subjectEntity,
6979
+ associatedLeTrackingParams,
6980
+ companySearchResponse?.results
6981
+ ]);
6982
+ const companySelectionInput = {
6983
+ company: companySearchResponse?.results[0],
6984
+ state: multiForm.data.basicInformation?.stateOrProvince,
6985
+ name: multiForm.data?.basicInformation?.legalCompanyName ?? "",
6986
+ tin: multiForm.data?.basicInformation?.taxInformation?.find((taxId) => taxId.country === country)?.number ?? ""
6987
+ };
6988
+ useVerifyTin(verifyTinQueryInput, { enabled: false });
6989
+ useCompanySelection(companySelectionInput, {
6990
+ enabled: false
6991
+ });
6992
+ const attemptBusinessSearch = async () => {
6993
+ if (customRules.countryUsingCompanySearch() !== "REQUIRED") {
6994
+ const currentForms = updateForms({ searchResults: [] });
6995
+ return handleNextClick(currentForms);
6996
+ }
6997
+ try {
6998
+ setLoadingStatus("loading");
6999
+ tinMatched.value = void 0;
7000
+ verifiedBusiness.value = void 0;
7001
+ isVerifiedSingleCompanySearchResult.value = false;
7002
+ const searchResponse = await queryClient.fetchQuery({
7003
+ queryKey: ["companySearch", companySearchQueryInput]
7004
+ });
7005
+ let currentForms = updateForms({ searchResults: searchResponse.results });
7006
+ const handleTinResponse = (matched) => {
7007
+ if (matched) {
7008
+ tinMatched.value = true;
7009
+ } else {
7010
+ businessMismatchModalOpen.value = true;
7011
+ tinMatched.value = false;
7012
+ }
7013
+ return tinMatched.value;
7014
+ };
7015
+ if (searchResponse?.results.length === 1 && isNormalizedStringMatch(
7016
+ multiForm.data?.basicInformation?.legalCompanyName ?? "",
7017
+ searchResponse.results[0].name
7018
+ )) {
7019
+ const companySelectionResponse = await queryClient.fetchQuery({
7020
+ queryKey: [
7021
+ "companySelection",
7022
+ { ...companySelectionInput, company: searchResponse.results[0] }
7023
+ ]
7024
+ });
7025
+ if (handleTinResponse(!!companySelectionResponse.tinMatched)) {
7026
+ verifiedBusiness.value = companySelectionResponse;
7027
+ isVerifiedSingleCompanySearchResult.value = true;
7028
+ applyVerifiedBusinessData(multiForm, country, verifiedBusiness.value);
7029
+ currentForms = updateForms({ searchResults: searchResponse.results });
7030
+ } else {
7031
+ return setLoadingStatus("success");
7032
+ }
7033
+ }
7034
+ if (!searchResponse.results.length) {
7035
+ const tinVerificationResponse = await queryClient.fetchQuery({
7036
+ queryKey: ["verifyTin", verifyTinQueryInput]
7037
+ });
7038
+ if (!handleTinResponse(!!tinVerificationResponse?.matched)) {
7039
+ return setLoadingStatus("success");
7040
+ }
7041
+ }
7042
+ setLoadingStatus("success");
7043
+ return handleNextClick(currentForms);
7044
+ } catch (e) {
7045
+ setLoadingStatus("error");
7046
+ if (e instanceof Error && e.message === KOMPANY_SEARCH_FAILURE) {
7047
+ const currentForms = updateForms({ searchResults: [] });
7048
+ return handleNextClick(currentForms);
7049
+ }
7050
+ }
7051
+ };
7052
+ const overrideNextClick = async () => {
7053
+ if (!activeForm.isValid) return handleNextClick();
7054
+ if (!COUNTRIES_USING_COMPANY_SEARCH.includes(country) || isSoleProp) {
7055
+ return handleNextClick();
7056
+ }
7057
+ switch (activeForm.formId) {
7058
+ case "basicInformation": {
7059
+ return await attemptBusinessSearch();
7060
+ }
7061
+ case "businessSelection": {
7062
+ const currentForms = updateForms({
7063
+ searchResults: companySearchResponse?.results
7064
+ });
7065
+ return handleNextClick(currentForms);
7066
+ }
7067
+ default:
7068
+ return handleNextClick();
7069
+ }
7070
+ };
7071
+ useEffect(() => {
7072
+ updateForms({
7073
+ searchResults: searchingError ? [] : companySearchResponse?.results
7074
+ });
7075
+ }, [updateForms, companySearchResponse?.results, searchingError]);
7076
+ return /* @__PURE__ */ jsx(FormContextProvider, { form: multiForm, children: /* @__PURE__ */ jsxs(
7077
+ FormFlow,
7078
+ {
7079
+ summary: {
7080
+ data: summaryData,
7081
+ omitted: {
7082
+ keys: ["operationalAddressIsSame"],
7083
+ forms: ["businessSelection"]
7084
+ },
7085
+ problems,
7086
+ trackNavigation: handleTrackNavigation,
7087
+ showLegalCaption: true
7088
+ },
7089
+ asModal,
7090
+ currentStep: steps.current,
7091
+ totalSteps: steps.total,
7092
+ forms,
7093
+ disableNextButton: activeForm.formId === "businessSelection",
7094
+ gotoFormByFormIndex,
7095
+ handleNextClick: overrideNextClick,
7096
+ handleBackClick,
7097
+ handleCancelClick: handleHomeClick,
7098
+ loadingStatus,
7099
+ children: [
7100
+ /* @__PURE__ */ jsx(
7101
+ BusinessDetailsMultiform,
7102
+ {
7103
+ taskType,
7104
+ activeForm,
7105
+ country,
7106
+ shouldValidate,
7107
+ problems,
7108
+ handleNextClick: overrideNextClick,
7109
+ handleBackClick,
7110
+ setLoadingStatus,
7111
+ isTopLevelEntity: taskType === TaskTypes.BUSINESS_DETAILS
7112
+ }
7113
+ ),
7114
+ businessMismatchModalOpen.value && /* @__PURE__ */ jsx(
7115
+ Confirm,
7116
+ {
7117
+ title: t(($) => $["businessSelection__tinVerificationFailureModalHeader"], {
7118
+ ns: "business"
7119
+ }),
7120
+ description: t(($) => $["businessSelection__tinVerificationFailureModalContent"], {
7121
+ ns: "business"
7122
+ }),
7123
+ cancelText: t(
7124
+ ($) => $["businessSelection__tinVerificationFailureModalSecondaryButton"],
7125
+ { ns: "business" }
7126
+ ),
7127
+ confirmText: t(
7128
+ ($) => $["businessSelection__tinVerificationFailureModalPrimaryButton"],
7129
+ { ns: "business" }
7130
+ ),
7131
+ onCancel: handleBusinessMismatchCancel,
7132
+ onConfirm: handleBusinessMismatchContinue
7133
+ }
7134
+ )
7135
+ ]
7136
+ }
7137
+ ) });
7138
+ }
5210
7139
  export {
5211
- businessDetailsFieldsPerScenario as $,
5212
- ADDITIONAL_INFORMATION_FORM_ID as A,
5213
- BusinessSelectionMultiform as B,
5214
- COUNTRY_OF_GOVERNING_LAW_FIELD as C,
5215
- DATE_OF_INCORPORATION_FIELD as D,
5216
- EInvoicingCodeField as E,
5217
- FinancialInformation as F,
5218
- isVerifiedSingleCompanySearchResult as G,
5219
- tinMatched as H,
5220
- CountryOfGoverningLawFieldValidation as I,
5221
- CountryFieldValidation as J,
5222
- getForms as K,
5223
- LEGAL_FORM_FIELDS as L,
5224
- mapApiDocumentToBusinessDetailsDocuments as M,
5225
- mapLegalEntityToBusinessDetailsSchema as N,
5226
- financialInfoValidationWithEmployeesRules as O,
5227
- ProofOfOwnershipDocument as P,
5228
- CompanyStructureValidation as Q,
5229
- RegistrationDocument as R,
5230
- STOCK_EXCHANGE_MIC_FIELD as S,
5231
- TaxDocument as T,
5232
- businessMismatchModalOpen as U,
5233
- VerifiedBusinessCard as V,
5234
- formatDataForSummary as W,
5235
- submit as X,
5236
- useCompanySearch as Y,
5237
- useVerifyTin as Z,
5238
- useCompanySelection as _,
5239
- stockISINFieldMetadata as a,
5240
- isNormalizedStringMatch as a0,
5241
- KOMPANY_SEARCH_FAILURE as a1,
5242
- BusinessDetailsDropin as a2,
5243
- stockExchangeMICFieldMetadata as b,
5244
- EINVOICING_CODE_FIELD as c,
5245
- dateOfIncorporationFieldMetadata as d,
5246
- eInvoicingCodeFieldMetadata as e,
5247
- DateOfIncorporationField as f,
5248
- StockExchangeMICField as g,
5249
- STOCK_ISIN_FIELD as h,
5250
- StockISINField as i,
5251
- STOCK_TICKER_SYMBOL_FIELD as j,
5252
- StockTickerSymbolField as k,
5253
- legalFormFieldMetadata as l,
5254
- localizedLegalCompanyNameFieldConfig as m,
5255
- defaultFieldMetadata as n,
5256
- defaultFieldConfig as o,
5257
- useLegalCompanyNameField as p,
5258
- CountryOfGoverningLawField as q,
5259
- isBankAccountRequestedForOrganization as r,
5260
- stockTickerSymbolFieldMetadata as s,
5261
- companyTypeOptions as t,
5262
- useDebouncedState as u,
5263
- verifiedBusiness as v,
5264
- useCompanyTypeExamples as w,
5265
- companyTypeMetadata as x,
5266
- ProofOfSignatoryDocument as y,
5267
- ProofOfDirectorDocument as z
7140
+ BusinessDetailsMultiformDropin as B,
7141
+ BusinessDetailsDropin as a
5268
7142
  };