@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,1870 @@
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] = "ae75b705-b99d-4731-b842-cdae1dc56643", e._sentryDebugIdIdentifier = "sentry-dbid-ae75b705-b99d-4731-b842-cdae1dc56643");
4
+ } catch (e) {}
5
+ import { r as useTranslation } from "./translation-DbATp_35.js";
6
+ import { t as Typography } from "./Typography-CAc_f5Iq.js";
7
+ import { t as Loader } from "./Loader-BVtlpTeo.js";
8
+ import { t as Button } from "./Button-DPJ1k02w.js";
9
+ import { n as httpGet, s as useApiContext } from "./http-fdIO--pH.js";
10
+ import { t as useSettingsContext } from "./useSettingsContext-9O3Aqpfq.js";
11
+ import { t as cloneObject } from "./genUtils-nphCwt1A.js";
12
+ import { t as useToggleContext } from "./useToggleContext-B_YexrbT.js";
13
+ import { t as Header } from "./Header-DVLlJ6we.js";
14
+ import { n as datasetUtilities } from "./datasetUtil-BdHPWsxZ.js";
15
+ import { y as reverseMapping } from "./processCapabilities-CWE5UFt8.js";
16
+ import { f as hasSolePropInLegalEntity } from "./entityAssociationUtil-CY0grcyH.js";
17
+ import { t as isEeaCountry } from "./country-BEZkohEO.js";
18
+ import { t as useAnalyticsContext } from "./useAnalyticsContext-gSnRnYgV.js";
19
+ import { t as SettingNames } from "./types-Cwq1JAWT.js";
20
+ import { t as useAssociatedLegalEntity } from "./useAssociatedLegalEntity-DtZtKlls.js";
21
+ import { t as useToastContext } from "./useToastContext-B6Mqc2HY.js";
22
+ import { t as EndStateLayout } from "./EndStateLayout-zZPm8S5M.js";
23
+ import { t as useInvalidateRootLegalEntity } from "./invalidateRootLegalEntity-BHaVREw-.js";
24
+ import { t as useCreateLegalEntity } from "./useCreateLegalEntity-qP7MeAmi.js";
25
+ import { t as useUpdateLegalEntity } from "./useUpdateLegalEntity-CqmqXsbR.js";
26
+ import { a as useFormComposer, i as FormFlow, n as getRequiredForms, o as FormContextProvider, r as useFormContext, t as addValidityToForms } from "./dropinUtils-DTBezwYT.js";
27
+ import { r as translateTranslatable } from "./utils-CYUYe54m.js";
28
+ import { t as ErrorPanel } from "./ErrorPanel-D4JNFkvi.js";
29
+ import { t as createFormUtils } from "./formUtils-DVDcdZsP.js";
30
+ import { t as useMultiForm } from "./useMultiForm-BxASst0O.js";
31
+ import { t as Field } from "./Field-DwDJQVSS.js";
32
+ import { t as getFormSlice } from "./getFormSlice-C1ma6Xd4.js";
33
+ import { t as Select } from "./Select-phAxjMBQ.js";
34
+ import { t as Checkbox } from "./Checkbox-qfdF12cF.js";
35
+ import { n as CountryField } from "./CountryField-DT6-Jr_b.js";
36
+ import { c as COUNTRIES_WITH_STATES_DATASET, l as addressFields, r as getKeyForField } from "./utils-BWumuCvl.js";
37
+ import { t as InputText } from "./InputText-CFDEmEtp.js";
38
+ import { t as RadioGroup } from "./RadioGroup-Bf3DlQnZ.js";
39
+ import { r as formatObject } from "./utils-DdHbAadK.js";
40
+ import { a as getPrefixedAddressFieldNames, o as nestAddressSchema, t as AddressFields } from "./AddressFields-BC3QHs2u.js";
41
+ import { t as useTaskLandedEvent } from "./useTaskLandedEvent-DwZHcMEQ.js";
42
+ import { n as isMaintenanceModeError, t as processValidationErrors } from "./processValidationErrors-CjsNfiRK.js";
43
+ import { t as localizeDateString } from "./localizeDateString-Dxlqr4rL.js";
44
+ import { a as isValidationError } from "./validationError-DV6t8Ubb.js";
45
+ import { t as InputDate } from "./InputDate-Bq3Sb-ZW.js";
46
+ import { i as getPrefixedFieldProps, n as getFieldProps } from "./getProps-DVqK7eRw.js";
47
+ import { t as Link } from "./Link-CvYhseSD.js";
48
+ import { t as formatValidationError } from "./formatValidationError-q_w9DTrl.js";
49
+ import { t as currencyByCountry } from "./types-BA3bcGAv.js";
50
+ import { t as NewSummary } from "./NewSummary-D55f70wB.js";
51
+ import { a as LegalFormField, i as InputCurrency, n as Currency, o as mapFinancialReportsToFinancialInformation, r as InputNumber, s as mapFinancialInformationToFinancialReport, t as CURRENCY_FIELD } from "./Currency-oeXHRWzy.js";
52
+ import { t as businessFinancingMultiformRules } from "./validate-Dr8UKZCX.js";
53
+ import { useEffect, useMemo, useRef, useState } from "preact/hooks";
54
+ import { Fragment, jsx, jsxs } from "preact/jsx-runtime";
55
+ import { useQuery } from "@tanstack/preact-query";
56
+ //#region src/components/EFP/mapping/businessFinancingKeyMappings.ts
57
+ var businessFinancingBaseMapping = {
58
+ legalProceedingsDate: "organization.dateOfInitiationOfLegalProceeding",
59
+ legalInformationInsolvency: "organization.statusOfLegalProceeding",
60
+ legalEntityIdentifier: "organization.globalLegalEntityIdentifier",
61
+ naceCode: "organization.economicSector",
62
+ legalForm: "organization.legalForm",
63
+ legalName: "organization.legalName",
64
+ registrationAddressCity: "organization.registeredAddress.city",
65
+ registrationAddressCountry: "organization.registeredAddress.country",
66
+ registrationAddressPostalCode: "organization.registeredAddress.postalCode",
67
+ registrationAddressStateOrProvince: "organization.registeredAddress.stateOrProvince",
68
+ registrationAddressStreet: "organization.registeredAddress.street",
69
+ registrationAddressStreet2: "organization.registeredAddress.street2"
70
+ };
71
+ var businessFinancingIndividualMapping = {
72
+ gender: "individual.birthData.genderCode",
73
+ countryOfBirth: "individual.birthData.birthCountry"
74
+ };
75
+ var businessFinancingSoleProprietorMapping = {
76
+ legalProceedingsDate: "soleProprietorship.dateOfInitiationOfLegalProceeding",
77
+ legalInformationInsolvency: "soleProprietorship.statusOfLegalProceeding",
78
+ naceCode: "soleProprietorship.economicSector"
79
+ };
80
+ var businessFinancingComponentsKeyMapping = { ...businessFinancingBaseMapping };
81
+ ({ ...businessFinancingIndividualMapping });
82
+ var businessFinancingSoleProprietorComponentsKeyMapping = { ...businessFinancingSoleProprietorMapping };
83
+ var businessFinancingApiKeyMapping = { ...reverseMapping(businessFinancingBaseMapping) };
84
+ var businessFinancingIndividualApiKeyMapping = { ...reverseMapping(businessFinancingIndividualMapping) };
85
+ var businessFinancingSoleProprietorApiKeyMapping = { ...reverseMapping(businessFinancingSoleProprietorMapping) };
86
+ //#endregion
87
+ //#region src/components/EFP/mapping/mapBusinessFinancingToLegalEntity.ts
88
+ var mapBusinessFinancingToLegalEntity = (data, isIndividualOrSoleProprietor, customMapping) => {
89
+ if (customMapping) return formatObject(data, customMapping);
90
+ return formatObject(data, isIndividualOrSoleProprietor ? businessFinancingSoleProprietorApiKeyMapping : businessFinancingApiKeyMapping);
91
+ };
92
+ //#endregion
93
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/types.ts
94
+ var BusinessFinancingPages = {
95
+ COMPANY_PAGE: "company",
96
+ SOLE_PROPRIETOR_PAGE: "soleProprietor",
97
+ PARENT_COMPANY_PAGE: "parentCompany",
98
+ ULTIMATE_PARENT_COMPANY_PAGE: "ultimateParentCompany"
99
+ };
100
+ var BusinessFinancingRadioIds = {
101
+ YES: "Yes",
102
+ NO: "No"
103
+ };
104
+ var businessFinancingRadioItems = [{
105
+ id: BusinessFinancingRadioIds.YES,
106
+ name: "yes"
107
+ }, {
108
+ id: BusinessFinancingRadioIds.NO,
109
+ name: "no"
110
+ }];
111
+ var businessFinancingParentRadioItems = [{
112
+ id: BusinessFinancingRadioIds.YES,
113
+ name: "yes"
114
+ }, {
115
+ id: BusinessFinancingRadioIds.NO,
116
+ name: "noIdontKnow"
117
+ }];
118
+ var companySchemaKeys = [
119
+ "legalForm",
120
+ "naceCode",
121
+ "numberOfEmployees",
122
+ "doesYourCompanyHaveLEI",
123
+ "legalEntityIdentifier",
124
+ "isCompanyOwnedByAnotherCompany",
125
+ "isParentOwnedByAnotherCompany",
126
+ "financialReportingDate",
127
+ "currency",
128
+ "balanceSheetTotal",
129
+ "annualTurnover",
130
+ "legalInformationInsolvency",
131
+ "legalProceedingsDate"
132
+ ];
133
+ var soleProprietorSchemaKeys = [
134
+ "gender",
135
+ "countryOfBirth",
136
+ "naceCode",
137
+ "legalInformationInsolvency",
138
+ "legalProceedingsDate"
139
+ ];
140
+ var parentCompaniesSchemaKeys = [
141
+ "legalName",
142
+ "legalForm",
143
+ "naceCode",
144
+ "numberOfEmployees",
145
+ "doesYourCompanyHaveLEI",
146
+ "legalEntityIdentifier",
147
+ "isThisAddressTheMainHeadquarters",
148
+ "financialReportingDate",
149
+ "currency",
150
+ "balanceSheetTotal",
151
+ "annualTurnover",
152
+ "legalInformationInsolvency",
153
+ "legalProceedingsDate",
154
+ "registrationAddressStreet",
155
+ "registrationAddressStreet2",
156
+ "registrationAddressCity",
157
+ "registrationAddressStateOrProvince",
158
+ "registrationAddressPostalCode",
159
+ "registrationAddressCountry",
160
+ "sameAddressAsRootEntity"
161
+ ];
162
+ var businessFinancingForms = {
163
+ company: {
164
+ formId: "company",
165
+ formName: "businessInformation",
166
+ fields: [...companySchemaKeys]
167
+ },
168
+ soleProprietor: {
169
+ formId: "soleProprietor",
170
+ formName: "businessInformation",
171
+ fields: [...soleProprietorSchemaKeys]
172
+ },
173
+ parentCompany: {
174
+ formId: "parentCompany",
175
+ formName: "parentCompanyInformation",
176
+ fields: [...parentCompaniesSchemaKeys]
177
+ },
178
+ ultimateParentCompany: {
179
+ formId: "ultimateParentCompany",
180
+ formName: "ultimateParentCompanyInformation",
181
+ fields: [...parentCompaniesSchemaKeys]
182
+ }
183
+ };
184
+ var BusinessFinancingIndices = {
185
+ COMPANY: "company",
186
+ SOLE_PROPRIETOR: "soleProprietor",
187
+ PARENT_COMPANY: "parentCompany",
188
+ ULTIMATE_PARENT_COMPANY: "ultimateParentCompany"
189
+ };
190
+ //#endregion
191
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/utils.ts
192
+ /**
193
+ * Deep-merges freshly processed validation errors into the previous ones, keyed by formId.
194
+ * Merging (rather than replacing) is required because sibling entities (e.g. parent and
195
+ * ultimate parent company) are submitted in parallel and each may contribute errors to the
196
+ * shared summary bucket within a single submit.
197
+ *
198
+ * NOTE: This never removes an error, so callers must reset validation errors at the start of
199
+ * each submit to avoid showing stale errors from a previous attempt.
200
+ */
201
+ var mergeValidationErrors = (previousValidationErrors, newValidationErrors) => Object.entries(newValidationErrors ?? {}).reduce((acc, [formId, formErrors]) => ({
202
+ ...acc,
203
+ [formId]: {
204
+ ...acc[formId],
205
+ ...formErrors
206
+ }
207
+ }), { ...previousValidationErrors });
208
+ var getLegalEntityId = (businessFinancingIndex, rootLegalEntity) => {
209
+ if (!rootLegalEntity) return void 0;
210
+ if (businessFinancingIndex === BusinessFinancingIndices.COMPANY || businessFinancingIndex === BusinessFinancingIndices.SOLE_PROPRIETOR) return rootLegalEntity.id;
211
+ if (!rootLegalEntity?.entityAssociations) return void 0;
212
+ const businessFinancingEntityType = BusinessFinancingIndices.PARENT_COMPANY ? "immediateParentCompany" : "ultimateParentCompany";
213
+ return (rootLegalEntity.entityAssociations?.find((entity) => entity.type === businessFinancingEntityType))?.legalEntityId;
214
+ };
215
+ var USER_LOCALE = typeof navigator !== "undefined" ? navigator.language : "en-US";
216
+ var entityHasParentCompany = (data) => data.company?.isCompanyOwnedByAnotherCompany && data.company?.isCompanyOwnedByAnotherCompany === "Yes";
217
+ var entityHasUltimateParentCompany = (data) => data.company?.isParentOwnedByAnotherCompany && data.company?.isParentOwnedByAnotherCompany === "Yes";
218
+ var financialReportsToString = (financialReports) => {
219
+ return {
220
+ ...financialReports,
221
+ numberOfEmployees: financialReports.numberOfEmployees ? financialReports.numberOfEmployees.toString() : void 0,
222
+ annualTurnover: financialReports.annualTurnover ? financialReports.annualTurnover.toString() : void 0,
223
+ balanceSheetTotal: financialReports.balanceSheetTotal ? financialReports.balanceSheetTotal.toString() : void 0
224
+ };
225
+ };
226
+ /**
227
+ * Prepares sole proprietor business financing data for submission.
228
+ * IMPORTANT: Both root LE (individual) and sole prop LE MUST exist before calling this.
229
+ * This function always returns UPDATE payloads (with IDs), never CREATE payloads.
230
+ */
231
+ var prepareSoleProprietorBusinessFinancingSubmitData = (data, rootLegalEntity, soleProprietorLegalEntity) => {
232
+ const businessFinancingData = data.soleProprietor;
233
+ if (!businessFinancingData || !rootLegalEntity?.id || !soleProprietorLegalEntity?.id) return null;
234
+ const individualChanges = mapBusinessFinancingToLegalEntity(businessFinancingData, true, businessFinancingIndividualApiKeyMapping);
235
+ const { identificationData: _identificationData, ...individualWithoutIdData } = rootLegalEntity.individual || {};
236
+ const individualPayload = {
237
+ id: rootLegalEntity.id,
238
+ individual: {
239
+ ...individualWithoutIdData,
240
+ ...individualChanges.individual
241
+ }
242
+ };
243
+ const solePropChanges = mapBusinessFinancingToLegalEntity(businessFinancingData, true, businessFinancingSoleProprietorApiKeyMapping);
244
+ if (!solePropChanges.soleProprietorship) return null;
245
+ const formStatusOfLegalProceeding = businessFinancingData.legalInformationInsolvency;
246
+ if (formStatusOfLegalProceeding === "iDontKnow") solePropChanges.soleProprietorship.statusOfLegalProceeding = "noLegalActionsTaken";
247
+ if (formStatusOfLegalProceeding === "iDontKnow" || formStatusOfLegalProceeding === "noLegalActionsTaken") solePropChanges.soleProprietorship.dateOfInitiationOfLegalProceeding = "";
248
+ return {
249
+ individualPayload,
250
+ solePropPayload: {
251
+ id: soleProprietorLegalEntity.id,
252
+ soleProprietorship: {
253
+ ...soleProprietorLegalEntity.soleProprietorship,
254
+ ...solePropChanges.soleProprietorship
255
+ }
256
+ }
257
+ };
258
+ };
259
+ var prepareBusinessFinancingSubmitData = (businessFinancingIndex, data, rootLegalEntity) => {
260
+ const businessFinancingData = data[businessFinancingIndex];
261
+ if (!businessFinancingData) return null;
262
+ if (businessFinancingIndex === BusinessFinancingIndices.PARENT_COMPANY && !entityHasParentCompany(data)) return null;
263
+ if (businessFinancingIndex === BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY && (!entityHasUltimateParentCompany(data) || !entityHasParentCompany(data))) return null;
264
+ const businessFinancingDetails = mapBusinessFinancingToLegalEntity(businessFinancingData);
265
+ const isSoleProprietor = businessFinancingIndex === BusinessFinancingIndices.SOLE_PROPRIETOR;
266
+ if (isSoleProprietor) throw new Error("Use prepareSoleProprietorBusinessFinancingSubmitData for sole proprietor business financing");
267
+ else if (isSoleProprietor === false) {
268
+ if (!businessFinancingDetails.organization) return null;
269
+ const businessFinancingCountry = businessFinancingDetails.organization.registeredAddress?.country || rootLegalEntity?.organization?.registeredAddress?.country;
270
+ const companyData = businessFinancingData;
271
+ if (companyData.financialReportingDate && isEeaCountry(businessFinancingCountry)) {
272
+ const { balanceSheetTotal: bst, ...restFinancialReport } = mapFinancialInformationToFinancialReport({
273
+ currency: companyData.currency,
274
+ financialReportingDate: companyData.financialReportingDate,
275
+ numberOfEmployees: companyData.numberOfEmployees ? Number(companyData.numberOfEmployees) : void 0,
276
+ balanceSheetTotal: companyData.balanceSheetTotal ? Number(companyData.balanceSheetTotal) : void 0,
277
+ annualTurnover: companyData.annualTurnover ? Number(companyData.annualTurnover) : void 0
278
+ });
279
+ const businessFinancingFinancialReport = {
280
+ ...restFinancialReport,
281
+ netAssets: bst
282
+ };
283
+ businessFinancingDetails.organization.financialReports = [businessFinancingFinancialReport];
284
+ }
285
+ if (!isEeaCountry(businessFinancingCountry)) businessFinancingDetails.organization.financialReports = void 0;
286
+ const formStatusOfLegalProceeding = businessFinancingData.legalInformationInsolvency;
287
+ if (formStatusOfLegalProceeding === "iDontKnow") businessFinancingDetails.organization.statusOfLegalProceeding = "noLegalActionsTaken";
288
+ if (formStatusOfLegalProceeding === "iDontKnow" || formStatusOfLegalProceeding === "noLegalActionsTaken") businessFinancingDetails.organization.dateOfInitiationOfLegalProceeding = "";
289
+ if (companyData.sameAddressAsRootEntity && rootLegalEntity?.organization?.registeredAddress) businessFinancingDetails.organization.registeredAddress = { ...rootLegalEntity.organization.registeredAddress };
290
+ if (companyData.isThisAddressTheMainHeadquarters) businessFinancingDetails.organization.principalPlaceOfBusiness = { ...businessFinancingDetails.organization.registeredAddress };
291
+ if (companyData.doesYourCompanyHaveLEI !== "Yes") delete businessFinancingDetails.organization.globalLegalEntityIdentifier;
292
+ }
293
+ const businessFinancingLegalEntityId = getLegalEntityId(businessFinancingIndex, rootLegalEntity);
294
+ if (businessFinancingLegalEntityId) {
295
+ delete businessFinancingDetails.type;
296
+ businessFinancingDetails.id = businessFinancingLegalEntityId;
297
+ } else {
298
+ delete businessFinancingDetails.id;
299
+ businessFinancingDetails.type = isSoleProprietor ? "soleProprietorship" : "organization";
300
+ }
301
+ return businessFinancingDetails;
302
+ };
303
+ var appendBusinessFinancingData = (legalOrganization, businessFinancingData) => {
304
+ if (!legalOrganization || !businessFinancingData) return businessFinancingData;
305
+ const clonedBusinessFinancingData = { ...businessFinancingData };
306
+ let financialReportData = {};
307
+ if (legalOrganization.financialReports) {
308
+ financialReportData = financialReportsToString(mapFinancialReportsToFinancialInformation((Array.isArray(legalOrganization.financialReports) ? legalOrganization.financialReports : [legalOrganization.financialReports]).map(({ netAssets, ...rest }) => ({
309
+ ...rest,
310
+ balanceSheetTotal: rest.balanceSheetTotal ?? netAssets
311
+ })), false));
312
+ if (financialReportData.numberOfEmployees) financialReportData.numberOfEmployees = financialReportData.numberOfEmployees.toString();
313
+ }
314
+ return {
315
+ ...clonedBusinessFinancingData,
316
+ ...financialReportData,
317
+ numberOfEmployees: financialReportData.numberOfEmployees ? financialReportData.numberOfEmployees.toString() : void 0,
318
+ doesYourCompanyHaveLEI: legalOrganization.globalLegalEntityIdentifier ? "Yes" : "No",
319
+ isThisAddressTheMainHeadquarters: legalOrganization.principalPlaceOfBusiness ? "Yes" : clonedBusinessFinancingData.isThisAddressTheMainHeadquarters
320
+ };
321
+ };
322
+ var appendSoleProprietorBusinessFinancingData = (legalArrangement, businessFinancingData) => {
323
+ if (!legalArrangement || !businessFinancingData) return businessFinancingData;
324
+ return {
325
+ ...businessFinancingData,
326
+ naceCode: businessFinancingData.naceCode ?? legalArrangement.economicSector,
327
+ legalInformationInsolvency: businessFinancingData.legalInformationInsolvency ?? legalArrangement.statusOfLegalProceeding,
328
+ legalProceedingsDate: businessFinancingData.legalProceedingsDate ?? legalArrangement.dateOfInitiationOfLegalProceeding
329
+ };
330
+ };
331
+ var handleBusinessFinancingFormSubmission = async (businessFinancingType, details, createFunction, updateFunction, entityId) => {
332
+ if (!details) throw new Error(`Missing details for ${businessFinancingType}`);
333
+ try {
334
+ if (entityId) return await updateFunction({
335
+ ...details,
336
+ id: entityId
337
+ });
338
+ return await createFunction(details);
339
+ } catch (error) {
340
+ const businessFinancingError = /* @__PURE__ */ new Error(`Form submission failed for ${businessFinancingType}`);
341
+ businessFinancingError.actualError = error;
342
+ businessFinancingError.businessFinancingType = businessFinancingError;
343
+ throw businessFinancingError;
344
+ }
345
+ };
346
+ var getCompanySchemaKeys = (country, currentData, schemaKeys) => {
347
+ const fieldsToRemove = [];
348
+ if (!isEeaCountry(country)) fieldsToRemove.push("financialReportingDate", "balanceSheetTotal", "annualTurnover", "currency", "numberOfEmployees");
349
+ if (currentData.isCompanyOwnedByAnotherCompany !== "Yes") fieldsToRemove.push("isParentOwnedByAnotherCompany");
350
+ if (currentData.doesYourCompanyHaveLEI !== "Yes") fieldsToRemove.push("legalEntityIdentifier");
351
+ if (!currentData?.legalInformationInsolvency || ["noLegalActionsTaken", "iDontKnow"].includes(currentData?.legalInformationInsolvency)) fieldsToRemove.push("legalProceedingsDate");
352
+ return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
353
+ };
354
+ var getSoleProprietorSchemaKeys = (currentData, schemaKeys) => {
355
+ const fieldsToRemove = [];
356
+ if (!currentData?.legalInformationInsolvency || ["noLegalActionsTaken", "iDontKnow"].includes(currentData?.legalInformationInsolvency)) fieldsToRemove.push("legalProceedingsDate");
357
+ return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
358
+ };
359
+ var getParentCompanySchemaKeys = (currentData, schemaKeys, rootEntityAddress) => {
360
+ const fieldsToRemove = [];
361
+ const companyCountry = currentData?.sameAddressAsRootEntity && rootEntityAddress ? rootEntityAddress.country : currentData?.registrationAddressCountry;
362
+ if (!isEeaCountry(companyCountry)) fieldsToRemove.push("financialReportingDate", "balanceSheetTotal", "annualTurnover", "currency", "numberOfEmployees");
363
+ if (currentData?.sameAddressAsRootEntity) fieldsToRemove.concat([
364
+ "registrationAddressStreet",
365
+ "registrationAddressStreet2",
366
+ "registrationAddressCity",
367
+ "registrationAddressStateOrProvince",
368
+ "registrationAddressPostalCode",
369
+ "registrationAddressCountry"
370
+ ]);
371
+ if (companyCountry && !COUNTRIES_WITH_STATES_DATASET.includes(companyCountry)) fieldsToRemove.push("registrationAddressStateOrProvince");
372
+ if (currentData.doesYourCompanyHaveLEI !== "Yes") fieldsToRemove.push("legalEntityIdentifier");
373
+ if (!currentData?.legalInformationInsolvency || ["noLegalActionsTaken", "iDontKnow"].includes(currentData?.legalInformationInsolvency)) fieldsToRemove.push("legalProceedingsDate");
374
+ return schemaKeys.filter((field) => !fieldsToRemove.includes(field));
375
+ };
376
+ var getBusinessFinancingFields = (country, data, rootEntityAddress) => {
377
+ let requiredFields = void 0, optionalFields = void 0;
378
+ if (!data) return [requiredFields, optionalFields];
379
+ const { company, soleProprietor, parentCompany = {}, ultimateParentCompany = {} } = data;
380
+ if (soleProprietor) {
381
+ requiredFields = {};
382
+ optionalFields = {};
383
+ requiredFields.soleProprietor = getSoleProprietorSchemaKeys(soleProprietor, soleProprietorSchemaKeys);
384
+ delete requiredFields.company;
385
+ return [requiredFields, optionalFields];
386
+ }
387
+ const handleStreet2 = (requiredFields, schema) => {
388
+ const street2Idx = requiredFields.indexOf("registrationAddressStreet2");
389
+ if (street2Idx > -1) {
390
+ requiredFields.splice(street2Idx, 1);
391
+ optionalFields = {
392
+ ...optionalFields,
393
+ [schema]: ["registrationAddressStreet2"]
394
+ };
395
+ }
396
+ return requiredFields;
397
+ };
398
+ if (company) {
399
+ requiredFields = {};
400
+ optionalFields = {};
401
+ requiredFields.company = getCompanySchemaKeys(country, company, companySchemaKeys);
402
+ }
403
+ if (company?.isCompanyOwnedByAnotherCompany === "Yes") {
404
+ let parentCompanyRequiredFields = getParentCompanySchemaKeys(parentCompany, parentCompaniesSchemaKeys, rootEntityAddress);
405
+ parentCompanyRequiredFields = handleStreet2(parentCompanyRequiredFields, "parentCompany");
406
+ requiredFields = {
407
+ ...requiredFields,
408
+ parentCompany: parentCompanyRequiredFields
409
+ };
410
+ }
411
+ if (company?.isParentOwnedByAnotherCompany === "Yes") {
412
+ let ultimateParentCompanyRequiredFields = getParentCompanySchemaKeys(ultimateParentCompany, parentCompaniesSchemaKeys, rootEntityAddress);
413
+ ultimateParentCompanyRequiredFields = handleStreet2(ultimateParentCompanyRequiredFields, "ultimateParentCompany");
414
+ requiredFields = {
415
+ ...requiredFields,
416
+ ultimateParentCompany: ultimateParentCompanyRequiredFields
417
+ };
418
+ }
419
+ return [requiredFields, optionalFields];
420
+ };
421
+ var getAddressCountryForParentCompany = (parentCompany, leAddress) => {
422
+ return parentCompany?.sameAddressAsRootEntity && leAddress ? leAddress?.country : parentCompany?.registrationAddressCountry;
423
+ };
424
+ //#endregion
425
+ //#region src/components/EmbeddedDropins/BusinessFinancingComponent/utils.ts
426
+ var getTranslatedGender = (t, gender) => {
427
+ if (!gender) return void 0;
428
+ const key = {
429
+ M: "male",
430
+ F: "female",
431
+ U: "preferNotToSay"
432
+ }[gender];
433
+ return key ? t(($) => $[key]) : gender;
434
+ };
435
+ var getTranslatedLegalInsolvency = (t, insolvencyData) => {
436
+ if (!insolvencyData) return void 0;
437
+ return insolvencyData === "noLegalActionsTaken" ? t(($) => $["no"]) : t(($) => $[insolvencyData]);
438
+ };
439
+ var getValidUserLocale = (locale) => {
440
+ try {
441
+ new Intl.NumberFormat(locale);
442
+ return locale;
443
+ } catch (error) {
444
+ console.warn(`Invalid locale '${locale}' provided. Falling back to 'en-US'.`, error);
445
+ return "en-US";
446
+ }
447
+ };
448
+ var getFormattedAmount = (value, currency) => {
449
+ if (!value) return void 0;
450
+ const userLocale = getValidUserLocale(USER_LOCALE);
451
+ return `${currency} ${Number(value).toLocaleString(userLocale)}`;
452
+ };
453
+ var formatDataForSummary = (language, commonT, t, datasetUtils, data, rootLeAddress) => {
454
+ const summaryData = cloneObject(data) || {};
455
+ const { company, parentCompany, ultimateParentCompany, soleProprietor } = summaryData;
456
+ const rootLeAddressCountry = rootLeAddress?.country;
457
+ if (soleProprietor) {
458
+ soleProprietor.naceCode = soleProprietor.naceCodeLabel;
459
+ soleProprietor.countryOfBirth = soleProprietor.countryOfBirth ? datasetUtils.getCountryName(soleProprietor.countryOfBirth) ?? void 0 : void 0;
460
+ soleProprietor.legalInformationInsolvency = getTranslatedLegalInsolvency(t, soleProprietor.legalInformationInsolvency);
461
+ soleProprietor.legalProceedingsDate = soleProprietor.legalProceedingsDate ? localizeDateString(soleProprietor.legalProceedingsDate, language) : void 0;
462
+ if (soleProprietor.gender) soleProprietor.gender = getTranslatedGender(t, soleProprietor.gender);
463
+ }
464
+ if (company) {
465
+ company.legalForm = company.legalFormLabel;
466
+ company.naceCode = company.naceCodeLabel;
467
+ company.legalEntityIdentifier = company.legalEntityIdentifier ?? "None";
468
+ company.legalInformationInsolvency = getTranslatedLegalInsolvency(t, company?.legalInformationInsolvency);
469
+ company.annualTurnover = getFormattedAmount(company.annualTurnover, company.currency);
470
+ company.balanceSheetTotal = getFormattedAmount(company.balanceSheetTotal, company.currency);
471
+ const { legalProceedingsDate, financialReportingDate } = company;
472
+ company.legalProceedingsDate = legalProceedingsDate ? localizeDateString(legalProceedingsDate, language) : void 0;
473
+ company.financialReportingDate = financialReportingDate ? localizeDateString(financialReportingDate, language) : void 0;
474
+ }
475
+ if (parentCompany) {
476
+ const { legalName, legalFormLabel, naceCodeLabel, country, legalEntityIdentifier, legalInformationInsolvency, annualTurnover, currency, balanceSheetTotal, legalProceedingsDate, financialReportingDate, sameAddressAsRootEntity } = parentCompany;
477
+ if (legalName) {
478
+ parentCompany.legalForm = legalFormLabel;
479
+ parentCompany.naceCode = naceCodeLabel;
480
+ parentCompany.country = country ? datasetUtils.getCountryName(country) : "";
481
+ const registrationAddress = nestAddressSchema("registrationAddress", parentCompany);
482
+ if (registrationAddress) {
483
+ for (const field in parentCompany) if (/^registrationAddress[A-Z]/.test(field)) delete parentCompany[field];
484
+ const country = registrationAddress.country;
485
+ const streetLabel = getKeyForField("street", country);
486
+ const street2Label = getKeyForField("street2", country);
487
+ const { street, street2, ...registrationAddressRest } = registrationAddress;
488
+ parentCompany.registrationAddress = {
489
+ ...registrationAddressRest,
490
+ [commonT(($) => $[streetLabel])]: street,
491
+ [commonT(($) => $[street2Label])]: street2,
492
+ country: datasetUtils.getCountryName(country)
493
+ };
494
+ }
495
+ parentCompany.legalEntityIdentifier = legalEntityIdentifier ?? "None";
496
+ parentCompany.legalInformationInsolvency = getTranslatedLegalInsolvency(t, legalInformationInsolvency);
497
+ parentCompany.annualTurnover = getFormattedAmount(annualTurnover, currency);
498
+ parentCompany.balanceSheetTotal = getFormattedAmount(balanceSheetTotal, currency);
499
+ parentCompany.legalProceedingsDate = legalProceedingsDate ? localizeDateString(legalProceedingsDate, language) : void 0;
500
+ parentCompany.financialReportingDate = financialReportingDate ? localizeDateString(financialReportingDate, language) : void 0;
501
+ if (sameAddressAsRootEntity) {
502
+ delete parentCompany.country;
503
+ summaryData.parentCompany = {
504
+ ...parentCompany,
505
+ registrationAddress: {
506
+ ...rootLeAddress,
507
+ stateOrProvince: rootLeAddress?.stateOrProvince,
508
+ country: datasetUtils.getCountryName(rootLeAddressCountry)
509
+ }
510
+ };
511
+ }
512
+ }
513
+ }
514
+ if (ultimateParentCompany) {
515
+ const { legalName, legalFormLabel, naceCodeLabel, country, legalEntityIdentifier, legalInformationInsolvency, annualTurnover, currency, balanceSheetTotal, legalProceedingsDate, financialReportingDate, sameAddressAsRootEntity } = ultimateParentCompany;
516
+ if (legalName) {
517
+ ultimateParentCompany.legalForm = legalFormLabel;
518
+ ultimateParentCompany.naceCode = naceCodeLabel;
519
+ ultimateParentCompany.country = country ? datasetUtils.getCountryName(country) : "";
520
+ const registrationAddress = nestAddressSchema("registrationAddress", ultimateParentCompany);
521
+ if (registrationAddress) {
522
+ for (const field in ultimateParentCompany) if (/^registrationAddress[A-Z]/.test(field)) delete ultimateParentCompany[field];
523
+ const country = registrationAddress.country;
524
+ const streetLabel = getKeyForField("street", country);
525
+ const street2Label = getKeyForField("street2", country);
526
+ const { street, street2, ...registrationAddressRest } = registrationAddress;
527
+ ultimateParentCompany.registrationAddress = {
528
+ ...registrationAddressRest,
529
+ [commonT(($) => $[streetLabel])]: street,
530
+ [commonT(($) => $[street2Label])]: street2,
531
+ country: datasetUtils.getCountryName(country)
532
+ };
533
+ }
534
+ ultimateParentCompany.legalEntityIdentifier = legalEntityIdentifier ?? "None";
535
+ ultimateParentCompany.legalInformationInsolvency = getTranslatedLegalInsolvency(t, legalInformationInsolvency);
536
+ ultimateParentCompany.annualTurnover = getFormattedAmount(annualTurnover, currency);
537
+ ultimateParentCompany.balanceSheetTotal = getFormattedAmount(balanceSheetTotal, currency);
538
+ ultimateParentCompany.legalProceedingsDate = legalProceedingsDate ? localizeDateString(legalProceedingsDate, language) : void 0;
539
+ ultimateParentCompany.financialReportingDate = financialReportingDate ? localizeDateString(financialReportingDate, language) : void 0;
540
+ if (sameAddressAsRootEntity) {
541
+ delete ultimateParentCompany.country;
542
+ summaryData.ultimateParentCompany = {
543
+ ...ultimateParentCompany,
544
+ registrationAddress: {
545
+ ...rootLeAddress,
546
+ stateOrProvince: rootLeAddress?.stateOrProvince,
547
+ country: datasetUtils.getCountryName(rootLeAddressCountry)
548
+ }
549
+ };
550
+ }
551
+ }
552
+ }
553
+ return summaryData;
554
+ };
555
+ //#endregion
556
+ //#region src/components/EFP/mapping/mapLegalEntityToBusinessFinancing.ts
557
+ var mapLegalEntityToBusinessFinancing = (legalEntity) => {
558
+ if (legalEntity.type === "soleProprietorship") return formatObject(legalEntity, businessFinancingSoleProprietorComponentsKeyMapping);
559
+ if (legalEntity.type === "individual") {
560
+ if (legalEntity.entityAssociations?.find((ea) => ea.entityType === "soleProprietorship" && ea.associatorId === legalEntity.id)) {
561
+ const solePropMapped = formatObject(legalEntity, businessFinancingSoleProprietorComponentsKeyMapping);
562
+ const birthData = legalEntity.individual?.birthData;
563
+ return {
564
+ ...solePropMapped,
565
+ gender: birthData?.genderCode,
566
+ countryOfBirth: birthData?.birthCountry
567
+ };
568
+ }
569
+ }
570
+ return formatObject(legalEntity, businessFinancingComponentsKeyMapping);
571
+ };
572
+ //#endregion
573
+ //#region src/api/datasets/useNaceCodes.ts
574
+ var getNaceCodes = async (baseUrl) => {
575
+ return httpGet({
576
+ baseUrl,
577
+ path: `datasets/naceCodes`
578
+ });
579
+ };
580
+ var useNaceCodes = (options) => {
581
+ const { baseUrl } = useApiContext();
582
+ return useQuery({
583
+ queryKey: ["naceCodes"],
584
+ queryFn: () => getNaceCodes(baseUrl.value),
585
+ ...options
586
+ });
587
+ };
588
+ //#endregion
589
+ //#region src/components/EFP/fields/NaceCodeField/NaceCodeField.tsx
590
+ function NaceCodeField({ name = "naceCode", data, valid, errorMessage, label, readonly, handleChangeFor }) {
591
+ const { t: commonT } = useTranslation("common");
592
+ const { data: naceCodesData } = useNaceCodes();
593
+ const handleChangeForRef = useRef(handleChangeFor);
594
+ useEffect(() => {
595
+ handleChangeForRef.current = handleChangeFor;
596
+ }, [handleChangeFor]);
597
+ const handleChangeForNaceCode = (e) => {
598
+ const naceCodeEvent = { target: {
599
+ name: "naceCode",
600
+ value: e.target.value
601
+ } };
602
+ handleChangeFor("naceCode")(naceCodeEvent);
603
+ };
604
+ useEffect(() => {
605
+ const naceCodeEvent = { target: {
606
+ name: "naceCodeLabel",
607
+ value: naceCodesData?.find((naceCode) => naceCode.id === data.naceCode)?.name
608
+ } };
609
+ handleChangeForRef.current("naceCodeLabel")(naceCodeEvent);
610
+ }, [data.naceCode, naceCodesData]);
611
+ return /* @__PURE__ */ jsx(Field, {
612
+ name,
613
+ label,
614
+ errorMessage,
615
+ isValid: valid.naceCode,
616
+ children: (childProps) => /* @__PURE__ */ jsx(Select, {
617
+ ...childProps,
618
+ name,
619
+ placeholder: commonT(($) => $["selectOne"]),
620
+ selected: data.naceCode,
621
+ items: naceCodesData ?? [],
622
+ readonly: readonly && !!data,
623
+ onChange: handleChangeForNaceCode
624
+ })
625
+ });
626
+ }
627
+ var BusinessFinancing_module_default = {
628
+ "business-financing-lei-radio": "_business-financing-lei-radio_l7xhq_1",
629
+ businessFinancingLeiRadio: "_business-financing-lei-radio_l7xhq_1",
630
+ "business-financing-title": "_business-financing-title_l7xhq_7",
631
+ businessFinancingTitle: "_business-financing-title_l7xhq_7",
632
+ "business-financing-body": "_business-financing-body_l7xhq_12",
633
+ businessFinancingBody: "_business-financing-body_l7xhq_12",
634
+ "business-financing-exposure-financials": "_business-financing-exposure-financials_l7xhq_16",
635
+ businessFinancingExposureFinancials: "_business-financing-exposure-financials_l7xhq_16",
636
+ "business-financing-structured-address": "_business-financing-structured-address_l7xhq_24",
637
+ businessFinancingStructuredAddress: "_business-financing-structured-address_l7xhq_24"
638
+ };
639
+ //#endregion
640
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBusinessInformation.tsx
641
+ var businessInformationFields = [
642
+ "legalForm",
643
+ "naceCode",
644
+ "naceCodeLabel",
645
+ "legalFormLabel",
646
+ "doesYourCompanyHaveLEI",
647
+ "legalEntityIdentifier"
648
+ ];
649
+ function BusinessFinancingBusinessInformation(props) {
650
+ const { data, valid, errors, country, handleFieldChange, fieldValidationErrors, targetPage, sectionHeading, hideSectionHeading, isSoleProprietor } = props;
651
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
652
+ const { t: commonT } = useTranslation("common");
653
+ const formUtils = createFormUtils(props, commonT);
654
+ if (!handleFieldChange) return;
655
+ const isMainCompany = targetPage === BusinessFinancingPages.COMPANY_PAGE;
656
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
657
+ !hideSectionHeading && /* @__PURE__ */ jsx(Typography, {
658
+ el: "h3",
659
+ variant: "title",
660
+ className: BusinessFinancing_module_default.businessFinancingTitle,
661
+ children: sectionHeading ? businessFinancingT(($) => $[sectionHeading]) : businessFinancingT(($) => $["businessInformation"])
662
+ }),
663
+ !isSoleProprietor && /* @__PURE__ */ jsx(LegalFormField, {
664
+ name: "legalForm",
665
+ countryCode: country,
666
+ data: { legalForm: data?.legalForm },
667
+ valid: { legalForm: valid?.legalForm },
668
+ errorMessage: formUtils.getErrorMessage("legalForm", errors, fieldValidationErrors),
669
+ handleChangeFor: handleFieldChange,
670
+ readonly: false,
671
+ label: businessFinancingT(($) => $["businessStructure"])
672
+ }),
673
+ /* @__PURE__ */ jsx(NaceCodeField, {
674
+ name: "naceCode",
675
+ data: { naceCode: data?.naceCode },
676
+ valid: { naceCode: valid?.naceCode },
677
+ errorMessage: formUtils.getErrorMessage("naceCode", errors, fieldValidationErrors),
678
+ handleChangeFor: handleFieldChange,
679
+ readonly: false,
680
+ label: businessFinancingT(($) => $["industryAndNaceCode"])
681
+ }),
682
+ !isSoleProprietor && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Field, {
683
+ el: "fieldset",
684
+ name: "doesYourCompanyHaveLEI",
685
+ label: businessFinancingT(($) => $[isMainCompany ? "doesYourCompanyHaveLEI" : "doesThisCompanyHaveLEI"]),
686
+ helper: /* @__PURE__ */ jsxs(Typography, {
687
+ el: "div",
688
+ variant: "body",
689
+ color: "secondary",
690
+ className: BusinessFinancing_module_default.businessFinancingBody,
691
+ children: [
692
+ businessFinancingT(($) => $["anLEIIsAUniqueCode"]),
693
+ " ",
694
+ /* @__PURE__ */ jsx(Link, {
695
+ href: "https://search.gleif.org/#/search/",
696
+ external: true,
697
+ inline: true,
698
+ children: businessFinancingT(($) => $["lookUpYourLEI"])
699
+ })
700
+ ]
701
+ }),
702
+ errorMessage: formUtils.getErrorMessage("doesYourCompanyHaveLEI", errors, fieldValidationErrors),
703
+ children: (childProps) => /* @__PURE__ */ jsx(RadioGroup, {
704
+ ...childProps,
705
+ name: "doesYourCompanyHaveLEI",
706
+ items: isMainCompany ? businessFinancingRadioItems : businessFinancingParentRadioItems,
707
+ value: data?.doesYourCompanyHaveLEI,
708
+ disabled: false,
709
+ className: BusinessFinancing_module_default.businessFinancingLeiRadio,
710
+ onChange: handleFieldChange("doesYourCompanyHaveLEI"),
711
+ "aria-required": true,
712
+ "aria-invalid": !valid?.doesYourCompanyHaveLEI
713
+ })
714
+ }), data?.doesYourCompanyHaveLEI === "Yes" && /* @__PURE__ */ jsx(Field, {
715
+ name: "legalEntityIdentifier",
716
+ label: businessFinancingT(($) => $["legalEntityIdentifier"]),
717
+ errorMessage: formUtils.getErrorMessage("legalEntityIdentifier", errors, fieldValidationErrors),
718
+ isValid: valid?.legalEntityIdentifier,
719
+ helper: commonT(($) => $["enterNCharactersWithAMixForExample"], {
720
+ numChars: 20,
721
+ example: "529900T8BM49AURSDO55"
722
+ }),
723
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
724
+ ...childProps,
725
+ name: "legalEntityIdentifier",
726
+ value: data?.legalEntityIdentifier,
727
+ readonly: false,
728
+ onInput: handleFieldChange("legalEntityIdentifier", "input"),
729
+ onBlur: handleFieldChange("legalEntityIdentifier", "blur"),
730
+ "aria-required": true,
731
+ "aria-invalid": !valid?.legalEntityIdentifier,
732
+ isValid: valid?.legalEntityIdentifier
733
+ })
734
+ })] })
735
+ ] });
736
+ }
737
+ //#endregion
738
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingFinancialInformation.tsx
739
+ var TODAY_DATE$1 = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
740
+ var financialInformationFields = [
741
+ "numberOfEmployees",
742
+ "financialReportingDate",
743
+ "legalEntityIdentifier",
744
+ "currency",
745
+ "balanceSheetTotal",
746
+ "annualTurnover"
747
+ ];
748
+ function BusinessFinancingFinancialInformation(props) {
749
+ const { data, valid, errors, country, sectionHeading, handleFieldChange, fieldValidationErrors } = props;
750
+ const { t: businessFinancingT, i18n: i18next } = useTranslation("businessFinancing");
751
+ const { t: commonT } = useTranslation("common");
752
+ const formUtils = createFormUtils(props, commonT);
753
+ const currenciesForCurrCountry = useMemo(() => currencyByCountry[country] ?? [], [country]);
754
+ if (!handleFieldChange) return;
755
+ const financialData = data;
756
+ const financialErrors = errors;
757
+ const isFinancialDataValid = valid;
758
+ const [firstCurrency] = currenciesForCurrCountry;
759
+ const defaultCurrency = firstCurrency ?? "EUR";
760
+ if (currenciesForCurrCountry.length === 1 && data?.currency !== firstCurrency) handleFieldChange("currency")(firstCurrency);
761
+ return /* @__PURE__ */ jsxs("section", { children: [
762
+ /* @__PURE__ */ jsx(Typography, {
763
+ el: "h3",
764
+ variant: "title",
765
+ className: BusinessFinancing_module_default.businessFinancingTitle,
766
+ children: sectionHeading ? businessFinancingT(($) => $[sectionHeading]) : businessFinancingT(($) => $["businessFinancials"])
767
+ }),
768
+ /* @__PURE__ */ jsx(Field, {
769
+ name: "numberOfEmployees",
770
+ label: businessFinancingT(($) => $["numberOfEmployees"]),
771
+ helper: businessFinancingT(($) => $["theNumberOfIndividualsReceivingAWageOrSalary"]),
772
+ errorMessage: formUtils.getErrorMessage("numberOfEmployees", errors, fieldValidationErrors),
773
+ isValid: valid?.numberOfEmployees,
774
+ children: (childProps) => /* @__PURE__ */ jsx(InputNumber, {
775
+ ...childProps,
776
+ "aria-required": true,
777
+ "aria-invalid": !valid?.numberOfEmployees,
778
+ name: "numberOfEmployees",
779
+ min: "0",
780
+ step: "1",
781
+ value: data?.numberOfEmployees,
782
+ onInput: handleFieldChange("numberOfEmployees", "input"),
783
+ onBlur: handleFieldChange("numberOfEmployees", "blur")
784
+ })
785
+ }),
786
+ currenciesForCurrCountry?.length > 1 && /* @__PURE__ */ jsx(Currency, {
787
+ country,
788
+ data: formUtils.getFieldData(financialData, CURRENCY_FIELD),
789
+ errors: formUtils.getFieldErrors(financialErrors, fieldValidationErrors, CURRENCY_FIELD),
790
+ handleChangeFor: handleFieldChange,
791
+ labels: { currency: businessFinancingT(($) => $["financialStatementReportingCurrency"]) },
792
+ readonly: formUtils.isReadOnly("currency"),
793
+ valid: formUtils.getFieldValid(isFinancialDataValid, CURRENCY_FIELD)
794
+ }),
795
+ /* @__PURE__ */ jsxs("div", {
796
+ className: BusinessFinancing_module_default.businessFinancingExposureFinancials,
797
+ children: [
798
+ /* @__PURE__ */ jsx(Field, {
799
+ name: "balanceSheetTotal",
800
+ label: businessFinancingT(($) => $["balanceSheetTotal"]),
801
+ helper: businessFinancingT(($) => $["theSumOfTotalLiabilities"]),
802
+ errorMessage: formUtils.getErrorMessage("balanceSheetTotal", errors, fieldValidationErrors),
803
+ isValid: valid?.balanceSheetTotal,
804
+ children: (childProps) => /* @__PURE__ */ jsx(InputCurrency, {
805
+ ...childProps,
806
+ "aria-required": formUtils.isRequiredField("balanceSheetTotal"),
807
+ "aria-invalid": !valid?.balanceSheetTotal,
808
+ locale: i18next.language,
809
+ currency: data?.currency ?? defaultCurrency,
810
+ amount: data?.balanceSheetTotal ? Number(data?.balanceSheetTotal) : void 0,
811
+ onAmountChanged: handleFieldChange("balanceSheetTotal")
812
+ })
813
+ }),
814
+ /* @__PURE__ */ jsx(Field, {
815
+ name: "financialReportingDate",
816
+ label: businessFinancingT(($) => $["statementReportingDate"]),
817
+ helper: businessFinancingT(($) => $["useTheMoreRecentOfTheReportingDates"]),
818
+ errorMessage: formUtils.getErrorMessage("financialReportingDate", errors, fieldValidationErrors),
819
+ isValid: valid?.financialReportingDate,
820
+ children: (childProps) => /* @__PURE__ */ jsx(InputDate, {
821
+ ...childProps,
822
+ name: "financialReportingDate",
823
+ value: data?.financialReportingDate,
824
+ onInput: handleFieldChange("financialReportingDate", "input"),
825
+ onBlur: handleFieldChange("financialReportingDate", "blur"),
826
+ "aria-required": true,
827
+ "aria-invalid": !valid?.financialReportingDate,
828
+ max: TODAY_DATE$1
829
+ })
830
+ }),
831
+ /* @__PURE__ */ jsx(Field, {
832
+ name: "annualTurnover",
833
+ label: businessFinancingT(($) => $["annualTurnover"]),
834
+ helper: businessFinancingT(($) => $["theAnnualSalesRevenue"]),
835
+ errorMessage: formUtils.getErrorMessage("annualTurnover", errors, fieldValidationErrors),
836
+ isValid: valid?.annualTurnover,
837
+ children: (childProps) => /* @__PURE__ */ jsx(InputCurrency, {
838
+ ...childProps,
839
+ name: "annualTurnover",
840
+ "aria-required": formUtils.isRequiredField("annualTurnover"),
841
+ "aria-invalid": !valid?.annualTurnover,
842
+ locale: i18next.language,
843
+ currency: data?.currency ?? defaultCurrency,
844
+ amount: data?.annualTurnover ? Number(data?.annualTurnover) : void 0,
845
+ onAmountChanged: handleFieldChange("annualTurnover")
846
+ })
847
+ })
848
+ ]
849
+ })
850
+ ] });
851
+ }
852
+ //#endregion
853
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingLegalInformation.tsx
854
+ var TODAY_DATE = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
855
+ var legalInformationFields = ["legalInformationInsolvency", "legalProceedingsDate"];
856
+ function BusinessFinancingLegalInformation(props) {
857
+ const { data, valid, errors, fieldValidationErrors, handleFieldChange, sectionHeading } = props;
858
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
859
+ const { t: commonT } = useTranslation("common");
860
+ const formUtils = createFormUtils(props, commonT);
861
+ if (!handleFieldChange) return;
862
+ const legalInformationInsolvencyItems = [
863
+ {
864
+ id: "noLegalActionsTaken",
865
+ name: commonT(($) => $["no"])
866
+ },
867
+ {
868
+ id: "underJudicialAdministration",
869
+ name: businessFinancingT(($) => $["yesTheCompanyIsUnderJudicialAdministration"])
870
+ },
871
+ {
872
+ id: "bankruptcyInsolvency",
873
+ name: businessFinancingT(($) => $["yesTheCompanyIsFilingForBankruptcy"])
874
+ },
875
+ {
876
+ id: "otherLegalMeasures",
877
+ name: businessFinancingT(($) => $["yesTheCompanyIsFacingOtherLegalMeasures"])
878
+ },
879
+ {
880
+ id: "iDontKnow",
881
+ name: commonT(($) => $["iDontKnow"])
882
+ }
883
+ ];
884
+ const showLegalProceedingsDateField = data?.legalInformationInsolvency && !["noLegalActionsTaken", "iDontKnow"].includes(data?.legalInformationInsolvency);
885
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
886
+ /* @__PURE__ */ jsx(Typography, {
887
+ el: "h3",
888
+ variant: "title",
889
+ className: BusinessFinancing_module_default.businessFinancingTitle,
890
+ children: sectionHeading ? businessFinancingT(($) => $[sectionHeading]) : businessFinancingT(($) => $["legalInformation"])
891
+ }),
892
+ /* @__PURE__ */ jsx(Field, {
893
+ name: "legalInformationInsolvency",
894
+ label: businessFinancingT(($) => $["legalInformationInsolvency"]),
895
+ errorMessage: formUtils.getErrorMessage("legalInformationInsolvency", errors, fieldValidationErrors),
896
+ isValid: valid?.legalInformationInsolvency,
897
+ children: (childProps) => /* @__PURE__ */ jsx(Select, {
898
+ ...childProps,
899
+ onChange: handleFieldChange("legalInformationInsolvency", "blur"),
900
+ name: "legalInformationInsolvency",
901
+ placeholder: commonT(($) => $["selectOne"]),
902
+ selected: data?.legalInformationInsolvency,
903
+ items: legalInformationInsolvencyItems,
904
+ "aria-required": true,
905
+ "aria-invalid": !valid?.legalInformationInsolvency
906
+ })
907
+ }),
908
+ showLegalProceedingsDateField && /* @__PURE__ */ jsx(Field, {
909
+ name: "legalProceedingsDate",
910
+ label: businessFinancingT(($) => $["legalProceedingsDate"]),
911
+ errorMessage: formUtils.getErrorMessage("legalProceedingsDate", errors, fieldValidationErrors),
912
+ isValid: valid?.legalProceedingsDate,
913
+ children: (childProps) => /* @__PURE__ */ jsx(InputDate, {
914
+ ...childProps,
915
+ name: "legalProceedingsDate",
916
+ value: data.legalProceedingsDate,
917
+ onInput: handleFieldChange("legalProceedingsDate", "input"),
918
+ onBlur: handleFieldChange("legalProceedingsDate", "blur"),
919
+ "aria-required": true,
920
+ "aria-invalid": !valid?.legalProceedingsDate,
921
+ max: TODAY_DATE
922
+ })
923
+ })
924
+ ] });
925
+ }
926
+ //#endregion
927
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingOwnershipStructure.tsx
928
+ var ownershipStructureFields = ["isCompanyOwnedByAnotherCompany", "isParentOwnedByAnotherCompany"];
929
+ function BusinessFinancingOwnershipStructure(props) {
930
+ const { data, valid, errors = {}, legalEntity, fieldValidationErrors, handleFieldChange } = props;
931
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
932
+ const { t: commonT } = useTranslation("common");
933
+ const formUtils = createFormUtils(props, commonT);
934
+ if (!handleFieldChange) return;
935
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
936
+ /* @__PURE__ */ jsx(Typography, {
937
+ el: "h3",
938
+ variant: "title",
939
+ className: BusinessFinancing_module_default.businessFinancingTitle,
940
+ children: businessFinancingT(($) => $["ownershipStructure"])
941
+ }),
942
+ /* @__PURE__ */ jsx(Field, {
943
+ el: "fieldset",
944
+ name: "isCompanyOwnedByAnotherCompany",
945
+ label: businessFinancingT(($) => $["isCompanyOwnedByAnotherCompany"], { company: legalEntity?.organization ? legalEntity.organization.legalName : "" }),
946
+ errorMessage: formUtils.getErrorMessage("isCompanyOwnedByAnotherCompany", errors, fieldValidationErrors),
947
+ helper: /* @__PURE__ */ jsx(Typography, {
948
+ el: "div",
949
+ variant: "body",
950
+ color: "secondary",
951
+ className: BusinessFinancing_module_default.businessFinancingBody,
952
+ children: businessFinancingT(($) => $["thisMeansYouHaveAParentCompany"])
953
+ }),
954
+ children: (childProps) => /* @__PURE__ */ jsx(RadioGroup, {
955
+ ...childProps,
956
+ name: "isCompanyOwnedByAnotherCompany",
957
+ items: businessFinancingRadioItems,
958
+ value: data?.isCompanyOwnedByAnotherCompany,
959
+ className: BusinessFinancing_module_default.businessFinancingLeiRadio,
960
+ disabled: false,
961
+ onChange: handleFieldChange("isCompanyOwnedByAnotherCompany"),
962
+ "aria-required": true,
963
+ "aria-invalid": !valid?.isCompanyOwnedByAnotherCompany
964
+ })
965
+ }),
966
+ data?.isCompanyOwnedByAnotherCompany === "Yes" && /* @__PURE__ */ jsx(Field, {
967
+ el: "fieldset",
968
+ name: "isParentOwnedByAnotherCompany",
969
+ label: businessFinancingT(($) => $["isParentOwnedByAnotherCompany"]),
970
+ helper: /* @__PURE__ */ jsx(Typography, {
971
+ el: "div",
972
+ variant: "body",
973
+ color: "secondary",
974
+ className: BusinessFinancing_module_default.businessFinancingBody,
975
+ children: businessFinancingT(($) => $["thisMeansYouHaveAnUltimateParentCompany"])
976
+ }),
977
+ errorMessage: formUtils.getErrorMessage("isParentOwnedByAnotherCompany", errors, fieldValidationErrors),
978
+ children: (childProps) => /* @__PURE__ */ jsx(RadioGroup, {
979
+ ...childProps,
980
+ name: "isParentOwnedByAnotherCompany",
981
+ items: businessFinancingRadioItems,
982
+ value: data.isParentOwnedByAnotherCompany,
983
+ className: BusinessFinancing_module_default.businessFinancingLeiRadio,
984
+ disabled: false,
985
+ onChange: handleFieldChange("isParentOwnedByAnotherCompany"),
986
+ "aria-required": true,
987
+ "aria-invalid": !valid?.isParentOwnedByAnotherCompany
988
+ })
989
+ })
990
+ ] });
991
+ }
992
+ //#endregion
993
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingCompany.tsx
994
+ function AdditionalFieldsForBusinessFinancingCompany(props) {
995
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
996
+ const { t: commonT } = useTranslation("common");
997
+ const { form: { handleChangeFor, data, setValid } } = useFormContext();
998
+ const { country, formVerificationErrors, legalEntity, fieldValidationErrors } = props;
999
+ const formUtils = createFormUtils(props, commonT);
1000
+ const handleChange = (fieldName, mode) => handleChangeFor("company", fieldName, mode);
1001
+ const ownershipStructureProps = getFieldProps(props, ownershipStructureFields);
1002
+ const businessInformationProps = getFieldProps(props, businessInformationFields);
1003
+ const financialInformationProps = getFieldProps(props, financialInformationFields);
1004
+ const legalInformationProps = getFieldProps(props, legalInformationFields);
1005
+ if ((currencyByCountry[country] ?? [])?.length === 1) setValid("company", "currency", true);
1006
+ return /* @__PURE__ */ jsxs("form", {
1007
+ "data-testid": "businessFinancingCompany",
1008
+ children: [
1009
+ /* @__PURE__ */ jsx(Header, {
1010
+ title: businessFinancingT(($) => $["additionalInformationForBusinessFinancing"]),
1011
+ description: businessFinancingT(($) => $["weNeedAFewMoreDetailsAboutYouAndYourBusiness"]),
1012
+ secondary: true
1013
+ }),
1014
+ /* @__PURE__ */ jsx(ErrorPanel, {
1015
+ verificationErrors: formVerificationErrors,
1016
+ validationErrors: fieldValidationErrors,
1017
+ formUtils,
1018
+ id: "ariaErrorField"
1019
+ }),
1020
+ /* @__PURE__ */ jsx(BusinessFinancingBusinessInformation, {
1021
+ ...businessInformationProps,
1022
+ handleFieldChange: handleChange,
1023
+ country,
1024
+ targetPage: BusinessFinancingPages.COMPANY_PAGE,
1025
+ sectionHeading: "businessInformation",
1026
+ data: formUtils.getFieldData(data?.company ?? {}, businessInformationFields)
1027
+ }),
1028
+ isEeaCountry(country) && /* @__PURE__ */ jsx(BusinessFinancingFinancialInformation, {
1029
+ ...financialInformationProps,
1030
+ handleFieldChange: handleChange,
1031
+ country,
1032
+ targetPage: BusinessFinancingPages.COMPANY_PAGE,
1033
+ data: formUtils.getFieldData(data?.company ?? {}, financialInformationFields)
1034
+ }),
1035
+ /* @__PURE__ */ jsx(BusinessFinancingLegalInformation, {
1036
+ ...legalInformationProps,
1037
+ country,
1038
+ handleFieldChange: handleChange,
1039
+ targetPage: BusinessFinancingPages.COMPANY_PAGE,
1040
+ sectionHeading: "legalInformation",
1041
+ data: formUtils.getFieldData(data?.company ?? {}, legalInformationFields)
1042
+ }),
1043
+ /* @__PURE__ */ jsx(BusinessFinancingOwnershipStructure, {
1044
+ ...ownershipStructureProps,
1045
+ legalEntity,
1046
+ handleFieldChange: handleChange,
1047
+ data: formUtils.getFieldData(data?.company ?? {}, ownershipStructureFields)
1048
+ })
1049
+ ]
1050
+ });
1051
+ }
1052
+ //#endregion
1053
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingBasicCompanyInformation.tsx
1054
+ var basicInformationFields = ["legalName"];
1055
+ function BusinessFinancingBasicCompanyInformation(props) {
1056
+ const { data, valid, errors, fieldValidationErrors, handleFieldChange, sectionHeading } = props;
1057
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
1058
+ const { t: commonT } = useTranslation("common");
1059
+ const formUtils = createFormUtils(props, commonT);
1060
+ if (!handleFieldChange) return;
1061
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Typography, {
1062
+ el: "h3",
1063
+ variant: "title",
1064
+ className: BusinessFinancing_module_default.businessFinancingTitle,
1065
+ children: sectionHeading ? businessFinancingT(($) => $[sectionHeading]) : businessFinancingT(($) => $["basicCompanyInformation"])
1066
+ }), /* @__PURE__ */ jsx(Field, {
1067
+ name: "legalName",
1068
+ label: businessFinancingT(($) => $["legalName"]),
1069
+ errorMessage: formUtils.getErrorMessage("legalName", errors, fieldValidationErrors),
1070
+ isValid: valid?.legalName,
1071
+ helper: businessFinancingT(($) => $["legalNameIsUsedToIdentifyABusinessWithTheGovernment"]),
1072
+ helperPosition: "below",
1073
+ children: (childProps) => /* @__PURE__ */ jsx(InputText, {
1074
+ ...childProps,
1075
+ name: "legalName",
1076
+ value: data?.legalName,
1077
+ readonly: false,
1078
+ onInput: handleFieldChange("legalName", "input"),
1079
+ onBlur: handleFieldChange("legalName", "blur"),
1080
+ "aria-required": true,
1081
+ "aria-invalid": !valid?.legalName
1082
+ })
1083
+ })] });
1084
+ }
1085
+ //#endregion
1086
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingRegisteredAddress.tsx
1087
+ var registeredAddressFields = [
1088
+ "isThisAddressTheMainHeadquarters",
1089
+ "sameAddressAsRootEntity",
1090
+ ...getPrefixedAddressFieldNames("registrationAddress")
1091
+ ];
1092
+ function BusinessFinancingRegisteredAddress(props) {
1093
+ const { data, valid, errors, fieldValidationErrors, handleFieldChange, formId, legalEntity, sectionHeading } = props;
1094
+ const { t: businessFinancingT, i18n } = useTranslation("businessFinancing");
1095
+ const { t: commonT } = useTranslation("common");
1096
+ const { form } = useFormContext();
1097
+ const formUtils = createFormUtils(props, commonT);
1098
+ const datasetUtils = datasetUtilities(i18n.language);
1099
+ if (!handleFieldChange) return;
1100
+ const addressFieldsProps = getPrefixedFieldProps({
1101
+ ...getFormSlice(form, formId),
1102
+ handleFieldChange
1103
+ }, "registrationAddress", addressFields);
1104
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1105
+ /* @__PURE__ */ jsx(Typography, {
1106
+ el: "h3",
1107
+ variant: "title",
1108
+ className: BusinessFinancing_module_default.businessFinancingTitle,
1109
+ children: sectionHeading ? translateTranslatable(commonT, sectionHeading) : commonT(($) => $["registeredAddress"])
1110
+ }),
1111
+ /* @__PURE__ */ jsx(Field, {
1112
+ name: "sameAddressAsRootEntity",
1113
+ errorMessage: formatValidationError(errors?.sameAddressAsRootEntity?.errorMessage, commonT),
1114
+ isValid: valid?.sameAddressAsRootEntity,
1115
+ children: (childProps) => /* @__PURE__ */ jsx(Checkbox, {
1116
+ ...childProps,
1117
+ "aria-required": formUtils.isRequiredField("sameAddressAsRootEntity"),
1118
+ "aria-invalid": !valid?.sameAddressAsRootEntity,
1119
+ name: "sameAddressAsRootEntity",
1120
+ label: businessFinancingT(($) => $["sameAddressAsRootEntity"], { rootLegalEntityName: legalEntity?.organization?.legalName ?? "" }),
1121
+ checked: data?.sameAddressAsRootEntity ?? false,
1122
+ onChange: handleFieldChange("sameAddressAsRootEntity")
1123
+ })
1124
+ }),
1125
+ data?.sameAddressAsRootEntity && legalEntity?.organization?.registeredAddress ? /* @__PURE__ */ jsxs("div", {
1126
+ className: BusinessFinancing_module_default.businessFinancingStructuredAddress,
1127
+ children: [
1128
+ /* @__PURE__ */ jsx("div", { children: legalEntity.organization.registeredAddress.street }),
1129
+ /* @__PURE__ */ jsx("div", { children: legalEntity.organization.registeredAddress.street2 }),
1130
+ /* @__PURE__ */ jsxs("div", { children: [
1131
+ legalEntity.organization.registeredAddress.city,
1132
+ " ",
1133
+ legalEntity.organization.registeredAddress.postalCode ? `, ${legalEntity.organization.registeredAddress.postalCode}` : ""
1134
+ ] }),
1135
+ /* @__PURE__ */ jsx("div", { children: legalEntity.organization.registeredAddress.stateOrProvince }),
1136
+ /* @__PURE__ */ jsx("div", { children: legalEntity.organization.registeredAddress.country ? datasetUtils.getCountryName(legalEntity.organization.registeredAddress.country) : "" })
1137
+ ]
1138
+ }) : /* @__PURE__ */ jsx(AddressFields, {
1139
+ ...addressFieldsProps,
1140
+ addressType: "registrationAddress"
1141
+ }),
1142
+ /* @__PURE__ */ jsx(Field, {
1143
+ el: "fieldset",
1144
+ name: "isThisAddressTheMainHeadquarters",
1145
+ label: businessFinancingT(($) => $["areTheMainHeadquartersAtThisAddress"]),
1146
+ helper: businessFinancingT(($) => $["addressRegisteredWithGovernment"]),
1147
+ errorMessage: formUtils.getErrorMessage("isThisAddressTheMainHeadquarters", errors, fieldValidationErrors),
1148
+ children: (childProps) => /* @__PURE__ */ jsx(RadioGroup, {
1149
+ ...childProps,
1150
+ name: "isThisAddressTheMainHeadquarters",
1151
+ items: businessFinancingRadioItems,
1152
+ value: data?.isThisAddressTheMainHeadquarters,
1153
+ className: BusinessFinancing_module_default.businessFinancingLeiRadio,
1154
+ disabled: false,
1155
+ onChange: handleFieldChange("isThisAddressTheMainHeadquarters"),
1156
+ "aria-required": true,
1157
+ "aria-invalid": !valid?.isThisAddressTheMainHeadquarters
1158
+ })
1159
+ })
1160
+ ] });
1161
+ }
1162
+ //#endregion
1163
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingParentCompany.tsx
1164
+ var parentCompanyFormId$1 = businessFinancingForms.parentCompany.formId;
1165
+ function AdditionalFieldsForBusinessFinancingParentCompany(props) {
1166
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
1167
+ const { t: commonT } = useTranslation("common");
1168
+ const { form: { handleChangeFor, data, setValid } } = useFormContext();
1169
+ const { country, formVerificationErrors, fieldValidationErrors, legalEntity } = props;
1170
+ const formUtils = createFormUtils(props, commonT);
1171
+ const handleChange = (fieldName, mode) => handleChangeFor("parentCompany", fieldName, mode);
1172
+ setValid("parentCompany", "sameAddressAsRootEntity", true);
1173
+ const basicCompanyInformationProps = getFieldProps(props, basicInformationFields);
1174
+ const registeredAddressProps = getFieldProps(props, registeredAddressFields);
1175
+ const businessInformationProps = getFieldProps(props, businessInformationFields);
1176
+ const financialInformationProps = getFieldProps(props, financialInformationFields);
1177
+ const legalInformationProps = getFieldProps(props, legalInformationFields);
1178
+ const addressCountry = getAddressCountryForParentCompany(data?.parentCompany, legalEntity?.organization?.registeredAddress);
1179
+ if ((currencyByCountry[addressCountry ?? country] ?? [])?.length === 1) setValid("parentCompany", "currency", true);
1180
+ return /* @__PURE__ */ jsxs("form", {
1181
+ "data-testid": "businessFinancingParentCompany",
1182
+ children: [
1183
+ /* @__PURE__ */ jsx(Typography, {
1184
+ el: "h1",
1185
+ variant: "title-l",
1186
+ className: BusinessFinancing_module_default.businessFinancingBody,
1187
+ children: businessFinancingT(($) => $["parentCompanyInformation"])
1188
+ }),
1189
+ /* @__PURE__ */ jsx(Typography, {
1190
+ el: "p",
1191
+ variant: "body",
1192
+ className: BusinessFinancing_module_default.businessFinancingBody,
1193
+ children: businessFinancingT(($) => $["inThePreviousStepOwnedByAParentCompany"])
1194
+ }),
1195
+ /* @__PURE__ */ jsx(ErrorPanel, {
1196
+ verificationErrors: formVerificationErrors,
1197
+ validationErrors: fieldValidationErrors,
1198
+ formUtils,
1199
+ id: "ariaErrorField"
1200
+ }),
1201
+ /* @__PURE__ */ jsx(BusinessFinancingBasicCompanyInformation, {
1202
+ ...basicCompanyInformationProps,
1203
+ sectionHeading: "parentCompanyInformation",
1204
+ handleFieldChange: handleChange,
1205
+ data: formUtils.getFieldData(data?.parentCompany ?? {}, basicInformationFields)
1206
+ }),
1207
+ /* @__PURE__ */ jsx(BusinessFinancingRegisteredAddress, {
1208
+ ...registeredAddressProps,
1209
+ formId: parentCompanyFormId$1,
1210
+ sectionHeading: "parentCompanyAddress",
1211
+ defaultData: data?.parentCompany,
1212
+ legalEntity,
1213
+ handleFieldChange: handleChange,
1214
+ data: formUtils.getFieldData(data?.parentCompany ?? {}, registeredAddressFields)
1215
+ }),
1216
+ /* @__PURE__ */ jsx(BusinessFinancingBusinessInformation, {
1217
+ ...businessInformationProps,
1218
+ hideSectionHeading: true,
1219
+ country: addressCountry ?? country,
1220
+ targetPage: BusinessFinancingPages.PARENT_COMPANY_PAGE,
1221
+ handleFieldChange: handleChange,
1222
+ data: formUtils.getFieldData(data?.parentCompany ?? {}, businessInformationFields)
1223
+ }),
1224
+ isEeaCountry(addressCountry) && /* @__PURE__ */ jsx(BusinessFinancingFinancialInformation, {
1225
+ ...financialInformationProps,
1226
+ country: addressCountry ?? country,
1227
+ targetPage: BusinessFinancingPages.PARENT_COMPANY_PAGE,
1228
+ handleFieldChange: handleChange,
1229
+ data: formUtils.getFieldData(data?.parentCompany ?? {}, financialInformationFields)
1230
+ }),
1231
+ /* @__PURE__ */ jsx(BusinessFinancingLegalInformation, {
1232
+ ...legalInformationProps,
1233
+ country: addressCountry ?? country,
1234
+ targetPage: BusinessFinancingPages.PARENT_COMPANY_PAGE,
1235
+ sectionHeading: "legalInformation",
1236
+ handleFieldChange: handleChange,
1237
+ data: formUtils.getFieldData(data?.parentCompany ?? {}, legalInformationFields)
1238
+ })
1239
+ ]
1240
+ });
1241
+ }
1242
+ //#endregion
1243
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSoleProprietorPersonalInformation.tsx
1244
+ var soleProprietorPersonalInformationFields = ["gender", "countryOfBirth"];
1245
+ function BusinessFinancingSoleProprietorPersonalInformation(props) {
1246
+ const { data, valid, errors, handleFieldChange, fieldValidationErrors, sectionHeading } = props;
1247
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
1248
+ const { t: commonT } = useTranslation("common");
1249
+ const formUtils = createFormUtils(props, commonT);
1250
+ if (!handleFieldChange) return;
1251
+ const genderItems = [
1252
+ {
1253
+ id: "M",
1254
+ name: businessFinancingT(($) => $["male"])
1255
+ },
1256
+ {
1257
+ id: "F",
1258
+ name: businessFinancingT(($) => $["female"])
1259
+ },
1260
+ {
1261
+ id: "U",
1262
+ name: businessFinancingT(($) => $["preferNotToSay"])
1263
+ }
1264
+ ];
1265
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1266
+ /* @__PURE__ */ jsx(Typography, {
1267
+ el: "h3",
1268
+ variant: "title",
1269
+ className: BusinessFinancing_module_default.businessFinancingTitle,
1270
+ children: sectionHeading ? businessFinancingT(($) => $[sectionHeading]) : businessFinancingT(($) => $["personalInformation"])
1271
+ }),
1272
+ /* @__PURE__ */ jsx(CountryField, {
1273
+ data: { country: data?.countryOfBirth },
1274
+ valid: { country: valid?.countryOfBirth },
1275
+ name: "countryOfBirth",
1276
+ errors: { country: formUtils.getErrorMessage("countryOfBirth", errors, fieldValidationErrors) },
1277
+ labels: { country: businessFinancingT(($) => $["countryOfBirth"]) },
1278
+ readonly: formUtils.isReadOnly("countryOfBirth"),
1279
+ handleChangeFor: () => handleFieldChange("countryOfBirth", "input")
1280
+ }),
1281
+ /* @__PURE__ */ jsx(Field, {
1282
+ name: "gender",
1283
+ label: businessFinancingT(($) => $["gender"]),
1284
+ errorMessage: formUtils.getErrorMessage("gender", errors, fieldValidationErrors),
1285
+ isValid: valid?.gender,
1286
+ children: (childProps) => /* @__PURE__ */ jsx(Select, {
1287
+ ...childProps,
1288
+ onChange: handleFieldChange("gender", "blur"),
1289
+ name: "gender",
1290
+ placeholder: commonT(($) => $["selectOne"]),
1291
+ selected: data?.gender,
1292
+ items: genderItems,
1293
+ "aria-required": true,
1294
+ "aria-invalid": !valid?.gender
1295
+ })
1296
+ })
1297
+ ] });
1298
+ }
1299
+ //#endregion
1300
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingSoleProprietor.tsx
1301
+ function AdditionalFieldsForBusinessFinancingSoleProprietor(props) {
1302
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
1303
+ const { t: commonT } = useTranslation("common");
1304
+ const { form: { handleChangeFor, data } } = useFormContext();
1305
+ const { country, formVerificationErrors, fieldValidationErrors } = props;
1306
+ const formUtils = createFormUtils(props, commonT);
1307
+ const handleChange = (fieldName, mode) => handleChangeFor("soleProprietor", fieldName, mode);
1308
+ const personalInformationProps = getFieldProps(props, soleProprietorPersonalInformationFields);
1309
+ const businessInformationProps = getFieldProps(props, ["naceCode", "naceCodeLabel"]);
1310
+ const legalInformationProps = getFieldProps(props, legalInformationFields);
1311
+ return /* @__PURE__ */ jsxs("form", {
1312
+ "data-testid": "businessFinancingCompany",
1313
+ children: [
1314
+ /* @__PURE__ */ jsx(Header, {
1315
+ title: businessFinancingT(($) => $["additionalInformationForBusinessFinancing"]),
1316
+ description: businessFinancingT(($) => $["weNeedAFewMoreDetailsAboutYouAndYourBusiness"]),
1317
+ secondary: true
1318
+ }),
1319
+ /* @__PURE__ */ jsx(ErrorPanel, {
1320
+ verificationErrors: formVerificationErrors,
1321
+ validationErrors: fieldValidationErrors,
1322
+ formUtils,
1323
+ id: "ariaErrorField"
1324
+ }),
1325
+ /* @__PURE__ */ jsx(BusinessFinancingSoleProprietorPersonalInformation, {
1326
+ ...personalInformationProps,
1327
+ handleFieldChange: handleChange,
1328
+ country,
1329
+ targetPage: BusinessFinancingPages.SOLE_PROPRIETOR_PAGE,
1330
+ sectionHeading: "personalInformation",
1331
+ data: formUtils.getFieldData(data?.soleProprietor ?? {}, soleProprietorPersonalInformationFields)
1332
+ }),
1333
+ /* @__PURE__ */ jsx(BusinessFinancingBusinessInformation, {
1334
+ ...businessInformationProps,
1335
+ handleFieldChange: handleChange,
1336
+ country,
1337
+ targetPage: BusinessFinancingPages.SOLE_PROPRIETOR_PAGE,
1338
+ sectionHeading: "businessInformation",
1339
+ isSoleProprietor: true,
1340
+ data: formUtils.getFieldData(data?.soleProprietor ?? {}, ["naceCode", "naceCodeLabel"])
1341
+ }),
1342
+ /* @__PURE__ */ jsx(BusinessFinancingLegalInformation, {
1343
+ ...legalInformationProps,
1344
+ country,
1345
+ handleFieldChange: handleChange,
1346
+ targetPage: BusinessFinancingPages.SOLE_PROPRIETOR_PAGE,
1347
+ sectionHeading: "legalInformation",
1348
+ data: formUtils.getFieldData(data?.soleProprietor ?? {}, legalInformationFields)
1349
+ })
1350
+ ]
1351
+ });
1352
+ }
1353
+ //#endregion
1354
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/AdditionalFieldsForBusinessFinancingUltimateParentCompany.tsx
1355
+ var ultimateParentCompanyFormId$1 = businessFinancingForms.ultimateParentCompany.formId;
1356
+ function AdditionalFieldsForBusinessFinancingUltimateParentCompany(props) {
1357
+ const { formVerificationErrors, country, fieldValidationErrors, legalEntity } = props;
1358
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
1359
+ const { t: commonT } = useTranslation("common");
1360
+ const formUtils = createFormUtils(props, commonT);
1361
+ const { form: { handleChangeFor, data, setValid } } = useFormContext();
1362
+ const handleChange = (fieldName, mode) => handleChangeFor("ultimateParentCompany", fieldName, mode);
1363
+ setValid("ultimateParentCompany", "sameAddressAsRootEntity", true);
1364
+ const basicCompanyInformationProps = getFieldProps(props, basicInformationFields);
1365
+ const registeredAddressProps = getFieldProps(props, registeredAddressFields);
1366
+ const businessInformationProps = getFieldProps(props, businessInformationFields);
1367
+ const financialInformationProps = getFieldProps(props, financialInformationFields);
1368
+ const legalInformationProps = getFieldProps(props, legalInformationFields);
1369
+ const addressCountry = getAddressCountryForParentCompany(data?.ultimateParentCompany, legalEntity?.organization?.registeredAddress);
1370
+ if ((currencyByCountry[addressCountry ?? country] ?? [])?.length === 1) setValid("ultimateParentCompany", "currency", true);
1371
+ return /* @__PURE__ */ jsxs("form", {
1372
+ "data-testid": "businessFinancingUltimateParentCompany",
1373
+ children: [
1374
+ /* @__PURE__ */ jsx(Typography, {
1375
+ el: "h1",
1376
+ variant: "title-l",
1377
+ className: BusinessFinancing_module_default.businessFinancingBody,
1378
+ children: commonT(($) => $["ultimateParentCompanyInformation"])
1379
+ }),
1380
+ /* @__PURE__ */ jsx(Typography, {
1381
+ el: "p",
1382
+ variant: "body",
1383
+ className: BusinessFinancing_module_default.businessFinancingBody,
1384
+ children: businessFinancingT(($) => $["inThePreviousStepOwnedByAnUltimateParentCompany"])
1385
+ }),
1386
+ /* @__PURE__ */ jsx(ErrorPanel, {
1387
+ verificationErrors: formVerificationErrors,
1388
+ validationErrors: fieldValidationErrors,
1389
+ formUtils,
1390
+ id: "ariaErrorField"
1391
+ }),
1392
+ /* @__PURE__ */ jsx(BusinessFinancingBasicCompanyInformation, {
1393
+ ...basicCompanyInformationProps,
1394
+ sectionHeading: "ultimateParentCompanyInformation",
1395
+ handleFieldChange: handleChange,
1396
+ data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, basicInformationFields)
1397
+ }),
1398
+ /* @__PURE__ */ jsx(BusinessFinancingRegisteredAddress, {
1399
+ ...registeredAddressProps,
1400
+ formId: ultimateParentCompanyFormId$1,
1401
+ sectionHeading: "ultimateParentCompanyAddress",
1402
+ defaultData: data?.ultimateParentCompany,
1403
+ handleFieldChange: handleChange,
1404
+ data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, registeredAddressFields),
1405
+ legalEntity
1406
+ }),
1407
+ /* @__PURE__ */ jsx(BusinessFinancingBusinessInformation, {
1408
+ ...businessInformationProps,
1409
+ hideSectionHeading: true,
1410
+ country: addressCountry ?? country,
1411
+ targetPage: BusinessFinancingPages.ULTIMATE_PARENT_COMPANY_PAGE,
1412
+ handleFieldChange: handleChange,
1413
+ data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, businessInformationFields)
1414
+ }),
1415
+ isEeaCountry(addressCountry) && /* @__PURE__ */ jsx(BusinessFinancingFinancialInformation, {
1416
+ ...financialInformationProps,
1417
+ country: addressCountry ?? country,
1418
+ targetPage: BusinessFinancingPages.ULTIMATE_PARENT_COMPANY_PAGE,
1419
+ handleFieldChange: handleChange,
1420
+ data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, financialInformationFields)
1421
+ }),
1422
+ /* @__PURE__ */ jsx(BusinessFinancingLegalInformation, {
1423
+ ...legalInformationProps,
1424
+ country: addressCountry ?? country,
1425
+ sectionHeading: "legalInformation",
1426
+ targetPage: BusinessFinancingPages.ULTIMATE_PARENT_COMPANY_PAGE,
1427
+ handleFieldChange: handleChange,
1428
+ data: formUtils.getFieldData(data?.ultimateParentCompany ?? {}, legalInformationFields)
1429
+ })
1430
+ ]
1431
+ });
1432
+ }
1433
+ //#endregion
1434
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingSummary.tsx
1435
+ var omittedSummaryKeys = [
1436
+ "naceCodeLabel",
1437
+ "legalFormLabel",
1438
+ "currency",
1439
+ "doesYourCompanyHaveLEI",
1440
+ "sameAddressAsRootEntity"
1441
+ ];
1442
+ var customLabels = {
1443
+ legalForm: "businessStructure",
1444
+ naceCode: "industryAndNaceCode",
1445
+ balanceSheetTotal: "totalAssets",
1446
+ annualTurnover: "annualTurnover",
1447
+ legalInformationInsolvency: "legalProceedings",
1448
+ isCompanyOwnedByAnotherCompany: "hasParentCompany",
1449
+ isParentOwnedByAnotherCompany: "hasUltimateParentCompany",
1450
+ isThisAddressTheMainHeadquarters: "addressIsHeadquarters"
1451
+ };
1452
+ var isOmmitted = (key) => {
1453
+ return omittedSummaryKeys.includes(key);
1454
+ };
1455
+ var isCustomLabel = (key) => {
1456
+ return key in customLabels;
1457
+ };
1458
+ /**
1459
+ * Business and data layer around Summary, processing all the data
1460
+ */
1461
+ var BusinessFinancingSummary = ({ forms, items, handleEditForm, children }) => {
1462
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
1463
+ const { t: commonT } = useTranslation("common");
1464
+ const formatItemForStructuredList = (data) => {
1465
+ if (!data) return [];
1466
+ const structuredListItems = Object.entries(data).map(([key, value]) => {
1467
+ if (isOmmitted(key) || !value) return;
1468
+ return {
1469
+ term: isCustomLabel(key) ? businessFinancingT(($) => $[customLabels[key]]) : commonT(($) => $[key]),
1470
+ details: value
1471
+ };
1472
+ }).filter((v) => v !== void 0);
1473
+ const structuredListItemsWithInnerForms = [];
1474
+ structuredListItems.map((it) => {
1475
+ if (typeof it?.details === "object") structuredListItemsWithInnerForms.push(...formatItemForStructuredList(it?.details));
1476
+ else structuredListItemsWithInnerForms.push(it);
1477
+ });
1478
+ return structuredListItemsWithInnerForms;
1479
+ };
1480
+ const processSummarySections = (forms) => {
1481
+ return forms.map(({ formId, formName }) => ({
1482
+ formId,
1483
+ label: commonT(($) => $[formName]),
1484
+ items: formatItemForStructuredList(items[formId])
1485
+ }));
1486
+ };
1487
+ return /* @__PURE__ */ jsx(NewSummary, {
1488
+ handleEditForm,
1489
+ sections: processSummarySections(forms),
1490
+ children
1491
+ });
1492
+ };
1493
+ //#endregion
1494
+ //#region src/components/EFP/tasks/BusinessFinancingDropin/BusinessFinancingDropin.tsx
1495
+ var getOrgAnalyticsData = (prefix, details) => {
1496
+ const org = details?.organization;
1497
+ const soleProp = details?.soleProprietorship;
1498
+ const entity = org || soleProp;
1499
+ if (!entity) return {};
1500
+ return {
1501
+ [`${prefix}--economicSector`]: entity?.economicSector ?? "",
1502
+ [`${prefix}--legalForm`]: org?.legalForm ?? "",
1503
+ [`${prefix}--statusOfLegalProceeding`]: entity?.statusOfLegalProceeding ?? ""
1504
+ };
1505
+ };
1506
+ var businessFinancingFormsRequiredFields = {
1507
+ soleProprietor: businessFinancingForms.soleProprietor.fields,
1508
+ company: businessFinancingForms.company.fields,
1509
+ parentCompany: businessFinancingForms.parentCompany.fields,
1510
+ ultimateParentCompany: businessFinancingForms.ultimateParentCompany.fields
1511
+ };
1512
+ var parentCompanyFormId = businessFinancingForms.parentCompany.formId;
1513
+ var companyFormId = businessFinancingForms.company.formId;
1514
+ var ultimateParentCompanyFormId = businessFinancingForms.ultimateParentCompany.formId;
1515
+ function BusinessFinancingDropin(props) {
1516
+ const { country, rootLegalEntity, externalOnSubmit, externalOnSubmitLabel, isStandaloneComponent, handleHomeClick } = props;
1517
+ const { t: businessFinancingT } = useTranslation("businessFinancing");
1518
+ const { t: commonT, i18n } = useTranslation("common");
1519
+ const userEvents = useAnalyticsContext();
1520
+ const invalidateRootLegalEntity = useInvalidateRootLegalEntity();
1521
+ const { mutateAsync: createLegalEntity } = useCreateLegalEntity();
1522
+ const { mutateAsync: updateLegalEntity } = useUpdateLegalEntity();
1523
+ const { data: immediateParentCompany, isLoading: immediateParentCompanyIsLoading } = useAssociatedLegalEntity(rootLegalEntity, "immediateParentCompany");
1524
+ const { data: ultimateParentCompany, isLoading: ultimateParentCompanyIsLoading } = useAssociatedLegalEntity(rootLegalEntity, "ultimateParentCompany");
1525
+ const { data: soleProprietor, isLoading: soleProprietorIsLoading } = useAssociatedLegalEntity(rootLegalEntity, "soleProprietorship");
1526
+ /**
1527
+ * Analytics
1528
+ */
1529
+ useTaskLandedEvent("BUSINESS_FINANCING");
1530
+ const derivedData = useMemo(() => {
1531
+ if (immediateParentCompanyIsLoading || ultimateParentCompanyIsLoading || soleProprietorIsLoading) return void 0;
1532
+ const isSoleProprietor = hasSolePropInLegalEntity(rootLegalEntity);
1533
+ const dataFromResponse = {};
1534
+ if (isSoleProprietor && soleProprietor) {
1535
+ dataFromResponse.soleProprietor = mapLegalEntityToBusinessFinancing(rootLegalEntity);
1536
+ dataFromResponse.soleProprietor = appendSoleProprietorBusinessFinancingData(soleProprietor.soleProprietorship, dataFromResponse.soleProprietor);
1537
+ } else if (rootLegalEntity.type === "organization") {
1538
+ dataFromResponse.company = mapLegalEntityToBusinessFinancing(rootLegalEntity);
1539
+ dataFromResponse.company = appendBusinessFinancingData(rootLegalEntity.organization, dataFromResponse.company);
1540
+ dataFromResponse.company.isCompanyOwnedByAnotherCompany = "No";
1541
+ dataFromResponse.company.isParentOwnedByAnotherCompany = "No";
1542
+ if (immediateParentCompany) {
1543
+ dataFromResponse.parentCompany = mapLegalEntityToBusinessFinancing(immediateParentCompany);
1544
+ dataFromResponse.parentCompany = appendBusinessFinancingData(immediateParentCompany.organization, dataFromResponse.parentCompany);
1545
+ dataFromResponse.company.isCompanyOwnedByAnotherCompany = "Yes";
1546
+ }
1547
+ if (ultimateParentCompany) {
1548
+ dataFromResponse.ultimateParentCompany = mapLegalEntityToBusinessFinancing(ultimateParentCompany);
1549
+ dataFromResponse.ultimateParentCompany = appendBusinessFinancingData(ultimateParentCompany.organization, dataFromResponse.ultimateParentCompany);
1550
+ dataFromResponse.company.isParentOwnedByAnotherCompany = "Yes";
1551
+ }
1552
+ }
1553
+ return dataFromResponse;
1554
+ }, [
1555
+ immediateParentCompanyIsLoading,
1556
+ ultimateParentCompanyIsLoading,
1557
+ soleProprietorIsLoading,
1558
+ rootLegalEntity,
1559
+ immediateParentCompany,
1560
+ ultimateParentCompany,
1561
+ soleProprietor
1562
+ ]);
1563
+ const datasetUtils = datasetUtilities(i18n.language);
1564
+ const [problems, setProblems] = useState();
1565
+ const [loadingStatus, setLoadingStatus] = useState("success");
1566
+ const [showEndState, setShowEndState] = useState(false);
1567
+ const { showToast } = useToastContext();
1568
+ const { isSettingEnabled } = useSettingsContext();
1569
+ const { isFeatureEnabled } = useToggleContext();
1570
+ const showBusinessFinancingFirst = isSettingEnabled(SettingNames.ShowBusinessFinancingFirst);
1571
+ const onSubmit = async () => {
1572
+ setLoadingStatus("loading");
1573
+ if (!umfData) return;
1574
+ setProblems((prevProblems) => ({
1575
+ ...prevProblems,
1576
+ validationErrors: {}
1577
+ }));
1578
+ const isSoleProprietor = hasSolePropInLegalEntity(rootLegalEntity);
1579
+ const mainEntityDetails = !isSoleProprietor ? prepareBusinessFinancingSubmitData(BusinessFinancingIndices.COMPANY, umfData, rootLegalEntity) : null;
1580
+ const soleProprietorPayloads = isSoleProprietor ? prepareSoleProprietorBusinessFinancingSubmitData(umfData, rootLegalEntity, soleProprietor) : null;
1581
+ const parentCompanyBusinessFinancingDetails = !isSoleProprietor ? prepareBusinessFinancingSubmitData(BusinessFinancingIndices.PARENT_COMPANY, umfData, rootLegalEntity) : null;
1582
+ const ultimateParentCompanyBusinessFinancingDetails = !isSoleProprietor ? prepareBusinessFinancingSubmitData(BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY, umfData, rootLegalEntity) : null;
1583
+ if (isSoleProprietor) {
1584
+ if (!soleProprietorPayloads || !rootLegalEntity || !soleProprietor?.id) {
1585
+ showToast({
1586
+ label: businessFinancingT(($) => $["missingCompanyDetails"]),
1587
+ variant: "error"
1588
+ });
1589
+ return;
1590
+ }
1591
+ try {
1592
+ await handleBusinessFinancingFormSubmission(BusinessFinancingIndices.SOLE_PROPRIETOR, soleProprietorPayloads.individualPayload, createLegalEntity, updateLegalEntity, rootLegalEntity.id);
1593
+ const eventsAdditionalData = { ...getOrgAnalyticsData("SoleProprietor", await handleBusinessFinancingFormSubmission(BusinessFinancingIndices.SOLE_PROPRIETOR, soleProprietorPayloads.solePropPayload, createLegalEntity, updateLegalEntity, soleProprietor.id)) };
1594
+ userEvents.addTaskEvent("Success", {
1595
+ actionType: "submit",
1596
+ returnValue: [BusinessFinancingIndices.SOLE_PROPRIETOR],
1597
+ additionalData: eventsAdditionalData
1598
+ });
1599
+ await invalidateRootLegalEntity();
1600
+ if (showBusinessFinancingFirst || isStandaloneComponent) setShowEndState(true);
1601
+ else externalOnSubmit?.({ ...umfData });
1602
+ setProblems({});
1603
+ } catch (e) {
1604
+ showToast({
1605
+ label: commonT(($) => $["failedToUpdateDetails"]),
1606
+ variant: "error"
1607
+ });
1608
+ handleSubmissionError(e, BusinessFinancingIndices.SOLE_PROPRIETOR);
1609
+ } finally {
1610
+ setLoadingStatus("success");
1611
+ }
1612
+ } else {
1613
+ if (!mainEntityDetails || !rootLegalEntity) {
1614
+ showToast({
1615
+ label: businessFinancingT(($) => $["missingCompanyDetails"]),
1616
+ variant: "error"
1617
+ });
1618
+ return;
1619
+ }
1620
+ let parentCompanyFailed = false;
1621
+ let ultimateParentCompanyFailed = false;
1622
+ try {
1623
+ const promises = [];
1624
+ if (parentCompanyBusinessFinancingDetails) {
1625
+ const parentCompanyPromise = handleBusinessFinancingFormSubmission(BusinessFinancingIndices.PARENT_COMPANY, parentCompanyBusinessFinancingDetails, createLegalEntity, updateLegalEntity, parentCompanyBusinessFinancingDetails?.id);
1626
+ promises.push(parentCompanyPromise);
1627
+ }
1628
+ if (ultimateParentCompanyBusinessFinancingDetails) {
1629
+ const ultimateParentCompanyPromise = handleBusinessFinancingFormSubmission(BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY, ultimateParentCompanyBusinessFinancingDetails, createLegalEntity, updateLegalEntity, ultimateParentCompanyBusinessFinancingDetails?.id);
1630
+ promises.push(ultimateParentCompanyPromise);
1631
+ }
1632
+ const results = await Promise.allSettled(promises);
1633
+ const businessFinancingEntityAssociations = [...rootLegalEntity.entityAssociations ? rootLegalEntity.entityAssociations.filter((entityAssociation) => entityAssociation.type !== "immediateParentCompany" && entityAssociation.type !== "ultimateParentCompany") : []];
1634
+ const entitiesToTrack = [BusinessFinancingIndices.COMPANY];
1635
+ results.forEach((result, index) => {
1636
+ const businessFinancingType = index === 0 ? BusinessFinancingIndices.PARENT_COMPANY : BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY;
1637
+ if (result.status === "fulfilled") {
1638
+ const response = result.value;
1639
+ if (businessFinancingType === BusinessFinancingIndices.PARENT_COMPANY) {
1640
+ businessFinancingEntityAssociations.push({
1641
+ type: "immediateParentCompany",
1642
+ legalEntityId: response.id,
1643
+ associatorId: mainEntityDetails.id
1644
+ });
1645
+ entitiesToTrack.push(BusinessFinancingIndices.PARENT_COMPANY);
1646
+ } else if (businessFinancingType === BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY) {
1647
+ businessFinancingEntityAssociations.push({
1648
+ type: "ultimateParentCompany",
1649
+ legalEntityId: response.id,
1650
+ associatorId: mainEntityDetails.id
1651
+ });
1652
+ entitiesToTrack.push(BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY);
1653
+ }
1654
+ } else {
1655
+ if (businessFinancingType === BusinessFinancingIndices.PARENT_COMPANY) parentCompanyFailed = true;
1656
+ else if (businessFinancingType === BusinessFinancingIndices.ULTIMATE_PARENT_COMPANY) ultimateParentCompanyFailed = true;
1657
+ handleSubmissionError(result.reason, businessFinancingType);
1658
+ }
1659
+ });
1660
+ if (!parentCompanyFailed && !ultimateParentCompanyFailed) {
1661
+ mainEntityDetails.entityAssociations = [...businessFinancingEntityAssociations];
1662
+ const eventsAdditionalData = {
1663
+ ...getOrgAnalyticsData("Business", mainEntityDetails),
1664
+ ...getOrgAnalyticsData("ParentCompany", parentCompanyBusinessFinancingDetails),
1665
+ ...getOrgAnalyticsData("UltimateParentCompany", ultimateParentCompanyBusinessFinancingDetails)
1666
+ };
1667
+ try {
1668
+ await handleBusinessFinancingFormSubmission(BusinessFinancingIndices.COMPANY, mainEntityDetails, createLegalEntity, updateLegalEntity, mainEntityDetails?.id);
1669
+ userEvents.addTaskEvent("Success", {
1670
+ actionType: "submit",
1671
+ returnValue: entitiesToTrack,
1672
+ additionalData: eventsAdditionalData
1673
+ });
1674
+ await invalidateRootLegalEntity();
1675
+ if (showBusinessFinancingFirst || isStandaloneComponent) setShowEndState(true);
1676
+ else externalOnSubmit?.({ ...umfData });
1677
+ setProblems({});
1678
+ } catch (e) {
1679
+ showToast({
1680
+ label: commonT(($) => $["failedToUpdateDetails"]),
1681
+ variant: "error"
1682
+ });
1683
+ handleSubmissionError(e, BusinessFinancingIndices.COMPANY);
1684
+ }
1685
+ }
1686
+ } catch (e) {
1687
+ if (!parentCompanyFailed && !ultimateParentCompanyFailed) handleSubmissionError(e, BusinessFinancingIndices.COMPANY);
1688
+ showToast({
1689
+ label: commonT(($) => $["failedToUpdateDetails"]),
1690
+ variant: "error"
1691
+ });
1692
+ } finally {
1693
+ setLoadingStatus("success");
1694
+ }
1695
+ }
1696
+ };
1697
+ const handleSubmissionError = (error, businessFinancingType) => {
1698
+ const keyMapping = businessFinancingType === BusinessFinancingIndices.SOLE_PROPRIETOR ? {
1699
+ ...businessFinancingIndividualApiKeyMapping,
1700
+ ...businessFinancingSoleProprietorApiKeyMapping
1701
+ } : businessFinancingApiKeyMapping;
1702
+ if (isValidationError(error.actualError)) {
1703
+ const validationErrors = processValidationErrors(error.actualError, void 0, keyMapping);
1704
+ setProblems((prevProblems) => ({
1705
+ ...prevProblems,
1706
+ validationErrors: mergeValidationErrors(prevProblems?.validationErrors, validationErrors)
1707
+ }));
1708
+ } else if (isMaintenanceModeError(error)) showToast({
1709
+ label: commonT(($) => $["maintenanceModeMessage"]),
1710
+ variant: "error",
1711
+ duration: "indefinite"
1712
+ });
1713
+ else showToast({
1714
+ label: commonT(($) => $["failedToUpdateDetails"]),
1715
+ variant: "error"
1716
+ });
1717
+ };
1718
+ const [requiredFields, setRequiredFields] = useState(void 0);
1719
+ const [optionalFields, setOptionalFields] = useState(void 0);
1720
+ const addressCountry = useRef(void 0);
1721
+ const form = useMultiForm({
1722
+ requiredFields,
1723
+ optionalFields,
1724
+ defaultData: derivedData,
1725
+ rules: businessFinancingMultiformRules({
1726
+ country: addressCountry.current || country,
1727
+ isFeatureEnabled,
1728
+ t: commonT
1729
+ })
1730
+ });
1731
+ const { data: umfData = derivedData, isValid, errors, valid } = form;
1732
+ const businessFinancingRequiredForms = useMemo(() => {
1733
+ let updateForms = {};
1734
+ if (umfData?.soleProprietor) updateForms = { soleProprietor: { ...businessFinancingForms.soleProprietor } };
1735
+ else {
1736
+ updateForms = { company: { ...businessFinancingForms.company } };
1737
+ const showParentCompany = umfData?.company?.isCompanyOwnedByAnotherCompany === "Yes";
1738
+ const showUltimateParentCompany = umfData?.company?.isParentOwnedByAnotherCompany === "Yes";
1739
+ if (showParentCompany) updateForms = {
1740
+ ...updateForms,
1741
+ parentCompany: businessFinancingForms.parentCompany
1742
+ };
1743
+ if (showParentCompany && showUltimateParentCompany) updateForms = {
1744
+ ...updateForms,
1745
+ ultimateParentCompany: businessFinancingForms.ultimateParentCompany
1746
+ };
1747
+ }
1748
+ return updateForms;
1749
+ }, [
1750
+ umfData?.soleProprietor,
1751
+ umfData?.company?.isCompanyOwnedByAnotherCompany,
1752
+ umfData?.company?.isParentOwnedByAnotherCompany
1753
+ ]);
1754
+ useEffect(() => {
1755
+ const [requiredFields, optionalFields] = getBusinessFinancingFields(country, umfData, rootLegalEntity?.organization?.registeredAddress);
1756
+ setRequiredFields(requiredFields);
1757
+ setOptionalFields(optionalFields);
1758
+ }, [umfData, rootLegalEntity?.organization?.registeredAddress]);
1759
+ const forms = useMemo(() => {
1760
+ return addValidityToForms(getRequiredForms(businessFinancingRequiredForms, businessFinancingFormsRequiredFields, {}), isValid, problems);
1761
+ }, [
1762
+ businessFinancingRequiredForms,
1763
+ isValid,
1764
+ businessFinancingFormsRequiredFields,
1765
+ problems
1766
+ ]);
1767
+ const { handleNextClick, handleBackClick, activeForm, gotoFormByFormIndex, gotoFormByFormId, steps, shouldValidate } = useFormComposer({
1768
+ problems,
1769
+ forms,
1770
+ onSubmit
1771
+ });
1772
+ if (activeForm.formId === "parentCompany" || activeForm.formId === "ultimateParentCompany") addressCountry.current = umfData?.[activeForm.formId]?.registrationAddressCountry;
1773
+ const renderActiveForm = (selectedForm) => /* @__PURE__ */ jsxs("div", { children: [
1774
+ selectedForm.formId === "soleProprietor" && /* @__PURE__ */ jsx(AdditionalFieldsForBusinessFinancingSoleProprietor, {
1775
+ data: derivedData?.soleProprietor,
1776
+ legalEntity: rootLegalEntity,
1777
+ heading: businessFinancingT(($) => $["additionalInformationForBusinessFinancing"]),
1778
+ id: selectedForm.formId,
1779
+ country,
1780
+ shouldValidate,
1781
+ fieldValidationErrors: problems?.validationErrors?.[selectedForm?.formId],
1782
+ formVerificationErrors: problems?.verificationErrors?.[selectedForm?.formId],
1783
+ errors: errors?.soleProprietor,
1784
+ valid: valid?.soleProprietor
1785
+ }),
1786
+ selectedForm.formId === companyFormId && /* @__PURE__ */ jsx(AdditionalFieldsForBusinessFinancingCompany, {
1787
+ data: derivedData?.company,
1788
+ legalEntity: rootLegalEntity,
1789
+ heading: businessFinancingT(($) => $["additionalInformationForBusinessFinancing"]),
1790
+ id: companyFormId,
1791
+ country,
1792
+ shouldValidate,
1793
+ fieldValidationErrors: problems?.validationErrors?.[selectedForm?.formId],
1794
+ formVerificationErrors: problems?.verificationErrors?.[selectedForm?.formId],
1795
+ errors: errors?.company,
1796
+ valid: valid?.company
1797
+ }),
1798
+ selectedForm.formId === parentCompanyFormId && /* @__PURE__ */ jsx(AdditionalFieldsForBusinessFinancingParentCompany, {
1799
+ data: derivedData?.parentCompany,
1800
+ heading: businessFinancingT(($) => $["parentCompanyInformation"]),
1801
+ id: companyFormId,
1802
+ country,
1803
+ shouldValidate,
1804
+ errors: errors?.parentCompany,
1805
+ legalEntity: rootLegalEntity
1806
+ }),
1807
+ selectedForm.formId === ultimateParentCompanyFormId && /* @__PURE__ */ jsx(AdditionalFieldsForBusinessFinancingUltimateParentCompany, {
1808
+ data: derivedData?.ultimateParentCompany,
1809
+ heading: commonT(($) => $["ultimateParentCompanyInformation"]),
1810
+ id: companyFormId,
1811
+ country,
1812
+ shouldValidate,
1813
+ errors: errors?.ultimateParentCompany,
1814
+ legalEntity: rootLegalEntity
1815
+ })
1816
+ ] });
1817
+ if (!derivedData?.company && !derivedData?.soleProprietor) return /* @__PURE__ */ jsx(Loader, {});
1818
+ const allValidationErrors = problems?.validationErrors && Object.values(problems.validationErrors)?.reduce((acc, validError) => ({
1819
+ ...acc,
1820
+ ...validError
1821
+ }), {});
1822
+ const allVerificationErrors = problems?.verificationErrors && Object.values(problems.verificationErrors)?.reduce((acc, verifError) => ({
1823
+ ...acc,
1824
+ ...verifError
1825
+ }), {});
1826
+ const formUtils = createFormUtils({ labels: {} }, commonT);
1827
+ const handleEditForm = (formId) => {
1828
+ const formIndex = forms.findIndex((form) => form.formId === formId);
1829
+ if (formIndex >= 0) gotoFormByFormIndex(formIndex);
1830
+ };
1831
+ const summaryComponent = /* @__PURE__ */ jsx(BusinessFinancingSummary, {
1832
+ items: formatDataForSummary(i18n.language, commonT, businessFinancingT, datasetUtils, umfData, rootLegalEntity?.organization?.registeredAddress),
1833
+ handleEditForm,
1834
+ forms,
1835
+ children: /* @__PURE__ */ jsx(ErrorPanel, {
1836
+ validationErrors: allValidationErrors,
1837
+ verificationErrors: allVerificationErrors,
1838
+ formUtils,
1839
+ id: "ariaErrorField",
1840
+ slot: "errorPanel"
1841
+ })
1842
+ });
1843
+ return showEndState ? /* @__PURE__ */ jsx(EndStateLayout, {
1844
+ title: businessFinancingT(($) => $["submissionReceived"]),
1845
+ description: businessFinancingT(($) => $["theInformationProvidedIsBeingReviewed"]),
1846
+ action: externalOnSubmit && !showBusinessFinancingFirst ? /* @__PURE__ */ jsx(Button, {
1847
+ onClick: () => externalOnSubmit?.({ ...umfData }),
1848
+ children: externalOnSubmitLabel || commonT(($) => $["finish"])
1849
+ }) : void 0
1850
+ }) : /* @__PURE__ */ jsx(FormContextProvider, {
1851
+ form,
1852
+ children: /* @__PURE__ */ jsx(FormFlow, {
1853
+ summaryComponent,
1854
+ currentStep: steps.current,
1855
+ disableNextButton: !activeForm.isValid,
1856
+ forms,
1857
+ activeForm,
1858
+ gotoFormByFormIndex,
1859
+ gotoFormByFormId,
1860
+ handleBackClick,
1861
+ handleCancelClick: handleHomeClick,
1862
+ handleNextClick,
1863
+ loadingStatus,
1864
+ totalSteps: steps.total,
1865
+ children: /* @__PURE__ */ jsx("div", { children: renderActiveForm(activeForm || (derivedData?.soleProprietor ? businessFinancingForms.soleProprietor : businessFinancingForms.company)) })
1866
+ })
1867
+ });
1868
+ }
1869
+ //#endregion
1870
+ export { BusinessFinancingDropin as t };