@incodetech/core 2.3.2-rc.4 → 2.4.0-rc.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 (267) hide show
  1. package/THIRD_PARTY_NOTICES.txt +1243 -3
  2. package/dist/Actor-DpTj5PFb.d.ts +1 -0
  3. package/dist/{BaseWasmProvider-Dyi6dKp1.d.ts → BaseWasmProvider-BL9wIRnN.d.ts} +2 -2
  4. package/dist/{FaceDetectionProvider-B5Fxc_y9.esm.js → FaceDetectionProvider-BjTer9h3.esm.js} +126 -10
  5. package/dist/HttpRequestError-Bh0pNGSC.esm.js +35 -0
  6. package/dist/{IIdCaptureCapability-RNiFhvXR.d.ts → IIdCaptureCapability-DBsv9-7M.d.ts} +2 -2
  7. package/dist/{IWasmUtilCapability-CNWRl7jr.d.ts → IWasmUtilCapability-CPX0RGdQ.d.ts} +28 -5
  8. package/dist/{Manager-CQQ99QOI.d.ts → Manager-C9T5amUN.d.ts} +7 -1
  9. package/dist/{MotionSensorProvider-DyhbM4Si.esm.js → MotionSensorProvider-DYxh8TjR.esm.js} +1 -1
  10. package/dist/{ekycStateMachine-UeJRO8_p.esm.js → PhoneValidationProvider-SZiOS0jB.esm.js} +232 -827
  11. package/dist/{StreamCanvasCapture-_8gdW5Lk.d.ts → StreamCanvasCapture-DVmzJux5.d.ts} +2 -2
  12. package/dist/{safeStorage-BdU9_m2E.esm.js → WasmUtilProvider-CIdnE7Fx.esm.js} +95 -46
  13. package/dist/{addressSearch-DyHGgeX8.esm.js → addressSearch-BiYZjvp3.esm.js} +143 -4
  14. package/dist/{advanceableErrors-CpF2cBy6.esm.js → advanceableErrors-q_pfU3Cn.esm.js} +5 -4
  15. package/dist/ae-signature.d.ts +2 -2
  16. package/dist/ae-signature.esm.js +1 -1
  17. package/dist/antifraud.d.ts +1 -1
  18. package/dist/antifraud.esm.js +2 -2
  19. package/dist/{antifraudManager-BY36bS12.d.ts → antifraudManager-DbGCvlJs.d.ts} +2 -2
  20. package/dist/{antifraudManager-DNkw66oW.esm.js → antifraudManager-HL08jeDX.esm.js} +3 -3
  21. package/dist/{antifraudStateMachine-DBeq47D2.esm.js → antifraudStateMachine-DoJVzblM.esm.js} +3 -3
  22. package/dist/{apiError--p429c2X.esm.js → apiError-DcSWedC6.esm.js} +2 -1
  23. package/dist/authentication.d.ts +3 -3
  24. package/dist/authentication.esm.js +2 -2
  25. package/dist/{authenticationManager-CboRCl_N.d.ts → authenticationManager-CANv5-W5.d.ts} +2 -8
  26. package/dist/{authenticationManager-CWmZMFJH.esm.js → authenticationManager-SaiAxqvS.esm.js} +6 -6
  27. package/dist/{authenticationStateMachine-BQ7ZW-8a.esm.js → authenticationStateMachine-CHSxmV7z.esm.js} +5 -6
  28. package/dist/avatar.d.ts +1 -1
  29. package/dist/{backCameraStream-B0-YgP_y.esm.js → backCameraStream-CMvXj4X4.esm.js} +1 -1
  30. package/dist/camera.esm.js +1 -1
  31. package/dist/certificate-issuance.d.ts +1 -1
  32. package/dist/certificate-issuance.esm.js +2 -2
  33. package/dist/{certificateIssuanceManager-C3-CI0_s.esm.js → certificateIssuanceManager-CMg4SgL4.esm.js} +3 -3
  34. package/dist/{certificateIssuanceManager-DCgEidHz.d.ts → certificateIssuanceManager-Dr8A4Lgr.d.ts} +2 -3
  35. package/dist/{certificateIssuanceStateMachine-CxqS_nD-.esm.js → certificateIssuanceStateMachine-Cs64QmYH.esm.js} +4 -4
  36. package/dist/consent.d.ts +1 -1
  37. package/dist/consent.esm.js +2 -2
  38. package/dist/{consentManager-B6E1XJDw.esm.js → consentManager-CjrxY737.esm.js} +3 -3
  39. package/dist/{consentManager-uhDPdU6i.d.ts → consentManager-DgzWQpAR.d.ts} +11 -12
  40. package/dist/{consentStateMachine-DTSfdGiW.esm.js → consentStateMachine-BCj5Jb3g.esm.js} +3 -3
  41. package/dist/{createCameraCycleOwnership-DnwTl1ad.esm.js → createCameraCycleOwnership-kdlhkmmY.esm.js} +71 -65
  42. package/dist/{createFaceAvatar-BlcTYgJv.d.ts → createFaceAvatar-DXgmQmQy.d.ts} +1 -1
  43. package/dist/cross-document-data-match.d.ts +1 -1
  44. package/dist/cross-document-data-match.esm.js +1 -1
  45. package/dist/{crossDocumentDataMatchManager-9XhFVZ5S.esm.js → crossDocumentDataMatchManager-BHnGRsto.esm.js} +4 -4
  46. package/dist/{crossDocumentDataMatchManager-Dq8Z3SOg.d.ts → crossDocumentDataMatchManager-yCWCOzcU.d.ts} +2 -2
  47. package/dist/curp-validation.d.ts +1 -1
  48. package/dist/curp-validation.esm.js +2 -2
  49. package/dist/{curpValidationManager-DNuZn9fn.d.ts → curpValidationManager-B-1EZbP_.d.ts} +3 -3
  50. package/dist/{curpValidationManager-DbIMYFcJ.esm.js → curpValidationManager-DBNIn8BF.esm.js} +15 -22
  51. package/dist/{curpValidationStateMachine-g5kMfuLj.esm.js → curpValidationStateMachine-DAxImy8p.esm.js} +4 -4
  52. package/dist/custom-fields.d.ts +1 -1
  53. package/dist/custom-fields.esm.js +1 -1
  54. package/dist/custom-watchlist.d.ts +1 -1
  55. package/dist/custom-watchlist.esm.js +2 -2
  56. package/dist/{customFieldsManager-CzWZTkW-.esm.js → customFieldsManager-BV6UyLFV.esm.js} +4 -4
  57. package/dist/{customFieldsManager-8-W2KY4n.d.ts → customFieldsManager-CF-cO8ap.d.ts} +2 -2
  58. package/dist/{customWatchlistManager-DWTED5Ur.esm.js → customWatchlistManager-DML0UPzf.esm.js} +3 -3
  59. package/dist/{customWatchlistManager-PBWHr_oM.d.ts → customWatchlistManager-DolUswyR.d.ts} +2 -2
  60. package/dist/{customWatchlistStateMachine-DOQou6TW.esm.js → customWatchlistStateMachine-D9gI5uu7.esm.js} +3 -3
  61. package/dist/deepsightLoader-DvfAYnzg.esm.js +55 -0
  62. package/dist/{deepsightLoader-BtYvACzG.esm.js → deepsightService-DLGO9yv1.esm.js} +51 -56
  63. package/dist/device.esm.js +1 -1
  64. package/dist/document-capture.d.ts +2 -2
  65. package/dist/document-capture.esm.js +2 -2
  66. package/dist/{documentCaptureManager-BRPxqYD2.esm.js → documentCaptureManager-C9XUnYU6.esm.js} +17 -18
  67. package/dist/{documentCaptureManager-lEtCM320.d.ts → documentCaptureManager-DkyDtm3Y.d.ts} +11 -34
  68. package/dist/{documentCaptureStateMachine-D312sSIu.esm.js → documentCaptureStateMachine-BHDsCfhL.esm.js} +55 -58
  69. package/dist/dynamic-forms.d.ts +2 -2
  70. package/dist/dynamic-forms.esm.js +2 -2
  71. package/dist/{dynamicFormsManager-66GzzBTx.esm.js → dynamicFormsManager-5uIXobxi.esm.js} +3 -3
  72. package/dist/{dynamicFormsManager-D5R_uxLQ.d.ts → dynamicFormsManager-C0dHs1ty.d.ts} +3 -3
  73. package/dist/{dynamicFormsStateMachine-DLnr2ZtX.esm.js → dynamicFormsStateMachine-DQmok084.esm.js} +4 -4
  74. package/dist/ekyb.d.ts +5 -5
  75. package/dist/ekyb.esm.js +3 -3
  76. package/dist/{ekybManager-BwRuGAwt.d.ts → ekybManager-BaZ_7CEu.d.ts} +4 -4
  77. package/dist/{ekybManager-CsQMgJDL.esm.js → ekybManager-CazShiQz.esm.js} +23 -27
  78. package/dist/{ekybStateMachine-DBeQNOMo.esm.js → ekybStateMachine-hstiCNmW.esm.js} +338 -13
  79. package/dist/ekyc.d.ts +2 -2
  80. package/dist/ekyc.esm.js +3 -3
  81. package/dist/{ekycManager-BX2d46FY.esm.js → ekycManager-BdJRUsz0.esm.js} +29 -36
  82. package/dist/{ekycManager-DLzDuBzI.d.ts → ekycManager-DW-ynodd.d.ts} +3 -3
  83. package/dist/ekycStateMachine-x6Klot8g.esm.js +1444 -0
  84. package/dist/{ekycUtils-D6wfSpPN.esm.js → ekycUtils-zY8CdKJL.esm.js} +53 -3
  85. package/dist/electronic-signature.d.ts +1 -1
  86. package/dist/electronic-signature.esm.js +1 -1
  87. package/dist/{electronicSignatureManager-Boj_xbGN.esm.js → electronicSignatureManager-Bc8spG8p.esm.js} +10 -10
  88. package/dist/{electronicSignatureManager-Ds-KEVTq.d.ts → electronicSignatureManager-DTSLOvKR.d.ts} +2 -3
  89. package/dist/email.d.ts +1 -1
  90. package/dist/email.esm.js +2 -2
  91. package/dist/{emailManager-bR1N5rV_.esm.js → emailManager-CtlKRRaR.esm.js} +20 -26
  92. package/dist/{emailManager-CADXW_9X.d.ts → emailManager-Dy6omJVp.d.ts} +2 -2
  93. package/dist/{emailStateMachine-Bc_6oIYw.esm.js → emailStateMachine-5Neq3rE5.esm.js} +4 -4
  94. package/dist/{endpoints-B-3Q-LUw.esm.js → endpoints-DHzlkQNe.esm.js} +2 -0
  95. package/dist/{events-ijlbX_Wx.esm.js → events-CAgFE-k3.esm.js} +19 -7
  96. package/dist/events.d.ts +3 -2
  97. package/dist/events.esm.js +1 -1
  98. package/dist/extensibility.d.ts +38 -38
  99. package/dist/extensibility.esm.js +36 -36
  100. package/dist/{externalFetch-BKBThAUC.esm.js → externalFetch-DrR9xshk.esm.js} +3 -2
  101. package/dist/face-match.d.ts +1 -1
  102. package/dist/face-match.esm.js +2 -2
  103. package/dist/{faceCaptureManagerFactory-m-7ae67q.d.ts → faceCaptureManagerFactory-jKQ2QtY-.d.ts} +11 -51
  104. package/dist/{faceCaptureManagerFactory-BKpeQIZu.esm.js → faceCaptureManagerFactory-uFm1AcaY.esm.js} +19 -54
  105. package/dist/{faceCaptureSetup-DOrt8-Sn.esm.js → faceCaptureSetup-Cu2wabzo.esm.js} +99 -395
  106. package/dist/{faceMatchManager-Bmv0HzuY.esm.js → faceMatchManager-9Nj9aPci.esm.js} +3 -3
  107. package/dist/{faceMatchManager-BnvrZM2F.d.ts → faceMatchManager-DIgG-UFS.d.ts} +1 -2
  108. package/dist/{faceMatchStateMachine-mRIHQ3dA.esm.js → faceMatchStateMachine-B9ZUnlyU.esm.js} +6 -4
  109. package/dist/{feature-management-zY6FcYx_.esm.js → feature-management-BTbYruNe.esm.js} +3 -3
  110. package/dist/feature-management.esm.js +1 -1
  111. package/dist/field-comparison.d.ts +2 -2
  112. package/dist/field-comparison.esm.js +1 -1
  113. package/dist/{fieldComparisonManager-CBvEGxFx.d.ts → fieldComparisonManager-CUX4gza2.d.ts} +6 -3
  114. package/dist/{fieldComparisonManager-CC-klG0h.esm.js → fieldComparisonManager-Dk38hXZP.esm.js} +35 -17
  115. package/dist/fiscal-qr.d.ts +1 -1
  116. package/dist/fiscal-qr.esm.js +1 -1
  117. package/dist/{fiscalQrManager-B1STmT6z.d.ts → fiscalQrManager-D0Iy7EKR.d.ts} +2 -2
  118. package/dist/fiscalQrManager-DmBkQfs0.esm.js +6798 -0
  119. package/dist/flow-events.d.ts +1 -1
  120. package/dist/flow.d.ts +14 -13
  121. package/dist/flow.esm.js +14 -14
  122. package/dist/{flowCompletionService-CBa6YyI5.esm.js → flowCompletionService-xnn_SlJU.esm.js} +2 -2
  123. package/dist/{flowServices-JW6uRaUt.esm.js → flowServices-DA64AEZC.esm.js} +11 -7
  124. package/dist/geolocation.d.ts +1 -1
  125. package/dist/geolocation.esm.js +2 -2
  126. package/dist/{geolocationManager-DD5J1T_p.esm.js → geolocationManager-CqNLY45e.esm.js} +6 -7
  127. package/dist/{geolocationManager-Cz744E5S.d.ts → geolocationManager-Dn24g1fl.d.ts} +2 -3
  128. package/dist/{geolocationStateMachine-DoelwBqs.esm.js → geolocationStateMachine-D-cQi7ar.esm.js} +4 -4
  129. package/dist/{getDeviceClass-5NYZg9s6.esm.js → getDeviceClass-bsWdEDxP.esm.js} +1 -1
  130. package/dist/{getParsedUserAgent-B2iFDql1.esm.js → getParsedUserAgent-DhQPeKqw.esm.js} +1 -1
  131. package/dist/government-validation.d.ts +1 -1
  132. package/dist/government-validation.esm.js +2 -2
  133. package/dist/{governmentValidationManager-D02vT4yY.d.ts → governmentValidationManager-B82zOut8.d.ts} +3 -3
  134. package/dist/{governmentValidationManager-CacFOtKO.esm.js → governmentValidationManager-CP0SiOOe.esm.js} +3 -3
  135. package/dist/{governmentValidationStateMachine-CoaZOSTP.esm.js → governmentValidationStateMachine-C3YQ8yCZ.esm.js} +3 -3
  136. package/dist/home.d.ts +3 -26
  137. package/dist/home.esm.js +2 -2
  138. package/dist/id-ocr.d.ts +1 -1
  139. package/dist/id-ocr.esm.js +2 -2
  140. package/dist/id-selfie-flow.d.ts +6 -9
  141. package/dist/id-selfie-flow.esm.js +23 -28
  142. package/dist/id-verification.d.ts +1 -1
  143. package/dist/id-verification.esm.js +2 -2
  144. package/dist/id.d.ts +4 -4
  145. package/dist/id.esm.js +4 -205
  146. package/dist/{idCaptureDefaults-Chne8cyb.esm.js → idCaptureDefaults-CBg73RnV.esm.js} +8 -5
  147. package/dist/{idCaptureManager-BHwL2Z0V.d.ts → idCaptureManager-BY97SRCV.d.ts} +242 -98
  148. package/dist/{idCaptureManager-0504dfcD.esm.js → idCaptureManager-D4V8vXtY.esm.js} +276 -210
  149. package/dist/{idCaptureServices-B-Ynn67N.esm.js → idCaptureServices-DJ33k3-p.esm.js} +21 -39
  150. package/dist/{idCaptureStateMachine-B7ET-hfq.esm.js → idCaptureStateMachine-PJt0yzom.esm.js} +989 -872
  151. package/dist/{idOcrManager-BF_cXZq8.d.ts → idOcrManager-BTdHlJ9D.d.ts} +3 -4
  152. package/dist/{idOcrManager-ByWuQ4ej.esm.js → idOcrManager-DxoCesYP.esm.js} +3 -3
  153. package/dist/{idOcrStateMachine-Bt_abXQQ.esm.js → idOcrStateMachine-kPn7DB2I.esm.js} +3 -3
  154. package/dist/{idVerificationManager-BB4Pj_N6.d.ts → idVerificationManager-BJapZfpy.d.ts} +2 -3
  155. package/dist/{idVerificationManager-DT42c77H.esm.js → idVerificationManager-CDhRUU5n.esm.js} +3 -3
  156. package/dist/{idVerificationStateMachine-DbDVIh9t.esm.js → idVerificationStateMachine-0HTVVxse.esm.js} +3 -3
  157. package/dist/identity-reuse.d.ts +2 -2
  158. package/dist/identity-reuse.esm.js +2 -2
  159. package/dist/{identityReuseManager-yG3acUrQ.esm.js → identityReuseManager-BleUi6TK.esm.js} +26 -13
  160. package/dist/{identityReuseManager-v2TH5g7e.d.ts → identityReuseManager-ooAbp6Kc.d.ts} +162 -44
  161. package/dist/{identityReuseStateMachine-BhAkuIra.esm.js → identityReuseStateMachine-BrBUpfn5.esm.js} +89 -23
  162. package/dist/{index-CeaC32qI.d.ts → index-DfEuu-Ew.d.ts} +2 -2
  163. package/dist/index-DpTj5PFb.d.ts +1 -0
  164. package/dist/index.d.ts +1 -1
  165. package/dist/index.esm.js +1 -1
  166. package/dist/{invokeOnCaptureCallback-BjzPjJ_p.esm.js → invokeOnCaptureCallback-BW7V3vub.esm.js} +1 -1
  167. package/dist/lamejs-B6TzhU5q.esm.js +10 -0
  168. package/dist/mandatory-consent.d.ts +2 -2
  169. package/dist/mandatory-consent.esm.js +2 -2
  170. package/dist/{mandatoryConsentManager-7dI0D08q.esm.js → mandatoryConsentManager-CX_Dyht7.esm.js} +3 -3
  171. package/dist/{mandatoryConsentManager-BYRnWbIC.d.ts → mandatoryConsentManager-TkX57U6f.d.ts} +8 -9
  172. package/dist/{mandatoryConsentStateMachine-DC5Mo6M1.esm.js → mandatoryConsentStateMachine-CoaSB7P7.esm.js} +3 -3
  173. package/dist/{multipartRecordingService-mwKFTlhR.esm.js → multipartRecordingService-DbeQpXdU.esm.js} +2 -2
  174. package/dist/{permissionGuards-D6TfVop2.esm.js → permissionGuards-Bf4LbHjC.esm.js} +1 -1
  175. package/dist/{permissionServices-EY3_Vx6c.esm.js → permissionServices-d2UW0r_L.esm.js} +34 -3
  176. package/dist/phone-number.d.ts +24 -0
  177. package/dist/phone-number.esm.js +1922 -0
  178. package/dist/phone.d.ts +1 -1
  179. package/dist/phone.esm.js +2 -2
  180. package/dist/{phoneManager-IjhSv5XS.esm.js → phoneManager-BGBcpqsk.esm.js} +31 -22
  181. package/dist/{phoneManager-BBU8Lq0O.d.ts → phoneManager-BO-LTih5.d.ts} +16 -3
  182. package/dist/{phoneStateMachine-CXdXufKg.esm.js → phoneStateMachine-CEm2y7yG.esm.js} +39 -20
  183. package/dist/phoneValidation-DnBcNUNh.esm.js +48 -0
  184. package/dist/qe-signature.d.ts +2 -2
  185. package/dist/qe-signature.esm.js +1 -1
  186. package/dist/redirect-to-mobile.d.ts +1 -1
  187. package/dist/redirect-to-mobile.esm.js +2 -2
  188. package/dist/{redirectToMobileManager-FLEWJtv8.esm.js → redirectToMobileManager-B1yQHFLu.esm.js} +4 -4
  189. package/dist/{redirectToMobileManager-BD2PvT5B.d.ts → redirectToMobileManager-CVsvpVbQ.d.ts} +2 -2
  190. package/dist/{redirectToMobileStateMachine-CSWWgUTO.esm.js → redirectToMobileStateMachine--Sr9NEVT.esm.js} +5 -5
  191. package/dist/{rolldown-runtime-FDOR9p9I.esm.js → rolldown-runtime-B-1-B7_t.esm.js} +10 -1
  192. package/dist/{runChildModule-CZU29-IV.esm.js → runChildModule-vdxQMCmO.esm.js} +13 -12
  193. package/dist/safeStorage-UxDrnjwa.esm.js +35 -0
  194. package/dist/{sdkVersion-DOhxIxQQ.esm.js → sdkVersion-F5YZbjip.esm.js} +1 -1
  195. package/dist/selfie.d.ts +4 -4
  196. package/dist/selfie.esm.js +12 -12
  197. package/dist/selfieErrorUtils-D-tsgEuX.esm.js +21 -0
  198. package/dist/{selfieManager-BSZG891S.d.ts → selfieManager-1J0IEyFq.d.ts} +2 -8
  199. package/dist/{selfieManager-CWhbwRdb.esm.js → selfieManager-26pENXxw.esm.js} +6 -6
  200. package/dist/selfieStateMachine-BhfKsl3I.esm.js +41 -0
  201. package/dist/{session-CctUSSCx.esm.js → session-Bu7djCsj.esm.js} +5 -5
  202. package/dist/session.d.ts +15 -3
  203. package/dist/session.esm.js +30 -5
  204. package/dist/sessionInitializer-jxbfCnE-.esm.js +974 -0
  205. package/dist/{setup-DmB0JHAB.esm.js → setup-C38QkrSP.esm.js} +232 -112
  206. package/dist/{setup-Cyko6cAn.d.ts → setup-lgkQ8dJW.d.ts} +20 -11
  207. package/dist/signature.d.ts +1 -1
  208. package/dist/signature.esm.js +2 -2
  209. package/dist/{signatureManager-DGBSWz2_.d.ts → signatureManager-BpVt_Jv7.d.ts} +2 -2
  210. package/dist/{signatureManager-B72np4ZO.esm.js → signatureManager-qqXyH93e.esm.js} +7 -11
  211. package/dist/{signatureStateMachine-ce_XMA3l.esm.js → signatureStateMachine-BkRSrkKp.esm.js} +3 -3
  212. package/dist/splitTrackedName-3zJRd2RD.esm.js +19 -0
  213. package/dist/{src-35ekGRzK.esm.js → src-DJAJjRYQ.esm.js} +1 -1
  214. package/dist/{stats-CZcy2J53.esm.js → stats-DmG_tkGk.esm.js} +1 -1
  215. package/dist/stats.esm.js +1 -1
  216. package/dist/{sessionInitializer-Ce9zO78j.esm.js → thumbmark.esm-CRc0cYvz.esm.js} +33 -776
  217. package/dist/{trueSightService-oMFESSSb.esm.js → trueSightService-BWgRVGIT.esm.js} +893 -900
  218. package/dist/trust-graph.d.ts +1 -2
  219. package/dist/trust-graph.esm.js +2 -2
  220. package/dist/{types-C0oWGUzg.d.ts → types-0L-eFDmr.d.ts} +1 -1
  221. package/dist/{types-C1g9itHE.d.ts → types-BGXxRwQM.d.ts} +6 -7
  222. package/dist/{types-BfgmV7s7.d.ts → types-BQA7lRDV.d.ts} +1 -1
  223. package/dist/{types-CxGdmzxa.d.ts → types-BvFmYX5c.d.ts} +1 -1
  224. package/dist/{types-Cx-1zo-i.d.ts → types-BvLo3U4u.d.ts} +1 -1
  225. package/dist/types-C71Zo6vl.d.ts +6 -0
  226. package/dist/{types-DEGVXwsk2.d.ts → types-CyPUIpzf.d.ts} +110 -62
  227. package/dist/{types-Bx-BWveD.d.ts → types-DTYr9pCB.d.ts} +1 -1
  228. package/dist/{types-BjSly8cp.d.ts → types-DUnFZ08M.d.ts} +1 -1
  229. package/dist/{types-ESdtnHtg.d.ts → types-zpO4fU6a.d.ts} +3 -4
  230. package/dist/{urlUtils-D6phjq1-.esm.js → urlUtils-6jsE6rKp.esm.js} +9 -1
  231. package/dist/video-selfie.d.ts +6 -9
  232. package/dist/video-selfie.esm.js +1386 -1344
  233. package/dist/{videoSelfieCameraWarmer-D_4NwYM-.esm.js → videoSelfieCameraWarmer-C366RKqu.esm.js} +11 -11
  234. package/dist/{videoSelfieFlowModuleMachine-BUe2uACW.esm.js → videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js} +1 -1
  235. package/dist/{videoSelfieStepDetector-ChYgFM15.d.ts → videoSelfieStepDetector-C5QHOvWb.d.ts} +4 -4
  236. package/dist/videoTrimByCopy-BFfAiNpv.esm.js +15901 -0
  237. package/dist/{warmup-Cis2p6O0.d.ts → warmup-BUPPRAA1.d.ts} +7 -0
  238. package/dist/{warmup-ChDwHSel.esm.js → warmup-DMtbyb2l.esm.js} +27 -9
  239. package/dist/wasm.d.ts +2 -2
  240. package/dist/wasm.esm.js +4 -4
  241. package/dist/{wasmDsFlagSync-DYrLUEII.esm.js → wasmDsFlagSync-BXCGqP48.esm.js} +1 -1
  242. package/dist/{wasmWebClient-B7baE-Wf.esm.js → wasmWebClient-kbYZ2sxw.esm.js} +259 -20
  243. package/dist/watchlist-for-business.d.ts +1 -1
  244. package/dist/watchlist-for-business.esm.js +2 -2
  245. package/dist/watchlist.d.ts +1 -1
  246. package/dist/watchlist.esm.js +2 -2
  247. package/dist/{watchlistForBusinessManager-CsnJnG-C.d.ts → watchlistForBusinessManager-B3GDPZrr.d.ts} +2 -2
  248. package/dist/{watchlistForBusinessManager-CIMkpEhu.esm.js → watchlistForBusinessManager-BvF4jK3S.esm.js} +7 -5
  249. package/dist/{watchlistForBusinessStateMachine-CJ-MvUre.esm.js → watchlistForBusinessStateMachine-121XK-Et.esm.js} +3 -3
  250. package/dist/{watchlistManager-CixcLNDT.esm.js → watchlistManager-CNWEOYSq.esm.js} +3 -3
  251. package/dist/{watchlistManager-DLXef90v.d.ts → watchlistManager-DJQOd8Pw.d.ts} +2 -2
  252. package/dist/{watchlistStateMachine-CBqk2w-h.esm.js → watchlistStateMachine-Dgfm42w2.esm.js} +3 -3
  253. package/dist/workflow.d.ts +34 -5
  254. package/dist/workflow.esm.js +64 -46
  255. package/dist/{xstate-actors.esm-BXeQ-Ucz.esm.js → xstate-actors.esm-8Gzepa_A.esm.js} +1 -1
  256. package/dist/{xstate.esm-BuFLFuzz.esm.js → xstate.esm-DSajW7CJ.esm.js} +24 -10
  257. package/package.json +13 -5
  258. package/dist/Actor-iTq7YY48.d.ts +0 -1
  259. package/dist/StateMachine-EDpYWy0i.d.ts +0 -6
  260. package/dist/fiscalQrManager-DbCVMIBx.esm.js +0 -34143
  261. package/dist/index-B8weJxmL.d.ts +0 -1
  262. package/dist/selfieErrorUtils-UiQ46EBa.esm.js +0 -116
  263. package/dist/selfieStateMachine-CtMCi4KZ.esm.js +0 -71
  264. package/dist/types-BN5RPPIZ.esm.js +0 -34
  265. package/dist/types-Bt9RuRqt.d.ts +0 -6
  266. package/dist/virtualCameraCheck-Cjab7FTI.esm.js +0 -48
  267. /package/dist/{types-BSBzhHRH.d.ts → types-BSBzhHRH2.d.ts} +0 -0
@@ -1,8 +1,8 @@
1
1
  import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
- import { t as Manager } from "./Manager-CQQ99QOI.js";
3
- import "./Actor-iTq7YY48.js";
4
- import { c as AddressSuggestion } from "./types-Cx-1zo-i.js";
5
- import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-C0oWGUzg.js";
2
+ import { t as Manager } from "./Manager-C9T5amUN.js";
3
+ import "./Actor-DpTj5PFb.js";
4
+ import { c as AddressSuggestion } from "./types-BvLo3U4u.js";
5
+ import { i as EkybFormValues, o as EkybValidationErrors, r as EkybFieldDef, s as UboEntry, t as EkybConfig } from "./types-0L-eFDmr.js";
6
6
  //#region src/modules/ekyb/ekybStateMachine.d.ts
7
7
  declare const ekybMachine: any;
8
8
  type EkybMachine = typeof ekybMachine;
@@ -1,7 +1,7 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CAgFE-k3.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
- import { s as createActor, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
4
- import { t as ekybMachine } from "./ekybStateMachine-DBeQNOMo.esm.js";
3
+ import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
+ import { t as ekybMachine } from "./ekybStateMachine-hstiCNmW.esm.js";
5
5
  //#region src/modules/ekyb/ekybActor.ts
6
6
  /**
7
7
  * Creates and starts an eKYB actor.
@@ -13,31 +13,17 @@ function createEkybActor(options) {
13
13
  //#endregion
14
14
  //#region src/modules/ekyb/ekybManager.ts
15
15
  /**
16
- * Maps an eKYB state-machine snapshot to the exact Figma "Tracked
17
- * Events" screen name. Source: eKYC / eKYB Figma file → Tracked Events
18
- * canvas
19
- * (`https://www.figma.com/design/TWgYZVhurQCizfC4tfLEut/eKYC---eKYB---Ready-for-Dev?node-id=2977-10474`).
20
- * Family is `eKYB.*` and section names are returned verbatim, emitted as-is
21
- * on `event.screen` by `createManagerInstrumentation` (e.g. `eKYB.default`,
22
- * `eKYB.processing`). See `docs/patterns/INSTRUMENTATION.md`.
16
+ * Maps the existing combined eKYB form and its outcome screens.
17
+ * https://www.figma.com/design/TWgYZVhurQCizfC4tfLEut?node-id=2977-10474
23
18
  *
24
- * Figma sub-states not currently surfaced by the state machine (the form
25
- * state machine collapses country selection, business details, and UBO
26
- * entry into a single `form` compound state):
19
+ * ENG-45716 F3 remains a baseline/UX decision: Figma defines country.empty,
20
+ * country.filled, bdetails.empty, bdetails.filled, director.empty,
21
+ * director.filled and directorloading, while this runtime has one form.
22
+ * Keep its existing eKYB.default until a combined-form taxonomy is approved
23
+ * or the actual steps are implemented. Do not emit fictional step visits.
24
+ * processing/success/error already match the baseline.
27
25
  *
28
- * - `eKYB.bdetails` (business details, empty) — UI step after country
29
- * selection.
30
- * - `eKYB.filled` (business details filled) — UI sub-state when required
31
- * fields have values.
32
- * - `eKYB.UBO` (empty / filled — the Figma canvas duplicates the section
33
- * name for both variants) — UBO entry step.
34
- *
35
- * All three collapse onto `eKYB.default` (the country selection / form
36
- * entry surface). Promoting them requires the state machine to surface
37
- * step-based sub-states; tracked for a follow-up.
38
- *
39
- * `closed` is intentionally unmapped (terminal user-dismissed state —
40
- * handled by `moduleClosed`).
26
+ * `closed` is a terminal dismissal handled by module lifecycle instrumentation.
41
27
  */
42
28
  function getEkybScreenName(snapshot) {
43
29
  const stateName = topLevelStateName(snapshot.value);
@@ -160,12 +146,22 @@ function createApi({ actor, trackElementClicked }) {
160
146
  }
161
147
  };
162
148
  }
149
+ function hasFormValidationErrors(snapshot) {
150
+ return topLevelStateName(snapshot.value) === "form" && Object.keys(snapshot.context.validationErrors ?? {}).length > 0;
151
+ }
163
152
  function createEkybManagerFromActor(actor) {
164
153
  return createManager({
165
154
  actor,
166
155
  mapState,
167
156
  createApi,
168
- instrumentation: createManagerInstrumentation(eventModuleNames.ekyb, { getEventScreenName: getEkybScreenName })
157
+ instrumentation: createManagerInstrumentation(eventModuleNames.ekyb, {
158
+ getEventScreenName: getEkybScreenName,
159
+ getErrorName: (snapshot) => hasFormValidationErrors(snapshot) ? "error.validation" : void 0,
160
+ getErrorPayload: (snapshot) => hasFormValidationErrors(snapshot) ? {
161
+ reason: "validation",
162
+ errorCode: "VALIDATION_FAILED"
163
+ } : void 0
164
+ })
169
165
  });
170
166
  }
171
167
  /**
@@ -1,9 +1,9 @@
1
1
  import { t as api } from "./api-Bx3gKW_y.esm.js";
2
- import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
3
- import { A as isSupportedCountry, C as COUNTRIES_WITH_CNPJ_VALIDATION, D as INVALID_CNPJ_PATTERNS, E as FIELD_ORDER, S as CNPJ_SECOND_DIGIT_FACTORS, T as FIELD_NAME_MAPPING, _ as sortModulesByOrder, b as ALL_COUNTRIES, g as requiresAddressValidation, h as isFieldOptional, k as UBO_FIELD_LABELS, m as hasAtLeastOneAddressField, n as getFlow, v as toEkybConfig, x as CNPJ_FIRST_DIGIT_FACTORS, y as ADDRESS_FIELDS } from "./flowServices-JW6uRaUt.esm.js";
4
- import { i as assign, t as setup } from "./xstate.esm-BuFLFuzz.esm.js";
5
- import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
6
- import { a as getPostalCodeMaxLength, c as STREET_LEVEL_REQUIRED_ERROR, d as usStateOptions, i as getPostalCodeErrorKey, l as fillFromSuggestion, n as FIXED_DIGIT_POSTAL_CODE_LENGTH, o as validatePostalCode, r as formatPostalCode, s as DYNAMIC_REQUIRED_KEY, t as debounceSearchActor, u as getStreetLevelErrorForSuggestion } from "./addressSearch-DyHGgeX8.esm.js";
2
+ import { t as endpoints } from "./endpoints-DHzlkQNe.esm.js";
3
+ import { A as isSupportedCountry, C as COUNTRIES_WITH_CNPJ_VALIDATION, D as INVALID_CNPJ_PATTERNS, E as FIELD_ORDER, S as CNPJ_SECOND_DIGIT_FACTORS, T as FIELD_NAME_MAPPING, _ as sortModulesByOrder, b as ALL_COUNTRIES, g as requiresAddressValidation, h as isFieldOptional, k as UBO_FIELD_LABELS, m as hasAtLeastOneAddressField, n as getFlow, v as toEkybConfig, x as CNPJ_FIRST_DIGIT_FACTORS, y as ADDRESS_FIELDS } from "./flowServices-DA64AEZC.esm.js";
4
+ import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
5
+ import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
6
+ import { a as FIXED_DIGIT_POSTAL_CODE_LENGTH, c as getPostalCodeMaxLength, d as STREET_LEVEL_REQUIRED_ERROR, f as fillFromSuggestion, i as checkSupport, l as validatePostalCode, m as usStateOptions, n as resolveForm, o as formatPostalCode, p as getStreetLevelErrorForSuggestion, r as createBundledDefinitionSource, s as getPostalCodeErrorKey, t as debounceSearchActor, u as DYNAMIC_REQUIRED_KEY } from "./addressSearch-BiYZjvp3.esm.js";
7
7
  //#region src/modules/ekyb/ekybValidators.ts
8
8
  function cleanCnpjString(cnpj) {
9
9
  return cnpj.replace(/\./g, "").replace(/\//g, "").replace(/-/g, "");
@@ -175,6 +175,309 @@ function requiresCnpjValidation(country) {
175
175
  return COUNTRIES_WITH_CNPJ_VALIDATION.includes(country);
176
176
  }
177
177
  //#endregion
178
+ //#region ../form-definitions/generated/ekyb.ts
179
+ const EKYB_DEFINITIONS = {
180
+ "ekyb/MX": {
181
+ schemaVersion: 1,
182
+ vocabulary: "1.0",
183
+ id: "ekyb/MX",
184
+ module: "ekyb",
185
+ country: "MX",
186
+ fields: [
187
+ {
188
+ name: "businessName",
189
+ kind: "text",
190
+ group: "businessName",
191
+ required: true,
192
+ label: { key: "ekyb.businessName" },
193
+ input: { autofill: "organization" }
194
+ },
195
+ {
196
+ name: "taxId",
197
+ kind: "text",
198
+ group: "taxId",
199
+ required: true,
200
+ label: { key: "ekyb.taxId" }
201
+ },
202
+ {
203
+ name: "postalCode",
204
+ kind: "text",
205
+ group: "address",
206
+ required: true,
207
+ label: { key: "ekyb.postalCode" },
208
+ input: {
209
+ maxLength: 5,
210
+ autofill: "postalCode"
211
+ },
212
+ rules: [{ id: "postalCodeFormat" }]
213
+ }
214
+ ],
215
+ submit: {
216
+ static: { plugins: ["ekyb"] },
217
+ context: { country: "country" }
218
+ }
219
+ },
220
+ "ekyb/US": {
221
+ schemaVersion: 1,
222
+ vocabulary: "1.0",
223
+ id: "ekyb/US",
224
+ module: "ekyb",
225
+ country: "US",
226
+ fields: [
227
+ {
228
+ name: "businessName",
229
+ kind: "text",
230
+ group: "businessName",
231
+ required: true,
232
+ label: { key: "ekyb.businessName" },
233
+ input: { autofill: "organization" }
234
+ },
235
+ {
236
+ name: "taxId",
237
+ kind: "text",
238
+ group: "taxId",
239
+ required: true,
240
+ label: { key: "ekyb.taxId" }
241
+ },
242
+ {
243
+ name: "street",
244
+ kind: "text",
245
+ group: "address",
246
+ required: true,
247
+ widget: "addressSearch",
248
+ label: { key: "ekyb.street" },
249
+ input: { autofill: "addressLine1" }
250
+ },
251
+ {
252
+ name: "houseNo",
253
+ kind: "text",
254
+ group: "address",
255
+ required: true,
256
+ label: { key: "ekyb.houseNo" }
257
+ },
258
+ {
259
+ name: "addressLine2",
260
+ kind: "text",
261
+ group: "address",
262
+ label: { key: "ekyb.addressLine2" },
263
+ input: { autofill: "addressLine2" }
264
+ },
265
+ {
266
+ name: "city",
267
+ kind: "text",
268
+ group: "address",
269
+ required: true,
270
+ label: { key: "ekyb.city" },
271
+ input: { autofill: "addressLevel2" }
272
+ },
273
+ {
274
+ name: "state",
275
+ kind: "choice",
276
+ group: "address",
277
+ required: true,
278
+ widget: "select",
279
+ label: { key: "ekyb.state" },
280
+ placeholder: { key: "verification.placeholder.state" },
281
+ input: { autofill: "addressLevel1" },
282
+ optionsRef: "US_STATES"
283
+ },
284
+ {
285
+ name: "postalCode",
286
+ kind: "text",
287
+ group: "address",
288
+ required: true,
289
+ label: { key: "ekyb.postalCode" },
290
+ input: {
291
+ maxLength: 10,
292
+ autofill: "postalCode"
293
+ },
294
+ rules: [{ id: "postalCodeFormat" }]
295
+ }
296
+ ],
297
+ collections: [{
298
+ id: "ubos",
299
+ group: "ubos",
300
+ min: 1,
301
+ max: 8,
302
+ fields: [{
303
+ name: "name",
304
+ kind: "text",
305
+ group: "ubos",
306
+ required: true,
307
+ label: { key: "ekyb.uboName" }
308
+ }, {
309
+ name: "surname",
310
+ kind: "text",
311
+ group: "ubos",
312
+ required: true,
313
+ label: { key: "ekyb.uboSurname" }
314
+ }],
315
+ payload: {
316
+ key: "uboNames",
317
+ join: ["name", "surname"]
318
+ }
319
+ }],
320
+ submit: {
321
+ static: { plugins: ["ekyb"] },
322
+ context: { country: "country" }
323
+ }
324
+ }
325
+ };
326
+ //#endregion
327
+ //#region src/modules/ekyb/ekybForm.ts
328
+ /**
329
+ * eKYB adapter for form definitions.
330
+ *
331
+ * Selects the bundled definition for a country, resolves it against the
332
+ * verification fields from module configuration, and projects the result to
333
+ * today's public `EkybFieldDef[]` shape. A country without a projectable
334
+ * definition, or a custom field list that can't be expressed as groups, keeps
335
+ * the current builder.
336
+ */
337
+ /** eKYB group id → the verification-field entries that turn it on. */
338
+ const EKYB_GROUP_ENTRIES = {
339
+ businessName: ["name-user_input"],
340
+ taxId: ["taxId-user_input"],
341
+ address: [
342
+ "street-user_input",
343
+ "houseNo-user_input",
344
+ "address2-user_input",
345
+ "city-user_input",
346
+ "state-user_input",
347
+ "postalCode-user_input"
348
+ ],
349
+ ubos: ["ubos-user_input"]
350
+ };
351
+ const KNOWN_ENTRIES = new Set(Object.values(EKYB_GROUP_ENTRIES).flat());
352
+ const OPTION_LISTS = { US_STATES: usStateOptions };
353
+ /** Vocabulary rules expressed as today's `EkybValidationRule` objects. */
354
+ const RULES = {
355
+ cnpj: () => ({ type: "cnpj" }),
356
+ postalCodeFormat: (country) => ({
357
+ type: "postalCodeFormat",
358
+ country
359
+ })
360
+ };
361
+ const EKYB_SUPPORTED_IDS = {
362
+ schemaVersions: [1],
363
+ vocabulary: "1.0",
364
+ kinds: /* @__PURE__ */ new Set(["text", "choice"]),
365
+ groups: new Set(Object.keys(EKYB_GROUP_ENTRIES)),
366
+ rules: new Set(Object.keys(RULES)),
367
+ transforms: /* @__PURE__ */ new Set(),
368
+ groupRules: /* @__PURE__ */ new Set(),
369
+ optionLists: new Set(Object.keys(OPTION_LISTS)),
370
+ conditions: /* @__PURE__ */ new Set()
371
+ };
372
+ /** Today's UBO actions use a fixed limit and a single collection. */
373
+ const UBO_COLLECTION = "ubos";
374
+ /**
375
+ * Whether today's code handles a field the way its definition says. Today's
376
+ * validators show their own message, so a rule can't carry one. The field
377
+ * shape has no hint, suggestions, sections or Text params, and the UI shows a
378
+ * placeholder only on dropdowns. `buildEkybSubmitPayload` sends the value
379
+ * under the field name, unchanged. Input formatting and request bodies stay
380
+ * in today's code until P2.
381
+ */
382
+ function isProjectableField(field) {
383
+ return !field.hint && !field.suggestionsRef && !field.section && !field.label.params && !field.displayLabel?.params && (field.options ?? []).every((option) => !option.label.params) && (!field.placeholder || field.kind === "choice" && !field.placeholder.params) && (field.rules ?? []).every((rule) => !rule.message) && !field.input?.format?.length && (field.payload?.key ?? field.name) === field.name && !field.payload?.omit;
384
+ }
385
+ /** The only properties today's owner fields honor. */
386
+ const UBO_FIELD_KEYS = /* @__PURE__ */ new Set([
387
+ "name",
388
+ "kind",
389
+ "group",
390
+ "required",
391
+ "label"
392
+ ]);
393
+ /**
394
+ * Today's owner code is fixed: owner 1 is required, up to `UBO_INPUT_LIMIT`
395
+ * owners, each with a required name and surname under `UBO_FIELD_LABELS`, and
396
+ * the request body joins them into `uboNames`. A collection is projectable
397
+ * only when it declares exactly that.
398
+ */
399
+ function isProjectableUboCollection(collection) {
400
+ const { key, join } = collection.payload;
401
+ const names = collection.fields.map((field) => field.name);
402
+ return collection.id === UBO_COLLECTION && collection.min === 1 && collection.max === 8 && key === "uboNames" && join.length === 2 && join[0] === "name" && join[1] === "surname" && names.length === 2 && names[0] === "name" && names[1] === "surname" && collection.fields.every((field) => Object.keys(field).every((prop) => UBO_FIELD_KEYS.has(prop)) && field.kind === "text" && field.required === true && Object.keys(field.label).length === 1 && field.label.key === UBO_FIELD_LABELS[field.name]);
403
+ }
404
+ /**
405
+ * Caches the check per definition object. Bundled definitions are singletons
406
+ * created once at module load, so each is checked once. A served source (P4)
407
+ * that builds new objects per call would still be correct, but would miss
408
+ * this cache; key it by definition id and version then.
409
+ */
410
+ const projectable = /* @__PURE__ */ new WeakMap();
411
+ /** Whether every part of a definition maps onto today's `EkybFieldDef`. */
412
+ function isProjectableEkybDefinition(definition) {
413
+ let result = projectable.get(definition);
414
+ if (result === void 0) {
415
+ result = definition.module === "ekyb" && checkSupport(definition, EKYB_SUPPORTED_IDS).supported && !definition.sections?.length && definition.fields.every(isProjectableField) && (definition.collections ?? []).every(isProjectableUboCollection);
416
+ projectable.set(definition, result);
417
+ }
418
+ return result;
419
+ }
420
+ /**
421
+ * Maps module configuration to groups. Returns `undefined` when the field
422
+ * list can't be expressed as whole groups (an unknown entry, or part of the
423
+ * address), so the current builder keeps handling it.
424
+ */
425
+ function toEkybResolveContext(config, verificationFields) {
426
+ const entries = verificationFields.filter((entry) => !entry.startsWith("socure"));
427
+ if (entries.some((entry) => !KNOWN_ENTRIES.has(entry))) return void 0;
428
+ const groups = {};
429
+ for (const [group, groupEntries] of Object.entries(EKYB_GROUP_ENTRIES)) {
430
+ const present = groupEntries.filter((e) => entries.includes(e)).length;
431
+ if (present !== 0 && present !== groupEntries.length) return void 0;
432
+ groups[group] = present > 0;
433
+ }
434
+ groups.ubos = groups.ubos === true && config.checkUniqueBeneficialOwner !== false;
435
+ return { groups };
436
+ }
437
+ const bundled = createBundledDefinitionSource(EKYB_DEFINITIONS);
438
+ /** The resolved definition for this country and configuration, if one applies. */
439
+ function selectEkybForm(config, verificationFields, country) {
440
+ const context = toEkybResolveContext(config, verificationFields);
441
+ if (!context) return void 0;
442
+ const definition = bundled.select({
443
+ module: "ekyb",
444
+ country
445
+ });
446
+ if (!definition || !isProjectableEkybDefinition(definition)) return void 0;
447
+ return resolveForm(definition, context);
448
+ }
449
+ function projectField(field, required, country) {
450
+ const def = {
451
+ name: field.name,
452
+ type: field.kind === "choice" ? "dropdown" : "text",
453
+ label: field.label.key,
454
+ required
455
+ };
456
+ if (field.placeholder) def.placeholder = field.placeholder.key;
457
+ if (field.displayLabel) def.displayLabel = field.displayLabel.text ?? field.displayLabel.key;
458
+ if (field.input?.maxLength !== void 0) def.maxLength = field.input.maxLength;
459
+ if (field.optionsRef) def.options = OPTION_LISTS[field.optionsRef];
460
+ else if (field.options) def.options = field.options.map((option) => ({
461
+ value: option.value,
462
+ label: option.label.key
463
+ }));
464
+ const validation = required ? [{ type: "required" }] : [];
465
+ for (const rule of field.rules ?? []) {
466
+ const project = RULES[rule.id];
467
+ if (project) validation.push(project(country));
468
+ }
469
+ if (validation.length > 0) def.validation = validation;
470
+ return def;
471
+ }
472
+ /** Projects a resolved definition to today's `EkybFieldDef[]`. */
473
+ function projectEkybFields(form, country) {
474
+ return form.fields.map(({ field, required }) => projectField(field, required, country));
475
+ }
476
+ /** Whether the resolved form collects beneficial owners. */
477
+ function hasUboCollection(form) {
478
+ return form.collections.some((c) => c.collection.id === UBO_COLLECTION);
479
+ }
480
+ //#endregion
178
481
  //#region src/modules/ekyb/ekybActions.ts
179
482
  function buildEkybValidationRules(fieldName, required, country) {
180
483
  const rules = [];
@@ -186,6 +489,25 @@ function buildEkybValidationRules(fieldName, required, country) {
186
489
  });
187
490
  return rules;
188
491
  }
492
+ /**
493
+ * Fields and beneficial-owner state for a country. A country with a form
494
+ * definition (`packages/form-definitions/catalog/ekyb`) reads it; any other
495
+ * country, or a custom field list that isn't whole groups, keeps the current
496
+ * builder and its UBO rule.
497
+ */
498
+ function buildEkybForm(config, verificationFields, country) {
499
+ const form = selectEkybForm(config, verificationFields, country);
500
+ if (form) return {
501
+ fields: projectEkybFields(form, country),
502
+ hasUbos: hasUboCollection(form)
503
+ };
504
+ const hasUbos = config.checkUniqueBeneficialOwner !== false && verificationFields.includes("ubos-user_input") && country !== "MX";
505
+ return {
506
+ fields: buildEkybFields(verificationFields, country, hasUbos),
507
+ hasUbos
508
+ };
509
+ }
510
+ /** The per-country builder for countries without a form definition yet. */
189
511
  function buildEkybFields(verificationFields, country, _hasUbos) {
190
512
  let modules = verificationFields.filter((f) => f !== "ubos-user_input" && !f.startsWith("socure"));
191
513
  if (country === "GB") modules = modules.filter((m) => m !== "state-user_input");
@@ -233,6 +555,12 @@ function processEkybFieldValue(name, value, country) {
233
555
  if (name === "postalCode") return formatPostalCode(value, country);
234
556
  return value;
235
557
  }
558
+ /**
559
+ * Builds the request body. Keep it in sync with `isProjectableField` and
560
+ * `isProjectableUboCollection` in `ekybForm.ts`: definitions are projectable
561
+ * only when they declare exactly this handling, until P2 builds request
562
+ * bodies from them.
563
+ */
236
564
  function buildEkybSubmitPayload(ctx) {
237
565
  const uboNames = ctx.ubos.filter((u) => u.name.trim() || u.surname.trim()).map((u) => `${u.name.trim()} ${u.surname.trim()}`.trim());
238
566
  const payload = {
@@ -307,13 +635,12 @@ const ekybMachine = setup({
307
635
  checkUniqueBeneficialOwner: fetched.checkUniqueBeneficialOwner
308
636
  };
309
637
  const country = "US";
310
- const vFields = getDefaultVerificationFields(config);
311
- const hasUbos = config.checkUniqueBeneficialOwner !== false && vFields.includes("ubos-user_input");
638
+ const { fields, hasUbos } = buildEkybForm(config, getDefaultVerificationFields(config), country);
312
639
  return {
313
640
  config,
314
641
  country,
315
642
  availableCountries: ALL_COUNTRIES,
316
- fields: buildEkybFields(vFields, country, hasUbos),
643
+ fields,
317
644
  values: { country },
318
645
  validationErrors: void 0,
319
646
  ubos: hasUbos ? [{
@@ -331,8 +658,7 @@ const ekybMachine = setup({
331
658
  setCountry: assign(({ context, event }) => {
332
659
  const { country } = event;
333
660
  const vFields = getDefaultVerificationFields(context.config);
334
- const hasUbos = context.config.checkUniqueBeneficialOwner !== false && vFields.includes("ubos-user_input") && country !== "MX";
335
- const fields = buildEkybFields(vFields, country, hasUbos);
661
+ const { fields, hasUbos } = buildEkybForm(context.config, vFields, country);
336
662
  let nextId = context._nextUboId;
337
663
  let ubos;
338
664
  if (hasUbos) if (context.ubos.length > 0) ubos = context.ubos;
@@ -485,13 +811,12 @@ const ekybMachine = setup({
485
811
  context: ({ input }) => {
486
812
  const config = toEkybConfig(input.config);
487
813
  const country = "US";
488
- const vFields = getDefaultVerificationFields(config);
489
- const hasUbos = config.checkUniqueBeneficialOwner !== false && vFields.includes("ubos-user_input");
814
+ const { fields, hasUbos } = buildEkybForm(config, getDefaultVerificationFields(config), country);
490
815
  return {
491
816
  config,
492
817
  country,
493
818
  availableCountries: ALL_COUNTRIES,
494
- fields: buildEkybFields(vFields, country, hasUbos),
819
+ fields,
495
820
  values: { country },
496
821
  validationErrors: void 0,
497
822
  ubos: hasUbos ? [{
package/dist/ekyc.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as EkycValidationError, c as AddressSuggestion, i as EkycModuleConfig, o as EkycValidationErrors, t as EkycConfig } from "./types-Cx-1zo-i.js";
2
- import { n as EkycState, o as ekycMachine, r as createEkycManager, t as EkycManager } from "./ekycManager-DLzDuBzI.js";
1
+ import { a as EkycValidationError, c as AddressSuggestion, i as EkycModuleConfig, o as EkycValidationErrors, t as EkycConfig } from "./types-BvLo3U4u.js";
2
+ import { n as EkycState, o as ekycMachine, r as createEkycManager, t as EkycManager } from "./ekycManager-DW-ynodd.js";
3
3
  //#region src/modules/ekyc/ekycUtils.d.ts
4
4
  /**
5
5
  * Normalizes any supported eKYC config input into a manager-ready `EkycConfig`.
package/dist/ekyc.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as toEkycConfig } from "./ekycUtils-D6wfSpPN.esm.js";
2
- import { t as ekycMachine } from "./ekycStateMachine-UeJRO8_p.esm.js";
3
- import { t as createEkycManager } from "./ekycManager-BX2d46FY.esm.js";
1
+ import { a as toEkycConfig } from "./ekycUtils-zY8CdKJL.esm.js";
2
+ import { t as ekycMachine } from "./ekycStateMachine-x6Klot8g.esm.js";
3
+ import { t as createEkycManager } from "./ekycManager-BdJRUsz0.esm.js";
4
4
  export { createEkycManager, ekycMachine, toEkycConfig };
@@ -1,7 +1,7 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CAgFE-k3.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
- import { s as createActor, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
4
- import { t as ekycMachine } from "./ekycStateMachine-UeJRO8_p.esm.js";
3
+ import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
+ import { t as ekycMachine } from "./ekycStateMachine-x6Klot8g.esm.js";
5
5
  //#region src/modules/ekyc/ekycActor.ts
6
6
  /**
7
7
  * Creates and starts an eKYC actor.
@@ -13,34 +13,12 @@ function createEkycActor(options) {
13
13
  //#endregion
14
14
  //#region src/modules/ekyc/ekycManager.ts
15
15
  /**
16
- * Maps an eKYC state-machine snapshot to the exact Figma "Tracked Events"
17
- * screen name. Source: eKYC Figma file → Tracked Events canvas
18
- * (`https://www.figma.com/design/TWgYZVhurQCizfC4tfLEut/eKYC---eKYB---Ready-for-Dev?node-id=2977-10474`).
19
- * Family is `eKYC.*` and section names are returned verbatim, emitted as-is
20
- * on `event.screen` by `createManagerInstrumentation` (e.g. `eKYC.filled`,
21
- * `eKYC.verify`). See `docs/patterns/INSTRUMENTATION.md`.
16
+ * Screen taxonomy: ENG-45716 v4 QA baseline and the eKYC Tracked Events canvas:
17
+ * https://www.figma.com/design/TWgYZVhurQCizfC4tfLEut?node-id=2977-10474
22
18
  *
23
- * Note the canvas uses `eKYC.filled` for the entry surface (not
24
- * `eKYC.default`) and `eKYC.verify` for the submit-in-flight surface (the
25
- * success instance lives inside the verify section).
26
- *
27
- * State → screen mapping rationale:
28
- *
29
- * - `idle` / `loading` / `prefilling` collapse onto `eKYC.filled` — the
30
- * prefill round-trip happens before the user sees the form, but Figma does
31
- * not define a dedicated loading/prefill surface (the per-country
32
- * `eKYC-empty *` instances in the `eKYC-States` section are visual
33
- * references, not analytics screens). Keeping the family on `eKYC.filled`
34
- * avoids falling back to a generic `eKYC.loading` default and mixing
35
- * taxonomies in dashboards.
36
- * - `submitting` → `eKYC.verify` (verifying surface).
37
- * - `success`/`finished` → `eKYC.success` so the terminal `finished` state
38
- * stays on the visible success canvas.
39
- * - `misconfigured` is intentionally unmapped — Figma does not define a
40
- * misconfiguration surface, and the misconfigured state is an SDK
41
- * configuration error rather than a user-visible journey screen.
42
- * - `closed` is intentionally unmapped (terminal user-dismissed state —
43
- * handled by `moduleClosed`).
19
+ * Form completeness follows configured required fields, independently of the
20
+ * optimistic Continue button and validation timing. Finalization can follow a
21
+ * skip, so only the success state reports success.
44
22
  */
45
23
  function getEkycScreenName(snapshot) {
46
24
  const stateName = topLevelStateName(snapshot.value);
@@ -48,11 +26,16 @@ function getEkycScreenName(snapshot) {
48
26
  switch (stateName) {
49
27
  case "idle":
50
28
  case "loading":
51
- case "prefilling":
52
- case "form": return "eKYC.filled";
53
- case "submitting": return "eKYC.verify";
54
- case "success":
55
- case "finished": return "eKYC.success";
29
+ case "prefilling": return "eKYC.loading";
30
+ case "form": {
31
+ const { fields, values } = snapshot.context;
32
+ const required = fields.filter((field) => field.required);
33
+ const hasValue = (field) => (values[field.name]?.trim().length ?? 0) > 0;
34
+ return (required.length > 0 ? required.every(hasValue) : fields.some(hasValue)) ? "eKYC.filled" : "eKYC.default";
35
+ }
36
+ case "submitting": return "eKYC.processing";
37
+ case "success": return "eKYC.success";
38
+ case "finished": return "";
56
39
  case "error": return "eKYC.error";
57
40
  default: return;
58
41
  }
@@ -141,12 +124,22 @@ function createApi({ actor, trackElementClicked }) {
141
124
  }
142
125
  };
143
126
  }
127
+ function hasFormValidationErrors(snapshot) {
128
+ return topLevelStateName(snapshot.value) === "form" && Object.keys(snapshot.context.validationErrors ?? {}).length > 0;
129
+ }
144
130
  function createEkycManagerFromActor(actor) {
145
131
  return createManager({
146
132
  actor,
147
133
  mapState,
148
134
  createApi,
149
- instrumentation: createManagerInstrumentation(eventModuleNames.ekyc, { getEventScreenName: getEkycScreenName })
135
+ instrumentation: createManagerInstrumentation(eventModuleNames.ekyc, {
136
+ getEventScreenName: getEkycScreenName,
137
+ getErrorName: (snapshot) => hasFormValidationErrors(snapshot) ? "error.validation" : void 0,
138
+ getErrorPayload: (snapshot) => hasFormValidationErrors(snapshot) ? {
139
+ reason: "validation",
140
+ errorCode: "VALIDATION_FAILED"
141
+ } : void 0
142
+ })
150
143
  });
151
144
  }
152
145
  function createEkycManager(options) {
@@ -1,7 +1,7 @@
1
1
  import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
- import { t as Manager } from "./Manager-CQQ99QOI.js";
3
- import "./Actor-iTq7YY48.js";
4
- import { c as AddressSuggestion, n as EkycFieldDef, o as EkycValidationErrors, r as EkycFormValues, t as EkycConfig } from "./types-Cx-1zo-i.js";
2
+ import { t as Manager } from "./Manager-C9T5amUN.js";
3
+ import "./Actor-DpTj5PFb.js";
4
+ import { c as AddressSuggestion, n as EkycFieldDef, o as EkycValidationErrors, r as EkycFormValues, t as EkycConfig } from "./types-BvLo3U4u.js";
5
5
  //#region src/modules/ekyc/ekycStateMachine.d.ts
6
6
  declare const ekycMachine: any;
7
7
  type EkycMachine = typeof ekycMachine;