@adyen/kyc-components 4.23.0 → 4.24.0-beta.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 (1012) hide show
  1. package/dist/4-people-DKuivE0m.js +35 -0
  2. package/dist/AcceptTermsOfServiceWorkflow-C3JrMbt5.js +28 -0
  3. package/dist/Accordion-Dgdxfe-d.js +112 -0
  4. package/dist/AccountSetupRejected-D63dyojj.js +19 -0
  5. package/dist/AdaptiveWorkflow-XhWdnJv-.js +33 -0
  6. package/dist/AdaptiveWorkflowComponent-pMWy1Vig.js +166 -0
  7. package/dist/AddressFields-BC3QHs2u.js +468 -0
  8. package/dist/Alert-Cc7p0N5h.js +172 -0
  9. package/dist/AnalyticsContext-CpimDlw4.js +21 -0
  10. package/dist/Avatar-oTPu6Ejy.js +54 -0
  11. package/dist/BusinessFinancingDropin-CxHK6KY3.js +1870 -0
  12. package/dist/BusinessFinancingPage-teAAjQl8.js +89 -0
  13. package/dist/BusinessRegistrationNumberField-DKka8aVU.js +103 -0
  14. package/dist/BusinessRegistrationNumberFieldGroup-Df6_sDA0.js +173 -0
  15. package/dist/BusinessTypeSelectionPage-BETJH6LZ.js +457 -0
  16. package/dist/Button-DPJ1k02w.js +108 -0
  17. package/dist/Checkbox-qfdF12cF.js +60 -0
  18. package/dist/ComponentGroup-SozxzKWw.js +32 -0
  19. package/dist/Confirm-DoN9R9Z3.js +77 -0
  20. package/dist/ConstitutionalDocument-Bxsr1hQb.js +1229 -0
  21. package/dist/ContactDetails-CiWftLi4.js +516 -0
  22. package/dist/ContextGuidance-BQPwRscq.js +29 -0
  23. package/dist/ContractViewer-CG9UNGz1.js +1030 -0
  24. package/dist/CountryField-DT6-Jr_b.js +38 -0
  25. package/dist/Currency-oeXHRWzy.js +211 -0
  26. package/dist/CustomerSupport-D0bE0zga.js +141 -0
  27. package/dist/DataConflictsModal-CCaMgguu.js +238 -0
  28. package/dist/DebugModal-Cvp7_Z-i.js +456 -0
  29. package/dist/DecisionMakerDetails-Bbb_8up2.js +569 -0
  30. package/dist/DecisionMakerDetailsPage-BDTMzs1X.js +121 -0
  31. package/dist/DecisionMakers-maoFXpGe.js +594 -0
  32. package/dist/Dropzone-ttbRg2LI.js +250 -0
  33. package/dist/EmbeddedStatus-CYd2p4sP.js +129 -0
  34. package/dist/EndStateLayout-zZPm8S5M.js +83 -0
  35. package/dist/EntityAssociation-C2_Xuvf5.js +163 -0
  36. package/dist/ErrorPanel-D4JNFkvi.js +205 -0
  37. package/dist/Field-DwDJQVSS.js +154 -0
  38. package/dist/FormFlow.module-DqMxjYHl.js +20 -0
  39. package/dist/GlobalEntryModal-CLoPJXFE.js +1203 -0
  40. package/dist/GlobalEntryPage-DNPSSZ3M.js +78 -0
  41. package/dist/Header-DVLlJ6we.js +93 -0
  42. package/dist/Icon-4XR6gZzk.js +175 -0
  43. package/dist/IdentityNumber-3V6ZqvHB.js +540 -0
  44. package/dist/IdentityNumberFieldGroup-CAjlgTWn.js +57 -0
  45. package/dist/IdentityScreeningWorkflow-CBStT1hs.js +307 -0
  46. package/dist/Image-Bn_Yyuof.js +33 -0
  47. package/dist/IndividualDropin-0t7Oj71F.js +4175 -0
  48. package/dist/IndustryCodeFieldGroup-C3Zro2ds.js +189 -0
  49. package/dist/InputDate-Bq3Sb-ZW.js +211 -0
  50. package/dist/InputText-CFDEmEtp.js +119 -0
  51. package/dist/Introduction-z2SqIq1W.js +326 -0
  52. package/dist/InvitedDecisionMakerComponent-CZOVc-t9.js +481 -0
  53. package/dist/JpAddressFields-F1YCOcbO.js +288 -0
  54. package/dist/LandingLayout-BsIoIFzs.js +76 -0
  55. package/dist/LegalCompanyNameField-Cosyjk52.js +108 -0
  56. package/dist/LegalName-CtqIpsfy.js +33 -0
  57. package/dist/LegalRepresentativeDetailsPage-DwIARCpj.js +73 -0
  58. package/dist/Link-CvYhseSD.js +32 -0
  59. package/dist/ListItem-CYTpdOMa.js +70 -0
  60. package/dist/Loader-BVtlpTeo.js +92 -0
  61. package/dist/LoaderWrapper-Dc88hY-P.js +34 -0
  62. package/dist/MaybeModal-C4ySaA8A.js +24 -0
  63. package/dist/Modal-CHES6970.js +109 -0
  64. package/dist/Name-CdCsijr5.js +61 -0
  65. package/dist/NewSummary-D55f70wB.js +73 -0
  66. package/dist/NodeRenderer-B3G7pvjG.js +185 -0
  67. package/dist/PatriotActDisclosure-DqUZeLms.js +266 -0
  68. package/dist/PayoutDetailsDropin-LKMpfono.js +4104 -0
  69. package/dist/PayoutDetailsPage-KNHCeXgk.js +69 -0
  70. package/dist/ProgressBar-DWFxLMUA.js +38 -0
  71. package/dist/RadioGroup-Bf3DlQnZ.js +47 -0
  72. package/dist/RadioWithLabel-DQIOEYpF.js +45 -0
  73. package/dist/Review-CS_-zAlg.js +99 -0
  74. package/dist/RootBusinessDetailsPage-1z2_FAb6.js +67 -0
  75. package/dist/RootBusinessLinesPage-BgbkJaW8.js +1464 -0
  76. package/dist/RootIndividualDetailsPage-DA4hh_gc.js +82 -0
  77. package/dist/Select-phAxjMBQ.js +782 -0
  78. package/dist/SignPCIComponent-tBnZMn1u.js +373 -0
  79. package/dist/SingpassSelection-B6_DsZtn.js +156 -0
  80. package/dist/SoleProprietorshipPage-2s1kA9ZV.js +69 -0
  81. package/dist/SourceOfFundsPage-CTjUdOWK.js +2800 -0
  82. package/dist/SourceOfFundsWorkflow-BZabOpi_.js +28 -0
  83. package/dist/StateContext-B2_Pqd_y.js +9 -0
  84. package/dist/StateField-BpMwetvd.js +55 -0
  85. package/dist/Step-C6XxGAda.js +191 -0
  86. package/dist/StructuredList-nPasiuLi.js +56 -0
  87. package/dist/Summary-DM31WxLr.js +235 -0
  88. package/dist/Task-DwGA1eXE.js +129 -0
  89. package/dist/TaskGroup-T594JSYM.js +46 -0
  90. package/dist/TaskListItem-Dx3hKOqG.js +123 -0
  91. package/dist/TaskStepperContextProvider-DdcsqXT7.js +26 -0
  92. package/dist/TaskVerificationStatus-DEXk_ndE.js +125 -0
  93. package/dist/TaxInformationField-CV7SpMH1.js +242 -0
  94. package/dist/TaxInformationFieldGroup-DI2LzuNr.js +290 -0
  95. package/dist/TaxReportingDropin-xYwJ-ju7.js +480 -0
  96. package/dist/TaxReportingWorkflow-BHyHgiI-.js +28 -0
  97. package/dist/TermsOfServiceManagement-CNQ4J5Gn.js +644 -0
  98. package/dist/TextArea-qGEo3PFG.js +81 -0
  99. package/dist/TileGroup-D1-M64Ul.js +172 -0
  100. package/dist/ToastContext-B_wd2IY2.js +13 -0
  101. package/dist/ToastContextProvider-DjYKMflX.js +103 -0
  102. package/dist/TrustDetailsPage-Byj68n3F.js +1172 -0
  103. package/dist/TrustMemberCompanyPage-Bcz4Ql7s.js +108 -0
  104. package/dist/TrustMemberIndividualPage-D6CgWF88.js +108 -0
  105. package/dist/TrustMemberRoleAndTypePage-IUp5FVRW.js +937 -0
  106. package/dist/TrustMembersOverview-7EoKoSMg.js +453 -0
  107. package/dist/UboTaskItem-BmcGj5_U.js +115 -0
  108. package/dist/UnincorporatedPartnershipIndividualPage-BKpJDhhU.js +78 -0
  109. package/dist/UnincorporatedPartnershipMemberCompanyPage-D8VliL0i.js +78 -0
  110. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-D00bHhyf.js +256 -0
  111. package/dist/UnincorporatedPartnershipMembersOverview-Dw5IMSkd.js +160 -0
  112. package/dist/VerificationErrorAlert-CixajVtq.js +38 -0
  113. package/dist/Workflow-CWzMRGHX.js +228 -0
  114. package/dist/_rolldown_dynamic_import_helper-sGNwd-kR.js +14 -0
  115. package/dist/accountHolderUtils-CAu4V0ed.js +43 -0
  116. package/dist/adyen-business-financing.js +38 -37
  117. package/dist/adyen-individual-configuration.js +65 -65
  118. package/dist/adyen-individual-status.js +35 -34
  119. package/dist/adyen-invited-decision-maker.js +3 -3
  120. package/dist/adyen-onboarding.js +109 -101
  121. package/dist/adyen-terms-of-service-management.js +3 -3
  122. package/dist/adyen-terms-of-service-status.js +9 -8
  123. package/dist/adyen-transfer-instrument-configuration.js +62 -61
  124. package/dist/adyen-transfer-instrument-management.js +76 -70
  125. package/dist/adyen-verification-status.js +10 -8
  126. package/dist/arrow-right-D2hul7WG.js +20 -0
  127. package/dist/bafinUtils-DDrD6bfK.js +96 -0
  128. package/dist/bag-CRRS1aow.js +20 -0
  129. package/dist/bank-BoirCLLW.js +20 -0
  130. package/dist/bg-BG-B0Ia8sQm.js +7 -0
  131. package/dist/bg-BG-B2xaZ3wB.js +7 -0
  132. package/dist/bg-BG-DAR7_x2a.js +7 -0
  133. package/dist/bg-BG-DqfAUTUt.js +7 -0
  134. package/dist/bg-BG-ivZjQNJZ.js +7 -0
  135. package/dist/bin-BOmfqfrr.js +30 -0
  136. package/dist/birthDateUtils-D6uk7zwm.js +84 -0
  137. package/dist/businessRegistrationNumberPatterns-A08SLm03.js +982 -0
  138. package/dist/capital-DTjbiurV.js +23 -0
  139. package/dist/cash-stack-7KpYpBek.js +33 -0
  140. package/dist/certificate-BPuoJ6Ip.js +23 -0
  141. package/dist/checkmark-BiSLf8M1.js +20 -0
  142. package/dist/checkmark-circle-Ams7bSve.js +28 -0
  143. package/dist/checkmark-circle-fill-_p4ss4ac.js +30 -0
  144. package/dist/checkmark-small-3bw4ftPV.js +20 -0
  145. package/dist/chevron-down-GgZawvoy.js +20 -0
  146. package/dist/chevron-left-TeZTTvo5.js +20 -0
  147. package/dist/chevron-right-Cg8XlTxx.js +20 -0
  148. package/dist/chevron-up-COQUTli0.js +20 -0
  149. package/dist/circle-CypWzg83.js +30 -0
  150. package/dist/circle-small-filled-DfdK2A35.js +20 -0
  151. package/dist/clock-DmfGJ2r9.js +28 -0
  152. package/dist/coins-CBvbB8_X.js +30 -0
  153. package/dist/constants-C8yo0_RA.js +233 -0
  154. package/dist/contract-D1_RJ_xh.js +20 -0
  155. package/dist/countries-BGMTpyJv.js +41 -0
  156. package/dist/country-BEZkohEO.js +25 -0
  157. package/dist/cross-BORHADVQ.js +20 -0
  158. package/dist/cross-circle-fill-CUXdo1x-.js +30 -0
  159. package/dist/cross-circle-fill-small-DdoPZZeo.js +20 -0
  160. package/dist/cs-CZ-BwO4yrI4.js +7 -0
  161. package/dist/cs-CZ-CHMQYoMF.js +7 -0
  162. package/dist/cs-CZ-DsKlW7_D.js +7 -0
  163. package/dist/cs-CZ-NVntX32n.js +7 -0
  164. package/dist/cs-CZ-ywYpJk1F.js +7 -0
  165. package/dist/da-DK-BvT8Ob4A.js +7 -0
  166. package/dist/da-DK-BzBfkSME.js +7 -0
  167. package/dist/da-DK-CE7jnGea.js +7 -0
  168. package/dist/da-DK-DH5YNYFM.js +7 -0
  169. package/dist/da-DK-LPtdP8h0.js +7 -0
  170. package/dist/datasetUtil-BdHPWsxZ.js +45 -0
  171. package/dist/de-DE-C9cUCFOi.js +7 -0
  172. package/dist/de-DE-Cn866nnd.js +7 -0
  173. package/dist/de-DE-DA4LpyZI.js +7 -0
  174. package/dist/de-DE-DKkoZQ0X.js +7 -0
  175. package/dist/de-DE-DY_EJohI.js +7 -0
  176. package/dist/de-DE-vdy64knk.js +7 -0
  177. package/dist/debouncedInputEvent-Fwwp_K_-.js +54 -0
  178. package/dist/debugStore-Dwn1FXrh.js +9 -0
  179. package/dist/decision-makers-group-iEF9oKPp.js +2673 -0
  180. package/dist/decisionMakerRoles-C6LMC4mh.js +185 -0
  181. package/dist/document-1-qvV57JdS.js +20 -0
  182. package/dist/document-person-DiJ7M8-D.js +28 -0
  183. package/dist/download-Ca4w0Yfr.js +23 -0
  184. package/dist/dropinUtils-DTBezwYT.js +491 -0
  185. package/dist/edit-1-D8VhDchs.js +20 -0
  186. package/dist/el-GR-ChapyKa7.js +7 -0
  187. package/dist/el-GR-Cvms0L4K.js +7 -0
  188. package/dist/el-GR-D9PjIB9j.js +7 -0
  189. package/dist/el-GR-Ov9hqMNe.js +7 -0
  190. package/dist/el-GR-aelq5Q0a.js +7 -0
  191. package/dist/el-GR-zFv0QxMR.js +7 -0
  192. package/dist/en-US-B7HQdrn_.js +7 -0
  193. package/dist/en-US-CI7y0UEH.js +7 -0
  194. package/dist/en-US-C_VjFvk_.js +7 -0
  195. package/dist/en-US-Cz4JoU20.js +41 -0
  196. package/dist/en-US-DPr5RN3e.js +7 -0
  197. package/dist/en-US-U0d3NI20.js +7 -0
  198. package/dist/en-US-tFsDZf7y.js +7 -0
  199. package/dist/entityAssociationUtil-CY0grcyH.js +58 -0
  200. package/dist/error-BvgoQFEI.js +36 -0
  201. package/dist/es-ES-BQrdtEfn.js +7 -0
  202. package/dist/es-ES-BdByhG4y.js +7 -0
  203. package/dist/es-ES-BzlHKYJK.js +7 -0
  204. package/dist/es-ES-DCUvAmKI.js +7 -0
  205. package/dist/es-ES-DdrA8McY.js +7 -0
  206. package/dist/es-ES-DhkTbihW.js +7 -0
  207. package/dist/es-LA-3WgncmHx.js +7 -0
  208. package/dist/es-LA-BxtxM3Ty.js +7 -0
  209. package/dist/es-LA-ChRHGYJP.js +7 -0
  210. package/dist/es-LA-JRuDva0n.js +7 -0
  211. package/dist/es-LA-i7tKJmA8.js +7 -0
  212. package/dist/et-EE-BXY66vAz.js +7 -0
  213. package/dist/et-EE-D8TSvkoE.js +7 -0
  214. package/dist/et-EE-DOgb4q9o.js +7 -0
  215. package/dist/et-EE-HHgM0CfO.js +7 -0
  216. package/dist/et-EE-V-YOCgoh.js +7 -0
  217. package/dist/external-link-Dy4le-8Q.js +20 -0
  218. package/dist/fi-FI-B-eTv4bG.js +7 -0
  219. package/dist/fi-FI-CClpbvJJ.js +7 -0
  220. package/dist/fi-FI-CVBmM-U1.js +7 -0
  221. package/dist/fi-FI-DCYPQ6vS.js +7 -0
  222. package/dist/fi-FI-DCbhu29J.js +7 -0
  223. package/dist/fieldConfigurations-CZCFghnK.js +11 -0
  224. package/dist/form-rules-B0RwhsVw.js +284 -0
  225. package/dist/formFieldsUtils-CnDkgahc.js +7 -0
  226. package/dist/formUtils-BHgG8yQZ.js +52 -0
  227. package/dist/formUtils-DVDcdZsP.js +84 -0
  228. package/dist/formatCurrency-BetgkQKi.js +23 -0
  229. package/dist/formatValidationError-q_w9DTrl.js +23 -0
  230. package/dist/fr-FR-B-jA_cbo.js +7 -0
  231. package/dist/fr-FR-BIyJL6Jj.js +7 -0
  232. package/dist/fr-FR-BzyefnBh.js +7 -0
  233. package/dist/fr-FR-C1xYwHeC.js +7 -0
  234. package/dist/fr-FR-D0hY9V44.js +7 -0
  235. package/dist/fr-FR-Doo1FVx-.js +7 -0
  236. package/dist/genUtils-nphCwt1A.js +60 -0
  237. package/dist/getDefaultRegistrationNumberType-CIu4WMln.js +1056 -0
  238. package/dist/getFormSlice-C1ma6Xd4.js +21 -0
  239. package/dist/getLegalEntityCountry-BK-HHa65.js +15 -0
  240. package/dist/getName-DgxRqagk.js +34 -0
  241. package/dist/getProblemsForEntity-Bn6dXidE.js +16 -0
  242. package/dist/getTrustedDecisionMakers-Ta-pURcL.js +25 -0
  243. package/dist/getTrustedFields-BJ88GlM-.js +28 -0
  244. package/dist/gift-Bs_mAgul.js +20 -0
  245. package/dist/globalStore-WASei98w.js +418 -0
  246. package/dist/graph-Co0JhGiY.js +32 -0
  247. package/dist/graph-up-DIvH9haf.js +38 -0
  248. package/dist/headquarter-BESfDGKh.js +42 -0
  249. package/dist/hotel-Vne7G5M6.js +33 -0
  250. package/dist/hr-HR-6Wj5Tf60.js +7 -0
  251. package/dist/hr-HR-B4FRVzrd.js +7 -0
  252. package/dist/hr-HR-B6z7-PYE.js +7 -0
  253. package/dist/hr-HR-BOYktLQ2.js +7 -0
  254. package/dist/hr-HR-Ct_41fWV.js +7 -0
  255. package/dist/http-fdIO--pH.js +204 -0
  256. package/dist/hu-HU-B7ofWKn_.js +7 -0
  257. package/dist/hu-HU-Bwm4UqZz.js +7 -0
  258. package/dist/hu-HU-CO_7jvk9.js +7 -0
  259. package/dist/hu-HU-CgJ_F3l2.js +7 -0
  260. package/dist/hu-HU-DXK7B0r_.js +7 -0
  261. package/dist/image-BQM21XCk.js +23 -0
  262. package/dist/info-DExoPRH5.js +32 -0
  263. package/dist/info-filled-11KMeUso.js +32 -0
  264. package/dist/invalidateRootLegalEntity-BHaVREw-.js +45 -0
  265. package/dist/isEmpty-Uewyl-r6.js +14 -0
  266. package/dist/isEmptyEntity-3OHnhXqG.js +43 -0
  267. package/dist/it-IT-BFIW0DCO.js +7 -0
  268. package/dist/it-IT-CNr6PIu3.js +7 -0
  269. package/dist/it-IT-CQVFYSVx.js +7 -0
  270. package/dist/it-IT-DfGdOsTs.js +7 -0
  271. package/dist/it-IT-DgRuEpeD.js +7 -0
  272. package/dist/it-IT-tZ7dP-Ia.js +7 -0
  273. package/dist/ja-JP--tMJF7eu.js +7 -0
  274. package/dist/ja-JP-BjMyxZiN.js +7 -0
  275. package/dist/ja-JP-Ct54-uwM.js +7 -0
  276. package/dist/ja-JP-CtX9NZKD.js +7 -0
  277. package/dist/ja-JP-DAClbueM.js +7 -0
  278. package/dist/ja-JP-DOuEAOlh.js +7 -0
  279. package/dist/keys-Ce8YnRP2.js +20 -0
  280. package/dist/legalArrangementUtils-C68JdH6I.js +114 -0
  281. package/dist/listToRecord-DumSkYDz.js +10 -0
  282. package/dist/location-zRH5zJ8c.js +23 -0
  283. package/dist/lt-LT-BUuouq_-.js +7 -0
  284. package/dist/lt-LT-Cs3cvyKf.js +7 -0
  285. package/dist/lt-LT-DQp7UGdC.js +7 -0
  286. package/dist/lt-LT-DoYCfhZU.js +7 -0
  287. package/dist/lt-LT-DqtpAjOg.js +7 -0
  288. package/dist/lv-LV-BCXqSzkk.js +7 -0
  289. package/dist/lv-LV-BW0BscAd.js +7 -0
  290. package/dist/lv-LV-C3p57pZV.js +7 -0
  291. package/dist/lv-LV-ZmyUvPst.js +7 -0
  292. package/dist/lv-LV-cKvnQI3j.js +7 -0
  293. package/dist/mail-i1-zg-cv.js +20 -0
  294. package/dist/mapAddressLocalizationToJpAddressSchema-DpOIaxj6.js +26 -0
  295. package/dist/mapExistingFile-BkwRTTRm.js +55 -0
  296. package/dist/mapJpAddressSchemaToAddressLocalizations-D3VO2nhc.js +74 -0
  297. package/dist/mapLegalEntityToIndividualSchema-CBKR-InO.js +251 -0
  298. package/dist/mapScriptLocalization-BCfkZo1y.js +46 -0
  299. package/dist/mapTransferInstrumentToPayoutAccount-ROfaTly6.js +44 -0
  300. package/dist/maskHelpers-C0wnCoJl.js +719 -0
  301. package/dist/minus-circle-filled-CxUdRO8J.js +30 -0
  302. package/dist/nl-NL-B77Xr99l.js +7 -0
  303. package/dist/nl-NL-BUwMAW5C.js +7 -0
  304. package/dist/nl-NL-B_MaTF5h.js +7 -0
  305. package/dist/nl-NL-CePL3t7P.js +7 -0
  306. package/dist/nl-NL-DR5SCDAF.js +7 -0
  307. package/dist/nl-NL-DqGE4Nz5.js +7 -0
  308. package/dist/no-NO-BePxpMbr.js +7 -0
  309. package/dist/no-NO-DGCfRiU8.js +7 -0
  310. package/dist/no-NO-DdI2BI_e.js +7 -0
  311. package/dist/no-NO-P8SZ1t-h.js +7 -0
  312. package/dist/no-NO-oL1v_O9N.js +7 -0
  313. package/dist/options-horizontal-D86T_xAF.js +30 -0
  314. package/dist/partner-Dje0ykF6.js +30 -0
  315. package/dist/patternValidators-DsrZkuOO.js +73 -0
  316. package/dist/pay-by-link-plane-DAiddPu6.js +33 -0
  317. package/dist/payout-DKiGv3F9.js +38 -0
  318. package/dist/pdf-CC8vqpTo.js +22320 -0
  319. package/dist/pdf.worker.min-CdKJICZZ.js +75124 -0
  320. package/dist/person-DgALGIIz.js +23 -0
  321. package/dist/pl-PL-6Q3Ue3F5.js +7 -0
  322. package/dist/pl-PL-B5PBixAB.js +7 -0
  323. package/dist/pl-PL-BCkw9R28.js +7 -0
  324. package/dist/pl-PL-BY6KUTBO.js +7 -0
  325. package/dist/pl-PL-D-s-JI6X.js +7 -0
  326. package/dist/plus-DlQKP2C9.js +20 -0
  327. package/dist/plus-circle-filled-BntUOVIJ.js +30 -0
  328. package/dist/processCapabilities-CWE5UFt8.js +870 -0
  329. package/dist/processValidationErrors-CjsNfiRK.js +62 -0
  330. package/dist/pt-BR-B_XHiDCU.js +7 -0
  331. package/dist/pt-BR-BvNR77Ru.js +7 -0
  332. package/dist/pt-BR-CrLCMcSz2.js +7 -0
  333. package/dist/pt-BR-MrUfWW4a.js +7 -0
  334. package/dist/pt-BR-vwt2tE7H.js +7 -0
  335. package/dist/pt-PT-B17is9TY.js +7 -0
  336. package/dist/pt-PT-BZNPd_Tb.js +7 -0
  337. package/dist/pt-PT-DDYnXawl.js +7 -0
  338. package/dist/pt-PT-DhF8wwYH.js +7 -0
  339. package/dist/pt-PT-Du2K44jh.js +7 -0
  340. package/dist/pt-PT-qAzFgjvF.js +7 -0
  341. package/dist/recurring-DZgT_ekJ.js +23 -0
  342. package/dist/resolveEnvironment-B3aGkYuN.js +1000 -0
  343. package/dist/revenue-accelerate-aMLYFVW6.js +30 -0
  344. package/dist/ro-RO-B3Fcn95o.js +7 -0
  345. package/dist/ro-RO-BA5GhaCE.js +7 -0
  346. package/dist/ro-RO-BmHe4pZ-.js +7 -0
  347. package/dist/ro-RO-DChAv29z.js +7 -0
  348. package/dist/ro-RO-W1t7Mnbn.js +7 -0
  349. package/dist/roleMetadata-Dm1FVuPT.js +56 -0
  350. package/dist/save-uDNye08N.js +20 -0
  351. package/dist/search-0OS6oe8N.js +30 -0
  352. package/dist/show-BWoS9-Y1.js +23 -0
  353. package/dist/sk-SK-BeNF_m_j.js +7 -0
  354. package/dist/sk-SK-C9CiQLgt.js +7 -0
  355. package/dist/sk-SK-CISCMQ2G.js +7 -0
  356. package/dist/sk-SK-CcoUWnJ4.js +7 -0
  357. package/dist/sk-SK-D10Kpths.js +7 -0
  358. package/dist/sl-SI-Bxu4m_5e.js +7 -0
  359. package/dist/sl-SI-DCMml0lX.js +7 -0
  360. package/dist/sl-SI-DmYiMn91.js +7 -0
  361. package/dist/sl-SI-DxomO9JQ.js +7 -0
  362. package/dist/sl-SI-Qe4hzx5a.js +7 -0
  363. package/dist/solution-payments-BMal7uJZ.js +20 -0
  364. package/dist/store-N7ZA4FKy.js +20 -0
  365. package/dist/style.css +2341 -2252
  366. package/dist/styles-DYaAeu4q.js +2337 -2248
  367. package/dist/summaryItem-uDWmtYtt.js +16 -0
  368. package/dist/sv-SE-B-CXDaXM.js +7 -0
  369. package/dist/sv-SE-BzPNBHOj.js +7 -0
  370. package/dist/sv-SE-C9SgeFv6.js +7 -0
  371. package/dist/sv-SE-DESDUMyu.js +7 -0
  372. package/dist/sv-SE-Dq6oK7B5.js +7 -0
  373. package/dist/sv-SE-issaSBHd.js +7 -0
  374. package/dist/terminal-1-0RlQpbUC.js +30 -0
  375. package/dist/toFullWidth-Dgy4X4i8.js +52 -0
  376. package/dist/translation-DbATp_35.js +684 -0
  377. package/dist/trustUtil-5cyXiJnX.js +98 -0
  378. package/dist/types/adaptiveWorkflow/components/Fields/TaxInformation/TaxIdTypeSelectorField.d.ts +1 -2
  379. package/dist/types/adaptiveWorkflow/components/Fields/TaxInformation/TaxInformationFieldGroup.d.ts +1 -2
  380. package/dist/types/adaptiveWorkflow/utils/utils.d.ts +1 -1
  381. package/dist/types/api/configurations/useScenarios.d.ts +1 -1
  382. package/dist/types/api/createLegalEntity/useCreateLegalEntity.d.ts +12 -12
  383. package/dist/types/api/documentValidation/useDocumentValidate.d.ts +2 -2
  384. package/dist/types/api/documents/documents.types.d.ts +9 -0
  385. package/dist/types/api/documents/useCreateDocument.d.ts +10 -3
  386. package/dist/types/api/documents/useDeleteDocument.d.ts +1 -1
  387. package/dist/types/api/documents/useDocument.d.ts +1 -1
  388. package/dist/types/api/documents/useDocuments.d.ts +10 -2
  389. package/dist/types/api/documents/useUpdateDocument.d.ts +3 -3
  390. package/dist/types/api/invitedEntity/getInvitedEntityProblems.d.ts +1 -1
  391. package/dist/types/api/legalEntity/legalEntity.types.d.ts +32 -0
  392. package/dist/types/api/legalEntity/useLegalEntity.d.ts +92 -92
  393. package/dist/types/api/legalEntity/useUpdateLegalEntity.d.ts +14 -14
  394. package/dist/types/api/taskStatus/useTaskStatuses.d.ts +1 -1
  395. package/dist/types/api/transferInstruments/transferInstruments.types.d.ts +18 -0
  396. package/dist/types/api/transferInstruments/useCreateTransferInstrument.d.ts +2 -2
  397. package/dist/types/api/transferInstruments/useTransferInstrument.d.ts +1 -1
  398. package/dist/types/api/transferInstruments/useUpdateTransferInstrument.d.ts +2 -2
  399. package/dist/types/api/transferInstruments/useUpdateTrustedTransferInstrument.d.ts +1 -1
  400. package/dist/types/components/Apps/tasks/TaskList/TaskList.d.ts +1 -1
  401. package/dist/types/components/BankAccount/fields/BankAccountNumber/fieldConfig.d.ts +2 -0
  402. package/dist/types/components/BankAccount/forms/BankDocument/types.d.ts +1 -1
  403. package/dist/types/components/BankAccount/forms/PayoutAccount/types.d.ts +1 -1
  404. package/dist/types/components/BankAccount/forms/PayoutCountryDetails/types.d.ts +1 -1
  405. package/dist/types/components/BankAccount/forms/PayoutDetails/PayoutDetails.d.ts +1 -1
  406. package/dist/types/components/BankAccount/forms/PayoutDetails/types.d.ts +1 -1
  407. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/AccountHolderDescriptionFragment.d.ts +1 -1
  408. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/types.d.ts +1 -1
  409. package/dist/types/components/BankAccount/forms/PayoutVerificationMethod/utils.d.ts +1 -1
  410. package/dist/types/components/BankAccount/mapping/mapPayoutAccountSchemaToApiBankAccount.d.ts +2 -2
  411. package/dist/types/components/BankAccount/mapping/mapPayoutDetailsToTransferInstrument.d.ts +3 -3
  412. package/dist/types/components/BankAccount/mapping/mapPayoutDocumentsToApiDocuments.d.ts +2 -2
  413. package/dist/types/components/BankAccount/mapping/mapTransferInstrumentToPayoutAccount.d.ts +1 -1
  414. package/dist/types/components/BankAccount/mapping/payoutKeyMappings.d.ts +8 -4
  415. package/dist/types/components/BankAccount/tasks/PayoutAccount/PayoutAccountTaskListItem.d.ts +2 -2
  416. package/dist/types/components/BankAccount/tasks/PayoutDetailsDropin/utils.d.ts +1 -1
  417. package/dist/types/components/Business/hooks/useBusinessDetailsData.d.ts +1 -1
  418. package/dist/types/components/Business/hooks/useSubmitBusinessDetails.types.d.ts +1 -1
  419. package/dist/types/components/Business/mapping/businessDetails/businessDetailsKeyMappings.d.ts +4 -4
  420. package/dist/types/components/Business/mapping/businessDetails/mapBusinessDetailsSchemaToLegalEntity.d.ts +4 -4
  421. package/dist/types/components/Business/mapping/businessDetails/mapLegalEntityToBusinessDetailsSchema.d.ts +1 -1
  422. package/dist/types/components/Business/mapping/businessDetails/solePropBusinessDetailsKeyMappings.d.ts +4 -4
  423. package/dist/types/components/Business/tasks/BusinessDetailsDropin/types.d.ts +1 -1
  424. package/dist/types/components/Business/utils/buildRequiredForms.d.ts +1 -1
  425. package/dist/types/components/Business/utils/getAvailableCompanyStructures.d.ts +1 -2
  426. package/dist/types/components/Business/utils/utils.d.ts +2 -15
  427. package/dist/types/components/BusinessLines/tasks/types.d.ts +1 -1
  428. package/dist/types/components/Contract/tasks/PciDropin/types.d.ts +1 -1
  429. package/dist/types/components/Contract/tasks/ServiceAgreementDropin/types.d.ts +1 -1
  430. package/dist/types/components/EFP/mapping/businessFinancingKeyMappings.d.ts +33 -33
  431. package/dist/types/components/EFP/mapping/mapBusinessFinancingToLegalEntity.d.ts +2 -2
  432. package/dist/types/components/EFP/mapping/mapLegalEntityToBusinessFinancing.d.ts +2 -2
  433. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/types.d.ts +3 -3
  434. package/dist/types/components/EFP/tasks/BusinessFinancingDropin/utils.d.ts +3 -4
  435. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsGettingStarted/SourceOfFundsGettingStarted.d.ts +2 -3
  436. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsUploader/SourceOfFundsUpload.d.ts +1 -1
  437. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/types.d.ts +1 -3
  438. package/dist/types/components/EFP/tasks/SourceOfFundsDropin/utils.d.ts +13 -5
  439. package/dist/types/components/EFP/tasks/TaxReportingDropin/TaxReportingGettingStarted.d.ts +2 -2
  440. package/dist/types/components/EmbeddedDropins/CreateTransferInstrumentComponent/CreateTransferInstrumentComponent.d.ts +1 -1
  441. package/dist/types/components/EmbeddedDropins/ManageIndividualComponent/ManageIndividualComponent.d.ts +1 -1
  442. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentComponent.d.ts +1 -1
  443. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverview/ManageTransferInstrumentOverview.d.ts +1 -2
  444. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItem/ManageTransferInstrumentOverviewItem.d.ts +1 -2
  445. package/dist/types/components/EmbeddedDropins/ManageTransferInstrumentComponent/ManageTransferInstrumentOverviewItemModal/ManageTransferInstrumentOverviewItemModal.d.ts +1 -2
  446. package/dist/types/components/EmbeddedDropins/OnboardingDropinComponent/DropinComposer/types.d.ts +1 -1
  447. package/dist/types/components/EmbeddedDropins/ViewVerificationStatus/ViewVerificationStatusComponent.d.ts +1 -1
  448. package/dist/types/components/GlobalEntry/companyTypeMetadata.d.ts +10 -0
  449. package/dist/types/components/GlobalEntry/forms/CompanyStructure/CompanyStructure.d.ts +3 -0
  450. package/dist/types/components/GlobalEntry/forms/CompanyStructure/types.d.ts +10 -0
  451. package/dist/types/components/GlobalEntry/forms/RegistrationInformation/RegistrationInformation.d.ts +1 -1
  452. package/dist/types/components/GlobalEntry/mapping/globalEntryKeyMapping.d.ts +15 -0
  453. package/dist/types/components/GlobalEntry/mapping/mapGlobalEntrySchemaToLegalEntity.d.ts +6 -0
  454. package/dist/types/components/GlobalEntry/mapping/mapLegalEntityToGlobalEntrySchema.d.ts +9 -0
  455. package/dist/types/components/GlobalEntry/rules.d.ts +1 -0
  456. package/dist/types/components/GlobalEntry/tasks/GlobalEntry.d.ts +1 -1
  457. package/dist/types/components/GlobalEntry/tasks/GlobalEntryModal.d.ts +1 -1
  458. package/dist/types/components/GlobalEntry/tasks/types.d.ts +2 -0
  459. package/dist/types/components/GlobalEntry/utils/buildRequiredForms.d.ts +16 -0
  460. package/dist/types/components/GlobalEntry/utils/getAvailableCompanyStructures.d.ts +12 -0
  461. package/dist/types/components/GlobalEntry/utils/submitGlobalEntry.d.ts +20 -0
  462. package/dist/types/components/GlobalEntry/utils/utils.d.ts +18 -0
  463. package/dist/types/components/GlobalEntry/validate.d.ts +3 -1
  464. package/dist/types/components/Individual/forms/BasicDetails/BasicDetails.types.d.ts +3 -3
  465. package/dist/types/components/Individual/forms/IdDocumentUpload/types.d.ts +1 -1
  466. package/dist/types/components/Individual/forms/IdNowVerificationModal/isIdNowModalOpen.d.ts +8 -8
  467. package/dist/types/components/Individual/forms/Individual.types.d.ts +2 -3
  468. package/dist/types/components/Individual/helpers/bafinUtils.d.ts +3 -4
  469. package/dist/types/components/Individual/helpers/findRelevantTaxInformation.d.ts +28 -0
  470. package/dist/types/components/Individual/helpers/hasLiveSelfieError.d.ts +11 -0
  471. package/dist/types/components/Individual/helpers/isManualVerificationOrExistingDoc.d.ts +13 -0
  472. package/dist/types/components/Individual/mapping/individualKeyMappings.d.ts +4 -4
  473. package/dist/types/components/Individual/mapping/mapIndividualDocumentToApiDocument.d.ts +2 -2
  474. package/dist/types/components/Individual/mapping/mapIndividualSchemaToLegalEntity.d.ts +2 -2
  475. package/dist/types/components/Individual/mapping/mapLegalEntityToIndividualSchema.d.ts +1 -1
  476. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/DecisionMakerDetails.types.d.ts +1 -1
  477. package/dist/types/components/Individual/tasks/DecisionMakers/DecisionMakerDetails/utils.d.ts +34 -10
  478. package/dist/types/components/Individual/tasks/DecisionMakers/getTrustedDecisionMakers.d.ts +2 -3
  479. package/dist/types/components/Individual/tasks/DecisionMakers/hooks/useTaskStatusWithTimeout.d.ts +1 -0
  480. package/dist/types/components/Individual/tasks/DecisionMakers/types.d.ts +2 -3
  481. package/dist/types/components/Individual/tasks/DecisionMakers/utils.d.ts +1 -1
  482. package/dist/types/components/Shared/EntityAssociation/types.d.ts +2 -2
  483. package/dist/types/components/Shared/Introduction/Introduction.d.ts +1 -1
  484. package/dist/types/components/Shared/Introduction/IntroductionScreen.d.ts +1 -1
  485. package/dist/types/components/Shared/Introduction/constants.d.ts +1 -1
  486. package/dist/types/components/Shared/Introduction/copy.d.ts +1 -1
  487. package/dist/types/components/Shared/SingpassBanner/SingpassBanner.d.ts +1 -1
  488. package/dist/types/components/Shared/SingpassSelection/types.d.ts +1 -1
  489. package/dist/types/components/Shared/devex/DebugListener/debugInfo.d.ts +1 -2
  490. package/dist/types/components/Shared/fields/BusinessRegistrationNumberField/RegistrationNumberTypeSelector/getDefaultRegistrationNumberType.d.ts +1 -2
  491. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/TaxIdNumberTypeSelector.d.ts +1 -2
  492. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/findExistingTaxInformation.d.ts +10 -0
  493. package/dist/types/components/Shared/fields/TaxInformationField/fieldConfig.d.ts +3 -4
  494. package/dist/types/components/Shared/fields/TaxInformationField/taxIdNumberTypes.d.ts +107 -8
  495. package/dist/types/components/Shared/fields/TaxInformationField/types.d.ts +7 -6
  496. package/dist/types/components/Shared/fields/VatNumberField/VatNumberTypeSelector/VatNumberTypeSelector.d.ts +1 -2
  497. package/dist/types/components/Shared/forms/Address/utils.d.ts +1 -1
  498. package/dist/types/components/Shared/forms/BusinessTypeSelection/types.d.ts +1 -1
  499. package/dist/types/components/Shared/forms/BusinessTypeSelection/useUpdateLegalEntityAndSelectAccountHolder.d.ts +1 -2
  500. package/dist/types/components/Shared/forms/BusinessTypeSelection/utils.d.ts +2 -4
  501. package/dist/types/components/Shared/forms/ConstitutionalDocument/types.d.ts +1 -1
  502. package/dist/types/components/Shared/forms/DocumentUpload/types.d.ts +1 -1
  503. package/dist/types/components/Shared/tasks/CustomerSupport/mapping/customerSupportKeyMapping.d.ts +2 -2
  504. package/dist/types/components/Trust/hooks/useExemptSettlor.d.ts +1 -1
  505. package/dist/types/components/Trust/hooks/useTrustMemberNavigation.hook.d.ts +1 -1
  506. package/dist/types/components/Trust/mapping/mapLegalEntityToTrust.d.ts +1 -1
  507. package/dist/types/components/Trust/mapping/mapTrustDocumentToApiDocument.d.ts +2 -2
  508. package/dist/types/components/Trust/mapping/mapTrustToLegalEntity.d.ts +2 -2
  509. package/dist/types/components/Trust/mapping/trustKeyMappings.d.ts +4 -4
  510. package/dist/types/components/Trust/mapping/trustMembers/getTrustMembers.d.ts +1 -1
  511. package/dist/types/components/Trust/mapping/trustMembers/mapEntityAssociationsToTrustMembers.d.ts +3 -4
  512. package/dist/types/components/Trust/mapping/trustMembers/mapRootLegalEntityToTrustMember.d.ts +1 -1
  513. package/dist/types/components/Trust/tasks/RoleAndTypeDropin/types.d.ts +1 -1
  514. package/dist/types/components/Trust/tasks/TrustDropin/types.d.ts +1 -1
  515. package/dist/types/components/Trust/tasks/TrustMembers/types.d.ts +3 -4
  516. package/dist/types/components/Trust/utils/addOrUpdateAssociatedTrustMember.d.ts +1 -1
  517. package/dist/types/components/Trust/utils/addOrUpdateUndefinedBeneficiary.d.ts +1 -1
  518. package/dist/types/components/Trust/utils/createExemptSettlor.d.ts +1 -1
  519. package/dist/types/components/Trust/utils/deleteAssociatedTrustMember.d.ts +1 -1
  520. package/dist/types/components/Trust/utils/deleteUndefinedBeneficiary.d.ts +1 -1
  521. package/dist/types/components/Trust/utils/trustUtil.d.ts +5 -6
  522. package/dist/types/components/Trust/utils/updateExemptSettlorName.d.ts +1 -1
  523. package/dist/types/components/UnincorporatedPartnership/hooks/useUnincorporatedPartnershipNavigation.d.ts +1 -2
  524. package/dist/types/components/UnincorporatedPartnership/mapping/mapLegalEntityToUnincorporatedPartnership.d.ts +1 -1
  525. package/dist/types/components/UnincorporatedPartnership/mapping/mapUnincorporatedPartnershipToLegalEntity.d.ts +2 -2
  526. package/dist/types/components/UnincorporatedPartnership/mapping/unincorporatedPartnershipKeyMappings.d.ts +3 -3
  527. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipMembers/types.d.ts +1 -2
  528. package/dist/types/components/UnincorporatedPartnership/tasks/UnincorporatedPartnershipRoleAndType/types.d.ts +1 -2
  529. package/dist/types/components/UnincorporatedPartnership/utils/unincorporatedPartnershipMembers.d.ts +3 -4
  530. package/dist/types/components/ui/molecules/DocumentGuidance/DocumentGuidance.types.d.ts +1 -1
  531. package/dist/types/context/ToggleContext/types.d.ts +0 -4
  532. package/dist/types/core/errorMapping.d.ts +3 -4
  533. package/dist/types/core/models/api/accountIdentification.d.ts +5 -1
  534. package/dist/types/core/models/api/legal-entity-association.d.ts +0 -19
  535. package/dist/types/core/process-field-configurations.d.ts +4 -6
  536. package/dist/types/core/user-events.d.ts +2 -4
  537. package/dist/types/hooks/introduction/useCanSeeIntroduction.d.ts +1 -1
  538. package/dist/types/hooks/introduction/useIntroductionScreens.d.ts +1 -1
  539. package/dist/types/hooks/introduction/useShouldShowIntroduction.d.ts +1 -1
  540. package/dist/types/hooks/singpass/useSingpassMyInfoLogin.d.ts +1 -1
  541. package/dist/types/hooks/useAssociatedLegalEntity.d.ts +1 -2
  542. package/dist/types/hooks/useAssociatedLegalRepresentative.d.ts +1 -1
  543. package/dist/types/hooks/useBusinessSetup.d.ts +1 -1
  544. package/dist/types/hooks/useForm/types.d.ts +1 -2
  545. package/dist/types/hooks/useLegalEntityType.d.ts +1 -2
  546. package/dist/types/hooks/useScenarioConfiguration.d.ts +1 -1
  547. package/dist/types/router/DefaultRouteRedirect.d.ts +1 -1
  548. package/dist/types/router/OnboardingRouter.d.ts +1 -2
  549. package/dist/types/router/getDefaultTask.d.ts +1 -1
  550. package/dist/types/stores/globalStore/calculateTaskStatus.d.ts +3 -5
  551. package/dist/types/stores/globalStore/determineTaskIdentifiers.d.ts +3 -5
  552. package/dist/types/stores/globalStore/get-task-status.d.ts +4 -4
  553. package/dist/types/stores/globalStore/globalStore.d.ts +3 -5
  554. package/dist/types/stores/globalStore/isEmptyEntity.d.ts +1 -1
  555. package/dist/types/types/businessEntityType.d.ts +1 -2
  556. package/dist/types/types/errors/capability-problems.d.ts +5 -1
  557. package/dist/types/types/errors/entity-problems.d.ts +8 -5
  558. package/dist/types/types/form-rules.d.ts +1 -1
  559. package/dist/types/utils/accountHolderUtils.d.ts +1 -1
  560. package/dist/types/utils/addLinkedFields.d.ts +2 -2
  561. package/dist/types/utils/analytics/debouncedInputEvent.d.ts +4 -4
  562. package/dist/types/utils/analytics/getAnalyticsAssociatedEntityDetails.d.ts +2 -3
  563. package/dist/types/utils/analytics/getPrefilledDetails.d.ts +2 -2
  564. package/dist/types/utils/api/documentUtils.d.ts +21 -10
  565. package/dist/types/utils/api/getProblemsForEntity.d.ts +1 -1
  566. package/dist/types/utils/api/processCapabilities.d.ts +11 -4
  567. package/dist/types/utils/bankUtils.d.ts +5 -0
  568. package/dist/types/utils/birthDateUtils.d.ts +6 -1
  569. package/dist/types/utils/businessUtils.d.ts +21 -6
  570. package/dist/types/utils/customerSupportUtils.d.ts +2 -3
  571. package/dist/types/utils/decisionMakerRoles.d.ts +4 -5
  572. package/dist/types/utils/entityAssociationUtil.d.ts +21 -12
  573. package/dist/types/utils/entityStatusUtil.d.ts +1 -1
  574. package/dist/types/utils/getFieldsWithExistingData.d.ts +2 -2
  575. package/dist/types/utils/getLegalEntityCountry.d.ts +1 -1
  576. package/dist/types/utils/getName.d.ts +3 -3
  577. package/dist/types/utils/getTrustedFields.d.ts +4 -5
  578. package/dist/types/utils/mapping/documentGuidanceMap.d.ts +2 -2
  579. package/dist/types/utils/mapping/getPage.d.ts +3 -4
  580. package/dist/types/utils/mapping/mappingRecord.d.ts +1 -1
  581. package/dist/types/utils/roleMetadata.d.ts +1 -1
  582. package/dist/types/utils/unincorporatedParnershipUtils.d.ts +4 -4
  583. package/dist/types-B9zXzag-.js +18 -0
  584. package/dist/types-BA3bcGAv.js +58 -0
  585. package/dist/types-CZAHRt31.js +147 -0
  586. package/dist/types-Cwq1JAWT.js +31 -0
  587. package/dist/upload-C5NC1E4N.js +23 -0
  588. package/dist/uppercase-DvjwUM0n.js +7 -0
  589. package/dist/useAccountHolder-DDto9d9n.js +102 -0
  590. package/dist/useAdaptiveWorkflow-DryNv0zI.js +28 -0
  591. package/dist/useAllowedCountries-C-nqVePW.js +80 -0
  592. package/dist/useAnalyticsContext-gSnRnYgV.js +12 -0
  593. package/dist/useAssociatedLegalEntity-DtZtKlls.js +35 -0
  594. package/dist/useBusinessDetailsData-DFU0dLxw.js +4732 -0
  595. package/dist/useBusinessLines-BZfFqvS_.js +27 -0
  596. package/dist/useCanSeeIntroduction-DQbanJNE.js +38 -0
  597. package/dist/useCreateLegalEntity-qP7MeAmi.js +24 -0
  598. package/dist/useDataMissingRemediations-ttUrk09_.js +39 -0
  599. package/dist/useDataset-CdLBLq98.js +98 -0
  600. package/dist/useDeleteTransferInstrument-Dtv14H9I.js +31 -0
  601. package/dist/useForm-CWrbJG44.js +504 -0
  602. package/dist/useHideTaskStepper-Dk7ZQ3U8.js +26 -0
  603. package/dist/useId-BkDhUta2.js +28 -0
  604. package/dist/useIndustryCodes-BMK6IMiW.js +32 -0
  605. package/dist/useLegalEntity-DHA8TJeV.js +48 -0
  606. package/dist/useMultiForm-BxASst0O.js +790 -0
  607. package/dist/useNavigate-CO1Mcekp.js +246 -0
  608. package/dist/useOnboardingStatus-Cz6-hSX4.js +23 -0
  609. package/dist/usePciQuestionnaireList-CWz7Ngs6.js +26 -0
  610. package/dist/useSalesChannels-bV9DgyLW.js +47 -0
  611. package/dist/useScenarios-Bn93htbx.js +55 -0
  612. package/dist/useSettingsContext-9O3Aqpfq.js +12 -0
  613. package/dist/useTaskLandedEvent-DwZHcMEQ.js +26 -0
  614. package/dist/useTaskStatus-DJxOWvuN.js +23 -0
  615. package/dist/useTermsOfServiceStatus-CyVxYqpg.js +39 -0
  616. package/dist/useToastContext-B6Mqc2HY.js +12 -0
  617. package/dist/useToggleContext-B_YexrbT.js +21 -0
  618. package/dist/useTrustMembers-DWo3WU8M.js +151 -0
  619. package/dist/useUnincorporatedPartnershipMembers-DwFPW09D.js +69 -0
  620. package/dist/useUpdateBusinessLines-JRPjqoe9.js +43 -0
  621. package/dist/useUpdateLegalEntity-CqmqXsbR.js +29 -0
  622. package/dist/utils-BWumuCvl.js +210 -0
  623. package/dist/utils-CJcGZvj1.js +178 -0
  624. package/dist/utils-CYUYe54m.js +24 -0
  625. package/dist/utils-Ck_mZapQ.js +1755 -0
  626. package/dist/utils-DdHbAadK.js +80 -0
  627. package/dist/utils-SKYT7xU4.js +52 -0
  628. package/dist/validate-BZ1-ZeKr.js +430 -0
  629. package/dist/validate-DTz70AWN.js +224 -0
  630. package/dist/validate-DUcT-JGF.js +178 -0
  631. package/dist/validate-Dr8UKZCX.js +126 -0
  632. package/dist/validateExtractionResult-CntKbt8c.js +343 -0
  633. package/dist/validationError-DV6t8Ubb.js +55 -0
  634. package/dist/validationResult-bjYBDjbU.js +29 -0
  635. package/dist/validatorUtils-D2O6AAZn.js +106 -0
  636. package/dist/warning-circle-fill-C2lMYPJW.js +30 -0
  637. package/dist/warning-diamond-filled-CQ2DdW5g.js +30 -0
  638. package/dist/webinar-BpZWqd-g.js +33 -0
  639. package/package.json +26 -26
  640. package/dist/4-people-Dxu4nHSX.js +0 -35
  641. package/dist/AcceptTermsOfServiceWorkflow-CvKbU2WY.js +0 -28
  642. package/dist/Accordion-Sjyj7C_t.js +0 -112
  643. package/dist/AccountSetupRejected-Cq_nlmLn.js +0 -18
  644. package/dist/AdaptiveWorkflow-CM7ZVGXv.js +0 -210
  645. package/dist/AdaptiveWorkflowComponent-tM1hJ1zF.js +0 -165
  646. package/dist/AddressFields-BsxEdBvQ.js +0 -464
  647. package/dist/Avatar-Zp1T9qAL.js +0 -54
  648. package/dist/BusinessFinancingDropin-vugW4Vvi.js +0 -1857
  649. package/dist/BusinessFinancingPage-0J_LImeN.js +0 -89
  650. package/dist/BusinessRegistrationNumberField-qdC_srMn.js +0 -101
  651. package/dist/BusinessRegistrationNumberFieldGroup-BvC9n4ou.js +0 -171
  652. package/dist/BusinessTypeSelectionPage-WCEqP4G2.js +0 -457
  653. package/dist/Button-DfRmINzF.js +0 -108
  654. package/dist/Checkbox-B730k3Yy.js +0 -108
  655. package/dist/ComponentGroup-CsnkYMbT.js +0 -32
  656. package/dist/ConstitutionalDocument-D92EPGmG.js +0 -1224
  657. package/dist/ContactDetails-DDSd6X0z.js +0 -511
  658. package/dist/ContextGuidance-B2ew1lzC.js +0 -29
  659. package/dist/ContractViewer-JtnAXSDa.js +0 -979
  660. package/dist/Currency-BKTf95Wp.js +0 -210
  661. package/dist/CustomerSupport-CCFayyJG.js +0 -140
  662. package/dist/DataConflictsModal-D-fP_eNs.js +0 -237
  663. package/dist/DebugModal-CG6CvUnj.js +0 -450
  664. package/dist/DecisionMakerDetails-DWC1nORL.js +0 -565
  665. package/dist/DecisionMakerDetailsPage-BVXA74FO.js +0 -122
  666. package/dist/DecisionMakers-Cvm_i6Uf.js +0 -589
  667. package/dist/Dropzone-CNHxDEc3.js +0 -250
  668. package/dist/EmbeddedStatus-tbJfdxm8.js +0 -129
  669. package/dist/EndStateLayout-BK1Hh02g.js +0 -83
  670. package/dist/EntityAssociation-i903L9Dh.js +0 -163
  671. package/dist/ErrorPanel-tnFOlOZU.js +0 -205
  672. package/dist/GlobalEntryModal-DQoIIvGS.js +0 -975
  673. package/dist/GlobalEntryPage-DLRGPpAu.js +0 -78
  674. package/dist/Icon-C3S5_kkS.js +0 -175
  675. package/dist/IdentityNumber-B8MXzXsO.js +0 -536
  676. package/dist/IdentityNumberFieldGroup-D7xb2TY7.js +0 -57
  677. package/dist/IdentityScreeningWorkflow-BdGXtdns.js +0 -307
  678. package/dist/Image-D82terx4.js +0 -33
  679. package/dist/IndividualDropin-C0vTSDYU.js +0 -4138
  680. package/dist/IndustryCodeFieldGroup-CGcE5yYR.js +0 -188
  681. package/dist/InputDate-Ci60MBrH.js +0 -211
  682. package/dist/InputText-CTpVF0Mu.js +0 -154
  683. package/dist/Introduction-Dx6DDaL7.js +0 -327
  684. package/dist/InvitedDecisionMakerComponent-Ckd26d6Y.js +0 -481
  685. package/dist/JpAddressFields-C9MbL5XV.js +0 -287
  686. package/dist/LegalCompanyNameField-D0jM5LDT.js +0 -108
  687. package/dist/LegalName-TjhII9_p.js +0 -33
  688. package/dist/LegalRepresentativeDetailsPage-CvGtANu3.js +0 -74
  689. package/dist/Link-c2jAgGgc.js +0 -32
  690. package/dist/ListItem-C35r8558.js +0 -93
  691. package/dist/Loader-BEpMlKm2.js +0 -92
  692. package/dist/Modal-BsivDPTd.js +0 -129
  693. package/dist/Name-DMf8Uyof.js +0 -61
  694. package/dist/NewSummary-DxWLTnJy.js +0 -73
  695. package/dist/PatriotActDisclosure-ChZ_ePr2.js +0 -265
  696. package/dist/PayoutDetailsDropin-BhtJSFAS.js +0 -4073
  697. package/dist/PayoutDetailsPage-MW5Pygp2.js +0 -70
  698. package/dist/RadioGroup-D8DRUJ2o.js +0 -1806
  699. package/dist/Review-DImhCvoG.js +0 -99
  700. package/dist/RootBusinessDetailsPage-Cmh9Z_4g.js +0 -68
  701. package/dist/RootBusinessLinesPage-C_p-CtCH.js +0 -1455
  702. package/dist/RootIndividualDetailsPage-04cJ6C15.js +0 -80
  703. package/dist/Select-ByVcS_J2.js +0 -1093
  704. package/dist/SignPCIComponent-CAwp2xCC.js +0 -370
  705. package/dist/SingpassSelection-Txx3gp_g.js +0 -157
  706. package/dist/SoleProprietorshipPage-CWegllTo.js +0 -70
  707. package/dist/SourceOfFundsPage-B22iW1ow.js +0 -2781
  708. package/dist/SourceOfFundsWorkflow-BKHZbLR_.js +0 -28
  709. package/dist/StateField-CsO_28Co.js +0 -296
  710. package/dist/Step-BUMarnLL.js +0 -191
  711. package/dist/Task-Bj_CjiHG.js +0 -129
  712. package/dist/TaskGroup-BMXhoq1Y.js +0 -46
  713. package/dist/TaskListItem-BIKdDEzU.js +0 -123
  714. package/dist/TaskStepperContextProvider-D0tKJplv.js +0 -26
  715. package/dist/TaskVerificationStatus-DPA4ZEPa.js +0 -125
  716. package/dist/TaxInformationFieldGroup-D_6IRGj9.js +0 -287
  717. package/dist/TaxReportingDropin-DA475crP.js +0 -475
  718. package/dist/TaxReportingWorkflow-kcto0Ysw.js +0 -28
  719. package/dist/TermsOfServiceManagement-HDnaIeWZ.js +0 -635
  720. package/dist/TextArea-qbFhi8Az.js +0 -81
  721. package/dist/TrustDetailsPage-BqVS0xOU.js +0 -1155
  722. package/dist/TrustMemberCompanyPage-DTe7xWpj.js +0 -109
  723. package/dist/TrustMemberIndividualPage-C1BDs9Rm.js +0 -110
  724. package/dist/TrustMemberRoleAndTypePage-GXWuitmt.js +0 -927
  725. package/dist/TrustMembersOverview-BjJ5fPcC.js +0 -449
  726. package/dist/UboTaskItem-Aq3iNKX0.js +0 -115
  727. package/dist/UnincorporatedPartnershipIndividualPage-DdPh2_sa.js +0 -79
  728. package/dist/UnincorporatedPartnershipMemberCompanyPage-h3OTr_91.js +0 -79
  729. package/dist/UnincorporatedPartnershipMemberRoleAndTypePage-CwemN4fL.js +0 -254
  730. package/dist/UnincorporatedPartnershipMembersOverview-CUczPfUl.js +0 -158
  731. package/dist/VerificationErrorAlert-BBfoLMwb.js +0 -64
  732. package/dist/Workflow-Do7P-qDn.js +0 -228
  733. package/dist/accountHolderUtils-DMi_DHCU.js +0 -44
  734. package/dist/arrow-right-Bk-ewsex.js +0 -20
  735. package/dist/bafinUtils-M2AASP_e.js +0 -1963
  736. package/dist/bag-9BNq_QQO.js +0 -20
  737. package/dist/bank-BRbxxVK5.js +0 -20
  738. package/dist/bg-BG-BtgA44Ui.js +0 -7
  739. package/dist/bg-BG-DX5QKxJz.js +0 -7
  740. package/dist/bg-BG-DYkxVgeJ.js +0 -7
  741. package/dist/bg-BG-K6LIkCdf.js +0 -7
  742. package/dist/bg-BG-uuNDTOoN.js +0 -7
  743. package/dist/bin-DE1613_5.js +0 -30
  744. package/dist/businessRegistrationNumberPatterns-C_MSKHlF.js +0 -981
  745. package/dist/capital-aNk7ragc.js +0 -23
  746. package/dist/cash-stack-DuKKc4Qj.js +0 -33
  747. package/dist/certificate-9gDKvXCm.js +0 -23
  748. package/dist/checkmark-BuqDN4WO.js +0 -20
  749. package/dist/checkmark-circle-OqcwA6N6.js +0 -28
  750. package/dist/checkmark-circle-fill-BfcUovCf.js +0 -30
  751. package/dist/checkmark-small-CBORXg_J.js +0 -20
  752. package/dist/chevron-down-CjRta08O.js +0 -20
  753. package/dist/chevron-left-BEm04mIh.js +0 -20
  754. package/dist/chevron-right-B2GkHG0J.js +0 -20
  755. package/dist/chevron-up-BKfe5Btb.js +0 -20
  756. package/dist/circle-C-uuRI8F.js +0 -30
  757. package/dist/circle-small-filled-Bkh5_ZEu.js +0 -20
  758. package/dist/clock-BWfWiMxz.js +0 -28
  759. package/dist/coins-Cw-jDTUz.js +0 -30
  760. package/dist/constants-BSBlqXY7.js +0 -231
  761. package/dist/contract-PFVBW8xa.js +0 -20
  762. package/dist/countries-BE4iGVAo.js +0 -41
  763. package/dist/country-zZC2TAQB.js +0 -25
  764. package/dist/cross-B37j1-r4.js +0 -20
  765. package/dist/cross-circle-fill-CcjwpLj2.js +0 -30
  766. package/dist/cross-circle-fill-small-CJ4fddNo.js +0 -20
  767. package/dist/cs-CZ-BJSrh3Vp.js +0 -7
  768. package/dist/cs-CZ-CMXGY6Ep.js +0 -7
  769. package/dist/cs-CZ-Ci8c58xJ.js +0 -7
  770. package/dist/cs-CZ-Cu1v5FA8.js +0 -7
  771. package/dist/cs-CZ-lJQmuyHq.js +0 -7
  772. package/dist/da-DK-B9O3xbY6.js +0 -7
  773. package/dist/da-DK-BNwXg4DX.js +0 -7
  774. package/dist/da-DK-C1kmOHvo.js +0 -7
  775. package/dist/da-DK-D53M_d04.js +0 -7
  776. package/dist/da-DK-DjAV5d9A.js +0 -7
  777. package/dist/de-DE-B3sSNcDv.js +0 -7
  778. package/dist/de-DE-C9N6F5oM.js +0 -7
  779. package/dist/de-DE-CjMOQMqQ.js +0 -7
  780. package/dist/de-DE-qJPTCQlG.js +0 -7
  781. package/dist/de-DE-qSBQE-6M.js +0 -7
  782. package/dist/de-DE-w4l6boYT.js +0 -7
  783. package/dist/decision-makers-group-DAoxQRJ3.js +0 -4169
  784. package/dist/decisionMakerRoles-APTR-Ah_.js +0 -185
  785. package/dist/document-1-B3vw8uuK.js +0 -20
  786. package/dist/document-person-CERdIfH0.js +0 -28
  787. package/dist/download-CthdK4dV.js +0 -23
  788. package/dist/edit-1-BW7NwWP7.js +0 -20
  789. package/dist/el-GR-BLNCX9mm.js +0 -7
  790. package/dist/el-GR-Bx996PXx.js +0 -7
  791. package/dist/el-GR-CgoxpC-Q.js +0 -7
  792. package/dist/el-GR-DaAMIpOR.js +0 -7
  793. package/dist/el-GR-DqTetsjB.js +0 -7
  794. package/dist/el-GR-pGsVWsOm.js +0 -7
  795. package/dist/en-US-B82BbZaB.js +0 -7
  796. package/dist/en-US-BUmtG-Wj.js +0 -27
  797. package/dist/en-US-C3i5Oge2.js +0 -7
  798. package/dist/en-US-C8karqc5.js +0 -7
  799. package/dist/en-US-CJPD8qHc.js +0 -7
  800. package/dist/en-US-D0fscfsz.js +0 -7
  801. package/dist/en-US-DapC--Cs.js +0 -7
  802. package/dist/entityAssociationUtil-CLBR9osP.js +0 -59
  803. package/dist/error-CpJV-CLa.js +0 -36
  804. package/dist/es-ES-C14ZT-97.js +0 -7
  805. package/dist/es-ES-DeT4zIDW.js +0 -7
  806. package/dist/es-ES-DyB2KXfT.js +0 -7
  807. package/dist/es-ES-U4-lDfZq.js +0 -7
  808. package/dist/es-ES-tVQDUTJN.js +0 -7
  809. package/dist/es-ES-wvcyuTNN.js +0 -7
  810. package/dist/es-LA-B5IRDCf_.js +0 -7
  811. package/dist/es-LA-B_hzWiiE.js +0 -7
  812. package/dist/es-LA-CG_cu1hM.js +0 -7
  813. package/dist/es-LA-ChLRkx-r.js +0 -7
  814. package/dist/es-LA-mFT_9PL_.js +0 -7
  815. package/dist/et-EE-4_ZUNt3W.js +0 -7
  816. package/dist/et-EE-BCWBT8XN.js +0 -7
  817. package/dist/et-EE-BQEyJFZb.js +0 -7
  818. package/dist/et-EE-DSK7kb3n.js +0 -7
  819. package/dist/et-EE-DWVzz1wR.js +0 -7
  820. package/dist/external-link-CFgynH5A.js +0 -20
  821. package/dist/fi-FI-B-7uBAf5.js +0 -7
  822. package/dist/fi-FI-BeJtSWIh.js +0 -7
  823. package/dist/fi-FI-Caa9ydMd.js +0 -7
  824. package/dist/fi-FI-D06EzKrW.js +0 -7
  825. package/dist/fi-FI-DgMsQBRO.js +0 -7
  826. package/dist/form-rules-zzbZ2bV6.js +0 -1089
  827. package/dist/formatCurrency-Cq3WFpdZ.js +0 -23
  828. package/dist/formatValidationError-BHvKLMYZ.js +0 -23
  829. package/dist/fr-FR-8a-RK9xd.js +0 -7
  830. package/dist/fr-FR-BCfqr4jm.js +0 -7
  831. package/dist/fr-FR-BTJoQq71.js +0 -7
  832. package/dist/fr-FR-CDv300-8.js +0 -7
  833. package/dist/fr-FR-D7DTFYe4.js +0 -7
  834. package/dist/fr-FR-Dl4NL-Nc.js +0 -7
  835. package/dist/genUtils-Ce61IJs8.js +0 -60
  836. package/dist/getDefaultRegistrationNumberType-CI1NVzJR.js +0 -1055
  837. package/dist/getFormSlice-DzRO0UUx.js +0 -52
  838. package/dist/getLegalEntityCountry-CNE5uei8.js +0 -17
  839. package/dist/getName-s7qmFean.js +0 -35
  840. package/dist/getProblemsForEntity-Bh9nSdOW.js +0 -16
  841. package/dist/getTrustedDecisionMakers-DX3nImM5.js +0 -25
  842. package/dist/gift-0jLCte2h.js +0 -20
  843. package/dist/graph-DrxuzQF7.js +0 -32
  844. package/dist/graph-up-4qLbS2Ds.js +0 -38
  845. package/dist/headquarter-3o2GHW5H.js +0 -42
  846. package/dist/hotel-pZlrEAK8.js +0 -33
  847. package/dist/hr-HR-B11sggmG.js +0 -7
  848. package/dist/hr-HR-BjxPRJ1o.js +0 -7
  849. package/dist/hr-HR-COdiWKoq.js +0 -7
  850. package/dist/hr-HR-CXH5M5JZ.js +0 -7
  851. package/dist/hr-HR-me1zsMas.js +0 -7
  852. package/dist/http-DsJtugN1.js +0 -204
  853. package/dist/hu-HU-BNlsrO-l.js +0 -7
  854. package/dist/hu-HU-BQ5310Yi.js +0 -7
  855. package/dist/hu-HU-D1ZZwcl0.js +0 -7
  856. package/dist/hu-HU-DkSsL94T.js +0 -7
  857. package/dist/hu-HU-Dp6xOBN_.js +0 -7
  858. package/dist/image-tfgNnE3G.js +0 -23
  859. package/dist/info-DJW5JooY.js +0 -32
  860. package/dist/info-filled-C5mP6T4Z.js +0 -32
  861. package/dist/it-IT-BORQC-7u.js +0 -7
  862. package/dist/it-IT-BlaVymCj.js +0 -7
  863. package/dist/it-IT-CawjvBDX.js +0 -7
  864. package/dist/it-IT-Cnk7j_gC.js +0 -7
  865. package/dist/it-IT-DIIRAF4_.js +0 -7
  866. package/dist/it-IT-x4LV31GV.js +0 -7
  867. package/dist/ja-JP-CyXnoIu3.js +0 -7
  868. package/dist/ja-JP-DBne3dbI.js +0 -7
  869. package/dist/ja-JP-DS8zN3mY.js +0 -7
  870. package/dist/ja-JP-Dpe9Odla.js +0 -7
  871. package/dist/ja-JP-DrHQO_Se.js +0 -7
  872. package/dist/ja-JP-h3E8hgLv.js +0 -7
  873. package/dist/legal-entity-type-0MfCGzUf.js +0 -13
  874. package/dist/legalArrangementUtils-xvCxpgzJ.js +0 -113
  875. package/dist/location-Dk0rAiaT.js +0 -23
  876. package/dist/lt-LT-8kOI6QVq.js +0 -7
  877. package/dist/lt-LT-B18sQY9g.js +0 -7
  878. package/dist/lt-LT-Byl8QeWO.js +0 -7
  879. package/dist/lt-LT-D3ZUJfjr.js +0 -7
  880. package/dist/lt-LT-Fc1lOUlz.js +0 -7
  881. package/dist/lv-LV-C70c94CI.js +0 -7
  882. package/dist/lv-LV-CXifQKfG.js +0 -7
  883. package/dist/lv-LV-DctYQmfH.js +0 -7
  884. package/dist/lv-LV-Mj_iV56f.js +0 -7
  885. package/dist/lv-LV-adiXoKhv.js +0 -7
  886. package/dist/mail-DG7MBDNE.js +0 -20
  887. package/dist/mapAddressLocalizationToJpAddressSchema-TUaHGQh6.js +0 -26
  888. package/dist/mapExistingFile-CwGW1ru4.js +0 -55
  889. package/dist/mapJpAddressSchemaToAddressLocalizations-CdP6PRAO.js +0 -73
  890. package/dist/mapLegalEntityToIndividualSchema-ByhXwZqs.js +0 -214
  891. package/dist/mapTransferInstrumentToPayoutAccount-6eLKhumO.js +0 -44
  892. package/dist/minus-circle-filled-DglqAgJW.js +0 -30
  893. package/dist/nl-NL-BIpptPn4.js +0 -7
  894. package/dist/nl-NL-BWGCqpWp.js +0 -7
  895. package/dist/nl-NL-Bv8Zk-6e.js +0 -7
  896. package/dist/nl-NL-DOB0b0m4.js +0 -7
  897. package/dist/nl-NL-ehxkZFQd.js +0 -7
  898. package/dist/nl-NL-jt4eYGEY.js +0 -7
  899. package/dist/no-NO-BG1sYkpp.js +0 -7
  900. package/dist/no-NO-CeZQnyyD.js +0 -7
  901. package/dist/no-NO-Chwg5Roi.js +0 -7
  902. package/dist/no-NO-Dx_Z3uoZ.js +0 -7
  903. package/dist/no-NO-P5tRWhV9.js +0 -7
  904. package/dist/options-horizontal-CTUn7IEx.js +0 -30
  905. package/dist/partner-1StoI4_W.js +0 -30
  906. package/dist/pay-by-link-plane-Sa_qkL8C.js +0 -33
  907. package/dist/payout-BAYSxSqU.js +0 -38
  908. package/dist/pdf-uNYg4Mqz.js +0 -22315
  909. package/dist/pdf.worker.min-gK7UJW5a.js +0 -74644
  910. package/dist/person-Da15_s3G.js +0 -23
  911. package/dist/pl-PL-BsXtscoI.js +0 -7
  912. package/dist/pl-PL-CWFdZf24.js +0 -7
  913. package/dist/pl-PL-DSbuyzBx.js +0 -7
  914. package/dist/pl-PL-J9S3_lCf.js +0 -7
  915. package/dist/pl-PL-_KG-ZD1N.js +0 -7
  916. package/dist/plus-BQccvKkd.js +0 -20
  917. package/dist/plus-circle-filled-CqC30FRL.js +0 -30
  918. package/dist/processCapabilities-DRD0Aq2i.js +0 -874
  919. package/dist/processValidationErrors-oxuCOsth.js +0 -62
  920. package/dist/pt-BR-B2q9Nl16.js +0 -7
  921. package/dist/pt-BR-BYbyk6xS.js +0 -7
  922. package/dist/pt-BR-Cph-P8oH.js +0 -7
  923. package/dist/pt-BR-D1yTuXWd2.js +0 -7
  924. package/dist/pt-BR-fKlNUybd.js +0 -7
  925. package/dist/pt-PT-C1gtp2_N.js +0 -7
  926. package/dist/pt-PT-CQQkh5PS.js +0 -7
  927. package/dist/pt-PT-D8ldyR-j.js +0 -7
  928. package/dist/pt-PT-DAvsI-Tr.js +0 -7
  929. package/dist/pt-PT-DhokEMPi.js +0 -7
  930. package/dist/pt-PT-IPhkbQvT.js +0 -7
  931. package/dist/recurring-DSR1fNMh.js +0 -23
  932. package/dist/resolveEnvironment-BYEL10Nc.js +0 -2524
  933. package/dist/revenue-accelerate-CPhAVpPK.js +0 -30
  934. package/dist/ro-RO-C6xoaASq.js +0 -7
  935. package/dist/ro-RO-CP_IrOlX.js +0 -7
  936. package/dist/ro-RO-CQJk7Cpo.js +0 -7
  937. package/dist/ro-RO-CnMe6Mfw.js +0 -7
  938. package/dist/ro-RO-_BLhsnIB.js +0 -7
  939. package/dist/save-DQ-mJX8e.js +0 -20
  940. package/dist/search-DWqWTW_K.js +0 -30
  941. package/dist/show-BbhlD3IY.js +0 -23
  942. package/dist/sk-SK-BOc9IqyW.js +0 -7
  943. package/dist/sk-SK-Bb1CdAzD.js +0 -7
  944. package/dist/sk-SK-Br1Y4_CN.js +0 -7
  945. package/dist/sk-SK-Bx2_85dW.js +0 -7
  946. package/dist/sk-SK-C889qQFo.js +0 -7
  947. package/dist/sl-SI-B-Xa0hlk.js +0 -7
  948. package/dist/sl-SI-BQc61Sz2.js +0 -7
  949. package/dist/sl-SI-DHPadSTy.js +0 -7
  950. package/dist/sl-SI-DO9c7geI.js +0 -7
  951. package/dist/sl-SI-bkhhInrg.js +0 -7
  952. package/dist/solution-payments-D4BORMsX.js +0 -20
  953. package/dist/store-DWaq3ZiC.js +0 -20
  954. package/dist/sv-SE-BXrlr0X5.js +0 -7
  955. package/dist/sv-SE-Dk81lopg.js +0 -7
  956. package/dist/sv-SE-DzsWB30f.js +0 -7
  957. package/dist/sv-SE-IBYnJfbW.js +0 -7
  958. package/dist/sv-SE-X89Q6ZAq.js +0 -7
  959. package/dist/sv-SE-l_UVgmVu.js +0 -7
  960. package/dist/terminal-1-crR-pS_R.js +0 -30
  961. package/dist/translation-BOm4lmPx.js +0 -657
  962. package/dist/types/components/GlobalEntry/globalEntryKeyMapping.d.ts +0 -15
  963. package/dist/types/components/GlobalEntry/utils.d.ts +0 -30
  964. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/getDefaultTaxIdNumberType.d.ts +0 -30
  965. package/dist/types/components/Shared/fields/TaxInformationField/TaxIdNumberTypeSelector/inferTaxIdNumberType.d.ts +0 -13
  966. package/dist/types/core/models/api/attachment.d.ts +0 -7
  967. package/dist/types/core/models/api/document.d.ts +0 -25
  968. package/dist/types/core/models/api/entity-type.d.ts +0 -5
  969. package/dist/types/core/models/api/legal-arrangement.d.ts +0 -24
  970. package/dist/types/core/models/api/legal-entity-type.d.ts +0 -8
  971. package/dist/types/core/models/api/legal-entity.d.ts +0 -36
  972. package/dist/types/core/models/api/problem.d.ts +0 -12
  973. package/dist/types/core/models/api/remediating-action.d.ts +0 -5
  974. package/dist/types/core/models/api/transfer-instrument.d.ts +0 -33
  975. package/dist/types/core/models/api/trusted-fields-provider.d.ts +0 -5
  976. package/dist/types/core/models/api/verification-error.d.ts +0 -19
  977. package/dist/types-BeveNAZK.js +0 -19
  978. package/dist/types-wRlt8bxb.js +0 -58
  979. package/dist/upload-D85xAAAm.js +0 -23
  980. package/dist/useAdaptiveWorkflow-DsQESk9f.js +0 -28
  981. package/dist/useBusinessDetailsData-Bja80UYy.js +0 -4722
  982. package/dist/useBusinessLines-BhSN6qCH.js +0 -27
  983. package/dist/useCanSeeIntroduction-BcfQC4IP.js +0 -38
  984. package/dist/useDataMissingRemediations-msU1AJvo.js +0 -39
  985. package/dist/useForm-DbDFfb2S.js +0 -502
  986. package/dist/useHideTaskStepper-CbMcV9mk.js +0 -26
  987. package/dist/useId-oOIS1nsj.js +0 -73
  988. package/dist/useIndustryCodes-uAj90IyS.js +0 -32
  989. package/dist/useLegalEntity-QQXN6YOm.js +0 -48
  990. package/dist/useNavigate-CiKOI5QV.js +0 -246
  991. package/dist/useOnboardingStatus-CsGUjkm-.js +0 -23
  992. package/dist/usePciQuestionnaireList-CFNJD8pS.js +0 -26
  993. package/dist/useSalesChannels-BvGJ9PT6.js +0 -47
  994. package/dist/useScenarios-CGcmXgJv.js +0 -55
  995. package/dist/useTaskLandedEvent-pmN03gtI.js +0 -26
  996. package/dist/useTaskStatus-CgrhdaE_.js +0 -23
  997. package/dist/useTermsOfServiceStatus-DbJDklA2.js +0 -39
  998. package/dist/useTrustMembers-f13Kf1Zk.js +0 -152
  999. package/dist/useUnincorporatedPartnershipMembers-K5jkCKfJ.js +0 -70
  1000. package/dist/useUpdateBusinessLines-DCKYTzxd.js +0 -43
  1001. package/dist/utils-2tir5QtF.js +0 -52
  1002. package/dist/utils-BUOt0VrX.js +0 -179
  1003. package/dist/utils-DBIDcVUN.js +0 -214
  1004. package/dist/validate-BpZBKknS.js +0 -224
  1005. package/dist/validate-CPTQceEQ.js +0 -151
  1006. package/dist/validate-YBDlgvjy.js +0 -429
  1007. package/dist/validate-u6nDNwf1.js +0 -126
  1008. package/dist/validateExtractionResult-dH4TewHf.js +0 -343
  1009. package/dist/validationError-B-B3GC86.js +0 -55
  1010. package/dist/warning-circle-fill-BDTmKU1s.js +0 -30
  1011. package/dist/warning-diamond-filled-BjDL-xa8.js +0 -30
  1012. package/dist/webinar-YMbPoCx3.js +0 -33
@@ -0,0 +1,2800 @@
1
+ try {
2
+ let e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {}, n = new e.Error().stack;
3
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "7c459223-8a49-4fe6-a324-2a71a0e5d3de", e._sentryDebugIdIdentifier = "sentry-dbid-7c459223-8a49-4fe6-a324-2a71a0e5d3de");
4
+ } catch (e) {}
5
+ import { n as addResourceBundles, r as useTranslation } from "./translation-DbATp_35.js";
6
+ import { t as createLogger } from "./logger-Z8AeTE4x.js";
7
+ import { t as Icon } from "./Icon-4XR6gZzk.js";
8
+ import { t as Typography } from "./Typography-CAc_f5Iq.js";
9
+ import { t as Loader } from "./Loader-BVtlpTeo.js";
10
+ import { n as IconButton, t as Button } from "./Button-DPJ1k02w.js";
11
+ import { n as httpGet, r as httpPost, s as useApiContext } from "./http-fdIO--pH.js";
12
+ import { n as useLegalEntities, r as useLegalEntity, t as ROOT_LE } from "./useLegalEntity-DHA8TJeV.js";
13
+ import { t as getLegalEntityCountry } from "./getLegalEntityCountry-BK-HHa65.js";
14
+ import { a as objectsDeepEqual } from "./genUtils-nphCwt1A.js";
15
+ import { t as _rolldown_dynamic_import_helper_default } from "./_rolldown_dynamic_import_helper-sGNwd-kR.js";
16
+ import { t as StackLayout } from "./StackLayout-IUdNMDgW.js";
17
+ import { n as TASK_STATUS_POLLING_INTERVAL_MS } from "./taskStatus-BtekPA8E.js";
18
+ import { t as Header } from "./Header-DVLlJ6we.js";
19
+ import { t as Alert } from "./Alert-Cc7p0N5h.js";
20
+ import { t as TaskTypes } from "./taskTypes-3vSkMBDm.js";
21
+ import { t as useAnalyticsContext } from "./useAnalyticsContext-gSnRnYgV.js";
22
+ import { t as useBusinessLines } from "./useBusinessLines-BZfFqvS_.js";
23
+ import { t as Card } from "./Card-BCGLpdw7.js";
24
+ import { t as useToastContext } from "./useToastContext-B6Mqc2HY.js";
25
+ import { t as LandingLayout } from "./LandingLayout-BsIoIFzs.js";
26
+ import { n as useCapabilityProblems, t as getProblemsForEntity } from "./getProblemsForEntity-Bn6dXidE.js";
27
+ import { t as useInvalidateRootLegalEntity } from "./invalidateRootLegalEntity-BHaVREw-.js";
28
+ import { t as Avatar } from "./Avatar-oTPu6Ejy.js";
29
+ import { t as Modal } from "./Modal-CHES6970.js";
30
+ import { t as Confirm } from "./Confirm-DoN9R9Z3.js";
31
+ import { t as useCreateLegalEntity } from "./useCreateLegalEntity-qP7MeAmi.js";
32
+ import { t as useUpdateLegalEntity } from "./useUpdateLegalEntity-CqmqXsbR.js";
33
+ import { a as useFormComposer, i as FormFlow, n as getRequiredForms, o as FormContextProvider, r as useFormContext, t as addValidityToForms } from "./dropinUtils-DTBezwYT.js";
34
+ import { t as Image } from "./Image-Bn_Yyuof.js";
35
+ import { t as StructuredList } from "./StructuredList-nPasiuLi.js";
36
+ import { t as ErrorPanel } from "./ErrorPanel-D4JNFkvi.js";
37
+ import { t as createFormUtils } from "./formUtils-DVDcdZsP.js";
38
+ import { t as useMultiForm } from "./useMultiForm-BxASst0O.js";
39
+ import { t as Field } from "./Field-DwDJQVSS.js";
40
+ import { t as TileGroup } from "./TileGroup-D1-M64Ul.js";
41
+ import { t as isEmpty } from "./isEmpty-Uewyl-r6.js";
42
+ import { t as Select } from "./Select-phAxjMBQ.js";
43
+ import { t as Checkbox } from "./Checkbox-qfdF12cF.js";
44
+ import { n as CountryField } from "./CountryField-DT6-Jr_b.js";
45
+ import { t as InputText } from "./InputText-CFDEmEtp.js";
46
+ import { t as RadioGroup } from "./RadioGroup-Bf3DlQnZ.js";
47
+ import { r as formatObject } from "./utils-DdHbAadK.js";
48
+ import { t as useTaskLandedEvent } from "./useTaskLandedEvent-DwZHcMEQ.js";
49
+ import { a as createDocumentRequest, o as documentApiUtils } from "./validate-BZ1-ZeKr.js";
50
+ import { t as localizeDateString } from "./localizeDateString-Dxlqr4rL.js";
51
+ import { t as getValidationErrorDisplayMessages } from "./validationError-DV6t8Ubb.js";
52
+ import { t as InputDate } from "./InputDate-Bq3Sb-ZW.js";
53
+ import { t as TextArea } from "./TextArea-qGEo3PFG.js";
54
+ import { t as Dropzone } from "./Dropzone-ttbRg2LI.js";
55
+ import { t as InputGroup } from "./InputGroup-B4U3QVEp.js";
56
+ import { t as Currencies } from "./currency-DQwXq9Mc.js";
57
+ import { n as validateDateNotInTheFuture } from "./validate-Dr8UKZCX.js";
58
+ import { t as useTaskStatus } from "./useTaskStatus-DJxOWvuN.js";
59
+ import { t as formatAmountWithCurrency } from "./formatCurrency-BetgkQKi.js";
60
+ import { lazy } from "preact/compat";
61
+ import { useCallback as useCallback$1, useEffect as useEffect$1, useMemo as useMemo$1, useState as useState$1 } from "preact/hooks";
62
+ import { Fragment as Fragment$1, jsx, jsxs } from "preact/jsx-runtime";
63
+ import { signal } from "@preact/signals";
64
+ import { useMutation, useQuery, useQueryClient } from "@tanstack/preact-query";
65
+ //#region src/api/businessLines/useUpdateSourceOfFunds.ts
66
+ var updateSourceOfFunds = async (businessLineId, legalEntityId, baseUrl, data) => {
67
+ return httpPost({
68
+ baseUrl,
69
+ path: `legalEntities/${legalEntityId}/businessLines/${businessLineId}/sourceOfFunds`
70
+ }, data);
71
+ };
72
+ var useUpdateSourceOfFunds = (options) => {
73
+ const { rootLegalEntityId, baseUrl } = useApiContext();
74
+ const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
75
+ return useMutation({
76
+ mutationFn: ({ businessLineId, ...requestData }) => updateSourceOfFunds(businessLineId, rootLegalEntityId.value, baseUrl.value, requestData),
77
+ onSuccess: async () => {
78
+ await invalidateRootLegalEntity();
79
+ },
80
+ ...options
81
+ });
82
+ };
83
+ var sourceOfFundsComponentsKeyMapping = {
84
+ "sourceOfFundsType.type": "sourceOfFunds.type",
85
+ "additionalData.description": "sourceOfFunds.description",
86
+ "additionalData.amount": "sourceOfFunds.amount",
87
+ "additionalData.dateOfFundsReceived": "sourceOfFunds.dateOfFundsReceived",
88
+ "additionalData.purpose": "sourceOfFunds.purpose",
89
+ "additionalData.relationship": "sourceOfFunds.relationship",
90
+ "additionalData.originatorLegalEntityId": "sourceOfFunds.originatorLegalEntityId",
91
+ "additionalData.financiers": "sourceOfFunds.financiers",
92
+ "additionalData.cryptocurrencyExchange": "sourceOfFunds.cryptocurrencyExchange",
93
+ "additionalData.dateOfSourceEvent": "sourceOfFunds.dateOfSourceEvent",
94
+ "additionalData.website": "sourceOfFunds.website",
95
+ "additionalData.legalName": "sourceOfFunds.legalName",
96
+ "additionalData.firstName": "sourceOfFunds.firstName",
97
+ "additionalData.lastName": "sourceOfFunds.lastName",
98
+ "additionalData.country": "sourceOfFunds.country",
99
+ "additionalData.originatorType": "sourceOfFunds.originatorType"
100
+ };
101
+ //#endregion
102
+ //#region src/components/EFP/mapping/mapSourceOfFundToSourceOfFundsSchema.ts
103
+ var mapSourceOfFundToSourceOfFundsSchema = (businessLine) => formatObject(businessLine, sourceOfFundsComponentsKeyMapping);
104
+ //#endregion
105
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/sofStore.ts
106
+ var sofErrorMessage = signal(void 0);
107
+ var setSofErrorMessage = (message) => {
108
+ sofErrorMessage.value = message;
109
+ };
110
+ var clearSofErrorMessage = () => {
111
+ sofErrorMessage.value = void 0;
112
+ };
113
+ //#endregion
114
+ //#region src/api/datasets/useSourceOfFundsTypes.ts
115
+ var getSourceOfFundsTypes = async (baseUrl) => {
116
+ return httpGet({
117
+ baseUrl,
118
+ path: `datasets/sourceOfFundsTypes`
119
+ });
120
+ };
121
+ var useSourceOfFundsTypes = (options) => {
122
+ const { baseUrl } = useApiContext();
123
+ return useQuery({
124
+ queryKey: ["sourceOfFundsTypes"],
125
+ queryFn: () => getSourceOfFundsTypes(baseUrl.value),
126
+ ...options
127
+ });
128
+ };
129
+ var SourceOfFunds_module_default = {
130
+ "source-of-funds": "_source-of-funds_1lnfv_1",
131
+ sourceOfFunds: "_source-of-funds_1lnfv_1",
132
+ "source-of-funds-awe": "_source-of-funds-awe_1lnfv_10",
133
+ sourceOfFundsAwe: "_source-of-funds-awe_1lnfv_10",
134
+ "source-of-funds-wrapper-loading": "_source-of-funds-wrapper-loading_1lnfv_17",
135
+ sourceOfFundsWrapperLoading: "_source-of-funds-wrapper-loading_1lnfv_17",
136
+ "source-of-funds-wrapper-heading": "_source-of-funds-wrapper-heading_1lnfv_24",
137
+ sourceOfFundsWrapperHeading: "_source-of-funds-wrapper-heading_1lnfv_24",
138
+ "source-of-funds-wrapper-description": "_source-of-funds-wrapper-description_1lnfv_29",
139
+ sourceOfFundsWrapperDescription: "_source-of-funds-wrapper-description_1lnfv_29",
140
+ "source-of-funds-same-as-checkbox": "_source-of-funds-same-as-checkbox_1lnfv_33",
141
+ sourceOfFundsSameAsCheckbox: "_source-of-funds-same-as-checkbox_1lnfv_33",
142
+ "source-of-funds-getting-started": "_source-of-funds-getting-started_1lnfv_37",
143
+ sourceOfFundsGettingStarted: "_source-of-funds-getting-started_1lnfv_37",
144
+ "source-of-funds-getting-started-awe": "_source-of-funds-getting-started-awe_1lnfv_42",
145
+ sourceOfFundsGettingStartedAwe: "_source-of-funds-getting-started-awe_1lnfv_42",
146
+ "source-of-funds-getting-started-heading": "_source-of-funds-getting-started-heading_1lnfv_48",
147
+ sourceOfFundsGettingStartedHeading: "_source-of-funds-getting-started-heading_1lnfv_48",
148
+ "source-of-funds-getting-started-body": "_source-of-funds-getting-started-body_1lnfv_52",
149
+ sourceOfFundsGettingStartedBody: "_source-of-funds-getting-started-body_1lnfv_52",
150
+ "source-of-funds-getting-started-error": "_source-of-funds-getting-started-error_1lnfv_56",
151
+ sourceOfFundsGettingStartedError: "_source-of-funds-getting-started-error_1lnfv_56",
152
+ "source-of-funds-getting-started-error-actions": "_source-of-funds-getting-started-error-actions_1lnfv_60",
153
+ sourceOfFundsGettingStartedErrorActions: "_source-of-funds-getting-started-error-actions_1lnfv_60",
154
+ "source-of-funds-getting-started-cards": "_source-of-funds-getting-started-cards_1lnfv_64",
155
+ sourceOfFundsGettingStartedCards: "_source-of-funds-getting-started-cards_1lnfv_64",
156
+ "source-of-funds-getting-started-cards-card": "_source-of-funds-getting-started-cards-card_1lnfv_70",
157
+ sourceOfFundsGettingStartedCardsCard: "_source-of-funds-getting-started-cards-card_1lnfv_70",
158
+ "source-of-funds-getting-started-cards-card-header": "_source-of-funds-getting-started-cards-card-header_1lnfv_76",
159
+ sourceOfFundsGettingStartedCardsCardHeader: "_source-of-funds-getting-started-cards-card-header_1lnfv_76",
160
+ "source-of-funds-getting-started-cards-card-body": "_source-of-funds-getting-started-cards-card-body_1lnfv_82",
161
+ sourceOfFundsGettingStartedCardsCardBody: "_source-of-funds-getting-started-cards-card-body_1lnfv_82",
162
+ "source-of-funds-getting-started-actions": "_source-of-funds-getting-started-actions_1lnfv_88",
163
+ sourceOfFundsGettingStartedActions: "_source-of-funds-getting-started-actions_1lnfv_88",
164
+ "source-of-funds-additional-data-form": "_source-of-funds-additional-data-form_1lnfv_96",
165
+ sourceOfFundsAdditionalDataForm: "_source-of-funds-additional-data-form_1lnfv_96",
166
+ "source-of-funds-third-party-funding-financier-group": "_source-of-funds-third-party-funding-financier-group_1lnfv_100",
167
+ sourceOfFundsThirdPartyFundingFinancierGroup: "_source-of-funds-third-party-funding-financier-group_1lnfv_100",
168
+ "source-of-funds-third-party-funding-name-avatar-group": "_source-of-funds-third-party-funding-name-avatar-group_1lnfv_117",
169
+ sourceOfFundsThirdPartyFundingNameAvatarGroup: "_source-of-funds-third-party-funding-name-avatar-group_1lnfv_117",
170
+ "source-of-funds-third-party-funding-name-address-group": "_source-of-funds-third-party-funding-name-address-group_1lnfv_123",
171
+ sourceOfFundsThirdPartyFundingNameAddressGroup: "_source-of-funds-third-party-funding-name-address-group_1lnfv_123",
172
+ "source-of-funds-sof-financier-form-error": "_source-of-funds-sof-financier-form-error_1lnfv_129",
173
+ sourceOfFundsSofFinancierFormError: "_source-of-funds-sof-financier-form-error_1lnfv_129",
174
+ "source-of-funds-sof-financier-form-name-group": "_source-of-funds-sof-financier-form-name-group_1lnfv_133",
175
+ sourceOfFundsSofFinancierFormNameGroup: "_source-of-funds-sof-financier-form-name-group_1lnfv_133",
176
+ "source-of-funds-financier-footer": "_source-of-funds-financier-footer_1lnfv_138",
177
+ sourceOfFundsFinancierFooter: "_source-of-funds-financier-footer_1lnfv_138",
178
+ "source-of-funds-grid-container": "_source-of-funds-grid-container_1lnfv_144",
179
+ sourceOfFundsGridContainer: "_source-of-funds-grid-container_1lnfv_144",
180
+ "source-of-funds-sub-heading": "_source-of-funds-sub-heading_1lnfv_150",
181
+ sourceOfFundsSubHeading: "_source-of-funds-sub-heading_1lnfv_150",
182
+ "source-of-funds-upload-modal-content-field": "_source-of-funds-upload-modal-content-field_1lnfv_154",
183
+ sourceOfFundsUploadModalContentField: "_source-of-funds-upload-modal-content-field_1lnfv_154",
184
+ "source-of-funds-upload-modal-content-field-radio-group": "_source-of-funds-upload-modal-content-field-radio-group_1lnfv_162",
185
+ sourceOfFundsUploadModalContentFieldRadioGroup: "_source-of-funds-upload-modal-content-field-radio-group_1lnfv_162",
186
+ "source-of-funds-upload-modal-content-requirements-container": "_source-of-funds-upload-modal-content-requirements-container_1lnfv_167",
187
+ sourceOfFundsUploadModalContentRequirementsContainer: "_source-of-funds-upload-modal-content-requirements-container_1lnfv_167",
188
+ "source-of-funds-upload-list-heading": "_source-of-funds-upload-list-heading_1lnfv_175",
189
+ sourceOfFundsUploadListHeading: "_source-of-funds-upload-list-heading_1lnfv_175",
190
+ "source-of-funds-modal": "_source-of-funds-modal_1lnfv_180",
191
+ sourceOfFundsModal: "_source-of-funds-modal_1lnfv_180"
192
+ };
193
+ //#endregion
194
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/types.ts
195
+ var additionalDataSchemaKeys = [
196
+ "description",
197
+ "dateOfFundsReceived",
198
+ "purpose",
199
+ "relationship",
200
+ "originatorLegalEntityId",
201
+ "amount",
202
+ "financiers",
203
+ "cryptocurrencyExchange",
204
+ "dateOfSourceEvent",
205
+ "website"
206
+ ];
207
+ //#endregion
208
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/utils.tsx
209
+ var allowedCurrencies = Object.entries(Currencies).map(([key]) => ({
210
+ name: key,
211
+ id: key
212
+ }));
213
+ var TODAY_DATE = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
214
+ var getSchemaForOriginator = (baseSchema, originatorType) => {
215
+ if (originatorType === "organization") return [...baseSchema, "legalName"];
216
+ if (originatorType === "individual") return [
217
+ ...baseSchema,
218
+ "firstName",
219
+ "lastName"
220
+ ];
221
+ return baseSchema;
222
+ };
223
+ var getAdditionalDataSchemaKeys = (sourceOfFundsType, originatorType) => {
224
+ switch (sourceOfFundsType) {
225
+ case "business": return ["amount", "description"];
226
+ case "donations": return getSchemaForOriginator([
227
+ "dateOfFundsReceived",
228
+ "purpose",
229
+ "relationship",
230
+ "country",
231
+ "originatorType"
232
+ ], originatorType);
233
+ case "inheritance": return getSchemaForOriginator([
234
+ "dateOfFundsReceived",
235
+ "amount",
236
+ "relationship",
237
+ "country",
238
+ "originatorType"
239
+ ], originatorType);
240
+ case "thirdPartyFunding": return ["financiers"];
241
+ case "cryptocurrencyIncome": return ["cryptocurrencyExchange"];
242
+ case "assetSale": return [
243
+ "dateOfSourceEvent",
244
+ "description",
245
+ "amount"
246
+ ];
247
+ case "gamblingWinnings": return [
248
+ "dateOfSourceEvent",
249
+ "website",
250
+ "amount"
251
+ ];
252
+ default: return [];
253
+ }
254
+ };
255
+ var getServiceTranslation = (t, service) => {
256
+ switch (service) {
257
+ case "banking": return t(($) => $["businessBankAccounts"]);
258
+ case "issuing": return t(($) => $["paymentCards"]);
259
+ case "paymentProcessing": return t(($) => $["acceptingPayments"]);
260
+ default: return t(($) => $["supportingDocuments"]);
261
+ }
262
+ };
263
+ var getServiceTranslationSelectTitle = (t, service) => {
264
+ switch (service) {
265
+ case "banking": return t(($) => $["forYourBusinessBankAccounts"]);
266
+ case "issuing": return t(($) => $["forYourPaymentCards"]);
267
+ case "paymentProcessing": return t(($) => $["whenAcceptingPayments"]);
268
+ default: return t(($) => $["supportingDocuments"]);
269
+ }
270
+ };
271
+ var getServiceTranslationKey = (service) => {
272
+ switch (service) {
273
+ case "banking": return "bankingService";
274
+ case "issuing": return "issuingService";
275
+ case "paymentProcessing": return "paymentService";
276
+ default: return "supportingDocuments";
277
+ }
278
+ };
279
+ var getGettingStartedCardDetails = (sourceOfFundsType, t, data) => {
280
+ const details = [];
281
+ sourceOfFundsType?.forEach((type) => {
282
+ switch (type) {
283
+ case "amount":
284
+ details.push({
285
+ term: t(($) => $["amount"]),
286
+ details: data?.amount?.currency && data?.amount?.value ? formatAmountWithCurrency(data.amount.value, data.amount.currency) : ""
287
+ });
288
+ break;
289
+ case "description":
290
+ details.push({
291
+ term: t(($) => $["description"]),
292
+ details: data?.description || ""
293
+ });
294
+ break;
295
+ case "dateOfFundsReceived":
296
+ details.push({
297
+ term: t(($) => $["date"]),
298
+ details: localizeDateString(data?.dateOfFundsReceived || "", navigator.language)
299
+ });
300
+ break;
301
+ case "purpose":
302
+ details.push({
303
+ term: t(($) => $["reason"]),
304
+ details: data?.purpose || ""
305
+ });
306
+ break;
307
+ case "relationship":
308
+ details.push({
309
+ term: t(($) => $["relationship"]),
310
+ details: data?.relationship || ""
311
+ });
312
+ break;
313
+ case "originatorLegalEntityId":
314
+ details.push({
315
+ term: t(($) => $["benefactorDetails"]),
316
+ details: [data?.legalName ? `${data?.legalName}` : `${data?.firstName} ${data?.lastName}`, /* @__PURE__ */ jsx(Typography, {
317
+ color: "secondary",
318
+ children: data?.country || ""
319
+ }, "location")]
320
+ });
321
+ break;
322
+ case "financiers":
323
+ data?.financiers?.map((financier) => {
324
+ return details.push({
325
+ term: t(($) => $["investor"]),
326
+ details: [
327
+ `${financier?.firstName} ${financier?.lastName}`,
328
+ /* @__PURE__ */ jsx(Typography, {
329
+ color: "secondary",
330
+ children: financier?.location || ""
331
+ }, "location"),
332
+ /* @__PURE__ */ jsx(Typography, {
333
+ color: "secondary",
334
+ children: financier?.amount?.currency && financier?.amount?.value ? formatAmountWithCurrency(financier.amount.value, financier.amount.currency) || "" : ""
335
+ }, "value")
336
+ ]
337
+ });
338
+ });
339
+ break;
340
+ case "cryptocurrencyExchange":
341
+ details.push({
342
+ term: t(($) => $["cryptocurrencyExchange"]),
343
+ details: data?.cryptocurrencyExchange || ""
344
+ });
345
+ break;
346
+ case "dateOfSourceEvent":
347
+ details.push({
348
+ term: t(($) => $["dateOfSourceEvent"]),
349
+ details: localizeDateString(data?.dateOfSourceEvent || "", navigator.language)
350
+ });
351
+ break;
352
+ case "website":
353
+ details.push({
354
+ term: t(($) => $["website"]),
355
+ details: data?.website || ""
356
+ });
357
+ break;
358
+ default: break;
359
+ }
360
+ });
361
+ return details;
362
+ };
363
+ var sourceOfFundsForms = {
364
+ sourceOfFundsType: {
365
+ formId: "sourceOfFundsType",
366
+ formName: "selectASourceOfFunding",
367
+ fields: ["type"]
368
+ },
369
+ additionalData: {
370
+ formId: "additionalData",
371
+ formName: "tellUsMoreAboutThisSource",
372
+ fields: [...additionalDataSchemaKeys]
373
+ }
374
+ };
375
+ var getSourceOfFundsRequiredFields = (data) => {
376
+ const sourceOfFundsType = data?.sourceOfFundsType?.type;
377
+ const originatorType = data?.additionalData?.originatorType;
378
+ return {
379
+ sourceOfFundsType: ["type"],
380
+ additionalData: getAdditionalDataSchemaKeys(sourceOfFundsType, originatorType)
381
+ };
382
+ };
383
+ var typesRequiringAdditionalData = [
384
+ "business",
385
+ "donations",
386
+ "inheritance",
387
+ "thirdPartyFunding",
388
+ "cryptocurrencyIncome",
389
+ "assetSale",
390
+ "gamblingWinnings"
391
+ ];
392
+ var getSourceOfFundsRequiredForms = (data) => {
393
+ return Object.fromEntries(Object.entries(sourceOfFundsForms).filter(([form]) => {
394
+ if (!data?.type || !typesRequiringAdditionalData.includes(data?.type)) return form !== sourceOfFundsForms.additionalData.formId;
395
+ return form;
396
+ }));
397
+ };
398
+ var getInputErrors = ({ formErrors, data, key, value, t }) => {
399
+ const isEmpty = value === "" || value === null || value === void 0;
400
+ let errors = { ...formErrors };
401
+ if (isEmpty) errors = {
402
+ ...formErrors,
403
+ [key]: {
404
+ key: "fieldIsRequired",
405
+ message: t(($) => $["fieldIsRequired"])
406
+ }
407
+ };
408
+ else errors = {
409
+ ...formErrors,
410
+ [key]: void 0
411
+ };
412
+ if (["amount", "currency"].includes(key)) {
413
+ if (data?.amount?.value && data?.amount?.currency) errors = {
414
+ ...formErrors,
415
+ amount: void 0
416
+ };
417
+ if (!data?.amount?.currency) errors = {
418
+ ...formErrors,
419
+ amount: {
420
+ key: "currencyIsRequired",
421
+ message: t(($) => $["currencyIsRequired"])
422
+ }
423
+ };
424
+ if (!data?.amount?.value) errors = {
425
+ ...formErrors,
426
+ amount: {
427
+ key: "amountIsRequired",
428
+ message: t(($) => $["amountIsRequired"])
429
+ }
430
+ };
431
+ else if (isNaN(data?.amount.value)) errors = {
432
+ ...formErrors,
433
+ amount: {
434
+ key: "pleaseEnterAValidAmount",
435
+ message: t(($) => $["pleaseEnterAValidAmount"])
436
+ }
437
+ };
438
+ }
439
+ return errors;
440
+ };
441
+ var getPageHeadings = (type) => {
442
+ switch (type) {
443
+ case "cryptocurrencyIncome": return {
444
+ heading: "cryptocurrencyProceedDetails",
445
+ description: "tellUsMoreAboutTheCryptocurrency"
446
+ };
447
+ case "assetSale": return {
448
+ heading: "propertySaleDetails",
449
+ description: "tellUsMoreAboutTheProperty"
450
+ };
451
+ case "gamblingWinnings": return {
452
+ heading: "gamblingProceedDetails",
453
+ description: "tellUsMoreAboutTheGamblingProceeds"
454
+ };
455
+ case "business": return {
456
+ heading: "businessEarningDetails",
457
+ description: "tellUsMoreAboutThePreviousBusinessEarnings"
458
+ };
459
+ case "thirdPartyFunding": return {
460
+ heading: "thirdPartyInvestmentDetails",
461
+ description: "tellUsMoreAboutTheInvestors"
462
+ };
463
+ case "inheritance": return {
464
+ heading: "inheritanceDetails",
465
+ description: "tellUsMoreAboutTheInheritanceProceeds"
466
+ };
467
+ case "donations": return {
468
+ heading: "giftOrDonationDetails",
469
+ description: "tellUsMoreAboutTheGiftOrDonationProceeds"
470
+ };
471
+ default: return { heading: "tellUsMoreAboutThisSource" };
472
+ }
473
+ };
474
+ var getDocumentRequirements = {
475
+ loanAgreement: [
476
+ "yourBusinessName",
477
+ "lendersNameAndAddress",
478
+ "principalAmount",
479
+ "loanDate",
480
+ "purposeOfLoan"
481
+ ],
482
+ loanStatement: [
483
+ "yourBusinessName",
484
+ "lendersNameAndAddress",
485
+ "principalAmount",
486
+ "loanDate",
487
+ "purposeOfLoan"
488
+ ],
489
+ proofOfWalletOwnership: [
490
+ "yourBusinessName",
491
+ "nameOfTheCryptocurrencyExchange",
492
+ "nameOfTheCoins",
493
+ "issueDateWithinTheLast12Months"
494
+ ],
495
+ transactionStatement: [
496
+ "showsYourBusinessName",
497
+ "showsTheNameOfTheCryptocurrencyExchange",
498
+ "showsTheNameOfTheCoins",
499
+ "issueDateWithinTheLast12Months"
500
+ ],
501
+ taxFiling: [
502
+ "showsYourBusinessName",
503
+ "showsTheNameOfTheCryptocurrencyExchange",
504
+ "showsTheNameOfTheCoins",
505
+ "issueDateWithinTheLast12Months"
506
+ ],
507
+ proofOfWinnings: [
508
+ "winningProceedAmount",
509
+ "dateOfWinning",
510
+ "nameOfCasinoLottery"
511
+ ],
512
+ winReport: [
513
+ "winningProceedAmount",
514
+ "dateOfWinning",
515
+ "nameOfCasinoLottery"
516
+ ],
517
+ winLossStatement: [
518
+ "winningProceedAmount",
519
+ "dateOfWinning",
520
+ "nameOfCasinoLottery"
521
+ ],
522
+ taxDeclaration: ["winningProceedAmount", "issuedWithinTheLast12Months"],
523
+ annualStatements: [
524
+ "yourBusinessName",
525
+ "proofOfAnnualTurnoverAmount",
526
+ "issueDateWithinTheLast12Months"
527
+ ],
528
+ latestTaxFiling: [
529
+ "yourBusinessName",
530
+ "proofOfAnnualTurnoverAmount",
531
+ "issueDateWithinTheLast12Months"
532
+ ],
533
+ letterFromAccountant: [
534
+ "yourBusinessName",
535
+ "proofOfAnnualTurnoverAmount",
536
+ "signatureAndDateWithinTheLast12Months"
537
+ ],
538
+ recentInvoices: ["yourBusinessName", "invoicesFromThe3MostRecentMonths"],
539
+ bankStatements: [
540
+ "yourBusinessName",
541
+ "issueDate",
542
+ "banksLogoAndName",
543
+ "allStatementsFrom3MostRecentMonths"
544
+ ],
545
+ payslips: [
546
+ "employersName",
547
+ "issueDate",
548
+ "banksLogoAndName",
549
+ "allPayslipsFrom3MostRecentMonths"
550
+ ],
551
+ contractSpecifyingDividends: [
552
+ "theBusinessName",
553
+ "termLengthAndDividendYield",
554
+ "namesOfInvolvedParties"
555
+ ],
556
+ latestTaxReturn: ["theBusinessName", "reportedDividendAmount"],
557
+ investmentCertificate: ["theBusinessName", "termLengthAndDividendYield"],
558
+ brokerStatements: [
559
+ "theBrokerageName",
560
+ "dividendAmount",
561
+ "issueDateWithinTheLast3Months",
562
+ "namesOfInvolvedParties"
563
+ ],
564
+ investorContract: [
565
+ "yourBusinessName",
566
+ "nameAddressSignatureOfAllInvestors",
567
+ "investmentAmount",
568
+ "fundDepositDate"
569
+ ],
570
+ investorMemo: [
571
+ "yourBusinessName",
572
+ "nameAddressSignatureOfAllInvestors",
573
+ "investmentAmount",
574
+ "fundDepositDate"
575
+ ],
576
+ notarizedStatement: [
577
+ "yourBusinessName",
578
+ "nameAddressSignatureOfAllInvestors",
579
+ "investmentAmount",
580
+ "fundDepositDate"
581
+ ],
582
+ partnershipAgreement: [
583
+ "yourBusinessName",
584
+ "nameAddressSignatureOfAllInvestors",
585
+ "investmentAmount",
586
+ "fundDepositDate"
587
+ ],
588
+ proofOfOwnership: [
589
+ "descriptionOfProperty",
590
+ "netProceedAmount",
591
+ "fundDepositDate",
592
+ "propertyAddress"
593
+ ],
594
+ letterFromAttorney: [
595
+ "descriptionOfProperty",
596
+ "netProceedAmount",
597
+ "fundDepositDate",
598
+ "propertyAddress"
599
+ ],
600
+ saleContract: [
601
+ "descriptionOfProperty",
602
+ "netProceedAmount",
603
+ "fundDepositDate",
604
+ "propertyAddress"
605
+ ],
606
+ taxDeclarationProperty: [
607
+ "descriptionOfProperty",
608
+ "netProceedAmount",
609
+ "fundDepositDate",
610
+ "propertyAddress"
611
+ ],
612
+ titleDeed: [
613
+ "descriptionOfProperty",
614
+ "netProceedAmount",
615
+ "fundDepositDate",
616
+ "propertyAddress"
617
+ ],
618
+ rentalAgreementOrLease: [
619
+ "namesOfLandlordAndTenant",
620
+ "propertyAddress",
621
+ "rentAmount"
622
+ ],
623
+ proofOfOwnershipRent: ["yourName", "propertyAddress"],
624
+ giftOrDonationAgreement: [
625
+ "donorsName",
626
+ "fundTransferDate",
627
+ "fundDepositAmount"
628
+ ],
629
+ royaltyAgreement: [
630
+ "descriptionOfIntellectualProperty",
631
+ "royaltyAmount",
632
+ "agreementPeriod"
633
+ ],
634
+ taxDocuments: ["royaltyAmount", "provideMostRecentYearAvailable"],
635
+ certificateOfInheritance: [
636
+ "decedentsName",
637
+ "inheritanceAmount",
638
+ "fundDepositDate",
639
+ "estateAttorneysName"
640
+ ],
641
+ grantOfProbate: [
642
+ "decedentsName",
643
+ "inheritanceAmount",
644
+ "fundDepositDate",
645
+ "estateAttorneysName"
646
+ ],
647
+ letterFromAttorneyOrNotary: [
648
+ "decedentsName",
649
+ "inheritanceAmount",
650
+ "fundDepositDate",
651
+ "estateAttorneysName"
652
+ ],
653
+ signedCopyOfTheWill: [
654
+ "decedentsName",
655
+ "inheritanceAmount",
656
+ "fundDepositDate",
657
+ "estateAttorneysName"
658
+ ],
659
+ pensionSlip: [
660
+ "yourFullName",
661
+ "previousEmployersName",
662
+ "pensionPaymentAmount"
663
+ ],
664
+ letterFromPreviousEmployer: [
665
+ "yourFullName",
666
+ "previousEmployersName",
667
+ "pensionPaymentAmountOrTotalValue"
668
+ ],
669
+ pensionStatement: [
670
+ "yourFullName",
671
+ "previousEmployersName",
672
+ "pensionPaymentAmountOrTotalValue"
673
+ ],
674
+ courtOrder: [
675
+ "yourFullName",
676
+ "totalSettlementAmount",
677
+ "fundDepositDate"
678
+ ],
679
+ letterFromAttorneyInsurance: [
680
+ "yourFullName",
681
+ "totalSettlementAmount",
682
+ "fundDepositDate"
683
+ ],
684
+ letterFromInsurer: [
685
+ "yourFullName",
686
+ "totalSettlementAmount",
687
+ "fundDepositDate"
688
+ ],
689
+ confirmationOfGrantOrSubsidy: [
690
+ "benefactorsName",
691
+ "subsidyOrGrantAmount",
692
+ "timePeriodIfApplicable"
693
+ ]
694
+ };
695
+ var getDocumentLists = (sourceOfFundsType) => {
696
+ switch (sourceOfFundsType) {
697
+ case "loans": return ["loanAgreement", "loanStatement"];
698
+ case "gamblingWinnings": return [
699
+ "proofOfWinnings",
700
+ "winReport",
701
+ "winLossStatement",
702
+ "taxDeclaration"
703
+ ];
704
+ case "cryptocurrencyIncome": return [
705
+ "proofOfWalletOwnership",
706
+ "transactionStatement",
707
+ "taxFiling"
708
+ ];
709
+ case "business": return [
710
+ "annualStatements",
711
+ "latestTaxFiling",
712
+ "letterFromAccountant",
713
+ "recentInvoices"
714
+ ];
715
+ case "employment": return ["bankStatements", "payslips"];
716
+ case "dividendIncome": return [
717
+ "contractSpecifyingDividends",
718
+ "latestTaxReturn",
719
+ "investmentCertificate",
720
+ "brokerStatements"
721
+ ];
722
+ case "thirdPartyFunding": return [
723
+ "investorContract",
724
+ "investorMemo",
725
+ "notarizedStatement",
726
+ "partnershipAgreement"
727
+ ];
728
+ case "assetSale": return [
729
+ "proofOfOwnership",
730
+ "letterFromAttorney",
731
+ "saleContract",
732
+ "taxDeclarationProperty",
733
+ "titleDeed"
734
+ ];
735
+ case "rentalIncome": return ["rentalAgreementOrLease", "proofOfOwnership"];
736
+ case "donations": return ["giftOrDonationAgreement"];
737
+ case "royaltyIncome": return ["royaltyAgreement", "taxDocuments"];
738
+ case "inheritance": return [
739
+ "certificateOfInheritance",
740
+ "grantOfProbate",
741
+ "letterFromAttorneyOrNotary",
742
+ "signedCopyOfTheWill"
743
+ ];
744
+ case "pensionIncome": return [
745
+ "pensionSlip",
746
+ "letterFromPreviousEmployer",
747
+ "pensionStatement"
748
+ ];
749
+ case "insuranceSettlement": return [
750
+ "courtOrder",
751
+ "letterFromAttorneyInsurance",
752
+ "letterFromInsurer"
753
+ ];
754
+ case "financialAid": return ["confirmationOfGrantOrSubsidy"];
755
+ default: return [];
756
+ }
757
+ };
758
+ var parseSOFDocumentDescription = (t, documentDescription) => {
759
+ if (!documentDescription || documentDescription.trim() === "" || !documentDescription.startsWith("$")) return;
760
+ const [servicePart, typePart] = documentDescription.split("--");
761
+ const selectedService = servicePart.split(":")[1];
762
+ const documentType = typePart.split(":")[1];
763
+ const parsed = {
764
+ selectedService: getServiceTranslation(t, selectedService || ""),
765
+ documentType: t(($) => $[documentType])
766
+ };
767
+ return `${parsed.selectedService} (${parsed.documentType})`;
768
+ };
769
+ var parseOriginatorDetails = (originatorDetails, businessLine) => {
770
+ const copiedBusinessLine = { ...businessLine };
771
+ if (copiedBusinessLine.sourceOfFunds) {
772
+ if (originatorDetails.organization) {
773
+ copiedBusinessLine.sourceOfFunds.legalName = originatorDetails.organization.legalName;
774
+ copiedBusinessLine.sourceOfFunds.country = originatorDetails.organization?.registeredAddress.country;
775
+ copiedBusinessLine.sourceOfFunds.originatorType = "organization";
776
+ }
777
+ if (originatorDetails.individual) {
778
+ copiedBusinessLine.sourceOfFunds.firstName = originatorDetails.individual.name?.firstName;
779
+ copiedBusinessLine.sourceOfFunds.lastName = originatorDetails.individual.name?.lastName;
780
+ copiedBusinessLine.sourceOfFunds.country = originatorDetails.individual.residentialAddress.country;
781
+ copiedBusinessLine.sourceOfFunds.originatorType = "individual";
782
+ }
783
+ }
784
+ return copiedBusinessLine;
785
+ };
786
+ var getSourceOfFundsPayload = (sofType, additionalData) => {
787
+ switch (sofType) {
788
+ case "business": return {
789
+ adyenProcessedFunds: false,
790
+ type: "business",
791
+ description: additionalData?.description,
792
+ amount: {
793
+ currency: additionalData?.amount?.currency ?? "USD",
794
+ value: additionalData?.amount?.value ?? 0
795
+ }
796
+ };
797
+ case "employment": return {
798
+ adyenProcessedFunds: false,
799
+ type: "employment"
800
+ };
801
+ case "donations": return {
802
+ adyenProcessedFunds: false,
803
+ type: "donations",
804
+ dateOfFundsReceived: additionalData?.dateOfFundsReceived,
805
+ purpose: additionalData?.purpose,
806
+ relationship: additionalData?.relationship,
807
+ originatorLegalEntityId: additionalData?.originatorLegalEntityId
808
+ };
809
+ case "inheritance": return {
810
+ adyenProcessedFunds: false,
811
+ type: "inheritance",
812
+ dateOfFundsReceived: additionalData?.dateOfFundsReceived,
813
+ amount: additionalData?.amount,
814
+ relationship: additionalData?.relationship,
815
+ originatorLegalEntityId: additionalData?.originatorLegalEntityId
816
+ };
817
+ case "financialAid": return {
818
+ adyenProcessedFunds: false,
819
+ type: "financialAid"
820
+ };
821
+ case "rentalIncome": return {
822
+ adyenProcessedFunds: false,
823
+ type: "rentalIncome"
824
+ };
825
+ case "dividendIncome": return {
826
+ adyenProcessedFunds: false,
827
+ type: "dividendIncome"
828
+ };
829
+ case "royaltyIncome": return {
830
+ adyenProcessedFunds: false,
831
+ type: "royaltyIncome"
832
+ };
833
+ case "pensionIncome": return {
834
+ adyenProcessedFunds: false,
835
+ type: "pensionIncome"
836
+ };
837
+ case "insuranceSettlement": return {
838
+ adyenProcessedFunds: false,
839
+ type: "insuranceSettlement"
840
+ };
841
+ case "thirdPartyFunding": return {
842
+ adyenProcessedFunds: false,
843
+ type: "thirdPartyFunding",
844
+ financiers: additionalData?.financiers
845
+ };
846
+ case "cryptocurrencyIncome": return {
847
+ adyenProcessedFunds: false,
848
+ type: "cryptocurrencyIncome",
849
+ cryptocurrencyExchange: additionalData?.cryptocurrencyExchange
850
+ };
851
+ case "assetSale": return {
852
+ adyenProcessedFunds: false,
853
+ type: "assetSale",
854
+ cryptocurrencyExchange: additionalData?.cryptocurrencyExchange,
855
+ dateOfSourceEvent: additionalData?.dateOfSourceEvent,
856
+ description: additionalData?.description,
857
+ amount: additionalData?.amount
858
+ };
859
+ case "loans": return {
860
+ adyenProcessedFunds: false,
861
+ type: "loans"
862
+ };
863
+ case "gamblingWinnings": return {
864
+ adyenProcessedFunds: false,
865
+ type: "gamblingWinnings",
866
+ dateOfSourceEvent: additionalData?.dateOfSourceEvent,
867
+ website: additionalData?.website && !additionalData.website.startsWith("http://") && !additionalData.website.startsWith("https://") ? `https://${additionalData.website}` : additionalData?.website,
868
+ amount: additionalData?.amount
869
+ };
870
+ default: return { adyenProcessedFunds: true };
871
+ }
872
+ };
873
+ var parseSofOriginatorPayload = (additionalData) => {
874
+ let sofOriginator;
875
+ if (additionalData?.originatorType === "individual") sofOriginator = {
876
+ type: "individual",
877
+ individual: {
878
+ name: {
879
+ firstName: additionalData?.firstName ?? "",
880
+ lastName: additionalData?.lastName ?? ""
881
+ },
882
+ residentialAddress: { country: additionalData?.country }
883
+ }
884
+ };
885
+ else sofOriginator = {
886
+ type: "organization",
887
+ organization: {
888
+ legalName: additionalData?.legalName ?? "",
889
+ registeredAddress: { country: additionalData?.country }
890
+ }
891
+ };
892
+ return sofOriginator;
893
+ };
894
+ var formatDateForInput = (isoDateString) => {
895
+ if (!isoDateString) return "";
896
+ try {
897
+ const datePart = isoDateString.split("T")[0];
898
+ if (/^\d{4}-\d{2}-\d{2}$/.test(datePart)) return datePart;
899
+ return "";
900
+ } catch {
901
+ return "";
902
+ }
903
+ };
904
+ var getSofCardDetails = (t, sourceOfFunds) => {
905
+ if (!sourceOfFunds) return "";
906
+ if (sourceOfFunds?.adyenProcessedFunds) return t(($) => $["transactionsOnThisPlatform"]);
907
+ if (sourceOfFunds?.type) return sourceOfFunds?.type ? t(($) => $[sofCategoryItemMapper[sourceOfFunds.type]]) : "";
908
+ return "";
909
+ };
910
+ var ALLOWED_SOF_SERVICES = ["issuing", "banking"];
911
+ /**
912
+ * Returns business lines that require SoF (based on ALLOWED_SOF_SERVICES)
913
+ */
914
+ var getApplicableBusinessLines = (businessLines) => {
915
+ return businessLines.filter((bl) => ALLOWED_SOF_SERVICES.includes(bl.service));
916
+ };
917
+ /**
918
+ * Deep comparison of SoF data.
919
+ * Returns true if all business-relevant fields are identical.
920
+ */
921
+ var areSourceOfFundsEqual = (sof1, sof2) => {
922
+ const type1 = sof1.sourceOfFundsType?.type;
923
+ if (type1 !== sof2.sourceOfFundsType?.type) return false;
924
+ if (type1 === "donations" || type1 === "inheritance") {
925
+ const ad1 = sof1.additionalData || {};
926
+ const ad2 = sof2.additionalData || {};
927
+ if (ad1.originatorType !== ad2.originatorType) return false;
928
+ if (ad1.originatorType === "individual") return ad1.firstName === ad2.firstName && ad1.lastName === ad2.lastName && ad1.country === ad2.country && ad1.relationship === ad2.relationship && ad1.purpose === ad2.purpose && ad1.dateOfFundsReceived === ad2.dateOfFundsReceived;
929
+ else if (ad1.originatorType === "organization") return ad1.legalName === ad2.legalName && ad1.country === ad2.country && ad1.relationship === ad2.relationship && ad1.purpose === ad2.purpose && ad1.dateOfFundsReceived === ad2.dateOfFundsReceived;
930
+ return false;
931
+ }
932
+ const ad1 = sof1.additionalData || {};
933
+ const ad2 = sof2.additionalData || {};
934
+ const keys1 = Object.keys(ad1);
935
+ const keys2 = Object.keys(ad2);
936
+ if (keys1.length !== keys2.length) return false;
937
+ return keys1.every((key) => {
938
+ const val1 = ad1[key];
939
+ const val2 = ad2[key];
940
+ return JSON.stringify(val1) === JSON.stringify(val2);
941
+ });
942
+ };
943
+ var SOF_INVALID_INPUT_ERROR_CODES = ["1_93", "1_94"];
944
+ var getRelevantErrors = (problems, targetCodes) => {
945
+ if (!problems) return false;
946
+ return problems.flatMap((problem) => (problem.verificationErrors || []).filter((error) => targetCodes.includes(error.code) || (error.subErrors || []).some((sub) => targetCodes.includes(sub.code))));
947
+ };
948
+ var getUniqueRemediationActions = (error) => {
949
+ return [...error.remediatingActions || [], ...error.subErrors?.flatMap((sub) => sub.remediatingActions || []) || []].filter((action, i, arr) => arr.findIndex((a) => a.code === action.code) === i);
950
+ };
951
+ var sofCategoryItemMapper = {
952
+ business: "otherBusinessEarnings",
953
+ employment: "employmentWages",
954
+ cryptocurrencyIncome: "cryptocurrency",
955
+ dividendIncome: "dividends",
956
+ loans: "loans",
957
+ financialAid: "financialAid",
958
+ thirdPartyFunding: "thirdPartyFunding",
959
+ rentalIncome: "rentalIncome",
960
+ royaltyIncome: "royaltyIncome",
961
+ gamblingWinnings: "gambling",
962
+ inheritance: "inheritance",
963
+ pensionIncome: "pensionIncome",
964
+ insuranceSettlement: "insuranceSettlement",
965
+ assetSale: "propertySale",
966
+ donations: "giftOrDonation"
967
+ };
968
+ /**
969
+ * Prepares additional data for originator creation/update.
970
+ * When useSameAs is true, appends the originatorLegalEntityId from the source
971
+ * so that createOrUpdateOriginator can update the existing LE instead of creating a new one.
972
+ */
973
+ var getAdditionalDataForOriginator = (additionalData, sourceAdditionalData, useSameAs) => {
974
+ if (useSameAs) return {
975
+ ...additionalData,
976
+ originatorLegalEntityId: sourceAdditionalData?.originatorLegalEntityId
977
+ };
978
+ return additionalData;
979
+ };
980
+ //#endregion
981
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForAssetSale.tsx
982
+ function AdditionalDataForAssetSale(props) {
983
+ const [isFocused, setIsFocused] = useState$1(false);
984
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
985
+ const { t: commonT } = useTranslation("common");
986
+ const handleOnAmountBlur = () => {
987
+ setIsFocused(false);
988
+ handleAmountChange("amount");
989
+ };
990
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("div", {
991
+ className: SourceOfFunds_module_default.sourceOfFundsGridContainer,
992
+ children: [/* @__PURE__ */ jsx(Field, {
993
+ el: "fieldset",
994
+ name: "amount",
995
+ label: formUtils.getLabel("amount", "saleAmount"),
996
+ errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
997
+ children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, {
998
+ ...childProps,
999
+ id: "currencyGroup",
1000
+ isFocused,
1001
+ isInvalid: Boolean(!valid.amount && errors.amount),
1002
+ children: [/* @__PURE__ */ jsx(Select, {
1003
+ name: "currency",
1004
+ "aria-label": commonT(($) => $["currency"]),
1005
+ isMulti: false,
1006
+ items: allowedCurrencies,
1007
+ selected: data.amount?.currency,
1008
+ placeholder: commonT(($) => $["select"]),
1009
+ onChange: handleAmountChange("currency"),
1010
+ minimal: true
1011
+ }), /* @__PURE__ */ jsx(InputText, {
1012
+ ...childProps,
1013
+ name: "amount",
1014
+ value: data.amount?.value,
1015
+ readonly: formUtils.isReadOnly("amount"),
1016
+ onInput: handleAmountChange("amount"),
1017
+ onBlur: handleOnAmountBlur,
1018
+ "aria-required": true,
1019
+ "aria-invalid": !valid.amount,
1020
+ isValid: valid.amount,
1021
+ onFocusHandler: () => setIsFocused(true)
1022
+ })]
1023
+ })
1024
+ }), /* @__PURE__ */ jsx(Field, {
1025
+ name: "dateOfSourceEvent",
1026
+ label: formUtils.getLabel("dateOfSourceEvent", "dateOfSale"),
1027
+ errorMessage: formUtils.getErrorMessage("dateOfSourceEvent", errors, fieldProblems),
1028
+ isValid: valid.dateOfSourceEvent,
1029
+ children: (childProps) => /* @__PURE__ */ jsx(InputDate, {
1030
+ ...childProps,
1031
+ name: "dateOfSourceEvent",
1032
+ value: formatDateForInput(data.dateOfSourceEvent),
1033
+ onInput: handleChangeFor("dateOfSourceEvent", "input"),
1034
+ onBlur: handleChangeFor("dateOfSourceEvent", "blur"),
1035
+ "aria-required": true,
1036
+ "aria-invalid": !valid.dateOfSourceEvent,
1037
+ max: TODAY_DATE
1038
+ })
1039
+ })]
1040
+ }), /* @__PURE__ */ jsx(Field, {
1041
+ name: "description",
1042
+ label: formUtils.getLabel("description", "propertyDescription"),
1043
+ errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
1044
+ isValid: valid.description,
1045
+ children: (childProps) => /* @__PURE__ */ jsx(TextArea, {
1046
+ ...childProps,
1047
+ name: "description",
1048
+ value: data.description,
1049
+ maxLength: 200,
1050
+ onInput: handleChangeFor("description"),
1051
+ onBlur: handleChangeFor("description"),
1052
+ "aria-invalid": !valid.description
1053
+ })
1054
+ })] });
1055
+ }
1056
+ //#endregion
1057
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForBusiness.tsx
1058
+ function AdditionalDataForBusiness(props) {
1059
+ const [isFocused, setIsFocused] = useState$1(false);
1060
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
1061
+ const { t: commonT } = useTranslation("common");
1062
+ const handleOnAmountBlur = () => {
1063
+ setIsFocused(false);
1064
+ handleAmountChange("amount");
1065
+ };
1066
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Field, {
1067
+ el: "fieldset",
1068
+ name: "amount",
1069
+ label: formUtils.getLabel("amount", "annualTurnover"),
1070
+ errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
1071
+ helper: commonT(($) => $["useFiguresFromTheMostRecentYearAvailable"]),
1072
+ helperPosition: "below",
1073
+ children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, {
1074
+ ...childProps,
1075
+ id: "currencyGroup",
1076
+ isFocused,
1077
+ isInvalid: Boolean(!valid.amount && errors.amount),
1078
+ children: [/* @__PURE__ */ jsx(Select, {
1079
+ name: "currency",
1080
+ "aria-label": commonT(($) => $["currency"]),
1081
+ isMulti: false,
1082
+ items: allowedCurrencies,
1083
+ selected: data.amount?.currency,
1084
+ placeholder: commonT(($) => $["select"]),
1085
+ onChange: handleAmountChange("currency"),
1086
+ minimal: true
1087
+ }), /* @__PURE__ */ jsx(InputText, {
1088
+ ...childProps,
1089
+ name: "amount",
1090
+ value: data.amount?.value,
1091
+ readonly: formUtils.isReadOnly("amount"),
1092
+ onInput: handleAmountChange("amount"),
1093
+ onBlur: handleOnAmountBlur,
1094
+ "aria-required": true,
1095
+ "aria-invalid": !valid.amount,
1096
+ isValid: valid.amount,
1097
+ onFocusHandler: () => setIsFocused(true)
1098
+ })]
1099
+ })
1100
+ }), /* @__PURE__ */ jsx(Field, {
1101
+ name: "description",
1102
+ label: formUtils.getLabel("description", "businessDescription"),
1103
+ errorMessage: formUtils.getErrorMessage("description", errors, fieldProblems),
1104
+ isValid: valid.description,
1105
+ children: (childProps) => /* @__PURE__ */ jsx(TextArea, {
1106
+ ...childProps,
1107
+ name: "description",
1108
+ value: data.description,
1109
+ maxLength: 200,
1110
+ onInput: handleChangeFor("description"),
1111
+ onBlur: handleChangeFor("description"),
1112
+ "aria-invalid": !valid.description
1113
+ })
1114
+ })] });
1115
+ }
1116
+ //#endregion
1117
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForCryptocurrency.tsx
1118
+ function AdditionalDataForCryptocurrency(props) {
1119
+ const { t: sofT } = useTranslation("sof");
1120
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor } = props;
1121
+ return /* @__PURE__ */ jsx(Field, {
1122
+ name: "cryptocurrencyExchange",
1123
+ label: formUtils.getLabel("cryptocurrencyExchange", "cryptocurrencyExchange"),
1124
+ errorMessage: formUtils.getErrorMessage("cryptocurrencyExchange", errors, fieldProblems),
1125
+ isValid: valid.cryptocurrencyExchange,
1126
+ helper: sofT(($) => $["nameOfTheExchangeWhereTheCryptocurrencyWasHeldPriorToSale"]),
1127
+ helperPosition: "below",
1128
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1129
+ ...childProps,
1130
+ name: "cryptocurrencyExchange",
1131
+ value: data.cryptocurrencyExchange,
1132
+ readonly: formUtils.isReadOnly("cryptocurrencyExchange"),
1133
+ onInput: handleChangeFor("cryptocurrencyExchange", "input"),
1134
+ onBlur: handleChangeFor("cryptocurrencyExchange", "blur"),
1135
+ "aria-required": true,
1136
+ "aria-invalid": !valid.cryptocurrencyExchange,
1137
+ isValid: valid.cryptocurrencyExchange
1138
+ })
1139
+ });
1140
+ }
1141
+ //#endregion
1142
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataOriginatorLegalEntity.tsx
1143
+ var radioItems = [{
1144
+ id: "individual",
1145
+ name: "individual"
1146
+ }, {
1147
+ id: "organization",
1148
+ name: "organization"
1149
+ }];
1150
+ function AdditionalDataOriginatorLegalEntity(props) {
1151
+ const { t: sofT } = useTranslation("sof");
1152
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, sourceOfFundsType } = props;
1153
+ const isDonations = sourceOfFundsType === "donations";
1154
+ const countryTranslationKey = isDonations && data?.originatorType === "individual" ? "donorsCountryOfResidence" : data?.originatorType === "organization" ? "organizationsCountryOfOperation" : "decedentsCountryOfDeath";
1155
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1156
+ /* @__PURE__ */ jsx(Field, {
1157
+ el: "fieldset",
1158
+ name: "originatorType",
1159
+ className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentField,
1160
+ label: sofT(($) => $[isDonations ? "whereDidThisGiftOrDonationComeFrom" : "whereDidThisInheritanceComeFrom"]),
1161
+ errorMessage: formUtils.getErrorMessage("originatorType", errors, fieldProblems),
1162
+ isValid: valid.originatorType,
1163
+ children: (childProps) => /* @__PURE__ */ jsx(RadioGroup, {
1164
+ ...childProps,
1165
+ name: "originatorType",
1166
+ className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentFieldRadioGroup,
1167
+ items: radioItems,
1168
+ value: data.originatorType,
1169
+ disabled: false,
1170
+ onChange: handleChangeFor("originatorType", "input"),
1171
+ "aria-required": true
1172
+ })
1173
+ }),
1174
+ data?.originatorType === "organization" && /* @__PURE__ */ jsx(Field, {
1175
+ name: "legalName",
1176
+ label: formUtils.getLabel("legalName", "organizationsLegalName"),
1177
+ errorMessage: formUtils.getErrorMessage("legalName", errors, fieldProblems),
1178
+ isValid: valid.legalName,
1179
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1180
+ ...childProps,
1181
+ name: "legalName",
1182
+ value: data.legalName,
1183
+ readonly: formUtils.isReadOnly("legalName"),
1184
+ onInput: handleChangeFor("legalName", "input"),
1185
+ onBlur: handleChangeFor("legalName", "blur"),
1186
+ "aria-required": true,
1187
+ "aria-invalid": !valid.legalName,
1188
+ isValid: valid.legalName
1189
+ })
1190
+ }),
1191
+ data?.originatorType === "individual" && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Field, {
1192
+ name: "firstName",
1193
+ label: formUtils.getLabel("firstName", isDonations ? "donorsLegalFirstName" : "decedentsLegalFirstName"),
1194
+ errorMessage: formUtils.getErrorMessage("firstName", errors, fieldProblems),
1195
+ isValid: valid.firstName,
1196
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1197
+ ...childProps,
1198
+ name: "firstName",
1199
+ value: data.firstName,
1200
+ readonly: formUtils.isReadOnly("firstName"),
1201
+ onInput: handleChangeFor("firstName", "input"),
1202
+ onBlur: handleChangeFor("firstName", "blur"),
1203
+ "aria-required": true,
1204
+ "aria-invalid": !valid.firstName,
1205
+ isValid: valid.firstName
1206
+ })
1207
+ }), /* @__PURE__ */ jsx(Field, {
1208
+ name: "lastName",
1209
+ label: formUtils.getLabel("lastName", isDonations ? "donorsLegalLastName" : "decedentsLegalLastName"),
1210
+ errorMessage: formUtils.getErrorMessage("lastName", errors, fieldProblems),
1211
+ isValid: valid.lastName,
1212
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1213
+ ...childProps,
1214
+ name: "lastName",
1215
+ value: data.lastName,
1216
+ readonly: formUtils.isReadOnly("lastName"),
1217
+ onInput: handleChangeFor("lastName", "input"),
1218
+ onBlur: handleChangeFor("lastName", "blur"),
1219
+ "aria-required": true,
1220
+ "aria-invalid": !valid.lastName,
1221
+ isValid: valid.lastName
1222
+ })
1223
+ })] }),
1224
+ data?.originatorType && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Field, {
1225
+ name: "relationship",
1226
+ label: formUtils.getLabel("relationship", isDonations && data?.originatorType === "individual" ? "yourRelationshipToDonor" : data?.originatorType === "organization" ? "yourRelationshipToOrganization" : "yourRelationshipToDecedent"),
1227
+ errorMessage: formUtils.getErrorMessage("relationship", errors, fieldProblems),
1228
+ isValid: valid.relationship,
1229
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1230
+ ...childProps,
1231
+ name: "relationship",
1232
+ value: data.relationship,
1233
+ readonly: formUtils.isReadOnly("relationship"),
1234
+ onInput: handleChangeFor("relationship", "input"),
1235
+ onBlur: handleChangeFor("relationship", "blur"),
1236
+ "aria-required": true,
1237
+ "aria-invalid": !valid.relationship,
1238
+ isValid: valid.relationship
1239
+ })
1240
+ }), /* @__PURE__ */ jsx(CountryField, {
1241
+ data: { country: data.country },
1242
+ valid: { country: valid.country },
1243
+ errors: { country: formUtils.getErrorMessage("country", errors, fieldProblems) },
1244
+ labels: { country: sofT(($) => $[countryTranslationKey]) },
1245
+ readonly: formUtils.isReadOnly("country"),
1246
+ handleChangeFor
1247
+ })] })
1248
+ ] });
1249
+ }
1250
+ //#endregion
1251
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForDonation.tsx
1252
+ function AdditionalDataForDonation(props) {
1253
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor } = props;
1254
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(AdditionalDataOriginatorLegalEntity, {
1255
+ formUtils,
1256
+ handleChangeFor,
1257
+ data,
1258
+ errors,
1259
+ valid,
1260
+ fieldProblems,
1261
+ sourceOfFundsType: "donations"
1262
+ }), /* @__PURE__ */ jsxs("div", {
1263
+ className: SourceOfFunds_module_default.sourceOfFundsGridContainer,
1264
+ children: [/* @__PURE__ */ jsx(Field, {
1265
+ name: "purpose",
1266
+ label: formUtils.getLabel("purpose", "reason"),
1267
+ errorMessage: formUtils.getErrorMessage("purpose", errors, fieldProblems),
1268
+ isValid: valid.purpose,
1269
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1270
+ ...childProps,
1271
+ name: "purpose",
1272
+ value: data.purpose,
1273
+ readonly: formUtils.isReadOnly("purpose"),
1274
+ onInput: handleChangeFor("purpose", "input"),
1275
+ onBlur: handleChangeFor("purpose", "blur"),
1276
+ "aria-required": true,
1277
+ "aria-invalid": !valid.purpose,
1278
+ isValid: valid.purpose
1279
+ })
1280
+ }), /* @__PURE__ */ jsx(Field, {
1281
+ name: "dateOfFundsReceived",
1282
+ label: formUtils.getLabel("dateOfFundsReceived", "date"),
1283
+ errorMessage: formUtils.getErrorMessage("dateOfFundsReceived", errors, fieldProblems),
1284
+ isValid: valid.dateOfFundsReceived,
1285
+ children: (childProps) => /* @__PURE__ */ jsx(InputDate, {
1286
+ ...childProps,
1287
+ name: "dateOfFundsReceived",
1288
+ value: formatDateForInput(data.dateOfFundsReceived),
1289
+ onInput: handleChangeFor("dateOfFundsReceived", "input"),
1290
+ onBlur: handleChangeFor("dateOfFundsReceived", "blur"),
1291
+ "aria-required": true,
1292
+ "aria-invalid": !valid.dateOfFundsReceived,
1293
+ max: TODAY_DATE
1294
+ })
1295
+ })]
1296
+ })] });
1297
+ }
1298
+ //#endregion
1299
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForGambling.tsx
1300
+ function AdditionalDataForGambling(props) {
1301
+ const { t: commonT } = useTranslation("common");
1302
+ const [focusedInput, setFocusedInput] = useState$1();
1303
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
1304
+ const handleOnAmountBlur = () => {
1305
+ setFocusedInput(void 0);
1306
+ handleAmountChange("amount");
1307
+ };
1308
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1309
+ /* @__PURE__ */ jsx(Field, {
1310
+ el: "fieldset",
1311
+ name: "amount",
1312
+ label: formUtils.getLabel("amount", "totalAmountWon"),
1313
+ errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
1314
+ children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, {
1315
+ ...childProps,
1316
+ id: "currencyGroup",
1317
+ isFocused: focusedInput === "amount",
1318
+ isInvalid: Boolean(!valid.amount && errors.amount),
1319
+ children: [/* @__PURE__ */ jsx(Select, {
1320
+ name: "currency",
1321
+ "aria-label": commonT(($) => $["currency"]),
1322
+ isMulti: false,
1323
+ items: allowedCurrencies,
1324
+ selected: data.amount?.currency,
1325
+ placeholder: commonT(($) => $["select"]),
1326
+ onChange: handleAmountChange("currency"),
1327
+ minimal: true
1328
+ }), /* @__PURE__ */ jsx(InputText, {
1329
+ ...childProps,
1330
+ name: "amount",
1331
+ value: data.amount?.value,
1332
+ readonly: formUtils.isReadOnly("amount"),
1333
+ onInput: handleAmountChange("amount"),
1334
+ onBlur: handleOnAmountBlur,
1335
+ "aria-required": true,
1336
+ "aria-invalid": !valid.amount,
1337
+ isValid: valid.amount,
1338
+ onFocusHandler: () => setFocusedInput("amount")
1339
+ })]
1340
+ })
1341
+ }),
1342
+ /* @__PURE__ */ jsx(Field, {
1343
+ name: "dateOfSourceEvent",
1344
+ label: formUtils.getLabel("dateOfSourceEvent", "dateOfWinning"),
1345
+ errorMessage: formUtils.getErrorMessage("dateOfSourceEvent", errors, fieldProblems),
1346
+ isValid: valid.dateOfSourceEvent,
1347
+ children: (childProps) => /* @__PURE__ */ jsx(InputDate, {
1348
+ ...childProps,
1349
+ name: "dateOfSourceEvent",
1350
+ value: formatDateForInput(data.dateOfSourceEvent),
1351
+ onInput: handleChangeFor("dateOfSourceEvent", "input"),
1352
+ onBlur: handleChangeFor("dateOfSourceEvent", "blur"),
1353
+ "aria-required": true,
1354
+ "aria-invalid": !valid.dateOfSourceEvent,
1355
+ max: TODAY_DATE
1356
+ })
1357
+ }),
1358
+ /* @__PURE__ */ jsx(Field, {
1359
+ name: "website",
1360
+ label: formUtils.getLabel("website", "gamblingEstablishmentWebsite"),
1361
+ errorMessage: formUtils.getErrorMessage("website", errors, fieldProblems),
1362
+ children: (childProps) => /* @__PURE__ */ jsx(InputGroup, {
1363
+ ...childProps,
1364
+ id: "websiteGroup",
1365
+ isFocused: focusedInput === "website",
1366
+ isInvalid: Boolean(!valid.website && errors.website),
1367
+ children: /* @__PURE__ */ jsx(InputText, {
1368
+ ...childProps,
1369
+ placeholder: "https://",
1370
+ name: "website",
1371
+ value: data.website,
1372
+ readonly: formUtils.isReadOnly("website"),
1373
+ onInput: handleChangeFor("website", "input"),
1374
+ onBlur: handleChangeFor("website", "blur"),
1375
+ "aria-required": true,
1376
+ "aria-invalid": !valid.website,
1377
+ isValid: valid.website,
1378
+ onFocusHandler: () => setFocusedInput("website")
1379
+ })
1380
+ })
1381
+ })
1382
+ ] });
1383
+ }
1384
+ //#endregion
1385
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForInheritance.tsx
1386
+ function AdditionalDataForInheritance(props) {
1387
+ const [isFocused, setIsFocused] = useState$1(false);
1388
+ const { formUtils, data, errors, valid, fieldProblems, handleChangeFor, handleAmountChange } = props;
1389
+ const { t: commonT } = useTranslation("common");
1390
+ const handleOnAmountBlur = () => {
1391
+ setIsFocused(false);
1392
+ handleAmountChange("amount");
1393
+ };
1394
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(AdditionalDataOriginatorLegalEntity, {
1395
+ formUtils,
1396
+ handleChangeFor,
1397
+ data,
1398
+ errors,
1399
+ valid,
1400
+ fieldProblems,
1401
+ sourceOfFundsType: "inheritance"
1402
+ }), /* @__PURE__ */ jsxs("div", {
1403
+ className: SourceOfFunds_module_default.sourceOfFundsGridContainer,
1404
+ children: [/* @__PURE__ */ jsx(Field, {
1405
+ el: "fieldset",
1406
+ name: "amount",
1407
+ label: formUtils.getLabel("amount", "inheritanceAmount"),
1408
+ errorMessage: formUtils.getErrorMessage("amount", errors, fieldProblems),
1409
+ children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, {
1410
+ ...childProps,
1411
+ id: "currencyGroup",
1412
+ isFocused,
1413
+ isInvalid: Boolean(!valid.amount && errors.amount),
1414
+ children: [/* @__PURE__ */ jsx(Select, {
1415
+ name: "currency",
1416
+ "aria-label": commonT(($) => $["currency"]),
1417
+ isMulti: false,
1418
+ items: allowedCurrencies ?? [],
1419
+ selected: data.amount?.currency,
1420
+ placeholder: commonT(($) => $["select"]),
1421
+ onChange: handleAmountChange("currency"),
1422
+ minimal: true
1423
+ }), /* @__PURE__ */ jsx(InputText, {
1424
+ ...childProps,
1425
+ name: "amount",
1426
+ value: data.amount?.value,
1427
+ readonly: formUtils.isReadOnly("amount"),
1428
+ onInput: handleAmountChange("amount"),
1429
+ onBlur: handleOnAmountBlur,
1430
+ "aria-required": true,
1431
+ "aria-invalid": !valid.amount,
1432
+ isValid: valid.amount,
1433
+ onFocusHandler: () => setIsFocused(true)
1434
+ })]
1435
+ })
1436
+ }), /* @__PURE__ */ jsx(Field, {
1437
+ name: "dateOfFundsReceived",
1438
+ label: formUtils.getLabel("dateOfFundsReceived", "inheritanceReceivedOn"),
1439
+ errorMessage: formUtils.getErrorMessage("dateOfFundsReceived", errors, fieldProblems),
1440
+ isValid: valid.dateOfFundsReceived,
1441
+ children: (childProps) => /* @__PURE__ */ jsx(InputDate, {
1442
+ ...childProps,
1443
+ name: "dateOfFundsReceived",
1444
+ value: formatDateForInput(data.dateOfFundsReceived),
1445
+ onInput: handleChangeFor("dateOfFundsReceived", "input"),
1446
+ onBlur: handleChangeFor("dateOfFundsReceived", "blur"),
1447
+ "aria-required": true,
1448
+ "aria-invalid": !valid.dateOfFundsReceived,
1449
+ max: TODAY_DATE
1450
+ })
1451
+ })]
1452
+ })] });
1453
+ }
1454
+ //#endregion
1455
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/SOFFinancierModal.tsx
1456
+ var SOFFinancierModal = (props) => {
1457
+ const { t: sofT } = useTranslation("sof");
1458
+ const { t: commonT } = useTranslation("common");
1459
+ const { financier, handleModalClose, indexNumber, handleFinancierUpdate } = props;
1460
+ const [formData, setFormData] = useState$1(financier);
1461
+ const [formErrors, setFormErrors] = useState$1({});
1462
+ const [confirmOpen, setConfirmOpen] = useState$1(false);
1463
+ const [isFocused, setIsFocused] = useState$1(false);
1464
+ const [errorMessage, setErrorMessage] = useState$1("");
1465
+ const handleInputUpdate = (key, e) => {
1466
+ const inputEl = e.target;
1467
+ setErrorMessage("");
1468
+ const value = inputEl?.value;
1469
+ let inputData = { [key]: value };
1470
+ if (["amount", "currency"].includes(key)) inputData = { amount: {
1471
+ currency: key === "currency" ? value : formData?.amount?.currency,
1472
+ value: key === "currency" ? formData?.amount?.value : value
1473
+ } };
1474
+ const data = {
1475
+ ...formData,
1476
+ ...inputData
1477
+ };
1478
+ setFormData(data);
1479
+ const errors = getInputErrors({
1480
+ formErrors,
1481
+ data,
1482
+ key,
1483
+ value,
1484
+ t: commonT
1485
+ });
1486
+ setFormErrors(errors);
1487
+ };
1488
+ const handleOnAmountBlur = () => {
1489
+ setIsFocused(false);
1490
+ const errors = getInputErrors({
1491
+ formErrors,
1492
+ data: formData,
1493
+ key: "amount",
1494
+ value: formData?.amount?.value,
1495
+ t: commonT
1496
+ });
1497
+ setFormErrors(errors);
1498
+ };
1499
+ const allFieldsFilled = (data) => {
1500
+ return data?.firstName && data?.lastName && data?.location && data?.amount?.currency && !Number.isNaN(Number(data?.amount?.value));
1501
+ };
1502
+ const handleFinancierSave = () => {
1503
+ if (formData && allFieldsFilled(formData)) {
1504
+ handleFinancierUpdate({
1505
+ formData,
1506
+ indexNumber
1507
+ });
1508
+ handleModalClose();
1509
+ } else {
1510
+ const errors = [
1511
+ "firstName",
1512
+ "lastName",
1513
+ "location",
1514
+ "amount"
1515
+ ].reduce((acc, key) => {
1516
+ const value = key === "amount" ? formData?.amount?.value : formData?.[key];
1517
+ return {
1518
+ ...acc,
1519
+ ...getInputErrors({
1520
+ formErrors: void 0,
1521
+ data: formData,
1522
+ key,
1523
+ value,
1524
+ t: commonT
1525
+ })
1526
+ };
1527
+ }, {});
1528
+ setFormErrors(errors);
1529
+ setErrorMessage(sofT(($) => $["pleaseFillInAllFields"]));
1530
+ }
1531
+ };
1532
+ const handleFinancierDelete = async () => {
1533
+ handleFinancierUpdate({ indexNumber });
1534
+ handleModalClose();
1535
+ };
1536
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Modal, {
1537
+ onClose: handleModalClose,
1538
+ ariaLabel: sofT(($) => $["investorDetails"]),
1539
+ inset: true,
1540
+ children: /* @__PURE__ */ jsxs("div", {
1541
+ className: SourceOfFunds_module_default.sourceOfFundsModal,
1542
+ children: [
1543
+ /* @__PURE__ */ jsx(Typography, {
1544
+ variant: "title-l",
1545
+ el: "h3",
1546
+ className: SourceOfFunds_module_default.sourceOfFundsGettingStartedHelpHeader,
1547
+ children: sofT(($) => $["investorDetails"])
1548
+ }),
1549
+ /* @__PURE__ */ jsxs("div", {
1550
+ className: SourceOfFunds_module_default.sourceOfFundsSofFinancierForm,
1551
+ children: [
1552
+ errorMessage && /* @__PURE__ */ jsx(Alert, {
1553
+ title: sofT(($) => $["errorSubmittingData"]),
1554
+ variant: "error",
1555
+ className: SourceOfFunds_module_default.sourceOfFundsSofFinancierFormError,
1556
+ children: errorMessage
1557
+ }),
1558
+ /* @__PURE__ */ jsxs("div", {
1559
+ className: SourceOfFunds_module_default.sourceOfFundsSofFinancierFormNameGroup,
1560
+ children: [/* @__PURE__ */ jsx(Field, {
1561
+ name: "firstName",
1562
+ label: commonT(($) => $["firstName"]),
1563
+ errorMessage: formErrors.firstName,
1564
+ isValid: !formErrors.firstName,
1565
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1566
+ ...childProps,
1567
+ name: "firstName",
1568
+ value: formData?.firstName,
1569
+ onInput: (e) => handleInputUpdate("firstName", e),
1570
+ onBlur: (e) => handleInputUpdate("firstName", e),
1571
+ "aria-required": true,
1572
+ "aria-invalid": Boolean(formErrors.firstName),
1573
+ isValid: !formErrors.firstName
1574
+ })
1575
+ }), /* @__PURE__ */ jsx(Field, {
1576
+ name: "lastName",
1577
+ label: commonT(($) => $["lastName"]),
1578
+ errorMessage: formErrors.lastName,
1579
+ isValid: !formErrors.lastName,
1580
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1581
+ ...childProps,
1582
+ name: "lastName",
1583
+ value: formData?.lastName,
1584
+ onInput: (e) => handleInputUpdate("lastName", e),
1585
+ onBlur: (e) => handleInputUpdate("lastName", e),
1586
+ "aria-required": true,
1587
+ "aria-invalid": Boolean(formErrors.lastName),
1588
+ isValid: !formErrors.lastName
1589
+ })
1590
+ })]
1591
+ }),
1592
+ /* @__PURE__ */ jsx(Field, {
1593
+ name: "location",
1594
+ label: sofT(($) => $["investorLocation"]),
1595
+ errorMessage: formErrors.location,
1596
+ isValid: !formErrors.location,
1597
+ helperPosition: "below",
1598
+ showErrorIconBottom: true,
1599
+ helper: sofT(($) => $["theCityAndCountryRegion"]),
1600
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1601
+ ...childProps,
1602
+ name: "location",
1603
+ value: formData?.location,
1604
+ onInput: (e) => handleInputUpdate("location", e),
1605
+ onBlur: (e) => handleInputUpdate("location", e),
1606
+ "aria-required": true,
1607
+ "aria-invalid": Boolean(formErrors.location),
1608
+ isValid: !formErrors.location
1609
+ })
1610
+ }),
1611
+ /* @__PURE__ */ jsx(Field, {
1612
+ el: "fieldset",
1613
+ name: "amount",
1614
+ label: sofT(($) => $["investmentAmount"]),
1615
+ errorMessage: formErrors.amount,
1616
+ isValid: !formErrors.amount,
1617
+ children: (childProps) => /* @__PURE__ */ jsxs(InputGroup, {
1618
+ ...childProps,
1619
+ id: "currencyGroup",
1620
+ isFocused,
1621
+ children: [/* @__PURE__ */ jsx(Select, {
1622
+ minimal: true,
1623
+ name: "currency",
1624
+ "aria-label": commonT(($) => $["currency"]),
1625
+ isMulti: false,
1626
+ items: allowedCurrencies,
1627
+ selected: formData?.amount?.currency,
1628
+ placeholder: commonT(($) => $["select"]),
1629
+ onChange: (e) => handleInputUpdate("currency", e)
1630
+ }), /* @__PURE__ */ jsx(InputText, {
1631
+ ...childProps,
1632
+ name: "amount",
1633
+ value: formData?.amount?.value,
1634
+ onInput: (e) => handleInputUpdate("amount", e),
1635
+ onBlur: handleOnAmountBlur,
1636
+ "aria-required": true,
1637
+ onFocusHandler: () => setIsFocused(true)
1638
+ })]
1639
+ })
1640
+ })
1641
+ ]
1642
+ }),
1643
+ /* @__PURE__ */ jsxs("div", {
1644
+ className: SourceOfFunds_module_default.sourceOfFundsFinancierFooter,
1645
+ children: [/* @__PURE__ */ jsx(Button, {
1646
+ onClick: handleFinancierSave,
1647
+ children: commonT(($) => $["save"])
1648
+ }), Number.isFinite(indexNumber) && /* @__PURE__ */ jsx(Button, {
1649
+ variant: "tertiary",
1650
+ onClick: () => setConfirmOpen(true),
1651
+ children: sofT(($) => $["deleteInvestorDetails"])
1652
+ })]
1653
+ })
1654
+ ]
1655
+ })
1656
+ }), confirmOpen && /* @__PURE__ */ jsx(Confirm, {
1657
+ title: sofT(($) => $["areYouSureYouWantToDeleteThisInvestorDetails"]),
1658
+ confirmText: commonT(($) => $["delete"]),
1659
+ onConfirm: handleFinancierDelete,
1660
+ onCancel: () => setConfirmOpen(false),
1661
+ critical: true
1662
+ })] });
1663
+ };
1664
+ //#endregion
1665
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SOFAdditionalData/AdditionalDataForThirdParty.tsx
1666
+ function AdditionalDataForThirdParty(props) {
1667
+ const [showFinancierModal, setShowFinancierModal] = useState$1(false);
1668
+ const [activeFinancier, setActiveFinancier] = useState$1();
1669
+ const [activeIndex, setActiveIndex] = useState$1();
1670
+ const { data, fieldProblems, errors, handleChangeFor, formUtils, valid } = props;
1671
+ const { t: sofT } = useTranslation("sof");
1672
+ const handleToggleFinancierModal = () => {
1673
+ setActiveFinancier(void 0);
1674
+ setActiveIndex(void 0);
1675
+ setShowFinancierModal((prev) => !prev);
1676
+ };
1677
+ const handleShowUpdateFinancierModal = (index) => {
1678
+ if (!data.financiers) return;
1679
+ const financier = data.financiers[index];
1680
+ setActiveFinancier(financier);
1681
+ setActiveIndex(index);
1682
+ setShowFinancierModal(true);
1683
+ };
1684
+ const handleFinancierUpdate = ({ formData, indexNumber }) => {
1685
+ const existingFinanciers = data.financiers || [];
1686
+ let newFinanciers = [];
1687
+ if (!formData) {
1688
+ if (indexNumber !== void 0) newFinanciers = existingFinanciers.filter((_, index) => index !== indexNumber);
1689
+ } else {
1690
+ newFinanciers = [...existingFinanciers, formData];
1691
+ if (Number.isFinite(indexNumber)) newFinanciers = existingFinanciers.map((existingFinancier, i) => i === indexNumber ? formData : existingFinancier);
1692
+ }
1693
+ const financierEvent = { target: {
1694
+ name: "financiers",
1695
+ value: newFinanciers
1696
+ } };
1697
+ handleChangeFor("financiers")(financierEvent);
1698
+ };
1699
+ const errorMessage = formUtils.getErrorMessage("financiers", errors, fieldProblems);
1700
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
1701
+ errors.financiers && !valid.financiers && /* @__PURE__ */ jsx(Alert, {
1702
+ title: errorMessage?.message,
1703
+ variant: "error",
1704
+ className: SourceOfFunds_module_default.sourceOfFundsSofFinancierFormError,
1705
+ children: sofT(($) => $["addAtLeastOneInvestor"])
1706
+ }),
1707
+ data.financiers?.map((financier, index) => /* @__PURE__ */ jsxs("button", {
1708
+ type: "button",
1709
+ onClick: () => handleShowUpdateFinancierModal(index),
1710
+ className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingFinancierGroup,
1711
+ children: [/* @__PURE__ */ jsxs("div", {
1712
+ className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAvatarGroup,
1713
+ children: [/* @__PURE__ */ jsx(Avatar, {
1714
+ iconName: "user",
1715
+ circle: true
1716
+ }), /* @__PURE__ */ jsxs("div", {
1717
+ className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAddressGroup,
1718
+ children: [/* @__PURE__ */ jsxs(Typography, {
1719
+ el: "div",
1720
+ variant: "body-strongest",
1721
+ children: [
1722
+ financier.firstName,
1723
+ " ",
1724
+ financier.lastName
1725
+ ]
1726
+ }), /* @__PURE__ */ jsx(Typography, {
1727
+ el: "div",
1728
+ variant: "caption",
1729
+ children: financier.location
1730
+ })]
1731
+ })]
1732
+ }), /* @__PURE__ */ jsx("div", { children: financier.amount?.currency && financier.amount?.value ? formatAmountWithCurrency(financier.amount.value, financier.amount?.currency) : "" })]
1733
+ }, index)),
1734
+ /* @__PURE__ */ jsx("button", {
1735
+ type: "button",
1736
+ className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingFinancierGroup,
1737
+ onClick: handleToggleFinancierModal,
1738
+ children: /* @__PURE__ */ jsxs("div", {
1739
+ className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAvatarGroup,
1740
+ children: [/* @__PURE__ */ jsx(Avatar, {
1741
+ iconName: "plus",
1742
+ variant: "tertiary",
1743
+ circle: true
1744
+ }), /* @__PURE__ */ jsx(Typography, {
1745
+ el: "div",
1746
+ variant: "body-strongest",
1747
+ children: sofT(($) => $["addInvestor"])
1748
+ })]
1749
+ })
1750
+ }),
1751
+ showFinancierModal && /* @__PURE__ */ jsx(SOFFinancierModal, {
1752
+ financier: activeFinancier,
1753
+ indexNumber: activeIndex,
1754
+ handleModalClose: handleToggleFinancierModal,
1755
+ handleFinancierUpdate
1756
+ })
1757
+ ] });
1758
+ }
1759
+ //#endregion
1760
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsAdditionalData.tsx
1761
+ function SourceOfFundsAdditionalData(props) {
1762
+ const { t } = useTranslation("common");
1763
+ const { form } = useFormContext();
1764
+ const { handleChangeFor: multiFormHandleChangeFor, data: { additionalData: data, sourceOfFundsType }, errors: { additionalData: errors }, valid: { additionalData: valid }, fieldProblems: { additionalData: fieldProblems } } = form;
1765
+ const handleChangeFor = useMemo$1(() => (key, mode) => multiFormHandleChangeFor("additionalData", key, mode), [multiFormHandleChangeFor]);
1766
+ const handleAmountChange = (key) => (e) => {
1767
+ const rawValue = e.target.value;
1768
+ const updatedAmount = {
1769
+ ...data?.amount,
1770
+ ...key === "currency" ? { currency: rawValue } : { value: rawValue === "" ? void 0 : Number(rawValue) }
1771
+ };
1772
+ handleChangeFor("amount")(updatedAmount);
1773
+ };
1774
+ const formUtils = createFormUtils(props, t);
1775
+ const additionalDataProps = {
1776
+ formUtils,
1777
+ handleChangeFor,
1778
+ data,
1779
+ errors,
1780
+ valid,
1781
+ fieldProblems,
1782
+ handleAmountChange
1783
+ };
1784
+ const renderSubForms = () => {
1785
+ switch (sourceOfFundsType?.type) {
1786
+ case "gamblingWinnings": return /* @__PURE__ */ jsx(AdditionalDataForGambling, { ...additionalDataProps });
1787
+ case "cryptocurrencyIncome": return /* @__PURE__ */ jsx(AdditionalDataForCryptocurrency, { ...additionalDataProps });
1788
+ case "business": return /* @__PURE__ */ jsx(AdditionalDataForBusiness, { ...additionalDataProps });
1789
+ case "assetSale": return /* @__PURE__ */ jsx(AdditionalDataForAssetSale, { ...additionalDataProps });
1790
+ case "thirdPartyFunding": return /* @__PURE__ */ jsx(AdditionalDataForThirdParty, { ...additionalDataProps });
1791
+ case "inheritance": return /* @__PURE__ */ jsx(AdditionalDataForInheritance, { ...additionalDataProps });
1792
+ case "donations": return /* @__PURE__ */ jsx(AdditionalDataForDonation, { ...additionalDataProps });
1793
+ default: return null;
1794
+ }
1795
+ };
1796
+ return /* @__PURE__ */ jsxs("form", {
1797
+ className: SourceOfFunds_module_default.sourceOfFundsAdditionalDataForm,
1798
+ children: [/* @__PURE__ */ jsx(ErrorPanel, {
1799
+ verificationErrors: props?.formVerificationErrors,
1800
+ validationErrors: props?.fieldValidationErrors,
1801
+ formUtils,
1802
+ id: "ariaErrorField"
1803
+ }), renderSubForms()]
1804
+ });
1805
+ }
1806
+ //#endregion
1807
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsType.tsx
1808
+ function SourceOfFundsType(props) {
1809
+ const { t } = useTranslation(["common", "sof"]);
1810
+ const { data: formData, categories, errors: formErrors, fieldValidationErrors: formFieldProblems, sameAsOption, useSameAs, onUseSameAsChange } = props;
1811
+ const { form } = useFormContext();
1812
+ const { handleChangeFor } = form;
1813
+ const handleFieldChange = (fieldName, mode) => handleChangeFor("sourceOfFundsType", fieldName, mode);
1814
+ const handleUseSameAsChange = (isChecked) => {
1815
+ onUseSameAsChange?.(isChecked);
1816
+ };
1817
+ const formUtils = createFormUtils(props, t);
1818
+ const categoryItems = [{
1819
+ value: "adyen",
1820
+ label: t(($) => $["transactionsOnThisPlatform"], { ns: "sof" }),
1821
+ icon: getIconById("adyen")
1822
+ }, ...categories?.map((item) => ({
1823
+ value: item.id,
1824
+ label: t(($) => $[sofCategoryItemMapper[item.name]], { ns: "sof" }),
1825
+ icon: getIconById(item.id)
1826
+ })) ?? []];
1827
+ const errorMessage = formUtils.getErrorMessage("type", formErrors, formFieldProblems);
1828
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [sameAsOption && /* @__PURE__ */ jsx("div", {
1829
+ className: SourceOfFunds_module_default.sourceOfFundsSameAsCheckbox,
1830
+ children: /* @__PURE__ */ jsx(Field, {
1831
+ name: "useSameAs",
1832
+ children: (childProps) => /* @__PURE__ */ jsx(Checkbox, {
1833
+ ...childProps,
1834
+ "aria-required": false,
1835
+ "aria-invalid": false,
1836
+ name: "useSameAs",
1837
+ label: t(($) => $["alwaysUseThisFundingSource"], { ns: "sof" }),
1838
+ checked: Boolean(useSameAs),
1839
+ onChange: handleUseSameAsChange
1840
+ })
1841
+ })
1842
+ }), /* @__PURE__ */ jsx(Field, {
1843
+ el: "fieldset",
1844
+ name: "type",
1845
+ children: () => /* @__PURE__ */ jsx(TileGroup, {
1846
+ name: "type",
1847
+ tiles: categoryItems,
1848
+ errorMessage,
1849
+ selected: formData?.type ? formData.type : [],
1850
+ onChange: (e) => handleFieldChange("type", "input")(e)
1851
+ })
1852
+ })] });
1853
+ }
1854
+ function getIconById(id) {
1855
+ switch (id) {
1856
+ case "adyen": return "store";
1857
+ case "business": return "revenue-accelerate";
1858
+ case "assetSale": return "house";
1859
+ case "dividendIncome": return "graph-up";
1860
+ case "thirdPartyFunding": return "graph";
1861
+ case "employment": return "headquarter";
1862
+ case "donations": return "gift";
1863
+ case "inheritance": return "certificate";
1864
+ case "financialAid": return "capital";
1865
+ case "rentalIncome": return "house";
1866
+ case "royaltyIncome": return "cash-stack";
1867
+ case "pensionIncome": return "bank";
1868
+ case "insuranceSettlement": return "funds-in";
1869
+ case "cryptocurrencyIncome": return "coins";
1870
+ case "loans": return "capital";
1871
+ case "gamblingWinnings": return "cash-stack";
1872
+ default: return "contract";
1873
+ }
1874
+ }
1875
+ //#endregion
1876
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFunds.tsx
1877
+ function SourceOfFunds(props) {
1878
+ const { activeForm, activeBusinessLine, sourceOfFundsType, sameAsOption, useSameAs, onUseSameAsChange } = props;
1879
+ const { form } = useFormContext();
1880
+ const { data: formData, errors, valid, fieldProblems: fieldValidationErrors } = form;
1881
+ const { data: sourceOfFundsTypesData, isLoading } = useSourceOfFundsTypes();
1882
+ const { t: sofT } = useTranslation("sof");
1883
+ const pageHeadings = useMemo$1(() => getPageHeadings(sourceOfFundsType ?? "adyen"), [sourceOfFundsType]);
1884
+ return isLoading || !activeBusinessLine ? /* @__PURE__ */ jsx("div", {
1885
+ className: SourceOfFunds_module_default.sourceOfFundsWrapperLoading,
1886
+ children: /* @__PURE__ */ jsx(Loader, {})
1887
+ }) : /* @__PURE__ */ jsxs("div", { children: [
1888
+ /* @__PURE__ */ jsxs("div", {
1889
+ className: SourceOfFunds_module_default.sourceOfFundsWrapperHeading,
1890
+ children: [/* @__PURE__ */ jsx(Typography, {
1891
+ el: "h1",
1892
+ variant: "title-l",
1893
+ children: activeForm?.formId === "additionalData" ? sofT(($) => $[pageHeadings.heading]) : sofT(($) => $["selectASourceOfFunding"], { type: getServiceTranslationSelectTitle(sofT, activeBusinessLine?.service || "").toLowerCase() })
1894
+ }), /* @__PURE__ */ jsxs(Typography, {
1895
+ className: SourceOfFunds_module_default.sourceOfFundsWrapperDescription,
1896
+ children: [activeForm?.formId === "additionalData" && pageHeadings.description && sofT(($) => $[pageHeadings.description]), sourceOfFundsTypesData?.length === 0 && sofT(($) => $["noCategoriesAvailable"])]
1897
+ })]
1898
+ }),
1899
+ sofErrorMessage.value && /* @__PURE__ */ jsxs(Typography, {
1900
+ variant: "caption",
1901
+ color: "critical",
1902
+ "aria-live": "polite",
1903
+ className: "u-justify-content-center u-display-flex",
1904
+ children: [/* @__PURE__ */ jsx(Icon, {
1905
+ name: "field-error",
1906
+ className: "u-margin-right-2"
1907
+ }), /* @__PURE__ */ jsx("span", { children: sofErrorMessage.value })]
1908
+ }),
1909
+ activeForm?.formId === "sourceOfFundsType" && /* @__PURE__ */ jsx(SourceOfFundsType, {
1910
+ categories: sourceOfFundsTypesData,
1911
+ data: formData?.sourceOfFundsType,
1912
+ errors: errors?.sourceOfFundsType,
1913
+ valid: valid?.sourceOfFundsType,
1914
+ fieldValidationErrors: fieldValidationErrors?.sourceOfFundsType,
1915
+ sameAsOption,
1916
+ useSameAs,
1917
+ onUseSameAsChange
1918
+ }),
1919
+ activeForm?.formId === "additionalData" && /* @__PURE__ */ jsx(SourceOfFundsAdditionalData, { fieldValidationErrors: fieldValidationErrors?.additionalData }),
1920
+ activeForm?.formId === "companySourceOfFunds" && /* @__PURE__ */ jsx("div", { children: sofT(($) => $["uploadADocument"]) })
1921
+ ] });
1922
+ }
1923
+ //#endregion
1924
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsGettingStarted/SourceOfFundsGettingStartedCard.tsx
1925
+ function SourceOfFundsGettingStartedCard(props) {
1926
+ const { id, title, onClick, isEdit, meta } = props;
1927
+ const { t: commonT } = useTranslation("common");
1928
+ return /* @__PURE__ */ jsxs(Card, {
1929
+ variant: "secondary",
1930
+ children: [/* @__PURE__ */ jsxs("div", {
1931
+ className: SourceOfFunds_module_default.sourceOfFundsGettingStartedCardsCardHeader,
1932
+ children: [/* @__PURE__ */ jsx(Typography, {
1933
+ el: "h3",
1934
+ variant: "title",
1935
+ children: title
1936
+ }), isEdit ? /* @__PURE__ */ jsx(IconButton, {
1937
+ ariaLabel: "edit",
1938
+ icon: "edit",
1939
+ onClick,
1940
+ variant: "tertiary"
1941
+ }) : /* @__PURE__ */ jsx(Button, {
1942
+ variant: "primary",
1943
+ testId: "source-of-funds-getting-card-secondary-button",
1944
+ onClick,
1945
+ children: commonT(($) => $["start"])
1946
+ })]
1947
+ }), isEdit && meta?.length && /* @__PURE__ */ jsx("div", {
1948
+ className: SourceOfFunds_module_default.sourceOfFundsGettingStartedCardsCardBody,
1949
+ children: /* @__PURE__ */ jsx(StructuredList, {
1950
+ className: SourceOfFunds_module_default.sourceOfFundsGettingStartedCardsCardDescription,
1951
+ items: meta
1952
+ })
1953
+ })]
1954
+ }, id);
1955
+ }
1956
+ //#endregion
1957
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsGettingStarted/SourceOfFundsGettingStarted.tsx
1958
+ var digitalWallet = lazy(() => import("./digital-wallet-ByQCwU-K.js"));
1959
+ var SourceOfFundsGettingStarted = ({ handleGettingStartedClick, handleCancelClick, handleSourceOfFundsClick, businessLines, handleNavigateToUploadPage, problems, legalEntity, asAwe, isSoFDocumentMissing }) => {
1960
+ const { t: sofT } = useTranslation("sof");
1961
+ const { t: commonT } = useTranslation("common");
1962
+ const hasSourceOfFunds = businessLines?.some((businessLine) => !isEmpty(businessLine.sourceOfFunds));
1963
+ const { data: taskStatusResponse } = useTaskStatus(TaskTypes.SOURCE_OF_FUNDS, { refetchInterval: TASK_STATUS_POLLING_INTERVAL_MS });
1964
+ const sofDocuments = useMemo$1(() => legalEntity?.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [], [legalEntity]);
1965
+ const mapBusinessLines = useCallback$1((lines) => {
1966
+ const completedBusinessLines = businessLines.every((line) => line?.sourceOfFunds?.type);
1967
+ const cards = lines.map((line) => {
1968
+ const SoF = mapSourceOfFundToSourceOfFundsSchema(line);
1969
+ return {
1970
+ title: getServiceTranslation(sofT, line.service || ""),
1971
+ type: line?.sourceOfFunds?.type,
1972
+ isEdit: !!line?.sourceOfFunds?.type || !!line?.sourceOfFunds?.adyenProcessedFunds,
1973
+ onClick: () => handleSourceOfFundsClick(SoF, line),
1974
+ meta: [{
1975
+ term: sofT(($) => $["sourceOfFunds"]),
1976
+ details: getSofCardDetails(sofT, line?.sourceOfFunds)
1977
+ }, ...getGettingStartedCardDetails(getAdditionalDataSchemaKeys(line?.sourceOfFunds?.type || "adyen", line?.sourceOfFunds?.originatorType), sofT, line?.sourceOfFunds)]
1978
+ };
1979
+ }).sort((a) => a?.type ? 1 : -1);
1980
+ const uploadCard = {
1981
+ title: getServiceTranslation(sofT),
1982
+ type: "",
1983
+ isEdit: !!sofDocuments?.length,
1984
+ onClick: handleNavigateToUploadPage,
1985
+ meta: sofDocuments?.length ? sofDocuments.map((doc) => ({
1986
+ term: sofT(($) => $["fileName"]),
1987
+ details: [doc?.fileName, /* @__PURE__ */ jsx(Typography, {
1988
+ color: "secondary",
1989
+ children: parseSOFDocumentDescription(sofT, doc?.description) || ""
1990
+ }, "docDescription")]
1991
+ })) : []
1992
+ };
1993
+ if (completedBusinessLines && (isSoFDocumentMissing || sofDocuments?.length)) if (uploadCard.meta?.length) cards.push(uploadCard);
1994
+ else cards.unshift(uploadCard);
1995
+ return cards.map((item, index) => {
1996
+ return /* @__PURE__ */ jsx(SourceOfFundsGettingStartedCard, {
1997
+ id: index,
1998
+ isEdit: !!item.isEdit,
1999
+ title: item.title,
2000
+ onClick: item.onClick,
2001
+ meta: item.meta
2002
+ }, index);
2003
+ });
2004
+ }, [handleSourceOfFundsClick, sofDocuments]);
2005
+ const errorObjects = useMemo$1(() => getRelevantErrors(problems, SOF_INVALID_INPUT_ERROR_CODES), [problems]);
2006
+ return /* @__PURE__ */ jsxs("div", {
2007
+ className: asAwe ? SourceOfFunds_module_default.sourceOfFundsGettingStartedAwe : SourceOfFunds_module_default.sourceOfFundsGettingStarted,
2008
+ "data-testid": "source-of-funds-getting-started",
2009
+ children: [!hasSourceOfFunds && /* @__PURE__ */ jsx(LandingLayout, {
2010
+ media: /* @__PURE__ */ jsx(Image, { lazyLoadedImage: digitalWallet }),
2011
+ title: sofT(($) => $["fundingSourcesForFinancialProducts"]),
2012
+ description: sofT(($) => $["inTheNextStepWellCollectInformation"]),
2013
+ actions: /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Button, {
2014
+ fullWidth: true,
2015
+ testId: "source-of-funds-getting-primary-button",
2016
+ onClick: handleGettingStartedClick,
2017
+ children: commonT(($) => $["getStarted"])
2018
+ }), handleCancelClick && /* @__PURE__ */ jsx(Button, {
2019
+ variant: "tertiary",
2020
+ fullWidth: true,
2021
+ testId: "source-of-funds-getting-cancel-button",
2022
+ onClick: handleCancelClick,
2023
+ children: commonT(($) => $["backToTaskList"])
2024
+ })] })
2025
+ }), hasSourceOfFunds && /* @__PURE__ */ jsxs(Fragment$1, { children: [
2026
+ /* @__PURE__ */ jsx(Header, {
2027
+ title: sofT(($) => $["fundingSourcesForFinancialProducts"]),
2028
+ description: sofT(($) => $["addAllSourcesOfFundsBeingUsed"]),
2029
+ status: asAwe ? void 0 : taskStatusResponse?.status,
2030
+ align: "center"
2031
+ }),
2032
+ errorObjects && errorObjects.map((errorObj, index) => {
2033
+ const uniqueActions = getUniqueRemediationActions(errorObj);
2034
+ const errorItems = errorObj.subErrors?.map((subError) => subError.message) || [];
2035
+ return /* @__PURE__ */ jsxs(Alert, {
2036
+ title: errorObj.message,
2037
+ className: SourceOfFunds_module_default.sourceOfFundsGettingStartedError,
2038
+ variant: "error",
2039
+ children: [errorObj?.subErrors?.length && /* @__PURE__ */ jsx("ul", { children: errorItems.map((item, i) => /* @__PURE__ */ jsx("li", { children: item }, i)) }), uniqueActions.length > 0 && /* @__PURE__ */ jsx("div", {
2040
+ className: SourceOfFunds_module_default.sourceOfFundsGettingStartedErrorActions,
2041
+ children: uniqueActions.filter((action) => action.code !== "1_519").map((action, i) => /* @__PURE__ */ jsx(Button, {
2042
+ variant: "tertiary",
2043
+ testId: `remediate-action-${i}`,
2044
+ onClick: handleNavigateToUploadPage,
2045
+ children: action.message ?? ""
2046
+ }, `action-${i}`))
2047
+ })]
2048
+ }, `error-${index}`);
2049
+ }),
2050
+ /* @__PURE__ */ jsx("div", {
2051
+ className: SourceOfFunds_module_default.sourceOfFundsGettingStartedCards,
2052
+ children: /* @__PURE__ */ jsx(StackLayout, { children: mapBusinessLines(businessLines) })
2053
+ }),
2054
+ handleCancelClick && /* @__PURE__ */ jsx(Button, {
2055
+ variant: "secondary",
2056
+ testId: "source-of-funds-getting-return-button",
2057
+ onClick: handleCancelClick,
2058
+ children: commonT(($) => $["backToTaskList"])
2059
+ })
2060
+ ] })]
2061
+ });
2062
+ };
2063
+ //#endregion
2064
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsUploader/SOFUploadModal.tsx
2065
+ var SOFUploadModal = (props) => {
2066
+ const { showToast } = useToastContext();
2067
+ const logger = createLogger();
2068
+ const { t: sofT } = useTranslation("sof");
2069
+ const { t: commonT } = useTranslation("common");
2070
+ const { businessLines, handleModalClose, documentUtils } = props;
2071
+ const [selectedService, setSelectedService] = useState$1(businessLines?.length === 1 ? businessLines?.[0]?.service : void 0);
2072
+ const [documentType, setDocumentType] = useState$1();
2073
+ const onRadioChange = (selectedId) => {
2074
+ setSelectedService(selectedId);
2075
+ setDocumentType(void 0);
2076
+ };
2077
+ const onDocumentTypeChange = (e) => {
2078
+ setDocumentType(e.target.value);
2079
+ };
2080
+ const serviceRadioItems = useMemo$1(() => {
2081
+ return Array.from(new Map(businessLines.map((businessLine) => [businessLine.service, businessLine])).values()).map((businessLine) => ({
2082
+ id: businessLine.service,
2083
+ name: sofT(($) => $[getServiceTranslationKey(businessLine?.service || "")])
2084
+ }));
2085
+ }, [businessLines, sofT]);
2086
+ const canUpload = useMemo$1(() => selectedService && documentType, [selectedService, documentType]);
2087
+ const selectedBusinessLineId = businessLines?.find((businessLine) => businessLine.service === selectedService)?.id || "";
2088
+ const documentLists = useMemo$1(() => {
2089
+ const selectedType = businessLines?.find((businessLine) => businessLine.service === selectedService)?.sourceOfFunds?.type;
2090
+ if (selectedType) return getDocumentLists(selectedType).map((list) => ({
2091
+ id: list,
2092
+ name: sofT(($) => $[list])
2093
+ }));
2094
+ return [];
2095
+ }, [
2096
+ businessLines,
2097
+ sofT,
2098
+ selectedService
2099
+ ]);
2100
+ const documentRequirements = useMemo$1(() => {
2101
+ return documentType ? getDocumentRequirements[documentType] : [];
2102
+ }, [documentType]);
2103
+ const onFileUpload = async (files) => {
2104
+ if (!canUpload) {
2105
+ showToast({
2106
+ label: sofT(($) => $["unableToUploadDocument"]),
2107
+ variant: "error"
2108
+ });
2109
+ return;
2110
+ }
2111
+ const formattedDocument = await createDocumentRequest({
2112
+ entityId: selectedBusinessLineId,
2113
+ entityType: "businessLine",
2114
+ documentType: "proofOfFundingOrWealthSource",
2115
+ page1: files[0],
2116
+ description: `$SERVICE_NAME:${selectedService}--TYPE_NAME:${documentType}`
2117
+ });
2118
+ if (formattedDocument) try {
2119
+ await documentUtils.uploadDocuments([formattedDocument], selectedBusinessLineId);
2120
+ showToast({
2121
+ label: sofT(($) => $["documentUploadedSuccessfully"]),
2122
+ variant: "success",
2123
+ duration: 1e4
2124
+ });
2125
+ handleModalClose();
2126
+ } catch (e) {
2127
+ logger.log(e);
2128
+ showToast({
2129
+ label: sofT(($) => $["unableToUploadDocument"]),
2130
+ variant: "error"
2131
+ });
2132
+ }
2133
+ };
2134
+ return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Modal, {
2135
+ onClose: handleModalClose,
2136
+ ariaLabel: sofT(($) => $["uploadASupportingDocument"]),
2137
+ inset: true,
2138
+ children: /* @__PURE__ */ jsxs("div", {
2139
+ className: SourceOfFunds_module_default.sourceOfFundsModal,
2140
+ children: [/* @__PURE__ */ jsx(Typography, {
2141
+ variant: "title-l",
2142
+ el: "h2",
2143
+ children: sofT(($) => $["uploadASupportingDocument"])
2144
+ }), /* @__PURE__ */ jsxs("div", {
2145
+ className: SourceOfFunds_module_default.sourceOfFundsUploadModalContent,
2146
+ children: [
2147
+ businessLines?.length > 1 ? /* @__PURE__ */ jsx(Field, {
2148
+ el: "fieldset",
2149
+ name: "service",
2150
+ className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentField,
2151
+ label: sofT(($) => $["whatFinancialProductIsThisFor"]),
2152
+ children: (childProps) => /* @__PURE__ */ jsx(RadioGroup, {
2153
+ ...childProps,
2154
+ name: "service",
2155
+ className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentFieldRadioGroup,
2156
+ items: serviceRadioItems,
2157
+ value: selectedService,
2158
+ disabled: false,
2159
+ onChange: onRadioChange,
2160
+ "aria-required": true
2161
+ })
2162
+ }) : null,
2163
+ selectedService && /* @__PURE__ */ jsx(Field, {
2164
+ name: "documentType",
2165
+ label: commonT(($) => $["documentType"]),
2166
+ "data-testid": "documentType",
2167
+ className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentField,
2168
+ children: (childProps) => /* @__PURE__ */ jsx(Select, {
2169
+ ...childProps,
2170
+ name: "documentType",
2171
+ placeholder: commonT(($) => $["selectOne"]),
2172
+ selected: documentType,
2173
+ items: documentLists,
2174
+ onChange: onDocumentTypeChange
2175
+ })
2176
+ }),
2177
+ documentRequirements?.length ? /* @__PURE__ */ jsxs("div", {
2178
+ className: SourceOfFunds_module_default.sourceOfFundsUploadModalContentRequirementsContainer,
2179
+ children: [/* @__PURE__ */ jsx(Typography, {
2180
+ variant: "body-strongest",
2181
+ el: "div",
2182
+ children: sofT(($) => $["documentShouldShow"])
2183
+ }), /* @__PURE__ */ jsx("ul", { children: documentRequirements?.map((requirement) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Typography, {
2184
+ variant: "body-stronger",
2185
+ el: "div",
2186
+ children: sofT(($) => $[requirement])
2187
+ }) }, requirement)) })]
2188
+ }) : null,
2189
+ canUpload && /* @__PURE__ */ jsx(Dropzone, {
2190
+ disabled: !canUpload,
2191
+ onChange: onFileUpload,
2192
+ showMinimal: true,
2193
+ hidePageCount: true,
2194
+ maxSize: 4194304,
2195
+ enableTracking: true,
2196
+ name: "documentField",
2197
+ allowedFileTypes: [
2198
+ "JPG",
2199
+ "JPEG",
2200
+ "PNG",
2201
+ "PDF"
2202
+ ]
2203
+ })
2204
+ ]
2205
+ })]
2206
+ })
2207
+ }) });
2208
+ };
2209
+ //#endregion
2210
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsUploader/SourceOfFundsUpload.tsx
2211
+ var SourceOfFundsUpload = ({ businessLines, documentUtils, legalEntity, handleNavigateToSummary }) => {
2212
+ const [showUploadModal, setShowUploadModal] = useState$1(false);
2213
+ const [docToDelete, setDocToDelete] = useState$1(void 0);
2214
+ const { showToast } = useToastContext();
2215
+ const logger = createLogger();
2216
+ const queryClient = useQueryClient();
2217
+ const { t: sofT } = useTranslation("sof");
2218
+ const { t: commonT } = useTranslation("common");
2219
+ const handleModalClose = async () => {
2220
+ setShowUploadModal(false);
2221
+ await queryClient.invalidateQueries({ queryKey: ["legalEntity", legalEntity.id] });
2222
+ };
2223
+ const openUploadModal = () => {
2224
+ setShowUploadModal(true);
2225
+ };
2226
+ const documents = useMemo$1(() => legalEntity.documentDetails?.filter((doc) => doc.type === "proofOfFundingOrWealthSource") ?? [], [legalEntity]);
2227
+ const sourceOfFundsCategories = businessLines?.map((line) => line.sourceOfFunds?.type)?.filter(Boolean);
2228
+ const getTranslatedCategoryName = (categoryKey) => {
2229
+ const translationKey = sofCategoryItemMapper[categoryKey];
2230
+ if (!categoryKey || !translationKey) return "";
2231
+ return sofT(($) => $[translationKey]).toLowerCase();
2232
+ };
2233
+ let translationKey;
2234
+ let translationParams;
2235
+ if (sourceOfFundsCategories?.length > 1) {
2236
+ translationKey = "weNeedProofOfFundingForMultipleCategories";
2237
+ translationParams = {
2238
+ category1_name: getTranslatedCategoryName(sourceOfFundsCategories[0]),
2239
+ category2_name: getTranslatedCategoryName(sourceOfFundsCategories[1])
2240
+ };
2241
+ } else if (sourceOfFundsCategories?.length === 1) {
2242
+ translationKey = "weNeedProofOfFunding";
2243
+ translationParams = { category_name: getTranslatedCategoryName(sourceOfFundsCategories[0]) };
2244
+ } else translationKey = "weNeedProofOfFundingForNoCategory";
2245
+ const handleFileDelete = async (documentId) => {
2246
+ if (!documentId) return;
2247
+ if (documentUtils.deleteDocument) try {
2248
+ await documentUtils.deleteDocument(documentId, legalEntity.id);
2249
+ await queryClient.invalidateQueries({ queryKey: ["legalEntity", legalEntity.id] });
2250
+ showToast({
2251
+ label: sofT(($) => $["documentDeletedSuccessfully"]),
2252
+ variant: "success",
2253
+ duration: 1e4
2254
+ });
2255
+ } catch (e) {
2256
+ logger.log(e);
2257
+ showToast({
2258
+ label: sofT(($) => $["unableToDeleteDocument"]),
2259
+ variant: "error"
2260
+ });
2261
+ }
2262
+ };
2263
+ return /* @__PURE__ */ jsxs("div", {
2264
+ className: SourceOfFunds_module_default.sourceOfFundsUploadList,
2265
+ children: [
2266
+ /* @__PURE__ */ jsxs("div", {
2267
+ className: SourceOfFunds_module_default.sourceOfFundsUploadListHeading,
2268
+ children: [/* @__PURE__ */ jsx(Typography, {
2269
+ el: "h1",
2270
+ variant: "title-l",
2271
+ children: sofT(($) => $["supportingDocuments"])
2272
+ }), /* @__PURE__ */ jsx(Typography, {
2273
+ className: SourceOfFunds_module_default.sourceOfFundsWrapperDescription,
2274
+ children: sofT(($) => $[translationKey], translationParams)
2275
+ })]
2276
+ }),
2277
+ documents?.map((document) => /* @__PURE__ */ jsxs("div", {
2278
+ className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingFinancierGroup,
2279
+ children: [/* @__PURE__ */ jsxs("div", {
2280
+ className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAvatarGroup,
2281
+ children: [/* @__PURE__ */ jsx(Avatar, {
2282
+ iconName: "document",
2283
+ circle: true
2284
+ }), /* @__PURE__ */ jsxs("div", {
2285
+ className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAddressGroup,
2286
+ children: [/* @__PURE__ */ jsx(Typography, {
2287
+ el: "div",
2288
+ variant: "body-strongest",
2289
+ children: document.fileName
2290
+ }), /* @__PURE__ */ jsx(Typography, {
2291
+ el: "div",
2292
+ variant: "caption",
2293
+ children: parseSOFDocumentDescription(sofT, document.description)
2294
+ })]
2295
+ })]
2296
+ }), /* @__PURE__ */ jsx(IconButton, {
2297
+ ariaLabel: commonT(($) => $["deleteDocument"]),
2298
+ variant: "tertiary",
2299
+ icon: "cross",
2300
+ onClick: () => setDocToDelete(document),
2301
+ testId: "source-of-funds-remove-button"
2302
+ })]
2303
+ }, document.id)),
2304
+ /* @__PURE__ */ jsx("button", {
2305
+ type: "button",
2306
+ className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingFinancierGroup,
2307
+ onClick: openUploadModal,
2308
+ "data-testId": "source-of-funds-upload-button",
2309
+ children: /* @__PURE__ */ jsxs("div", {
2310
+ className: SourceOfFunds_module_default.sourceOfFundsThirdPartyFundingNameAvatarGroup,
2311
+ children: [/* @__PURE__ */ jsx(Avatar, {
2312
+ label: sofT(($) => $["addDocument"]),
2313
+ iconName: "plus",
2314
+ circle: true
2315
+ }), /* @__PURE__ */ jsx(Typography, {
2316
+ el: "div",
2317
+ variant: "body-strongest",
2318
+ children: sofT(($) => $["addDocument"])
2319
+ })]
2320
+ })
2321
+ }),
2322
+ handleNavigateToSummary && /* @__PURE__ */ jsx("div", {
2323
+ className: SourceOfFunds_module_default.sourceOfFundsGettingStartedActions,
2324
+ children: /* @__PURE__ */ jsx(Button, {
2325
+ variant: "secondary",
2326
+ onClick: handleNavigateToSummary,
2327
+ children: documents?.length > 0 ? commonT(($) => $["finish"]) : commonT(($) => $["cancel"])
2328
+ })
2329
+ }),
2330
+ !!docToDelete && /* @__PURE__ */ jsx(Confirm, {
2331
+ title: sofT(($) => $["areYouSureYouWantToDeleteThisDocument"], { documentName: docToDelete?.fileName || "" }),
2332
+ confirmText: commonT(($) => $["delete"]),
2333
+ onConfirm: () => handleFileDelete(docToDelete?.id),
2334
+ onCancel: () => setDocToDelete(void 0),
2335
+ critical: true
2336
+ }),
2337
+ showUploadModal && /* @__PURE__ */ jsx(SOFUploadModal, {
2338
+ documentUtils,
2339
+ handleModalClose,
2340
+ businessLines
2341
+ })
2342
+ ]
2343
+ });
2344
+ };
2345
+ //#endregion
2346
+ //#region src/utils/urlUtils.ts
2347
+ function canParseUrl(url) {
2348
+ if (URL.canParse) return URL.canParse(url);
2349
+ try {
2350
+ new URL(url);
2351
+ return true;
2352
+ } catch {
2353
+ return false;
2354
+ }
2355
+ }
2356
+ //#endregion
2357
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/validate.ts
2358
+ var sourceOfFundsTypeValidations = {};
2359
+ var HAS_PROTOCOL_REGEX = /^https?:\/\//i;
2360
+ var sourceOfFundsAdditionalDataValidations = {
2361
+ website: {
2362
+ modes: ["blur"],
2363
+ validate: (val) => !!val && canParseUrl(val),
2364
+ errorMessage: (val) => {
2365
+ if (val && !HAS_PROTOCOL_REGEX.test(val)) return "validationUrlMustStartWithHttpOrHttps";
2366
+ return "validationPleaseEnterAValidUrl";
2367
+ }
2368
+ },
2369
+ amount: {
2370
+ modes: ["blur"],
2371
+ validate: (amount) => amount?.value != null && !Number.isNaN(Number(amount.value)),
2372
+ errorMessage: "pleaseEnterAValidAmount"
2373
+ },
2374
+ dateOfSourceEvent: {
2375
+ modes: ["blur"],
2376
+ validate: (dateOfSourceEvent) => validateDateNotInTheFuture(dateOfSourceEvent),
2377
+ errorMessage: "dateCannotBeInTheFuture"
2378
+ },
2379
+ dateOfFundsReceived: {
2380
+ modes: ["blur"],
2381
+ validate: (dateOfFundsReceived) => validateDateNotInTheFuture(dateOfFundsReceived),
2382
+ errorMessage: "dateCannotBeInTheFuture"
2383
+ }
2384
+ };
2385
+ //#endregion
2386
+ //#region src/components/EFP/tasks/SourceOfFundsDropin/SourceOfFundsDropin.tsx
2387
+ var logger = createLogger();
2388
+ var getValidationErrorMessage = (errors) => {
2389
+ const validationErrorMessages = errors.flatMap(getValidationErrorDisplayMessages);
2390
+ return validationErrorMessages.length ? validationErrorMessages.join("\n") : void 0;
2391
+ };
2392
+ function SourceOfFundsDropin({ country, problems, handleHomeClick, onSubmit, asAwe }) {
2393
+ const { data: legalEntity, isLoading: isLoadingRootLegalEntity } = useLegalEntity(ROOT_LE);
2394
+ const [loadingStatus, setLoadingStatus] = useState$1("success");
2395
+ const [activeBusinessLine, setActiveBusinessLine] = useState$1();
2396
+ const [activeSourceOfFund, setActiveSourceOfFund] = useState$1({
2397
+ sourceOfFundsType: {},
2398
+ additionalData: {}
2399
+ });
2400
+ const [allBusinessLines, setAllBusinessLines] = useState$1([]);
2401
+ const [gettingStarted, setGettingStarted] = useState$1(true);
2402
+ const [showUploadPage, setShowUploadPage] = useState$1(false);
2403
+ const [loading, setLoading] = useState$1(false);
2404
+ const [useSameAs, setUseSameAs] = useState$1(true);
2405
+ const { baseUrl, rootLegalEntityId } = useApiContext();
2406
+ const { t: sofT } = useTranslation("sof");
2407
+ const userEvents = useAnalyticsContext();
2408
+ const { showToast } = useToastContext();
2409
+ const { data: sofBusinessLines, isLoading: isLoadingBusinessLines } = useBusinessLines(ALLOWED_SOF_SERVICES);
2410
+ const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
2411
+ const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
2412
+ const { mutateAsync: updateSoFMutation } = useUpdateSourceOfFunds();
2413
+ const form = useMultiForm({
2414
+ requiredFields: getSourceOfFundsRequiredFields,
2415
+ rules: {
2416
+ sourceOfFundsType: sourceOfFundsTypeValidations,
2417
+ additionalData: sourceOfFundsAdditionalDataValidations
2418
+ },
2419
+ defaultData: activeSourceOfFund
2420
+ });
2421
+ const { data = activeSourceOfFund, setFormData, setData, requiredFields, isValid, triggerValidation } = form;
2422
+ const isSoFDocumentMissing = useMemo$1(() => legalEntity?.problems?.some((problem) => problem?.verificationErrors?.some((verificationError) => verificationError?.code === "2_8224")) ?? false, [legalEntity?.problems]);
2423
+ const legalEntityResults = useLegalEntities(sofBusinessLines?.map((businessLine) => businessLine.sourceOfFunds?.originatorLegalEntityId).filter((id) => Boolean(id)) ?? [], { staleTime: 300 * 1e3 });
2424
+ const areLegalEntitiesLoading = legalEntityResults.some((result) => result.isLoading);
2425
+ const normalizedBusinessLines = useMemo$1(() => {
2426
+ if (!sofBusinessLines) return null;
2427
+ return sofBusinessLines.map((businessLine, index) => {
2428
+ const result = legalEntityResults[index];
2429
+ let updatedBusinessLine = { ...businessLine };
2430
+ if (result && result.data) updatedBusinessLine = parseOriginatorDetails(result.data, updatedBusinessLine);
2431
+ else if (result && result.isError) {
2432
+ logger.error(`Error fetching legal entity for BL ${businessLine.id}:`, result.error);
2433
+ showToast({
2434
+ label: sofT(($) => $["unableToLoadRelatedEntity"]),
2435
+ variant: "error"
2436
+ });
2437
+ }
2438
+ if (updatedBusinessLine.sourceOfFunds?.adyenProcessedFunds) updatedBusinessLine.sourceOfFunds.type = "adyen";
2439
+ return updatedBusinessLine;
2440
+ });
2441
+ }, [sofBusinessLines, JSON.stringify(legalEntityResults.map((r) => ({
2442
+ data: r.data,
2443
+ isError: r.isError,
2444
+ error: r.error,
2445
+ isLoading: r.isLoading
2446
+ })))]);
2447
+ useEffect$1(() => {
2448
+ if (sofBusinessLines && !areLegalEntitiesLoading && normalizedBusinessLines) {
2449
+ clearSofErrorMessage();
2450
+ setLoading(true);
2451
+ try {
2452
+ if (normalizedBusinessLines.length) {
2453
+ setAllBusinessLines((prev) => objectsDeepEqual(prev, normalizedBusinessLines) ? prev : normalizedBusinessLines);
2454
+ if (!activeBusinessLine) {
2455
+ const firstBusinessLine = normalizedBusinessLines[0];
2456
+ if (firstBusinessLine) {
2457
+ const mappedSof = mapSourceOfFundToSourceOfFundsSchema(firstBusinessLine);
2458
+ setActiveBusinessLine(firstBusinessLine);
2459
+ setActiveSourceOfFund(mappedSof);
2460
+ if (mappedSof?.sourceOfFundsType) setFormData("sourceOfFundsType", mappedSof.sourceOfFundsType);
2461
+ if (mappedSof?.additionalData) setFormData("additionalData", mappedSof.additionalData);
2462
+ }
2463
+ }
2464
+ }
2465
+ } catch (error) {
2466
+ showToast({
2467
+ label: sofT(($) => $["unableToLoadRelatedEntity"]),
2468
+ variant: "error"
2469
+ });
2470
+ logger.error(error);
2471
+ } finally {
2472
+ setLoading(false);
2473
+ }
2474
+ }
2475
+ }, [
2476
+ sofBusinessLines,
2477
+ areLegalEntitiesLoading,
2478
+ normalizedBusinessLines,
2479
+ activeBusinessLine,
2480
+ sofT,
2481
+ logger
2482
+ ]);
2483
+ /**
2484
+ * Analytics
2485
+ */
2486
+ useTaskLandedEvent("SOURCE_OF_FUNDS");
2487
+ useEffect$1(() => {
2488
+ if (!gettingStarted && activeBusinessLine && allBusinessLines.length > 1) {
2489
+ const applicableBusinessLines = getApplicableBusinessLines(allBusinessLines);
2490
+ if (applicableBusinessLines.length > 1) {
2491
+ if (applicableBusinessLines.every((bl) => bl.sourceOfFunds?.type)) {
2492
+ const currentSoF = mapSourceOfFundToSourceOfFundsSchema(activeBusinessLine);
2493
+ const allIdentical = applicableBusinessLines.filter((bl) => bl.id !== activeBusinessLine.id).every((bl) => {
2494
+ const blSoF = mapSourceOfFundToSourceOfFundsSchema(bl);
2495
+ return areSourceOfFundsEqual(currentSoF, blSoF);
2496
+ });
2497
+ setUseSameAs(allIdentical);
2498
+ }
2499
+ }
2500
+ }
2501
+ }, [
2502
+ gettingStarted,
2503
+ activeBusinessLine,
2504
+ allBusinessLines
2505
+ ]);
2506
+ const sourceOfFundsRequiredForms = useMemo$1(() => getSourceOfFundsRequiredForms(data?.sourceOfFundsType), [data?.sourceOfFundsType]);
2507
+ const forms = useMemo$1(() => {
2508
+ return addValidityToForms(getRequiredForms(sourceOfFundsRequiredForms, requiredFields, void 0, true), isValid, problems);
2509
+ }, [
2510
+ sourceOfFundsRequiredForms,
2511
+ requiredFields,
2512
+ isValid,
2513
+ problems
2514
+ ]);
2515
+ const createOrUpdateOriginator = async (additionalData, prevAdditionalData) => {
2516
+ let originatorLegalEntityId;
2517
+ const sofOriginator = parseSofOriginatorPayload(additionalData);
2518
+ if (additionalData?.originatorLegalEntityId && additionalData?.originatorType === prevAdditionalData?.originatorType) try {
2519
+ sofOriginator.id = additionalData?.originatorLegalEntityId;
2520
+ if (sofOriginator.type) delete sofOriginator.type;
2521
+ const patchLegalEntity = {
2522
+ ...sofOriginator,
2523
+ id: sofOriginator.id
2524
+ };
2525
+ originatorLegalEntityId = (await updateLegalEntity(patchLegalEntity))?.id;
2526
+ } catch (e) {
2527
+ logger.log("Error updating originator legal entity", e);
2528
+ }
2529
+ else try {
2530
+ originatorLegalEntityId = (await createLegalEntity(sofOriginator))?.id;
2531
+ } catch (e) {
2532
+ logger.log("Error creating originator legal entity", e);
2533
+ }
2534
+ return originatorLegalEntityId;
2535
+ };
2536
+ const handleSubmit = useCallback$1(async () => {
2537
+ const sofData = { ...data };
2538
+ const sofType = sofData?.sourceOfFundsType?.type;
2539
+ if (!sofType || !activeBusinessLine?.id) return;
2540
+ const eventsAdditionalData = {};
2541
+ setLoadingStatus("loading");
2542
+ const { additionalData } = sofData;
2543
+ const sofPayload = getSourceOfFundsPayload(sofType, additionalData);
2544
+ if (sofType === "thirdPartyFunding") eventsAdditionalData.financiers = `${additionalData?.financiers?.length || 0} investor(s)`;
2545
+ if (sofType === "donations" || sofType === "inheritance") eventsAdditionalData.originatorType = additionalData?.originatorType ?? "";
2546
+ const targetBusinessLines = useSameAs ? getApplicableBusinessLines(allBusinessLines) : [activeBusinessLine];
2547
+ const savePromises = targetBusinessLines.filter((bl) => bl.id).map(async (bl) => {
2548
+ const payload = { ...sofPayload };
2549
+ if (sofType === "donations" || sofType === "inheritance") try {
2550
+ const blAdditionalData = mapSourceOfFundToSourceOfFundsSchema(bl)?.additionalData;
2551
+ const originatorDataForBl = useSameAs ? {
2552
+ ...additionalData,
2553
+ originatorLegalEntityId: blAdditionalData?.originatorLegalEntityId
2554
+ } : getAdditionalDataForOriginator(additionalData, activeSourceOfFund?.additionalData, useSameAs);
2555
+ payload.originatorLegalEntityId = await createOrUpdateOriginator(originatorDataForBl, blAdditionalData);
2556
+ } catch (e) {
2557
+ logger.log("Error creating originator legal entity for business line", e);
2558
+ throw e;
2559
+ }
2560
+ return updateSoFMutation({
2561
+ ...payload,
2562
+ businessLineId: bl.id
2563
+ });
2564
+ });
2565
+ try {
2566
+ const results = await Promise.allSettled(savePromises);
2567
+ const failures = results.filter((r) => r.status === "rejected");
2568
+ if (failures.length > 0) {
2569
+ setSofErrorMessage(getValidationErrorMessage(failures.map((failure) => failure.reason)) ?? sofT(($) => $["errorUpdatingMultipleSourceOfFunds"], { count: failures.length }));
2570
+ logger.error("Failed to update SoF for some business lines", failures);
2571
+ }
2572
+ const successes = results.filter((r) => r.status === "fulfilled");
2573
+ if (successes.length > 0) {
2574
+ userEvents.addTaskEvent("Success", {
2575
+ actionType: "submit",
2576
+ returnValue: sofType,
2577
+ additionalData: {
2578
+ ...eventsAdditionalData,
2579
+ appliedToMultiple: useSameAs,
2580
+ successCount: successes.length,
2581
+ failureCount: failures.length,
2582
+ businessLinesCount: allBusinessLines.length,
2583
+ activeBusinessLineType: activeBusinessLine?.service,
2584
+ activeBusinessLineCode: activeBusinessLine?.industryCode
2585
+ }
2586
+ });
2587
+ setGettingStarted(true);
2588
+ setShowUploadPage(false);
2589
+ setActiveSourceOfFund({
2590
+ sourceOfFundsType: {},
2591
+ additionalData: {}
2592
+ });
2593
+ gotoFormByFormIndex(0);
2594
+ setUseSameAs(true);
2595
+ if (failures.length === 0) {
2596
+ showToast({
2597
+ label: sofT(($) => $["successAddedFundingSources"]),
2598
+ variant: "success"
2599
+ });
2600
+ setSofErrorMessage("");
2601
+ } else showToast({
2602
+ label: sofT(($) => $["successAddedFundingSources"]),
2603
+ variant: "success"
2604
+ });
2605
+ if (useSameAs) {
2606
+ if (asAwe) onSubmit?.(data);
2607
+ } else {
2608
+ const applicableBusinessLines = getApplicableBusinessLines(allBusinessLines);
2609
+ if (applicableBusinessLines.filter((bl) => {
2610
+ return targetBusinessLines.some((target) => target.id === bl.id) || !isEmpty(bl.sourceOfFunds);
2611
+ }).length === applicableBusinessLines.length) {
2612
+ handleHomeClick?.();
2613
+ if (asAwe) onSubmit?.(data);
2614
+ }
2615
+ }
2616
+ } else setSofErrorMessage(getValidationErrorMessage(failures.map((failure) => failure.reason)) ?? sofT(($) => $["errorUpdatingSourceOfFunds"]));
2617
+ } catch (e) {
2618
+ setSofErrorMessage(getValidationErrorMessage([e]) ?? sofT(($) => $["errorUpdatingSourceOfFunds"]));
2619
+ logger.log("Error updating source of funds", e);
2620
+ }
2621
+ setLoadingStatus("success");
2622
+ }, [
2623
+ data,
2624
+ activeSourceOfFund,
2625
+ activeBusinessLine,
2626
+ allBusinessLines,
2627
+ useSameAs,
2628
+ updateSoFMutation,
2629
+ createOrUpdateOriginator,
2630
+ userEvents,
2631
+ showToast,
2632
+ sofT,
2633
+ logger
2634
+ ]);
2635
+ const handleGettingStarted = useCallback$1(() => {
2636
+ setGettingStarted(!gettingStarted);
2637
+ }, [gettingStarted]);
2638
+ const handleSourceOfFundsClick = (SoF, businessLine) => {
2639
+ setActiveBusinessLine(businessLine);
2640
+ setActiveSourceOfFund(SoF);
2641
+ setGettingStarted(false);
2642
+ setUseSameAs(false);
2643
+ };
2644
+ const sameAsOption = useMemo$1(() => {
2645
+ if (!activeBusinessLine || !allBusinessLines.length) return;
2646
+ if (getApplicableBusinessLines(allBusinessLines).length <= 1) return;
2647
+ return {
2648
+ businessLineId: "",
2649
+ productName: sofT(($) => $["alwaysUseThisFundingSource"]),
2650
+ sourceOfFunds: activeSourceOfFund
2651
+ };
2652
+ }, [
2653
+ activeBusinessLine,
2654
+ allBusinessLines,
2655
+ activeSourceOfFund,
2656
+ sofT
2657
+ ]);
2658
+ const setAdditionalDataFields = useCallback$1((additionalData) => {
2659
+ if (!additionalData) return;
2660
+ Object.keys(additionalData).forEach((key) => {
2661
+ const fieldKey = key;
2662
+ const value = additionalData[fieldKey];
2663
+ if (value !== void 0) setData("additionalData", fieldKey, value);
2664
+ });
2665
+ }, [setData]);
2666
+ const handleUseSameAsChange = useCallback$1((checked) => {
2667
+ setUseSameAs(checked);
2668
+ if (checked && sameAsOption) {
2669
+ const { sourceOfFunds } = sameAsOption;
2670
+ setActiveSourceOfFund(sourceOfFunds);
2671
+ setFormData("sourceOfFundsType", sourceOfFunds.sourceOfFundsType);
2672
+ setAdditionalDataFields(sourceOfFunds.additionalData);
2673
+ } else if (!checked && activeBusinessLine) {
2674
+ const currentSoF = mapSourceOfFundToSourceOfFundsSchema(activeBusinessLine);
2675
+ setActiveSourceOfFund(currentSoF);
2676
+ setFormData("sourceOfFundsType", currentSoF.sourceOfFundsType);
2677
+ setAdditionalDataFields(currentSoF.additionalData);
2678
+ }
2679
+ }, [
2680
+ sameAsOption,
2681
+ activeBusinessLine,
2682
+ setFormData,
2683
+ setAdditionalDataFields
2684
+ ]);
2685
+ const { handleNextClick, activeForm, gotoFormByFormIndex, gotoFormByFormId, steps, handleBackClick } = useFormComposer({
2686
+ problems,
2687
+ forms,
2688
+ onSubmit: handleSubmit,
2689
+ triggerValidation
2690
+ });
2691
+ const documentUtils = documentApiUtils({
2692
+ baseUrl: baseUrl.value,
2693
+ rootLegalEntityId: rootLegalEntityId.value
2694
+ });
2695
+ const handleNavigateToSummary = async () => {
2696
+ setShowUploadPage(false);
2697
+ setGettingStarted(true);
2698
+ };
2699
+ const handleNavigateToUploadPage = () => {
2700
+ setShowUploadPage(true);
2701
+ };
2702
+ return /* @__PURE__ */ jsx("div", {
2703
+ className: asAwe ? SourceOfFunds_module_default.sourceOfFundsAwe : SourceOfFunds_module_default.sourceOfFunds,
2704
+ children: loading || isLoadingRootLegalEntity || isLoadingBusinessLines || areLegalEntitiesLoading ? /* @__PURE__ */ jsx(Loader, {}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
2705
+ gettingStarted && !showUploadPage && legalEntity && /* @__PURE__ */ jsx(SourceOfFundsGettingStarted, {
2706
+ asAwe,
2707
+ handleCancelClick: handleHomeClick,
2708
+ handleGettingStartedClick: handleGettingStarted,
2709
+ businessLines: allBusinessLines,
2710
+ problems: legalEntity?.problems,
2711
+ handleSourceOfFundsClick,
2712
+ handleNavigateToUploadPage,
2713
+ legalEntity,
2714
+ isSoFDocumentMissing
2715
+ }),
2716
+ showUploadPage && legalEntity && /* @__PURE__ */ jsx(SourceOfFundsUpload, {
2717
+ businessLines: allBusinessLines,
2718
+ documentUtils,
2719
+ legalEntity,
2720
+ handleNavigateToSummary
2721
+ }),
2722
+ !gettingStarted && !showUploadPage && /* @__PURE__ */ jsx(FormContextProvider, {
2723
+ form,
2724
+ children: /* @__PURE__ */ jsx(FormFlow, {
2725
+ forms,
2726
+ disableNextButton: !activeForm.isValid,
2727
+ activeForm,
2728
+ gotoFormByFormIndex,
2729
+ gotoFormByFormId,
2730
+ handleBackClick: steps.current === 0 ? handleGettingStarted : handleBackClick,
2731
+ handleCancelClick: handleHomeClick,
2732
+ handleNextClick,
2733
+ loadingStatus,
2734
+ currentStep: steps.current,
2735
+ totalSteps: steps.total,
2736
+ children: /* @__PURE__ */ jsx(SourceOfFunds, {
2737
+ country,
2738
+ activeForm,
2739
+ activeBusinessLine,
2740
+ sourceOfFundsType: data?.sourceOfFundsType?.type,
2741
+ data: activeSourceOfFund,
2742
+ sameAsOption,
2743
+ useSameAs,
2744
+ onUseSameAsChange: handleUseSameAsChange
2745
+ })
2746
+ })
2747
+ })
2748
+ ] })
2749
+ });
2750
+ }
2751
+ //#endregion
2752
+ //#region src/components/EFP/pages/SourceOfFundsPage.tsx
2753
+ var SourceOfFundsPage = ({ onSubmit, handleHomeClick, asAwe }) => {
2754
+ const { data: rootLe } = useLegalEntity(ROOT_LE);
2755
+ const capabilityProblems = useCapabilityProblems();
2756
+ const { i18n } = useTranslation();
2757
+ addResourceBundles(i18n, [{
2758
+ ns: "sof",
2759
+ importFn: (lang) => _rolldown_dynamic_import_helper_default(/* #__PURE__ */ Object.assign({
2760
+ "../tasks/SourceOfFundsDropin/language/bg-BG.json": () => import("./bg-BG-DAR7_x2a.js"),
2761
+ "../tasks/SourceOfFundsDropin/language/cs-CZ.json": () => import("./cs-CZ-DsKlW7_D.js"),
2762
+ "../tasks/SourceOfFundsDropin/language/da-DK.json": () => import("./da-DK-LPtdP8h0.js"),
2763
+ "../tasks/SourceOfFundsDropin/language/de-DE.json": () => import("./de-DE-DA4LpyZI.js"),
2764
+ "../tasks/SourceOfFundsDropin/language/el-GR.json": () => import("./el-GR-Ov9hqMNe.js"),
2765
+ "../tasks/SourceOfFundsDropin/language/en-US.json": () => import("./en-US-C_VjFvk_.js"),
2766
+ "../tasks/SourceOfFundsDropin/language/es-ES.json": () => import("./es-ES-BzlHKYJK.js"),
2767
+ "../tasks/SourceOfFundsDropin/language/es-LA.json": () => import("./es-LA-i7tKJmA8.js"),
2768
+ "../tasks/SourceOfFundsDropin/language/et-EE.json": () => import("./et-EE-DOgb4q9o.js"),
2769
+ "../tasks/SourceOfFundsDropin/language/fi-FI.json": () => import("./fi-FI-DCbhu29J.js"),
2770
+ "../tasks/SourceOfFundsDropin/language/fr-FR.json": () => import("./fr-FR-D0hY9V44.js"),
2771
+ "../tasks/SourceOfFundsDropin/language/hr-HR.json": () => import("./hr-HR-B4FRVzrd.js"),
2772
+ "../tasks/SourceOfFundsDropin/language/hu-HU.json": () => import("./hu-HU-B7ofWKn_.js"),
2773
+ "../tasks/SourceOfFundsDropin/language/it-IT.json": () => import("./it-IT-tZ7dP-Ia.js"),
2774
+ "../tasks/SourceOfFundsDropin/language/ja-JP.json": () => import("./ja-JP-BjMyxZiN.js"),
2775
+ "../tasks/SourceOfFundsDropin/language/lt-LT.json": () => import("./lt-LT-Cs3cvyKf.js"),
2776
+ "../tasks/SourceOfFundsDropin/language/lv-LV.json": () => import("./lv-LV-C3p57pZV.js"),
2777
+ "../tasks/SourceOfFundsDropin/language/nl-NL.json": () => import("./nl-NL-B77Xr99l.js"),
2778
+ "../tasks/SourceOfFundsDropin/language/no-NO.json": () => import("./no-NO-BePxpMbr.js"),
2779
+ "../tasks/SourceOfFundsDropin/language/pl-PL.json": () => import("./pl-PL-6Q3Ue3F5.js"),
2780
+ "../tasks/SourceOfFundsDropin/language/pt-BR.json": () => import("./pt-BR-MrUfWW4a.js"),
2781
+ "../tasks/SourceOfFundsDropin/language/pt-PT.json": () => import("./pt-PT-BZNPd_Tb.js"),
2782
+ "../tasks/SourceOfFundsDropin/language/ro-RO.json": () => import("./ro-RO-BmHe4pZ-.js"),
2783
+ "../tasks/SourceOfFundsDropin/language/sk-SK.json": () => import("./sk-SK-D10Kpths.js"),
2784
+ "../tasks/SourceOfFundsDropin/language/sl-SI.json": () => import("./sl-SI-Qe4hzx5a.js"),
2785
+ "../tasks/SourceOfFundsDropin/language/sv-SE.json": () => import("./sv-SE-issaSBHd.js")
2786
+ }), `../tasks/SourceOfFundsDropin/language/${lang}.json`, 5)
2787
+ }]);
2788
+ if (!rootLe) return /* @__PURE__ */ jsx(Loader, {});
2789
+ const problems = capabilityProblems ? getProblemsForEntity(capabilityProblems, "LegalEntity", rootLe.id) : void 0;
2790
+ return /* @__PURE__ */ jsx(SourceOfFundsDropin, {
2791
+ legalEntityResponse: rootLe,
2792
+ country: getLegalEntityCountry(rootLe),
2793
+ problems,
2794
+ asAwe,
2795
+ onSubmit,
2796
+ handleHomeClick
2797
+ });
2798
+ };
2799
+ //#endregion
2800
+ export { SourceOfFundsPage };