@incodetech/core 2.4.1-agentic → 2.4.1-agentic.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 (204) hide show
  1. package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
  2. package/dist/{multipartRecordingService-DMBxHKS2.esm.js → CameraCompositor-DN7NkJzV.esm.js} +7 -734
  3. package/dist/{FaceDetectionProvider-B83VmClw.esm.js → FaceDetectionProvider-CAY43vSI.esm.js} +11 -12
  4. package/dist/MultipartRecordingProvider-D9mauUdS.esm.js +146 -0
  5. package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
  6. package/dist/{WasmUtilProvider-GTkoJyFY.esm.js → WasmUtilProvider-Dp2V-Uct.esm.js} +2 -2
  7. package/dist/WorkerEncoderRecordingProvider-B1ODYtgN.esm.js +80 -0
  8. package/dist/{addressSearch-41sMcnJk.esm.js → addressSearch-DzbE9Ogt.esm.js} +2 -352
  9. package/dist/ae-signature.esm.js +1 -1
  10. package/dist/antifraud.esm.js +2 -2
  11. package/dist/{antifraudManager-CQ08atTC.esm.js → antifraudManager-BObuHBjn.esm.js} +2 -2
  12. package/dist/{antifraudStateMachine-BcsUTTIr.esm.js → antifraudStateMachine-Dfrd2-26.esm.js} +1 -1
  13. package/dist/{api-BO8JA7Pf.esm.js → api-CpP4PS4S.esm.js} +2 -0
  14. package/dist/{apiError-CfuIvnUy.esm.js → apiError-DH-CH4Nz.esm.js} +1 -1
  15. package/dist/{attemptCarry-BjTJ6bMQ.esm.js → attemptCarry-WOkfvFMw.esm.js} +2 -2
  16. package/dist/authentication.d.ts +3 -3
  17. package/dist/authentication.esm.js +2 -2
  18. package/dist/{authenticationManager-C-cOki0Y.d.ts → authenticationManager-CWmh7aSY.d.ts} +1 -1
  19. package/dist/{authenticationManager-DvmklBTE.esm.js → authenticationManager-DjX0XDyH.esm.js} +5 -5
  20. package/dist/{authenticationStateMachine-BL2ptOA0.esm.js → authenticationStateMachine-BMbZL8wm.esm.js} +3 -3
  21. package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
  22. package/dist/{backCameraStream-C5_NNfUN.esm.js → backCameraStream-DS1oDiUq.esm.js} +10 -65
  23. package/dist/camera.d.ts +2 -2
  24. package/dist/camera.esm.js +1 -1
  25. package/dist/certificate-issuance.esm.js +2 -2
  26. package/dist/{certificateIssuanceManager-CM0fuqDC.esm.js → certificateIssuanceManager-C1nETQos.esm.js} +2 -2
  27. package/dist/{certificateIssuanceStateMachine-kksIUOPD.esm.js → certificateIssuanceStateMachine-DThXMDqr.esm.js} +1 -1
  28. package/dist/{connectivity-HSl0diCx.esm.js → connectivity-BCuEoQ-n.esm.js} +2 -21
  29. package/dist/consent.d.ts +1 -1
  30. package/dist/consent.esm.js +2 -2
  31. package/dist/{consentManager-CBwFozhv.esm.js → consentManager-DMlSL6Ax.esm.js} +2 -2
  32. package/dist/{consentManager-_q9yJUku.d.ts → consentManager-bjfVXO7p.d.ts} +9 -9
  33. package/dist/{consentStateMachine-CpmRAcr2.esm.js → consentStateMachine-DIYSMxKQ.esm.js} +1 -1
  34. package/dist/cross-document-data-match.esm.js +1 -1
  35. package/dist/{crossDocumentDataMatchManager-64O8t10a.esm.js → crossDocumentDataMatchManager-BFTdiEDB.esm.js} +2 -2
  36. package/dist/curp-validation.d.ts +1 -1
  37. package/dist/curp-validation.esm.js +2 -2
  38. package/dist/{curpValidationManager-CLgJQcx0.esm.js → curpValidationManager-DNpC3wyf.esm.js} +2 -2
  39. package/dist/{curpValidationManager-CXpFE-Mv.d.ts → curpValidationManager-z8428oCM.d.ts} +1 -1
  40. package/dist/{curpValidationStateMachine-Bx9YhVkJ.esm.js → curpValidationStateMachine-B3iVsDyt.esm.js} +2 -2
  41. package/dist/custom-fields.esm.js +1 -1
  42. package/dist/custom-watchlist.esm.js +2 -2
  43. package/dist/{customFieldsManager-DWt_0YtJ.esm.js → customFieldsManager-CvI-pDT3.esm.js} +2 -2
  44. package/dist/{customWatchlistManager-D8o-2Nej.esm.js → customWatchlistManager-BuHtUb0y.esm.js} +2 -2
  45. package/dist/{customWatchlistStateMachine-Sbi6DIcK.esm.js → customWatchlistStateMachine-CiVD9wyF.esm.js} +1 -1
  46. package/dist/{deepsightService-twg3bXqY.esm.js → deepsightLoader-B7DEYoyY.esm.js} +34 -29
  47. package/dist/{desktopCameraElection-kHY2IDJi.esm.js → desktopCameraElection-BGMtYwk3.esm.js} +5 -5
  48. package/dist/document-capture.d.ts +3 -3
  49. package/dist/document-capture.esm.js +2 -2
  50. package/dist/{documentCaptureManager-6tnnDkMX.d.ts → documentCaptureManager-CD5iQiUI.d.ts} +24 -3
  51. package/dist/{documentCaptureManager-CMSC_Mhd.esm.js → documentCaptureManager-DLPqruXJ.esm.js} +3 -2
  52. package/dist/{documentCaptureStateMachine-BCwD5Rto.esm.js → documentCaptureStateMachine-DCvWQhFG.esm.js} +67 -26
  53. package/dist/dynamic-forms.esm.js +2 -2
  54. package/dist/{dynamicFormsManager-DU6W1e20.esm.js → dynamicFormsManager-DfqCEPg9.esm.js} +2 -2
  55. package/dist/{dynamicFormsStateMachine-C8Z7k3vo.esm.js → dynamicFormsStateMachine-USQMB-uV.esm.js} +2 -2
  56. package/dist/ekyb.d.ts +4 -4
  57. package/dist/ekyb.esm.js +3 -3
  58. package/dist/{ekybManager-TB6ZG5lX.d.ts → ekybManager-BLOkwmWO.d.ts} +2 -2
  59. package/dist/{ekybManager-TGfqyjuu.esm.js → ekybManager-CR8YSYux.esm.js} +2 -2
  60. package/dist/{ekybStateMachine-DBgFuEPK.esm.js → ekybStateMachine-kHwdz6hm.esm.js} +5 -3
  61. package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
  62. package/dist/ekyc.d.ts +3 -2
  63. package/dist/ekyc.esm.js +3 -3
  64. package/dist/{ekycManager-BSQteIfC.d.ts → ekycManager-DlGIn9wA.d.ts} +2 -1
  65. package/dist/{ekycManager-C2cgG2Pl.esm.js → ekycManager-DymCvmVB.esm.js} +2 -2
  66. package/dist/{ekycStateMachine-CuNF7z4O.esm.js → ekycStateMachine-CoFCUJ2z.esm.js} +141 -68
  67. package/dist/{ekycUtils-BFncpC4F.esm.js → ekycUtils-GRuMELYr.esm.js} +80 -9
  68. package/dist/electronic-signature.esm.js +1 -1
  69. package/dist/{electronicSignatureManager-C7pqXsRm.esm.js → electronicSignatureManager-BCE3uA3z.esm.js} +3 -3
  70. package/dist/email.esm.js +2 -2
  71. package/dist/{emailManager-FH_CP0cT.esm.js → emailManager-CGoE3CUe.esm.js} +2 -2
  72. package/dist/{emailStateMachine-Cx-uTaBV.esm.js → emailStateMachine-KgHfDNvM.esm.js} +2 -2
  73. package/dist/{events-CQteqXfy.esm.js → events-ggpBBaZ8.esm.js} +1 -1
  74. package/dist/events.esm.js +1 -1
  75. package/dist/extensibility.d.ts +15 -14
  76. package/dist/extensibility.esm.js +36 -35
  77. package/dist/face-match.esm.js +2 -2
  78. package/dist/{faceCaptureManagerFactory-C-xKdj-d.d.ts → faceCaptureManagerFactory-DV2ULUYS.d.ts} +3 -3
  79. package/dist/{faceCaptureManagerFactory-CBm05KnT.esm.js → faceCaptureManagerFactory-Dp90bedH.esm.js} +4 -4
  80. package/dist/{faceCaptureSetup-BQjCbL51.esm.js → faceCaptureSetup-ZfiWg0fo.esm.js} +12 -403
  81. package/dist/{faceMatchManager-B2zp7yP4.esm.js → faceMatchManager-D2xKPjjQ.esm.js} +2 -2
  82. package/dist/{faceMatchStateMachine-ByTMQCUC.esm.js → faceMatchStateMachine-CUvwiQi9.esm.js} +2 -2
  83. package/dist/{feature-management-DjAG5lsJ.esm.js → feature-management-BbCIA4og.esm.js} +35 -21
  84. package/dist/feature-management.esm.js +1 -1
  85. package/dist/field-comparison.esm.js +1 -1
  86. package/dist/{fieldComparisonManager-CC0vKmpf.esm.js → fieldComparisonManager-DgDbEeFZ.esm.js} +2 -2
  87. package/dist/fiscal-qr.esm.js +1 -1
  88. package/dist/{fiscalQrManager-Be-r4oZj.esm.js → fiscalQrManager-BZeklojR.esm.js} +3 -3
  89. package/dist/flow-events.d.ts +1 -1
  90. package/dist/flow.d.ts +8 -8
  91. package/dist/flow.esm.js +10 -6
  92. package/dist/{flowCompletionService-ChMU2v79.esm.js → flowCompletionService-CcCnPs_T.esm.js} +2 -2
  93. package/dist/{flowServices-g2tVWsJl.esm.js → flowServices-Dmnc8Rye.esm.js} +69 -143
  94. package/dist/geolocation.esm.js +2 -2
  95. package/dist/{geolocationManager-DLbvZwUB.esm.js → geolocationManager-BJJ3m_I8.esm.js} +2 -2
  96. package/dist/{geolocationStateMachine-CAJVongM.esm.js → geolocationStateMachine-CTI3m4Ie.esm.js} +3 -3
  97. package/dist/government-validation.esm.js +2 -2
  98. package/dist/{governmentValidationManager-CkX9TEkh.esm.js → governmentValidationManager-CjChjZ3C.esm.js} +2 -2
  99. package/dist/{governmentValidationStateMachine-PTPCP26N.esm.js → governmentValidationStateMachine-AEbn3Afi.esm.js} +1 -1
  100. package/dist/home.d.ts +1 -1
  101. package/dist/home.esm.js +1 -1
  102. package/dist/http.esm.js +1 -1
  103. package/dist/id-ocr.d.ts +1 -1
  104. package/dist/id-ocr.esm.js +2 -2
  105. package/dist/id-selfie-flow.d.ts +1 -1
  106. package/dist/id-selfie-flow.esm.js +10 -9
  107. package/dist/id-verification.esm.js +2 -2
  108. package/dist/id.d.ts +3 -3
  109. package/dist/id.esm.js +4 -4
  110. package/dist/{idCaptureDefaults-MSQoqScU.esm.js → idCaptureDefaults-Dszuq9ng.esm.js} +3 -3
  111. package/dist/{idCaptureManager-zZdTcpG1.esm.js → idCaptureManager-B3oR4RnA.esm.js} +9 -8
  112. package/dist/{idCaptureManager-DzTfQ1Am.d.ts → idCaptureManager-CCA2D1Ah.d.ts} +5 -3
  113. package/dist/{idCaptureServices-8OHinO0N.esm.js → idCaptureServices-DK0QboqT.esm.js} +27 -196
  114. package/dist/{idCaptureStateMachine-B3G6XoDG.esm.js → idCaptureStateMachine-zzar9MPy.esm.js} +20 -20
  115. package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-BTdHlJ9D.d.ts} +1 -1
  116. package/dist/{idOcrManager-B64-fjWg.esm.js → idOcrManager-xyEZNOBa.esm.js} +2 -2
  117. package/dist/{idOcrStateMachine-B1aZnobs.esm.js → idOcrStateMachine-DNKXh4Rn.esm.js} +1 -1
  118. package/dist/{idVerificationManager-_Kebv-Ue.esm.js → idVerificationManager-DdnvYfgN.esm.js} +2 -2
  119. package/dist/{idVerificationStateMachine-DQn6c84z.esm.js → idVerificationStateMachine-DtIBCa32.esm.js} +1 -1
  120. package/dist/identity-reuse.esm.js +2 -2
  121. package/dist/{identityReuseManager-DDXkNVZi.esm.js → identityReuseManager-CcpovlfD.esm.js} +2 -2
  122. package/dist/{identityReuseStateMachine-Bcnkbjf8.esm.js → identityReuseStateMachine-DxZFWy47.esm.js} +1 -1
  123. package/dist/{index-DMDAk85K.d.ts → index-DC0P2Vzw.d.ts} +1 -1
  124. package/dist/index.esm.js +1 -1
  125. package/dist/{invokeOnCaptureCallback-CXIBwBeE.esm.js → invokeOnCaptureCallback-BJ0GVHGr.esm.js} +1 -1
  126. package/dist/kyb-checks.d.ts +3 -0
  127. package/dist/kyb-checks.esm.js +3 -0
  128. package/dist/kybChecksManager-CblEL97E.d.ts +95 -0
  129. package/dist/kybChecksManager-DpGOp4Su.esm.js +89 -0
  130. package/dist/kybChecksStateMachine-B43NAnv7.esm.js +718 -0
  131. package/dist/mandatory-consent.d.ts +2 -2
  132. package/dist/mandatory-consent.esm.js +2 -2
  133. package/dist/{mandatoryConsentManager-43W5d_8G.esm.js → mandatoryConsentManager-B4vCYslr.esm.js} +2 -2
  134. package/dist/{mandatoryConsentManager-xx3mY-xw.d.ts → mandatoryConsentManager-B88Sm5nd.d.ts} +6 -6
  135. package/dist/{mandatoryConsentStateMachine-CVlgdlnt.esm.js → mandatoryConsentStateMachine-DWslYPA3.esm.js} +1 -1
  136. package/dist/mediaRecorderOptions-B9-IEVtV.esm.js +70 -0
  137. package/dist/multipartRecordingService-BTqkHGG9.esm.js +407 -0
  138. package/dist/{permissionGuards-B3OPL8Si.esm.js → permissionGuards-DFV-Ws0a.esm.js} +1 -1
  139. package/dist/{permissionServices-DnBAN_hW.esm.js → permissionServices-D190ATGD.esm.js} +8 -6
  140. package/dist/phone.esm.js +2 -2
  141. package/dist/phoneFormat-JJNaWthV.esm.js +75 -0
  142. package/dist/{phoneManager-C6jut_pz.esm.js → phoneManager-Dy5tODCU.esm.js} +3 -3
  143. package/dist/phoneServices-DJgyOzU2.esm.js +77 -0
  144. package/dist/{phoneStateMachine-T1-drWfG.esm.js → phoneStateMachine-DnlPhnw7.esm.js} +20 -60
  145. package/dist/{processFaceMatch-BWme3kVV.esm.js → processFaceMatch-Bst83HaS.esm.js} +1 -1
  146. package/dist/qe-signature.esm.js +1 -1
  147. package/dist/recordingService-CTko6Cjn.esm.js +397 -0
  148. package/dist/redirect-to-mobile.esm.js +2 -2
  149. package/dist/{redirectToMobileManager-BJXC6Kx9.esm.js → redirectToMobileManager-CgGaT2NP.esm.js} +3 -3
  150. package/dist/{redirectToMobileStateMachine-BBMAc2Gb.esm.js → redirectToMobileStateMachine-CbhN8uVN.esm.js} +39 -21
  151. package/dist/resolveForm-O7-r79VA.esm.js +351 -0
  152. package/dist/{runChildModule-DPHTqSdF.esm.js → runChildModule-BffFArwl.esm.js} +2 -2
  153. package/dist/{sdkVersion-C3_P-Qbq.esm.js → sdkVersion-CDd_gaR7.esm.js} +1 -1
  154. package/dist/selfie.d.ts +3 -3
  155. package/dist/selfie.esm.js +10 -10
  156. package/dist/{selfieErrorUtils-BL0BLMnp.esm.js → selfieErrorUtils-f4MgAG2A.esm.js} +1 -1
  157. package/dist/{selfieManager-BMmpUii2.d.ts → selfieManager-DmZFzs1-.d.ts} +1 -1
  158. package/dist/{selfieManager-Cbliomv7.esm.js → selfieManager-hopelYEk.esm.js} +5 -5
  159. package/dist/{selfieStateMachine-B5m_Kn0O.esm.js → selfieStateMachine-DaZIVv3Q.esm.js} +3 -3
  160. package/dist/{session-DAaAewMX.esm.js → session-CdSX4wsZ.esm.js} +4 -4
  161. package/dist/session.d.ts +1 -1
  162. package/dist/session.esm.js +6 -6
  163. package/dist/{sessionInitializer-CWFT4dfw.esm.js → sessionInitializer-DsL7X2j9.esm.js} +83 -24
  164. package/dist/{setup-CDAKwTr7.esm.js → setup-DDahygZs.esm.js} +28 -27
  165. package/dist/signature.esm.js +2 -2
  166. package/dist/{signatureManager-BeEVCcsC.esm.js → signatureManager-CwqjcxPg.esm.js} +2 -2
  167. package/dist/{signatureStateMachine-_1c1vSid.esm.js → signatureStateMachine-DBVDd1Eu.esm.js} +1 -1
  168. package/dist/{stats-BpMz-hTP.esm.js → stats-CatA2dea.esm.js} +1 -1
  169. package/dist/stats.esm.js +1 -1
  170. package/dist/textRules-D4NRinKY.d.ts +41 -0
  171. package/dist/{tri-BajQnjbf.esm.js → tri-DG6priFa.esm.js} +1 -1
  172. package/dist/tri.esm.js +1 -1
  173. package/dist/{trueSightService-BujtUIW6.esm.js → trueSightService-GuLthUVK.esm.js} +4 -4
  174. package/dist/trust-graph.esm.js +1 -1
  175. package/dist/{types--3HDl2SF.d.ts → types-BEVHQbbC.d.ts} +1 -1
  176. package/dist/{types-xEEWCx1j.d.ts → types-BPm1JSu7.d.ts} +1 -1
  177. package/dist/{types-C397LhmN.d.ts → types-BgRHw-dR.d.ts} +1 -1
  178. package/dist/{types-DuD8TRJU.d.ts → types-CRaFu6wS.d.ts} +4 -2
  179. package/dist/types-CTaL0XJz.d.ts +80 -0
  180. package/dist/{types-PTZHRhGX.d.ts → types-Cd0J0F9D.d.ts} +1 -1
  181. package/dist/{types-e8fCsvvk.d.ts → types-Csh8vzPo.d.ts} +1 -1
  182. package/dist/{types-B2FK_wYb.d.ts → types-CuMJ2M7D.d.ts} +2 -41
  183. package/dist/{types-ZTZelfbM.d.ts → types-CyNndVAT.d.ts} +14 -6
  184. package/dist/types-J6g6iKe_.d.ts +6 -0
  185. package/dist/video-selfie.d.ts +1 -1
  186. package/dist/video-selfie.esm.js +9 -7
  187. package/dist/{videoSelfieCameraWarmer-DjkPpoj_.esm.js → videoSelfieCameraWarmer-e3irGfcO.esm.js} +8 -8
  188. package/dist/{videoSelfieStepDetector-RfSmlFFW.d.ts → videoSelfieStepDetector-Dv3Mgws-.d.ts} +2 -2
  189. package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
  190. package/dist/{warmup-BkfxQZsC.esm.js → warmup-DtB0DJpl.esm.js} +24 -17
  191. package/dist/wasm.esm.js +3 -3
  192. package/dist/{wasmDsFlagSync-BhU5H2oR.esm.js → wasmDsFlagSync-BtiR5pig.esm.js} +1 -1
  193. package/dist/{wasmWebClient-DTj9auyA.esm.js → wasmWebClient-BDrax6Eu.esm.js} +12 -9
  194. package/dist/watchlist-for-business.esm.js +2 -2
  195. package/dist/watchlist.esm.js +2 -2
  196. package/dist/{watchlistForBusinessManager-CVay6-9A.esm.js → watchlistForBusinessManager-DqUpAEj_.esm.js} +2 -2
  197. package/dist/{watchlistForBusinessStateMachine-DA6K5na4.esm.js → watchlistForBusinessStateMachine-DdaPl2PS.esm.js} +1 -1
  198. package/dist/{watchlistManager-B8gQ_rw3.esm.js → watchlistManager-CdpXzT4B.esm.js} +2 -2
  199. package/dist/{watchlistStateMachine-CSi_ZhtT.esm.js → watchlistStateMachine-ofHW_lPk.esm.js} +1 -1
  200. package/dist/workflow.d.ts +1 -1
  201. package/dist/workflow.esm.js +42 -42
  202. package/package.json +11 -5
  203. package/dist/deepsightLoader-DMxtowCm.esm.js +0 -33
  204. package/dist/types-D9r3zRfY.d.ts +0 -6
@@ -1,8 +1,8 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CQteqXfy.esm.js";
2
- import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
3
2
  import { n as loadPhoneValidation, t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
3
+ import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
4
  import { n as isOtpComplete } from "./otp-D2k3PeSL.esm.js";
5
- import { t as phoneMachine } from "./phoneStateMachine-T1-drWfG.esm.js";
5
+ import { t as phoneMachine } from "./phoneStateMachine-DnlPhnw7.esm.js";
6
6
  //#region src/modules/phone/phoneActor.ts
7
7
  function createPhoneActor(options) {
8
8
  return createActor(phoneMachine, { input: { config: options.config } }).start();
@@ -0,0 +1,77 @@
1
+ import { r as getToken, t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
2
+ //#region src/modules/phone/phoneServices.ts
3
+ function getPhoneServerFailureReason(error, invalidStatus) {
4
+ if (error.status === invalidStatus) return "invalidPhone";
5
+ return "serverError";
6
+ }
7
+ async function fetchPhone(signal) {
8
+ const res = await api.get(endpoints.getPhone, { signal });
9
+ if (!res.ok) throw new Error(`GET ${endpoints.getPhone} failed: ${res.status} ${res.statusText}`);
10
+ return res.data;
11
+ }
12
+ async function requestStartInfo(signal) {
13
+ const res = await api.get(endpoints.startInfo, { signal });
14
+ if (!res.ok) throw new Error(`GET ${endpoints.startInfo} failed: ${res.status} ${res.statusText}`);
15
+ return res.data;
16
+ }
17
+ let prefetchedStartInfo;
18
+ /**
19
+ * Starts the start-info request before the phone step runs (the flow calls
20
+ * it when the step is first), so the step's first screen does not wait for
21
+ * that round trip. The step's own `fetchStartInfo` uses the answer once.
22
+ */
23
+ function prefetchStartInfo() {
24
+ const token = getToken();
25
+ if (!token || prefetchedStartInfo?.token === token) return;
26
+ const promise = requestStartInfo();
27
+ promise.catch(() => void 0);
28
+ prefetchedStartInfo = {
29
+ token,
30
+ promise
31
+ };
32
+ }
33
+ async function fetchStartInfo(signal) {
34
+ const prefetched = prefetchedStartInfo;
35
+ prefetchedStartInfo = void 0;
36
+ if (prefetched?.token === getToken()) {
37
+ const info = await prefetched.promise.catch(() => void 0);
38
+ if (info) return info;
39
+ }
40
+ return requestStartInfo(signal);
41
+ }
42
+ async function addPhone(params, signal) {
43
+ try {
44
+ return (await api.post(endpoints.phone, {
45
+ phone: params.phone,
46
+ optInGranted: params.optInGranted
47
+ }, { signal })).data;
48
+ } catch (error) {
49
+ throw new Error(getPhoneServerFailureReason(error, 400));
50
+ }
51
+ }
52
+ async function addPhoneInstantVerify(params, signal) {
53
+ try {
54
+ return (await api.post(endpoints.phoneInstant, {
55
+ phone: params.phone,
56
+ optInGranted: params.optInGranted
57
+ }, { signal })).data;
58
+ } catch (error) {
59
+ throw new Error(getPhoneServerFailureReason(error, 400));
60
+ }
61
+ }
62
+ async function sendOtp(signal) {
63
+ try {
64
+ await api.get(`${endpoints.sendSmsOtp}?communicationchannel=SMS`, { signal });
65
+ } catch (error) {
66
+ throw new Error(getPhoneServerFailureReason(error));
67
+ }
68
+ }
69
+ async function verifyOtp(code, signal) {
70
+ try {
71
+ return (await api.get(`${endpoints.compareOtp}?code=${code}&channel=SMS`, { signal })).data;
72
+ } catch (error) {
73
+ throw new Error(getPhoneServerFailureReason(error));
74
+ }
75
+ }
76
+ //#endregion
77
+ export { prefetchStartInfo as a, fetchStartInfo as i, addPhoneInstantVerify as n, sendOtp as o, fetchPhone as r, verifyOtp as s, addPhone as t };
@@ -1,60 +1,10 @@
1
- import { t as api, u as endpoints } from "./api-BO8JA7Pf.esm.js";
2
1
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
2
+ import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
3
+ import { i as fetchStartInfo, n as addPhoneInstantVerify, o as sendOtp, r as fetchPhone, s as verifyOtp, t as addPhone } from "./phoneServices-DJgyOzU2.esm.js";
3
4
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
4
5
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
- import { t as carryAttempts } from "./attemptCarry-BjTJ6bMQ.esm.js";
6
- import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
6
+ import { t as carryAttempts } from "./attemptCarry-WOkfvFMw.esm.js";
7
7
  import { n as isOtpComplete, t as computeOtpValidationErrors } from "./otp-D2k3PeSL.esm.js";
8
- //#region src/modules/phone/phoneServices.ts
9
- function getPhoneServerFailureReason(error, invalidStatus) {
10
- if (error.status === invalidStatus) return "invalidPhone";
11
- return "serverError";
12
- }
13
- async function fetchPhone(signal) {
14
- const res = await api.get(endpoints.getPhone, { signal });
15
- if (!res.ok) throw new Error(`GET ${endpoints.getPhone} failed: ${res.status} ${res.statusText}`);
16
- return res.data;
17
- }
18
- async function fetchStartInfo(signal) {
19
- const res = await api.get(endpoints.startInfo, { signal });
20
- if (!res.ok) throw new Error(`GET ${endpoints.startInfo} failed: ${res.status} ${res.statusText}`);
21
- return res.data;
22
- }
23
- async function addPhone(params, signal) {
24
- try {
25
- return (await api.post(endpoints.phone, {
26
- phone: params.phone,
27
- optInGranted: params.optInGranted
28
- }, { signal })).data;
29
- } catch (error) {
30
- throw new Error(getPhoneServerFailureReason(error, 400));
31
- }
32
- }
33
- async function addPhoneInstantVerify(params, signal) {
34
- try {
35
- return (await api.post(endpoints.phoneInstant, {
36
- phone: params.phone,
37
- optInGranted: params.optInGranted
38
- }, { signal })).data;
39
- } catch (error) {
40
- throw new Error(getPhoneServerFailureReason(error, 400));
41
- }
42
- }
43
- async function sendOtp(signal) {
44
- try {
45
- await api.get(`${endpoints.sendSmsOtp}?communicationchannel=SMS`, { signal });
46
- } catch (error) {
47
- throw new Error(getPhoneServerFailureReason(error));
48
- }
49
- }
50
- async function verifyOtp(code, signal) {
51
- try {
52
- return (await api.get(`${endpoints.compareOtp}?code=${code}&channel=SMS`, { signal })).data;
53
- } catch (error) {
54
- throw new Error(getPhoneServerFailureReason(error));
55
- }
56
- }
57
- //#endregion
58
8
  //#region src/modules/phone/phoneStateMachine.ts
59
9
  const RESEND_TIMER_SECONDS = 30;
60
10
  function getErrorMessage(error) {
@@ -149,6 +99,7 @@ const phoneMachine = setup({
149
99
  setOptInGranted: assign(({ event }) => ({ optInGranted: event.granted })),
150
100
  setError: assign(({ event }) => ({ error: getErrorMessage(event.error) })),
151
101
  clearError: assign({ error: () => void 0 }),
102
+ settleLoad: assign({ pendingLoads: ({ context }) => context.pendingLoads - 1 }),
152
103
  clearPhoneError: assign({ phoneError: () => void 0 }),
153
104
  setOtpCode: assign(({ event }) => ({
154
105
  otpCode: event.code,
@@ -191,6 +142,7 @@ const phoneMachine = setup({
191
142
  prefilledPhone: void 0,
192
143
  optInGranted: false,
193
144
  startInfo: void 0,
145
+ pendingLoads: 0,
194
146
  error: void 0,
195
147
  otpCode: "",
196
148
  otpError: void 0,
@@ -202,6 +154,7 @@ const phoneMachine = setup({
202
154
  },
203
155
  guards: {
204
156
  hasPrefill: ({ context }) => context.config.prefill,
157
+ areLoadsSettled: ({ context }) => context.pendingLoads === 0,
205
158
  hasOtpVerification: ({ context }) => context.config.otpVerification,
206
159
  hasNoValidationErrors: ({ context }) => !context.validationErrors || Object.keys(context.validationErrors).length === 0,
207
160
  hasAttemptsRemaining: ({ context }) => context.attemptsRemaining > 1,
@@ -224,6 +177,7 @@ const phoneMachine = setup({
224
177
  prefilledPhone: void 0,
225
178
  optInGranted: false,
226
179
  startInfo: void 0,
180
+ pendingLoads: 0,
227
181
  error: void 0,
228
182
  otpCode: "",
229
183
  otpError: void 0,
@@ -247,15 +201,21 @@ const phoneMachine = setup({
247
201
  { target: "loadingStartInfo" }
248
202
  ] } },
249
203
  loadingPrefill: {
250
- entry: "startLoadingPhoneRules",
251
- invoke: {
204
+ entry: ["startLoadingPhoneRules", assign({ pendingLoads: () => 2 })],
205
+ invoke: [{
252
206
  id: "fetchPhone",
253
207
  src: "fetchPhone",
254
- onDone: {
255
- target: "loadingStartInfo",
256
- actions: "setPrefilledPhone"
257
- },
258
- onError: { target: "loadingStartInfo" }
208
+ onDone: { actions: ["setPrefilledPhone", "settleLoad"] },
209
+ onError: { actions: "settleLoad" }
210
+ }, {
211
+ id: "fetchStartInfo",
212
+ src: "fetchStartInfo",
213
+ onDone: { actions: ["setStartInfo", "settleLoad"] },
214
+ onError: { actions: "settleLoad" }
215
+ }],
216
+ always: {
217
+ target: "loadingPhoneRules",
218
+ guard: "areLoadsSettled"
259
219
  }
260
220
  },
261
221
  loadingStartInfo: {
@@ -1,4 +1,4 @@
1
- import { r as getToken } from "./api-BO8JA7Pf.esm.js";
1
+ import { r as getToken } from "./api-CpP4PS4S.esm.js";
2
2
  //#region src/internal/session/processFaceMatch.ts
3
3
  let saved = null;
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-C7pqXsRm.esm.js";
1
+ import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-BCE3uA3z.esm.js";
2
2
  //#region src/modules/qe-signature/index.ts
3
3
  function createQeSignatureManager(options) {
4
4
  return createElectronicSignatureManager({ config: {
@@ -0,0 +1,397 @@
1
+ import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
2
+ import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
3
+ import { r as createRecordingCompositor } from "./CameraCompositor-DN7NkJzV.esm.js";
4
+ import { t as getAdaptiveMediaRecorderOptions } from "./mediaRecorderOptions-B9-IEVtV.esm.js";
5
+ import { t as WorkerEncoderRecordingProvider } from "./WorkerEncoderRecordingProvider-B1ODYtgN.esm.js";
6
+ import { t as MultipartRecordingService } from "./multipartRecordingService-BTqkHGG9.esm.js";
7
+ //#region ../infra/src/media/VideoTrimmer.ts
8
+ /** A trim that runs longer than this uploads the full recording instead. */
9
+ const TRIM_TIMEOUT_MS = 1e4;
10
+ const trimmer = BrowserLazyImportProvider.getInstance().create(() => import("./videoTrimByCopy-BFfAiNpv.esm.js").then((module) => module.trimLastNSecondsByCopy), {
11
+ label: "Video liveness",
12
+ moduleName: "mediabunny",
13
+ timeoutMs: 1e4,
14
+ disabledMessage: "the full recording will be uploaded untrimmed."
15
+ });
16
+ /** Starts loading the trimmer, e.g. when a recording that will be trimmed starts. */
17
+ function preloadVideoTrimmer() {
18
+ trimmer.load();
19
+ }
20
+ /**
21
+ * Keeps about the last `seconds` of a recording. Never rejects and never
22
+ * hangs: when the trimmer cannot load, fails, or takes longer than
23
+ * {@link TRIM_TIMEOUT_MS}, it resolves the untrimmed recording.
24
+ */
25
+ async function trimLastNSeconds(videoBlob, seconds) {
26
+ const trim = await trimmer.load();
27
+ if (!trim) return videoBlob;
28
+ let timeout;
29
+ try {
30
+ return await Promise.race([trim(videoBlob, seconds), new Promise((resolve) => {
31
+ timeout = setTimeout(() => {
32
+ console.warn("[Video liveness] Trimming timed out; the full recording will be uploaded untrimmed.");
33
+ resolve(videoBlob);
34
+ }, TRIM_TIMEOUT_MS);
35
+ })]);
36
+ } catch (error) {
37
+ console.warn("[Video liveness] Trimming failed; the full recording will be uploaded untrimmed.", error);
38
+ return videoBlob;
39
+ } finally {
40
+ clearTimeout(timeout);
41
+ }
42
+ }
43
+ //#endregion
44
+ //#region ../infra/src/providers/browser/LocalRecordingProvider.ts
45
+ function toBase64(videoBlob) {
46
+ return new Promise((resolve, reject) => {
47
+ const reader = new FileReader();
48
+ reader.onloadend = () => {
49
+ const base64 = reader.result.split(",")[1];
50
+ resolve(base64);
51
+ };
52
+ reader.onerror = () => reject(reader.error ?? /* @__PURE__ */ new Error("FileReader error"));
53
+ reader.readAsDataURL(videoBlob);
54
+ });
55
+ }
56
+ /** `MediaRecorderOptions.videoKeyFrameIntervalDuration`, see `startRecording`. */
57
+ const KEYFRAME_INTERVAL_MS = 1e3;
58
+ var LocalRecordingProvider = class {
59
+ constructor() {
60
+ this.mediaRecorder = null;
61
+ this._isRecording = false;
62
+ this._hasError = false;
63
+ this._error = null;
64
+ this.mimeType = "";
65
+ this.stream = null;
66
+ this.pauseRecordingBound = this.pauseRecording.bind(this);
67
+ }
68
+ get isRecording() {
69
+ return this._isRecording;
70
+ }
71
+ get hasError() {
72
+ return this._hasError;
73
+ }
74
+ get error() {
75
+ return this._error;
76
+ }
77
+ startRecording(stream) {
78
+ this.reset();
79
+ preloadVideoTrimmer();
80
+ this.registerEventListeners();
81
+ this.stream = stream;
82
+ try {
83
+ const options = getAdaptiveMediaRecorderOptions();
84
+ this.mimeType = options.mimeType;
85
+ const recorder = new MediaRecorder(stream.clone(), {
86
+ ...options,
87
+ videoKeyFrameIntervalDuration: KEYFRAME_INTERVAL_MS
88
+ });
89
+ recorder.onerror = (event) => {
90
+ this._error = `Recording error: ${event}`;
91
+ this._isRecording = false;
92
+ this._hasError = true;
93
+ };
94
+ recorder.start();
95
+ this.mediaRecorder = recorder;
96
+ this._isRecording = true;
97
+ this._error = null;
98
+ this._hasError = false;
99
+ } catch (err) {
100
+ this._error = `Failed to start recording: ${err}`;
101
+ this._hasError = true;
102
+ }
103
+ }
104
+ async stopRecording(trimSeconds, encrypt, generateChecksum) {
105
+ const recorder = this.mediaRecorder;
106
+ return new Promise((resolve, reject) => {
107
+ this.removeEventListeners();
108
+ if (recorder && this._isRecording) {
109
+ const chunks = [];
110
+ recorder.ondataavailable = (event) => {
111
+ if (event.data.size > 0) chunks.push(event.data);
112
+ };
113
+ recorder.onstop = async () => {
114
+ try {
115
+ const trimmedVideo = await trimLastNSeconds(new Blob(chunks, { type: this.mimeType }), trimSeconds);
116
+ const encryptedVideoBase64 = encrypt(await toBase64(trimmedVideo));
117
+ generateChecksum(await trimmedVideo.arrayBuffer());
118
+ this._isRecording = false;
119
+ resolve({
120
+ trimmedBlob: trimmedVideo,
121
+ encryptedVideo: encryptedVideoBase64
122
+ });
123
+ } catch (error) {
124
+ this._isRecording = false;
125
+ this._error = `Recording stop failed: ${error}`;
126
+ this._hasError = true;
127
+ reject(error);
128
+ }
129
+ };
130
+ recorder.stop();
131
+ this._isRecording = false;
132
+ } else resolve({
133
+ trimmedBlob: new Blob([], { type: this.mimeType }),
134
+ encryptedVideo: ""
135
+ });
136
+ recorder?.stream?.getTracks().forEach((track) => track.stop());
137
+ });
138
+ }
139
+ /**
140
+ * Discards the in-progress recording without producing a result: detaches
141
+ * the recorder's handlers, stops it, releases its cloned tracks and clears
142
+ * the flags. Idempotent, and safe after `stopRecording` or when never
143
+ * started. Mirrors `MultipartRecordingProvider.reset()` so an attempt that is
144
+ * released before finalization cannot leave a live camera clone behind
145
+ * (ENG-56648).
146
+ */
147
+ reset() {
148
+ this.removeEventListeners();
149
+ const recorder = this.mediaRecorder;
150
+ if (recorder) {
151
+ recorder.ondataavailable = null;
152
+ recorder.onerror = null;
153
+ recorder.onstop = null;
154
+ if (recorder.state !== "inactive") try {
155
+ recorder.stop();
156
+ } catch {}
157
+ recorder.stream?.getTracks().forEach((track) => track.stop());
158
+ this.mediaRecorder = null;
159
+ }
160
+ this.stream = null;
161
+ this._isRecording = false;
162
+ this._error = null;
163
+ this._hasError = false;
164
+ }
165
+ pauseRecording() {
166
+ if (!this._isRecording) return;
167
+ if (this.mediaRecorder?.state === "recording") try {
168
+ this.mediaRecorder.pause();
169
+ } catch {}
170
+ }
171
+ registerEventListeners() {
172
+ document.addEventListener("visibilitychange", this.pauseRecordingBound);
173
+ }
174
+ removeEventListeners() {
175
+ document.removeEventListener("visibilitychange", this.pauseRecordingBound);
176
+ }
177
+ };
178
+ //#endregion
179
+ //#region src/internal/recordings/recordingsRepository.ts
180
+ async function uploadDeepsightVideo(encryptedVideo, token) {
181
+ try {
182
+ return (await api.post(endpoints.deepsightVideoImport, {
183
+ video: encryptedVideo,
184
+ type: "selfie"
185
+ }, { headers: { "X-Incode-Hardware-Id": token } })).data.recordingId ?? "";
186
+ } catch {
187
+ return "";
188
+ }
189
+ }
190
+ //#endregion
191
+ //#region src/internal/faceCapture/recordingService.ts
192
+ /**
193
+ * Records on-device and uploads encrypted video for liveness.
194
+ */
195
+ var LocalRecordingService = class {
196
+ constructor(wasmUtil, sessionToken) {
197
+ this.recorder = new LocalRecordingProvider();
198
+ this.sessionToken = sessionToken;
199
+ this.wasmUtil = wasmUtil;
200
+ }
201
+ async start(stream) {
202
+ this.recorder.startRecording(stream);
203
+ this.wasmUtil.osv();
204
+ }
205
+ async stop() {
206
+ if (!this.recorder.isRecording) return { recordingId: null };
207
+ this.wasmUtil.oev();
208
+ const result = await this.recorder.stopRecording(10, (base64) => this.wasmUtil.encryptImage(base64), (buffer) => this.wasmUtil.ckvcks(buffer));
209
+ if (!this.sessionToken) return { recordingId: null };
210
+ return { recordingId: await uploadDeepsightVideo(result.encryptedVideo, this.sessionToken) };
211
+ }
212
+ prepareUpload() {
213
+ return this.stop();
214
+ }
215
+ async stopAndGetVideo() {
216
+ if (!this.recorder.isRecording) return { videoBase64: void 0 };
217
+ try {
218
+ this.wasmUtil.oev();
219
+ const videoBase64 = (await this.recorder.stopRecording(10, (base64) => base64, () => {})).encryptedVideo;
220
+ return { videoBase64: videoBase64 ? videoBase64 : void 0 };
221
+ } catch {
222
+ return { videoBase64: void 0 };
223
+ }
224
+ }
225
+ cleanup() {
226
+ this.recorder.reset();
227
+ }
228
+ };
229
+ /**
230
+ * Records a regular Selfie capture locally and streams it through the scoped
231
+ * video-selfie-service multipart protocol. The recording is associated with
232
+ * the interview asynchronously by the backend's `selfie` scope consumer, so
233
+ * its upload id must not be forwarded to `/omni/add/face` as a legacy
234
+ * `recordingId`.
235
+ *
236
+ * The recording is scoped to the capture step (ENG-56648). The recorder
237
+ * records a stable `CameraCompositor` stream instead of a raw camera clone, so
238
+ * every attempt can end its own clone before PRC and POC run and the next
239
+ * attempt swaps a fresh clone into the same multipart upload. The owning
240
+ * controller completes the upload once the backend accepts a capture or the
241
+ * step ends without a retry.
242
+ */
243
+ var MultipartFaceRecordingService = class {
244
+ constructor() {
245
+ this.recordingCompositor = createRecordingCompositor();
246
+ this.service = new MultipartRecordingService("selfie", new WorkerEncoderRecordingProvider(this.recordingCompositor));
247
+ this.audioSource = [];
248
+ this.needsVideoSourceReplacement = false;
249
+ this.pausedForAttempt = false;
250
+ this.startInFlight = false;
251
+ this.suspendRequested = false;
252
+ this.stopping = false;
253
+ }
254
+ async start(stream) {
255
+ if (this.stopping) throw new Error("Face recording already completed");
256
+ if (this.compositor) {
257
+ await this.resume(stream);
258
+ return;
259
+ }
260
+ const recordingSource = stream.clone();
261
+ const compositor = this.recordingCompositor;
262
+ this.startInFlight = true;
263
+ try {
264
+ const composite = compositor.start(recordingSource);
265
+ await this.service.start(composite);
266
+ } catch (error) {
267
+ compositor.stop();
268
+ recordingSource.getTracks().forEach((track) => track.stop());
269
+ this.service.cleanup();
270
+ throw error;
271
+ } finally {
272
+ this.startInFlight = false;
273
+ }
274
+ if (this.stopping) {
275
+ compositor.stop();
276
+ recordingSource.getTracks().forEach((track) => track.stop());
277
+ this.service.cleanup();
278
+ return;
279
+ }
280
+ this.compositor = compositor;
281
+ this.recordingSource = recordingSource;
282
+ this.audioSource = recordingSource.getAudioTracks();
283
+ if (this.suspendRequested) {
284
+ this.suspendRequested = false;
285
+ this.suspend();
286
+ }
287
+ }
288
+ /**
289
+ * Pauses the container and ends the camera clone on the calling thread. The
290
+ * composite stream and the upload stay open for the next attempt.
291
+ */
292
+ suspend() {
293
+ if (this.stopping) return;
294
+ if (!this.compositor) {
295
+ this.suspendRequested = this.startInFlight;
296
+ return;
297
+ }
298
+ if (!this.pausedForAttempt) this.pausedForAttempt = this.service.pause();
299
+ this.releaseCameraClone({ keepAudio: true });
300
+ this.needsVideoSourceReplacement = true;
301
+ }
302
+ async prepareUpload() {
303
+ this.suspend();
304
+ return { recordingId: null };
305
+ }
306
+ async stop() {
307
+ await this.complete();
308
+ return { recordingId: null };
309
+ }
310
+ pauseForBackground() {
311
+ this.suspend();
312
+ }
313
+ async resumeFromBackground(stream) {
314
+ if (!this.compositor || this.stopping) return;
315
+ await this.resume(stream);
316
+ }
317
+ async stopAndGetVideo() {
318
+ await this.complete();
319
+ return { videoBase64: void 0 };
320
+ }
321
+ cleanup() {
322
+ this.suspendRequested = false;
323
+ this.pausedForAttempt = false;
324
+ this.needsVideoSourceReplacement = false;
325
+ this.releaseCameraClone({ keepAudio: false });
326
+ this.compositor?.stop();
327
+ this.compositor = void 0;
328
+ this.recordingSource = void 0;
329
+ this.audioSource = [];
330
+ this.service.cleanup();
331
+ }
332
+ /** Swaps this attempt's camera clone into the composite and resumes. */
333
+ async resume(stream) {
334
+ const compositor = this.compositor;
335
+ if (!compositor) return;
336
+ if (this.needsVideoSourceReplacement) {
337
+ const recordingSource = stream.clone();
338
+ recordingSource.getAudioTracks().forEach((track) => track.stop());
339
+ compositor.switchVideo(recordingSource);
340
+ this.needsVideoSourceReplacement = false;
341
+ this.recordingSource = recordingSource;
342
+ const result = await compositor.resume();
343
+ if (result !== "resumed") throw new Error(`Face recording camera did not resume: ${result}`);
344
+ }
345
+ if (this.pausedForAttempt && !this.service.resume()) throw new Error("Face recording did not resume");
346
+ this.pausedForAttempt = false;
347
+ }
348
+ /**
349
+ * Completes the scoped upload. The camera clone ends synchronously before the
350
+ * drain so a step that ends mid-attempt never pins the camera; the composite
351
+ * stays alive until the recorder has emitted its final chunk.
352
+ */
353
+ async complete() {
354
+ this.stopping = true;
355
+ this.suspendRequested = false;
356
+ this.releaseCameraClone({ keepAudio: false });
357
+ try {
358
+ await this.service.stop();
359
+ } finally {
360
+ this.compositor?.stop();
361
+ this.compositor = void 0;
362
+ this.recordingSource = void 0;
363
+ this.audioSource = [];
364
+ this.pausedForAttempt = false;
365
+ this.needsVideoSourceReplacement = false;
366
+ }
367
+ }
368
+ releaseCameraClone(options) {
369
+ try {
370
+ this.compositor?.pause();
371
+ } catch {}
372
+ const tracks = options.keepAudio ? this.recordingSource?.getVideoTracks() ?? [] : /* @__PURE__ */ new Set([...this.recordingSource?.getTracks() ?? [], ...this.audioSource]);
373
+ for (const track of tracks) try {
374
+ track.stop();
375
+ } catch {}
376
+ }
377
+ };
378
+ /**
379
+ * Creates the recording service for the current configuration.
380
+ *
381
+ * Order of precedence:
382
+ * 1. `onDeviceFaceResultsSubmissionEnabled === true` → no recording. The
383
+ * on-device workflow never uploads media, only the staged face-results
384
+ * JSON via `WebApi.postFaceResults`. Mirrors V1's
385
+ * `FaceFlowManager.setRecorders()` early return.
386
+ * 2. `deepsightLiveness === 'VIDEOLIVENESS'` → local Deepsight recorder.
387
+ * 3. `enableFaceRecording === true` → scoped multipart recorder.
388
+ * 4. otherwise → no recording.
389
+ */
390
+ function createRecordingService(params) {
391
+ if (params.config.onDeviceFaceResultsSubmissionEnabled === true) return;
392
+ if (params.localDelivery === true) return params.config.enableFaceRecording === true || params.config.deepsightLiveness === "VIDEOLIVENESS" ? new LocalRecordingService(params.wasmUtil, null) : void 0;
393
+ if (params.config.deepsightLiveness === "VIDEOLIVENESS") return new LocalRecordingService(params.wasmUtil, params.sessionToken);
394
+ if (params.config.enableFaceRecording === true) return new MultipartFaceRecordingService();
395
+ }
396
+ //#endregion
397
+ export { createRecordingService };
@@ -1,3 +1,3 @@
1
- import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices } from "./redirectToMobileStateMachine-BBMAc2Gb.esm.js";
2
- import { n as createRedirectToMobileManagerFromActor, t as createRedirectToMobileManager } from "./redirectToMobileManager-BJXC6Kx9.esm.js";
1
+ import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices } from "./redirectToMobileStateMachine-CbhN8uVN.esm.js";
2
+ import { n as createRedirectToMobileManagerFromActor, t as createRedirectToMobileManager } from "./redirectToMobileManager-CgGaT2NP.esm.js";
3
3
  export { createRedirectToMobileManager, createRedirectToMobileManagerFromActor, defaultRedirectToMobileServices, redirectToMobileMachine };
@@ -1,8 +1,8 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CQteqXfy.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
2
2
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
4
4
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
- import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices, t as canResendSmsFromContext } from "./redirectToMobileStateMachine-BBMAc2Gb.esm.js";
5
+ import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices, t as canResendSmsFromContext } from "./redirectToMobileStateMachine-CbhN8uVN.esm.js";
6
6
  //#region src/modules/redirect-to-mobile/redirectToMobileActor.ts
7
7
  const POLL_INTERVAL_MS = 5e3;
8
8
  const QR_REFRESH_INTERVAL_MS = 5e3;
@@ -58,7 +58,7 @@ function mapState(snapshot) {
58
58
  const typedSnapshot = snapshot;
59
59
  const { context } = typedSnapshot;
60
60
  if (typedSnapshot.matches("idle")) return { status: "idle" };
61
- if (typedSnapshot.matches("generatingUrl") || typedSnapshot.matches("loadingStartInfo")) return { status: "loading" };
61
+ if (typedSnapshot.matches("generatingUrl")) return { status: "loading" };
62
62
  if (typedSnapshot.matches("showingQr")) return {
63
63
  status: "redirecting",
64
64
  redirectUrl: context.redirectUrl,