@adyen/kyc-components 4.0.0-compact.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1113) hide show
  1. package/README.md +30 -43
  2. package/dist/4-people-BzyXLUF9.js +24 -0
  3. package/dist/AD-BQAadLyG.js +23 -0
  4. package/dist/AT-BI8ju2NH.js +23 -0
  5. package/dist/AcceptTermsOfServiceComponent-CmHBNGjM.js +659 -0
  6. package/dist/Accordion-Cp_VkxR6.js +88 -0
  7. package/dist/AccountSetupRejected-CoxWTlar.js +26 -0
  8. package/dist/ActionBar-CxUKVmTE.js +31 -0
  9. package/dist/Address-Db6Q_KUo.js +1348 -0
  10. package/dist/Alert-DEiOX0nw.js +159 -0
  11. package/dist/Avatar-3K6S_tIS.js +60 -0
  12. package/dist/BE-nWHKW0xQ.js +23 -0
  13. package/dist/BG-DlvaKo4n.js +27 -0
  14. package/dist/BusinessDetailsMultiformDropin-CYoIN4Fa.js +4220 -0
  15. package/dist/BusinessFinancingComponent-DyvM-fsY.js +54 -0
  16. package/dist/BusinessFinancingDropin-BOvR4LwU.js +1853 -0
  17. package/dist/BusinessFinancingPage-8C0ztBfS.js +43 -0
  18. package/dist/BusinessTypeSelectionPage-DpZAsa8K.js +427 -0
  19. package/dist/CH-TX4BTE2y.js +23 -0
  20. package/dist/CY-D59Nypl7.js +23 -0
  21. package/dist/CZ-B6iI1GbE.js +33 -0
  22. package/dist/Card-CdpPhK9y.js +82 -0
  23. package/dist/ConstitutionalDocument-NLs6ka9K.js +143 -0
  24. package/dist/CountryField-9w8wRZMW.js +843 -0
  25. package/dist/CreateIndividualComponent-zGcoEyq0.js +71 -0
  26. package/dist/CreateTransferInstrumentComponent-Ct_v-IyH.js +63 -0
  27. package/dist/Currency-53s7DEeh.js +183 -0
  28. package/dist/CustomerSupport-BRcUQ4fR.js +153 -0
  29. package/dist/DE-CsuX_tSL.js +23 -0
  30. package/dist/DK-oQEFrF6o.js +33 -0
  31. package/dist/DebugModal-CokbXGK9.js +413 -0
  32. package/dist/DecisionMakerDetailsPage-B5cLY8iP.js +106 -0
  33. package/dist/DecisionMakers-BQ24LfqB.js +830 -0
  34. package/dist/DropinLayout-CBP_cHLC.js +17 -0
  35. package/dist/EE-3WZV5Ejt.js +23 -0
  36. package/dist/ES-NfxpqbC2.js +23 -0
  37. package/dist/EmbeddedStatus-DB9B_u3L.js +99 -0
  38. package/dist/EndStateLayout-BWC5aqVS.js +71 -0
  39. package/dist/EntityAssociation-gzYdcHoL.js +159 -0
  40. package/dist/EntityGuidanceStatus-BKeZKnbP.js +105 -0
  41. package/dist/FI-CHQIvHa-.js +23 -0
  42. package/dist/FR-MWZyWX3x.js +23 -0
  43. package/dist/FormFlow-Cf3Ff2qw.js +224 -0
  44. package/dist/FormNavigation-CjgZbv9G.js +144 -0
  45. package/dist/FormWrapper-dbBZegkX.js +135 -0
  46. package/dist/GG-CPoMVQPc.js +33 -0
  47. package/dist/GI-DxmBwVD_.js +41 -0
  48. package/dist/GR-Rk0pXlNw.js +23 -0
  49. package/dist/HR-WapHW2fw.js +23 -0
  50. package/dist/HU-DCOMuOhe.js +32 -0
  51. package/dist/IE-BkgtVgDi.js +23 -0
  52. package/dist/IM-Wr4iDT94.js +33 -0
  53. package/dist/IS-C-Cgc6zp.js +27 -0
  54. package/dist/IT-CXekiddL.js +23 -0
  55. package/dist/IndividualOnfido-Cc7dydKq.js +9594 -0
  56. package/dist/IndividualOnfidoDropin-BpU2cL4E.js +2497 -0
  57. package/dist/InputText-Dsw9kiwL.js +249 -0
  58. package/dist/Introduction-C8mTk4l_.js +300 -0
  59. package/dist/JE-B4gj54Hg.js +33 -0
  60. package/dist/JpAddress-R81eO-aY.js +280 -0
  61. package/dist/LI-L0ZAALRT.js +23 -0
  62. package/dist/LT-Ao2uagV9.js +23 -0
  63. package/dist/LU-B7LRUuc6.js +23 -0
  64. package/dist/LV-DZeGjA2G.js +23 -0
  65. package/dist/LegalRepresentativeDetailsPage-DIQX18v2.js +60 -0
  66. package/dist/ListItem-D3p6EgP_.js +69 -0
  67. package/dist/MC-EDVNGWhy.js +23 -0
  68. package/dist/MT-B9my7RlP.js +23 -0
  69. package/dist/ManageIndividualComponent-CmM-vP9E.js +46 -0
  70. package/dist/ManageTermsOfServiceComponent-C3hXZJx5.js +52 -0
  71. package/dist/ManageTransferInstrumentComponent-co6LYrVY.js +287 -0
  72. package/dist/MaybeModal-BVQOzETz.js +25 -0
  73. package/dist/Modal-CloeVnNp.js +149 -0
  74. package/dist/NL-VXAFOhV5.js +23 -0
  75. package/dist/NO-Cx1VSh2W.js +32 -0
  76. package/dist/OnboardingDropinComponent-CDAK4v1o.js +7908 -0
  77. package/dist/PL-BZW1hGvD.js +32 -0
  78. package/dist/PT-OpU4MU3L.js +23 -0
  79. package/dist/PayoutDetailsDropin-DCrlrNki.js +4841 -0
  80. package/dist/RO-Cz6Sh0ls.js +23 -0
  81. package/dist/Review-Dqn49vJM.js +83 -0
  82. package/dist/RootBusinessDetailsPage-DSEq3TIn.js +61 -0
  83. package/dist/RootBusinessLinesPage-CbPhOber.js +1118 -0
  84. package/dist/RootIndividualDetailsPage-Bp_7gSIB.js +71 -0
  85. package/dist/SE-B5K-FkQd.js +33 -0
  86. package/dist/SI-BOGTNLPa.js +23 -0
  87. package/dist/SK-BOVrp_Av.js +23 -0
  88. package/dist/SM-meowwILA.js +23 -0
  89. package/dist/SignPCIComponent-B6kYuqT_.js +304 -0
  90. package/dist/SingpassSelection-aDrNTYr3.js +130 -0
  91. package/dist/SoleProprietorshipPage-HnUsyjKp.js +60 -0
  92. package/dist/SourceOfFundsPage-BkMEIV_L.js +2383 -0
  93. package/dist/StepProgressIndicator-BgeMe93n.js +78 -0
  94. package/dist/StoreProvider-BFN15Go9.js +7674 -0
  95. package/dist/Summary-BkE_c8pU.js +204 -0
  96. package/dist/TaxReportingDropin-LG9zvOMN.js +502 -0
  97. package/dist/TrustDetailsPage-C8w8pEvB.js +2149 -0
  98. package/dist/TrustMemberCompanyPage-IDEwpLW3.js +73 -0
  99. package/dist/TrustMemberIndividualPage-rKB3iVFk.js +66 -0
  100. package/dist/TrustMemberRoleAndTypePage-CLtX8V0M.js +985 -0
  101. package/dist/TrustMembersOverview-Bs203hm0.js +438 -0
  102. package/dist/UnincorporatedPartnershipIndividualPage-CBTaUEld.js +65 -0
  103. package/dist/UnincorporatedPartnershipMemberCompanyPage-ZnLe9Uq3.js +76 -0
  104. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-BXImA2c_.js +281 -0
  105. package/dist/UnincorporatedPartnershipMembersOverview-c7k2JzcO.js +172 -0
  106. package/dist/VA-DXsYTCoh.js +23 -0
  107. package/dist/VerificationErrorAlert-uubpHQGE.js +79 -0
  108. package/dist/ViewVerificationStatusComponent-DO9L2hEO.js +180 -0
  109. package/dist/adyen-business-financing.js +5 -6
  110. package/dist/adyen-individual-configuration.js +7 -8
  111. package/dist/adyen-individual-status.js +7 -8
  112. package/dist/adyen-kyc-components.js +38 -33
  113. package/dist/adyen-onboarding.js +4 -5
  114. package/dist/adyen-terms-of-service-management.js +7 -8
  115. package/dist/adyen-terms-of-service-status.js +7 -8
  116. package/dist/adyen-transfer-instrument-configuration.js +7 -8
  117. package/dist/adyen-transfer-instrument-management.js +7 -8
  118. package/dist/adyen-verification-status.js +5 -6
  119. package/dist/arrow-right-KxA3SvQj.js +14 -0
  120. package/dist/bag-BPumznWh.js +14 -0
  121. package/dist/bank-D6FiNBhs.js +14 -0
  122. package/dist/bg-BG-B7Xs_t04.js +13 -0
  123. package/dist/bg-BG-BY3Wa361.js +54 -0
  124. package/dist/bg-BG-BvLl6gaB.js +13 -0
  125. package/dist/bg-BG-CepHap8j.js +68 -0
  126. package/dist/bg-BG-Coja327N.js +24 -0
  127. package/dist/bg-BG-D9J6LnkI.js +57 -0
  128. package/dist/bg-BG-DH45-0B-.js +29 -0
  129. package/dist/bg-BG-DRkMqyL8.js +13 -0
  130. package/dist/bg-BG-DcxZ1tmt.js +32 -0
  131. package/dist/bg-BG-Dp4LxSP7.js +37 -0
  132. package/dist/bg-BG-DpIAKQve.js +113 -0
  133. package/dist/bg-BG-er0t4jTs.js +27 -0
  134. package/dist/bg-BG-mLSjG76Q.js +13 -0
  135. package/dist/bg-BG-wVquMNtT.js +55 -0
  136. package/dist/bin-Bz6KOIeE.js +18 -0
  137. package/dist/capital-GVQ3svwN.js +17 -0
  138. package/dist/cash-stack-D9AoDDwt.js +22 -0
  139. package/dist/certificate-CdEWgHQf.js +17 -0
  140. package/dist/checkmark-Q7x6tGhy.js +14 -0
  141. package/dist/checkmark-circle-fill-CsvN5_PL.js +17 -0
  142. package/dist/checkmark-circle-x7dzbp3I.js +20 -0
  143. package/dist/checkmark-small-D35myntq.js +14 -0
  144. package/dist/chevron-down-C2iDorpW.js +14 -0
  145. package/dist/chevron-left-ztPO84q-.js +14 -0
  146. package/dist/chevron-right-C_JN0oDt.js +14 -0
  147. package/dist/chevron-up-CgG8n25g.js +14 -0
  148. package/dist/circle-Bt3Nlr3q.js +17 -0
  149. package/dist/circle-small-filled-YMzP6yQU.js +14 -0
  150. package/dist/clock-BZHremOA.js +20 -0
  151. package/dist/coins-fkAk6dCo.js +17 -0
  152. package/dist/contract-BTa4HltT.js +14 -0
  153. package/dist/cross-Cn09MtQ_.js +14 -0
  154. package/dist/cross-circle-fill-small-DCz52AuN.js +14 -0
  155. package/dist/cs-CZ--jOkoHVS.js +55 -0
  156. package/dist/cs-CZ-BDf9m4Rw.js +113 -0
  157. package/dist/cs-CZ-BEFeaKsV.js +54 -0
  158. package/dist/cs-CZ-BP7niQM9.js +68 -0
  159. package/dist/cs-CZ-BSWXexr4.js +13 -0
  160. package/dist/cs-CZ-BsV9NiQ2.js +13 -0
  161. package/dist/cs-CZ-CQNBae2b.js +27 -0
  162. package/dist/cs-CZ-CyLqoG1j.js +37 -0
  163. package/dist/cs-CZ-D4Hg-t16.js +32 -0
  164. package/dist/cs-CZ-DPVMeRye.js +29 -0
  165. package/dist/cs-CZ-DXtJsBPz.js +24 -0
  166. package/dist/cs-CZ-DY_pQqAT.js +57 -0
  167. package/dist/cs-CZ-DalFZigH.js +13 -0
  168. package/dist/cs-CZ-hT5w5It6.js +13 -0
  169. package/dist/da-DK-CI-vfqPo.js +113 -0
  170. package/dist/da-DK-D4Ojw97o.js +13 -0
  171. package/dist/da-DK-DCJhV2qS.js +32 -0
  172. package/dist/da-DK-DU4dCNEw.js +29 -0
  173. package/dist/da-DK-DWA8uOd8.js +24 -0
  174. package/dist/da-DK-DYpfNZdP.js +37 -0
  175. package/dist/da-DK-DZwlENGe.js +13 -0
  176. package/dist/da-DK-Dc0QYG8m.js +68 -0
  177. package/dist/da-DK-JHZnsI59.js +55 -0
  178. package/dist/da-DK-P3YSaBqs.js +13 -0
  179. package/dist/da-DK-R_y7YwqQ.js +13 -0
  180. package/dist/da-DK-gnPgzwrG.js +27 -0
  181. package/dist/da-DK-jK7c9UL0.js +57 -0
  182. package/dist/de-DE-BR6CLZw6.js +13 -0
  183. package/dist/de-DE-BXt1K0Tr.js +37 -0
  184. package/dist/de-DE-BcuLmcC8.js +13 -0
  185. package/dist/de-DE-D3lLuF8z.js +27 -0
  186. package/dist/de-DE-D50lGOJE.js +24 -0
  187. package/dist/de-DE-DXR3EpEc.js +13 -0
  188. package/dist/de-DE-DwOQKCuU.js +32 -0
  189. package/dist/de-DE-Dz2OsS1F.js +68 -0
  190. package/dist/de-DE-Dz2l6jRl.js +29 -0
  191. package/dist/de-DE-VGGEkxUT.js +55 -0
  192. package/dist/de-DE-nG2MBigU.js +113 -0
  193. package/dist/de-DE-opyC1JO-.js +13 -0
  194. package/dist/de-DE-wmerDL2e.js +57 -0
  195. package/dist/debouncedInputEvent-Dlbc7VjU.js +109 -0
  196. package/dist/debugStore-BvbyN1Oi.js +14 -0
  197. package/dist/document-1-C08ut-Dt.js +14 -0
  198. package/dist/document-person-vxlA6C5f.js +20 -0
  199. package/dist/documentUtils-CUgKVLK4.js +218 -0
  200. package/dist/download-Drhk9k1f.js +17 -0
  201. package/dist/dropinUtils-D2lBlNWp.js +202 -0
  202. package/dist/edit-1-CFoDTMvQ.js +14 -0
  203. package/dist/el-GR-B3FHqTOX.js +13 -0
  204. package/dist/el-GR-B5j7VZ3E.js +54 -0
  205. package/dist/el-GR-B90M6tcZ.js +37 -0
  206. package/dist/el-GR-BHG69mXl.js +68 -0
  207. package/dist/el-GR-BX-MyQZY.js +113 -0
  208. package/dist/el-GR-Btrk_npt.js +57 -0
  209. package/dist/el-GR-CKHMsdx2.js +24 -0
  210. package/dist/el-GR-CWd7XYDU.js +13 -0
  211. package/dist/el-GR-CofvCav-.js +13 -0
  212. package/dist/el-GR-DtFE64KX.js +13 -0
  213. package/dist/el-GR-Hk4NbZSY.js +32 -0
  214. package/dist/el-GR-MLFY-Gg7.js +29 -0
  215. package/dist/el-GR-XRux2Wpv.js +27 -0
  216. package/dist/el-GR-gkaKwnln.js +55 -0
  217. package/dist/en-US-B96dpVon.js +27 -0
  218. package/dist/en-US-BPI4FZwa.js +113 -0
  219. package/dist/en-US-BQZhzROc.js +32 -0
  220. package/dist/en-US-CozY33On.js +13 -0
  221. package/dist/en-US-CzEL6t1W.js +55 -0
  222. package/dist/en-US-D-B35AoN.js +68 -0
  223. package/dist/en-US-D2yrwtzT.js +24 -0
  224. package/dist/en-US-DYo4OF-P.js +29 -0
  225. package/dist/en-US-Dg505Oh3.js +37 -0
  226. package/dist/en-US-fyGPkcqX.js +13 -0
  227. package/dist/en-US-gsp7CD_E.js +57 -0
  228. package/dist/en-US-h0JneJJl.js +13 -0
  229. package/dist/es-ES-0ROz-BJh.js +29 -0
  230. package/dist/es-ES-BAg3NqQO.js +13 -0
  231. package/dist/es-ES-BI_jdT67.js +68 -0
  232. package/dist/es-ES-BOoPqnPI.js +32 -0
  233. package/dist/es-ES-BhINIOee.js +13 -0
  234. package/dist/es-ES-BhNhIf08.js +37 -0
  235. package/dist/es-ES-Bn9_0wK0.js +55 -0
  236. package/dist/es-ES-CEp-ttVJ.js +13 -0
  237. package/dist/es-ES-CXDJLKAI.js +27 -0
  238. package/dist/es-ES-DF_L5EDd.js +24 -0
  239. package/dist/es-ES-Q16q2JJ6.js +113 -0
  240. package/dist/es-ES-Qnc0Q6JH.js +57 -0
  241. package/dist/es-ES-yMXcOjDL.js +13 -0
  242. package/dist/et-EE--cL_YqWe.js +27 -0
  243. package/dist/et-EE-BMgFCxds.js +37 -0
  244. package/dist/et-EE-BYSnV6Iq.js +55 -0
  245. package/dist/et-EE-Be__VK7Y.js +32 -0
  246. package/dist/et-EE-Bk2IHQWP.js +13 -0
  247. package/dist/et-EE-BuBiNLCi.js +24 -0
  248. package/dist/et-EE-C8RrUpLm.js +13 -0
  249. package/dist/et-EE-C_PZO2aI.js +68 -0
  250. package/dist/et-EE-Ci8RU2wg.js +13 -0
  251. package/dist/et-EE-DUWZ2Vqm.js +54 -0
  252. package/dist/et-EE-DmShD6oS.js +113 -0
  253. package/dist/et-EE-TzXANcP2.js +57 -0
  254. package/dist/et-EE-esci5847.js +29 -0
  255. package/dist/et-EE-x29FUaYN.js +118 -0
  256. package/dist/external-link-DCMYUMfW.js +14 -0
  257. package/dist/fi-FI-B_P4BAda.js +113 -0
  258. package/dist/fi-FI-CDISJifz.js +13 -0
  259. package/dist/fi-FI-DH6jpo9K.js +24 -0
  260. package/dist/fi-FI-DjlB2a7k.js +13 -0
  261. package/dist/fi-FI-Dn2MC8uW.js +57 -0
  262. package/dist/fi-FI-MiyuQqH8.js +13 -0
  263. package/dist/fi-FI-PVFqd5Ra.js +55 -0
  264. package/dist/fi-FI-bZzNB1WB.js +32 -0
  265. package/dist/fi-FI-fArobrt5.js +27 -0
  266. package/dist/fi-FI-hwzizPnr.js +68 -0
  267. package/dist/fi-FI-xXrvDLFe.js +29 -0
  268. package/dist/fi-FI-xqnQ38yC.js +13 -0
  269. package/dist/fi-FI-ysUrBilO.js +37 -0
  270. package/dist/fieldConfigurations-C38LzPl3.js +1402 -0
  271. package/dist/fr-FR-BSvSKazD.js +37 -0
  272. package/dist/fr-FR-BSynpexF.js +13 -0
  273. package/dist/fr-FR-BWX14yb7.js +57 -0
  274. package/dist/fr-FR-BnblnBsx.js +24 -0
  275. package/dist/fr-FR-Bw9O-QAU.js +29 -0
  276. package/dist/fr-FR-CUdiBCVB.js +113 -0
  277. package/dist/fr-FR-CYZXbwc9.js +68 -0
  278. package/dist/fr-FR-CiwkAb3E.js +27 -0
  279. package/dist/fr-FR-DGMVrsJv.js +13 -0
  280. package/dist/fr-FR-Dx-CiPdB.js +13 -0
  281. package/dist/fr-FR-aJ3cg4x0.js +13 -0
  282. package/dist/fr-FR-cTKcuHqX.js +32 -0
  283. package/dist/fr-FR-mJK4hjwD.js +55 -0
  284. package/dist/getFieldsWithExistingData-B0l_1eCG.js +22 -0
  285. package/dist/getName-CIw0MR9e.js +48 -0
  286. package/dist/gift-CQ_DEma7.js +14 -0
  287. package/dist/graph-BJmqglH2.js +21 -0
  288. package/dist/graph-up-Bq6adtlX.js +20 -0
  289. package/dist/hasDataChanged-B-_hLK5I.js +19 -0
  290. package/dist/headquarter-DNYyuuFq.js +21 -0
  291. package/dist/hotel-BuNql78Z.js +22 -0
  292. package/dist/hr-HR-BHt_jklG.js +13 -0
  293. package/dist/hr-HR-BLpGb4f2.js +37 -0
  294. package/dist/hr-HR-CXpCIMhI.js +113 -0
  295. package/dist/hr-HR-CZLSQruE.js +57 -0
  296. package/dist/hr-HR-CnP5sqih.js +54 -0
  297. package/dist/hr-HR-ComCqan_.js +32 -0
  298. package/dist/hr-HR-D5V7g9H2.js +13 -0
  299. package/dist/hr-HR-D8_yhtIo.js +29 -0
  300. package/dist/hr-HR-De5kHU8U.js +24 -0
  301. package/dist/hr-HR-DtfHQVe0.js +27 -0
  302. package/dist/hr-HR-VivDwwdW.js +13 -0
  303. package/dist/hr-HR-bE6cvRCQ.js +68 -0
  304. package/dist/hr-HR-n7aMHIpM.js +13 -0
  305. package/dist/hr-HR-qmYyO-nT.js +55 -0
  306. package/dist/hu-HU-BTlpbCpc.js +54 -0
  307. package/dist/hu-HU-BcogZby3.js +24 -0
  308. package/dist/hu-HU-CS-7iNS4.js +55 -0
  309. package/dist/hu-HU-Ca9Hex26.js +37 -0
  310. package/dist/hu-HU-DDsdPI5V.js +13 -0
  311. package/dist/hu-HU-DG-NUDx4.js +68 -0
  312. package/dist/hu-HU-DUGz5q5D.js +32 -0
  313. package/dist/hu-HU-D_DvlCMw.js +13 -0
  314. package/dist/hu-HU-DqEBeq-w.js +113 -0
  315. package/dist/hu-HU-I4-KFzvz.js +27 -0
  316. package/dist/hu-HU-KliQetm5.js +29 -0
  317. package/dist/hu-HU-WEtpzb41.js +13 -0
  318. package/dist/hu-HU-hbVM6tMS.js +13 -0
  319. package/dist/hu-HU-kp8Go5hZ.js +57 -0
  320. package/dist/iframeWidget-yBLSAmf8.js +234 -0
  321. package/dist/image-BSihO8lR.js +17 -0
  322. package/dist/info-vHTZWoJ7.js +21 -0
  323. package/dist/it-IT-B0YGvVgW.js +57 -0
  324. package/dist/it-IT-BTWkWSJq.js +55 -0
  325. package/dist/it-IT-C2MZo4KT.js +13 -0
  326. package/dist/it-IT-C_651bEP.js +13 -0
  327. package/dist/it-IT-Ckv8Ce4e.js +24 -0
  328. package/dist/it-IT-DERflsUd.js +32 -0
  329. package/dist/it-IT-DIbH-udG.js +27 -0
  330. package/dist/it-IT-DLm11dH5.js +13 -0
  331. package/dist/it-IT-Erh1DIlj.js +68 -0
  332. package/dist/it-IT-MwpjRAG6.js +29 -0
  333. package/dist/it-IT-NCFAqV1F.js +113 -0
  334. package/dist/it-IT-Qfzc8jnW.js +37 -0
  335. package/dist/it-IT-yV7ewjWU.js +13 -0
  336. package/dist/ja-JP-2u5fqLWF.js +29 -0
  337. package/dist/ja-JP-Bktpl_2b.js +118 -0
  338. package/dist/ja-JP-BoxeBgOv.js +32 -0
  339. package/dist/ja-JP-CHQ64lw1.js +37 -0
  340. package/dist/ja-JP-CSz7fEkn.js +55 -0
  341. package/dist/ja-JP-CWe8f7m4.js +13 -0
  342. package/dist/ja-JP-C_-moDrA.js +113 -0
  343. package/dist/ja-JP-CbgaW99b.js +54 -0
  344. package/dist/ja-JP-Ctsk4z4q.js +151 -0
  345. package/dist/ja-JP-CvNJvxkQ.js +218 -0
  346. package/dist/ja-JP-Dz9IVH4p.js +57 -0
  347. package/dist/ja-JP-FWHXsXlW.js +24 -0
  348. package/dist/ja-JP-ThzG9vIo.js +68 -0
  349. package/dist/ja-JP-bz7ekGnF.js +27 -0
  350. package/dist/localizeDateString-C-G2nUor.js +27 -0
  351. package/dist/location-Q4oKvnkl.js +17 -0
  352. package/dist/lt-LT-0RKZeraM.js +37 -0
  353. package/dist/lt-LT-B6XmKUXx.js +55 -0
  354. package/dist/lt-LT-BEsBoIQ9.js +29 -0
  355. package/dist/lt-LT-BLsIcCtE.js +27 -0
  356. package/dist/lt-LT-CU5qHa7a.js +113 -0
  357. package/dist/lt-LT-CYiW52tl.js +13 -0
  358. package/dist/lt-LT-Cg9c0kae.js +13 -0
  359. package/dist/lt-LT-Ci357QYQ.js +13 -0
  360. package/dist/lt-LT-D5Rhxm1h.js +32 -0
  361. package/dist/lt-LT-DDdq07sX.js +24 -0
  362. package/dist/lt-LT-DTQGR9M0.js +54 -0
  363. package/dist/lt-LT-Nd1uRoIj.js +68 -0
  364. package/dist/lt-LT-W6fTjwB5.js +13 -0
  365. package/dist/lt-LT-l9rzkFg9.js +57 -0
  366. package/dist/lv-LV-BQ4F1GrV.js +54 -0
  367. package/dist/lv-LV-Bh-WQp0K.js +37 -0
  368. package/dist/lv-LV-C7hMdPcY.js +27 -0
  369. package/dist/lv-LV-CG1zToz7.js +32 -0
  370. package/dist/lv-LV-CgMxfFK8.js +13 -0
  371. package/dist/lv-LV-CkyuY2ji.js +24 -0
  372. package/dist/lv-LV-CpGkmcLz.js +113 -0
  373. package/dist/lv-LV-CxUmQHF9.js +13 -0
  374. package/dist/lv-LV-DKhV24CI.js +68 -0
  375. package/dist/lv-LV-DYbb5pkt.js +57 -0
  376. package/dist/lv-LV-DsSpy50n.js +55 -0
  377. package/dist/lv-LV-DsxFGThp.js +13 -0
  378. package/dist/lv-LV-Dxe-A5vo.js +13 -0
  379. package/dist/lv-LV-Veji7-on.js +29 -0
  380. package/dist/mail-BOdyoVqB.js +14 -0
  381. package/dist/mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js +56 -0
  382. package/dist/mapExistingFile-BhW5UmN9.js +156 -0
  383. package/dist/mapFinancialReportsToFinancialInformation-Dl-cl9eQ.js +67 -0
  384. package/dist/mapJpAddressSchemaToAddressLocalizations-KFAvfuC1.js +63 -0
  385. package/dist/mapLegalEntityToIndividualOnfidoSchema-D51tRiYd.js +143 -0
  386. package/dist/mapTransferInstrumentToPayoutAccount-CU5wx0wJ.js +33 -0
  387. package/dist/minus-circle-filled-kC2IUvKz.js +17 -0
  388. package/dist/nl-NL-BMUYBqlF.js +57 -0
  389. package/dist/nl-NL-Bk-1-C0e.js +13 -0
  390. package/dist/nl-NL-BuW3jWdI.js +29 -0
  391. package/dist/nl-NL-Bx5p0nXL.js +24 -0
  392. package/dist/nl-NL-CMw-FwQV.js +13 -0
  393. package/dist/nl-NL-CTf7zH4M.js +55 -0
  394. package/dist/nl-NL-Cjlmc0Ii.js +32 -0
  395. package/dist/nl-NL-D7gBNWEY.js +37 -0
  396. package/dist/nl-NL-DKMs4pB2.js +13 -0
  397. package/dist/nl-NL-DMpB18Te.js +113 -0
  398. package/dist/nl-NL-JChnFdCY.js +13 -0
  399. package/dist/nl-NL-NlkjOSYi.js +27 -0
  400. package/dist/nl-NL-O9GCHMDA.js +68 -0
  401. package/dist/no-NO--OoWld_l.js +13 -0
  402. package/dist/no-NO-B-oUwe9q.js +13 -0
  403. package/dist/no-NO-Bs3-6MDM.js +24 -0
  404. package/dist/no-NO-C-gCYc9q.js +37 -0
  405. package/dist/no-NO-CA0EizAy.js +29 -0
  406. package/dist/no-NO-CA1aR6Wh.js +68 -0
  407. package/dist/no-NO-CY_XHrYd.js +32 -0
  408. package/dist/no-NO-Ca5qoVaU.js +113 -0
  409. package/dist/no-NO-Crlsj6HG.js +27 -0
  410. package/dist/no-NO-DKbWxgF-.js +57 -0
  411. package/dist/no-NO-DN9qf-_I.js +13 -0
  412. package/dist/no-NO-Dhj0Fh__.js +13 -0
  413. package/dist/no-NO-RfTK9KAV.js +55 -0
  414. package/dist/options-horizontal-CBmbNv7R.js +18 -0
  415. package/dist/partner-CPjsrePY.js +18 -0
  416. package/dist/pay-by-link-plane-BVZndh67.js +22 -0
  417. package/dist/payout-ChUEoLjt.js +20 -0
  418. package/dist/payout-verification-instant-5u-wvFKv.js +41 -0
  419. package/dist/payout-verification-manual-BH2mu0UW.js +90 -0
  420. package/dist/person-DGjUU4S4.js +17 -0
  421. package/dist/pl-PL-B0zGy_b4.js +57 -0
  422. package/dist/pl-PL-BKDK0_G8.js +68 -0
  423. package/dist/pl-PL-BSI0zHO1.js +113 -0
  424. package/dist/pl-PL-BzhEoDb5.js +24 -0
  425. package/dist/pl-PL-C_MvVzPy.js +32 -0
  426. package/dist/pl-PL-D7nhdbfR.js +29 -0
  427. package/dist/pl-PL-DGSYzOx6.js +13 -0
  428. package/dist/pl-PL-DYxD6VJ_.js +27 -0
  429. package/dist/pl-PL-DtJ3sgVO.js +13 -0
  430. package/dist/pl-PL-Duj3tncM.js +13 -0
  431. package/dist/pl-PL-Dy8qWH39.js +55 -0
  432. package/dist/pl-PL-LnVPufjb.js +37 -0
  433. package/dist/pl-PL-kGaeUP-w.js +54 -0
  434. package/dist/pl-PL-p8YxqOFg.js +13 -0
  435. package/dist/plus-CWXA5wdX.js +14 -0
  436. package/dist/plus-circle-filled-CbC0u2Y1.js +17 -0
  437. package/dist/process-field-configurations-DoOFQqtn.js +324 -0
  438. package/dist/pt-BR--kaJvtE6.js +57 -0
  439. package/dist/pt-BR-BbFJsIVX.js +55 -0
  440. package/dist/pt-BR-Be5ZycMV.js +13 -0
  441. package/dist/pt-BR-BfxgHKY4.js +27 -0
  442. package/dist/pt-BR-C0I_kTQ6.js +13 -0
  443. package/dist/pt-BR-CBAe0SnK.js +32 -0
  444. package/dist/pt-BR-Cj8MlQyq.js +113 -0
  445. package/dist/pt-BR-Cm4vZocb.js +13 -0
  446. package/dist/pt-BR-D1nTSLod.js +29 -0
  447. package/dist/pt-BR-DKrMpM6v.js +13 -0
  448. package/dist/pt-BR-DSENwwGu.js +24 -0
  449. package/dist/pt-BR-NtLaWlnZ.js +68 -0
  450. package/dist/pt-BR-nU_2Wbo5.js +54 -0
  451. package/dist/pt-BR-ur86nRrK.js +37 -0
  452. package/dist/pt-PT-B4F_5NWi.js +55 -0
  453. package/dist/pt-PT-B9L50746.js +29 -0
  454. package/dist/pt-PT-BJjCTMYf.js +13 -0
  455. package/dist/pt-PT-BJkVzfAJ.js +113 -0
  456. package/dist/pt-PT-BR-BI5Jn.js +13 -0
  457. package/dist/pt-PT-BZ5ZZm6G.js +57 -0
  458. package/dist/pt-PT-Bf4IV7wp.js +13 -0
  459. package/dist/pt-PT-Bh7v8xbp.js +13 -0
  460. package/dist/pt-PT-CIo3mlXL.js +24 -0
  461. package/dist/pt-PT-CVNEcs32.js +37 -0
  462. package/dist/pt-PT-DSxxVA0f.js +68 -0
  463. package/dist/pt-PT-Dm5DRDrd.js +32 -0
  464. package/dist/pt-PT-TKg5FLat.js +27 -0
  465. package/dist/recurring-CkL4cCM2.js +17 -0
  466. package/dist/reporting-DerosUNm.js +16 -0
  467. package/dist/resolveEnvironment-Dyejukh7.js +164 -0
  468. package/dist/revenue-accelerate-Dp4Ns_5c.js +17 -0
  469. package/dist/ro-RO-3rOfS17N.js +27 -0
  470. package/dist/ro-RO-4j2I7YM7.js +13 -0
  471. package/dist/ro-RO-5I4Q_FyK.js +13 -0
  472. package/dist/ro-RO-B5YT9vP-.js +32 -0
  473. package/dist/ro-RO-B8leE4ZJ.js +13 -0
  474. package/dist/ro-RO-Bybq8JFn.js +68 -0
  475. package/dist/ro-RO-C83h2zHZ.js +54 -0
  476. package/dist/ro-RO-CICjAFys.js +55 -0
  477. package/dist/ro-RO-CdSsgoUG.js +57 -0
  478. package/dist/ro-RO-DjGku_3y.js +13 -0
  479. package/dist/ro-RO-DvG65dTt.js +29 -0
  480. package/dist/ro-RO-ILTvlS9i.js +24 -0
  481. package/dist/ro-RO-RgC5M6CE.js +113 -0
  482. package/dist/ro-RO-i7lojG2G.js +37 -0
  483. package/dist/rules-DP604XPJ.js +314 -0
  484. package/dist/save-Fgy7EDid.js +14 -0
  485. package/dist/search-C4GZ-Rc1.js +17 -0
  486. package/dist/show-yPjPmEf8.js +17 -0
  487. package/dist/sk-SK-0BVxI7bf.js +113 -0
  488. package/dist/sk-SK-B5brxU1N.js +37 -0
  489. package/dist/sk-SK-BMJgOJoa.js +29 -0
  490. package/dist/sk-SK-BRd5TN22.js +55 -0
  491. package/dist/sk-SK-BVmoP_EU.js +13 -0
  492. package/dist/sk-SK-BWwRIx2d.js +13 -0
  493. package/dist/sk-SK-Bb18qPBw.js +13 -0
  494. package/dist/sk-SK-BiBWPJUf.js +57 -0
  495. package/dist/sk-SK-C5Qmv4E6.js +13 -0
  496. package/dist/sk-SK-C6rMIxpz.js +68 -0
  497. package/dist/sk-SK-CgLJIuJw.js +54 -0
  498. package/dist/sk-SK-CjrLvDMx.js +27 -0
  499. package/dist/sk-SK-Cv23cDQO.js +24 -0
  500. package/dist/sk-SK-S6iF1WDH.js +32 -0
  501. package/dist/sl-SI-6s8xycKg.js +13 -0
  502. package/dist/sl-SI-BMF8YtOm.js +29 -0
  503. package/dist/sl-SI-BZpXMHiG.js +13 -0
  504. package/dist/sl-SI-BxImW_RL.js +113 -0
  505. package/dist/sl-SI-C-C-KJCX.js +27 -0
  506. package/dist/sl-SI-CUCrzJQv.js +37 -0
  507. package/dist/sl-SI-CaJmYb6p.js +13 -0
  508. package/dist/sl-SI-D8dDckrW.js +55 -0
  509. package/dist/sl-SI-DEaeEVKB.js +24 -0
  510. package/dist/sl-SI-DqUEy_Cm.js +32 -0
  511. package/dist/sl-SI-DtdGMD6i.js +57 -0
  512. package/dist/sl-SI-ZxyvdgdS.js +13 -0
  513. package/dist/sl-SI-tPwbFvOI.js +68 -0
  514. package/dist/solution-payments-CNAat9h7.js +14 -0
  515. package/dist/store-IuAkDRAp.js +14 -0
  516. package/dist/style.css +2143 -1744
  517. package/dist/styles-CLV89_hH.js +2143 -1744
  518. package/dist/sv-SE-B1sbgsnh.js +13 -0
  519. package/dist/sv-SE-BHfydid5.js +27 -0
  520. package/dist/sv-SE-BUq1X9F0.js +113 -0
  521. package/dist/sv-SE-BYC_f8r7.js +29 -0
  522. package/dist/sv-SE-C6uPh9g5.js +37 -0
  523. package/dist/sv-SE-CCFIf86P.js +13 -0
  524. package/dist/sv-SE-CRBRuE8Z.js +32 -0
  525. package/dist/sv-SE-CXaMlJCI.js +24 -0
  526. package/dist/sv-SE-DGpvVvWj.js +55 -0
  527. package/dist/sv-SE-D_ZnGxiQ.js +13 -0
  528. package/dist/sv-SE-DsPdegWB.js +13 -0
  529. package/dist/sv-SE-K1QT1cOt.js +68 -0
  530. package/dist/sv-SE-kR514dO1.js +57 -0
  531. package/dist/terminal-1-_me9J9h0.js +18 -0
  532. package/dist/trackNavigation-db_h46BT.js +28 -0
  533. package/dist/types/api/address/useAddressCleanse.d.ts +6 -2
  534. package/dist/types/api/address/useRetrieveAddress.d.ts +3 -1
  535. package/dist/types/api/address/useRetrieveFromPostcodeJp.d.ts +18 -0
  536. package/dist/types/api/businessLines/businessLines.types.d.ts +16 -0
  537. package/dist/types/api/businessLines/useBusinessLines.d.ts +4 -2
  538. package/dist/types/api/businessLines/useCreateBusinessLine.d.ts +7 -0
  539. package/dist/types/api/businessLines/useDeleteBusinessLine.d.ts +5 -0
  540. package/dist/types/api/businessLines/useUpdateBusinessLines.d.ts +7 -0
  541. package/dist/types/api/businessLines/useUpdateSourceOfFunds.d.ts +1 -0
  542. package/dist/types/api/companySearch/useCompanySearch.d.ts +1 -0
  543. package/dist/types/api/configurations/useScenarios.d.ts +12 -12
  544. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +15 -0
  545. package/dist/types/api/industryCodes/industryCodes.types.d.ts +2 -1
  546. package/dist/types/api/industryCodes/useIndustryCodes.d.ts +3 -3
  547. package/dist/types/api/legalEntity/useLegalEntity.d.ts +16 -16
  548. package/dist/types/api/pci/pci.types.d.ts +17 -0
  549. package/dist/types/api/pci/usePciQuestionnaire.d.ts +6 -0
  550. package/dist/types/api/pci/usePciQuestionnaireList.d.ts +12 -0
  551. package/dist/types/api/pci/usePciStatus.d.ts +6 -0
  552. package/dist/types/api/pci/usePciTemplate.d.ts +8 -0
  553. package/dist/types/api/queryKeys.d.ts +5 -4
  554. package/dist/types/components/BankAccount/fields/BankAccountFormat/types.d.ts +2 -1
  555. package/dist/types/components/BankAccount/fields/PreferredCurrency/PreferredCurrency.d.ts +10 -0
  556. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentClassification.d.ts +5 -0
  557. package/dist/types/components/BankAccount/forms/BankDocument/BankDocumentRequirementsModal.d.ts +6 -0
  558. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +2 -2
  559. package/dist/types/components/BankAccount/forms/BankDocument/validate.d.ts +3 -0
  560. package/dist/types/components/BankAccount/forms/BankVerification/BankVerification.d.ts +1 -1
  561. package/dist/types/components/BankAccount/forms/BankVerification/types.d.ts +7 -0
  562. package/dist/types/components/BankAccount/forms/BankVerification/verification/overlay/BankVerificationOverlay.d.ts +3 -0
  563. package/dist/types/components/BankAccount/forms/PayoutAccount/payoutAccountFormat.d.ts +1 -1
  564. package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +2 -0
  565. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutCountryDetails.d.ts +3 -0
  566. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/PayoutRequirementsModal.d.ts +8 -0
  567. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/types.d.ts +13 -0
  568. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +6 -1
  569. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +2 -0
  570. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/PayoutVerificationMethod.d.ts +1 -2
  571. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/payoutVerificationMethodMetadata.d.ts +5 -5
  572. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/utils.d.ts +2 -0
  573. package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +3 -2
  574. package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +2 -1
  575. package/dist/types/components/BankAccount/mapping/mapTransferInstrumentToPayoutAccount.d.ts +1 -1
  576. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +1052 -642
  577. package/dist/types/components/BankAccount/pages/PayoutDetailsPage.d.ts +1 -1
  578. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/PayoutDetailsDropin.d.ts +1 -0
  579. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/payoutDetailsFormConfig.d.ts +1 -1
  580. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +3 -3
  581. package/dist/types/components/BankAccount/utils/payoutAccountUtil.d.ts +5 -4
  582. package/dist/types/components/Business/forms/AdditionalInformation/types.d.ts +2 -1
  583. package/dist/types/components/Business/forms/BasicInformation/BasicInformationMultiform.d.ts +5 -3
  584. package/dist/types/components/Business/forms/RegistrationDocument/types.d.ts +3 -3
  585. package/dist/types/components/Business/forms/TaxDocument/types.d.ts +3 -3
  586. package/dist/types/components/Business/forms/rules.d.ts +3 -1
  587. package/dist/types/components/Business/pages/RootBusinessDetailsPage.d.ts +1 -1
  588. package/dist/types/components/Business/tasks/BusinessDetailsDropin/businessDetailsStore.d.ts +5 -4
  589. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +9 -6
  590. package/dist/types/components/Business/tasks/BusinessDetailsDropin/utils.d.ts +3 -3
  591. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/BusinessDetailsMultiform.d.ts +2 -1
  592. package/dist/types/components/Business/tasks/BusinessDetailsMultiformDropin/utils.d.ts +0 -2
  593. package/dist/types/components/Business/utils/applyVerifiedBusinessData.d.ts +5 -0
  594. package/dist/types/components/Business/utils/companyTypeMetadata.d.ts +3 -3
  595. package/dist/types/components/Business/utils/requestingCapabilities.d.ts +3 -0
  596. package/dist/types/components/BusinessLines/constants.d.ts +23 -0
  597. package/dist/types/components/BusinessLines/fields/Carousel/Carousel.d.ts +30 -0
  598. package/dist/types/components/BusinessLines/fields/SalesChannels/SalesChannels.d.ts +2 -0
  599. package/dist/types/components/BusinessLines/fields/SalesChannels/types.d.ts +6 -0
  600. package/dist/types/components/BusinessLines/fields/WebDataField/WebDataField.d.ts +2 -0
  601. package/dist/types/components/BusinessLines/fields/WebDataField/types.d.ts +6 -0
  602. package/dist/types/components/BusinessLines/forms/IndustryCodesForm/IndustryCodesForm.d.ts +2 -0
  603. package/dist/types/components/BusinessLines/forms/IndustryCodesForm/types.d.ts +2 -0
  604. package/dist/types/components/BusinessLines/forms/SalesChannelsForm/SalesChannelsForm.d.ts +2 -0
  605. package/dist/types/components/BusinessLines/forms/SalesChannelsForm/types.d.ts +3 -0
  606. package/dist/types/components/BusinessLines/forms/rules.d.ts +5 -0
  607. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLineModal/BusinessLineModal.d.ts +6 -0
  608. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLines.d.ts +9 -0
  609. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesDropin.d.ts +2 -0
  610. package/dist/types/components/BusinessLines/tasks/BusinessLines/BusinessLinesStore.d.ts +3 -0
  611. package/dist/types/components/BusinessLines/tasks/BusinessLines/ExistingBusinessLines/ExistingBusinessLines.d.ts +8 -0
  612. package/dist/types/components/BusinessLines/tasks/types.d.ts +17 -0
  613. package/dist/types/components/BusinessLines/tasks/utils.d.ts +21 -0
  614. package/dist/types/components/BusinessLines/tasks/validate.d.ts +9 -0
  615. package/dist/types/components/Contract/hooks/useSalesChannels.d.ts +2 -0
  616. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +1328 -758
  617. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBasicCompanyInformation.d.ts +0 -1
  618. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBusinessInformation.d.ts +0 -1
  619. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.d.ts +0 -1
  620. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingOwnershipStructure.d.ts +0 -1
  621. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.d.ts +0 -1
  622. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +7 -5
  623. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsType.d.ts +3 -0
  624. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/sofStore.d.ts +1 -1
  625. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +14 -13
  626. package/dist/types/components/EFP/tasks/TaxReportingDropin/taxClassificationStore.d.ts +1 -1
  627. package/dist/types/components/EFP/tasks/TaxReportingDropin/utils.d.ts +6 -6
  628. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/BusinessFinancingComponent.d.ts +1 -1
  629. package/dist/types/components/EmbeddedDropins/BusinessFinancingComponent/utils.d.ts +3 -3
  630. package/dist/types/components/EmbeddedDropins/SignPCIComponent/SignPCIComponent.d.ts +3 -1
  631. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/content.d.ts +3 -3
  632. package/dist/types/components/Individual/fields/NameFields/NameFields.d.ts +3 -0
  633. package/dist/types/components/Individual/forms/Individual/IdVerification/idVerificationProviderId.d.ts +1 -1
  634. package/dist/types/components/Individual/forms/Individual/IdVerificationMethod/idVerificationMethodMetadata.d.ts +3 -3
  635. package/dist/types/components/Individual/forms/IndividualOnfido/AdditionalPersonalDetails/AdditionalPersonalDetails.types.d.ts +2 -1
  636. package/dist/types/components/Individual/forms/IndividualOnfido/IdNowVerificationModal/isIdNowModalOpen.d.ts +3 -3
  637. package/dist/types/components/Individual/forms/IndividualOnfido/IndividualOnfido.rules.d.ts +1 -1
  638. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaire.types.d.ts +4 -1
  639. package/dist/types/components/Individual/forms/IndividualOnfido/UboQuestionnaire/UboQuestionnaireModalContent.d.ts +3 -1
  640. package/dist/types/components/Individual/helpers/shouldShowMotionCapture.d.ts +2 -2
  641. package/dist/types/components/Individual/pages/DecisionMakerDetailsPage.d.ts +2 -8
  642. package/dist/types/components/Individual/pages/RootIndividualDetailsPage.d.ts +2 -6
  643. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.d.ts +1 -1
  644. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +2 -0
  645. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +57 -0
  646. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/RemediationAlerts.d.ts +7 -0
  647. package/dist/types/components/Individual/tasks/DecisionMakers/RemediationAlerts/remediation.config.d.ts +19 -0
  648. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +0 -2
  649. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +3 -0
  650. package/dist/types/components/Individual/tasks/IndividualOnfidoDropin/IndividualOnfidoStore.d.ts +1 -1
  651. package/dist/types/components/Shared/EntityAssociation/EntityAssociation.d.ts +1 -1
  652. package/dist/types/components/Shared/EntityAssociation/types.d.ts +2 -4
  653. package/dist/types/components/Shared/FormNavigation/FormNavigation.d.ts +1 -1
  654. package/dist/types/components/Shared/FormNavigation/types.d.ts +0 -2
  655. package/dist/types/components/Shared/FormWrapper/FormWrapper.d.ts +1 -3
  656. package/dist/types/components/Shared/Introduction/copy.d.ts +2 -2
  657. package/dist/types/components/Shared/Summary/Summary.d.ts +1 -1
  658. package/dist/types/components/Shared/Summary/types.d.ts +1 -2
  659. package/dist/types/components/Shared/TaskVerificationStatus/TaskVerificationStatus.d.ts +18 -0
  660. package/dist/types/components/Shared/devex/DebugListener/DebugFormData.d.ts +1 -0
  661. package/dist/types/components/Shared/devex/DebugListener/debugStore.d.ts +5 -0
  662. package/dist/types/components/Shared/fields/IdFieldTypeSelector/VatNumberTypeSelector.d.ts +1 -1
  663. package/dist/types/components/Shared/fields/IndustryCodeField/IndustryCodeField.d.ts +4 -0
  664. package/dist/types/components/Shared/fields/IndustryCodeField/fieldConfig.d.ts +3 -0
  665. package/dist/types/components/Shared/fields/IndustryCodeField/types.d.ts +22 -0
  666. package/dist/types/components/Shared/fields/IndustryCodeField/validate.d.ts +3 -0
  667. package/dist/types/components/Shared/fields/LocalizedLegalCompanyNameField/fieldConfig.d.ts +4 -4
  668. package/dist/types/components/Shared/forms/Address/localized/jp/JpAddress.d.ts +7 -0
  669. package/dist/types/components/Shared/forms/Address/localized/jp/ReadonlyTextField.d.ts +7 -0
  670. package/dist/types/components/Shared/forms/Address/localized/jp/jpAddressSchema.d.ts +5 -0
  671. package/dist/types/components/Shared/forms/Address/localized/jp/mapAddressLocalizationToJpAddressSchema.d.ts +3 -0
  672. package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSchemaToAddressLocalizations.d.ts +3 -0
  673. package/dist/types/components/Shared/forms/Address/localized/jp/mapJpAddressSummary.d.ts +4 -0
  674. package/dist/types/components/Shared/forms/Address/utils.d.ts +3 -2
  675. package/dist/types/components/Shared/forms/FinancialInformation/formatFinancialInformationSummary.d.ts +1 -2
  676. package/dist/types/components/Shared/forms/RegistrationAddress/RegistrationAddressMultiform.d.ts +3 -0
  677. package/dist/types/components/Shared/forms/RegistrationAddress/types.d.ts +3 -2
  678. package/dist/types/components/Shared/tasks/CustomerSupport/mapping/customerSupportKeyMapping.d.ts +4 -0
  679. package/dist/types/components/Shared/tasks/TaskList/TaskList.d.ts +3 -1
  680. package/dist/types/components/Shared/tasks/TaskList/TaskListItem.d.ts +1 -1
  681. package/dist/types/components/Shared/tasks/TaskList/types.d.ts +4 -12
  682. package/dist/types/components/Shared/tasks/TaskList/utils.d.ts +1 -1
  683. package/dist/types/components/SoleProprietorship/pages/SoleProprietorshipPage.d.ts +1 -2
  684. package/dist/types/components/Trust/forms/TrustRegistrationDetails/TrustRegistrationDetailsMultiform.d.ts +2 -0
  685. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -16
  686. package/dist/types/components/Trust/pages/TrustMemberCompanyPage.d.ts +1 -2
  687. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/formatRoleAndEntityTypeSummary.d.ts +2 -2
  688. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiform.d.ts +21 -0
  689. package/dist/types/components/Trust/tasks/TrustDropin/TrustMultiformDropin.d.ts +2 -0
  690. package/dist/types/components/Trust/tasks/TrustDropin/validate.d.ts +5 -0
  691. package/dist/types/components/UnincorporatedPartnership/pages/UnincorporatedPartnershipMemberCompanyPage.d.ts +1 -2
  692. package/dist/types/components/ui/atoms/Header/Header.d.ts +12 -0
  693. package/dist/types/components/ui/atoms/ListItem/ListItem.d.ts +1 -2
  694. package/dist/types/components/ui/atoms/RadioCard/RadioCard.d.ts +1 -0
  695. package/dist/types/components/ui/atoms/RadioGroup/RadioGroup.d.ts +1 -1
  696. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.d.ts +4 -4
  697. package/dist/types/components/ui/atoms/RadioGroupCard/RadioGroupCard.types.d.ts +8 -9
  698. package/dist/types/components/ui/atoms/Status/Status.d.ts +9 -3
  699. package/dist/types/components/ui/atoms/Svg/svgs.d.ts +6 -0
  700. package/dist/types/components/ui/atoms/TileGroup/TileGroup.d.ts +3 -1
  701. package/dist/types/components/ui/atoms/Typography/Typography.types.d.ts +1 -1
  702. package/dist/types/components/ui/layout/StackLayout/StackLayout.d.ts +29 -7
  703. package/dist/types/components/ui/molecules/Card/Card.d.ts +1 -1
  704. package/dist/types/components/ui/molecules/Card/types.d.ts +1 -0
  705. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +1 -2
  706. package/dist/types/components/ui/molecules/Dropzone/FilePicker.d.ts +2 -1
  707. package/dist/types/components/ui/molecules/Dropzone/types.d.ts +1 -0
  708. package/dist/types/components/ui/molecules/EmbeddedStatus/EmbeddedStatus.d.ts +2 -23
  709. package/dist/types/components/ui/molecules/EmbeddedStatus/statusToTag.d.ts +3 -3
  710. package/dist/types/components/ui/molecules/EmbeddedStatus/types.d.ts +23 -0
  711. package/dist/types/context/ExperimentContext/types.d.ts +24 -20
  712. package/dist/types/context/I18nProvider/I18nContext.d.ts +3 -0
  713. package/dist/types/context/SettingsContext/SettingsProvider.d.ts +1 -1
  714. package/dist/types/context/SettingsContext/types.d.ts +3 -0
  715. package/dist/types/context/StateContext/types.d.ts +2 -1
  716. package/dist/types/core/errorMapping.d.ts +4 -1
  717. package/dist/types/core/models/api/address.d.ts +5 -0
  718. package/dist/types/core/models/api/capability.d.ts +20 -0
  719. package/dist/types/core/models/api/legal-entity-association.d.ts +1 -1
  720. package/dist/types/core/models/api/source-of-funds.d.ts +5 -0
  721. package/dist/types/core/models/api/transfer-instrument.d.ts +2 -0
  722. package/dist/types/core/process-field-configurations.d.ts +4 -1
  723. package/dist/types/core/user-events.d.ts +22 -11
  724. package/dist/types/datasets/generators/getAccountFormatForCountry.d.ts +1 -0
  725. package/dist/types/embeds/individual-configuration/AdyenIndividual.d.ts +3 -3
  726. package/dist/types/embeds/individual-configuration/adyen-individual-configuration.types.d.ts +5 -5
  727. package/dist/types/embeds/individual-status/AdyenManageIndividual.d.ts +3 -3
  728. package/dist/types/embeds/individual-status/adyen-individual-status.types.d.ts +5 -5
  729. package/dist/types/embeds/terms-of-service-management/AdyenTermsOfService.d.ts +3 -3
  730. package/dist/types/embeds/terms-of-service-management/adyen-terms-of-service-management.types.d.ts +5 -5
  731. package/dist/types/embeds/terms-of-service-status/AdyenManageTermsOfService.d.ts +3 -3
  732. package/dist/types/embeds/terms-of-service-status/adyen-terms-of-service-status.types.d.ts +39 -0
  733. package/dist/types/embeds/transfer-instrument-configuration/AdyenTransferInstrument.d.ts +3 -3
  734. package/dist/types/embeds/transfer-instrument-configuration/adyen-transfer-instrument-configuration.types.d.ts +5 -5
  735. package/dist/types/embeds/transfer-instrument-management/AdyenManageTransferInstrument.d.ts +3 -3
  736. package/dist/types/embeds/transfer-instrument-management/adyen-transfer-instrument-management.types.d.ts +5 -5
  737. package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +2 -6
  738. package/dist/types/hooks/useAnalytics/useAnalytics.d.ts +16 -0
  739. package/dist/types/hooks/useLegalCompanyNameField/useLegalCompanyNameField.d.ts +6 -8
  740. package/dist/types/hooks/useUboQuestionnaire.d.ts +25 -0
  741. package/dist/types/language/Language.d.ts +10 -0
  742. package/dist/types/language/types.d.ts +21 -7
  743. package/dist/types/language/utils.d.ts +2 -2
  744. package/dist/types/stores/globalStore/taskTypes.d.ts +1 -1
  745. package/dist/types/types/form-rules.d.ts +2 -0
  746. package/dist/types/utils/addLinkedFields.d.ts +26 -2
  747. package/dist/types/utils/analytics/convertToEmbeddedEvent.d.ts +9 -0
  748. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +30 -0
  749. package/dist/types/utils/analytics/getAnalyticsAssociatedEntityDetails.d.ts +13 -0
  750. package/dist/types/utils/analytics/trackNavigation.d.ts +10 -0
  751. package/dist/types/utils/api/documentUtils.d.ts +1 -0
  752. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  753. package/dist/types/utils/filterProblemsByTaskForms.d.ts +12 -0
  754. package/dist/types/utils/getName.d.ts +1 -1
  755. package/dist/types/utils/getSSNType.d.ts +1 -0
  756. package/dist/types/utils/getTrustedFields.d.ts +9 -0
  757. package/dist/types/utils/textTransformation/toFullWidth.d.ts +6 -0
  758. package/dist/types/utils/translation.d.ts +3 -2
  759. package/dist/types/utils/validatorUtils.d.ts +1 -0
  760. package/dist/types-C972Lk6s.js +34 -0
  761. package/dist/types-CLz74bOT.js +88 -0
  762. package/dist/types-Ctv8hbzY.js +74 -0
  763. package/dist/types-f66rmUFy.js +164 -0
  764. package/dist/upload-BF65P4KM.js +17 -0
  765. package/dist/useAssociatedLegalEntity-DAB1oG6O.js +33 -0
  766. package/dist/useCreateLegalEntity-BK5YcHA-.js +31 -0
  767. package/dist/useDataset-BtfHQp4w.js +220 -0
  768. package/dist/useForm-wQyeWa1b.js +1623 -0
  769. package/dist/useGlobalData-B33uuhtd.js +68 -0
  770. package/dist/useMultiForm-rZmCYsI4.js +864 -0
  771. package/dist/useOnboardingStatus-BbIpiZR4.js +27 -0
  772. package/dist/useScenarios-DPOodENA.js +46 -0
  773. package/dist/useTermsOfServiceStatus-DKeMR4Xi.js +42 -0
  774. package/dist/useToastContext-BK9oGWtb.js +60 -0
  775. package/dist/useUnincorporatedPartnershipMembers-Cdts5Hbn.js +99 -0
  776. package/dist/useUpdateBusinessLines-CWYtpMwr.js +46 -0
  777. package/dist/useUpdateLegalEntity-oa8qEzc4.js +39 -0
  778. package/dist/utils-AP5TpAhf.js +774 -0
  779. package/dist/utils-COz1RbbA.js +237 -0
  780. package/dist/validate-BYwVLb-X.js +41 -0
  781. package/dist/validate-CBVdP51L.js +100 -0
  782. package/dist/validationError-CvZLhw5H.js +86 -0
  783. package/dist/warning-circle-fill-CEN1WL7A.js +17 -0
  784. package/dist/warning-diamond-filled-BfXMlVrG.js +17 -0
  785. package/dist/webinar-DqjqrNEv.js +22 -0
  786. package/package.json +82 -83
  787. package/dist/4-people-CCqdlDEw.js +0 -24
  788. package/dist/AD-CyP5INSp.js +0 -23
  789. package/dist/AT-DJLlevck.js +0 -23
  790. package/dist/AcceptTermsOfServiceComponent-BF24NWVw.js +0 -657
  791. package/dist/AccountSetupRejected-2t22lJUo.js +0 -26
  792. package/dist/Address-DSwfzWFu.js +0 -1076
  793. package/dist/Alert-C24s_Ygs.js +0 -231
  794. package/dist/Avatar-DQjt5Lk2.js +0 -60
  795. package/dist/BE-B-m_4F41.js +0 -23
  796. package/dist/BG-BVR5ytc-.js +0 -27
  797. package/dist/BusinessDetailsDropin-CRFPvWuD.js +0 -5088
  798. package/dist/BusinessFinancingComponent-y2_kC8bx.js +0 -45
  799. package/dist/BusinessFinancingDropin-C-xm14b8.js +0 -1811
  800. package/dist/BusinessFinancingPage-BOG7yrw6.js +0 -40
  801. package/dist/BusinessTypeSelectionPage-ujY2jj6B.js +0 -426
  802. package/dist/CH-CesIKOYy.js +0 -23
  803. package/dist/CY-BnJ7k_mN.js +0 -23
  804. package/dist/CZ-BiPeoA9G.js +0 -33
  805. package/dist/Card-BMuquALf.js +0 -145
  806. package/dist/Confirm-DwutojkY.js +0 -64
  807. package/dist/CountryField-D0YZrov9.js +0 -864
  808. package/dist/CreateIndividualComponent-VZWLAo0l.js +0 -72
  809. package/dist/CreateTransferInstrumentComponent-OtReN6Cy.js +0 -67
  810. package/dist/Currency-BECbMsi5.js +0 -238
  811. package/dist/CustomerSupport-B8zC_huY.js +0 -141
  812. package/dist/DE-DdcbG-CC.js +0 -23
  813. package/dist/DK-DA8qRrzq.js +0 -33
  814. package/dist/DebugModal-CshTHx0o.js +0 -328
  815. package/dist/DecisionMakerDetailsPage-BJUwR4R7.js +0 -100
  816. package/dist/DecisionMakers-BDNa3HcC.js +0 -591
  817. package/dist/Dropzone-D6dXhmL4.js +0 -218
  818. package/dist/EE-CaXoPgZz.js +0 -23
  819. package/dist/ES-Bt_oaIaf.js +0 -23
  820. package/dist/EmbeddedStatus-BHTZcjUN.js +0 -100
  821. package/dist/EndStateLayout-CyGtLyvf.js +0 -71
  822. package/dist/FI-C5V3lLuN.js +0 -23
  823. package/dist/FR-Bc1tLIC4.js +0 -23
  824. package/dist/FormFlow-CZ9f5X0C.js +0 -216
  825. package/dist/FormNavigation-ezxkIqdb.js +0 -162
  826. package/dist/GG-BGuqxplU.js +0 -33
  827. package/dist/GI-CROkpYrU.js +0 -41
  828. package/dist/GR-B9c2boG8.js +0 -23
  829. package/dist/HR-p4luVYpu.js +0 -23
  830. package/dist/HU-D8vJYkDH.js +0 -32
  831. package/dist/IE-Cli_j7Al.js +0 -23
  832. package/dist/IM-mpIyBn16.js +0 -33
  833. package/dist/IS-02zCAdvq.js +0 -27
  834. package/dist/IT-CzURFhrK.js +0 -23
  835. package/dist/IndividualOnfidoDropin-vuHu-O_C.js +0 -7874
  836. package/dist/InputDate-CHygOGiS.js +0 -43
  837. package/dist/InputGroup-WBfGDV5F.js +0 -32
  838. package/dist/InputText-BX5sG9WJ.js +0 -161
  839. package/dist/Introduction-BsKwELuc.js +0 -304
  840. package/dist/JE-MFwIYti7.js +0 -33
  841. package/dist/LI-DA06W10W.js +0 -23
  842. package/dist/LT-DuU6E2Ct.js +0 -23
  843. package/dist/LU-BQHhNpDy.js +0 -23
  844. package/dist/LV-DN7wckbP.js +0 -23
  845. package/dist/LegalRepresentativeDetailsPage-DtMHe1Nq.js +0 -61
  846. package/dist/Link-BFdxU8qh.js +0 -35
  847. package/dist/MC-DtSWC4jS.js +0 -23
  848. package/dist/MT-DeDMQ1f_.js +0 -23
  849. package/dist/ManageIndividualComponent-By_fCmN1.js +0 -47
  850. package/dist/ManageTermsOfServiceComponent-D7F44OPD.js +0 -47
  851. package/dist/ManageTransferInstrumentComponent-DywpP5PK.js +0 -294
  852. package/dist/MaskedInput-BZ7t98eu.js +0 -799
  853. package/dist/MaybeModal-CE9kYOrU.js +0 -25
  854. package/dist/Modal-nMRQDTF7.js +0 -136
  855. package/dist/NL-aVL0NAp-.js +0 -23
  856. package/dist/NO-D7EOiQA1.js +0 -32
  857. package/dist/OnboardingDropinComponent-B0GrJ_pR.js +0 -4301
  858. package/dist/PL-Bg7axKQA.js +0 -32
  859. package/dist/PT-hB1HnBM2.js +0 -23
  860. package/dist/PayoutDetailsDropin-BJIqXmPn.js +0 -3694
  861. package/dist/RO-BLlC4CKq.js +0 -23
  862. package/dist/RadioGroup-CYDXrtrO.js +0 -143
  863. package/dist/RegistrationAddress-qtMZa31b.js +0 -2334
  864. package/dist/Review-D7NEYFoT.js +0 -82
  865. package/dist/RootBusinessDetailsPage-rCbGLBEv.js +0 -1870
  866. package/dist/RootIndividualDetailsPage-B3TkB6Xj.js +0 -77
  867. package/dist/SE-q25Qt85B.js +0 -33
  868. package/dist/SI-BzA-ozn6.js +0 -23
  869. package/dist/SK-DOTdLJPw.js +0 -23
  870. package/dist/SM-B4BIgmhk.js +0 -23
  871. package/dist/SignPCIComponent-C0iYfSl6.js +0 -294
  872. package/dist/SingpassSelection-ClMlwfoj.js +0 -130
  873. package/dist/SoleProprietorshipPage-JKNrAy74.js +0 -50
  874. package/dist/SourceOfFundsPage-D-pN33-9.js +0 -3101
  875. package/dist/Spacer-BK3jDget.js +0 -18
  876. package/dist/StepProgressIndicator-BWCQmDeV.js +0 -78
  877. package/dist/StoreProvider-BlaJzXSZ.js +0 -7072
  878. package/dist/StructuredList-DaepaiVE.js +0 -38
  879. package/dist/TaskItemStatus-B38keERo.js +0 -125
  880. package/dist/TaskStatusIndicator-BIvTrQtf.js +0 -69
  881. package/dist/TaxInformationField-DS0m73if.js +0 -3062
  882. package/dist/TaxReportingDropin-CVbVkFhv.js +0 -499
  883. package/dist/TileGroup-CztY53P9.js +0 -174
  884. package/dist/TrustDetailsPage-C791Wu5u.js +0 -1205
  885. package/dist/TrustMemberCompanyPage-BOQ5D3y4.js +0 -60
  886. package/dist/TrustMemberIndividualPage-BPIXX2Mh.js +0 -66
  887. package/dist/UnincorporatedPartnershipIndividualPage-vzn0R02z.js +0 -66
  888. package/dist/UnincorporatedPartnershipMemberCompanyPage-C-kGU5Sh.js +0 -64
  889. package/dist/VA-bPXdCnwD.js +0 -23
  890. package/dist/ViewVerificationStatusComponent-BTW-Vw9I.js +0 -177
  891. package/dist/analytics-3-a-Od7Z.js +0 -61
  892. package/dist/arrow-right-D_mdkZmE.js +0 -14
  893. package/dist/bafinUtils-Bar3qiJA.js +0 -457
  894. package/dist/bag-DpxmyXfR.js +0 -14
  895. package/dist/bank-gyBvaSp4.js +0 -14
  896. package/dist/bin-Bgdj6KzC.js +0 -18
  897. package/dist/capital-CF9_Ev99.js +0 -17
  898. package/dist/cash-stack-Ds76Du8m.js +0 -22
  899. package/dist/certificate-D6xjhThs.js +0 -17
  900. package/dist/checkmark-circle-fill-BhvuqTl9.js +0 -17
  901. package/dist/checkmark-circle-nACBJ24q.js +0 -20
  902. package/dist/checkmark-small-63w5fAxg.js +0 -14
  903. package/dist/checkmark-tfEAu7lj.js +0 -14
  904. package/dist/chevron-down-CkQS-knD.js +0 -14
  905. package/dist/chevron-left-CBCMdMx6.js +0 -14
  906. package/dist/chevron-right-dIVWvPJu.js +0 -14
  907. package/dist/chevron-up-D93IGU9z.js +0 -14
  908. package/dist/circle-Dgfa7GUy.js +0 -17
  909. package/dist/coins-CFu331p2.js +0 -17
  910. package/dist/commonValidators-Bk0SSjsH.js +0 -24
  911. package/dist/contract-DI03_xrF.js +0 -14
  912. package/dist/cross-circle-fill-small-CHMDaA3q.js +0 -14
  913. package/dist/cross-o4n5KXxG.js +0 -14
  914. package/dist/currency-BGwQyxBo.js +0 -36
  915. package/dist/da-DK-B45X2VaJ.js +0 -35
  916. package/dist/da-DK-BJ7aTPir.js +0 -13
  917. package/dist/da-DK-BTpZzEgA.js +0 -15
  918. package/dist/da-DK-BoQic3Gy.js +0 -33
  919. package/dist/da-DK-CeNMXUfE.js +0 -23
  920. package/dist/da-DK-D0N1TVVU.js +0 -58
  921. package/dist/da-DK-D4H69PX3.js +0 -30
  922. package/dist/da-DK-DStNe471.js +0 -22
  923. package/dist/da-DK-q2b_1elr.js +0 -35
  924. package/dist/de-DE-C78RLE2G.js +0 -13
  925. package/dist/de-DE-CGoBPCPv.js +0 -22
  926. package/dist/de-DE-CWvgMDqU.js +0 -35
  927. package/dist/de-DE-D2ByeIZs.js +0 -35
  928. package/dist/de-DE-DjOUNvp6.js +0 -15
  929. package/dist/de-DE-Dtuu-nE7.js +0 -58
  930. package/dist/de-DE-Dwagawx1.js +0 -33
  931. package/dist/de-DE-JI-7mvxy.js +0 -23
  932. package/dist/de-DE-wp5-H-ov.js +0 -30
  933. package/dist/document-1-DsCi9vmX.js +0 -14
  934. package/dist/document-person-DBlLin9u.js +0 -20
  935. package/dist/download-B8_c4ARV.js +0 -17
  936. package/dist/dropinUtils-DHp5v5jB.js +0 -192
  937. package/dist/edit-1-D6f6zk9p.js +0 -14
  938. package/dist/en-US-546hB2Wn.js +0 -60
  939. package/dist/en-US-BQpgt41j.js +0 -37
  940. package/dist/en-US-BTYdAWXp.js +0 -15
  941. package/dist/en-US-BbAzROHT.js +0 -36
  942. package/dist/en-US-CAm3meB1.js +0 -30
  943. package/dist/en-US-CQ3angjM.js +0 -22
  944. package/dist/en-US-DHq7VYFs.js +0 -23
  945. package/dist/en-US-DIdQJky-.js +0 -35
  946. package/dist/es-ES-BsQpwaPN.js +0 -58
  947. package/dist/es-ES-Bsoco8Fj.js +0 -33
  948. package/dist/es-ES-BtUSEzkE.js +0 -13
  949. package/dist/es-ES-CKMfS8Yy.js +0 -22
  950. package/dist/es-ES-Cj7q7fWO.js +0 -15
  951. package/dist/es-ES-DKCCgVF8.js +0 -35
  952. package/dist/es-ES-DOVPTeyf.js +0 -23
  953. package/dist/es-ES-Ds3-DtqZ.js +0 -30
  954. package/dist/es-ES-WWftn3JX.js +0 -35
  955. package/dist/external-link-BjladU3E.js +0 -14
  956. package/dist/fi-FI-BJ9RzrL3.js +0 -58
  957. package/dist/fi-FI-BNcnKrJ9.js +0 -15
  958. package/dist/fi-FI-ClnsYt3L.js +0 -33
  959. package/dist/fi-FI-Cvar63RH.js +0 -13
  960. package/dist/fi-FI-D522KHGk.js +0 -23
  961. package/dist/fi-FI-D9E_KaJi.js +0 -35
  962. package/dist/fi-FI-DPNeTsJS.js +0 -30
  963. package/dist/fi-FI-Hhku9Lmc.js +0 -35
  964. package/dist/fi-FI-REYOX46I.js +0 -22
  965. package/dist/fieldConfigurations-B8bDFQ53.js +0 -458
  966. package/dist/form-rules-DhbF2mY4.js +0 -13
  967. package/dist/formatCurrency-CMOSdJMB.js +0 -29
  968. package/dist/fr-FR-B5543Fe-.js +0 -13
  969. package/dist/fr-FR-BYuKsZIb.js +0 -35
  970. package/dist/fr-FR-Bn3D6mmY.js +0 -15
  971. package/dist/fr-FR-CJI0bIig.js +0 -33
  972. package/dist/fr-FR-CNR5-s9g.js +0 -58
  973. package/dist/fr-FR-ChmNQciP.js +0 -30
  974. package/dist/fr-FR-Cv0k-3Xc.js +0 -35
  975. package/dist/fr-FR-D9qaP6nx.js +0 -22
  976. package/dist/fr-FR-DInQKkTd.js +0 -23
  977. package/dist/getName-DJlhsDj_.js +0 -41
  978. package/dist/gift-SdNY6AqI.js +0 -14
  979. package/dist/graph-DwYwlplw.js +0 -21
  980. package/dist/graph-up-DpbCSPbc.js +0 -20
  981. package/dist/hasDataChanged-BgvxL-Hx.js +0 -19
  982. package/dist/headquarter-C6AsewcP.js +0 -21
  983. package/dist/hotel-JX0bjsSA.js +0 -22
  984. package/dist/iframeWidget-Bftkd3v_.js +0 -234
  985. package/dist/image-eUqBiRX_.js +0 -17
  986. package/dist/info-Wao3PEQK.js +0 -21
  987. package/dist/isEmpty-CuQFhMf0.js +0 -23
  988. package/dist/it-IT-BV9K87FK.js +0 -58
  989. package/dist/it-IT-BeC2Y1F8.js +0 -33
  990. package/dist/it-IT-Biduphjt.js +0 -22
  991. package/dist/it-IT-C_fNHhjE.js +0 -35
  992. package/dist/it-IT-CjEYONJg.js +0 -23
  993. package/dist/it-IT-Dd6xGSe-.js +0 -13
  994. package/dist/it-IT-DvM-9LpM.js +0 -15
  995. package/dist/it-IT-Nl57jui-.js +0 -35
  996. package/dist/it-IT-eCrTB65E.js +0 -30
  997. package/dist/keys-BpNgnAsD.js +0 -23
  998. package/dist/localizeDateString-DHsivjy2.js +0 -27
  999. package/dist/location-YXhcBMDy.js +0 -17
  1000. package/dist/mail-Z_IE_hkw.js +0 -14
  1001. package/dist/mapExistingFile-DW5ktJzM.js +0 -231
  1002. package/dist/mapScriptLocalization-CI-Ydp2z.js +0 -72
  1003. package/dist/mapTransferInstrumentToPayoutAccount-CAoOlPMA.js +0 -30
  1004. package/dist/minus-circle-filled-BGKeHaxJ.js +0 -17
  1005. package/dist/nl-NL-BHkRnVrj.js +0 -35
  1006. package/dist/nl-NL-BHqiO21q.js +0 -15
  1007. package/dist/nl-NL-Cysslsh2.js +0 -33
  1008. package/dist/nl-NL-D2QKudfh.js +0 -30
  1009. package/dist/nl-NL-DLedC3mO.js +0 -35
  1010. package/dist/nl-NL-DVENFpd5.js +0 -13
  1011. package/dist/nl-NL-DywVQ9km.js +0 -58
  1012. package/dist/nl-NL-G1wVnmzT.js +0 -22
  1013. package/dist/nl-NL-Zcq0bXd-.js +0 -23
  1014. package/dist/no-NO-B8oxqfNI.js +0 -58
  1015. package/dist/no-NO-BTtAuqCb.js +0 -22
  1016. package/dist/no-NO-BxReX6oF.js +0 -23
  1017. package/dist/no-NO-CKT9kLAH.js +0 -15
  1018. package/dist/no-NO-C_snYWBc.js +0 -30
  1019. package/dist/no-NO-CpVal4cV.js +0 -35
  1020. package/dist/no-NO-Dn2UkdoI.js +0 -13
  1021. package/dist/no-NO-kaAdT9B8.js +0 -35
  1022. package/dist/no-NO-zSnPtrDi.js +0 -33
  1023. package/dist/options-horizontal-nJ9-ButA.js +0 -18
  1024. package/dist/partner-COG2_Erh.js +0 -21
  1025. package/dist/pay-by-link-plane-Pv7Babgn.js +0 -22
  1026. package/dist/payout-iEmHhgQ4.js +0 -20
  1027. package/dist/person-CdGfItMU.js +0 -17
  1028. package/dist/plus-CwLva7fq.js +0 -14
  1029. package/dist/plus-circle-filled-Cnf1oJTm.js +0 -17
  1030. package/dist/pt-PT-BkvMsoK4.js +0 -35
  1031. package/dist/pt-PT-BvK00TeI.js +0 -58
  1032. package/dist/pt-PT-C-hbNnsB.js +0 -30
  1033. package/dist/pt-PT-CjsyP_OK.js +0 -33
  1034. package/dist/pt-PT-D2elvnDU.js +0 -15
  1035. package/dist/pt-PT-Dk48OVtf.js +0 -22
  1036. package/dist/pt-PT-N0njcfLO.js +0 -23
  1037. package/dist/pt-PT-Xm-pm3mb.js +0 -35
  1038. package/dist/pt-PT-_o5xgnxS.js +0 -13
  1039. package/dist/reporting-DlRoibD7.js +0 -17
  1040. package/dist/resolveEnvironment-BGYn6Ls_.js +0 -84
  1041. package/dist/revenue-accelerate-rtXA-8EE.js +0 -17
  1042. package/dist/rules-DP3jxPzq.js +0 -311
  1043. package/dist/save-BofgDbDX.js +0 -14
  1044. package/dist/search-BjMkvQh0.js +0 -17
  1045. package/dist/show-uL6I-rMo.js +0 -17
  1046. package/dist/sl-SI-BB7iVcFI.js +0 -22
  1047. package/dist/sl-SI-BhVTSmhQ.js +0 -30
  1048. package/dist/sl-SI-Br0UEUPL.js +0 -33
  1049. package/dist/sl-SI-BylvpF-X.js +0 -15
  1050. package/dist/sl-SI-Cth2Qa5T.js +0 -35
  1051. package/dist/sl-SI-D_rqR0D7.js +0 -35
  1052. package/dist/sl-SI-MZoDApq9.js +0 -23
  1053. package/dist/sl-SI-NI2OJAvm.js +0 -58
  1054. package/dist/solution-payments-DTAuLSWF.js +0 -14
  1055. package/dist/store-CkhgQMl0.js +0 -14
  1056. package/dist/sv-SE-66rqYTxi.js +0 -30
  1057. package/dist/sv-SE-B3zoXMuH.js +0 -35
  1058. package/dist/sv-SE-BUfESAQK.js +0 -13
  1059. package/dist/sv-SE-BtXmvxx4.js +0 -33
  1060. package/dist/sv-SE-CAZpDX9G.js +0 -58
  1061. package/dist/sv-SE-DCFSf4Oj.js +0 -23
  1062. package/dist/sv-SE-DbI-1JqN.js +0 -22
  1063. package/dist/sv-SE-Dwz1yTrB.js +0 -15
  1064. package/dist/sv-SE-OPOHtqtP.js +0 -35
  1065. package/dist/terminal-1-ewywjFJI.js +0 -18
  1066. package/dist/toCapitalized-Bq7laD0b.js +0 -13
  1067. package/dist/translation-DJHWTow9.js +0 -472
  1068. package/dist/types/api/pciTemplate/pciTemplate.types.d.ts +0 -9
  1069. package/dist/types/api/pciTemplate/usePciQuestionnaire.d.ts +0 -6
  1070. package/dist/types/api/pciTemplate/usePciQuestionnaireList.d.ts +0 -12
  1071. package/dist/types/api/pciTemplate/usePciStatus.d.ts +0 -6
  1072. package/dist/types/api/pciTemplate/usePciTemplate.d.ts +0 -14
  1073. package/dist/types/components/BusinessLines/tasks/BusinessLinesDropin.d.ts +0 -5
  1074. package/dist/types/components/Contract/hooks/useSalesChannelsSettings.d.ts +0 -3
  1075. package/dist/types/components/Shared/tasks/TaskList/TaskItemStatus.d.ts +0 -2
  1076. package/dist/types/components/ui/atoms/FormHeader/FormHeader.d.ts +0 -8
  1077. package/dist/types/components/ui/atoms/Remove/Remove.d.ts +0 -2
  1078. package/dist/types/components/ui/atoms/Remove/Remove.types.d.ts +0 -9
  1079. package/dist/types/components/ui/atoms/Status/Status.types.d.ts +0 -8
  1080. package/dist/types/components/ui/atoms/TaskStatusIndicator/TaskStatusIndicator.d.ts +0 -11
  1081. package/dist/types/components/ui/molecules/Card/CardGroup.d.ts +0 -3
  1082. package/dist/types/core/analytics.d.ts +0 -31
  1083. package/dist/types/embeds/terms-of-service-status/adyen-manage-terms-of-service.types.d.ts +0 -39
  1084. package/dist/types/hooks/useAnalytics.d.ts +0 -22
  1085. package/dist/types/utils/bankVerification/animation.d.ts +0 -2
  1086. package/dist/types/utils/trackNavigation.d.ts +0 -10
  1087. package/dist/types-CAznNNSI.js +0 -160
  1088. package/dist/types-CP1NRoE8.js +0 -74
  1089. package/dist/types-K58FM7k4.js +0 -64
  1090. package/dist/upload-XDhHhAHV.js +0 -17
  1091. package/dist/useAssociatedLegalEntity-G30FPhOX.js +0 -33
  1092. package/dist/useDataset-BgvQQEKd.js +0 -120
  1093. package/dist/useForm-C1DW3mPC.js +0 -1694
  1094. package/dist/useFormContext-beqGS11A.js +0 -23
  1095. package/dist/useGlobalData-jb7ua9I6.js +0 -205
  1096. package/dist/useMultiForm-BucfLW49.js +0 -864
  1097. package/dist/useOnboardingStatus-CTgWLZxC.js +0 -27
  1098. package/dist/useScenarios-B7IWZ3xW.js +0 -46
  1099. package/dist/useTermsOfServiceStatus-B0dIrYTA.js +0 -42
  1100. package/dist/useToastContext-DGMeMy5R.js +0 -51
  1101. package/dist/useUnincorporatedPartnershipMembers-BCvmGMOX.js +0 -99
  1102. package/dist/utils-Bwnj33y_.js +0 -277
  1103. package/dist/utils-CXtNbmpA.js +0 -29
  1104. package/dist/utils-CgOzbb9O.js +0 -159
  1105. package/dist/validate-B5PwC1oL.js +0 -100
  1106. package/dist/validate-BRz0LPdo.js +0 -382
  1107. package/dist/validate-CvtamBXH.js +0 -605
  1108. package/dist/validationError-DOCbfk7K.js +0 -86
  1109. package/dist/warning-circle-fill-DADaWT65.js +0 -17
  1110. package/dist/warning-filled-BfAQN-BF.js +0 -14
  1111. package/dist/webinar-BJWDRK2H.js +0 -22
  1112. /package/dist/types/api/{pciTemplate → pci}/useSignPci.d.ts +0 -0
  1113. /package/dist/types/components/BusinessLines/tasks/{BusinessLinesGettingStarted → BusinessLines}/BusinessLinesGettingStarted.d.ts +0 -0
@@ -0,0 +1,2497 @@
1
+ ;
2
+ {
3
+ try {
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] = "2751d833-0647-4d90-af14-6f1304635848", e._sentryDebugIdIdentifier = "sentry-dbid-2751d833-0647-4d90-af14-6f1304635848");
6
+ } catch (e) {
7
+ }
8
+ }
9
+ ;
10
+ import { jsx, jsxs, Fragment } from "preact/jsx-runtime";
11
+ import { useMemo, useState, useEffect, useCallback, useRef } from "preact/hooks";
12
+ import { u as useScenarios } from "./useScenarios-DPOodENA.js";
13
+ import { u as useCreateLegalEntity } from "./useCreateLegalEntity-BK5YcHA-.js";
14
+ import { u as useUpdateLegalEntity } from "./useUpdateLegalEntity-oa8qEzc4.js";
15
+ import { j as useProviderStatus, p as addressValidators, q as addressFormatters, r as mapAddressLabels } from "./Address-Db6Q_KUo.js";
16
+ import { c as contactDetailsValidationRules, u as useValidatePhoneNumberImperatively } from "./validate-BYwVLb-X.js";
17
+ import { b as useApiContext, a1 as useMutation, k as httpPost, aD as matchesRegex, aP as trimValWithOneSpace, aE as NO_ALPHABET_REGEX, aF as EMOJI_REGEX, aG as hasRepeatedCharacters, aH as isInvalidName, a$ as INDIVIDUAL_VALID_CHAR_REGEX, aN as getFormattingRegEx, aO as SPECIAL_CHARS, aK as standardKatakanaValidator, aL as standardKanjiValidator, C as CountryCodes, X as isEmpty, P as TaskTypes, t as LegalEntityTypes, b0 as getAgeToday, b1 as euCountries, b2 as individualApiKeyMapping, aZ as reverseMapping, b3 as getNomineeFromAssociation, b4 as individualComponentsKeyMapping, b5 as drop, U as createLogger, M as useAccountHolder, W as useI18nContext, a0 as useAnalyticsContext, p as useExperimentsContext, o as useSettingsContext, g as getLegalEntityCountry, b6 as getAllowedDecisionMakerRoles, b7 as filterOutUnwantedAssociationsIfRootLE, aA as cloneObject, b8 as individualDocumentMapping, b9 as individualObscuredFields, af as getOwnEntityAssociations, ba as hasNomineesChanged, bb as attachNomineeToRole, aU as doArraysMatch, j as useQuery, x as skipToken, m as httpGet, u as useTranslation, a2 as useQueryClient, B as Button, L as Loader, bc as individualOnfidoApiKeyMapping, al as Scenarios, am as DecisionMakerTypes, bd as individualOnfidoDocumentMapping, be as individualOnfidoObscuredFields } from "./StoreProvider-BFN15Go9.js";
18
+ import { F as FormContextProvider, a as FormFlow } from "./FormFlow-Cf3Ff2qw.js";
19
+ import { a as useToastContext } from "./useToastContext-BK9oGWtb.js";
20
+ import { g as getPropsFromConfigurations, c as composePerScenarioFormConfigurations } from "./process-field-configurations-DoOFQqtn.js";
21
+ import { g as getRequiredForms, a as addValidityToForms, u as useFormComposer } from "./dropinUtils-D2lBlNWp.js";
22
+ import { u as useMultiForm } from "./useMultiForm-rZmCYsI4.js";
23
+ import { m as mapExistingFile, g as getPageName, a as getPage, u as useScenarioConfiguration } from "./mapExistingFile-BhW5UmN9.js";
24
+ import { y as getSSNType, z as defaultFieldMetadata, A as defaultFieldConfig, B as defaultFieldMetadata$1, D as fieldConfig, t as taxInformationDefaultFieldMetadata, i as taxInformationDefaultFieldConfig, E as isEmpty$1, F as getTrustedFields, G as getAsyncIdNumberValidationRule, H as getAsyncPhoneValidationRules, I as setHasMotionCaptureScenario, J as showIndividualMotionCapture, q as individualForms, K as Individual, L as individualDocumentForms, M as idVerificationProviderId, N as idNowModalChildEntityId, O as LandingLayout, x as showIdNowModal, P as check4DigitSsnFailed, Q as individualOnfidoRules, p as individualOnfidoForms, R as isNextStepDisabled, U as shouldShowIdNowModal, V as IndividualOnfido, W as JP_ADDRESS_REQUIRED_FIELDS, X as GuidanceQuestionValues, Y as DECISION_MAKER_TYPES_WITH_JOBTITLE$1 } from "./IndividualOnfido-Cc7dydKq.js";
25
+ import { i as isValidationError, p as processValidationErrors, a as isMaintenanceModeError } from "./validationError-CvZLhw5H.js";
26
+ import { g as getIdDocument, a as getDocument, c as createDocumentRequest, d as documentApiUtils, m as mergeAttachments, b as getFileExtention } from "./documentUtils-CUgKVLK4.js";
27
+ import { a as datasetUtilities, C as Confirm } from "./useDataset-BtfHQp4w.js";
28
+ import { g as getFieldsWithExistingData } from "./getFieldsWithExistingData-B0l_1eCG.js";
29
+ import { l as localizeDateString } from "./localizeDateString-C-G2nUor.js";
30
+ import { o as omitObscuredFieldsIfUnchanged, I as IFrameWidget } from "./iframeWidget-yBLSAmf8.js";
31
+ import { r as resolveFieldMetadata, w as getLocalizedIdDocumentTypeOptions, I as Image } from "./fieldConfigurations-C38LzPl3.js";
32
+ import { r as rules, D as DECISION_MAKER_TYPES_WITH_JOBTITLE } from "./rules-DP604XPJ.js";
33
+ import { f as formatObject } from "./utils-DNSfZiio.js";
34
+ import { m as mapSchemaFieldsToApiScriptLocalization, a as mapApiScriptLocalizationToSchemaFields } from "./mapAddressLocalizationToJpAddressSchema-vJWbpAyq.js";
35
+ import { computed } from "@preact/signals";
36
+ import { Show } from "@preact/signals/utils";
37
+ import { m as mapJpAddressSchemaToAddressLocalizations, a as mapJpAddressSummary } from "./mapJpAddressSchemaToAddressLocalizations-KFAvfuC1.js";
38
+ import { lazy } from "preact/compat";
39
+ import { M as Modal } from "./Modal-CloeVnNp.js";
40
+ import { a as Alert } from "./Alert-DEiOX0nw.js";
41
+ import { a as getIndividualLegalEntityName } from "./getName-CIw0MR9e.js";
42
+ import { g as getOnfidoIdentityTypeToApiIdentityTypeMap, m as mapLegalEntityToIndividualOnfidoSchema } from "./mapLegalEntityToIndividualOnfidoSchema-D51tRiYd.js";
43
+ const verifyIdNumber = async (legalEntityId, baseUrl, data) => {
44
+ return await httpPost(
45
+ {
46
+ baseUrl,
47
+ path: `legalEntities/${legalEntityId}/verifications/idNumber`,
48
+ // Handler for unhappy flows, i.e. status != 200, in the idNumber verification process
49
+ errorHandler: async (response) => {
50
+ const responseData = await response;
51
+ if (responseData.status === 422) {
52
+ return { status: 422, message: responseData.detail, errorCode: responseData.errorCode };
53
+ }
54
+ if (responseData.status === 500) {
55
+ return { status: 500, message: "Service did not respond, do not block verification" };
56
+ }
57
+ }
58
+ },
59
+ data
60
+ );
61
+ };
62
+ const useVerifyIdNumber = (options) => {
63
+ const { rootLegalEntityId, baseUrl } = useApiContext();
64
+ return useMutation({
65
+ mutationFn: (data) => verifyIdNumber(rootLegalEntityId.value, baseUrl.value, data),
66
+ ...options
67
+ });
68
+ };
69
+ const startVerificationCheck = async (rootLegalEntityId, baseUrl, data) => {
70
+ return httpPost(
71
+ {
72
+ baseUrl,
73
+ path: `legalEntities/${rootLegalEntityId}/providers/idVerification/process`
74
+ },
75
+ data
76
+ );
77
+ };
78
+ const useIdVerificationStartCheck = (options) => {
79
+ const { rootLegalEntityId, baseUrl } = useApiContext();
80
+ return useMutation({
81
+ mutationFn: (data) => startVerificationCheck(rootLegalEntityId.value, baseUrl.value, data),
82
+ ...options
83
+ });
84
+ };
85
+ const nameValidationRulesV4 = {
86
+ firstName: [
87
+ {
88
+ modes: ["blur"],
89
+ validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
90
+ errorMessage: "nameMustContainLetters"
91
+ },
92
+ {
93
+ modes: ["blur"],
94
+ validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && !isInvalidName(input) && matchesRegex(INDIVIDUAL_VALID_CHAR_REGEX, input),
95
+ errorMessage: "checkForTypos"
96
+ }
97
+ ],
98
+ lastName: [
99
+ {
100
+ modes: ["blur"],
101
+ validate: (input) => !matchesRegex(NO_ALPHABET_REGEX, input),
102
+ errorMessage: "nameMustContainLetters"
103
+ },
104
+ {
105
+ modes: ["blur"],
106
+ validate: (input) => !matchesRegex(EMOJI_REGEX, input) && !hasRepeatedCharacters(input) && !isInvalidName(input) && matchesRegex(INDIVIDUAL_VALID_CHAR_REGEX, input),
107
+ errorMessage: "checkForTypos"
108
+ }
109
+ ]
110
+ };
111
+ const specialCharsRegEx = getFormattingRegEx(SPECIAL_CHARS.replace("-", ""));
112
+ const nameFormatters = {
113
+ firstName: {
114
+ // formatter: trimValWithOneSpace // just trim
115
+ // Example - removing disallowed chars as they are input: then they don't end up in state
116
+ formatter: (val) => val ? trimValWithOneSpace(val).replace(specialCharsRegEx, "") : void 0
117
+ // trim & replace
118
+ },
119
+ lastName: {
120
+ formatter: (val) => val ? trimValWithOneSpace(val).replace(specialCharsRegEx, "") : void 0
121
+ }
122
+ };
123
+ const onfidoDocumentTypeMapping = [
124
+ { id: "driversLicense", name: "driversLicense", hasBackPage: true },
125
+ { id: "identityCard", name: "identityCard", hasBackPage: true },
126
+ { id: "passport", name: "passport", hasBackPage: false }
127
+ ];
128
+ const jaHaniNameValidationRules = {
129
+ jaHaniFirstName: [
130
+ {
131
+ modes: ["blur"],
132
+ validate: (input) => standardKanjiValidator(input),
133
+ errorMessage: "nameMustContainLetters"
134
+ }
135
+ ],
136
+ jaHaniLastName: [
137
+ {
138
+ modes: ["blur"],
139
+ validate: (input) => standardKanjiValidator(input),
140
+ errorMessage: "nameMustContainLetters"
141
+ }
142
+ ]
143
+ };
144
+ const jaKanaNameValidationRules = {
145
+ jaKanaFirstName: [
146
+ {
147
+ modes: ["blur"],
148
+ validate: (input) => standardKatakanaValidator(input),
149
+ errorMessage: "nameMustContainLetters"
150
+ }
151
+ ],
152
+ jaKanaLastName: [
153
+ {
154
+ modes: ["blur"],
155
+ validate: (input) => standardKatakanaValidator(input),
156
+ errorMessage: "nameMustContainLetters"
157
+ }
158
+ ]
159
+ };
160
+ const isNotOutOfRangeBirthDateValidatorRule$1 = {
161
+ modes: ["blur"],
162
+ validate: (birthDate) => !isEmpty(birthDate) && new Date(birthDate) < /* @__PURE__ */ new Date(),
163
+ errorMessage: "invalidDateOfBirth"
164
+ };
165
+ const buildMinimumAgeValidationRule$1 = (minimumAge) => ({
166
+ modes: ["blur"],
167
+ validate: (birthDate) => !!birthDate && getAgeToday(birthDate) >= minimumAge,
168
+ errorMessage: {
169
+ key: "youMustXYearsOldToContinue",
170
+ values: { minimumAge: minimumAge.toString() }
171
+ }
172
+ });
173
+ const getCountrySpecificMinimumAgeValidationRule$1 = (country) => {
174
+ if (!country) {
175
+ return buildMinimumAgeValidationRule$1(13);
176
+ }
177
+ if ([...euCountries, CountryCodes.UnitedKingdom, CountryCodes.Switzerland].some(
178
+ (c) => c === country
179
+ )) {
180
+ return buildMinimumAgeValidationRule$1(16);
181
+ }
182
+ switch (country) {
183
+ case CountryCodes.HongKong:
184
+ case CountryCodes.Singapore:
185
+ return buildMinimumAgeValidationRule$1(18);
186
+ default:
187
+ return buildMinimumAgeValidationRule$1(13);
188
+ }
189
+ };
190
+ const personalDetailsValidators = ({
191
+ country,
192
+ isExperimentEnabled = () => false,
193
+ isSettingEnabled = () => false,
194
+ taskType,
195
+ idNumberType,
196
+ phonePrefix,
197
+ idNumberExempt,
198
+ idNumber,
199
+ existingIdNumber,
200
+ formVerificationErrors,
201
+ taxIdNumberType
202
+ }) => ({
203
+ taxInformation: resolveFieldMetadata(
204
+ taxInformationDefaultFieldConfig[country],
205
+ {
206
+ taxIdNumberType,
207
+ companyType: LegalEntityTypes.INDIVIDUAL
208
+ },
209
+ taxInformationDefaultFieldMetadata
210
+ )?.validators,
211
+ birthDate: (() => {
212
+ const baseValidators = [isNotOutOfRangeBirthDateValidatorRule$1];
213
+ if (isSettingEnabled("enforceLegalAge")) {
214
+ return [...baseValidators, buildMinimumAgeValidationRule$1(18)];
215
+ }
216
+ if (isExperimentEnabled("EnableAgeVerification")) {
217
+ if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS) {
218
+ return [...baseValidators, buildMinimumAgeValidationRule$1(18)];
219
+ }
220
+ return [...baseValidators, getCountrySpecificMinimumAgeValidationRule$1(country)];
221
+ }
222
+ return baseValidators;
223
+ })(),
224
+ ...isExperimentEnabled("StrictNameAndAddressValidationV4") ? nameValidationRulesV4 : void 0,
225
+ ...contactDetailsValidationRules,
226
+ phoneNumber: resolveFieldMetadata(
227
+ fieldConfig[phonePrefix ?? country],
228
+ {},
229
+ defaultFieldMetadata$1
230
+ )?.validators,
231
+ idNumber: (() => {
232
+ const derivedIdNumberType = country === CountryCodes.UnitedStates ? getSSNType(formVerificationErrors, existingIdNumber) : idNumberType;
233
+ return idNumberExempt ? {
234
+ validate: () => {
235
+ return idNumberExempt || !isEmpty(idNumber);
236
+ },
237
+ modes: ["blur"]
238
+ } : resolveFieldMetadata(
239
+ defaultFieldConfig[country],
240
+ { idNumberType: derivedIdNumberType },
241
+ defaultFieldMetadata
242
+ )?.validators;
243
+ })(),
244
+ ...jaHaniNameValidationRules,
245
+ ...jaKanaNameValidationRules
246
+ });
247
+ const mandateIdVerificationForMotionCapture = (showMotionCapture, derivedProps) => {
248
+ if (!derivedProps) {
249
+ return void 0;
250
+ }
251
+ const copiedDerivedProps = { ...derivedProps };
252
+ if (showMotionCapture) {
253
+ const idVerificationFields = [
254
+ ...derivedProps.requiredFields.idVerificationMethod ?? [],
255
+ "idVerificationMethod"
256
+ ];
257
+ copiedDerivedProps.allFields.idVerificationMethod = idVerificationFields;
258
+ copiedDerivedProps.requiredFields.idVerificationMethod = idVerificationFields;
259
+ }
260
+ return copiedDerivedProps;
261
+ };
262
+ const mapApiDocumentToIndividualDocuments = (entityId) => {
263
+ const idDocument2 = getIdDocument(entityId);
264
+ const proofOfResidency = getDocument(entityId, "proofOfResidency");
265
+ const proofOfNationalId = getDocument(entityId, "proofOfNationalIdNumber");
266
+ const proofOfRelationship = getDocument(entityId, "proofOfRelationship");
267
+ return {
268
+ idDocument: idDocument2 ? mapApiIdDocumentToSchema(idDocument2) : void 0,
269
+ proofOfResidency: proofOfResidency ? { proofOfResidency: [mapExistingFile(getPageName(proofOfResidency))] } : void 0,
270
+ proofOfNationalId: proofOfNationalId ? { proofOfNationalId: [mapExistingFile(getPageName(proofOfNationalId))] } : void 0,
271
+ proofOfRelationship: proofOfRelationship ? { proofOfRelationship: [mapExistingFile(getPageName(proofOfRelationship))] } : void 0
272
+ };
273
+ };
274
+ const mapApiIdDocumentToSchema = (idDocument2) => {
275
+ const { type, attachments, modificationDate } = idDocument2;
276
+ const { hasBackPage } = getLocalizedIdDocumentTypeOptions().find(({ id }) => id === type);
277
+ let frontPage;
278
+ let backPage;
279
+ if (attachments?.length === 1) {
280
+ frontPage = getPage(idDocument2);
281
+ } else {
282
+ frontPage = hasBackPage ? getPage(idDocument2, "front") : getPage(idDocument2);
283
+ backPage = hasBackPage ? getPage(idDocument2, "back") : void 0;
284
+ }
285
+ return {
286
+ ...frontPage ? { idFrontPage: [mapExistingFile(frontPage.pageName ?? "")] } : {},
287
+ ...backPage ? { idBackPage: [mapExistingFile(backPage.pageName ?? "")] } : {},
288
+ idDocumentType: type,
289
+ modificationDate
290
+ };
291
+ };
292
+ const mapIndividualDocumentToApiDocument = async (data, entityId) => {
293
+ if (!data) return void 0;
294
+ const { proofOfNationalId, proofOfResidency, proofOfRelationship } = data;
295
+ const idDocument2 = "idDocument" in data ? data.idDocument : data.manualIdUpload;
296
+ const entityType = "legalEntity";
297
+ const documents = await Promise.all([
298
+ idDocument2?.idFrontPage ? createDocumentRequest({
299
+ entityId,
300
+ entityType,
301
+ documentType: idDocument2.idDocumentType,
302
+ page1: idDocument2.idFrontPage?.[0],
303
+ page2: idDocument2.idBackPage?.[0]
304
+ }) : void 0,
305
+ proofOfNationalId?.proofOfNationalId ? createDocumentRequest({
306
+ entityId,
307
+ entityType,
308
+ documentType: "proofOfNationalIdNumber",
309
+ page1: proofOfNationalId.proofOfNationalId[0]
310
+ }) : void 0,
311
+ proofOfResidency?.proofOfResidency ? createDocumentRequest({
312
+ entityId,
313
+ entityType,
314
+ documentType: "proofOfResidency",
315
+ page1: proofOfResidency.proofOfResidency[0]
316
+ }) : void 0,
317
+ proofOfRelationship?.proofOfRelationship ? createDocumentRequest({
318
+ entityId,
319
+ entityType,
320
+ documentType: "proofOfRelationship",
321
+ page1: proofOfRelationship.proofOfRelationship[0]
322
+ }) : void 0
323
+ ]);
324
+ return documents.filter(Boolean);
325
+ };
326
+ const getIdentityTypeToApiIdentityTypeMap = (data) => {
327
+ const { residencyCountry } = data;
328
+ switch (residencyCountry) {
329
+ case CountryCodes.HongKong:
330
+ return {
331
+ passport: "passport",
332
+ driversLicense: "driversLicense",
333
+ proofOfIdentityCard: "nationalIdNumber"
334
+ };
335
+ default:
336
+ return {
337
+ nationalIdNumber: "nationalIdNumber",
338
+ passport: "passport",
339
+ driversLicense: "driversLicense",
340
+ proofOfIdentityCard: "identityCard"
341
+ };
342
+ }
343
+ };
344
+ const adjustIdentificationData = (data, apiData) => {
345
+ const { typeOfIdentity, idNumber, idNumberExempt } = data;
346
+ const identificationData = {
347
+ ...apiData,
348
+ number: idNumber,
349
+ type: getIdentityTypeToApiIdentityTypeMap(data)[typeOfIdentity] ?? "nationalIdNumber"
350
+ };
351
+ switch (typeOfIdentity) {
352
+ case "passport":
353
+ return {
354
+ ...identificationData,
355
+ cardNumber: ""
356
+ };
357
+ case "driversLicense":
358
+ return {
359
+ ...identificationData,
360
+ expiryDate: ""
361
+ };
362
+ default:
363
+ return idNumber === void 0 && idNumberExempt === void 0 ? void 0 : {
364
+ ...identificationData,
365
+ expiryDate: "",
366
+ cardNumber: "",
367
+ nationalIdExempt: apiData?.nationalIdExempt ?? !idNumber
368
+ };
369
+ }
370
+ };
371
+ const mapIndividualToLegalEntity = (data) => {
372
+ const requestObj = {
373
+ ...formatObject(data, individualApiKeyMapping)
374
+ };
375
+ requestObj.type = LegalEntityTypes.INDIVIDUAL;
376
+ const { personalDetails } = data;
377
+ if (!personalDetails) return requestObj;
378
+ requestObj.individual.identificationData = adjustIdentificationData(
379
+ personalDetails,
380
+ requestObj.individual.identificationData
381
+ );
382
+ const localization = [
383
+ mapSchemaFieldsToApiScriptLocalization(personalDetails, "jaHani"),
384
+ mapSchemaFieldsToApiScriptLocalization(personalDetails, "jaKana")
385
+ ].filter(({ fields }) => !isEmpty$1(fields));
386
+ if (localization.length) {
387
+ requestObj.individual.name.localization = localization;
388
+ }
389
+ if (personalDetails.phoneNumber?.number) {
390
+ requestObj.individual.phone = {
391
+ number: personalDetails.phoneNumber.number,
392
+ type: "mobile"
393
+ };
394
+ } else {
395
+ delete requestObj.individual.phone;
396
+ }
397
+ return requestObj;
398
+ };
399
+ const mapLegalEntityToIndividual = (legalEntity, isChangingType, isRoleFieldNeeded, parentLegalEntity, isLegalRepresentative) => {
400
+ let individualData = formatObject(
401
+ legalEntity,
402
+ individualComponentsKeyMapping
403
+ );
404
+ individualData = {
405
+ ...individualData,
406
+ personalDetails: {
407
+ ...individualData?.personalDetails,
408
+ ...isChangingType && {
409
+ firstName: "",
410
+ lastName: ""
411
+ }
412
+ }
413
+ };
414
+ if (!individualData.personalDetails?.idNumberExempt) {
415
+ individualData.personalDetails.idNumberExempt = false;
416
+ }
417
+ const apiIdentityTypeToIdentityTypeMap = reverseMapping(
418
+ getIdentityTypeToApiIdentityTypeMap(individualData.personalDetails)
419
+ );
420
+ if (legalEntity?.individual?.identificationData?.type) {
421
+ individualData.personalDetails.typeOfIdentity = apiIdentityTypeToIdentityTypeMap[legalEntity.individual.identificationData.type];
422
+ }
423
+ if (legalEntity?.documentDetails?.length) {
424
+ individualData = {
425
+ ...individualData,
426
+ ...mapApiDocumentToIndividualDocuments(legalEntity?.id)
427
+ };
428
+ }
429
+ if (legalEntity?.individual?.residentialAddress.country === "JP" && legalEntity.individual?.name?.localization) {
430
+ for (const scriptLoc of legalEntity.individual.name.localization) {
431
+ individualData.personalDetails = {
432
+ ...individualData.personalDetails,
433
+ ...mapApiScriptLocalizationToSchemaFields(scriptLoc)
434
+ };
435
+ }
436
+ }
437
+ if (!parentLegalEntity?.entityAssociations) {
438
+ return individualData;
439
+ }
440
+ const associations = parentLegalEntity?.entityAssociations?.filter((ea) => ea.legalEntityId === legalEntity?.id) ?? [];
441
+ if (isRoleFieldNeeded) {
442
+ individualData.personalDetails.role = associations.map((ea) => ea.type);
443
+ individualData.personalDetails.jobTitle = associations.find(
444
+ ({ jobTitle }) => Boolean(jobTitle)
445
+ )?.jobTitle;
446
+ }
447
+ individualData.personalDetails = getNomineeFromAssociation(
448
+ associations,
449
+ individualData.personalDetails
450
+ );
451
+ if (isLegalRepresentative) {
452
+ individualData.personalDetails.relationship = associations.find(
453
+ ({ relationship }) => Boolean(relationship)
454
+ )?.relationship;
455
+ }
456
+ return individualData;
457
+ };
458
+ const identityBase = {
459
+ role: {
460
+ rule: "requiredIfDecisionMakerTask"
461
+ },
462
+ firstName: {
463
+ rule: "REQUIRED"
464
+ },
465
+ lastName: {
466
+ rule: "REQUIRED"
467
+ },
468
+ birthDate: {
469
+ rule: "REQUIRED"
470
+ },
471
+ phoneNumber: {
472
+ rules: ["requiredIfPhoneScenarioDisabled", "contactsIfRequiredForRole"]
473
+ },
474
+ email: {
475
+ rule: "contactsIfRequiredForRole"
476
+ },
477
+ jobTitle: {
478
+ rule: "jobTitleIfRequiredForRole"
479
+ },
480
+ nationality: {
481
+ rule: "nationalityIfRequiredForRole"
482
+ },
483
+ address: {
484
+ rule: "addressIfRequiredForCountry"
485
+ },
486
+ otherAddressInformation: {
487
+ rule: "otherAddressInfoIfRequiredForCountry"
488
+ },
489
+ country: {
490
+ rule: "REQUIRED"
491
+ },
492
+ postalCode: {
493
+ rule: "postalCodeIfRequiredForCountry"
494
+ },
495
+ city: {
496
+ rule: "cityIfRequiredForCountry"
497
+ },
498
+ stateOrProvince: {
499
+ rule: "stateOrProvinceIfRequiredForCountry"
500
+ },
501
+ residencyCountry: {
502
+ rule: "REQUIRED"
503
+ },
504
+ proofOfResidency: {
505
+ rule: "isProofOfResidencyRequired"
506
+ },
507
+ proofOfNationalId: {
508
+ rule: "isProofOfNationalIdRequired"
509
+ },
510
+ relationship: {
511
+ rule: "legalRepresentativeRelationshipRequired"
512
+ },
513
+ proofOfRelationship: {
514
+ rule: "isProofOfRelationshipRequired"
515
+ },
516
+ nomineeDirector: {
517
+ rule: "nomineeDirectorRequiredForCountry"
518
+ },
519
+ nomineeShareholder: {
520
+ rule: "nomineeShareHolderRequiredForCountry"
521
+ },
522
+ jaHaniFirstName: {
523
+ rule: "japaneseFirstAndLastNames"
524
+ },
525
+ jaHaniLastName: {
526
+ rule: "japaneseFirstAndLastNames"
527
+ },
528
+ jaKanaFirstName: {
529
+ rule: "japaneseFirstAndLastNames"
530
+ },
531
+ jaKanaLastName: {
532
+ rule: "japaneseFirstAndLastNames"
533
+ },
534
+ idDocumentType: {
535
+ // If the user has a missing ID error and chooses manual flow
536
+ rule: "isManualIdFlowAndHasMissingData"
537
+ }
538
+ };
539
+ const identityNumber$1 = {
540
+ idNumber: {
541
+ rule: "idNumberRules",
542
+ obscured: true
543
+ },
544
+ idNumberExempt: {
545
+ rules: ["idNumberExemptIfApplicableCountry", "isDirectorIdNumberRequiredForCountry"]
546
+ },
547
+ idDocumentType: {
548
+ rule: "manualIdDocumentRequired"
549
+ },
550
+ idFrontPage: {
551
+ rule: "idFrontPageIfManualUpload"
552
+ },
553
+ idBackPage: {
554
+ rule: "backPageIfRequiredForDocumentType"
555
+ },
556
+ idVerificationMethod: {
557
+ rule: "idVerificationRequired"
558
+ },
559
+ instantIdVerificationData: {
560
+ rule: "instantVerificationDataRule"
561
+ }
562
+ };
563
+ const additionalIdentityInfo$1 = {
564
+ typeOfIdentity: {
565
+ rules: ["requiredIfCountryUsesMultipleTypesOfIdentity", "isDirectorIdNumberRequiredForCountry"]
566
+ },
567
+ issuerState: {
568
+ rule: "issuerStateRequired"
569
+ },
570
+ licenseCardNumber: {
571
+ rule: "licenseCardNumberRules"
572
+ },
573
+ expiryDate: {
574
+ rule: "expiryDateRequired"
575
+ }
576
+ };
577
+ const idDocument = {
578
+ idVerificationMethod: {
579
+ rule: "REQUIRED"
580
+ },
581
+ idDocumentType: {
582
+ rule: "REQUIRED"
583
+ },
584
+ idFrontPage: {
585
+ rule: "idFrontPageIfManualUpload"
586
+ },
587
+ idBackPage: {
588
+ rule: "backPageIfRequiredForDocumentType"
589
+ }
590
+ };
591
+ const nationality$1 = {
592
+ nationality: {
593
+ rule: "REQUIRED"
594
+ }
595
+ };
596
+ const phoneNumberBase$1 = {
597
+ phoneNumber: {
598
+ rule: "contactsIfRequiredForRole"
599
+ }
600
+ };
601
+ const taxInformationBase$1 = {
602
+ taxInformation: { rule: "countryUsesTaxId" }
603
+ };
604
+ const fieldsPerScenario = {
605
+ L0: drop("address", "birthDate").from(identityBase),
606
+ L1: identityBase,
607
+ L_TAXINFO: { ...identityBase, ...taxInformationBase$1 },
608
+ L1_ID: {
609
+ ...identityBase,
610
+ ...identityNumber$1,
611
+ ...additionalIdentityInfo$1
612
+ },
613
+ L1_IDO: {
614
+ // TODO: change idNumber rule to optional once optional fields are implemented
615
+ ...identityBase,
616
+ ...identityNumber$1,
617
+ ...additionalIdentityInfo$1
618
+ },
619
+ L1_NAT: {
620
+ ...identityBase,
621
+ ...identityNumber$1,
622
+ ...additionalIdentityInfo$1,
623
+ ...nationality$1
624
+ },
625
+ L1_IDDOC: idDocument,
626
+ L_PH: phoneNumberBase$1
627
+ };
628
+ const parseIndividualScenarios = (scenarios) => composePerScenarioFormConfigurations(scenarios, fieldsPerScenario);
629
+ const parseConfiguration$1 = ({ scenarios }) => parseIndividualScenarios(scenarios);
630
+ const logger$1 = createLogger();
631
+ function IndividualDropin({
632
+ taskType = TaskTypes.INDIVIDUAL,
633
+ parentLegalEntity,
634
+ legalEntityResponse,
635
+ handleHomeClick,
636
+ isTargetLegalEntityType,
637
+ country: parentCountry,
638
+ problems: propProblems,
639
+ trustMember,
640
+ onSubmit: externalOnSubmit,
641
+ asModal = false,
642
+ handleBackClick: externalBackClick,
643
+ trustedFields,
644
+ trustedFieldsProvider,
645
+ trustedRoles
646
+ }) {
647
+ const { baseUrl, rootLegalEntityId } = useApiContext();
648
+ const { accountHolder, setAccountHolder } = useAccountHolder();
649
+ const { i18n } = useI18nContext();
650
+ const userEvents = useAnalyticsContext();
651
+ const { showToast, clearToasts } = useToastContext();
652
+ const { isExperimentEnabled } = useExperimentsContext();
653
+ const { isSettingEnabled } = useSettingsContext();
654
+ const isRoleFieldNeeded = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER;
655
+ const isLegalRepresentative = taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS;
656
+ const dataFromResponse = useMemo(() => {
657
+ if (legalEntityResponse) {
658
+ return mapLegalEntityToIndividual(
659
+ legalEntityResponse,
660
+ isTargetLegalEntityType,
661
+ isRoleFieldNeeded,
662
+ parentLegalEntity,
663
+ isLegalRepresentative
664
+ );
665
+ }
666
+ return {
667
+ personalDetails: {
668
+ residencyCountry: parentCountry
669
+ },
670
+ address: {
671
+ country: parentCountry
672
+ }
673
+ };
674
+ }, [
675
+ legalEntityResponse,
676
+ parentCountry,
677
+ isTargetLegalEntityType,
678
+ parentLegalEntity,
679
+ isRoleFieldNeeded,
680
+ isLegalRepresentative
681
+ ]);
682
+ const documentUtils = documentApiUtils({
683
+ baseUrl: baseUrl.value,
684
+ rootLegalEntityId: rootLegalEntityId.value
685
+ });
686
+ let roleTypes = [];
687
+ const [matchingScenario, setMatchingScenario] = useState();
688
+ const [validationErrors, setValidationErrors] = useState();
689
+ const [loadingStatus, setLoadingStatus] = useState("success");
690
+ const [documents, setDocuments] = useState();
691
+ const [existingAttachments, setExistingAttachments] = useState();
692
+ const [country, setCountry] = useState(
693
+ dataFromResponse?.personalDetails?.residencyCountry ?? parentCountry
694
+ );
695
+ const [hideFooter, setHideFooter] = useState(false);
696
+ const [derivedProps, setDerivedProps] = useState();
697
+ const associatedLegalEntityTrustedFields = useMemo(
698
+ () => legalEntityResponse ? getTrustedFields(legalEntityResponse, individualComponentsKeyMapping) : {},
699
+ [legalEntityResponse]
700
+ );
701
+ const { data: providerStatus } = useProviderStatus({
702
+ providers: ["address", "idDocument"],
703
+ country: legalEntityResponse ? getLegalEntityCountry(legalEntityResponse) : country
704
+ });
705
+ const problems = useMemo(
706
+ () => ({
707
+ ...propProblems,
708
+ validationErrors
709
+ }),
710
+ [propProblems, validationErrors]
711
+ );
712
+ useEffect(() => {
713
+ userEvents.updateBaseTrackingPayload({ task: taskType });
714
+ userEvents.addTaskEvent("Landed on page", {
715
+ actionType: "start"
716
+ });
717
+ }, []);
718
+ const individualFieldValidations = useCallback(
719
+ (data2) => ({
720
+ personalDetails: personalDetailsValidators({
721
+ country: data2?.personalDetails?.residencyCountry ?? country,
722
+ isExperimentEnabled,
723
+ isSettingEnabled,
724
+ taskType,
725
+ idNumberType: data2?.personalDetails?.typeOfIdentity,
726
+ phonePrefix: data2?.personalDetails?.phoneNumber?.phoneCountryCode,
727
+ idNumberExempt: data2?.personalDetails?.idNumberExempt,
728
+ idNumber: data2?.personalDetails?.idNumber,
729
+ existingIdNumber: dataFromResponse.personalDetails?.idNumber,
730
+ formVerificationErrors: propProblems?.verificationErrors?.personalDetails,
731
+ taxIdNumberType: data2?.personalDetails?.taxInformation?.length ? data2?.personalDetails?.taxInformation[0]?.type : void 0
732
+ }),
733
+ address: addressValidators({
734
+ isExperimentEnabled,
735
+ country: data2?.personalDetails?.residencyCountry ?? country,
736
+ i18n
737
+ })
738
+ }),
739
+ [isExperimentEnabled, isSettingEnabled, taskType]
740
+ );
741
+ const validatePhoneNumber = useValidatePhoneNumberImperatively();
742
+ const { mutateAsync: verifyIdNumber2 } = useVerifyIdNumber();
743
+ const individualFieldAsyncValidations = useCallback(
744
+ (data2) => ({
745
+ personalDetails: {
746
+ phoneNumber: getAsyncPhoneValidationRules(validatePhoneNumber).phoneNumber,
747
+ idNumber: getAsyncIdNumberValidationRule(verifyIdNumber2, data2?.personalDetails).idNumber
748
+ }
749
+ }),
750
+ [getAsyncPhoneValidationRules, getAsyncIdNumberValidationRule]
751
+ );
752
+ const defaultData = useMemo(
753
+ () => ({
754
+ ...dataFromResponse,
755
+ ...documents,
756
+ idVerificationMethod: {
757
+ idVerificationMethod: "instantVerification"
758
+ }
759
+ }),
760
+ [legalEntityResponse, documents, isTargetLegalEntityType, dataFromResponse]
761
+ );
762
+ const formatters = useMemo(
763
+ () => ({
764
+ personalDetails: {
765
+ ...nameFormatters
766
+ },
767
+ address: addressFormatters
768
+ }),
769
+ []
770
+ );
771
+ const form = useMultiForm({
772
+ requiredFields: derivedProps?.requiredFields,
773
+ defaultData,
774
+ rules: individualFieldValidations,
775
+ asyncRules: individualFieldAsyncValidations,
776
+ optionalFields: derivedProps?.optionalFields,
777
+ formatters,
778
+ obscuredFields: {
779
+ personalDetails: ["idNumber"]
780
+ }
781
+ });
782
+ const { data = dataFromResponse } = form;
783
+ useEffect(() => {
784
+ setCountry(data?.personalDetails?.residencyCountry ?? parentCountry);
785
+ }, [data?.personalDetails?.residencyCountry, parentCountry]);
786
+ const { data: scenarios } = useScenarios(country, LegalEntityTypes.INDIVIDUAL);
787
+ useEffect(() => {
788
+ if (!scenarios) return;
789
+ setHasMotionCaptureScenario(scenarios);
790
+ setMatchingScenario(scenarios);
791
+ }, [scenarios]);
792
+ const { fieldConfigurations } = useScenarioConfiguration({
793
+ parseConfiguration: parseConfiguration$1,
794
+ legalEntityType: LegalEntityTypes.INDIVIDUAL,
795
+ setLoadingStatus,
796
+ country
797
+ });
798
+ const fieldsFromCustomRules = useMemo(
799
+ () => rules({
800
+ matchingScenario,
801
+ data,
802
+ country: data?.personalDetails?.residencyCountry ?? country,
803
+ taskType,
804
+ isExperimentEnabled,
805
+ rootLegalEntity: parentLegalEntity,
806
+ problems
807
+ }),
808
+ [country, matchingScenario, data, taskType, problems]
809
+ );
810
+ useEffect(() => {
811
+ const derivedProps2 = getPropsFromConfigurations({
812
+ scenarioConfiguration: fieldConfigurations,
813
+ forms: individualForms,
814
+ remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
815
+ dataMissingErrors: problems?.missingData ?? [],
816
+ fieldsWithExistingData: legalEntityResponse ? getFieldsWithExistingData(
817
+ legalEntityResponse,
818
+ individualApiKeyMapping,
819
+ individualDocumentMapping,
820
+ // We ignore these fields for the purposes of this rule because we know them to be problematic
821
+ [
822
+ "personalDetails.typeOfIdentity",
823
+ "personalDetails.idNumber",
824
+ "address.stateOrProvince",
825
+ "personalDetails.issuerState"
826
+ ]
827
+ ) : [],
828
+ customRules: fieldsFromCustomRules,
829
+ legalEntityType: legalEntityResponse?.type,
830
+ legalEntityTrustedFields: [],
831
+ remediationFieldAsOptional: true
832
+ });
833
+ const updatedDerivedProps = mandateIdVerificationForMotionCapture(
834
+ showIndividualMotionCapture?.value,
835
+ derivedProps2
836
+ );
837
+ setDerivedProps(updatedDerivedProps);
838
+ }, [
839
+ fieldConfigurations,
840
+ legalEntityResponse,
841
+ fieldsFromCustomRules,
842
+ problems?.remediationActions,
843
+ problems?.missingData
844
+ ]);
845
+ const forms = useMemo(() => {
846
+ const formsWithUpdatedName = {
847
+ ...individualForms,
848
+ idDocument: {
849
+ ...individualForms.idDocument,
850
+ formName: data.idVerificationMethod?.idVerificationMethod === "instantVerification" ? "instantVerification" : "idDocument"
851
+ }
852
+ };
853
+ const requiredForms = getRequiredForms(
854
+ formsWithUpdatedName,
855
+ derivedProps?.requiredFields,
856
+ derivedProps?.optionalFields
857
+ ).filter(
858
+ // Prevent showing the ID verification method step when onfido is not enabled
859
+ (form2) => form2.formId !== "idVerificationMethod" || providerStatus?.statuses?.idDocument?.enabled
860
+ );
861
+ return addValidityToForms(requiredForms, form.isValid, problems);
862
+ }, [
863
+ derivedProps,
864
+ form.isValid,
865
+ problems,
866
+ providerStatus?.statuses?.idDocument?.enabled,
867
+ data.idVerificationMethod?.idVerificationMethod
868
+ ]);
869
+ if (isRoleFieldNeeded && parentLegalEntity) {
870
+ roleTypes = getAllowedDecisionMakerRoles(parentLegalEntity, taskType);
871
+ }
872
+ useEffect(() => {
873
+ if (!legalEntityResponse?.documentDetails?.length) return;
874
+ documentUtils.fetchDocuments(legalEntityResponse.documentDetails, legalEntityResponse?.id).then((res) => {
875
+ setExistingAttachments(res[0].attachments);
876
+ setDocuments(mapApiDocumentToIndividualDocuments(legalEntityResponse?.id));
877
+ }).catch(() => {
878
+ showToast({ label: i18n.get("failedToFetchRelevantDocuments"), variant: "error" });
879
+ });
880
+ }, [legalEntityResponse]);
881
+ const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
882
+ const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
883
+ const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
884
+ const submitLegalEntity = async ({
885
+ dataSubmitted,
886
+ legalEntity,
887
+ idDocumentType
888
+ }) => {
889
+ let updatedLegalEntity;
890
+ const existingLeId = legalEntityResponse?.id;
891
+ if (!existingLeId) {
892
+ updatedLegalEntity = await createLegalEntity(legalEntity);
893
+ userEvents.addTaskEvent("Success", {
894
+ actionType: "submit",
895
+ countryOfRegistration: dataSubmitted.personalDetails?.residencyCountry,
896
+ roles: dataSubmitted.personalDetails?.role
897
+ });
898
+ } else {
899
+ const patchLegalEntity = { ...drop("type").from(legalEntity), id: existingLeId };
900
+ updatedLegalEntity = await updateLegalEntity(patchLegalEntity);
901
+ userEvents.addTaskEvent("Success", {
902
+ actionType: "submit",
903
+ countryOfRegistration: dataSubmitted.personalDetails?.residencyCountry,
904
+ documentType: idDocumentType
905
+ });
906
+ }
907
+ return updatedLegalEntity;
908
+ };
909
+ const { mutateAsync: getIdVerificationStartCheck } = useIdVerificationStartCheck();
910
+ const handleInstantIdVerificationStartCheck = async (onfidoResponse, legalEntityId) => {
911
+ const providerId = idVerificationProviderId.value;
912
+ if (!providerId) throw Error("idVerificationProviderId not yet set");
913
+ const data2 = {
914
+ providerId,
915
+ legalEntityId,
916
+ captureMetadata: onfidoResponse
917
+ };
918
+ await getIdVerificationStartCheck(data2);
919
+ };
920
+ const submitDocuments = async ({
921
+ forms: forms2,
922
+ legalEntity,
923
+ dataSubmitted
924
+ }) => {
925
+ if (!isDocumentsRequired(forms2)) return;
926
+ if (dataSubmitted.idDocument?.instantIdVerificationData) {
927
+ if (providerStatus?.statuses?.idDocument?.enabled === false) {
928
+ throw new Error("Provider unexpectedly disabled instant verification flow");
929
+ }
930
+ await handleInstantIdVerificationStartCheck(
931
+ dataSubmitted.idDocument.instantIdVerificationData,
932
+ legalEntity.id
933
+ );
934
+ } else {
935
+ const formattedDocuments = await mapIndividualDocumentToApiDocument(
936
+ dataSubmitted,
937
+ legalEntity.id
938
+ );
939
+ if (!formattedDocuments || formattedDocuments.length === 0) {
940
+ if (existingAttachments?.length)
941
+ logger$1.log(
942
+ "User has already uploaded documents and is not changing them, nothing needs to be done"
943
+ );
944
+ else
945
+ logger$1.error(
946
+ `formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
947
+ );
948
+ return;
949
+ }
950
+ formattedDocuments[0].attachments = mergeAttachments(
951
+ existingAttachments ?? [],
952
+ formattedDocuments[0]?.attachments ?? []
953
+ ).filter((attachment) => attachment.content);
954
+ const uploadedDocuments = await documentUtils.uploadDocuments(
955
+ formattedDocuments,
956
+ legalEntity.id
957
+ );
958
+ uploadedDocuments?.forEach((doc) => {
959
+ userEvents.addTaskEvent("Success", {
960
+ actionType: "upload",
961
+ documentType: doc.type,
962
+ fileExtention: doc?.attachments?.map((item) => getFileExtention(item.pageName ?? "")).filter((item) => item !== void 0) ?? void 0
963
+ });
964
+ });
965
+ }
966
+ };
967
+ const hasRolesChanged = (legalEntity, existingEntityAssociations, newRoles) => {
968
+ const existingRoles = existingEntityAssociations?.filter((ea) => ea.legalEntityId === legalEntity.id)?.map(({ type }) => type);
969
+ return !doArraysMatch(existingRoles, newRoles);
970
+ };
971
+ const attachAssociationToParentLegalEntity = async ({
972
+ legalEntity,
973
+ parentLE,
974
+ dataSubmitted
975
+ }) => {
976
+ const newRoles = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER ? dataSubmitted?.personalDetails?.role : taskType === TaskTypes.TRUST_MEMBER_INDIVIDUAL || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_INDIVIDUAL ? trustMember?.roles : null;
977
+ const existingEntityAssociations = getOwnEntityAssociations(parentLE);
978
+ if (newRoles && (hasRolesChanged(legalEntity, existingEntityAssociations, newRoles) || dataFromResponse.personalDetails?.jobTitle !== dataSubmitted?.personalDetails?.jobTitle || hasNomineesChanged(dataFromResponse.personalDetails, dataSubmitted.personalDetails))) {
979
+ const updatedParentLegalEntity = {
980
+ entityAssociations: [
981
+ ...newRoles.map((role) => ({
982
+ type: role,
983
+ legalEntityId: legalEntity.id,
984
+ ...DECISION_MAKER_TYPES_WITH_JOBTITLE.some((type) => type === role) && {
985
+ jobTitle: dataSubmitted?.personalDetails?.jobTitle
986
+ }
987
+ })) || [],
988
+ ...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
989
+ ]
990
+ };
991
+ if (updatedParentLegalEntity.entityAssociations) {
992
+ updatedParentLegalEntity.entityAssociations = updatedParentLegalEntity.entityAssociations.map(
993
+ (ea) => attachNomineeToRole(ea, country, dataSubmitted.personalDetails)
994
+ );
995
+ }
996
+ await updateLegalEntity({ ...updatedParentLegalEntity, id: parentLE.id });
997
+ }
998
+ if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS && (existingEntityAssociations.every((ea) => ea.legalEntityId !== legalEntity.id) || dataFromResponse?.personalDetails?.relationship !== dataSubmitted?.personalDetails?.relationship)) {
999
+ const newEntityAssociation = {
1000
+ type: "legalRepresentative",
1001
+ legalEntityId: legalEntity.id,
1002
+ relationship: dataSubmitted?.personalDetails?.relationship
1003
+ };
1004
+ const updatedParentLegalEntity = {
1005
+ entityAssociations: [newEntityAssociation, ...existingEntityAssociations]
1006
+ };
1007
+ await updateLegalEntity({ ...updatedParentLegalEntity, id: parentLE.id });
1008
+ }
1009
+ };
1010
+ const onSubmit = async () => {
1011
+ setLoadingStatus("loading");
1012
+ const dataSubmitted = omitObscuredFieldsIfUnchanged(
1013
+ individualObscuredFields,
1014
+ data,
1015
+ dataFromResponse
1016
+ );
1017
+ if (!dataSubmitted) {
1018
+ return;
1019
+ }
1020
+ try {
1021
+ const legalEntity = mapIndividualToLegalEntity(dataSubmitted);
1022
+ const idDocumentType = idDocumentTypeOptions.find(
1023
+ ({ id }) => dataSubmitted?.idDocument?.idDocumentType === id
1024
+ )?.id;
1025
+ legalEntity.entityAssociations = filterOutUnwantedAssociationsIfRootLE(
1026
+ taskType,
1027
+ legalEntityResponse,
1028
+ accountHolder || void 0
1029
+ );
1030
+ const createdLegalEntity = await submitLegalEntity({
1031
+ dataSubmitted,
1032
+ legalEntity,
1033
+ idDocumentType
1034
+ });
1035
+ setAccountHolder(accountHolder);
1036
+ await submitDocuments({ forms, legalEntity: createdLegalEntity, dataSubmitted });
1037
+ if (parentLegalEntity) {
1038
+ await attachAssociationToParentLegalEntity({
1039
+ legalEntity: createdLegalEntity,
1040
+ parentLE: parentLegalEntity,
1041
+ dataSubmitted
1042
+ });
1043
+ }
1044
+ setLoadingStatus("success");
1045
+ clearToasts();
1046
+ externalOnSubmit?.(dataSubmitted);
1047
+ } catch (e) {
1048
+ logger$1.error("Failed to update individual", e);
1049
+ if (isValidationError(e)) {
1050
+ setValidationErrors(processValidationErrors(e, TaskTypes.INDIVIDUAL));
1051
+ } else if (isMaintenanceModeError(e)) {
1052
+ showToast({
1053
+ label: i18n.get("maintenanceModeMessage"),
1054
+ variant: "error",
1055
+ duration: "indefinite"
1056
+ });
1057
+ } else {
1058
+ showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
1059
+ }
1060
+ setLoadingStatus("success");
1061
+ userEvents.addTaskEvent("Encountered error", {
1062
+ actionType: "submit",
1063
+ returnType: e.errorCode,
1064
+ returnValue: e.title
1065
+ });
1066
+ }
1067
+ };
1068
+ const isDocumentsRequired = (forms2) => forms2.some((form2) => individualDocumentForms.includes(form2.formId));
1069
+ const datasetUtils = datasetUtilities(i18n.locale);
1070
+ const formatIdDocument = (idDocument2) => {
1071
+ if (!idDocument2) return void 0;
1072
+ const documentType = idDocument2?.instantIdVerificationData ? onfidoDocumentTypeMapping.find(
1073
+ (document2) => idDocument2.instantIdVerificationData?.document_front.type === document2.id
1074
+ ) : idDocumentTypeOptions.find(({ id }) => idDocument2.idDocumentType === id);
1075
+ if (!documentType) return void 0;
1076
+ const frontPage = idDocument2.idFrontPage?.[0];
1077
+ const backPage = idDocument2.idBackPage?.[0];
1078
+ if (!frontPage) return void 0;
1079
+ return {
1080
+ documentType: i18n.get(documentType.name),
1081
+ ...backPage && documentType.hasBackPage ? {
1082
+ frontPage: frontPage.name,
1083
+ backPage: backPage.name
1084
+ } : {
1085
+ fileName: frontPage.name
1086
+ }
1087
+ };
1088
+ };
1089
+ const formatFileSummaryData = ({
1090
+ idDocument: idDocument2,
1091
+ proofOfNationalId,
1092
+ proofOfResidency,
1093
+ proofOfRelationship
1094
+ }) => {
1095
+ const proofOfNationalIdFile = proofOfNationalId?.proofOfNationalId?.[0];
1096
+ const proofOfResidencyFile = proofOfResidency?.proofOfResidency?.[0];
1097
+ const proofOfRelationshipFile = proofOfRelationship?.proofOfRelationship?.[0];
1098
+ return {
1099
+ ...(idDocument2?.idDocumentType || idDocument2?.instantIdVerificationData) && {
1100
+ idDocument: formatIdDocument(idDocument2)
1101
+ },
1102
+ ...proofOfNationalIdFile && {
1103
+ proofOfNationalId: {
1104
+ fileName: proofOfNationalIdFile.name
1105
+ }
1106
+ },
1107
+ ...proofOfResidencyFile && {
1108
+ proofOfResidency: {
1109
+ fileName: proofOfResidencyFile.name
1110
+ }
1111
+ },
1112
+ ...proofOfRelationshipFile && {
1113
+ proofOfRelationship: {
1114
+ fileName: proofOfRelationshipFile.name
1115
+ }
1116
+ }
1117
+ };
1118
+ };
1119
+ const formatDataForSummary = () => {
1120
+ let summaryData = cloneObject(data);
1121
+ if (summaryData.personalDetails?.residencyCountry) {
1122
+ summaryData.personalDetails.residencyCountry = datasetUtils.getCountryName(
1123
+ summaryData.personalDetails.residencyCountry
1124
+ );
1125
+ }
1126
+ if (summaryData.personalDetails?.nationality) {
1127
+ summaryData.personalDetails.nationality = datasetUtils.getCountryName(
1128
+ summaryData.personalDetails.nationality
1129
+ );
1130
+ }
1131
+ if (summaryData.address) {
1132
+ summaryData.address = mapAddressLabels(summaryData.address, datasetUtils);
1133
+ }
1134
+ if (isDocumentsRequired(forms)) {
1135
+ individualDocumentForms.forEach((formId) => delete summaryData[formId]);
1136
+ summaryData = { ...summaryData, ...formatFileSummaryData(data) };
1137
+ }
1138
+ if (summaryData.personalDetails?.accountHolder) {
1139
+ summaryData.personalDetails.accountHolder = i18n.get(
1140
+ summaryData.personalDetails.accountHolder
1141
+ );
1142
+ }
1143
+ if (summaryData.personalDetails?.birthDate) {
1144
+ summaryData.personalDetails.birthDate = localizeDateString(
1145
+ summaryData.personalDetails.birthDate,
1146
+ i18n.locale
1147
+ );
1148
+ }
1149
+ if (summaryData.personalDetails?.phoneNumber) {
1150
+ delete summaryData.personalDetails.phoneNumber;
1151
+ summaryData.personalDetails.phoneNumber = data.personalDetails?.phoneNumber?.number;
1152
+ }
1153
+ if (summaryData.personalDetails?.taxInformation) {
1154
+ const taxInformation = summaryData.personalDetails.taxInformation.find(
1155
+ (taxId) => taxId.country === data.personalDetails?.nationality
1156
+ );
1157
+ if (taxInformation) {
1158
+ delete summaryData.personalDetails.taxInformation;
1159
+ summaryData.personalDetails[taxInformation.type] = taxInformation.number;
1160
+ }
1161
+ }
1162
+ return summaryData;
1163
+ };
1164
+ const summaryOmittedKeys = [
1165
+ ...taskType === TaskTypes.DECISION_MAKER ? ["role"] : [],
1166
+ ...data?.personalDetails?.idNumberExempt ? ["idNumber"] : []
1167
+ ];
1168
+ const {
1169
+ handleNextClick,
1170
+ handleBackClick,
1171
+ activeForm,
1172
+ shouldValidate,
1173
+ gotoFormByFormIndex,
1174
+ steps
1175
+ } = useFormComposer({
1176
+ problems,
1177
+ externalBackClick,
1178
+ forms,
1179
+ onSubmit,
1180
+ triggerValidation: form.triggerValidation
1181
+ // TODO: figure out type of nested keys
1182
+ });
1183
+ return /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
1184
+ FormFlow,
1185
+ {
1186
+ summary: {
1187
+ data: formatDataForSummary(),
1188
+ omitted: {
1189
+ keys: summaryOmittedKeys
1190
+ },
1191
+ problems
1192
+ },
1193
+ asModal,
1194
+ currentStep: steps.current,
1195
+ disableNextButton: hideFooter,
1196
+ forms,
1197
+ gotoFormByFormIndex,
1198
+ handleBackClick,
1199
+ handleCancelClick: handleHomeClick,
1200
+ handleNextClick,
1201
+ loadingStatus,
1202
+ totalSteps: steps.total,
1203
+ children: /* @__PURE__ */ jsx(
1204
+ Individual,
1205
+ {
1206
+ ...derivedProps,
1207
+ data,
1208
+ country,
1209
+ activeForm,
1210
+ forms,
1211
+ taskType,
1212
+ problems,
1213
+ onNext: handleNextClick,
1214
+ onBack: handleBackClick,
1215
+ setHideFooter,
1216
+ legalEntityId: legalEntityResponse?.id,
1217
+ allowedRoles: roleTypes,
1218
+ shouldValidate,
1219
+ accountHolder,
1220
+ parentLegalEntity,
1221
+ trustedFields: !parentLegalEntity ? trustedFields : associatedLegalEntityTrustedFields,
1222
+ trustedFieldsProvider,
1223
+ trustedRoles
1224
+ }
1225
+ )
1226
+ }
1227
+ ) });
1228
+ }
1229
+ const isNotOutOfRangeBirthDateValidatorRule = {
1230
+ modes: ["blur"],
1231
+ validate: (birthDate) => !isEmpty(birthDate) && new Date(birthDate) < /* @__PURE__ */ new Date(),
1232
+ errorMessage: "invalidDateOfBirth"
1233
+ };
1234
+ const buildMinimumAgeValidationRule = (minimumAge) => ({
1235
+ modes: ["blur"],
1236
+ validate: (birthDate) => !!birthDate && getAgeToday(birthDate) >= minimumAge,
1237
+ errorMessage: {
1238
+ key: "youMustXYearsOldToContinue",
1239
+ values: { minimumAge: minimumAge.toString() }
1240
+ }
1241
+ });
1242
+ const getCountrySpecificMinimumAgeValidationRule = (country) => {
1243
+ if (!country) {
1244
+ return buildMinimumAgeValidationRule(13);
1245
+ }
1246
+ if ([...euCountries, CountryCodes.UnitedKingdom, CountryCodes.Switzerland].some(
1247
+ (c) => c === country
1248
+ )) {
1249
+ return buildMinimumAgeValidationRule(16);
1250
+ }
1251
+ switch (country) {
1252
+ case CountryCodes.HongKong:
1253
+ case CountryCodes.Singapore:
1254
+ return buildMinimumAgeValidationRule(18);
1255
+ default:
1256
+ return buildMinimumAgeValidationRule(13);
1257
+ }
1258
+ };
1259
+ const additionalPersonalDetailsValidators = ({
1260
+ country,
1261
+ isExperimentEnabled = () => false,
1262
+ isSettingEnabled = () => false,
1263
+ taskType,
1264
+ idNumberType,
1265
+ idNumberExempt,
1266
+ idNumber,
1267
+ existingIdNumber,
1268
+ formVerificationErrors,
1269
+ i18n,
1270
+ taxIdNumberType
1271
+ }) => ({
1272
+ taxInformation: resolveFieldMetadata(
1273
+ taxInformationDefaultFieldConfig[country],
1274
+ {
1275
+ taxIdNumberType,
1276
+ companyType: LegalEntityTypes.INDIVIDUAL
1277
+ },
1278
+ taxInformationDefaultFieldMetadata
1279
+ )?.validators,
1280
+ birthDate: (() => {
1281
+ const baseValidators = [isNotOutOfRangeBirthDateValidatorRule];
1282
+ if (isSettingEnabled("enforceLegalAge")) {
1283
+ return [...baseValidators, buildMinimumAgeValidationRule(18)];
1284
+ }
1285
+ if (isExperimentEnabled("EnableAgeVerification")) {
1286
+ if (taskType === TaskTypes.LEGAL_REPRESENTATIVE_DETAILS) {
1287
+ return [...baseValidators, buildMinimumAgeValidationRule(18)];
1288
+ }
1289
+ return [...baseValidators, getCountrySpecificMinimumAgeValidationRule(country)];
1290
+ }
1291
+ return baseValidators;
1292
+ })(),
1293
+ ...isExperimentEnabled("StrictNameAndAddressValidationV4") ? nameValidationRulesV4 : void 0,
1294
+ ...contactDetailsValidationRules,
1295
+ idNumber: (() => {
1296
+ const derivedIdNumberType = country === CountryCodes.UnitedStates || country === CountryCodes.PuertoRico ? getSSNType(formVerificationErrors, existingIdNumber) : idNumberType;
1297
+ return idNumberExempt ? {
1298
+ validate: () => {
1299
+ return idNumberExempt || !isEmpty(idNumber);
1300
+ },
1301
+ modes: ["blur"]
1302
+ } : resolveFieldMetadata(
1303
+ defaultFieldConfig[country],
1304
+ { idNumberType: derivedIdNumberType },
1305
+ defaultFieldMetadata
1306
+ )?.validators;
1307
+ })(),
1308
+ ...addressValidators({
1309
+ isExperimentEnabled,
1310
+ country,
1311
+ i18n
1312
+ })
1313
+ });
1314
+ const basicDetailsValidators = ({
1315
+ isExperimentEnabled = () => false
1316
+ }) => ({
1317
+ ...contactDetailsValidationRules,
1318
+ ...isExperimentEnabled("StrictNameAndAddressValidationV4") ? nameValidationRulesV4 : void 0
1319
+ });
1320
+ const getIdNowProviderIdentificationStatus = async (rootLegalEntityId, baseUrl, legalEntityId) => {
1321
+ return httpGet({
1322
+ baseUrl,
1323
+ path: `legalEntities/${rootLegalEntityId}/child/${legalEntityId}/provider/idnow/identification/status`,
1324
+ errorHandler: async (response) => {
1325
+ const responseData = await response;
1326
+ if (responseData.status === 404) {
1327
+ return { status: 404, message: responseData.detail, errorCode: responseData.errorCode };
1328
+ }
1329
+ }
1330
+ });
1331
+ };
1332
+ const useIdNowIdentificationStatus = (legalEntityId, options) => {
1333
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1334
+ return useQuery({
1335
+ queryKey: legalEntityId === skipToken ? [] : ["idNowProviderIdentificationStatus", legalEntityId],
1336
+ queryFn: legalEntityId === skipToken ? skipToken : () => getIdNowProviderIdentificationStatus(
1337
+ rootLegalEntityId.value,
1338
+ baseUrl.value,
1339
+ legalEntityId
1340
+ ),
1341
+ ...options
1342
+ });
1343
+ };
1344
+ const idNowProviderStartIdentification = async (rootLegalEntityId, baseUrl, legalEntityId) => {
1345
+ return httpPost({
1346
+ baseUrl,
1347
+ path: `legalEntities/${rootLegalEntityId}/child/${legalEntityId}/provider/idnow/identification/start`
1348
+ });
1349
+ };
1350
+ const useIdNowStartIdentification = (legalEntityId, options) => {
1351
+ const { rootLegalEntityId, baseUrl } = useApiContext();
1352
+ return useQuery({
1353
+ queryKey: legalEntityId === skipToken ? [] : ["idNowProviderStartIdentification", legalEntityId],
1354
+ queryFn: legalEntityId === skipToken ? skipToken : () => idNowProviderStartIdentification(rootLegalEntityId.value, baseUrl.value, legalEntityId),
1355
+ ...options
1356
+ });
1357
+ };
1358
+ const idnowHeader = "adyen-kyc-idnow-header";
1359
+ const idnowVerificationHeaderIframeContainer = "adyen-kyc-idnow-verification-header-iframe-container";
1360
+ const idnowVerificationHeaderIframe = "adyen-kyc-idnow-verification-header-iframe";
1361
+ const idnowVerificationHeaderImage = "adyen-kyc-idnow-verification-header-image";
1362
+ const styles = {
1363
+ idnowHeader,
1364
+ idnowVerificationHeaderIframeContainer,
1365
+ idnowVerificationHeaderIframe,
1366
+ idnowVerificationHeaderImage
1367
+ };
1368
+ const passportFrontGreenImage = lazy(
1369
+ () => import("./passport-front-green-BL4HmtsB.js")
1370
+ );
1371
+ const isIdNowSuccessful = (status) => {
1372
+ const providerStatus = status?.providerStatus;
1373
+ return providerStatus === "SUCCESS" || providerStatus === "SUCCESS_DATA_CHANGED" || providerStatus === "REVIEW_PENDING";
1374
+ };
1375
+ const IdNowVerificationModal = ({ handleFinish }) => {
1376
+ const { t } = useTranslation(["individual", "common"]);
1377
+ const [isConfirmPresented, setIsConfirmPresented] = useState(false);
1378
+ const [genericError, setGenericError] = useState(false);
1379
+ const widgetContainerRef = useRef(null);
1380
+ const iFrameRef = useRef(null);
1381
+ const iFrameWidgetRef = useRef(null);
1382
+ const [page, setPage] = useState(1);
1383
+ const queryClient = useQueryClient();
1384
+ const { showToast } = useToastContext();
1385
+ const {
1386
+ data: idNowStatus,
1387
+ isLoading: isStatusLoading,
1388
+ refetch: refetchIdNowIdentificationStatus
1389
+ } = useIdNowIdentificationStatus(idNowModalChildEntityId.value?.id ?? skipToken, {
1390
+ enabled: !!idNowModalChildEntityId.value?.id,
1391
+ refetchOnMount: "always",
1392
+ refetchInterval: 1e4,
1393
+ // poll every 10 seconds
1394
+ retry: (failureCount, error) => {
1395
+ if ("status" in error && error.status === 404) return false;
1396
+ return failureCount < 3;
1397
+ }
1398
+ });
1399
+ const {
1400
+ data: idNowStart,
1401
+ isLoading,
1402
+ isError: idNowStartError,
1403
+ refetch: refetchIdNowStartIdentification
1404
+ } = useIdNowStartIdentification(idNowModalChildEntityId.value?.id ?? skipToken, {
1405
+ enabled: !!idNowModalChildEntityId.value?.id && page === 2
1406
+ });
1407
+ const handleDismiss = () => {
1408
+ setIsConfirmPresented(true);
1409
+ };
1410
+ const handleCancelDismiss = () => {
1411
+ setIsConfirmPresented(false);
1412
+ };
1413
+ const handleConfirmDismiss = () => {
1414
+ setPage(1);
1415
+ setGenericError(false);
1416
+ setIsConfirmPresented(false);
1417
+ showIdNowModal.value = false;
1418
+ if (idNowStartError && idNowModalChildEntityId.value?.id) {
1419
+ queryClient.resetQueries({
1420
+ queryKey: ["idNowProviderStartIdentification", idNowModalChildEntityId.value?.id]
1421
+ });
1422
+ }
1423
+ idNowModalChildEntityId.value = void 0;
1424
+ iFrameWidgetRef.current?.unmount();
1425
+ iFrameRef.current?.remove();
1426
+ handleFinish?.();
1427
+ };
1428
+ if (idNowStatus?.status === "finished") {
1429
+ if (isIdNowSuccessful(idNowStatus)) {
1430
+ showToast({
1431
+ label: t(($) => $["successfullyUpdatedDetails"], { ns: "common" }),
1432
+ variant: "success"
1433
+ });
1434
+ handleConfirmDismiss();
1435
+ } else {
1436
+ if (page === 2) {
1437
+ handleConfirmDismiss();
1438
+ }
1439
+ }
1440
+ }
1441
+ if (!isLoading && idNowStartError) {
1442
+ setGenericError(true);
1443
+ setPage(1);
1444
+ }
1445
+ const initializeIdNowWidget = useCallback(async (url) => {
1446
+ const container = widgetContainerRef.current;
1447
+ if (!container) {
1448
+ return;
1449
+ }
1450
+ const iFrame = document.createElement("iframe");
1451
+ iFrameRef.current = iFrame;
1452
+ iFrame.setAttribute("allowFullscreen", "true");
1453
+ iFrame.classList.add(styles.idnowVerificationHeaderIframe);
1454
+ iFrame.setAttribute("height", "800");
1455
+ iFrame.setAttribute(
1456
+ "allow",
1457
+ "camera *;microphone *;geolocation *;clipboard-read *;clipboard-write *"
1458
+ );
1459
+ container.appendChild(iFrame);
1460
+ try {
1461
+ iFrameWidgetRef.current = new IFrameWidget(iFrame, url, "idnow", "");
1462
+ await iFrameWidgetRef.current.mountAndWaitForResponse();
1463
+ } catch (err) {
1464
+ console.error("Error occurred:", err);
1465
+ setGenericError(true);
1466
+ setPage(1);
1467
+ }
1468
+ }, []);
1469
+ useEffect(() => {
1470
+ if (page === 2 && !isLoading && idNowStart && idNowStart?.url) {
1471
+ (async () => {
1472
+ await refetchIdNowIdentificationStatus();
1473
+ await initializeIdNowWidget(idNowStart.url);
1474
+ })();
1475
+ }
1476
+ return () => {
1477
+ iFrameWidgetRef.current?.unmount();
1478
+ iFrameRef.current?.remove();
1479
+ };
1480
+ }, [isLoading, page, initializeIdNowWidget, refetchIdNowIdentificationStatus, idNowStart]);
1481
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1482
+ !isStatusLoading && /* @__PURE__ */ jsxs(
1483
+ Modal,
1484
+ {
1485
+ size: page === 2 ? "large" : "medium",
1486
+ showCloseButton: !isLoading && !isStatusLoading,
1487
+ onClose: handleDismiss,
1488
+ ariaLabel: t(($) => $["identityVerification"], { ns: "common" }),
1489
+ children: [
1490
+ page === 1 && /* @__PURE__ */ jsx("div", { className: styles.idnowHeader, children: /* @__PURE__ */ jsx(
1491
+ LandingLayout,
1492
+ {
1493
+ media: /* @__PURE__ */ jsx(
1494
+ Image,
1495
+ {
1496
+ className: styles.idnowVerificationHeaderImage,
1497
+ lazyLoadedImage: passportFrontGreenImage
1498
+ }
1499
+ ),
1500
+ title: t(($) => $["identityVerification"], { ns: "common" }),
1501
+ description: /* @__PURE__ */ jsxs(Fragment, { children: [
1502
+ t(($) => $["idNowDescription"], { ns: "individual" }),
1503
+ /* @__PURE__ */ jsx("br", {}),
1504
+ /* @__PURE__ */ jsx("br", {}),
1505
+ getIndividualLegalEntityName(idNowModalChildEntityId.value) && t(($) => $["idNowDescriptionName"], {
1506
+ ns: "individual",
1507
+ name: getIndividualLegalEntityName(idNowModalChildEntityId.value)
1508
+ })
1509
+ ] }),
1510
+ error: !isLoading && genericError ? /* @__PURE__ */ jsx(
1511
+ Alert,
1512
+ {
1513
+ variant: "error",
1514
+ title: t(($) => $["thereWasAnErrorTryAgain"], { ns: "common" })
1515
+ }
1516
+ ) : void 0,
1517
+ actions: /* @__PURE__ */ jsxs(Fragment, { children: [
1518
+ /* @__PURE__ */ jsx(
1519
+ Button,
1520
+ {
1521
+ onClick: async () => {
1522
+ setGenericError(false);
1523
+ setPage(2);
1524
+ await refetchIdNowStartIdentification();
1525
+ },
1526
+ disabled: isLoading || isStatusLoading || idNowStatus?.status === "finished" && isIdNowSuccessful(idNowStatus),
1527
+ fullWidth: true,
1528
+ children: idNowStatus?.status === "pending" ? t(($) => $["continueVerification"], { ns: "common" }) : t(($) => $["startVerification"], { ns: "common" })
1529
+ }
1530
+ ),
1531
+ /* @__PURE__ */ jsx(
1532
+ Button,
1533
+ {
1534
+ disabled: isLoading || isStatusLoading,
1535
+ variant: "tertiary",
1536
+ onClick: handleConfirmDismiss,
1537
+ fullWidth: true,
1538
+ children: t(($) => $["finishLater"], { ns: "common" })
1539
+ }
1540
+ )
1541
+ ] })
1542
+ }
1543
+ ) }),
1544
+ page === 2 && (isLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsx(
1545
+ "div",
1546
+ {
1547
+ ref: widgetContainerRef,
1548
+ className: styles.idnowVerificationHeaderIframeContainer
1549
+ }
1550
+ ))
1551
+ ]
1552
+ }
1553
+ ),
1554
+ isConfirmPresented && /* @__PURE__ */ jsx(
1555
+ Confirm,
1556
+ {
1557
+ confirmText: t(($) => $["leave"], { ns: "common" }),
1558
+ onCancel: handleCancelDismiss,
1559
+ onConfirm: handleConfirmDismiss,
1560
+ title: t(($) => $["unsavedChanges"], { ns: "common" })
1561
+ }
1562
+ )
1563
+ ] });
1564
+ };
1565
+ const adjustOnfidoIdentificationData = (data, apiData) => {
1566
+ const { typeOfIdentity, idNumber, idNumberExempt } = data;
1567
+ const identificationData = {
1568
+ ...apiData,
1569
+ number: idNumber,
1570
+ type: getOnfidoIdentityTypeToApiIdentityTypeMap(data)[typeOfIdentity] ?? "nationalIdNumber"
1571
+ };
1572
+ switch (typeOfIdentity) {
1573
+ case "passport":
1574
+ return {
1575
+ ...identificationData,
1576
+ cardNumber: ""
1577
+ };
1578
+ case "driversLicense":
1579
+ return {
1580
+ ...identificationData,
1581
+ expiryDate: ""
1582
+ };
1583
+ default:
1584
+ return idNumber === void 0 && idNumberExempt === void 0 ? void 0 : {
1585
+ ...identificationData,
1586
+ expiryDate: "",
1587
+ cardNumber: "",
1588
+ nationalIdExempt: apiData?.nationalIdExempt ?? !idNumber
1589
+ };
1590
+ }
1591
+ };
1592
+ const mapIndividualOnfidoSchemaToLegalEntity = (individualOnfido, isExperimentEnabled, matchingScenario) => {
1593
+ const legalEntity = {
1594
+ ...formatObject(individualOnfido, individualOnfidoApiKeyMapping),
1595
+ type: LegalEntityTypes.INDIVIDUAL
1596
+ };
1597
+ if (individualOnfido.additionalPersonalDetails) {
1598
+ if (isExperimentEnabled("EnableTaxIdRequiredForBusinessAccountsScenarios") && matchingScenario?.includes(Scenarios.L_TAXINFO) && individualOnfido.additionalPersonalDetails?.idNumber && individualOnfido.additionalPersonalDetails?.typeOfIdentity && individualOnfido.additionalPersonalDetails?.country === CountryCodes.Spain) {
1599
+ legalEntity.individual.taxInformation = [
1600
+ {
1601
+ country: individualOnfido.additionalPersonalDetails.country,
1602
+ number: individualOnfido.additionalPersonalDetails.idNumber,
1603
+ type: individualOnfido.additionalPersonalDetails.typeOfIdentity.toUpperCase()
1604
+ }
1605
+ ];
1606
+ }
1607
+ legalEntity.individual.identificationData = adjustOnfidoIdentificationData(
1608
+ individualOnfido.additionalPersonalDetails,
1609
+ legalEntity.individual.identificationData
1610
+ );
1611
+ }
1612
+ const nameLocalization = [
1613
+ mapSchemaFieldsToApiScriptLocalization(individualOnfido.basicDetails ?? {}, "jaHani"),
1614
+ mapSchemaFieldsToApiScriptLocalization(individualOnfido.basicDetails ?? {}, "jaKana")
1615
+ ].filter(({ fields }) => !isEmpty$1(fields));
1616
+ if (nameLocalization.length) {
1617
+ legalEntity.individual.name.localization = nameLocalization;
1618
+ }
1619
+ const addressLocalizations = mapJpAddressSchemaToAddressLocalizations(
1620
+ individualOnfido.additionalPersonalDetails
1621
+ );
1622
+ if (addressLocalizations.length > 0)
1623
+ legalEntity.individual.residentialAddress.localization = addressLocalizations;
1624
+ if (individualOnfido.basicDetails?.phoneNumber) {
1625
+ const phone = {
1626
+ number: individualOnfido.basicDetails.phoneNumber.number,
1627
+ type: "mobile"
1628
+ };
1629
+ if (phone.number && legalEntity.individual) {
1630
+ legalEntity.individual.phone = phone;
1631
+ } else {
1632
+ delete legalEntity?.individual?.phone;
1633
+ }
1634
+ }
1635
+ return legalEntity;
1636
+ };
1637
+ const identityOnfidoBase = {
1638
+ role: {
1639
+ rule: "requiredIfDecisionMakerTask"
1640
+ },
1641
+ firstName: {
1642
+ rule: "REQUIRED"
1643
+ },
1644
+ lastName: {
1645
+ rule: "REQUIRED"
1646
+ },
1647
+ birthDate: {
1648
+ rule: "REQUIRED"
1649
+ },
1650
+ phoneNumber: {
1651
+ rules: ["requiredIfPhoneScenarioDisabled", "contactsIfRequiredForRole"]
1652
+ },
1653
+ email: {
1654
+ rule: "contactsIfRequiredForRole"
1655
+ },
1656
+ jobTitle: {
1657
+ rule: "jobTitleIfRequiredForRole"
1658
+ },
1659
+ placeOfBirth: {
1660
+ rule: "isPlaceOfBirthRequired"
1661
+ },
1662
+ nationality: {
1663
+ rule: "nationalityIfRequiredForRole"
1664
+ },
1665
+ address: {
1666
+ rule: "addressIfRequiredForCountry"
1667
+ },
1668
+ otherAddressInformation: {
1669
+ rule: "otherAddressInfoIfRequiredForCountry"
1670
+ },
1671
+ country: {
1672
+ rule: "REQUIRED"
1673
+ },
1674
+ postalCode: {
1675
+ rule: "postalCodeIfRequiredForCountry"
1676
+ },
1677
+ city: {
1678
+ rule: "cityIfRequiredForCountry"
1679
+ },
1680
+ stateOrProvince: {
1681
+ rule: "stateOrProvinceIfRequiredForCountry"
1682
+ },
1683
+ proofOfResidency: {
1684
+ rule: "isProofOfResidencyRequired"
1685
+ },
1686
+ proofOfNationalId: {
1687
+ rule: "isProofOfNationalIdRequired"
1688
+ },
1689
+ relationship: {
1690
+ rule: "legalRepresentativeRelationshipRequired"
1691
+ },
1692
+ proofOfRelationship: {
1693
+ rule: "isProofOfRelationshipRequired"
1694
+ },
1695
+ nomineeDirector: {
1696
+ rules: ["isGuidedDecisionMakersFlowDisabled", "nomineeDirectorRequiredForCountry"]
1697
+ },
1698
+ nomineeShareholder: {
1699
+ rules: ["isGuidedDecisionMakersFlowDisabled", "nomineeShareHolderRequiredForCountry"]
1700
+ },
1701
+ idVerificationMethod: {
1702
+ rule: "isIdVerificationMethodRequired"
1703
+ },
1704
+ idDocument: {
1705
+ // (either from Onfido or previously-uploaded document)
1706
+ rule: "isUsingInstantVerificationOrHasExistingDocument"
1707
+ },
1708
+ idDocumentType: {
1709
+ // If the user has a missing ID error and chooses manual flow
1710
+ rule: "isManualIdFlowAndHasMissingData"
1711
+ },
1712
+ /**
1713
+ * Below fields only relevant if manual ID is needed
1714
+ * @see identityNumber
1715
+ * @see idDocRequired
1716
+ */
1717
+ idFrontPage: {
1718
+ rule: "hasChosenIdType"
1719
+ },
1720
+ idBackPage: {
1721
+ rule: "backPageIfRequiredForIdType"
1722
+ },
1723
+ // Fields required for Guided decision makers flow
1724
+ isSignatory: {
1725
+ rules: ["isGuidedDecisionMakersFlowEnabled", "requiredIfDecisionMakerTask"]
1726
+ },
1727
+ isOwner: {
1728
+ rules: ["isGuidedDecisionMakersFlowEnabled", "requiredIfDecisionMakerTask"]
1729
+ },
1730
+ isControllingPerson: {
1731
+ rules: ["isGuidedDecisionMakersFlowEnabled", "requiredIfDecisionMakerTask"]
1732
+ },
1733
+ isDirector: {
1734
+ rules: [
1735
+ "isGuidedDecisionMakersFlowEnabled",
1736
+ "requiredIfDecisionMakerTask",
1737
+ "isDirectorRequiredForCountry"
1738
+ ]
1739
+ },
1740
+ isNomineeDirector: {
1741
+ rules: [
1742
+ "isGuidedDecisionMakersFlowEnabled",
1743
+ "requiredIfDecisionMakerTask",
1744
+ "nomineeDirectorRequiredForCountry"
1745
+ ]
1746
+ },
1747
+ isNomineeShareholder: {
1748
+ rules: [
1749
+ "isGuidedDecisionMakersFlowEnabled",
1750
+ "requiredIfDecisionMakerTask",
1751
+ "nomineeShareHolderRequiredForCountry"
1752
+ ]
1753
+ },
1754
+ // Japanese name fields
1755
+ jaHaniFirstName: {
1756
+ rule: "japanSpecificField"
1757
+ },
1758
+ jaHaniLastName: {
1759
+ rule: "japanSpecificField"
1760
+ },
1761
+ jaKanaFirstName: {
1762
+ rule: "japanSpecificField"
1763
+ },
1764
+ jaKanaLastName: {
1765
+ rule: "japanSpecificField"
1766
+ },
1767
+ // Japanese address fields
1768
+ jaHaniAddress: {
1769
+ rule: "japanSpecificField"
1770
+ },
1771
+ jaHaniCity: {
1772
+ rule: "japanSpecificField"
1773
+ },
1774
+ jaHaniStateOrProvince: {
1775
+ rule: "japanSpecificField"
1776
+ },
1777
+ jaKanaCity: {
1778
+ rule: "japanSpecificField"
1779
+ },
1780
+ jaKanaStateOrProvince: {
1781
+ rule: "japanSpecificField"
1782
+ }
1783
+ };
1784
+ const identityNumber = {
1785
+ idNumber: {
1786
+ rule: "idNumberRules",
1787
+ obscured: true
1788
+ },
1789
+ idNumberExempt: {
1790
+ rules: ["idNumberExemptIfApplicableCountry", "isDirectorIdNumberRequiredForCountry"]
1791
+ },
1792
+ idDocumentType: {
1793
+ // If the user chooses to not provide an ID number, we'll need an ID from them
1794
+ rule: "isManualIdFlowAndNotProvidingIdNumber"
1795
+ }
1796
+ };
1797
+ const additionalIdentityInfo = {
1798
+ typeOfIdentity: {
1799
+ rules: ["requiredIfCountryUsesMultipleTypesOfIdentity", "isDirectorIdNumberRequiredForCountry"]
1800
+ },
1801
+ issuerState: {
1802
+ rule: "issuerStateRequired"
1803
+ },
1804
+ licenseCardNumber: {
1805
+ rule: "licenseCardNumberRules"
1806
+ },
1807
+ expiryDate: {
1808
+ rule: "expiryDateRequired"
1809
+ }
1810
+ };
1811
+ const idDocRequired = {
1812
+ // These fields are relevant for the manual ID flow only.
1813
+ // If we get `L1_IDDOC` then we know we need to require a manual ID upload when the manual flow is used
1814
+ idDocumentType: {
1815
+ rule: "isManualIdFlow"
1816
+ }
1817
+ };
1818
+ const nationality = {
1819
+ nationality: {
1820
+ rule: "REQUIRED"
1821
+ }
1822
+ };
1823
+ const phoneNumberBase = {
1824
+ phoneNumber: {
1825
+ rule: "contactsIfRequiredForRole"
1826
+ }
1827
+ };
1828
+ const taxInformationBase = {
1829
+ taxInformation: { rule: "countryUsesTaxId" }
1830
+ };
1831
+ const individualOnfidoFieldsPerScenario = {
1832
+ L0: drop("address", "birthDate").from(identityOnfidoBase),
1833
+ L1: identityOnfidoBase,
1834
+ L1_ID: {
1835
+ ...identityOnfidoBase,
1836
+ ...identityNumber,
1837
+ ...additionalIdentityInfo
1838
+ },
1839
+ L1_IDO: {
1840
+ // TODO: change idNumber rule to optional once optional fields are implemented
1841
+ ...identityOnfidoBase,
1842
+ ...identityNumber,
1843
+ ...additionalIdentityInfo
1844
+ },
1845
+ L1_NAT: {
1846
+ ...identityOnfidoBase,
1847
+ ...identityNumber,
1848
+ ...additionalIdentityInfo,
1849
+ ...nationality
1850
+ },
1851
+ L_TAXINFO: { ...identityOnfidoBase, ...taxInformationBase },
1852
+ L1_IDDOC: idDocRequired,
1853
+ L_PH: phoneNumberBase
1854
+ };
1855
+ const parseIndividualOnfidoScenarios = (scenarios) => composePerScenarioFormConfigurations(scenarios, individualOnfidoFieldsPerScenario);
1856
+ const parseConfiguration = ({ scenarios }) => parseIndividualOnfidoScenarios(scenarios);
1857
+ const logger = createLogger();
1858
+ function IndividualOnfidoDropin({
1859
+ taskType = TaskTypes.INDIVIDUAL,
1860
+ parentLegalEntity,
1861
+ legalEntityResponse,
1862
+ handleHomeClick,
1863
+ isTargetLegalEntityType,
1864
+ country: parentCountry,
1865
+ problems: propProblems,
1866
+ onSubmit: externalOnSubmit,
1867
+ asModal = false,
1868
+ handleBackClick: externalBackClick,
1869
+ trustedFields,
1870
+ trustedFieldsProvider,
1871
+ trustedRoles
1872
+ }) {
1873
+ const { baseUrl, rootLegalEntityId } = useApiContext();
1874
+ const { accountHolder, setAccountHolder } = useAccountHolder();
1875
+ const { i18n } = useI18nContext();
1876
+ const { t } = useTranslation("individual");
1877
+ const userEvents = useAnalyticsContext();
1878
+ const { showToast, clearToasts } = useToastContext();
1879
+ const { isExperimentEnabled } = useExperimentsContext();
1880
+ const { isSettingEnabled } = useSettingsContext();
1881
+ const queryClient = useQueryClient();
1882
+ const isGuidedDecisionMakersFlowEnabled = isExperimentEnabled("EnableGuidedDecisionMakersFlow") || isExperimentEnabled("DecisionMakersFlowOptimization_GuidedDecisionMakersFlow");
1883
+ const isGuidedDecisionMakersFlowDisabled = isExperimentEnabled("DisableGuidedDecisionMakersFlow");
1884
+ const defaultCountry = "NL";
1885
+ const { data: providerStatus } = useProviderStatus({
1886
+ providers: ["idDocument"],
1887
+ country: legalEntityResponse ? getLegalEntityCountry(legalEntityResponse) : defaultCountry
1888
+ });
1889
+ const isInstantVerificationEnabled = providerStatus?.statuses?.idDocument?.enabled ?? true;
1890
+ const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
1891
+ const isRoleFieldNeeded = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER;
1892
+ const dataFromResponse = useMemo(() => {
1893
+ if (legalEntityResponse) {
1894
+ return mapLegalEntityToIndividualOnfidoSchema(
1895
+ legalEntityResponse,
1896
+ isTargetLegalEntityType,
1897
+ isRoleFieldNeeded,
1898
+ parentLegalEntity
1899
+ );
1900
+ }
1901
+ return {
1902
+ additionalPersonalDetails: {
1903
+ country: parentCountry
1904
+ }
1905
+ };
1906
+ }, [
1907
+ legalEntityResponse,
1908
+ parentCountry,
1909
+ isTargetLegalEntityType,
1910
+ isRoleFieldNeeded,
1911
+ parentLegalEntity
1912
+ ]);
1913
+ const [matchingScenario, setMatchingScenario] = useState();
1914
+ const [validationErrors, setValidationErrors] = useState();
1915
+ const [loadingStatus, setLoadingStatus] = useState("success");
1916
+ const [existingAttachments, setExistingAttachments] = useState();
1917
+ const [documents, setDocuments] = useState();
1918
+ const [country, setCountry] = useState(
1919
+ dataFromResponse?.additionalPersonalDetails?.country ?? parentCountry
1920
+ );
1921
+ const [derivedProps, setDerivedProps] = useState();
1922
+ const [nextHandler, setNextHandler] = useState();
1923
+ const problems = useMemo(
1924
+ () => ({
1925
+ ...propProblems,
1926
+ validationErrors
1927
+ }),
1928
+ [propProblems, validationErrors]
1929
+ );
1930
+ const hasVerificationErrors = propProblems?.verificationErrors && Object.keys(propProblems.verificationErrors).length > 0;
1931
+ useEffect(() => {
1932
+ userEvents.updateBaseTrackingPayload({ task: taskType });
1933
+ userEvents.addTaskEvent("Landed on page", {
1934
+ actionType: "start"
1935
+ });
1936
+ }, []);
1937
+ const individualFieldValidations = useCallback(
1938
+ (data2) => ({
1939
+ basicDetails: basicDetailsValidators({
1940
+ isExperimentEnabled
1941
+ }),
1942
+ additionalPersonalDetails: additionalPersonalDetailsValidators({
1943
+ country: data2?.additionalPersonalDetails?.country ?? country,
1944
+ isExperimentEnabled,
1945
+ isSettingEnabled,
1946
+ taskType,
1947
+ idNumberType: data2?.additionalPersonalDetails?.typeOfIdentity,
1948
+ idNumberExempt: data2?.additionalPersonalDetails?.idNumberExempt,
1949
+ idNumber: data2?.additionalPersonalDetails?.idNumber,
1950
+ existingIdNumber: dataFromResponse.additionalPersonalDetails?.idNumber,
1951
+ formVerificationErrors: problems?.verificationErrors?.additionalPersonalDetails,
1952
+ i18n,
1953
+ taxIdNumberType: data2?.additionalPersonalDetails?.taxInformation?.length ? data2?.additionalPersonalDetails?.taxInformation[0]?.type : void 0
1954
+ })
1955
+ }),
1956
+ [
1957
+ country,
1958
+ dataFromResponse.additionalPersonalDetails?.idNumber,
1959
+ i18n,
1960
+ isExperimentEnabled,
1961
+ isSettingEnabled,
1962
+ problems?.verificationErrors?.additionalPersonalDetails,
1963
+ taskType
1964
+ ]
1965
+ );
1966
+ const validatePhoneNumber = useValidatePhoneNumberImperatively();
1967
+ const { mutateAsync: verifyIdNumber2 } = useVerifyIdNumber();
1968
+ const individualFieldAsyncValidations = useCallback(
1969
+ (data2) => ({
1970
+ basicDetails: {
1971
+ phoneNumber: getAsyncPhoneValidationRules(validatePhoneNumber).phoneNumber
1972
+ },
1973
+ additionalPersonalDetails: {
1974
+ idNumber: getAsyncIdNumberValidationRule(verifyIdNumber2, data2?.additionalPersonalDetails).idNumber
1975
+ }
1976
+ }),
1977
+ [verifyIdNumber2, validatePhoneNumber]
1978
+ );
1979
+ const defaultData = useMemo(() => {
1980
+ if (!documents) return dataFromResponse;
1981
+ return {
1982
+ ...dataFromResponse,
1983
+ ...drop("idDocument").from(documents),
1984
+ idVerificationMethod: {
1985
+ idDocument: documents.idDocument,
1986
+ idVerificationMethod: "existingDocument"
1987
+ }
1988
+ };
1989
+ }, [documents, dataFromResponse]);
1990
+ const form = useMultiForm({
1991
+ requiredFields: derivedProps?.requiredFields,
1992
+ defaultData,
1993
+ rules: individualFieldValidations,
1994
+ asyncRules: individualFieldAsyncValidations,
1995
+ optionalFields: derivedProps?.optionalFields,
1996
+ obscuredFields: {
1997
+ /**takes care of scenario when the 4 digit provided is wrong based on verification errors and
1998
+ * we need to show validation error for defaultData which is already saved
1999
+ **/
2000
+ additionalPersonalDetails: check4DigitSsnFailed(
2001
+ problems?.verificationErrors?.additionalPersonalDetails
2002
+ ) ? [] : ["idNumber"]
2003
+ }
2004
+ });
2005
+ const documentUtils = documentApiUtils({
2006
+ baseUrl: baseUrl.value,
2007
+ rootLegalEntityId: rootLegalEntityId.value
2008
+ });
2009
+ const { data, requiredFields } = form;
2010
+ useEffect(() => {
2011
+ setCountry(data?.additionalPersonalDetails?.country ?? parentCountry);
2012
+ }, [data?.additionalPersonalDetails?.country, parentCountry]);
2013
+ const { data: scenarios } = useScenarios(country, LegalEntityTypes.INDIVIDUAL);
2014
+ useEffect(() => {
2015
+ if (!scenarios) return;
2016
+ setHasMotionCaptureScenario(scenarios);
2017
+ setMatchingScenario(scenarios);
2018
+ }, [scenarios]);
2019
+ const { fieldConfigurations } = useScenarioConfiguration({
2020
+ parseConfiguration,
2021
+ legalEntityType: LegalEntityTypes.INDIVIDUAL,
2022
+ setLoadingStatus,
2023
+ country
2024
+ });
2025
+ const fieldsFromCustomRules = useMemo(
2026
+ () => individualOnfidoRules({
2027
+ matchingScenario,
2028
+ data,
2029
+ country: data?.additionalPersonalDetails?.country ?? country,
2030
+ taskType,
2031
+ isExperimentEnabled,
2032
+ rootLegalEntity: parentLegalEntity,
2033
+ problems
2034
+ }),
2035
+ [country, matchingScenario, data, isExperimentEnabled, parentLegalEntity, taskType, problems]
2036
+ );
2037
+ useEffect(() => {
2038
+ const derivedProps2 = getPropsFromConfigurations({
2039
+ scenarioConfiguration: fieldConfigurations,
2040
+ forms: individualOnfidoForms,
2041
+ remediationActions: problems?.remediationActions ? Object.values(problems?.remediationActions) : [],
2042
+ dataMissingErrors: problems?.missingData ?? [],
2043
+ fieldsWithExistingData: legalEntityResponse ? getFieldsWithExistingData(
2044
+ legalEntityResponse,
2045
+ individualOnfidoApiKeyMapping,
2046
+ individualOnfidoDocumentMapping,
2047
+ [
2048
+ "additionalPersonalDetails.typeOfIdentity",
2049
+ "additionalPersonalDetails.idNumber",
2050
+ "additionalPersonalDetails.stateOrProvince",
2051
+ "additionalPersonalDetails.issuerState"
2052
+ ]
2053
+ ) : [],
2054
+ customRules: fieldsFromCustomRules,
2055
+ legalEntityType: legalEntityResponse?.type,
2056
+ legalEntityTrustedFields: [],
2057
+ remediationFieldAsOptional: true
2058
+ });
2059
+ const updatedDerivedProps = mandateIdVerificationForMotionCapture(
2060
+ showIndividualMotionCapture?.value,
2061
+ derivedProps2
2062
+ );
2063
+ if (updatedDerivedProps) {
2064
+ setDerivedProps(updatedDerivedProps);
2065
+ }
2066
+ }, [
2067
+ fieldConfigurations,
2068
+ legalEntityResponse,
2069
+ fieldsFromCustomRules,
2070
+ problems?.remediationActions,
2071
+ problems?.missingData
2072
+ ]);
2073
+ useEffect(() => {
2074
+ if (!legalEntityResponse?.documentDetails?.length) return;
2075
+ documentUtils.fetchDocuments(legalEntityResponse.documentDetails, legalEntityResponse?.id).then((res) => {
2076
+ setExistingAttachments(res[0].attachments);
2077
+ setDocuments(mapApiDocumentToIndividualDocuments(legalEntityResponse?.id));
2078
+ }).catch(() => {
2079
+ showToast({ label: i18n.get("failedToFetchRelevantDocuments"), variant: "error" });
2080
+ });
2081
+ }, []);
2082
+ const forms = useMemo(() => {
2083
+ const requiredForms = getRequiredForms(
2084
+ individualOnfidoForms,
2085
+ derivedProps?.requiredFields,
2086
+ derivedProps?.optionalFields
2087
+ );
2088
+ const filteredForms = !isInstantVerificationEnabled ? requiredForms.filter((f) => f.formId !== "idVerificationMethod") : requiredForms;
2089
+ return addValidityToForms(filteredForms, form.isValid, problems);
2090
+ }, [derivedProps, form.isValid, isInstantVerificationEnabled, problems]);
2091
+ const { mutateAsync: getIdVerificationStartCheck } = useIdVerificationStartCheck();
2092
+ const handleInstantIdVerificationStartCheck = async (onfidoResponse, legalEntityId) => {
2093
+ const providerId = idVerificationProviderId.value;
2094
+ if (!providerId) throw Error("idVerificationProviderId not yet set");
2095
+ const data2 = {
2096
+ providerId,
2097
+ legalEntityId,
2098
+ captureMetadata: onfidoResponse
2099
+ };
2100
+ await getIdVerificationStartCheck(data2);
2101
+ };
2102
+ const roleTypes = isRoleFieldNeeded && parentLegalEntity ? getAllowedDecisionMakerRoles(parentLegalEntity, taskType, matchingScenario) : [];
2103
+ const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
2104
+ const idDocumentTypeOptions = getLocalizedIdDocumentTypeOptions(country);
2105
+ const submitLegalEntity = async ({
2106
+ dataSubmitted,
2107
+ legalEntity,
2108
+ idDocumentType
2109
+ }) => {
2110
+ let updatedLegalEntity;
2111
+ const existingLeId = legalEntityResponse?.id;
2112
+ if (!existingLeId) {
2113
+ updatedLegalEntity = await createLegalEntity(legalEntity);
2114
+ userEvents.addTaskEvent("Success", {
2115
+ actionType: "submit",
2116
+ countryOfRegistration: dataSubmitted.additionalPersonalDetails?.country,
2117
+ roles: dataSubmitted.basicDetails?.role
2118
+ });
2119
+ } else {
2120
+ updatedLegalEntity = await updateLegalEntity({
2121
+ ...drop("type").from(legalEntity),
2122
+ id: existingLeId
2123
+ });
2124
+ userEvents.addTaskEvent("Success", {
2125
+ actionType: "submit",
2126
+ countryOfRegistration: dataSubmitted.additionalPersonalDetails?.country,
2127
+ documentType: idDocumentType
2128
+ });
2129
+ }
2130
+ return updatedLegalEntity;
2131
+ };
2132
+ const submitDocuments = async ({
2133
+ legalEntity,
2134
+ dataSubmitted
2135
+ }) => {
2136
+ const idDocument2 = dataSubmitted.idVerificationMethod?.idDocument;
2137
+ if (idDocument2?.instantIdVerificationData) {
2138
+ if (providerStatus?.statuses?.idDocument?.enabled === false) {
2139
+ throw new Error("Provider unexpectedly disabled instant verification flow");
2140
+ }
2141
+ await handleInstantIdVerificationStartCheck(
2142
+ idDocument2.instantIdVerificationData,
2143
+ legalEntity.id
2144
+ );
2145
+ } else {
2146
+ const formattedDocuments = await mapIndividualDocumentToApiDocument(
2147
+ dataSubmitted,
2148
+ legalEntity.id
2149
+ );
2150
+ if (!formattedDocuments || formattedDocuments?.length === 0) {
2151
+ if (existingAttachments?.length)
2152
+ logger.log(
2153
+ "User has already uploaded documents and is not changing them, nothing needs to be done"
2154
+ );
2155
+ else
2156
+ logger.error(
2157
+ `formattedDocuments is empty, but there are no existing documents. Something has gone wrong`
2158
+ );
2159
+ return;
2160
+ }
2161
+ formattedDocuments[0].attachments = mergeAttachments(
2162
+ existingAttachments ?? [],
2163
+ formattedDocuments[0]?.attachments ?? []
2164
+ ).filter((attachment) => attachment.content);
2165
+ const uploadedDocuments = await documentUtils.uploadDocuments(
2166
+ formattedDocuments,
2167
+ legalEntity.id
2168
+ );
2169
+ uploadedDocuments?.forEach((doc) => {
2170
+ userEvents.addTaskEvent("Success", {
2171
+ actionType: "upload",
2172
+ documentType: doc.type,
2173
+ fileExtention: doc?.attachments?.map((item) => getFileExtention(item.pageName ?? "")).filter((item) => item !== void 0) ?? void 0
2174
+ });
2175
+ });
2176
+ }
2177
+ };
2178
+ const hasRolesChanged = (legalEntityId, existingEntityAssociations, newRoles) => {
2179
+ const existingRoles = existingEntityAssociations?.filter((association) => association.legalEntityId === legalEntityId).map(({ type }) => type);
2180
+ return !doArraysMatch(existingRoles, newRoles);
2181
+ };
2182
+ const attachAssociationToParentLegalEntity = async ({
2183
+ legalEntity,
2184
+ parentLE,
2185
+ dataSubmitted
2186
+ }) => {
2187
+ const newRoles = taskType === TaskTypes.DECISION_MAKER || taskType === TaskTypes.TRUST_MEMBER_COMPANY_OWNER || taskType === TaskTypes.UNINCORPORATED_PARTNERSHIP_MEMBER_COMPANY_OWNER ? dataSubmitted?.basicDetails?.role : null;
2188
+ const existingEntityAssociations = getOwnEntityAssociations(parentLE);
2189
+ if (newRoles && (hasRolesChanged(legalEntity?.id, existingEntityAssociations, newRoles) || dataFromResponse.basicDetails?.jobTitle !== dataSubmitted?.basicDetails?.jobTitle || hasNomineesChanged(dataFromResponse.basicDetails, dataSubmitted.basicDetails))) {
2190
+ const updatedParentLegalEntity = {
2191
+ entityAssociations: [
2192
+ ...newRoles.map((role) => ({
2193
+ type: role,
2194
+ legalEntityId: legalEntity.id,
2195
+ ...DECISION_MAKER_TYPES_WITH_JOBTITLE$1.some((type) => type === role) && {
2196
+ jobTitle: dataSubmitted?.basicDetails?.jobTitle
2197
+ }
2198
+ })) || [],
2199
+ ...existingEntityAssociations.filter((ea) => ea.legalEntityId !== legalEntity.id) || []
2200
+ ]
2201
+ };
2202
+ const nomineeDataSource = !isGuidedDecisionMakersFlowDisabled && isGuidedDecisionMakersFlowEnabled ? dataSubmitted?.uboQuestionnaire : dataSubmitted.basicDetails;
2203
+ if (nomineeDataSource && updatedParentLegalEntity.entityAssociations) {
2204
+ updatedParentLegalEntity.entityAssociations = updatedParentLegalEntity.entityAssociations.map(
2205
+ (ea) => attachNomineeToRole(ea, country, nomineeDataSource)
2206
+ );
2207
+ }
2208
+ await updateLegalEntity({ ...updatedParentLegalEntity, id: parentLE.id });
2209
+ }
2210
+ };
2211
+ const onSubmit = async () => {
2212
+ setLoadingStatus("loading");
2213
+ const dataSubmitted = omitObscuredFieldsIfUnchanged(
2214
+ individualOnfidoObscuredFields,
2215
+ data,
2216
+ dataFromResponse
2217
+ );
2218
+ if (!dataSubmitted) {
2219
+ return;
2220
+ }
2221
+ try {
2222
+ const legalEntity = mapIndividualOnfidoSchemaToLegalEntity(
2223
+ dataSubmitted,
2224
+ isExperimentEnabled,
2225
+ matchingScenario
2226
+ );
2227
+ const idDocumentType = idDocumentTypeOptions.find(
2228
+ ({ id }) => dataSubmitted?.idVerificationMethod?.idDocument?.idDocumentType === id
2229
+ )?.id;
2230
+ legalEntity.entityAssociations = filterOutUnwantedAssociationsIfRootLE(
2231
+ taskType,
2232
+ legalEntityResponse,
2233
+ accountHolder || void 0
2234
+ );
2235
+ const submittedLegalEntity = await submitLegalEntity({
2236
+ dataSubmitted,
2237
+ legalEntity,
2238
+ idDocumentType
2239
+ });
2240
+ setAccountHolder(accountHolder);
2241
+ if (dataSubmitted.idVerificationMethod && dataSubmitted.idVerificationMethod?.idVerificationMethod !== "existingDocument" || hasVerificationErrors) {
2242
+ const isBafinSignatory = dataSubmitted?.basicDetails?.role?.includes(DecisionMakerTypes.SIGNATORY) && matchingScenario?.includes(Scenarios.L_BAFIN);
2243
+ if (!isBafinSignatory) {
2244
+ await submitDocuments({ legalEntity: submittedLegalEntity, dataSubmitted });
2245
+ }
2246
+ }
2247
+ if (parentLegalEntity) {
2248
+ await attachAssociationToParentLegalEntity({
2249
+ legalEntity: submittedLegalEntity,
2250
+ parentLE: parentLegalEntity,
2251
+ dataSubmitted
2252
+ });
2253
+ queryClient.invalidateQueries({
2254
+ queryKey: ["legalEntity", parentLegalEntity.id],
2255
+ refetchType: "all"
2256
+ });
2257
+ }
2258
+ idNowModalChildEntityId.value = submittedLegalEntity;
2259
+ setLoadingStatus("success");
2260
+ clearToasts();
2261
+ externalOnSubmit?.(dataSubmitted, matchingScenario);
2262
+ } catch (e) {
2263
+ const eventsAdditionalData = {};
2264
+ logger.error("Failed to update individual", e);
2265
+ if (isValidationError(e)) {
2266
+ const getErrors = processValidationErrors(e, TaskTypes.INDIVIDUAL);
2267
+ if (getErrors && !Object.keys(getErrors).length) {
2268
+ showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
2269
+ eventsAdditionalData.unmappedErrorNames = e.invalidFields?.map((field) => field.name).filter(Boolean);
2270
+ } else {
2271
+ setValidationErrors(getErrors);
2272
+ }
2273
+ } else if (isMaintenanceModeError(e)) {
2274
+ showToast({
2275
+ label: i18n.get("maintenanceModeMessage"),
2276
+ variant: "error",
2277
+ duration: "indefinite"
2278
+ });
2279
+ } else {
2280
+ showToast({ label: i18n.get("failedToUpdateDetails"), variant: "error" });
2281
+ }
2282
+ setLoadingStatus("success");
2283
+ userEvents.addTaskEvent("Encountered error", {
2284
+ actionType: "submit",
2285
+ additionalData: eventsAdditionalData,
2286
+ returnType: e?.errorCode,
2287
+ returnValue: e?.title || "backend"
2288
+ });
2289
+ }
2290
+ };
2291
+ const datasetUtils = datasetUtilities(i18n.locale);
2292
+ const formatIdDocument = (idDocument2) => {
2293
+ if (!idDocument2) return void 0;
2294
+ const documentType = idDocument2?.instantIdVerificationData ? onfidoDocumentTypeMapping.find(
2295
+ (document2) => idDocument2.instantIdVerificationData?.document_front.type === document2.id
2296
+ ) : idDocumentTypeOptions.find(({ id }) => idDocument2.idDocumentType === id);
2297
+ if (!documentType) return void 0;
2298
+ const frontPage = idDocument2.idFrontPage?.[0];
2299
+ const backPage = idDocument2.idBackPage?.[0];
2300
+ if (!frontPage) return void 0;
2301
+ return {
2302
+ documentType: i18n.get(documentType.name),
2303
+ ...backPage && documentType.hasBackPage ? {
2304
+ frontPage: frontPage.name,
2305
+ backPage: backPage.name
2306
+ } : {
2307
+ fileName: frontPage.name
2308
+ }
2309
+ };
2310
+ };
2311
+ const formatFileSummaryData = ({
2312
+ idVerificationMethod,
2313
+ manualIdUpload,
2314
+ proofOfNationalId,
2315
+ proofOfResidency,
2316
+ proofOfRelationship
2317
+ }) => {
2318
+ const proofOfNationalIdFile = proofOfNationalId?.proofOfNationalId?.[0];
2319
+ const proofOfResidencyFile = proofOfResidency?.proofOfResidency?.[0];
2320
+ const proofOfRelationshipFile = proofOfRelationship?.proofOfRelationship?.[0];
2321
+ const idDocument2 = idVerificationMethod?.idVerificationMethod === "manualVerification" ? manualIdUpload : idVerificationMethod?.idDocument;
2322
+ return {
2323
+ ...(idDocument2?.idDocumentType || idDocument2?.instantIdVerificationData) && {
2324
+ idDocument: formatIdDocument(idDocument2)
2325
+ },
2326
+ ...proofOfNationalIdFile && {
2327
+ proofOfNationalId: {
2328
+ fileName: proofOfNationalIdFile.name
2329
+ }
2330
+ },
2331
+ ...proofOfResidencyFile && {
2332
+ proofOfResidency: {
2333
+ fileName: proofOfResidencyFile.name
2334
+ }
2335
+ },
2336
+ ...proofOfRelationshipFile && {
2337
+ proofOfRelationship: {
2338
+ fileName: proofOfRelationshipFile.name
2339
+ }
2340
+ }
2341
+ };
2342
+ };
2343
+ const isManualVerificationOrExistingDoc = (idVerificationMethod) => idVerificationMethod === "manualVerification" || idVerificationMethod === "existingDocument";
2344
+ const formatDataForSummary = () => {
2345
+ let summaryData = cloneObject(data);
2346
+ if (summaryData?.basicDetails?.phoneNumber) {
2347
+ summaryData.basicDetails.phoneNumber = summaryData.basicDetails.phoneNumber.number;
2348
+ }
2349
+ if (summaryData.additionalPersonalDetails?.nationality) {
2350
+ summaryData.additionalPersonalDetails.nationality = datasetUtils.getCountryName(
2351
+ summaryData.additionalPersonalDetails.nationality
2352
+ );
2353
+ }
2354
+ if (data.additionalPersonalDetails) {
2355
+ if (country === CountryCodes.Japan) {
2356
+ summaryData.additionalPersonalDetails = {
2357
+ ...drop(...JP_ADDRESS_REQUIRED_FIELDS).from(summaryData.additionalPersonalDetails),
2358
+ ...mapJpAddressSummary(data.additionalPersonalDetails, datasetUtils)
2359
+ };
2360
+ } else {
2361
+ summaryData.additionalPersonalDetails = {
2362
+ ...summaryData.additionalPersonalDetails,
2363
+ ...mapAddressLabels(data.additionalPersonalDetails, datasetUtils)
2364
+ };
2365
+ }
2366
+ }
2367
+ if (summaryData.basicDetails?.accountHolder) {
2368
+ summaryData.basicDetails.accountHolder = i18n.get(summaryData.basicDetails.accountHolder);
2369
+ }
2370
+ if (summaryData.additionalPersonalDetails?.birthDate) {
2371
+ summaryData.additionalPersonalDetails.birthDate = localizeDateString(
2372
+ summaryData.additionalPersonalDetails.birthDate,
2373
+ i18n.locale
2374
+ );
2375
+ }
2376
+ if (isManualVerificationOrExistingDoc(summaryData.idVerificationMethod?.idVerificationMethod) || summaryData.proofOfResidency) {
2377
+ const fileSummaryData = formatFileSummaryData(data);
2378
+ summaryData = { ...summaryData, ...fileSummaryData };
2379
+ summaryData.manualIdUpload = { ...summaryData.idDocument };
2380
+ summaryData.idVerificationMethod.idDocument = { ...summaryData.idDocument };
2381
+ }
2382
+ if (summaryData.additionalPersonalDetails?.taxInformation) {
2383
+ const taxInformation = summaryData.additionalPersonalDetails.taxInformation.find(
2384
+ (taxId) => taxId.country === data.additionalPersonalDetails?.nationality
2385
+ );
2386
+ if (taxInformation) {
2387
+ delete summaryData.additionalPersonalDetails.taxInformation;
2388
+ summaryData.additionalPersonalDetails[taxInformation.type] = taxInformation.number;
2389
+ }
2390
+ }
2391
+ if (summaryData?.signatoryQuestionnaire) {
2392
+ summaryData.signatoryQuestionnaire = data?.signatoryQuestionnaire?.isSignatory === GuidanceQuestionValues.YES ? [i18n.get("signatorySummaryLabel")] : [];
2393
+ }
2394
+ if (summaryData?.uboQuestionnaire) {
2395
+ const roleFieldToLabelMap = {
2396
+ isOwner: "ownerSummaryLabel",
2397
+ isControllingPerson: "controllingPersonSummaryLabel",
2398
+ isDirector: "directorSummaryLabel"
2399
+ };
2400
+ summaryData.uboQuestionnaire = Object.keys(roleFieldToLabelMap).flatMap(
2401
+ (field) => data?.uboQuestionnaire?.[field] === GuidanceQuestionValues.YES ? [t(($) => $[roleFieldToLabelMap[field]])] : []
2402
+ );
2403
+ }
2404
+ return summaryData;
2405
+ };
2406
+ const omittedKeysForSummary = [
2407
+ ...taskType === TaskTypes.DECISION_MAKER ? ["role"] : [],
2408
+ ...data?.additionalPersonalDetails?.idNumberExempt ? ["idNumber"] : [],
2409
+ ...isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) ? ["idVerificationMethod", "modificationDate"] : []
2410
+ ];
2411
+ const isUploadEmpty = !data?.manualIdUpload || Object.keys(data?.manualIdUpload).length === 0;
2412
+ const omittedFormsForSummary = [
2413
+ // 1. Omit idDocument if instant OR (manual/existing AND upload is empty)
2414
+ ...data?.idVerificationMethod?.idVerificationMethod === "instantVerification" || isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) && isUploadEmpty ? ["idDocument"] : [],
2415
+ // 2. Omit idVerificationMethod if manual or existing
2416
+ ...isManualVerificationOrExistingDoc(data?.idVerificationMethod?.idVerificationMethod) ? ["idVerificationMethod"] : []
2417
+ ];
2418
+ const customLabelsForSummary = {
2419
+ idVerificationMethod: data?.idVerificationMethod?.idVerificationMethod === "instantVerification" ? "idVerificationMethod" : "idDocument"
2420
+ };
2421
+ const {
2422
+ handleNextClick,
2423
+ handleBackClick,
2424
+ activeForm,
2425
+ shouldValidate,
2426
+ gotoFormByFormIndex,
2427
+ steps
2428
+ } = useFormComposer({
2429
+ problems,
2430
+ externalBackClick,
2431
+ forms,
2432
+ onSubmit,
2433
+ triggerValidation: form.triggerValidation
2434
+ // TODO: figure out type of nested keys
2435
+ });
2436
+ const disableNextButton = computed(() => {
2437
+ const isVerificationMethod = activeForm?.formId === "idVerificationMethod";
2438
+ return isVerificationMethod && !activeForm?.isValid || isNextStepDisabled.value;
2439
+ });
2440
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
2441
+ /* @__PURE__ */ jsx(Show, { when: shouldShowIdNowModal, children: /* @__PURE__ */ jsx(IdNowVerificationModal, { handleFinish: handleHomeClick }) }),
2442
+ /* @__PURE__ */ jsx(FormContextProvider, { form, children: /* @__PURE__ */ jsx(
2443
+ FormFlow,
2444
+ {
2445
+ summary: {
2446
+ data: formatDataForSummary(),
2447
+ omitted: {
2448
+ keys: omittedKeysForSummary,
2449
+ forms: omittedFormsForSummary
2450
+ },
2451
+ problems,
2452
+ labels: customLabelsForSummary
2453
+ },
2454
+ asModal,
2455
+ currentStep: steps.current,
2456
+ disableNextButton: disableNextButton.value,
2457
+ forms,
2458
+ gotoFormByFormIndex,
2459
+ handleBackClick,
2460
+ handleCancelClick: handleHomeClick,
2461
+ handleNextClick: nextHandler || handleNextClick,
2462
+ loadingStatus,
2463
+ totalSteps: steps.total,
2464
+ children: /* @__PURE__ */ jsx(
2465
+ IndividualOnfido,
2466
+ {
2467
+ ...derivedProps,
2468
+ requiredFields,
2469
+ data,
2470
+ defaultCountry: country,
2471
+ activeForm,
2472
+ forms,
2473
+ scenarios,
2474
+ taskType,
2475
+ problems,
2476
+ onNext: handleNextClick,
2477
+ onBack: handleBackClick,
2478
+ legalEntityId: legalEntityResponse?.id,
2479
+ allowedRoles: roleTypes,
2480
+ shouldValidate,
2481
+ accountHolder,
2482
+ parentLegalEntity,
2483
+ trustedFields,
2484
+ trustedFieldsProvider,
2485
+ trustedRoles,
2486
+ setNextHandler,
2487
+ handleHomeClick
2488
+ }
2489
+ )
2490
+ }
2491
+ ) })
2492
+ ] });
2493
+ }
2494
+ export {
2495
+ IndividualOnfidoDropin as I,
2496
+ IndividualDropin as a
2497
+ };