@incodetech/core 2.4.0 → 2.4.1-agentic.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
  2. package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-DN7NkJzV.esm.js} +7 -744
  3. package/dist/{FaceDetectionProvider-DcPOC2gS.esm.js → FaceDetectionProvider-CAY43vSI.esm.js} +28 -64
  4. package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
  5. package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
  6. package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-Cqiaxydi.d.ts} +31 -4
  7. package/dist/MultipartRecordingProvider-D9mauUdS.esm.js +146 -0
  8. package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
  9. package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-C3xNfOsv.d.ts} +12 -3
  10. package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
  11. package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-Dp2V-Uct.esm.js} +75 -22
  12. package/dist/WorkerEncoderRecordingProvider-B1ODYtgN.esm.js +80 -0
  13. package/dist/addressSearch-DzbE9Ogt.esm.js +254 -0
  14. package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-k-U-cL5m.esm.js} +1 -2
  15. package/dist/ae-signature.esm.js +1 -1
  16. package/dist/antifraud.esm.js +2 -2
  17. package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-BObuHBjn.esm.js} +2 -2
  18. package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-Dfrd2-26.esm.js} +1 -1
  19. package/dist/{api-Cz90EHyu.esm.js → api-CpP4PS4S.esm.js} +8 -5
  20. package/dist/{apiError-DPwFas2f.esm.js → apiError-DH-CH4Nz.esm.js} +1 -1
  21. package/dist/attemptCarry-WOkfvFMw.esm.js +45 -0
  22. package/dist/authentication.d.ts +3 -3
  23. package/dist/authentication.esm.js +2 -2
  24. package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-CWmh7aSY.d.ts} +1 -1
  25. package/dist/{authenticationManager-2Lr5V_7p.esm.js → authenticationManager-DjX0XDyH.esm.js} +5 -5
  26. package/dist/{authenticationStateMachine-C99B0GFP.esm.js → authenticationStateMachine-BMbZL8wm.esm.js} +3 -3
  27. package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
  28. package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-DS1oDiUq.esm.js} +12 -107
  29. package/dist/{browser-DlFgHpoC-DnyrCR8r.esm.js → browser-pQZA35G2-DtkAf6sn.esm.js} +161 -150
  30. package/dist/{camera-sIa9ceW2.esm.js → camera-E_Kcre4O.esm.js} +15 -23
  31. package/dist/camera.d.ts +2 -2
  32. package/dist/camera.esm.js +1 -1
  33. package/dist/certificate-issuance.esm.js +2 -2
  34. package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-C1nETQos.esm.js} +2 -2
  35. package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-DThXMDqr.esm.js} +2 -2
  36. package/dist/cnpj-Co1ottYN.esm.js +77 -0
  37. package/dist/connectivity-BCuEoQ-n.esm.js +114 -0
  38. package/dist/consent.d.ts +1 -1
  39. package/dist/consent.esm.js +2 -2
  40. package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-DMlSL6Ax.esm.js} +4 -3
  41. package/dist/{consentManager-Cv_0QKLD.d.ts → consentManager-bjfVXO7p.d.ts} +9 -2
  42. package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-DIYSMxKQ.esm.js} +20 -7
  43. package/dist/cross-document-data-match.esm.js +1 -1
  44. package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-BFTdiEDB.esm.js} +2 -2
  45. package/dist/curp-validation.d.ts +1 -1
  46. package/dist/curp-validation.esm.js +2 -2
  47. package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-DNpC3wyf.esm.js} +3 -2
  48. package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-z8428oCM.d.ts} +1 -1
  49. package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-B3iVsDyt.esm.js} +28 -20
  50. package/dist/custom-fields.esm.js +1 -1
  51. package/dist/custom-watchlist.esm.js +2 -2
  52. package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-CvI-pDT3.esm.js} +2 -2
  53. package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-BuHtUb0y.esm.js} +2 -2
  54. package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-CiVD9wyF.esm.js} +1 -1
  55. package/dist/{deepsightService-CKTYDIXD.esm.js → deepsightLoader-B7DEYoyY.esm.js} +40 -74
  56. package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-BGMtYwk3.esm.js} +177 -40
  57. package/dist/device.esm.js +2 -2
  58. package/dist/document-capture.d.ts +3 -3
  59. package/dist/document-capture.esm.js +2 -2
  60. package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-CD5iQiUI.d.ts} +37 -4
  61. package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-DLPqruXJ.esm.js} +27 -19
  62. package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-DCvWQhFG.esm.js} +105 -56
  63. package/dist/dynamic-forms.d.ts +2 -2
  64. package/dist/dynamic-forms.esm.js +2 -2
  65. package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-9kwY8Bf5.d.ts} +1 -1
  66. package/dist/{dynamicFormsManager-DiKYjcF3.esm.js → dynamicFormsManager-DfqCEPg9.esm.js} +2 -2
  67. package/dist/{dynamicFormsStateMachine-DEI45xYW.esm.js → dynamicFormsStateMachine-USQMB-uV.esm.js} +2 -2
  68. package/dist/ekyb.d.ts +4 -4
  69. package/dist/ekyb.esm.js +3 -3
  70. package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-BLOkwmWO.d.ts} +2 -2
  71. package/dist/{ekybManager-8WLkNcqg.esm.js → ekybManager-CR8YSYux.esm.js} +2 -2
  72. package/dist/{ekybStateMachine-BLRT45Ex.esm.js → ekybStateMachine-kHwdz6hm.esm.js} +28 -44
  73. package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
  74. package/dist/ekyc.d.ts +4 -3
  75. package/dist/ekyc.esm.js +3 -3
  76. package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-DlGIn9wA.d.ts} +2 -1
  77. package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-DymCvmVB.esm.js} +2 -2
  78. package/dist/ekycStateMachine-CoFCUJ2z.esm.js +7578 -0
  79. package/dist/ekycUtils-GRuMELYr.esm.js +1472 -0
  80. package/dist/electronic-signature.esm.js +1 -1
  81. package/dist/{electronicSignatureManager-CcIMOb_Y.esm.js → electronicSignatureManager-BCE3uA3z.esm.js} +4 -4
  82. package/dist/email.esm.js +2 -2
  83. package/dist/{emailManager-ButFktRm.esm.js → emailManager-CGoE3CUe.esm.js} +2 -2
  84. package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-KgHfDNvM.esm.js} +32 -20
  85. package/dist/{events-Du2A4-Qr.esm.js → events-ggpBBaZ8.esm.js} +2 -2
  86. package/dist/events.esm.js +1 -1
  87. package/dist/extensibility.d.ts +37 -22
  88. package/dist/extensibility.esm.js +36 -35
  89. package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-CQY41QT1.esm.js} +4 -1
  90. package/dist/face-match.d.ts +1 -1
  91. package/dist/face-match.esm.js +2 -2
  92. package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-DV2ULUYS.d.ts} +71 -66
  93. package/dist/{faceCaptureManagerFactory-BlGvXzXA.esm.js → faceCaptureManagerFactory-Dp90bedH.esm.js} +4 -4
  94. package/dist/{faceCaptureSetup-TY8RXc2N.esm.js → faceCaptureSetup-ZfiWg0fo.esm.js} +84 -457
  95. package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-D2xKPjjQ.esm.js} +2 -2
  96. package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-Z4UDLwAv.d.ts} +16 -7
  97. package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-CUvwiQi9.esm.js} +40 -27
  98. package/dist/{feature-management-B5rR10uS.esm.js → feature-management-BbCIA4og.esm.js} +35 -21
  99. package/dist/feature-management.esm.js +1 -1
  100. package/dist/field-comparison.esm.js +1 -1
  101. package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-DgDbEeFZ.esm.js} +2 -2
  102. package/dist/fiscal-qr.esm.js +1 -1
  103. package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-BZeklojR.esm.js} +4 -4
  104. package/dist/flow-events.d.ts +1 -1
  105. package/dist/flow.d.ts +10 -10
  106. package/dist/flow.esm.js +10 -9
  107. package/dist/{flowCompletionService-BDI5QpfR.esm.js → flowCompletionService-CcCnPs_T.esm.js} +2 -2
  108. package/dist/{flowServices-roD0oIQL.esm.js → flowServices-Dmnc8Rye.esm.js} +69 -185
  109. package/dist/geolocation.d.ts +1 -1
  110. package/dist/geolocation.esm.js +2 -2
  111. package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-6e1i9UIR.d.ts} +15 -17
  112. package/dist/{geolocationManager-DnONzWL5.esm.js → geolocationManager-BJJ3m_I8.esm.js} +6 -8
  113. package/dist/{geolocationStateMachine-eWy_G4Os.esm.js → geolocationStateMachine-CTI3m4Ie.esm.js} +12 -8
  114. package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-DoIWuKI8.esm.js} +1 -1
  115. package/dist/government-validation.esm.js +2 -2
  116. package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-CjChjZ3C.esm.js} +2 -2
  117. package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-AEbn3Afi.esm.js} +1 -1
  118. package/dist/home.d.ts +1 -1
  119. package/dist/home.esm.js +1 -1
  120. package/dist/http.esm.js +1 -1
  121. package/dist/id-ocr.d.ts +1 -1
  122. package/dist/id-ocr.esm.js +2 -2
  123. package/dist/id-selfie-flow.d.ts +1 -1
  124. package/dist/id-selfie-flow.esm.js +10 -9
  125. package/dist/id-verification.esm.js +2 -2
  126. package/dist/id.d.ts +3 -16
  127. package/dist/id.esm.js +4 -4
  128. package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-Dszuq9ng.esm.js} +3 -3
  129. package/dist/{idCaptureManager-BrfYjCm_.esm.js → idCaptureManager-B3oR4RnA.esm.js} +64 -17
  130. package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-CCA2D1Ah.d.ts} +68 -5
  131. package/dist/{idCaptureServices-BSj6EH2l.esm.js → idCaptureServices-DK0QboqT.esm.js} +29 -198
  132. package/dist/{idCaptureStateMachine-dXKBYHQp.esm.js → idCaptureStateMachine-zzar9MPy.esm.js} +914 -536
  133. package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-BTdHlJ9D.d.ts} +1 -1
  134. package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-xyEZNOBa.esm.js} +2 -2
  135. package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-DNKXh4Rn.esm.js} +2 -2
  136. package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-DdnvYfgN.esm.js} +2 -2
  137. package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-DtIBCa32.esm.js} +1 -1
  138. package/dist/identity-reuse.esm.js +2 -2
  139. package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-CcpovlfD.esm.js} +2 -2
  140. package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-DxZFWy47.esm.js} +1 -1
  141. package/dist/{index-CKQ9QBZP.d.ts → index-DC0P2Vzw.d.ts} +1 -1
  142. package/dist/{index-BKOWUhxG.d.ts → index-DEfwds5y.d.ts} +55 -8
  143. package/dist/index.d.ts +1 -1
  144. package/dist/index.esm.js +1 -1
  145. package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-BJ0GVHGr.esm.js} +1 -1
  146. package/dist/kyb-checks.d.ts +3 -0
  147. package/dist/kyb-checks.esm.js +3 -0
  148. package/dist/kybChecksManager-CblEL97E.d.ts +95 -0
  149. package/dist/kybChecksManager-DpGOp4Su.esm.js +89 -0
  150. package/dist/kybChecksStateMachine-B43NAnv7.esm.js +718 -0
  151. package/dist/mandatory-consent.d.ts +2 -2
  152. package/dist/mandatory-consent.esm.js +2 -2
  153. package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-B4vCYslr.esm.js} +4 -3
  154. package/dist/{mandatoryConsentManager-BQ43yndC.d.ts → mandatoryConsentManager-B88Sm5nd.d.ts} +10 -3
  155. package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-DWslYPA3.esm.js} +20 -7
  156. package/dist/mediaRecorderOptions-B9-IEVtV.esm.js +70 -0
  157. package/dist/multipartRecordingService-BTqkHGG9.esm.js +407 -0
  158. package/dist/nationalIds-B91f_RuB.esm.js +99 -0
  159. package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-DFV-Ws0a.esm.js} +1 -1
  160. package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-D190ATGD.esm.js} +11 -9
  161. package/dist/phone-number.d.ts +7 -1
  162. package/dist/phone-number.esm.js +15 -2
  163. package/dist/phone.d.ts +1 -1
  164. package/dist/phone.esm.js +2 -2
  165. package/dist/phoneFormat-JJNaWthV.esm.js +75 -0
  166. package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-6nrJkvkG.d.ts} +5 -0
  167. package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-Dy5tODCU.esm.js} +3 -3
  168. package/dist/phoneServices-DJgyOzU2.esm.js +77 -0
  169. package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-DnlPhnw7.esm.js} +54 -82
  170. package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
  171. package/dist/{platform-DkcRc9JV.esm.js → platform-aPh7gTWh.esm.js} +15 -1
  172. package/dist/processFaceMatch-Bst83HaS.esm.js +21 -0
  173. package/dist/qe-signature.esm.js +1 -1
  174. package/dist/recordingService-CTko6Cjn.esm.js +397 -0
  175. package/dist/redirect-to-mobile.d.ts +2 -2
  176. package/dist/redirect-to-mobile.esm.js +2 -2
  177. package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-CgGaT2NP.esm.js} +5 -4
  178. package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-Dm9ctRCC.d.ts} +3 -1
  179. package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-CbhN8uVN.esm.js} +65 -26
  180. package/dist/resolveForm-O7-r79VA.esm.js +351 -0
  181. package/dist/{runChildModule-BF_atgNx.esm.js → runChildModule-BffFArwl.esm.js} +3 -3
  182. package/dist/{sdkVersion-CsIbltJF.esm.js → sdkVersion-CDd_gaR7.esm.js} +1 -1
  183. package/dist/selfie.d.ts +4 -4
  184. package/dist/selfie.esm.js +10 -10
  185. package/dist/{selfieErrorUtils-BY0-YbPW.esm.js → selfieErrorUtils-f4MgAG2A.esm.js} +1 -1
  186. package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-DmZFzs1-.d.ts} +1 -1
  187. package/dist/{selfieManager-vAAwzsHk.esm.js → selfieManager-hopelYEk.esm.js} +5 -5
  188. package/dist/{selfieStateMachine-BFVp3ElQ.esm.js → selfieStateMachine-DaZIVv3Q.esm.js} +3 -3
  189. package/dist/{session-CpwfoVdH.esm.js → session-CdSX4wsZ.esm.js} +77 -9
  190. package/dist/session.d.ts +96 -10
  191. package/dist/session.esm.js +7 -6
  192. package/dist/{sessionInitializer-BTjYgE-V.esm.js → sessionInitializer-DsL7X2j9.esm.js} +465 -206
  193. package/dist/{setup-YPKTUCY5.d.ts → setup-D9qt8YVU.d.ts} +2 -2
  194. package/dist/{setup-BInNAvQw.esm.js → setup-DDahygZs.esm.js} +44 -30
  195. package/dist/signature.esm.js +2 -2
  196. package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-CwqjcxPg.esm.js} +2 -2
  197. package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-DBVDd1Eu.esm.js} +1 -1
  198. package/dist/{stats-BEvexnKC.esm.js → stats-CatA2dea.esm.js} +1 -1
  199. package/dist/stats.esm.js +1 -1
  200. package/dist/textRules-D4NRinKY.d.ts +41 -0
  201. package/dist/{tri-xzRLIIMN.esm.js → tri-DG6priFa.esm.js} +142 -8
  202. package/dist/tri.d.ts +1 -1
  203. package/dist/tri.esm-CzTNi5Q_.esm.js +3826 -0
  204. package/dist/tri.esm.js +1 -1
  205. package/dist/{trueSightService-BMT-TubT.esm.js → trueSightService-GuLthUVK.esm.js} +19 -10
  206. package/dist/trust-graph.esm.js +1 -1
  207. package/dist/types-B9C8W01q.d.ts +34 -0
  208. package/dist/{types-yPH8lAH-.d.ts → types-BEVHQbbC.d.ts} +2 -2
  209. package/dist/{types-BAxn7MpY.d.ts → types-BPm1JSu7.d.ts} +123 -48
  210. package/dist/{types-0L-eFDmr.d.ts → types-BgRHw-dR.d.ts} +1 -1
  211. package/dist/{types-B6HsSzpk.d.ts → types-CRaFu6wS.d.ts} +6 -3
  212. package/dist/types-CTaL0XJz.d.ts +80 -0
  213. package/dist/{types-Ckir_BEs.d.ts → types-Cd0J0F9D.d.ts} +1 -1
  214. package/dist/{types-CK8Jbjkp.d.ts → types-Csh8vzPo.d.ts} +1 -1
  215. package/dist/types-CuMJ2M7D.d.ts +210 -0
  216. package/dist/{types-DUnFZ08M.d.ts → types-CyNndVAT.d.ts} +16 -8
  217. package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
  218. package/dist/types-J6g6iKe_.d.ts +6 -0
  219. package/dist/{urlUtils-6jsE6rKp.esm.js → urlUtils-eYiyWjh0.esm.js} +4 -1
  220. package/dist/video-selfie.d.ts +8 -8
  221. package/dist/video-selfie.esm.js +97 -22
  222. package/dist/{videoSelfieCameraWarmer-D1xA0u8y.esm.js → videoSelfieCameraWarmer-e3irGfcO.esm.js} +18 -21
  223. package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-Dv3Mgws-.d.ts} +9 -4
  224. package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
  225. package/dist/{warmup-BElYWRh7.esm.js → warmup-DtB0DJpl.esm.js} +198 -27
  226. package/dist/wasm.d.ts +2 -2
  227. package/dist/wasm.esm.js +3 -3
  228. package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-BtiR5pig.esm.js} +1 -1
  229. package/dist/wasmMetadataVersionSync-U8EFUr1T.esm.js +27 -0
  230. package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-BDrax6Eu.esm.js} +55 -26
  231. package/dist/watchlist-for-business.d.ts +2 -1
  232. package/dist/watchlist-for-business.esm.js +2 -2
  233. package/dist/watchlist.esm.js +2 -2
  234. package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-DX2AyM4Y.d.ts} +54 -18
  235. package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-DqUpAEj_.esm.js} +37 -7
  236. package/dist/watchlistForBusinessStateMachine-DdaPl2PS.esm.js +166 -0
  237. package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-CdpXzT4B.esm.js} +2 -2
  238. package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-ofHW_lPk.esm.js} +1 -1
  239. package/dist/workflow.d.ts +5 -2
  240. package/dist/workflow.esm.js +60 -50
  241. package/package.json +12 -5
  242. package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
  243. package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
  244. package/dist/deepsightLoader-DeNvGU3c.esm.js +0 -55
  245. package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
  246. package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
  247. package/dist/thumbmark.esm-CRc0cYvz.esm.js +0 -1242
  248. package/dist/tri.esm-BIjHhBJ2.esm.js +0 -2620
  249. package/dist/types-BvLo3U4u.d.ts +0 -134
  250. package/dist/types-zOgZqMni.d.ts +0 -6
  251. package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
  252. /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
@@ -1,14 +1,14 @@
1
- import { t as api, u as endpoints } from "./api-Cz90EHyu.esm.js";
1
+ import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
2
2
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
3
- import { d as facingModeForStep, f as resolveVideoSelfieSteps } from "./flowServices-roD0oIQL.esm.js";
4
- import { a as requestCameraWithFallback, i as requestCameraAccess } from "./camera-sIa9ceW2.esm.js";
5
- import { t as checkPermission } from "./permissionServices-Ca-tSNhT.esm.js";
6
- import { c as processFace, d as FACE_ERROR_CODES, l as uploadSelfie, n as encryptSelfieImage, o as startDetection, t as FaceDetectionProvider } from "./FaceDetectionProvider-DcPOC2gS.esm.js";
7
- import { o as StreamCanvasProcessingSession } from "./multipartRecordingService-CLwrF5wD.esm.js";
8
- import { n as getBackCameraStream } from "./backCameraStream-CMvXj4X4.esm.js";
3
+ import { f as facingModeForStep, p as resolveVideoSelfieSteps } from "./flowServices-Dmnc8Rye.esm.js";
4
+ import { i as requestCameraWithFallback, r as requestCameraAccess } from "./camera-E_Kcre4O.esm.js";
5
+ import { t as checkPermission } from "./permissionServices-D190ATGD.esm.js";
6
+ import { c as uploadSelfie, n as encryptSelfieImage, o as startDetection, s as processFace, t as FaceDetectionProvider, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-CAY43vSI.esm.js";
7
+ import { t as StreamCanvasProcessingSession } from "./StreamCanvasProcessingSession-CBnbTnOr.esm.js";
8
+ import { n as getBackCameraStream } from "./backCameraStream-DS1oDiUq.esm.js";
9
9
  import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
10
- import { t as getFaceErrorCodeFromUnknown } from "./selfieErrorUtils-BY0-YbPW.esm.js";
11
- import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-BGsG2OAs.esm.js";
10
+ import { t as getFaceErrorCodeFromUnknown } from "./selfieErrorUtils-f4MgAG2A.esm.js";
11
+ import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-Dszuq9ng.esm.js";
12
12
  import { t as StreamCanvasCapture } from "./StreamCanvasCapture-C9jtgBdT.esm.js";
13
13
  //#region src/modules/video-selfie/videoSelfieCompareService.ts
14
14
  async function postVideoSelfieCompare(endpoint, base64Image) {
@@ -23,6 +23,14 @@ const compareVideoSelfieBackId = (base64Image) => postVideoSelfieCompare(endpoin
23
23
  /** Compare OCR from a back-ID frame against the captured ID's OCR. */
24
24
  const compareVideoSelfieBackOcr = (base64Image) => postVideoSelfieCompare(endpoints.videoSelfieCompareBackOcr, base64Image);
25
25
  //#endregion
26
+ //#region src/modules/video-selfie/videoSelfieErrors.ts
27
+ /** HTTP transport failures, rather than backend validation verdicts. */
28
+ function isConnectionError(error) {
29
+ if (typeof error !== "object" || error === null || !("status" in error)) return false;
30
+ const status = error.status;
31
+ return typeof status === "number" && (status === 0 || status === 408 || status === 429 || status >= 500);
32
+ }
33
+ //#endregion
26
34
  //#region src/modules/video-selfie/videoSelfieStepDetector.ts
27
35
  /** Default autocapture window for the selfie step when the config omits one. */
28
36
  const SELFIE_AUTOCAPTURE_MS = 1e4;
@@ -95,17 +103,6 @@ function isSelfieValidationError(error) {
95
103
  const SELFIE_SUBMIT_ATTEMPTS = 3;
96
104
  const SELFIE_SUBMIT_BACKOFF_MS = 2e3;
97
105
  /**
98
- * True for HTTP-transport-shaped failures — network error / client-side
99
- * timeout (status 0), 408, 429, 5xx — as opposed to a backend verdict.
100
- * Plain Errors (aborts, programming faults) are not connection errors.
101
- */
102
- function isConnectionError(error) {
103
- if (typeof error !== "object" || error === null || !("status" in error)) return false;
104
- const status = error.status;
105
- if (typeof status !== "number") return false;
106
- return status === 0 || status === 408 || status === 429 || status >= 500;
107
- }
108
- /**
109
106
  * True for errors where the selfie submission never got a meaningful backend
110
107
  * verdict, as opposed to a validation outcome. Re-sending the same payload
111
108
  * can succeed, so these are retried in place instead of failing the whole
@@ -508,4 +505,4 @@ function createVideoSelfieCameraWarmer(config, steps = resolveVideoSelfieSteps(c
508
505
  };
509
506
  }
510
507
  //#endregion
511
- export { isConnectionError as a, delay as i, defaultAcquireCamera as n, isSelfieValidationError as o, createDefaultStepDetector as r, isWrongVideoSelfieIdSide as s, createVideoSelfieCameraWarmer as t };
508
+ export { isSelfieValidationError as a, delay as i, defaultAcquireCamera as n, isWrongVideoSelfieIdSide as o, createDefaultStepDetector as r, isConnectionError as s, createVideoSelfieCameraWarmer as t };
@@ -1,6 +1,6 @@
1
- import { i as FlowModuleConfig } from "./types-B6HsSzpk.js";
2
- import "./IWasmUtilCapability-GF2n7sfm.js";
3
- import { n as DetectionStatus } from "./types-yPH8lAH-.js";
1
+ import { i as FlowModuleConfig } from "./types-CRaFu6wS.js";
2
+ import "./IWasmUtilCapability-Cqiaxydi.js";
3
+ import { n as DetectionStatus } from "./types-BEVHQbbC.js";
4
4
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
5
5
  import { t as DetectionOrientation } from "./IIdCaptureCapability-CGcEt2Cw.js";
6
6
  //#region src/modules/video-selfie/types.d.ts
@@ -10,6 +10,11 @@ import { t as DetectionOrientation } from "./IIdCaptureCapability-CGcEt2Cw.js";
10
10
  * `frontId`/`backId`, `checkVoiceConsent` enables `speech`).
11
11
  */
12
12
  type VideoSelfieStep = 'selfie' | 'frontId' | 'backId' | 'poa' | 'questions' | 'speech';
13
+ /** Speech validation verdict, or a failure to obtain a verdict. */
14
+ type VideoSelfieSpeechResult = {
15
+ success: boolean;
16
+ errorKind?: 'connection' | 'technical';
17
+ };
13
18
  /**
14
19
  * Public Video Selfie configuration. Mirrors the backend `VIDEO_ONBOARDING`
15
20
  * workflow module.
@@ -215,4 +220,4 @@ type StepDetector = (params: {
215
220
  registerManualCapture?: (trigger: () => void) => void;
216
221
  }) => Promise<StepDetectionResult>;
217
222
  //#endregion
218
- export { FacingMode as a, CameraCompositor as i, VideoSelfieDetectionStatus as n, VideoSelfieConfig as o, VideoSelfieValidationFailure as r, VideoSelfieStep as s, StepDetector as t };
223
+ export { FacingMode as a, VideoSelfieStep as c, CameraCompositor as i, VideoSelfieDetectionStatus as n, VideoSelfieConfig as o, VideoSelfieValidationFailure as r, VideoSelfieSpeechResult as s, StepDetector as t };
@@ -0,0 +1,27 @@
1
+ //#region src/internal/virtualCameraCheck.ts
2
+ const frameSources = {
3
+ front: "FRONT_ID",
4
+ back: "BACK_ID",
5
+ selfie: "SELFIE"
6
+ };
7
+ /**
8
+ * Runs the native post-capture check (`poc`).
9
+ *
10
+ * Since ml-wasm-kit v2.14.53 (ADR 0008, single-run IAD) the binding keeps its
11
+ * output argument for arity but never writes into it: the post-capture
12
+ * verdicts travel only inside the signed capture metadata that the protected
13
+ * upload carries. The JavaScript verdict this function used to derive from
14
+ * that output — the `/omni/log/frame/v2` frame upload, the
15
+ * `virtualCameraDetected` device stat and `setZc` — is gone with it (the same
16
+ * removal ms-incodesmile-web made in ENG-58409). The name is kept so the
17
+ * protected attempts' POC step reads the same.
18
+ */
19
+ async function runVirtualCameraCheck({ wasmUtil }) {
20
+ await wasmUtil.poc({
21
+ canvas: null,
22
+ itr: null,
23
+ skipped: null
24
+ });
25
+ }
26
+ //#endregion
27
+ export { runVirtualCameraCheck as n, frameSources as t };
@@ -1,5 +1,7 @@
1
- import { A as buildModelVariantSources, C as isDefaultCdnWasmConfig, D as WASM_PIPELINE_MODELS, M as resolveWasmSource, N as reportWasmIntegritySummary, T as WASM_MODEL_FILES, f as rearmWasmCallDiagnostics, g as emitWasmDiagnostic, h as acquireWasmStorageFallback, j as missingWasmModelError, k as WASM_PIPELINE_OPTIONAL_MODEL_NAMES, l as notePipelineStatePulled, m as loadWasmModule, n as createWebApiHostAdapter, p as resetWasmCallDiagnostics, v as SemaphoreProvider, y as DEFAULT_WASM_VERSION } from "./wasmWebClient-BjZw_7OB.esm.js";
2
- import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
1
+ import { n as __exportAll } from "./rolldown-runtime-B-1-B7_t.esm.js";
2
+ import { A as WASM_PIPELINE_OPTIONAL_MODEL_NAMES, E as WASM_MODEL_FILES, M as missingWasmModelError, N as resolveWasmSource, O as WASM_PIPELINE_MODELS, P as reportWasmIntegritySummary, _ as emitWasmDiagnostic, b as DEFAULT_WASM_VERSION, c as wasmCallWrapper, f as rearmWasmCallDiagnostics, h as acquireWasmStorageFallback, j as buildModelVariantSources, l as notePipelineStatePulled, m as loadWasmModule, n as createWebApiHostAdapter, p as resetWasmCallDiagnostics, w as isDefaultCdnWasmConfig, y as SemaphoreProvider } from "./wasmWebClient-BDrax6Eu.esm.js";
3
+ import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
4
+ import { t as bindWasmMetadataV2Applier } from "./wasmMetadataVersionSync-U8EFUr1T.esm.js";
3
5
  //#region ../infra/src/wasm/wasmEnumMaps.ts
4
6
  function pipelineTypeToWasmEnum(wasmModule, type) {
5
7
  switch (type) {
@@ -63,11 +65,11 @@ function idCaptureModelTypeFromWasmEnum(wasmModule, type) {
63
65
  * The mode is a property of the binary, detected at install:
64
66
  * - `sink` — `setDiagnosticsSink` exists (v2.14.52+): batches are pushed,
65
67
  * and finalize drains the unsent tail via `drainDiagnostics`.
66
- * - `fallback` — only `getAppLogs` exists (the pinned v2.14.50-post1): the
68
+ * - `fallback` — only `getAppLogs` exists (binaries before v2.14.52): the
67
69
  * plain-text `ClientLogger::render()` grammar (optional leading
68
70
  * `... <k> dropped`, then `+<elapsedMs> <E|W|I> <tag>: <msg>[ (xN)]`) is
69
- * parsed at finalize. Nothing in v2.14.50-post1 writes that logger, so in
70
- * practice it is empty until the bump.
71
+ * parsed at finalize. Nothing before v2.14.52 writes that logger, so in
72
+ * practice it is empty on those binaries.
71
73
  * - `none` — neither binding.
72
74
  * No TrueSight change is needed when `DEFAULT_WASM_VERSION` moves past the
73
75
  * sensor release: the next install simply detects `sink`.
@@ -395,6 +397,45 @@ function deleteWasmHandle(firstFailure, handle) {
395
397
  function releaseCameraCycleResources(stream, cameraCycleApi) {
396
398
  return attemptCleanup(stopStreamTracks(stream), () => cameraCycleApi?.rcc());
397
399
  }
400
+ /**
401
+ * Wraps one host callback of the camera step. The kit calls the outcome
402
+ * callbacks from inside the `cst` binding and the frame callbacks from its own
403
+ * 16 ms frame timer. A JavaScript throw out of either cannot be caught in C++,
404
+ * so the host's error becomes a diagnostic instead. Only the first throw per
405
+ * callback per step is reported, so a failing frame callback cannot flood
406
+ * TrueSight. An absent optional callback becomes a no-op, because the binding
407
+ * expects four functions and logs `cc: bad callback` otherwise.
408
+ */
409
+ function guardCameraCycleCallback(name, callback) {
410
+ let reported = false;
411
+ return (...args) => {
412
+ if (callback === void 0) return;
413
+ try {
414
+ callback(...args);
415
+ } catch (error) {
416
+ if (reported) return;
417
+ reported = true;
418
+ emitWasmDiagnostic({
419
+ level: "warning",
420
+ subsystem: "camera",
421
+ category: "other",
422
+ message: `camera cycle ${name} host callback threw: ${error instanceof Error ? error.message : String(error)}`
423
+ });
424
+ }
425
+ };
426
+ }
427
+ /**
428
+ * The native release runs behind the ML lock, after the caller returned, so its
429
+ * failure can only be reported, never thrown.
430
+ */
431
+ function reportCameraCycleReleaseFailure(error) {
432
+ emitWasmDiagnostic({
433
+ level: "warning",
434
+ subsystem: "camera",
435
+ category: "other",
436
+ message: `camera cycle release failed: ${error instanceof Error ? error.message : String(error)}`
437
+ });
438
+ }
398
439
  function isWasmModelEntry(source) {
399
440
  return typeof source === "object" && !(source instanceof ArrayBuffer) && !(source instanceof Uint8Array) && "file" in source;
400
441
  }
@@ -412,8 +453,10 @@ var WasmRuntime = class WasmRuntime {
412
453
  this.faceProcessingWasmApi = null;
413
454
  this.cameraCycleApi = null;
414
455
  this.webApi = null;
456
+ this.metadataV2Enabled_ = false;
415
457
  this.storageFallbackLease = null;
416
458
  this.unprotectedStream = null;
459
+ this.queuedCameraSteps = /* @__PURE__ */ new Set();
417
460
  this.imageWidth_ = null;
418
461
  this.imageHeight_ = null;
419
462
  this.pipelines_ = null;
@@ -432,6 +475,7 @@ var WasmRuntime = class WasmRuntime {
432
475
  this.workflowApiUtilities = new this.wasmModule.WorkflowApiUtilities();
433
476
  this.utilityApi = new this.wasmModule.UtilityApi();
434
477
  this.utilityApi.setProductionMode(module.showLogs !== true);
478
+ this.utilityApi.smv(this.metadataV2Enabled_);
435
479
  installWasmDiagnosticsSink(this.utilityApi);
436
480
  this.idCaptureWasmApi = new this.wasmModule.IdCaptureApi();
437
481
  this.faceProcessingWasmApi = new this.wasmModule.FaceProcessingApi();
@@ -519,6 +563,7 @@ var WasmRuntime = class WasmRuntime {
519
563
  if (typeof window !== "undefined") window.wasmArrayBuffer = null;
520
564
  resetWasmCallDiagnostics();
521
565
  resetWasmDiagnosticsSink();
566
+ this.cancelQueuedCameraSteps();
522
567
  let firstFailure = releaseCameraCycleResources(stream, cameraCycleApi);
523
568
  firstFailure = deleteWasmHandle(firstFailure, modelsBuffers);
524
569
  firstFailure = deleteWasmHandle(firstFailure, workflowApiUtilities);
@@ -544,6 +589,21 @@ var WasmRuntime = class WasmRuntime {
544
589
  if (!this.isInitialized() || pipelines === null) throw new Error("Unable to reset pipelines, cpp API hasn't been initialized");
545
590
  for (const [type] of pipelines) this.resetPipeline(type);
546
591
  }
592
+ /**
593
+ * Selects the capture-metadata document the kit emits (`smv`, ADR 0009):
594
+ * `true` = v2, `false` = v1 (the default). Unguarded on purpose: the SDK
595
+ * resolves the provisioning flag at session initialization, which may run
596
+ * before WASM is up, so the value is latched here, applied at once when a
597
+ * module is live and replayed by every `initialize()`. The session sets it
598
+ * through `wasmMetadataVersionSync.ts`, which the singleton binds to when
599
+ * this module loads. Never toggle it mid-session — `getMetadata`,
600
+ * `postFaceResults` and the protected upload each read the selection when
601
+ * they run, so uploads would mix formats.
602
+ */
603
+ setMetadataV2Enabled(enabled) {
604
+ this.metadataV2Enabled_ = enabled;
605
+ this.utilityApi?.smv(enabled);
606
+ }
547
607
  async process(typeOrImage, imageOrType) {
548
608
  const legacyOrder = typeof typeOrImage !== "number";
549
609
  const type = legacyOrder ? typeof imageOrType === "number" ? imageOrType : void 0 : typeOrImage;
@@ -577,25 +637,32 @@ var WasmRuntime = class WasmRuntime {
577
637
  let cleanupFailure = null;
578
638
  try {
579
639
  if (pipelines === null) throw new Error(message);
580
- for (const [type, modelsPaths] of pipelines) {
640
+ const downloads = /* @__PURE__ */ new Map();
641
+ const loadModel = (path) => {
642
+ const resolvedSource = this.resolveModelSource(isWasmModelEntry(path) ? path.source : path);
643
+ const loaded = this.loadedModels.get(resolvedSource);
644
+ if (loaded) return Promise.resolve(loaded);
645
+ let download = downloads.get(resolvedSource);
646
+ if (!download) {
647
+ download = resolveWasmSource(resolvedSource, {
648
+ kind: "model",
649
+ file: isWasmModelEntry(path) ? path.file : void 0
650
+ }).then((model) => {
651
+ this.loadedModels.set(resolvedSource, model);
652
+ return model;
653
+ });
654
+ downloads.set(resolvedSource, download);
655
+ }
656
+ return download;
657
+ };
658
+ const pipelineModels = await Promise.all(Array.from(pipelines, async ([type, modelsPaths]) => {
659
+ return [type, await Promise.all(modelsPaths.map(loadModel))];
660
+ }));
661
+ for (const [type, pipelineBuffers] of pipelineModels) {
581
662
  const wasmType = this.pipelineTypeToWasmEnum(type);
582
- const pipelineBuffers = [];
583
663
  const sizes = new (this.requireWasmModule(message)).VectorInt();
584
664
  sizeVectors.push(sizes);
585
- for (const path of modelsPaths) {
586
- const file = isWasmModelEntry(path) ? path.file : void 0;
587
- const resolvedSource = this.resolveModelSource(isWasmModelEntry(path) ? path.source : path);
588
- let model = this.loadedModels.get(resolvedSource);
589
- if (!model) {
590
- model = await resolveWasmSource(resolvedSource, {
591
- kind: "model",
592
- file
593
- });
594
- this.loadedModels.set(resolvedSource, model);
595
- }
596
- sizes.push_back(model.byteLength);
597
- pipelineBuffers.push(model);
598
- }
665
+ for (const model of pipelineBuffers) sizes.push_back(model.byteLength);
599
666
  buffSizes.set(wasmType, sizes);
600
667
  modelData.set(wasmType, pipelineBuffers);
601
668
  }
@@ -641,8 +708,55 @@ var WasmRuntime = class WasmRuntime {
641
708
  return this.pipelineTypeFromWasmEnum(workflowApiUtilities.getCurrentWorkflow());
642
709
  }
643
710
  setOnDeviceMode(_enabled) {}
644
- adoptCameraStream(stream, constraints, options = {}) {
645
- return this.requireCameraCycleApi("Unable to adopt stream, cpp API hasn't been initialized").ads(stream, constraints, options);
711
+ /**
712
+ * Runs ml-wasm-kit's camera step: the kit acquires the camera (electing the
713
+ * lens from `options`), adopts the stream into the protected cycle, runs the
714
+ * pre-capture checks and reports through `callbacks`. Mirrors upstream
715
+ * `startCameraCycle` (`wasmApi.ts`): poll `cst` with a release token under
716
+ * the ML semaphore. The pre-capture IAD inside the step is the work `prc`
717
+ * used to do, and holding the lock keeps `poc`/`rsp` serialized behind it.
718
+ *
719
+ * Two differences from upstream serve the release rule of
720
+ * {@link releaseCameraCycle}. The token (`grt()`) is read on the first poll,
721
+ * inside the lock, rather than before queueing: a release queued ahead of
722
+ * this step has then already rotated it, so the step never polls with a
723
+ * token its predecessor's `rcc` voided. And a step released while it still
724
+ * waits for the lock ends without calling `cst`, so a released attempt never
725
+ * opens the camera.
726
+ *
727
+ * Resolves when the step is done: ready or failed through the callbacks, or
728
+ * skipped because the cycle was released before the step reached the kit,
729
+ * in which case neither callback fires. Rejects when the handle is freed
730
+ * mid-step, or when the kit throws outside its own state machine (`cst` is
731
+ * bound without the exception wrapper on purpose). A re-initialization
732
+ * between two polls can also end the step without an outcome, because the
733
+ * new handle refuses the old token.
734
+ */
735
+ async startCameraCycle(options, callbacks) {
736
+ const message = "Unable to start the camera cycle, cpp API hasn't been initialized";
737
+ this.requireCameraCycleApi(message);
738
+ const queued = { cancelled: false };
739
+ this.queuedCameraSteps.add(queued);
740
+ const onNewFrame = guardCameraCycleCallback("onNewFrame", callbacks.onNewFrame);
741
+ const onFirstFrame = guardCameraCycleCallback("onFirstFrame", callbacks.onFirstFrame);
742
+ const onCameraReady = guardCameraCycleCallback("onCameraReady", callbacks.onCameraReady);
743
+ const onCameraFailed = guardCameraCycleCallback("onCameraFailed", callbacks.onCameraFailed);
744
+ let releaseToken;
745
+ let reachedKit = false;
746
+ try {
747
+ await wasmCallWrapper(this.mlCallSemaphore, () => {
748
+ const api = this.requireCameraCycleApi(message);
749
+ if (!reachedKit) {
750
+ this.queuedCameraSteps.delete(queued);
751
+ if (queued.cancelled) return true;
752
+ reachedKit = true;
753
+ releaseToken = api.grt();
754
+ }
755
+ return api.cst(options, onNewFrame, onFirstFrame, onCameraReady, onCameraFailed, releaseToken);
756
+ }, true, { label: "cst" });
757
+ } finally {
758
+ this.queuedCameraSteps.delete(queued);
759
+ }
646
760
  }
647
761
  setWorkflowConsuming(type, consuming) {
648
762
  const accepted = this.requireWorkflowApiUtilities("Unable to set workflow consuming, cpp API hasn't been initialized").setWorkflowConsuming(this.pipelineTypeToWasmEnum(type), consuming);
@@ -676,11 +790,42 @@ var WasmRuntime = class WasmRuntime {
676
790
  const extras = "extras" in request ? request.extras : {};
677
791
  return this.requireWebApi("Unable to post protected request, cpp API hasn't been initialized").pse(request.target, extras, request.config ?? {});
678
792
  }
793
+ /**
794
+ * Releases the protected camera cycle. The cached display clone stops at
795
+ * once. The native release (`rcc`) queues behind the ML lock, so it lands
796
+ * only after whatever holds the lock settles: a camera step that already
797
+ * reached the kit, or a `poc`. Cancelling the kit inside its pre-capture
798
+ * checks leaves the realm unable to run another camera step (ml-wasm-kit
799
+ * known issue `active-iad-driver-teardown`), and SDK 1 runs `rcc` under the
800
+ * same lock. Steps still waiting for the lock are skipped and never reach
801
+ * the kit.
802
+ *
803
+ * The cost is that a release cannot cancel a step that is already inside the
804
+ * kit. A step parked on a permission prompt or a hidden tab keeps the camera
805
+ * cycle until it settles, and a release queued behind it for 30 s trips the
806
+ * semaphore's deadlock watchdog log.
807
+ *
808
+ * Stopping the display clone can throw synchronously. A failing `rcc` cannot
809
+ * reach the caller any more, so it is reported as a diagnostic.
810
+ */
679
811
  releaseCameraCycle() {
680
812
  const stream = this.unprotectedStream;
681
813
  this.unprotectedStream = null;
682
- const firstFailure = releaseCameraCycleResources(stream, this.cameraCycleApi);
683
- if (firstFailure) throw firstFailure.error;
814
+ this.cancelQueuedCameraSteps();
815
+ wasmCallWrapper(this.mlCallSemaphore, () => {
816
+ try {
817
+ this.cameraCycleApi?.rcc();
818
+ } catch (error) {
819
+ reportCameraCycleReleaseFailure(error);
820
+ }
821
+ return true;
822
+ }, true, { label: "rcc" }).catch(reportCameraCycleReleaseFailure);
823
+ const failure = stopStreamTracks(stream);
824
+ if (failure) throw failure.error;
825
+ }
826
+ cancelQueuedCameraSteps() {
827
+ for (const queued of this.queuedCameraSteps) queued.cancelled = true;
828
+ this.queuedCameraSteps.clear();
684
829
  }
685
830
  resolveModelSource(source) {
686
831
  if (typeof source === "object" && !(source instanceof ArrayBuffer) && !(source instanceof Uint8Array)) return this.usedSimd_ ? source.current : source.legacy;
@@ -750,8 +895,21 @@ var WasmRuntime = class WasmRuntime {
750
895
  WasmRuntime.UNINITIALIZED_ENUM_MAP_MESSAGE = "Unable to map pipeline type, cpp API hasn't been initialized";
751
896
  /** Process-wide runtime. One binary, one heap, one owner. */
752
897
  const wasmRuntime = new WasmRuntime();
898
+ bindWasmMetadataV2Applier((enabled) => wasmRuntime.setMetadataV2Enabled(enabled));
753
899
  //#endregion
754
900
  //#region ../infra/src/wasm/warmup.ts
901
+ var warmup_exports = /* @__PURE__ */ __exportAll({
902
+ WASM_PIPELINES: () => WASM_PIPELINES,
903
+ getResolvedModelSource: () => getResolvedModelSource,
904
+ getResolvedModelsBasePath: () => getResolvedModelsBasePath,
905
+ getWarmupFacts: () => getWarmupFacts,
906
+ getWasmStatus: () => getWasmStatus,
907
+ isWasmReady: () => isWasmReady,
908
+ setWasmOnDeviceMode: () => setWasmOnDeviceMode,
909
+ waitForWasm: () => waitForWasm,
910
+ warmupWasm: () => warmupWasm,
911
+ whenWasmRuntimeReady: () => whenWasmRuntimeReady
912
+ });
755
913
  /**
756
914
  * Pipelines preloaded when no explicit `pipelines` array is passed to
757
915
  * {@link warmupWasm}. The on-device selfie bundle is opt-in (loaded only when
@@ -767,6 +925,7 @@ let lastConfig = null;
767
925
  let lastModelVariant = null;
768
926
  let warmupFacts = null;
769
927
  let pipelinesInFlight = [];
928
+ let runtimeReadyPromise = null;
770
929
  function mapPipelineToWasmType(pipeline) {
771
930
  switch (pipeline) {
772
931
  case "selfie": return 4;
@@ -968,10 +1127,13 @@ async function warmupWasm(config) {
968
1127
  try {
969
1128
  const pipelinesMap = buildPipelinesMap(pipelines, config);
970
1129
  if (config.onDeviceMode !== void 0) wasmRuntime.setOnDeviceMode(config.onDeviceMode);
971
- const simdUsed = await wasmRuntime.initialize({
1130
+ const runtimeReady = wasmRuntime.initialize({
972
1131
  module: config,
973
1132
  pipelines: pipelinesMap
974
1133
  });
1134
+ runtimeReadyPromise = runtimeReady.then(() => void 0);
1135
+ runtimeReadyPromise.catch(() => void 0);
1136
+ const simdUsed = await runtimeReady;
975
1137
  await wasmRuntime.loadModels();
976
1138
  await wasmRuntime.initializePipelines();
977
1139
  state = "ready";
@@ -1045,6 +1207,15 @@ function waitForWasm() {
1045
1207
  return Promise.reject(/* @__PURE__ */ new Error("WASM warmup was not started. Call warmupWasm() first."));
1046
1208
  }
1047
1209
  /**
1210
+ * Resolves once the WASM runtime is up, before the models of the warmup that
1211
+ * started it finish loading: enough for the utility API (fingerprint signals).
1212
+ * Rejects when no warmup was started or the runtime failed to start.
1213
+ */
1214
+ function whenWasmRuntimeReady() {
1215
+ if (wasmRuntime.isInitialized()) return Promise.resolve();
1216
+ return runtimeReadyPromise ?? Promise.reject(/* @__PURE__ */ new Error("WASM warmup was not started. Call warmupWasm() first."));
1217
+ }
1218
+ /**
1048
1219
  * Retained compatibility surface for callers that used the removed native
1049
1220
  * on-device-mode setter. Both values are native-free no-ops for the pinned
1050
1221
  * runtime and do not alter initialization, capture, or fingerprint lifecycle.
@@ -1053,4 +1224,4 @@ function setWasmOnDeviceMode(enabled) {
1053
1224
  wasmRuntime.setOnDeviceMode(enabled);
1054
1225
  }
1055
1226
  //#endregion
1056
- export { setWasmOnDeviceMode as a, wasmRuntime as c, drainWasmDiagnostics as d, getWasmDiagnosticsMode as f, isWasmReady as i, CAMERA_CYCLE_OWNERSHIP_DOMAIN as l, getWarmupFacts as n, waitForWasm as o, rearmWasmDiagnostics as p, getWasmStatus as r, warmupWasm as s, getResolvedModelSource as t, getCameraCycleOwnershipDomain as u };
1227
+ export { setWasmOnDeviceMode as a, warmup_exports as c, getCameraCycleOwnershipDomain as d, drainWasmDiagnostics as f, isWasmReady as i, wasmRuntime as l, rearmWasmDiagnostics as m, getWarmupFacts as n, waitForWasm as o, getWasmDiagnosticsMode as p, getWasmStatus as r, warmupWasm as s, getResolvedModelSource as t, CAMERA_CYCLE_OWNERSHIP_DOMAIN as u };
package/dist/wasm.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { a as WASM_MODEL_FILES, c as WasmPipeline, l as WasmSource, o as WasmGlueLoader, r as warmupWasm, s as WasmModelName, t as WarmupConfig } from "./warmup-BO57syF6.js";
2
- import { c as setWasmConfig, i as initializeWasmUtil, n as WasmConfig, r as ensureWasmPipelines, s as resolveWasmConfigForPipelines, u as upgradeToWasmHttpClient } from "./setup-YPKTUCY5.js";
2
+ import { c as setWasmConfig, i as initializeWasmUtil, n as WasmConfig, r as ensureWasmPipelines, s as resolveWasmConfigForPipelines, u as upgradeToWasmHttpClient } from "./setup-D9qt8YVU.js";
3
3
  //#region ../infra/src/wasm/wasmDefaults.d.ts
4
4
  /** The WASM version bundled and tested with this SDK release. */
5
- declare const DEFAULT_WASM_VERSION = "v2.14.50-post1";
5
+ declare const DEFAULT_WASM_VERSION = "v2.14.54-pre6";
6
6
  type UrlWasmConfig = WarmupConfig & {
7
7
  wasmPath: string;
8
8
  wasmSimdPath: string;
package/dist/wasm.esm.js CHANGED
@@ -1,6 +1,6 @@
1
- import { E as WASM_PIPELINE_LAZY_MODEL_NAMES, O as WASM_PIPELINE_MODEL_NAMES, T as WASM_MODEL_FILES, b as buildDefaultWasmConfig, w as resolveWasmConfig, x as buildWasmConfigFromBasePath, y as DEFAULT_WASM_VERSION } from "./wasmWebClient-BjZw_7OB.esm.js";
2
- import { s as warmupWasm } from "./warmup-BElYWRh7.esm.js";
3
- import { a as resolveWasmConfigForPipelines, c as upgradeToWasmHttpClient, n as initializeWasmUtil, o as setWasmConfig, t as ensureWasmPipelines } from "./setup-BInNAvQw.esm.js";
1
+ import { D as WASM_PIPELINE_LAZY_MODEL_NAMES, E as WASM_MODEL_FILES, S as buildWasmConfigFromBasePath, T as resolveWasmConfig, b as DEFAULT_WASM_VERSION, k as WASM_PIPELINE_MODEL_NAMES, x as buildDefaultWasmConfig } from "./wasmWebClient-BDrax6Eu.esm.js";
2
+ import { s as warmupWasm } from "./warmup-DtB0DJpl.esm.js";
3
+ import { a as resolveWasmConfigForPipelines, c as upgradeToWasmHttpClient, n as initializeWasmUtil, o as setWasmConfig, t as ensureWasmPipelines } from "./setup-DDahygZs.esm.js";
4
4
  //#region src/defineWasm.ts
5
5
  function requiredModels(pipelines) {
6
6
  const models = /* @__PURE__ */ new Set();
@@ -1,4 +1,4 @@
1
- import { i as utilityWasmApi } from "./WasmUtilProvider-DtJuBdt-.esm.js";
1
+ import { i as utilityWasmApi } from "./WasmUtilProvider-Dp2V-Uct.esm.js";
2
2
  //#region ../infra/src/wasm/wasmDsFlagSync.ts
3
3
  /**
4
4
  * Sets the Deepsight (ds) flag that the WASM utility API receives on every
@@ -0,0 +1,27 @@
1
+ //#region ../infra/src/wasm/wasmMetadataVersionSync.ts
2
+ let metadataV2Enabled = false;
3
+ let applyToRuntime;
4
+ /**
5
+ * Selects the capture-metadata document the kit emits (ml-wasm-kit `smv`,
6
+ * ADR 0009): `true` picks the v2 document Deepsight 2.0 scores, `false` (the
7
+ * default) the v1 document. Purely in-memory, like `setWasmDsFlagSync`: the
8
+ * value waits here until the WASM runtime loads, and from then on the runtime
9
+ * latches it, applies it at once when WASM is up and replays it after every
10
+ * `initialize()`, because the kit keeps the selector as realm state that a
11
+ * new module instance resets to v1. Resolve it before the first capture and
12
+ * never toggle it mid-session — the uploads would mix formats.
13
+ */
14
+ function setWasmMetadataV2Enabled(enabled) {
15
+ metadataV2Enabled = enabled;
16
+ applyToRuntime?.(enabled);
17
+ }
18
+ /**
19
+ * For the `WasmRuntime` singleton, once, when its module loads: replays the
20
+ * selection made before the runtime existed and forwards every later one.
21
+ */
22
+ function bindWasmMetadataV2Applier(apply) {
23
+ applyToRuntime = apply;
24
+ apply(metadataV2Enabled);
25
+ }
26
+ //#endregion
27
+ export { setWasmMetadataV2Enabled as n, bindWasmMetadataV2Applier as t };