@incodetech/core 2.4.1 → 2.5.0-rc.1

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 (312) hide show
  1. package/dist/Actor-DqjOqDfU.d.ts +1 -0
  2. package/dist/{BaseWasmProvider-Bq3OHo7P.d.ts → BaseWasmProvider-bBNquvYn.d.ts} +2 -2
  3. package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
  4. package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-ppyMYVoY.esm.js} +7 -744
  5. package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
  6. package/dist/{FaceDetectionProvider-J_-1Cwck.esm.js → FaceDetectionProvider-D0DbKUKC.esm.js} +28 -64
  7. package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
  8. package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
  9. package/dist/{IIdCaptureCapability-CGcEt2Cw.d.ts → IIdCaptureCapability-C-5M8pP1.d.ts} +2 -2
  10. package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-BRn0wz8v.d.ts} +33 -6
  11. package/dist/Manager-BvXAwDv9.esm.js +125 -0
  12. package/dist/{Manager-C9T5amUN.d.ts → Manager-DufwKlav.d.ts} +1 -7
  13. package/dist/MultipartRecordingProvider-CduV32Qa.esm.js +151 -0
  14. package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
  15. package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-BOwciHDC.d.ts} +20 -4
  16. package/dist/{StreamCanvasCapture-C9jtgBdT.esm.js → StreamCanvasCapture-CXd87trH.esm.js} +18 -3
  17. package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
  18. package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-0xTxgP0R.esm.js} +114 -25
  19. package/dist/WorkerEncoderRecordingProvider-CsDED9UU.esm.js +80 -0
  20. package/dist/addressSearch-Rxm1K67A.esm.js +73 -0
  21. package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-CxZyPRyh.esm.js} +4 -2
  22. package/dist/ae-signature.d.ts +2 -2
  23. package/dist/ae-signature.esm.js +1 -1
  24. package/dist/antifraud.d.ts +1 -1
  25. package/dist/antifraud.esm.js +2 -2
  26. package/dist/{antifraudManager-DbGCvlJs.d.ts → antifraudManager-BxfCsyA7.d.ts} +3 -3
  27. package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-DKNOi9-z.esm.js} +5 -3
  28. package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-BJ6PmCsw.esm.js} +3 -3
  29. package/dist/{api-Cz90EHyu.esm.js → api-CZpuJuZl.esm.js} +11 -6
  30. package/dist/{apiError-9Yi8xMeB.esm.js → apiError-DJHHF70K.esm.js} +1 -1
  31. package/dist/attemptCarry-BecGGZK8.esm.js +45 -0
  32. package/dist/authentication.d.ts +3 -3
  33. package/dist/authentication.esm.js +2 -2
  34. package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-B0WPJjvz.d.ts} +2 -2
  35. package/dist/{authenticationManager-pKQS4fHT.esm.js → authenticationManager-CkjV81NT.esm.js} +7 -6
  36. package/dist/{authenticationStateMachine-D_DygKtQ.esm.js → authenticationStateMachine-BoPwxHAI.esm.js} +50 -18
  37. package/dist/avatar.d.ts +1 -1
  38. package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
  39. package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-DS1oDiUq.esm.js} +12 -107
  40. package/dist/{callback-645_omgz.d.ts → callback-BmjJ1G-5.d.ts} +1 -1
  41. package/dist/{camera-sIa9ceW2.esm.js → camera-E_Kcre4O.esm.js} +15 -23
  42. package/dist/camera.d.ts +2 -2
  43. package/dist/camera.esm.js +1 -1
  44. package/dist/certificate-issuance.d.ts +1 -1
  45. package/dist/certificate-issuance.esm.js +2 -2
  46. package/dist/{certificateIssuanceManager-Dr8A4Lgr.d.ts → certificateIssuanceManager-BcYhxO63.d.ts} +4 -3
  47. package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-DaUklfNj.esm.js} +5 -3
  48. package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-_EQcjGE3.esm.js} +4 -4
  49. package/dist/cnpj-Bl_olpdX.esm.js +79 -0
  50. package/dist/connectivity-BCuEoQ-n.esm.js +114 -0
  51. package/dist/consent.d.ts +1 -1
  52. package/dist/consent.esm.js +2 -2
  53. package/dist/{consentManager-Ca8FHlC4.d.ts → consentManager-B2F_VeAo.d.ts} +13 -5
  54. package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-BPocwpm2.esm.js} +7 -4
  55. package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-DgiIcT9q.esm.js} +22 -9
  56. package/dist/cpf-DDXMTLYr.esm.js +37 -0
  57. package/dist/{createFaceAvatar-lYX0VTYs.d.ts → createFaceAvatar-BimBTONm.d.ts} +1 -1
  58. package/dist/cross-document-data-match.d.ts +1 -1
  59. package/dist/cross-document-data-match.esm.js +1 -1
  60. package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-BfA29Aji.esm.js} +6 -4
  61. package/dist/{crossDocumentDataMatchManager-yCWCOzcU.d.ts → crossDocumentDataMatchManager-crZcIUSY.d.ts} +3 -3
  62. package/dist/curp-DZGvefg3.esm.js +14 -0
  63. package/dist/curp-validation.d.ts +1 -1
  64. package/dist/curp-validation.esm.js +2 -2
  65. package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-CbvBDoE1.esm.js} +6 -3
  66. package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-Ci2iVuog.d.ts} +4 -4
  67. package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-BQ8XK2Y3.esm.js} +30 -22
  68. package/dist/custom-fields.d.ts +1 -1
  69. package/dist/custom-fields.esm.js +1 -1
  70. package/dist/custom-watchlist.d.ts +1 -1
  71. package/dist/custom-watchlist.esm.js +2 -2
  72. package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-BRqSCR9R.esm.js} +6 -4
  73. package/dist/{customFieldsManager-CF-cO8ap.d.ts → customFieldsManager-CdWTbsew.d.ts} +3 -3
  74. package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-Bd1ooIDB.esm.js} +5 -3
  75. package/dist/{customWatchlistManager-DolUswyR.d.ts → customWatchlistManager-lJrveDS4.d.ts} +3 -3
  76. package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-r8nGhyo1.esm.js} +3 -3
  77. package/dist/{deepsightService-C3DVBOZd.esm.js → deepsightLoader-ngnhyO6B.esm.js} +39 -69
  78. package/dist/definitionSource-Nw0YCbpe.esm.js +221 -0
  79. package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-BKFjsQpO.esm.js} +178 -41
  80. package/dist/device.esm.js +2 -2
  81. package/dist/document-capture.d.ts +3 -3
  82. package/dist/document-capture.esm.js +2 -2
  83. package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-BKaJVQxg.esm.js} +30 -20
  84. package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-BZBmcOKI.d.ts} +41 -7
  85. package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-BYLb5Azk.esm.js} +107 -58
  86. package/dist/dynamic-forms.d.ts +2 -2
  87. package/dist/dynamic-forms.esm.js +2 -2
  88. package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-C45pTncO.d.ts} +4 -4
  89. package/dist/{dynamicFormsManager-DK_oc5Oy.esm.js → dynamicFormsManager-CC3t8bqX.esm.js} +5 -3
  90. package/dist/{dynamicFormsStateMachine-CGlIAWZ6.esm.js → dynamicFormsStateMachine-Vsn6kszV.esm.js} +4 -4
  91. package/dist/ekyb.d.ts +5 -5
  92. package/dist/ekyb.esm.js +3 -3
  93. package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-BflWuTe4.d.ts} +5 -5
  94. package/dist/{ekybManager-BLgkiWXw.esm.js → ekybManager-DgNO6c0e.esm.js} +5 -3
  95. package/dist/{ekybStateMachine-BfgOUZMK.esm.js → ekybStateMachine-DHybwePr.esm.js} +40 -56
  96. package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
  97. package/dist/ekyc-prefill.d.ts +17 -0
  98. package/dist/ekyc-prefill.esm.js +3 -0
  99. package/dist/ekyc.d.ts +4 -3
  100. package/dist/ekyc.esm.js +3 -3
  101. package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-BKVQazAb.d.ts} +49 -7
  102. package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-nRT0rxei.esm.js} +39 -16
  103. package/dist/ekycPrefillManager-DOTl3Y2w.d.ts +566 -0
  104. package/dist/ekycPrefillManager-Drq_nYJ3.esm.js +103 -0
  105. package/dist/ekycPrefillStateMachine-CycO-K3B.esm.js +687 -0
  106. package/dist/ekycRules-DXP2hqVw.esm.js +479 -0
  107. package/dist/ekycStateMachine-nwJRel2s.esm.js +7897 -0
  108. package/dist/ekycUtils-FcqA6oU4.esm.js +1491 -0
  109. package/dist/electronic-signature.d.ts +1 -1
  110. package/dist/electronic-signature.esm.js +1 -1
  111. package/dist/{electronicSignatureManager-DTSLOvKR.d.ts → electronicSignatureManager-5tYz-a4o.d.ts} +4 -3
  112. package/dist/{electronicSignatureManager-CjKvJ6E-.esm.js → electronicSignatureManager-hn-_ADP5.esm.js} +8 -6
  113. package/dist/email.d.ts +1 -1
  114. package/dist/email.esm.js +2 -2
  115. package/dist/{emailManager-ButFktRm.esm.js → emailManager-Co4jarT1.esm.js} +5 -3
  116. package/dist/{emailManager-Dy6omJVp.d.ts → emailManager-pM7ZPuMa.d.ts} +3 -3
  117. package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-CTEaYncs.esm.js} +34 -22
  118. package/dist/events-CP3yOzAl.esm.js +299 -0
  119. package/dist/events.d.ts +3 -1
  120. package/dist/events.esm.js +2 -1
  121. package/dist/extensibility.d.ts +43 -41
  122. package/dist/extensibility.esm.js +39 -37
  123. package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-CQY41QT1.esm.js} +4 -1
  124. package/dist/face-match.d.ts +1 -1
  125. package/dist/face-match.esm.js +2 -2
  126. package/dist/{faceCaptureManagerFactory-BDGhg24q.esm.js → faceCaptureManagerFactory-B2POCGth.esm.js} +17 -6
  127. package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-BZjGT392.d.ts} +84 -72
  128. package/dist/{faceCaptureSetup-CvGYG4GZ.esm.js → faceCaptureSetup-DCBK1osx.esm.js} +117 -482
  129. package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-C5b5WtcY.d.ts} +23 -7
  130. package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-CGmNGbov.esm.js} +5 -3
  131. package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-BuHt7kec.esm.js} +68 -29
  132. package/dist/{feature-management-D4ne_hXW.esm.js → feature-management-BFfuXr1M.esm.js} +35 -21
  133. package/dist/feature-management.esm.js +1 -1
  134. package/dist/field-comparison.d.ts +1 -1
  135. package/dist/field-comparison.esm.js +1 -1
  136. package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-VgCU4X96.esm.js} +6 -4
  137. package/dist/{fieldComparisonManager-CUX4gza2.d.ts → fieldComparisonManager-mFOHRhVd.d.ts} +3 -3
  138. package/dist/fiscal-qr.d.ts +1 -1
  139. package/dist/fiscal-qr.esm.js +1 -1
  140. package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-D4G-4xKE.esm.js} +9 -7
  141. package/dist/{fiscalQrManager-D0Iy7EKR.d.ts → fiscalQrManager-DFnFVpP9.d.ts} +3 -3
  142. package/dist/flow-events.d.ts +1 -1
  143. package/dist/flow.d.ts +75 -24
  144. package/dist/flow.esm.js +288 -70
  145. package/dist/{flowCompletionService-Cemwaa5b.esm.js → flowCompletionService-Crry_GxY.esm.js} +24 -3
  146. package/dist/{flowServices-X6Rwf_7E.esm.js → flowServices-Cj8SQjQT.esm.js} +447 -183
  147. package/dist/geolocation.d.ts +1 -1
  148. package/dist/geolocation.esm.js +2 -2
  149. package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-CENrvxpK.d.ts} +19 -20
  150. package/dist/{geolocationManager-B0dc5rW9.esm.js → geolocationManager-qpTiVlc6.esm.js} +9 -9
  151. package/dist/{geolocationStateMachine-B3rcoODF.esm.js → geolocationStateMachine-Dk10UW9G.esm.js} +14 -10
  152. package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-DoIWuKI8.esm.js} +1 -1
  153. package/dist/government-validation.d.ts +1 -1
  154. package/dist/government-validation.esm.js +2 -2
  155. package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-6JQQkzha.esm.js} +5 -3
  156. package/dist/{governmentValidationManager-B82zOut8.d.ts → governmentValidationManager-De_vU7bm.d.ts} +4 -4
  157. package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-wBunpfQ9.esm.js} +3 -3
  158. package/dist/home.d.ts +4 -3
  159. package/dist/home.esm.js +4 -2
  160. package/dist/http.esm.js +1 -1
  161. package/dist/id-ocr.d.ts +2 -2
  162. package/dist/id-ocr.esm.js +3 -19
  163. package/dist/id-selfie-flow.d.ts +6 -5
  164. package/dist/id-selfie-flow.esm.js +14 -12
  165. package/dist/id-verification.d.ts +1 -1
  166. package/dist/id-verification.esm.js +2 -2
  167. package/dist/id.d.ts +4 -17
  168. package/dist/id.esm.js +4 -4
  169. package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-Drh207VJ.esm.js} +3 -3
  170. package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-C4Xk02cS.d.ts} +76 -12
  171. package/dist/{idCaptureManager-IouAnrFm.esm.js → idCaptureManager-RrDMn2tS.esm.js} +68 -19
  172. package/dist/{idCaptureServices-VTKIPSpT.esm.js → idCaptureServices-BqDlOnzD.esm.js} +29 -198
  173. package/dist/{idCaptureStateMachine-_Pn2Xkpb.esm.js → idCaptureStateMachine-DFa1GOap.esm.js} +962 -554
  174. package/dist/idOcrCpfUtils-D5Gwskxu.esm.js +18 -0
  175. package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-C0C7lFGd.d.ts} +7 -6
  176. package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-im7VfJQi.esm.js} +5 -3
  177. package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-B832arAl.esm.js} +11 -10
  178. package/dist/{idVerificationManager-BJapZfpy.d.ts → idVerificationManager-B6R8xNZq.d.ts} +4 -3
  179. package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-PMGM4hXY.esm.js} +5 -3
  180. package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-DeeugC00.esm.js} +3 -3
  181. package/dist/identity-reuse.d.ts +2 -2
  182. package/dist/identity-reuse.esm.js +2 -2
  183. package/dist/identity-search.d.ts +97 -0
  184. package/dist/identity-search.esm.js +97 -0
  185. package/dist/{identityReuseManager-ooAbp6Kc.d.ts → identityReuseManager-CZ-qJ_Aa.d.ts} +82 -15
  186. package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-CjFZ7WRa.esm.js} +9 -4
  187. package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-CLFjPp13.esm.js} +22 -25
  188. package/dist/index-DHuAkTe0.d.ts +1 -0
  189. package/dist/{index-CKQ9QBZP.d.ts → index-DxYNO94y.d.ts} +2 -2
  190. package/dist/index.d.ts +1 -1
  191. package/dist/index.esm.js +1 -1
  192. package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-lXP41N7b.esm.js} +1 -1
  193. package/dist/kyb-checks.d.ts +3 -0
  194. package/dist/kyb-checks.esm.js +3 -0
  195. package/dist/kybChecksManager-B7Di9auB.d.ts +95 -0
  196. package/dist/kybChecksManager-CcEXyOlg.esm.js +90 -0
  197. package/dist/kybChecksStateMachine-DEKqDA2G.esm.js +720 -0
  198. package/dist/mandatory-consent.d.ts +2 -2
  199. package/dist/mandatory-consent.esm.js +2 -2
  200. package/dist/{mandatoryConsentManager-qYojnZYg.d.ts → mandatoryConsentManager-Bh1asNJh.d.ts} +28 -11
  201. package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-Dh3pBhOe.esm.js} +7 -4
  202. package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-BjuI72HZ.esm.js} +32 -13
  203. package/dist/mediaRecorderOptions-g1TwTlhd.esm.js +87 -0
  204. package/dist/multipartRecordingService-WgK8ieRI.esm.js +407 -0
  205. package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-pcrrqrPR.esm.js} +1 -1
  206. package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-DFJlH7K3.esm.js} +11 -9
  207. package/dist/phone-number.d.ts +7 -1
  208. package/dist/phone-number.esm.js +15 -2
  209. package/dist/phone.d.ts +1 -1
  210. package/dist/phone.esm.js +2 -2
  211. package/dist/phoneFormat-C3q0Ukh4.esm.js +27 -0
  212. package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-VO1HEoUZ.d.ts} +8 -3
  213. package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-rA7updqF.esm.js} +6 -4
  214. package/dist/phoneServices-CFXcwCFr.esm.js +77 -0
  215. package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-DKdY2Scx.esm.js} +56 -84
  216. package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
  217. package/dist/{platform-DkcRc9JV.esm.js → platform-aPh7gTWh.esm.js} +15 -1
  218. package/dist/processFaceMatch-B_DkDTE5.esm.js +21 -0
  219. package/dist/qe-signature.d.ts +2 -2
  220. package/dist/qe-signature.esm.js +1 -1
  221. package/dist/recordingService-DxiwS8TV.esm.js +397 -0
  222. package/dist/redirect-to-mobile.d.ts +2 -2
  223. package/dist/redirect-to-mobile.esm.js +2 -2
  224. package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-DjsEtWLq.esm.js} +9 -6
  225. package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-pT6FiPE7.d.ts} +6 -4
  226. package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-CMjjUXSu.esm.js} +67 -28
  227. package/dist/resolveForm-DaaQSVWp.esm.js +146 -0
  228. package/dist/{runChildModule-DSpP41Hl.esm.js → runChildModule-CJzb91Cf.esm.js} +9 -7
  229. package/dist/{sdkVersion-DKHwWEyH.esm.js → sdkVersion-k-QlBWlU.esm.js} +1 -1
  230. package/dist/selfie.d.ts +4 -4
  231. package/dist/selfie.esm.js +13 -12
  232. package/dist/{selfieErrorUtils-DoN1KFSQ.esm.js → selfieErrorUtils-F449y_PI.esm.js} +1 -1
  233. package/dist/{selfieManager-DtQegA6T.esm.js → selfieManager-Ba2YqjfY.esm.js} +7 -6
  234. package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-aPdwxSFt.d.ts} +2 -2
  235. package/dist/{selfieStateMachine-CnCwJZuC.esm.js → selfieStateMachine-CTjb-Qr4.esm.js} +5 -5
  236. package/dist/{session-CNUfjlRc.esm.js → session-DPL5QWRx.esm.js} +77 -9
  237. package/dist/session.d.ts +96 -10
  238. package/dist/session.esm.js +7 -6
  239. package/dist/{sessionInitializer-JM_glXR2.esm.js → sessionInitializer-43LQITNU.esm.js} +359 -115
  240. package/dist/{setup-YPKTUCY5.d.ts → setup-DpOr8H_l.d.ts} +2 -2
  241. package/dist/{setup-C5tfWt6W.esm.js → setup-lcBOfaNE.esm.js} +36 -27
  242. package/dist/signature.d.ts +1 -1
  243. package/dist/signature.esm.js +2 -2
  244. package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-BgAja97K.esm.js} +5 -3
  245. package/dist/{signatureManager-BpVt_Jv7.d.ts → signatureManager-daT_8fj_.d.ts} +3 -3
  246. package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-CVPmvU2p.esm.js} +3 -3
  247. package/dist/{spawn-D9jgw9pW.d.ts → spawn-COZKetCS.d.ts} +1 -1
  248. package/dist/{stats-BEvexnKC.esm.js → stats-DoByUnTa.esm.js} +1 -1
  249. package/dist/stats.esm.js +1 -1
  250. package/dist/textRules-D4NRinKY.d.ts +41 -0
  251. package/dist/{trueSightService-fLmL_cyg.esm.js → trueSightService-Bs6xqUXD.esm.js} +22 -10
  252. package/dist/trust-graph.d.ts +4 -3
  253. package/dist/trust-graph.esm.js +5 -3
  254. package/dist/{types-yPH8lAH-.d.ts → types-9wlf1-GE.d.ts} +3 -3
  255. package/dist/types-B-PIc0en.d.ts +115 -0
  256. package/dist/types-B9C8W01q.d.ts +34 -0
  257. package/dist/{types-0L-eFDmr.d.ts → types-BgRHw-dR.d.ts} +1 -1
  258. package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
  259. package/dist/{types-BQA7lRDV.d.ts → types-C3rfDzgE.d.ts} +4 -2
  260. package/dist/types-CE1jkHw3.d.ts +6 -0
  261. package/dist/types-CTaL0XJz.d.ts +80 -0
  262. package/dist/{types-DUnFZ08M.d.ts → types-CyNndVAT.d.ts} +16 -8
  263. package/dist/types-DEa3taWc.d.ts +217 -0
  264. package/dist/{types-CK8Jbjkp.d.ts → types-DFP7eSle.d.ts} +1 -1
  265. package/dist/{types-Ckir_BEs.d.ts → types-DJPU3W2M.d.ts} +3 -2
  266. package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
  267. package/dist/{events-Du2A4-Qr.esm.js → types-DYYMdAGv.esm.js} +4 -299
  268. package/dist/{types-B6HsSzpk.d.ts → types-Ddc4Tr_f.d.ts} +42 -6
  269. package/dist/{types-BAxn7MpY.d.ts → types-YA7ieDOx.d.ts} +125 -50
  270. package/dist/{urlUtils-6jsE6rKp.esm.js → urlUtils-eYiyWjh0.esm.js} +4 -1
  271. package/dist/usStates-CwOQ2kAx.esm.js +209 -0
  272. package/dist/video-selfie.d.ts +16 -14
  273. package/dist/video-selfie.esm.js +100 -24
  274. package/dist/{videoSelfieCameraWarmer-BBNKiau1.esm.js → videoSelfieCameraWarmer-a7GBfmEZ.esm.js} +27 -28
  275. package/dist/{videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js → videoSelfieFlowModuleMachine-IWdxw1TW.esm.js} +1 -1
  276. package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-DRrh4P0A.d.ts} +10 -5
  277. package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
  278. package/dist/{warmup-BO57syF6.d.ts → warmup-BNhIuURi.d.ts} +18 -2
  279. package/dist/{warmup-BElYWRh7.esm.js → warmup-BZOMg303.esm.js} +243 -30
  280. package/dist/wasm.d.ts +9 -3
  281. package/dist/wasm.esm.js +3 -3
  282. package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-DPK7qGgo.esm.js} +1 -1
  283. package/dist/wasmMetadataVersionSync-U8EFUr1T.esm.js +27 -0
  284. package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-CyLCM31e.esm.js} +45 -26
  285. package/dist/watchlist-for-business.d.ts +2 -1
  286. package/dist/watchlist-for-business.esm.js +2 -2
  287. package/dist/watchlist.d.ts +1 -1
  288. package/dist/watchlist.esm.js +2 -2
  289. package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-BH6M4kqA.esm.js} +40 -8
  290. package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-l7ZERQcV.d.ts} +57 -21
  291. package/dist/watchlistForBusinessStateMachine-BMWm5mcP.esm.js +166 -0
  292. package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-BDaVjzLW.esm.js} +5 -3
  293. package/dist/{watchlistManager-DJQOd8Pw.d.ts → watchlistManager-DQq4GxBO.d.ts} +3 -3
  294. package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-Cx-6QAvu.esm.js} +3 -3
  295. package/dist/workflow.d.ts +234 -45
  296. package/dist/workflow.esm.js +194 -80
  297. package/dist/{xstate-actors.esm-8Gzepa_A.esm.js → xstate-actors.esm-BCcwgosu.esm.js} +1 -1
  298. package/dist/xstate.cjs-D6Ur0X1F.d.ts +7 -0
  299. package/dist/{xstate.esm-DSajW7CJ.esm.js → xstate.esm-CIqUf_i6.esm.js} +1 -125
  300. package/package.json +24 -7
  301. package/dist/Actor-DpTj5PFb.d.ts +0 -1
  302. package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
  303. package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
  304. package/dist/cpf-uAZTPUBy.esm.js +0 -61
  305. package/dist/deepsightLoader-sH7920zw.esm.js +0 -55
  306. package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
  307. package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
  308. package/dist/index-DpTj5PFb.d.ts +0 -1
  309. package/dist/types-BvLo3U4u.d.ts +0 -134
  310. package/dist/types-zOgZqMni.d.ts +0 -6
  311. package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
  312. /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
package/dist/flow.esm.js CHANGED
@@ -1,10 +1,13 @@
1
- import { y as addEvent } from "./events-Du2A4-Qr.esm.js";
2
- import { a as resolveDashboardModuleConfig, c as getRequiredWasmPipelines, j as mergeDashboardConfig, l as normalizeFlowModules, n as getFlow, o as enrichFlowModuleConfig, r as preloadDashboardFlow, s as getNextRequiredWasmPipelines, t as completeDeferredActivation, u as resolveFlowModuleConfig } from "./flowServices-X6Rwf_7E.esm.js";
3
- import { i as assign, s as createActor, t as setup, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
- import { n as getFinishStatus, r as getTotalScoreStatus, t as classifyScoreStatus } from "./flowCompletionService-Cemwaa5b.esm.js";
6
- import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-DSpP41Hl.esm.js";
7
- import { n as isAdvanceableError } from "./advanceableErrors-q_pfU3Cn.esm.js";
1
+ import { g as screenOpened, m as screenClosed, v as addEvent } from "./types-DYYMdAGv.esm.js";
2
+ import "./events-CP3yOzAl.esm.js";
3
+ import { i as retryAfterReconnect } from "./connectivity-BCuEoQ-n.esm.js";
4
+ import { S as mergeDashboardConfig, _ as resolveFlowModuleConfig, a as resolveDashboardModuleConfig, c as decideFlowPresets, d as stepsThatMayRunNext, f as enrichFlowModuleConfig, g as normalizeFlowModules, h as loadFlowConfigConverters, l as flowPresetAnalyticsModule, m as getRequiredWasmPipelines, n as getFlow, o as applyFlowPresets, p as getNextRequiredWasmPipelines, r as preloadDashboardFlow, s as armFlowPresets, t as completeDeferredActivation, u as getFirstFlowModuleKey, x as applyModulesConfig } from "./flowServices-Cj8SQjQT.esm.js";
5
+ import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
6
+ import { i as assign, s as createActor, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
7
+ import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
8
+ import { a as getTotalScoreStatus, i as getHandoffFinishStatus, n as classifyScoreStatus, r as getFinishStatus, t as HANDOFF_COMPLETION_TIMEOUT_MS } from "./flowCompletionService-Crry_GxY.esm.js";
9
+ import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-CJzb91Cf.esm.js";
10
+ import { n as isAdvanceableError } from "./advanceableErrors-CxZyPRyh.esm.js";
8
11
  //#region src/modules/flow/noOpFlowModuleMachine.ts
9
12
  const noOpFlowModuleMachine = /* @__PURE__ */ (() => setup({}).createMachine({
10
13
  id: "noOpFlowModule",
@@ -12,6 +15,37 @@ const noOpFlowModuleMachine = /* @__PURE__ */ (() => setup({}).createMachine({
12
15
  states: { finished: { type: "final" } }
13
16
  }))();
14
17
  //#endregion
18
+ //#region src/modules/flow/flowOcrSteps.ts
19
+ /** Prepare the standard two-ID journey without changing standalone dashboard configuration. */
20
+ function prepareFlowOcrSteps(flow) {
21
+ const modules = flow.flowModules;
22
+ const firstIds = modules.filter((module) => module.key === "ID" || module.key === "TUTORIAL_ID");
23
+ const secondIds = modules.filter((module) => module.key === "SECOND_ID");
24
+ const reviews = modules.filter((module) => module.key === "ID_OCR");
25
+ if (firstIds.length !== 1 || secondIds.length !== 1 || reviews.length !== 1) return flow;
26
+ const [first] = firstIds;
27
+ const [second] = secondIds;
28
+ const [review] = reviews;
29
+ if (review.configuration.ocrDocument !== void 0 || modules.indexOf(first) >= modules.indexOf(second) || modules.indexOf(review) < modules.indexOf(first)) return flow;
30
+ const reviewFor = (ocrDocument) => ({
31
+ ...review,
32
+ configuration: {
33
+ ...review.configuration,
34
+ ocrDocument,
35
+ secondId: false
36
+ }
37
+ });
38
+ return {
39
+ ...flow,
40
+ flowModules: modules.flatMap((module) => {
41
+ if (module === review) return [];
42
+ if (module === first) return [module, reviewFor("first")];
43
+ if (module === second && review.configuration.secondId !== false) return [module, reviewFor("second")];
44
+ return [module];
45
+ })
46
+ };
47
+ }
48
+ //#endregion
15
49
  //#region src/modules/flow/flowStateMachine.ts
16
50
  /**
17
51
  * Flow-level `ds` (Deepsight) lives on the flow, not on the module, so it has
@@ -46,7 +80,7 @@ const flowMachine = /* @__PURE__ */ (() => setup({
46
80
  getFlow: context.getFlow
47
81
  })),
48
82
  setFlowData: assign(({ event }) => {
49
- const flow = event.output;
83
+ const flow = prepareFlowOcrSteps(event.output);
50
84
  return {
51
85
  flow,
52
86
  steps: (flow.flowModules ?? []).map((m) => m.key),
@@ -189,7 +223,9 @@ function createApi({ actor, getSnapshot, trackElementClicked }) {
189
223
  function getModuleConfig(moduleKey) {
190
224
  const snapshot = getSnapshot();
191
225
  if (!snapshot.matches("ready")) return;
192
- return (snapshot.context.flow?.flowModules.find((m) => m.key === moduleKey))?.configuration;
226
+ const { flow, currentStepIndex } = snapshot.context;
227
+ const activeModule = flow?.flowModules[currentStepIndex];
228
+ return (activeModule?.key === moduleKey ? activeModule : flow?.flowModules.find((m) => m.key === moduleKey))?.configuration;
193
229
  }
194
230
  function isModuleEnabled(moduleKey) {
195
231
  const snapshot = getSnapshot();
@@ -254,8 +290,9 @@ function createApi({ actor, getSnapshot, trackElementClicked }) {
254
290
  },
255
291
  /**
256
292
  * Gets the configuration for a specific module by its key.
293
+ * Returns the active occurrence when the current step has that key.
257
294
  * Useful for accessing config of modules other than the current one.
258
- * @param moduleKey - The unique key identifier of the module
295
+ * @param moduleKey - The module key
259
296
  * @returns The module configuration or `undefined` if not found or not in `ready` state
260
297
  */
261
298
  getModuleConfig,
@@ -341,6 +378,15 @@ function createModuleLoader(registry) {
341
378
  }
342
379
  //#endregion
343
380
  //#region src/modules/flow/orchestratedFlowStateMachine.ts
381
+ /**
382
+ * Whether only the step's own machine can end it: a host's `completeModule()`,
383
+ * or a continuable `errorModule()`, is dropped while it runs (owner decision
384
+ * 12). Today that is the identity search, whose answer the reuse step after it
385
+ * reads.
386
+ */
387
+ function endsOnlyThroughItsMachine(step) {
388
+ return step === "IDENTITY_SEARCH";
389
+ }
344
390
  function getModuleConfig(module, flow) {
345
391
  if (!module || !flow) return {};
346
392
  return resolveFlowModuleConfig(module, flow);
@@ -362,10 +408,12 @@ function createBaseContext(context, isHomeContinueLoading) {
362
408
  getFinishStatus: context.getFinishStatus,
363
409
  enableHome: context.enableHome,
364
410
  finishStatus: void 0,
411
+ completedOnMobile: false,
365
412
  isHomeContinueLoading,
366
413
  deferActivation: context.deferActivation,
367
414
  activationResolved: false,
368
- skipFaceMatch: false
415
+ skipFaceMatch: false,
416
+ armedPresets: []
369
417
  };
370
418
  }
371
419
  function createInitialContext(input) {
@@ -387,22 +435,41 @@ function createInitialContext(input) {
387
435
  function homeScreenEnabled(context, flow) {
388
436
  return context.enableHome === true && flow?.disableLaunchScreen !== true && context.isHomeContinueLoading !== true;
389
437
  }
438
+ /**
439
+ * Whether a machine is registered for a module key, eagerly or lazily. Reads
440
+ * the registries when it is called: `<incode-flow>` fills its lazy registry
441
+ * inside `getFlow`, so a check made after `getFlow` sees the keys it added.
442
+ */
443
+ function canResolveModule(context, key) {
444
+ return context.registeredModules[key] != null || context.lazyRegisteredModules[key] != null;
445
+ }
390
446
  function shouldEnterHome(context) {
391
447
  if (!homeScreenEnabled(context, context.flow)) return false;
392
448
  const firstRealIndex = context.steps[0] === "REDIRECT_TO_MOBILE" ? 1 : 0;
393
449
  return context.currentStepIndex === firstRealIndex;
394
450
  }
395
451
  const prefetchedLazyModules = /* @__PURE__ */ new WeakSet();
396
- function prefetchNextLazyModule(context) {
397
- const nextStep = context.steps[context.currentStepIndex + 1];
398
- if (!nextStep) return;
399
- const nextLazyModule = context.lazyRegisteredModules[nextStep];
400
- if (!nextLazyModule || prefetchedLazyModules.has(nextLazyModule)) return;
401
- prefetchedLazyModules.add(nextLazyModule);
402
- nextLazyModule().catch(() => {
403
- prefetchedLazyModules.delete(nextLazyModule);
452
+ /**
453
+ * The steps that can run after the current one: the next step, or, on a
454
+ * step where a preset decides the path, the next step on each path.
455
+ */
456
+ function getStepsThatMayRunNext(context) {
457
+ return stepsThatMayRunNext({
458
+ armedPresets: context.armedPresets,
459
+ steps: context.steps,
460
+ currentStepIndex: context.currentStepIndex
404
461
  });
405
462
  }
463
+ function prefetchNextLazyModules(context) {
464
+ for (const nextStep of getStepsThatMayRunNext(context)) {
465
+ const nextLazyModule = context.lazyRegisteredModules[nextStep];
466
+ if (!nextLazyModule || prefetchedLazyModules.has(nextLazyModule)) continue;
467
+ prefetchedLazyModules.add(nextLazyModule);
468
+ nextLazyModule().catch(() => {
469
+ prefetchedLazyModules.delete(nextLazyModule);
470
+ });
471
+ }
472
+ }
406
473
  const homeContinueOn = { HOME_CONTINUE: { actions: "setHomeContinueLoading" } };
407
474
  const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
408
475
  types: {
@@ -411,12 +478,25 @@ const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
411
478
  input: {}
412
479
  },
413
480
  actors: {
481
+ resolveHandoffCompletion: fromPromise(({ signal }) => getHandoffFinishStatus(signal)),
414
482
  fetchFlow: fromPromise(async ({ input, signal }) => {
415
- return input.getFlow(signal);
416
- }),
417
- notifyBackend: fromPromise(async ({ input, signal }) => {
418
- return await input.getFinishStatus(input.flowId, signal);
483
+ const served = prepareFlowOcrSteps(await retryAfterReconnect(() => input.getFlow(signal), signal));
484
+ const arming = armFlowPresets(served, input.canResolve);
485
+ if (arming.status === "misconfigured") return {
486
+ flow: served,
487
+ arming
488
+ };
489
+ const flow = arming.armedPresets.length > 0 ? {
490
+ ...served,
491
+ flowModules: arming.modules
492
+ } : served;
493
+ await loadFlowConfigConverters(flow);
494
+ return {
495
+ flow,
496
+ arming
497
+ };
419
498
  }),
499
+ notifyBackend: fromPromise(({ input, signal }) => retryAfterReconnect(() => input.getFinishStatus(input.flowId, signal), signal)),
420
500
  runChildModule,
421
501
  resolveActivation: fromPromise(async ({ input, signal }) => {
422
502
  if (!input.flow) throw new Error("No flow loaded");
@@ -439,7 +519,7 @@ const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
439
519
  setHomeContinueLoading: assign({ isHomeContinueLoading: true }),
440
520
  clearHomeContinueLoading: assign({ isHomeContinueLoading: false }),
441
521
  setFlowData: assign(({ event }) => {
442
- const flow = event.output;
522
+ const { flow, arming } = event.output;
443
523
  const flowModules = flow.flowModules ?? [];
444
524
  const firstModule = flowModules[0];
445
525
  const config = getModuleConfig(firstModule, flow);
@@ -449,11 +529,88 @@ const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
449
529
  currentStepIndex: flowModules.length > 0 ? 0 : -1,
450
530
  currentStep: firstModule?.key,
451
531
  config,
452
- currentModuleMachine: void 0
532
+ currentModuleMachine: void 0,
533
+ armedPresets: arming.status === "armed" ? arming.armedPresets : []
534
+ };
535
+ }),
536
+ setMisconfiguredFlowError: assign(({ event }) => {
537
+ const { arming } = event.output;
538
+ if (arming.status !== "misconfigured") return {};
539
+ return {
540
+ error: arming.message,
541
+ moduleErrorCode: arming.moduleErrorCode
542
+ };
543
+ }),
544
+ reportArmedPresets: ({ event }) => {
545
+ const { flow, arming } = event.output;
546
+ if (arming.status !== "armed") return;
547
+ const steps = flow.flowModules.map((module) => module.key);
548
+ for (const preset of arming.armedPresets) {
549
+ const module = flowPresetAnalyticsModule(preset);
550
+ const screenName = `${module}.started`;
551
+ screenOpened(module, screenName, { steps });
552
+ screenClosed(module, screenName);
553
+ }
554
+ },
555
+ reportMisconfiguredFlow: ({ event }) => {
556
+ const { arming } = event.output;
557
+ if (arming.status !== "misconfigured") return;
558
+ addEvent({
559
+ code: "errorTriggered",
560
+ module: flowPresetAnalyticsModule(arming.preset),
561
+ payload: {
562
+ errorCode: arming.moduleErrorCode,
563
+ advanced: false,
564
+ missing: arming.missing,
565
+ unsupported: arming.unsupported,
566
+ unregistered: arming.unregistered
567
+ }
568
+ });
569
+ },
570
+ reportPresetDecisions: ({ context, event }) => {
571
+ const ending = event;
572
+ const decisions = decideFlowPresets({
573
+ armedPresets: context.armedPresets,
574
+ steps: context.steps,
575
+ currentStepIndex: context.currentStepIndex,
576
+ ending: {
577
+ output: ending.output,
578
+ moduleErrorCode: ending.moduleErrorCode
579
+ }
580
+ });
581
+ for (const decision of decisions) {
582
+ const screenName = `${decision.analyticsModule}.${decision.outcome}`;
583
+ screenOpened(decision.analyticsModule, screenName, {
584
+ decidedAfter: context.currentStep,
585
+ errorCode: ending.moduleErrorCode,
586
+ skippedModules: decision.skipped.map((index) => context.steps[index])
587
+ });
588
+ screenClosed(decision.analyticsModule, screenName);
589
+ }
590
+ },
591
+ removeSkippedPresetMembers: assign(({ context, event }) => {
592
+ const ending = event;
593
+ const removed = applyFlowPresets({
594
+ armedPresets: context.armedPresets,
595
+ steps: context.steps,
596
+ currentStepIndex: context.currentStepIndex,
597
+ ending: {
598
+ output: ending.output,
599
+ moduleErrorCode: ending.moduleErrorCode
600
+ }
601
+ });
602
+ if (removed.length === 0 || !context.flow) return {};
603
+ const kept = (_, index) => !removed.includes(index);
604
+ return {
605
+ steps: context.steps.filter(kept),
606
+ flow: {
607
+ ...context.flow,
608
+ flowModules: context.flow.flowModules.filter(kept)
609
+ }
453
610
  };
454
611
  }),
455
612
  setActivatedFlow: assign(({ context, event }) => {
456
- const flow = event.output;
613
+ const flow = prepareFlowOcrSteps(event.output);
457
614
  const flowModules = flow.flowModules ?? [];
458
615
  const steps = flowModules.map((m) => m.key);
459
616
  let insertedAt = steps.findIndex((key, i) => key !== context.steps[i]);
@@ -502,11 +659,22 @@ const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
502
659
  }),
503
660
  setCurrentModuleMachine: assign(({ event }) => ({ currentModuleMachine: event.output })),
504
661
  prefetchNextModule: ({ context }) => {
505
- prefetchNextLazyModule(context);
662
+ prefetchNextLazyModules(context);
506
663
  },
507
664
  setFinishStatus: assign(({ event }) => ({ finishStatus: event.output })),
508
665
  setFinishStatusFailed: assign({ moduleErrorCode: "FINISH_STATUS_FAILED" }),
509
666
  setModuleErrorCode: assign(({ event }) => ({ moduleErrorCode: event.moduleErrorCode })),
667
+ trackFailingModuleError: ({ context, event }) => {
668
+ const { moduleErrorCode } = event;
669
+ addEvent({
670
+ code: "errorTriggered",
671
+ module: context.currentStep,
672
+ payload: moduleErrorCode === void 0 ? { advanced: false } : {
673
+ errorCode: moduleErrorCode,
674
+ advanced: false
675
+ }
676
+ });
677
+ },
510
678
  trackAdvanceableModuleError: ({ context, event }) => {
511
679
  addEvent({
512
680
  code: "errorTriggered",
@@ -520,26 +688,30 @@ const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
520
688
  },
521
689
  guards: {
522
690
  isAdvanceableModuleError: ({ event }) => isAdvanceableError(event.moduleErrorCode),
523
- isAdvanceableModuleErrorOnLastStep: ({ context, event }) => isAdvanceableError(event.moduleErrorCode) && context.currentStepIndex >= 0 && context.currentStepIndex === context.steps.length - 1,
691
+ isEarlySearchCompletion: ({ context, event }) => endsOnlyThroughItsMachine(context.currentStep) && event.fromChild !== true,
692
+ isAdvanceableSearchError: ({ context, event }) => endsOnlyThroughItsMachine(context.currentStep) && isAdvanceableError(event.moduleErrorCode),
693
+ isMisconfiguredFlow: ({ event }) => "output" in event && event.output.arming.status === "misconfigured",
524
694
  isLastStep: ({ context }) => context.currentStepIndex >= 0 && context.currentStepIndex === context.steps.length - 1,
525
695
  canGoNext: ({ context }) => context.currentStepIndex >= 0 && context.currentStepIndex < context.steps.length - 1,
696
+ isRedirectToMobileStep: ({ context }) => context.currentStep === "REDIRECT_TO_MOBILE",
526
697
  isOnboardingFinishedSignal: ({ event }) => event.output?.action === "onboardingFinished",
527
698
  shouldEnterHome: ({ context }) => shouldEnterHome(context),
528
699
  needsActivation: ({ context }) => context.deferActivation && !context.activationResolved && context.currentStep !== "REDIRECT_TO_MOBILE",
529
700
  activatesBeforeFirstModule: ({ context, event }) => {
530
701
  if (!("output" in event)) return false;
531
702
  if (!context.deferActivation || context.activationResolved) return false;
532
- const flow = event.output;
703
+ const { flow } = event.output;
533
704
  const firstModuleKey = flow.flowModules?.[0]?.key;
534
705
  if (!firstModuleKey || firstModuleKey === "REDIRECT_TO_MOBILE") return false;
535
- if (!(context.registeredModules[firstModuleKey] != null || context.lazyRegisteredModules[firstModuleKey] != null)) return false;
706
+ if (!canResolveModule(context, firstModuleKey)) return false;
536
707
  return !homeScreenEnabled(context, flow);
537
708
  },
538
709
  hasModule: ({ context, event }) => {
539
710
  if (!("output" in event)) return false;
540
- const firstModuleKey = event.output.flowModules?.[0]?.key;
711
+ const { flow } = event.output;
712
+ const firstModuleKey = flow.flowModules?.[0]?.key;
541
713
  if (!firstModuleKey) return false;
542
- return context.registeredModules[firstModuleKey] != null || context.lazyRegisteredModules[firstModuleKey] != null;
714
+ return canResolveModule(context, firstModuleKey);
543
715
  },
544
716
  hasCurrentModuleMachine: ({ event }) => {
545
717
  if (!("output" in event)) return false;
@@ -562,22 +734,31 @@ const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
562
734
  invoke: {
563
735
  id: "fetchFlow",
564
736
  src: "fetchFlow",
565
- input: ({ context }) => ({ getFlow: context.getFlow }),
737
+ input: ({ context }) => ({
738
+ getFlow: context.getFlow,
739
+ canResolve: (key) => canResolveModule(context, key)
740
+ }),
566
741
  onDone: [
742
+ {
743
+ target: "error",
744
+ guard: "isMisconfiguredFlow",
745
+ actions: ["setMisconfiguredFlowError", "reportMisconfiguredFlow"]
746
+ },
567
747
  {
568
748
  target: "resolvingActivation",
569
749
  guard: "activatesBeforeFirstModule",
570
- actions: "setFlowData"
750
+ actions: ["setFlowData", "reportArmedPresets"]
571
751
  },
572
752
  {
573
753
  target: "resolvingModule",
574
754
  guard: "hasModule",
575
- actions: "setFlowData"
755
+ actions: ["setFlowData", "reportArmedPresets"]
576
756
  },
577
757
  {
578
758
  target: "error",
579
759
  actions: assign({ error: ({ event }) => {
580
- const firstModuleKey = event.output.flowModules?.[0]?.key;
760
+ const { flow } = event.output;
761
+ const firstModuleKey = flow.flowModules?.[0]?.key;
581
762
  return firstModuleKey ? `No registered module found for: ${firstModuleKey}` : "No registered module found: flow has no modules";
582
763
  } })
583
764
  }
@@ -686,13 +867,6 @@ const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
686
867
  config: context.config
687
868
  };
688
869
  },
689
- onDone: [{
690
- target: "completing",
691
- guard: "isLastStep"
692
- }, {
693
- target: "resolvingModule",
694
- actions: "incrementStep"
695
- }],
696
870
  onError: {
697
871
  target: "error",
698
872
  actions: "setError"
@@ -700,50 +874,78 @@ const orchestratedFlowMachine = /* @__PURE__ */ (() => setup({
700
874
  },
701
875
  on: {
702
876
  MODULE_COMPLETE: [
877
+ { guard: "isEarlySearchCompletion" },
703
878
  {
704
- target: "finished",
879
+ target: "resolvingHandoffCompletion",
705
880
  guard: "isOnboardingFinishedSignal"
706
881
  },
707
882
  {
708
- target: "completing",
709
- guard: "isLastStep"
710
- },
711
- {
712
- target: "resolvingModule",
713
- actions: ["persistSkipFaceMatch", "incrementStep"]
883
+ target: "advancing",
884
+ actions: [
885
+ "persistSkipFaceMatch",
886
+ "reportPresetDecisions",
887
+ "removeSkippedPresetMembers"
888
+ ]
714
889
  }
715
890
  ],
716
891
  MODULE_ERROR: [
717
- {
718
- guard: "isAdvanceableModuleErrorOnLastStep",
719
- target: "completing",
720
- actions: ["setModuleErrorCode", "trackAdvanceableModuleError"]
721
- },
892
+ { guard: "isAdvanceableSearchError" },
722
893
  {
723
894
  guard: "isAdvanceableModuleError",
724
- target: "resolvingModule",
895
+ target: "advancing",
725
896
  actions: [
726
897
  "setModuleErrorCode",
727
898
  "trackAdvanceableModuleError",
728
- "incrementStep"
899
+ "reportPresetDecisions",
900
+ "removeSkippedPresetMembers"
729
901
  ]
730
902
  },
731
903
  {
732
904
  target: "error",
733
- actions: ["setModuleErrorCode", assign(({ event }) => {
734
- const rawError = event.error;
735
- return { error: rawError === void 0 ? void 0 : String(rawError) };
736
- })]
905
+ actions: [
906
+ "setModuleErrorCode",
907
+ "trackFailingModuleError",
908
+ assign(({ event }) => {
909
+ const rawError = event.error;
910
+ return { error: rawError === void 0 ? void 0 : String(rawError) };
911
+ })
912
+ ]
737
913
  }
738
914
  ],
739
915
  COMPLETE_FLOW: { target: "completing" },
740
- FINISH_FLOW: { target: "finished" },
916
+ FINISH_FLOW: [{
917
+ guard: "isRedirectToMobileStep",
918
+ target: "resolvingHandoffCompletion"
919
+ }, { target: "finished" }],
741
920
  RESET: {
742
921
  target: "idle",
743
922
  actions: "resetContext"
744
923
  }
745
924
  }
746
925
  },
926
+ advancing: { always: [{
927
+ target: "completing",
928
+ guard: "isLastStep"
929
+ }, {
930
+ target: "resolvingModule",
931
+ actions: "incrementStep"
932
+ }] },
933
+ resolvingHandoffCompletion: {
934
+ entry: assign({ completedOnMobile: true }),
935
+ after: { [HANDOFF_COMPLETION_TIMEOUT_MS]: "finished" },
936
+ invoke: {
937
+ src: "resolveHandoffCompletion",
938
+ onDone: {
939
+ target: "finished",
940
+ actions: "setFinishStatus"
941
+ },
942
+ onError: { target: "finished" }
943
+ },
944
+ on: { RESET: {
945
+ target: "idle",
946
+ actions: "resetContext"
947
+ } }
948
+ },
747
949
  completing: {
748
950
  invoke: {
749
951
  id: "notifyBackend",
@@ -784,7 +986,7 @@ function deriveUiModel(snapshot, mappedStatus, isHomePhase, options) {
784
986
  const effectiveEnableHome = enableHome === true && serverDisablesLaunch === false;
785
987
  const isTerminal = mappedStatus === "finished" || mappedStatus === "error";
786
988
  const awaitingOrchestrator = mappedStatus === "idle" || mappedStatus === "loading";
787
- const isCompletingPhase = snapshot.value === "completing";
989
+ const isCompletingPhase = mappedStatus === "completing";
788
990
  const firstRealIndex = snapshot.context.steps[0] === "REDIRECT_TO_MOBILE" ? 1 : 0;
789
991
  const isAtFirstRealModule = snapshot.context.currentStepIndex === firstRealIndex;
790
992
  const isResolvingHomeAnchor = (snapshot.value === "resolvingModule" || snapshot.value === "resolvingActivation") && effectiveEnableHome && isAtFirstRealModule;
@@ -801,15 +1003,16 @@ function deriveUiModel(snapshot, mappedStatus, isHomePhase, options) {
801
1003
  presentation: {
802
1004
  isAwaitingReady: awaitingOrchestrator,
803
1005
  lazyModuleKey,
804
- shouldPrefetchHome
1006
+ shouldPrefetchHome,
1007
+ prefetchModuleKeys: lazyModuleKey === void 0 ? [] : getStepsThatMayRunNext(snapshot.context)
805
1008
  }
806
1009
  };
807
1010
  }
808
1011
  function getMappedStatus(snapshot) {
809
1012
  const { value } = snapshot;
810
1013
  if (value === "idle") return "idle";
811
- if (value === "completing") return "completing";
812
- if (value === "loading" || value === "resolvingModule" || value === "resolvingActivation" || typeof value === "object") return "loading";
1014
+ if (value === "completing" || value === "resolvingHandoffCompletion") return "completing";
1015
+ if (value === "loading" || value === "resolvingModule" || value === "resolvingActivation" || value === "advancing" || typeof value === "object") return "loading";
813
1016
  if (value === "finished") return "finished";
814
1017
  if (value === "error") return "error";
815
1018
  return "ready";
@@ -836,6 +1039,7 @@ function mapOrchestratedFlowState(snapshot, uiOptions) {
836
1039
  if (mappedStatus === "finished") return {
837
1040
  status: "finished",
838
1041
  flow: context.flow ?? {},
1042
+ ...context.completedOnMobile ? { completedOnMobile: true } : {},
839
1043
  finishStatus: context.finishStatus ?? {
840
1044
  redirectionUrl: "",
841
1045
  action: "none",
@@ -905,12 +1109,14 @@ function createOrchestratedFlowApi({ actor, getSnapshot, trackElementClicked },
905
1109
  function getCanNext() {
906
1110
  const snapshot = getSnapshot();
907
1111
  const { currentStepIndex, steps } = snapshot.context;
908
- return snapshot.value === "runningModule" && currentStepIndex >= 0 && currentStepIndex < steps.length - 1;
1112
+ return snapshot.value === "runningModule" && currentStepIndex >= 0 && currentStepIndex < steps.length - 1 && !endsOnlyThroughItsMachine(snapshot.context.currentStep);
909
1113
  }
910
1114
  function getModuleConfig(moduleKey) {
911
1115
  const snapshot = getSnapshot();
912
1116
  if (snapshot.value !== "runningModule") return;
913
- return (snapshot.context.flow?.flowModules.find((m) => m.key === moduleKey))?.configuration;
1117
+ const { flow, currentStepIndex } = snapshot.context;
1118
+ const activeModule = flow?.flowModules[currentStepIndex];
1119
+ return (activeModule?.key === moduleKey ? activeModule : flow?.flowModules.find((m) => m.key === moduleKey))?.configuration;
914
1120
  }
915
1121
  function isModuleEnabled(moduleKey) {
916
1122
  const snapshot = getSnapshot();
@@ -1001,8 +1207,18 @@ function createOrchestratedFlowApi({ actor, getSnapshot, trackElementClicked },
1001
1207
  * Prefer using the typed methods (completeModule, errorModule) when possible.
1002
1208
  */
1003
1209
  send(event) {
1210
+ if ("fromChild" in event) {
1211
+ const { fromChild: _fromChild, ...rest } = event;
1212
+ actor.send(rest);
1213
+ return;
1214
+ }
1004
1215
  actor.send(event);
1005
1216
  },
1217
+ /**
1218
+ * True while a step runs that `completeModule()` would move past to
1219
+ * another step. False on the last step, and on a step only its own machine
1220
+ * can end, such as the identity search.
1221
+ */
1006
1222
  get canNext() {
1007
1223
  return getCanNext();
1008
1224
  },
@@ -1046,8 +1262,10 @@ function createOrchestratedFlowApi({ actor, getSnapshot, trackElementClicked },
1046
1262
  };
1047
1263
  }
1048
1264
  function createOrchestratedFlowActor(options) {
1265
+ const getFlow$1 = options.getFlow ?? getFlow;
1266
+ const { modulesConfig } = options;
1049
1267
  return createActor(orchestratedFlowMachine, { input: {
1050
- getFlow: options.getFlow ?? getFlow,
1268
+ getFlow: modulesConfig ? async (signal) => applyModulesConfig(await getFlow$1(signal), modulesConfig) : getFlow$1,
1051
1269
  modules: options.modules,
1052
1270
  lazyModules: options.lazyModules,
1053
1271
  getFinishStatus: options.getFinishStatus,
@@ -1066,4 +1284,4 @@ function createOrchestratedFlowManager(options) {
1066
1284
  }), { getInterviewId: options.getInterviewId });
1067
1285
  }
1068
1286
  //#endregion
1069
- export { classifyScoreStatus, createFlowManager, createModuleLoader, createOrchestratedFlowManager, enrichFlowModuleConfig, getFlow, getNextRequiredWasmPipelines, getRequiredWasmPipelines, getTotalScoreStatus, mergeDashboardConfig, noOpFlowModuleMachine, normalizeFlowModules, preloadDashboardFlow, resolveDashboardModuleConfig };
1287
+ export { classifyScoreStatus, createFlowManager, createModuleLoader, createOrchestratedFlowManager, enrichFlowModuleConfig, getFirstFlowModuleKey, getFlow, getNextRequiredWasmPipelines, getRequiredWasmPipelines, getTotalScoreStatus, mergeDashboardConfig, noOpFlowModuleMachine, normalizeFlowModules, preloadDashboardFlow, resolveDashboardModuleConfig };
@@ -1,5 +1,5 @@
1
- import { t as api, u as endpoints } from "./api-Cz90EHyu.esm.js";
2
- import { i as toIncodeApiError } from "./apiError-9Yi8xMeB.esm.js";
1
+ import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
2
+ import { i as toIncodeApiError } from "./apiError-DJHHF70K.esm.js";
3
3
  //#region src/modules/flow/flowCompletionService.ts
4
4
  const getFinishStatus = async (flowId, signal) => {
5
5
  const url = `${endpoints.finishStatus}${flowId ? `?flowId=${flowId}` : ""}`;
@@ -13,6 +13,27 @@ const getFinishStatus = async (flowId, signal) => {
13
13
  toIncodeApiError(endpoints.finishStatus, error);
14
14
  }
15
15
  };
16
+ const HANDOFF_COMPLETION_TIMEOUT_MS = 1e4;
17
+ /** Mobile already finished the session; read its redirect without finishing again. */
18
+ async function getHandoffFinishStatus(signal) {
19
+ try {
20
+ const data = (await api.get(endpoints.redirectionUrl, {
21
+ signal,
22
+ timeout: HANDOFF_COMPLETION_TIMEOUT_MS
23
+ })).data;
24
+ let redirectionUrl = "";
25
+ if (typeof data === "object" && data !== null && "redirectionUrl" in data && typeof data.redirectionUrl === "string") redirectionUrl = data.redirectionUrl;
26
+ return {
27
+ redirectionUrl,
28
+ action: "none",
29
+ scoreStatus: "UNKNOWN",
30
+ endScreenTitle: null,
31
+ endScreenText: null
32
+ };
33
+ } catch (error) {
34
+ toIncodeApiError(endpoints.redirectionUrl, error);
35
+ }
36
+ }
16
37
  const SCORE_VARIANTS = {
17
38
  OK: "success",
18
39
  WARN: "success",
@@ -36,4 +57,4 @@ async function getTotalScoreStatus(signal) {
36
57
  }
37
58
  }
38
59
  //#endregion
39
- export { getFinishStatus as n, getTotalScoreStatus as r, classifyScoreStatus as t };
60
+ export { getTotalScoreStatus as a, getHandoffFinishStatus as i, classifyScoreStatus as n, getFinishStatus as r, HANDOFF_COMPLETION_TIMEOUT_MS as t };