@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
@@ -0,0 +1,407 @@
1
+ import { n as __exportAll } from "./rolldown-runtime-B-1-B7_t.esm.js";
2
+ import { t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
3
+ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
4
+ import { t as BrowserNetworkStatusProvider } from "./BrowserNetworkStatusProvider-BrDXBEDd.esm.js";
5
+ import { t as MultipartRecordingProvider } from "./MultipartRecordingProvider-CduV32Qa.esm.js";
6
+ //#region src/internal/recordings/videoSelfieUploadService.ts
7
+ /**
8
+ * Opens a scoped multipart video upload session. Idempotent server-side: if
9
+ * an upload is already in progress for the `(session, scope)` pair, the same `uploadId`
10
+ * comes back along with the parts already stored (`parts` non-empty) — but
11
+ * always with a fresh `epoch` that locks out whoever held the previous one.
12
+ */
13
+ async function initiateVideoSelfieUpload(scope = "videoselfie") {
14
+ const response = await api.post(endpoints.videoSelfieUploadInitiate, void 0, { query: { scope } });
15
+ return {
16
+ uploadId: response.data.uploadId,
17
+ epoch: response.data.epoch,
18
+ scope,
19
+ parts: response.data.parts ?? []
20
+ };
21
+ }
22
+ /**
23
+ * Uploads a single chunk as a multipart part. The body is the raw video bytes
24
+ * (no base64, no client-side encryption — encryption at rest is server-side
25
+ * S3 SSE). Every part except the last must be >= 5 MiB (enforced
26
+ * server-side). Returns the part number + `etag` needed to complete the
27
+ * upload. Rejects with a `409` status when a newer initiate fenced this
28
+ * session out.
29
+ */
30
+ async function uploadVideoSelfiePart(session, partNumber, chunk) {
31
+ const response = await api.post(endpoints.videoSelfieUploadPart, chunk, {
32
+ query: {
33
+ uploadId: session.uploadId,
34
+ epoch: session.epoch,
35
+ partNumber,
36
+ scope: session.scope
37
+ },
38
+ headers: { "Content-Type": "application/octet-stream" }
39
+ });
40
+ return {
41
+ partNumber: response.data.partNumber,
42
+ etag: response.data.etag
43
+ };
44
+ }
45
+ /**
46
+ * Finalizes the upload. The service assembles from the parts it stored; the
47
+ * optional `parts` list is deliberately NOT sent — chunks staged below the
48
+ * S3 minimum are combined and renumbered server-side, so a client-side list
49
+ * could contradict the authoritative one. Safe to repeat if the response
50
+ * was lost. Returns the server-reported status. Rejects with `400` naming a
51
+ * missing part when the sequence has a hole.
52
+ */
53
+ async function completeVideoSelfieUpload(session) {
54
+ return (await api.post(endpoints.videoSelfieUploadComplete, {
55
+ uploadId: session.uploadId,
56
+ epoch: session.epoch
57
+ }, { query: { scope: session.scope } })).data.status;
58
+ }
59
+ /**
60
+ * Discards an in-progress upload and everything already sent for it, so the
61
+ * backend fails the upload straight away instead of waiting for its expiry.
62
+ * Call when a recording is abandoned or its upload can no longer complete.
63
+ */
64
+ async function abortVideoSelfieUpload(session) {
65
+ return (await api.post(endpoints.videoSelfieUploadAbort, {
66
+ uploadId: session.uploadId,
67
+ epoch: session.epoch
68
+ }, { query: { scope: session.scope } })).data.status;
69
+ }
70
+ //#endregion
71
+ //#region src/internal/recordings/videoSelfieChunkUploader.ts
72
+ /**
73
+ * How many part uploads run concurrently. The service allows 10 rps with a
74
+ * burst of 30 per session; a real recorder emits ~2 chunks/s, so this cap
75
+ * only matters when a backlog is draining after a network stall.
76
+ */
77
+ const MAX_IN_FLIGHT = 3;
78
+ /** Attempts per chunk in the live round (first try + retries). */
79
+ const MAX_ATTEMPTS = 4;
80
+ /** Extra attempts per parked chunk during the final drain() round. */
81
+ const DRAIN_ATTEMPTS = 2;
82
+ const BACKOFF_BASE_MS = 500;
83
+ const BACKOFF_CAP_MS = 8e3;
84
+ /** Upper bound honored for a server-sent `Retry-After` (seconds). */
85
+ const RETRY_AFTER_CAP_MS = 3e4;
86
+ /**
87
+ * Ceiling on un-acknowledged chunk bytes held in memory. On a network slower
88
+ * than the encoder the backlog grows without bound; past this the upload
89
+ * cannot realistically catch up, so the uploader fails instead of eating
90
+ * memory on a low-end device. ~48 MiB ≈ 2.5 minutes of video at our bitrate.
91
+ */
92
+ const MAX_BUFFERED_BYTES = 48 * 1024 * 1024;
93
+ function httpStatusOf$1(error) {
94
+ if (typeof error === "object" && error !== null && "status" in error && typeof error.status === "number") return error.status;
95
+ return null;
96
+ }
97
+ function retryAfterMsOf(error) {
98
+ if (typeof error === "object" && error !== null && "headers" in error && typeof error.headers === "object") {
99
+ const headers = error.headers;
100
+ const seconds = Number(headers?.["retry-after"]);
101
+ if (Number.isFinite(seconds) && seconds >= 0) return Math.min(seconds * 1e3, RETRY_AFTER_CAP_MS);
102
+ }
103
+ return null;
104
+ }
105
+ /**
106
+ * Uploads video-selfie chunks with the client-side half of the service's
107
+ * resilience contract (`video-selfie-service` README, "What a client can
108
+ * rely on"):
109
+ *
110
+ * - **Keep-until-ack** — every chunk is held in memory until its upload
111
+ * returns 200 (a hole in the sequence can only be filled by that exact
112
+ * data). Acked bytes are durable in S3 (stored as a part or staged), so
113
+ * the blob is released the moment the ack lands.
114
+ * - **Retry with backoff** — transient failures (network error/timeout,
115
+ * 408, 429, 5xx) retry the same bytes under the same partNumber with
116
+ * exponential backoff + full jitter; 429 honors the server's
117
+ * `Retry-After`. Chunks may land out of order — the service stages them.
118
+ * - **Park, then drain** — a chunk that exhausts its live retries is parked
119
+ * (blob kept) without failing the recording; {@link drain} gives every
120
+ * parked chunk a final round once recording stops, so a mid-recording
121
+ * network outage only fails the upload if it persists to the end. A
122
+ * browser `online` event un-parks early: parked chunks get a fresh live
123
+ * round as soon as connectivity returns instead of waiting for stop.
124
+ * - **409 is fatal** — a newer initiate fenced this session out ("latest
125
+ * initiate wins"); no retry can succeed, so the uploader stops.
126
+ * - **Bounded memory** — when un-acked bytes exceed the ceiling the
127
+ * uploader fails rather than buffering a runaway backlog.
128
+ */
129
+ var VideoSelfieChunkUploader = class {
130
+ constructor(session, dependencies = {}) {
131
+ this.queue = [];
132
+ this.parked = [];
133
+ this.inFlight = 0;
134
+ this.bufferedBytes = 0;
135
+ this.fatal = false;
136
+ this.disposed = false;
137
+ this.tasks = [];
138
+ this.session = session;
139
+ this.timer = dependencies.timer ?? BrowserTimerProvider.getInstance();
140
+ this.jitter = dependencies.jitter ?? Math.random;
141
+ const networkStatus = dependencies.networkStatus ?? new BrowserNetworkStatusProvider();
142
+ this.unsubscribeOnline = networkStatus.onOnline(() => this.unparkEarly());
143
+ }
144
+ /** True once the upload cannot complete (fenced out or over the memory cap). */
145
+ get failed() {
146
+ return this.fatal;
147
+ }
148
+ /**
149
+ * Accepts the next chunk for upload. Non-blocking: the upload (and any
150
+ * retries) run in the background; failures surface through {@link failed}
151
+ * and {@link drain}.
152
+ */
153
+ enqueue(partNumber, chunk) {
154
+ if (this.fatal || this.disposed) return;
155
+ this.bufferedBytes += chunk.size;
156
+ if (this.bufferedBytes > MAX_BUFFERED_BYTES) {
157
+ this.fatal = true;
158
+ return;
159
+ }
160
+ this.queue.push({
161
+ partNumber,
162
+ chunk,
163
+ attempts: 0
164
+ });
165
+ this.pump();
166
+ }
167
+ /**
168
+ * Waits for every accepted chunk to be acknowledged, giving parked chunks
169
+ * one final retry round. Returns `true` when all chunks landed and the
170
+ * upload can be completed.
171
+ */
172
+ async drain() {
173
+ this.unsubscribeOnline();
174
+ await this.settleLiveRound();
175
+ while (!this.fatal && this.parked.length > 0) {
176
+ const chunk = this.parked.shift();
177
+ chunk.attempts = MAX_ATTEMPTS - DRAIN_ATTEMPTS;
178
+ this.queue.push(chunk);
179
+ this.pump();
180
+ await this.settleLiveRound();
181
+ if (this.parked.some((p) => p.partNumber === chunk.partNumber)) return false;
182
+ }
183
+ return !this.disposed && !this.fatal && this.parked.length === 0;
184
+ }
185
+ /** Cancels all pending work; held blobs are released. */
186
+ dispose() {
187
+ this.disposed = true;
188
+ this.queue = [];
189
+ this.parked = [];
190
+ this.unsubscribeOnline();
191
+ }
192
+ /**
193
+ * Connectivity is back (browser `online` event) — give parked chunks a
194
+ * fresh live round right away instead of holding them until {@link drain}.
195
+ * The event is only a hint: chunks that still fail simply park again.
196
+ */
197
+ unparkEarly() {
198
+ if (this.fatal || this.disposed || this.parked.length === 0) return;
199
+ for (const chunk of this.parked.splice(0)) {
200
+ chunk.attempts = 0;
201
+ this.queue.push(chunk);
202
+ }
203
+ this.pump();
204
+ }
205
+ async settleLiveRound() {
206
+ while (this.tasks.length > 0) {
207
+ const snapshot = [...this.tasks];
208
+ await Promise.all(snapshot);
209
+ this.tasks = this.tasks.filter((task) => !snapshot.includes(task));
210
+ }
211
+ }
212
+ pump() {
213
+ while (!this.fatal && !this.disposed && this.inFlight < MAX_IN_FLIGHT && this.queue.length > 0) {
214
+ const chunk = this.queue.shift();
215
+ this.inFlight += 1;
216
+ const task = this.uploadWithRetry(chunk).finally(() => {
217
+ this.inFlight -= 1;
218
+ this.pump();
219
+ });
220
+ this.tasks.push(task);
221
+ }
222
+ }
223
+ async uploadWithRetry(pending) {
224
+ while (!this.disposed) {
225
+ pending.attempts += 1;
226
+ try {
227
+ await uploadVideoSelfiePart(this.session, pending.partNumber, pending.chunk);
228
+ this.bufferedBytes -= pending.chunk.size;
229
+ return;
230
+ } catch (error) {
231
+ const status = httpStatusOf$1(error);
232
+ if (status === 409) {
233
+ this.fatal = true;
234
+ return;
235
+ }
236
+ if (status !== null && status >= 400 && status < 500 && status !== 408 && status !== 429 || pending.attempts >= MAX_ATTEMPTS) {
237
+ this.parked.push(pending);
238
+ return;
239
+ }
240
+ await this.delayBeforeRetry(pending.attempts, error);
241
+ }
242
+ }
243
+ }
244
+ delayBeforeRetry(attempt, error) {
245
+ const retryAfterMs = retryAfterMsOf(error);
246
+ const backoffCeiling = Math.min(BACKOFF_BASE_MS * 2 ** (attempt - 1), BACKOFF_CAP_MS);
247
+ const waitMs = retryAfterMs ?? backoffCeiling / 2 + this.jitter() * (backoffCeiling / 2);
248
+ return new Promise((resolve) => {
249
+ this.timer.setTimeout(resolve, waitMs);
250
+ });
251
+ }
252
+ };
253
+ //#endregion
254
+ //#region src/internal/recordings/multipartRecordingService.ts
255
+ var multipartRecordingService_exports = /* @__PURE__ */ __exportAll({ MultipartRecordingService: () => MultipartRecordingService });
256
+ /** Attempts for `complete` — documented safe to repeat if the response was lost. */
257
+ const COMPLETE_ATTEMPTS = 3;
258
+ const COMPLETE_BACKOFF_MS = 500;
259
+ function httpStatusOf(error) {
260
+ if (typeof error === "object" && error !== null && "status" in error && typeof error.status === "number") return error.status;
261
+ return null;
262
+ }
263
+ /**
264
+ * Records the camera on-device and streams it to the backend as it is
265
+ * captured, using the video-selfie-service multipart upload protocol
266
+ * (`/v1/video-upload/*`).
267
+ *
268
+ * This is the client-side recorder for Video Selfie and for scoped regular
269
+ * Selfie and ID recordings. It replaces the former server-side recording path.
270
+ *
271
+ * Every ~0.5 s recorder blob uploads as its own chunk, concurrently with
272
+ * recording, through {@link VideoSelfieChunkUploader} (keep-until-ack +
273
+ * retry with backoff — see its doc for the full policy). The service stages
274
+ * sub-5 MiB chunks and combines them server-side, so `stop()` only drains
275
+ * the stragglers and finalizes; client memory holds un-acked chunks only.
276
+ * No client-side encryption: video is encrypted at rest server-side
277
+ * (S3 SSE-AES-256).
278
+ */
279
+ var MultipartRecordingService = class {
280
+ constructor(scope = "videoselfie", recorder = new MultipartRecordingProvider()) {
281
+ this.scope = scope;
282
+ this.timer = BrowserTimerProvider.getInstance();
283
+ this.session = null;
284
+ this.uploader = null;
285
+ this.chunksEmitted = 0;
286
+ this.stopPromise = null;
287
+ this.abandonRequested = false;
288
+ this.recorder = recorder;
289
+ }
290
+ get isRecording() {
291
+ return this.recorder.isRecording;
292
+ }
293
+ async start(stream) {
294
+ if (this.recorder.isRecording) return;
295
+ let initiated = await initiateVideoSelfieUpload(this.scope);
296
+ if (initiated.parts.length > 0) {
297
+ await abortVideoSelfieUpload(initiated).catch(() => {});
298
+ initiated = await initiateVideoSelfieUpload(this.scope);
299
+ }
300
+ this.session = {
301
+ uploadId: initiated.uploadId,
302
+ epoch: initiated.epoch,
303
+ scope: this.scope
304
+ };
305
+ this.uploader = new VideoSelfieChunkUploader(this.session);
306
+ this.chunksEmitted = 0;
307
+ this.abandonRequested = false;
308
+ this.recorder.startRecording(stream, ({ chunk, partNumber }) => {
309
+ this.chunksEmitted += 1;
310
+ this.uploader?.enqueue(partNumber, chunk);
311
+ });
312
+ }
313
+ /** Pause the current media container without finalizing its upload. */
314
+ pause() {
315
+ return this.recorder.pauseRecording?.() ?? false;
316
+ }
317
+ /** Resume the same media container after its video source has recovered. */
318
+ resume() {
319
+ return this.recorder.resumeRecording?.() ?? false;
320
+ }
321
+ stop() {
322
+ if (this.stopPromise) return this.stopPromise;
323
+ const stopPromise = this.finalizeRecording();
324
+ this.stopPromise = stopPromise;
325
+ const clearStopPromise = () => {
326
+ if (this.stopPromise === stopPromise) {
327
+ this.stopPromise = null;
328
+ this.abandonRequested = false;
329
+ }
330
+ };
331
+ stopPromise.then(clearStopPromise, clearStopPromise);
332
+ return stopPromise;
333
+ }
334
+ async finalizeRecording() {
335
+ const session = this.session;
336
+ const uploader = this.uploader;
337
+ if (!this.recorder.isRecording || !session || !uploader) return { recordingId: null };
338
+ try {
339
+ await this.recorder.stopRecording();
340
+ if (this.abandonRequested) {
341
+ this.abandonUpload(session);
342
+ return { recordingId: null };
343
+ }
344
+ const delivered = await uploader.drain();
345
+ if (this.abandonRequested || !delivered || uploader.failed || this.chunksEmitted === 0) {
346
+ this.abandonUpload(session);
347
+ return { recordingId: null };
348
+ }
349
+ } catch (error) {
350
+ this.abandonUpload(session);
351
+ throw error;
352
+ }
353
+ try {
354
+ await this.completeWithRetry(session);
355
+ this.session = null;
356
+ this.uploader = null;
357
+ return { recordingId: session.uploadId };
358
+ } catch {
359
+ this.abandonUpload(session);
360
+ return { recordingId: null };
361
+ }
362
+ }
363
+ cleanup() {
364
+ if (this.session) if (this.stopPromise) {
365
+ this.abandonRequested = true;
366
+ this.uploader?.dispose();
367
+ } else this.abandonUpload(this.session);
368
+ this.recorder.reset();
369
+ }
370
+ /**
371
+ * `complete` is idempotent server-side ("safe to repeat if the response
372
+ * was lost"), so transient failures — network errors, 5xx, 429 — retry a
373
+ * couple of times before the recording is declared failed. A 4xx (e.g.
374
+ * `400` naming a missing part) is permanent: after a clean drain every
375
+ * chunk was acked, so a reported hole cannot be filled from here.
376
+ */
377
+ async completeWithRetry(session) {
378
+ for (let attempt = 1;; attempt += 1) {
379
+ if (this.abandonRequested) throw new Error("Video upload abandoned");
380
+ try {
381
+ await completeVideoSelfieUpload(session);
382
+ return;
383
+ } catch (error) {
384
+ const status = httpStatusOf(error);
385
+ if (status !== null && status >= 400 && status < 500 && status !== 408 && status !== 429 || attempt >= COMPLETE_ATTEMPTS) throw error;
386
+ await new Promise((resolve) => {
387
+ this.timer.setTimeout(resolve, COMPLETE_BACKOFF_MS * attempt);
388
+ });
389
+ }
390
+ }
391
+ }
392
+ /**
393
+ * Fire-and-forget abort: the upload can no longer complete, so tell the
394
+ * backend to fail it immediately rather than at its expiry. Best-effort —
395
+ * an abort that doesn't land (including a 409 from a newer epoch having
396
+ * taken over) just means the server falls back to expiry or salvage.
397
+ */
398
+ abandonUpload(session) {
399
+ if (this.session !== session) return;
400
+ this.session = null;
401
+ this.uploader?.dispose();
402
+ this.uploader = null;
403
+ abortVideoSelfieUpload(session).catch(() => {});
404
+ }
405
+ };
406
+ //#endregion
407
+ export { multipartRecordingService_exports as n, MultipartRecordingService as t };
@@ -1,4 +1,4 @@
1
- import { s as isWasmMotionPrimedForModule } from "./permissionServices-Ca-tSNhT.esm.js";
1
+ import { s as isWasmMotionPrimedForModule } from "./permissionServices-DFJlH7K3.esm.js";
2
2
  //#region src/internal/permissions/permissionGuards.ts
3
3
  function resolveStoredPermissionResult(fromEvent, fromContext) {
4
4
  if (fromEvent === "granted" || fromEvent === "denied" || fromEvent === "prompt" || fromEvent === "refresh") return fromEvent;
@@ -1,7 +1,7 @@
1
- import { t as WasmUtilProvider } from "./WasmUtilProvider-DtJuBdt-.esm.js";
2
- import { n as isAndroidWebView } from "./platform-DkcRc9JV.esm.js";
1
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-0xTxgP0R.esm.js";
2
+ import { n as isAndroidWebView } from "./platform-aPh7gTWh.esm.js";
3
3
  import { t as MotionSensorProvider } from "./MotionSensorProvider-DYxh8TjR.esm.js";
4
- import { c as isCameraGrantedInDocument, i as requestCameraAccess, o as stopCameraStream, s as clearCameraGrantedInDocument } from "./camera-sIa9ceW2.esm.js";
4
+ import { a as stopCameraStream, c as isCameraGrantedInDocument, o as clearCameraGrantedInDocument, r as requestCameraAccess } from "./camera-E_Kcre4O.esm.js";
5
5
  //#region ../infra/src/media/permissions.ts
6
6
  async function queryPermission(name) {
7
7
  try {
@@ -136,20 +136,22 @@ async function requestMotionPermission() {
136
136
  /**
137
137
  * Requests camera permission by attempting to access the camera, then immediately
138
138
  * stops the obtained stream. When `requestMotion` is true (deepsight), requests
139
- * motion OS permission, primes WASM sensors, then camera — all in one user gesture
140
- * chain, matching SDK v1.
139
+ * motion OS permission first, then primes WASM sensors while it requests the
140
+ * camera — all in one user gesture chain, as in SDK v1.
141
141
  */
142
142
  async function requestPermission(options = {}) {
143
143
  try {
144
+ let motionPrimed;
144
145
  if (options.requestMotion) {
145
146
  const motionSensor = new MotionSensorProvider();
146
147
  if (await resolveMotionOsPermission(motionSensor) === "denied") return "denied";
147
- if (!isWasmMotionPrimedForModule()) await primeWasmMotionSensor(motionSensor);
148
+ if (!isWasmMotionPrimedForModule()) motionPrimed = primeWasmMotionSensor(motionSensor);
148
149
  }
149
- stopCameraStream(await requestCameraAccess({
150
+ const [stream] = await Promise.all([requestCameraAccess({
150
151
  video: true,
151
152
  audio: options.requestAudio ?? false
152
- }));
153
+ }), motionPrimed]);
154
+ stopCameraStream(stream);
153
155
  return "granted";
154
156
  } catch (error) {
155
157
  const name = error instanceof Error ? error.name : void 0;
@@ -170,4 +172,4 @@ async function invokeRequestPermissionActor(input) {
170
172
  return requestPermission({ requestMotion: true });
171
173
  }
172
174
  //#endregion
173
- export { requestPermission as a, resetWasmMotionPrimedForModule as c, requestMotionPermission as i, queryCameraPermission as l, invokeRequestPermissionActor as n, requiresMotionPermissionUserGesture as o, primeMotionFromUserGestureIfNeeded as r, isWasmMotionPrimedForModule as s, checkPermission as t };
175
+ export { requestPermission as a, resetWasmMotionPrimedForModule as c, requestMotionPermission as i, queryCameraPermission as l, invokeRequestPermissionActor as n, requiresMotionPermissionUserGesture as o, primeMotionFromUserGestureIfNeeded as r, isWasmMotionPrimedForModule as s, checkPermission as t, queryPermission as u };
@@ -8,6 +8,12 @@ type CountryCode = 'AC' | 'AD' | 'AE' | 'AF' | 'AG' | 'AI' | 'AL' | 'AM' | 'AO'
8
8
  declare function getCallingCode(country: CountryCode): string;
9
9
  /** Formats national digits while the user types them, without the calling code. */
10
10
  declare function formatPhoneAsYouType(nationalDigits: string, country: CountryCode): string;
11
+ /**
12
+ * Returns the national significant number in digits typed after the calling
13
+ * code: without a trunk prefix the rules drop, such as `0612345678` in `NL` →
14
+ * `612345678`. Counts the digits the way phone validation does.
15
+ */
16
+ declare function getNationalSignificantNumber(nationalDigits: string, country: CountryCode): string;
11
17
  /** Returns an example mobile number in national format, without a trunk prefix. */
12
18
  declare function formatExamplePhoneNumber(country: CountryCode): string;
13
19
  /**
@@ -21,4 +27,4 @@ declare function parsePhoneNumber(phone: string): {
21
27
  /** Checks a full international number against the rules of `country`. */
22
28
  declare function isValidPhoneNumber(phone: string, country: CountryCode): boolean;
23
29
  //#endregion
24
- export { type CountryCode, formatExamplePhoneNumber, formatPhoneAsYouType, getCallingCode, isValidPhoneNumber, parsePhoneNumber };
30
+ export { type CountryCode, formatExamplePhoneNumber, formatPhoneAsYouType, getCallingCode, getNationalSignificantNumber, isValidPhoneNumber, parsePhoneNumber };
@@ -1,4 +1,4 @@
1
- import { C as metadata_min_json_default, S as withMetadataArgument, _ as VALID_PUNCTUATION, a as PhoneNumber, b as getCountryCallingCode$1, c as applyInternationalSeparatorStyle, d as getCountryByCallingCode, f as getCountryByNationalNumber, g as VALID_DIGITS, h as PLUS_CHARS, i as parseDigits, l as extractCountryCallingCode, m as stripIddPrefix, o as FIRST_GROUP_PATTERN, p as extractNationalNumberFromPossiblyIncompleteNumber, r as parsePhoneNumber$1, s as formatNationalNumberUsingFormat, t as PhoneValidationProvider, u as extractCountryCallingCodeFromInternationalNumberWithoutPlusSign, v as checkNumberLength, x as isObject, y as Metadata } from "./PhoneValidationProvider-SZiOS0jB.esm.js";
1
+ import { C as metadata_min_json_default, S as withMetadataArgument, _ as VALID_PUNCTUATION, a as PhoneNumber, b as getCountryCallingCode$1, c as applyInternationalSeparatorStyle, d as getCountryByCallingCode, f as getCountryByNationalNumber, g as VALID_DIGITS, h as PLUS_CHARS, i as parseDigits, l as extractCountryCallingCode, m as stripIddPrefix, o as FIRST_GROUP_PATTERN, p as extractNationalNumberFromPossiblyIncompleteNumber, r as parsePhoneNumber$1, s as formatNationalNumberUsingFormat, t as PhoneValidationProvider, u as extractCountryCallingCodeFromInternationalNumberWithoutPlusSign, v as checkNumberLength, x as isObject, y as Metadata } from "./PhoneValidationProvider-Co4zk2en.esm.js";
2
2
  //#region ../../node_modules/.pnpm/libphonenumber-js@1.12.31/node_modules/libphonenumber-js/es6/AsYouTypeState.js
3
3
  function _typeof$5(o) {
4
4
  "@babel/helpers - typeof";
@@ -1877,6 +1877,11 @@ var PhoneFormattingProvider = class {
1877
1877
  const callingCode = this.getCallingCode(country);
1878
1878
  return new AsYouType(country).input(`${callingCode}${nationalDigits}`).replace(callingCode, "").trimStart();
1879
1879
  }
1880
+ nationalSignificantNumber(nationalDigits, country) {
1881
+ const asYouType = new AsYouType(country);
1882
+ asYouType.input(`${this.getCallingCode(country)}${nationalDigits}`);
1883
+ return asYouType.getNumber()?.nationalNumber ?? "";
1884
+ }
1880
1885
  formatExampleNumber(country) {
1881
1886
  const example = getExampleNumber(country, examples_mobile_json_default);
1882
1887
  if (!example) return "";
@@ -1903,6 +1908,14 @@ function getCallingCode(country) {
1903
1908
  function formatPhoneAsYouType(nationalDigits, country) {
1904
1909
  return formatting.formatAsYouType(nationalDigits, country);
1905
1910
  }
1911
+ /**
1912
+ * Returns the national significant number in digits typed after the calling
1913
+ * code: without a trunk prefix the rules drop, such as `0612345678` in `NL` →
1914
+ * `612345678`. Counts the digits the way phone validation does.
1915
+ */
1916
+ function getNationalSignificantNumber(nationalDigits, country) {
1917
+ return formatting.nationalSignificantNumber(nationalDigits, country);
1918
+ }
1906
1919
  /** Returns an example mobile number in national format, without a trunk prefix. */
1907
1920
  function formatExamplePhoneNumber(country) {
1908
1921
  return formatting.formatExampleNumber(country);
@@ -1919,4 +1932,4 @@ function isValidPhoneNumber(phone, country) {
1919
1932
  return validation.isValid(phone, country);
1920
1933
  }
1921
1934
  //#endregion
1922
- export { formatExamplePhoneNumber, formatPhoneAsYouType, getCallingCode, isValidPhoneNumber, parsePhoneNumber };
1935
+ export { formatExamplePhoneNumber, formatPhoneAsYouType, getCallingCode, getNationalSignificantNumber, isValidPhoneNumber, parsePhoneNumber };
package/dist/phone.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as PhoneState, o as phoneMachine, r as createPhoneManager, s as PhoneConfig, t as PhoneManager } from "./phoneManager-BO-LTih5.js";
1
+ import { n as PhoneState, o as phoneMachine, r as createPhoneManager, s as PhoneConfig, t as PhoneManager } from "./phoneManager-VO1HEoUZ.js";
2
2
  export { type PhoneConfig, type PhoneManager, type PhoneState, createPhoneManager, phoneMachine };
package/dist/phone.esm.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as phoneMachine } from "./phoneStateMachine-D2QWS2cu.esm.js";
2
- import { t as createPhoneManager } from "./phoneManager-KKUq-Vgo.esm.js";
1
+ import { t as phoneMachine } from "./phoneStateMachine-DKdY2Scx.esm.js";
2
+ import { t as createPhoneManager } from "./phoneManager-rA7updqF.esm.js";
3
3
  export { createPhoneManager, phoneMachine };
@@ -0,0 +1,27 @@
1
+ import { t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
2
+ //#region src/internal/forms/checks/allowedCharacters.ts
3
+ const CLASS_PATTERNS = {
4
+ letter: "\\p{L}\\p{M}",
5
+ digit: "0-9",
6
+ space: " "
7
+ };
8
+ const escapeForClass = (chars) => chars.replace(/[\\\]^-]/g, "\\$&");
9
+ /**
10
+ * `allowedCharacters`: only characters from `classes`, plus any in `extra`.
11
+ * With `ascii`, `letter` means A-Z in either case instead of any script.
12
+ */
13
+ function hasAllowedCharacters(value, classes, extra = "", ascii = false) {
14
+ const set = classes.map((c) => ascii && c === "letter" ? "A-Za-z" : CLASS_PATTERNS[c]).join("");
15
+ return new RegExp(`^[${set}${escapeForClass(extra)}]+$`, "u").test(value);
16
+ }
17
+ //#endregion
18
+ //#region src/shared/phoneFormat.ts
19
+ /**
20
+ * The phone in E.164, or the value as typed when the rules are not loaded
21
+ * (`loadPhoneValidation()`) or the number is not valid.
22
+ */
23
+ function formatPhoneE164(phone, country) {
24
+ return getPhoneValidation()?.formatE164(phone, country) ?? phone;
25
+ }
26
+ //#endregion
27
+ export { hasAllowedCharacters as n, formatPhoneE164 as t };
@@ -1,6 +1,6 @@
1
- import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
- import { t as Manager } from "./Manager-C9T5amUN.js";
3
- import "./Actor-DpTj5PFb.js";
1
+ import { i as ActorRefFrom } from "./spawn-COZKetCS.js";
2
+ import { t as Manager } from "./Manager-DufwKlav.js";
3
+ import "./Actor-DqjOqDfU.js";
4
4
  import { t as OtpValidationErrors } from "./otp-CEWfTj9v.js";
5
5
  //#region ../infra/src/capabilities/IPhoneValidationCapability.d.ts
6
6
  type IPhoneValidationCapability = {
@@ -8,6 +8,11 @@ type IPhoneValidationCapability = {
8
8
  isPossible(phone: string): boolean;
9
9
  isValid(phone: string, country: string): boolean;
10
10
  formatE164(phone: string, country: string): string | null;
11
+ /**
12
+ * The national significant number's digits (no calling code or trunk
13
+ * prefix), or `null` when the phone can't be parsed. It needn't be valid.
14
+ */
15
+ nationalNumber(phone: string, country: string): string | null;
11
16
  };
12
17
  //#endregion
13
18
  //#region src/modules/phone/types.d.ts
@@ -1,8 +1,10 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-Du2A4-Qr.esm.js";
2
- import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
3
- import { n as loadPhoneValidation, t as getPhoneValidation } from "./phoneValidation-DnBcNUNh.esm.js";
1
+ import { n as eventModuleNames } from "./types-DYYMdAGv.esm.js";
2
+ import { t as createManagerInstrumentation } from "./events-CP3yOzAl.esm.js";
3
+ import { n as loadPhoneValidation, t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
4
+ import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
5
+ import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
4
6
  import { n as isOtpComplete } from "./otp-D2k3PeSL.esm.js";
5
- import { t as phoneMachine } from "./phoneStateMachine-D2QWS2cu.esm.js";
7
+ import { t as phoneMachine } from "./phoneStateMachine-DKdY2Scx.esm.js";
6
8
  //#region src/modules/phone/phoneActor.ts
7
9
  function createPhoneActor(options) {
8
10
  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-CZpuJuZl.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 };