@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
@@ -1,59 +1,10 @@
1
- import { t as api, u as endpoints } from "./api-Cz90EHyu.esm.js";
2
1
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
3
- import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
4
- import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
5
- import { n as loadPhoneValidation } from "./phoneValidation-DnBcNUNh.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-CFXcwCFr.esm.js";
4
+ import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
5
+ import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
6
+ import { t as carryAttempts } from "./attemptCarry-BecGGZK8.esm.js";
6
7
  import { n as isOtpComplete, t as computeOtpValidationErrors } from "./otp-D2k3PeSL.esm.js";
7
- //#region src/modules/phone/phoneServices.ts
8
- function getPhoneServerFailureReason(error, invalidStatus) {
9
- if (error.status === invalidStatus) return "invalidPhone";
10
- return "serverError";
11
- }
12
- async function fetchPhone(signal) {
13
- const res = await api.get(endpoints.getPhone, { signal });
14
- if (!res.ok) throw new Error(`GET ${endpoints.getPhone} failed: ${res.status} ${res.statusText}`);
15
- return res.data;
16
- }
17
- async function fetchStartInfo(signal) {
18
- const res = await api.get(endpoints.startInfo, { signal });
19
- if (!res.ok) throw new Error(`GET ${endpoints.startInfo} failed: ${res.status} ${res.statusText}`);
20
- return res.data;
21
- }
22
- async function addPhone(params, signal) {
23
- try {
24
- return (await api.post(endpoints.phone, {
25
- phone: params.phone,
26
- optInGranted: params.optInGranted
27
- }, { signal })).data;
28
- } catch (error) {
29
- throw new Error(getPhoneServerFailureReason(error, 400));
30
- }
31
- }
32
- async function addPhoneInstantVerify(params, signal) {
33
- try {
34
- return (await api.post(endpoints.phoneInstant, {
35
- phone: params.phone,
36
- optInGranted: params.optInGranted
37
- }, { signal })).data;
38
- } catch (error) {
39
- throw new Error(getPhoneServerFailureReason(error, 400));
40
- }
41
- }
42
- async function sendOtp(signal) {
43
- try {
44
- await api.get(`${endpoints.sendSmsOtp}?communicationchannel=SMS`, { signal });
45
- } catch (error) {
46
- throw new Error(getPhoneServerFailureReason(error));
47
- }
48
- }
49
- async function verifyOtp(code, signal) {
50
- try {
51
- return (await api.get(`${endpoints.compareOtp}?code=${code}&channel=SMS`, { signal })).data;
52
- } catch (error) {
53
- throw new Error(getPhoneServerFailureReason(error));
54
- }
55
- }
56
- //#endregion
57
8
  //#region src/modules/phone/phoneStateMachine.ts
58
9
  const RESEND_TIMER_SECONDS = 30;
59
10
  function getErrorMessage(error) {
@@ -148,6 +99,7 @@ const phoneMachine = setup({
148
99
  setOptInGranted: assign(({ event }) => ({ optInGranted: event.granted })),
149
100
  setError: assign(({ event }) => ({ error: getErrorMessage(event.error) })),
150
101
  clearError: assign({ error: () => void 0 }),
102
+ settleLoad: assign({ pendingLoads: ({ context }) => context.pendingLoads - 1 }),
151
103
  clearPhoneError: assign({ phoneError: () => void 0 }),
152
104
  setOtpCode: assign(({ event }) => ({
153
105
  otpCode: event.code,
@@ -190,6 +142,7 @@ const phoneMachine = setup({
190
142
  prefilledPhone: void 0,
191
143
  optInGranted: false,
192
144
  startInfo: void 0,
145
+ pendingLoads: 0,
193
146
  error: void 0,
194
147
  otpCode: "",
195
148
  otpError: void 0,
@@ -201,6 +154,7 @@ const phoneMachine = setup({
201
154
  },
202
155
  guards: {
203
156
  hasPrefill: ({ context }) => context.config.prefill,
157
+ areLoadsSettled: ({ context }) => context.pendingLoads === 0,
204
158
  hasOtpVerification: ({ context }) => context.config.otpVerification,
205
159
  hasNoValidationErrors: ({ context }) => !context.validationErrors || Object.keys(context.validationErrors).length === 0,
206
160
  hasAttemptsRemaining: ({ context }) => context.attemptsRemaining > 1,
@@ -210,40 +164,58 @@ const phoneMachine = setup({
210
164
  }).createMachine({
211
165
  id: "phone",
212
166
  initial: "idle",
213
- context: ({ input }) => ({
214
- config: input.config,
215
- phone: "",
216
- isValid: false,
217
- phoneError: void 0,
218
- validationErrors: void 0,
219
- countryCode: "",
220
- phonePrefix: "",
221
- prefilledPhone: void 0,
222
- optInGranted: false,
223
- startInfo: void 0,
224
- error: void 0,
225
- otpCode: "",
226
- otpError: void 0,
227
- otpValidationErrors: void 0,
228
- attemptsRemaining: input.config.maxOtpAttempts ?? 3,
229
- resendTimer: 0,
230
- resendTimerActive: false
231
- }),
167
+ context: ({ input, self }) => {
168
+ const carried = carryAttempts("phone", self, (s) => ({ attemptsRemaining: s.matches("error") ? s.context.attemptsRemaining - 1 : s.context.attemptsRemaining }));
169
+ return {
170
+ config: input.config,
171
+ phone: "",
172
+ isValid: false,
173
+ phoneError: void 0,
174
+ validationErrors: void 0,
175
+ countryCode: "",
176
+ phonePrefix: "",
177
+ prefilledPhone: void 0,
178
+ optInGranted: false,
179
+ startInfo: void 0,
180
+ pendingLoads: 0,
181
+ error: void 0,
182
+ otpCode: "",
183
+ otpError: void 0,
184
+ otpValidationErrors: void 0,
185
+ attemptsRemaining: carried.attemptsRemaining ?? input.config.maxOtpAttempts ?? 3,
186
+ resendTimer: 0,
187
+ resendTimerActive: false
188
+ };
189
+ },
232
190
  states: {
233
- idle: { on: { LOAD: [{
234
- target: "loadingPrefill",
235
- guard: "hasPrefill"
236
- }, { target: "loadingStartInfo" }] } },
191
+ idle: { on: { LOAD: [
192
+ {
193
+ target: "error",
194
+ guard: ({ context }) => context.attemptsRemaining <= 0 && context.attemptsRemaining < (context.config.maxOtpAttempts ?? 3),
195
+ actions: assign({ error: () => "Maximum OTP attempts exceeded" })
196
+ },
197
+ {
198
+ target: "loadingPrefill",
199
+ guard: "hasPrefill"
200
+ },
201
+ { target: "loadingStartInfo" }
202
+ ] } },
237
203
  loadingPrefill: {
238
- entry: "startLoadingPhoneRules",
239
- invoke: {
204
+ entry: ["startLoadingPhoneRules", assign({ pendingLoads: () => 2 })],
205
+ invoke: [{
240
206
  id: "fetchPhone",
241
207
  src: "fetchPhone",
242
- onDone: {
243
- target: "loadingStartInfo",
244
- actions: "setPrefilledPhone"
245
- },
246
- 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"
247
219
  }
248
220
  },
249
221
  loadingStartInfo: {
@@ -18,8 +18,7 @@ const LAZY_IMPORT_OPTIONS = {
18
18
  var LazyPhoneValidationProvider = class LazyPhoneValidationProvider {
19
19
  constructor() {
20
20
  this._lazy = BrowserLazyImportProvider.getInstance().create(async () => {
21
- const { PhoneValidationProvider } = await import("./PhoneValidationProvider-SZiOS0jB.esm.js").then((n) => n.n);
22
- return new PhoneValidationProvider();
21
+ return new (await (import("./PhoneValidationProvider-Co4zk2en.esm.js").then((n) => n.n))).PhoneValidationProvider();
23
22
  }, LAZY_IMPORT_OPTIONS);
24
23
  }
25
24
  static getInstance() {
@@ -16,6 +16,20 @@ function isAndroid(userAgent) {
16
16
  return /Android/i.test(ua);
17
17
  }
18
18
  /**
19
+ * True on a Samsung Android device, as far as the user agent tells.
20
+ *
21
+ * Two signals: Samsung Internet stamps `SamsungBrowser/<n>`, and unreduced
22
+ * user agents (WebViews, older Chrome) carry the `SAMSUNG` / `SM-<model>`
23
+ * device token. Chrome 110+ reduces the Android model to `K`, so Chrome on a
24
+ * Samsung phone is NOT detected — callers gating a Samsung-only feature on
25
+ * this err on the side of hiding it.
26
+ */
27
+ function isSamsungDevice(userAgent) {
28
+ const ua = userAgent || (typeof navigator !== "undefined" ? navigator.userAgent : "");
29
+ if (!isAndroid(ua)) return false;
30
+ return /SamsungBrowser\/|\bSAMSUNG\b|\bSM-[A-Z0-9]+/i.test(ua);
31
+ }
32
+ /**
19
33
  * True when the page runs inside an Android WebView — web content hosted by a
20
34
  * native app — rather than a standalone Android browser.
21
35
  *
@@ -128,4 +142,4 @@ function isIPhone14OrHigher() {
128
142
  return IPHONE_14_PLUS_DIMENSIONS.some((dims) => dims.outerHeight === outerHeight && dims.outerWidth === outerWidth || dims.innerHeight === innerHeight && dims.innerWidth === innerWidth);
129
143
  }
130
144
  //#endregion
131
- export { isIOS as a, isIPhone14OrHigher as c, isSafari as d, isTabletWithoutAndroid as f, isDesktop as i, isIslandBrowser as l, isAndroidWebView as n, isIOSWebView as o, isBraveBrowser as r, isIPad as s, isAndroid as t, isMacOsSafari as u };
145
+ export { isIOS as a, isIPhone14OrHigher as c, isSafari as d, isSamsungDevice as f, isDesktop as i, isIslandBrowser as l, isAndroidWebView as n, isIOSWebView as o, isTabletWithoutAndroid as p, isBraveBrowser as r, isIPad as s, isAndroid as t, isMacOsSafari as u };
@@ -0,0 +1,21 @@
1
+ import { r as getToken } from "./api-CZpuJuZl.esm.js";
2
+ //#region src/internal/session/processFaceMatch.ts
3
+ let saved = null;
4
+ /**
5
+ * Saves the `success` field of a selfie `/omni/process/face` response, so a
6
+ * later face match in the same session shows it without a second call. A
7
+ * response without `success` clears the saved result.
8
+ */
9
+ function saveProcessFaceMatch(success) {
10
+ const token = getToken();
11
+ saved = token !== null && typeof success === "boolean" ? {
12
+ token,
13
+ matched: success
14
+ } : null;
15
+ }
16
+ /** The saved face match result of the current session, or `null`. */
17
+ function getProcessFaceMatch() {
18
+ return saved !== null && saved.token === getToken() ? saved.matched : null;
19
+ }
20
+ //#endregion
21
+ export { saveProcessFaceMatch as n, getProcessFaceMatch as t };
@@ -1,6 +1,6 @@
1
- import { t as Manager } from "./Manager-C9T5amUN.js";
1
+ import { t as Manager } from "./Manager-DufwKlav.js";
2
2
  import { S as getDefaultConsentChecks, a as ElectronicSignatureConfig, b as areAllConsented, f as NAMIRIAL_QES_CONSENT_KEYS, h as QE_CONSENT_KEYS, i as ConsentKey, m as NamirialQesConsentKey, p as NAMIRIAL_QES_PROVIDER_CODE, r as ConsentChecks, s as ElectronicSignatureDocument, u as ElectronicSignatureProviderTerms } from "./types-D0gekt4U.js";
3
- import { n as ElectronicSignatureState, o as electronicSignatureMachine } from "./electronicSignatureManager-DTSLOvKR.js";
3
+ import { n as ElectronicSignatureState, o as electronicSignatureMachine } from "./electronicSignatureManager-5tYz-a4o.js";
4
4
  import "./electronic-signature.js";
5
5
  //#region src/modules/qe-signature/index.d.ts
6
6
  type QeSignatureConfig = Omit<ElectronicSignatureConfig, 'variant'>;
@@ -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-CjKvJ6E-.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-hn-_ADP5.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-CZpuJuZl.esm.js";
2
+ import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
3
+ import { r as createRecordingCompositor } from "./CameraCompositor-ppyMYVoY.esm.js";
4
+ import { t as getAdaptiveMediaRecorderOptions } from "./mediaRecorderOptions-g1TwTlhd.esm.js";
5
+ import { t as WorkerEncoderRecordingProvider } from "./WorkerEncoderRecordingProvider-CsDED9UU.esm.js";
6
+ import { t as MultipartRecordingService } from "./multipartRecordingService-WgK8ieRI.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,5 +1,5 @@
1
- import { n as RedirectToMobileServices, t as RedirectToMobileConfig } from "./types-DPIDuhut.js";
2
- import { a as RedirectToMobileActor, i as createRedirectToMobileManagerFromActor, n as RedirectToMobileState, o as redirectToMobileMachine, r as createRedirectToMobileManager, t as RedirectToMobileManager } from "./redirectToMobileManager-CVsvpVbQ.js";
1
+ import { r as RedirectToMobileServices, t as RedirectToMobileConfig } from "./types-DNVzoRvi.js";
2
+ import { a as RedirectToMobileActor, i as createRedirectToMobileManagerFromActor, n as RedirectToMobileState, o as redirectToMobileMachine, r as createRedirectToMobileManager, t as RedirectToMobileManager } from "./redirectToMobileManager-pT6FiPE7.js";
3
3
  //#region src/modules/redirect-to-mobile/redirectToMobileServices.d.ts
4
4
  declare const defaultRedirectToMobileServices: RedirectToMobileServices;
5
5
  //#endregion
@@ -1,3 +1,3 @@
1
- import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices } from "./redirectToMobileStateMachine-b-H-ipGM.esm.js";
2
- import { n as createRedirectToMobileManagerFromActor, t as createRedirectToMobileManager } from "./redirectToMobileManager-uHW3dyuQ.esm.js";
1
+ import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices } from "./redirectToMobileStateMachine-CMjjUXSu.esm.js";
2
+ import { n as createRedirectToMobileManagerFromActor, t as createRedirectToMobileManager } from "./redirectToMobileManager-DjsEtWLq.esm.js";
3
3
  export { createRedirectToMobileManager, createRedirectToMobileManagerFromActor, defaultRedirectToMobileServices, redirectToMobileMachine };