@incodetech/core 2.2.0 → 2.3.0-rc.0

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 (258) hide show
  1. package/THIRD_PARTY_NOTICES.txt +281 -0
  2. package/dist/BaseWasmProvider-Dyi6dKp1.d.ts +65 -0
  3. package/dist/{BrowserDiagnosticsCryptoProvider-B8vorxN5.esm.js → BrowserDiagnosticsCryptoProvider-C_9o3L2L.esm.js} +1 -1
  4. package/dist/{BrowserVisibilityObserverProvider-BX1BiLDK.esm.js → BrowserVisibilityObserverProvider-BrJN1B8A.esm.js} +2 -0
  5. package/dist/FaceDetectionProvider-DTetAE8H.esm.js +476 -0
  6. package/dist/FaceDetectionProvider-LdZ47bWy.d.ts +36 -0
  7. package/dist/{IIdCaptureCapability-DHTT3FC2.d.ts → IIdCaptureCapability-RNiFhvXR.d.ts} +7 -33
  8. package/dist/IWasmUtilCapability-CXXDA5l1.d.ts +159 -0
  9. package/dist/{MotionSensorProvider-DGiV77J_.esm.js → MotionSensorProvider-BgTYwg9L.esm.js} +1 -1
  10. package/dist/{deepsightService-DLVQS_RH.d.ts → StreamCanvasCapture-B3YT2Bt6.d.ts} +54 -41
  11. package/dist/{StreamCanvasCapture-D2XcXCZ4.esm.js → StreamCanvasCapture-C9jtgBdT.esm.js} +2 -2
  12. package/dist/{addressSearch-D1XpBdUS.esm.js → addressSearch-BRSu_aGA.esm.js} +1 -1
  13. package/dist/advanceableErrors-CpF2cBy6.esm.js +21 -0
  14. package/dist/ae-signature.d.ts +4 -2
  15. package/dist/ae-signature.esm.js +1 -1
  16. package/dist/antifraud.esm.js +2 -2
  17. package/dist/{antifraudManager-CQFNgSPt.esm.js → antifraudManager-Bg9ynGum.esm.js} +2 -2
  18. package/dist/{antifraudStateMachine-Bf_JVNwn.esm.js → antifraudStateMachine-BHxehiJZ.esm.js} +1 -1
  19. package/dist/{apiError-BA1d_au0.esm.js → apiError-D0v5hFyN.esm.js} +14 -2
  20. package/dist/authentication.d.ts +3 -3
  21. package/dist/authentication.esm.js +2 -2
  22. package/dist/{authenticationManager-zh9TC62P.esm.js → authenticationManager-C4B4-29g.esm.js} +5 -5
  23. package/dist/{authenticationManager-BBMGTcwW.d.ts → authenticationManager-DXTIUcma.d.ts} +7 -1
  24. package/dist/{authenticationStateMachine-xzi-vnvE.esm.js → authenticationStateMachine-DJ0zUm-A.esm.js} +6 -62
  25. package/dist/avatar.d.ts +1 -2
  26. package/dist/avatar.esm.js +1 -1
  27. package/dist/{backCameraStream-CUeYm5eu.esm.js → backCameraStream-BOtyQowf.esm.js} +83 -22
  28. package/dist/{camera-_2sXMXiF.esm.js → camera-sIa9ceW2.esm.js} +19 -1
  29. package/dist/camera.esm.js +1 -1
  30. package/dist/{canvas-E1zGkel4.esm.js → canvas-BxFzWTt-.esm.js} +19 -0
  31. package/dist/certificate-issuance.d.ts +2 -302
  32. package/dist/certificate-issuance.esm.js +3 -66
  33. package/dist/certificateIssuanceManager-Bfvkq7Cy.esm.js +69 -0
  34. package/dist/certificateIssuanceManager-DCgEidHz.d.ts +312 -0
  35. package/dist/{certificateIssuanceStateMachine-D_R92TYu.esm.js → certificateIssuanceStateMachine-BBD5h8c4.esm.js} +1 -1
  36. package/dist/consent.d.ts +1 -1
  37. package/dist/consent.esm.js +2 -2
  38. package/dist/{consentManager-BxjpLZAG.esm.js → consentManager-B5Vqdez-.esm.js} +2 -2
  39. package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
  40. package/dist/{consentStateMachine-D9D4ON8Z.esm.js → consentStateMachine-DbUmqWgV.esm.js} +1 -1
  41. package/dist/createCameraCycleOwnership-DQ5-F2oW.esm.js +826 -0
  42. package/dist/{createFaceAvatar-DQKaRise.esm.js → createFaceAvatar-BNHdeFj8.esm.js} +2 -2
  43. package/dist/createFaceAvatar-BlcTYgJv.d.ts +497 -0
  44. package/dist/cross-document-data-match.esm.js +1 -1
  45. package/dist/{crossDocumentDataMatchManager-CGT0V6RV.esm.js → crossDocumentDataMatchManager-QMOGwHXR.esm.js} +2 -2
  46. package/dist/curp-validation.d.ts +1 -1
  47. package/dist/curp-validation.esm.js +2 -2
  48. package/dist/{curpValidationManager-6Nmkn5u1.esm.js → curpValidationManager-D1ppROcF.esm.js} +2 -2
  49. package/dist/{curpValidationManager-DVGr7Fq7.d.ts → curpValidationManager-SSKNrm5Z.d.ts} +1 -1
  50. package/dist/{curpValidationStateMachine-Ds7KMacK.esm.js → curpValidationStateMachine-DvUPC_8S.esm.js} +1 -1
  51. package/dist/custom-fields.d.ts +2 -114
  52. package/dist/custom-fields.esm.js +2 -232
  53. package/dist/custom-watchlist.d.ts +2 -51
  54. package/dist/custom-watchlist.esm.js +3 -70
  55. package/dist/customFieldsManager-2j_PBq4U.esm.js +264 -0
  56. package/dist/customFieldsManager-8-W2KY4n.d.ts +141 -0
  57. package/dist/customWatchlistManager-DUVrEdw9.esm.js +73 -0
  58. package/dist/customWatchlistManager-PBWHr_oM.d.ts +64 -0
  59. package/dist/{customWatchlistStateMachine-YWSgKLbF.esm.js → customWatchlistStateMachine-qZVgkKgP.esm.js} +1 -1
  60. package/dist/{deepsightLoader--wMKWECS.esm.js → deepsightLoader-Dm7ejW4v.esm.js} +27 -71
  61. package/dist/device.d.ts +25 -2
  62. package/dist/device.esm.js +69 -7
  63. package/dist/document-capture.d.ts +2 -2
  64. package/dist/document-capture.esm.js +2 -2
  65. package/dist/{documentCaptureManager-DsQQhWry.esm.js → documentCaptureManager-DR_Wv-3H.esm.js} +2 -2
  66. package/dist/{documentCaptureManager-B3t0ydtg.d.ts → documentCaptureManager-DensIj5F.d.ts} +83 -83
  67. package/dist/{documentCaptureStateMachine-BM4Ex_5x.esm.js → documentCaptureStateMachine-CWOATHfE.esm.js} +5 -5
  68. package/dist/dynamic-forms.d.ts +1 -1
  69. package/dist/dynamic-forms.esm.js +2 -2
  70. package/dist/{dynamicFormsManager-fhK0yINk.d.ts → dynamicFormsManager-D5R_uxLQ.d.ts} +25 -3
  71. package/dist/{dynamicFormsManager-fFVIRBNv.esm.js → dynamicFormsManager-Dt98SDfV.esm.js} +16 -5
  72. package/dist/{dynamicFormsStateMachine-D6D7oEYk.esm.js → dynamicFormsStateMachine-obKr4IIp.esm.js} +35 -3
  73. package/dist/ekyb.d.ts +1 -1
  74. package/dist/ekyb.esm.js +3 -3
  75. package/dist/{ekybManager-Y3MkoXpC.esm.js → ekybManager-DNZKrKF3.esm.js} +2 -2
  76. package/dist/{ekybStateMachine-3nlnqdlr.esm.js → ekybStateMachine-DjhHQXZ8.esm.js} +3 -3
  77. package/dist/ekyc.esm.js +2 -2
  78. package/dist/{ekycManager-DgT48ky6.esm.js → ekycManager-CmQBpeiI.esm.js} +2 -2
  79. package/dist/{ekycStateMachine-CQwqiR-R.esm.js → ekycStateMachine-CmdW2gVm.esm.js} +2 -2
  80. package/dist/electronic-signature.d.ts +3 -3
  81. package/dist/electronic-signature.esm.js +2 -2
  82. package/dist/electronicSignatureManager-Ds-KEVTq.d.ts +2786 -0
  83. package/dist/{electronicSignatureManager-DGbAJ00W.esm.js → electronicSignatureManager-DzulxM4_.esm.js} +357 -51
  84. package/dist/email.esm.js +2 -2
  85. package/dist/{emailManager-BY0jeYwR.esm.js → emailManager-B5ek_UfM.esm.js} +2 -2
  86. package/dist/{emailStateMachine-Crw8QVmc.esm.js → emailStateMachine-CyPFZ7dW.esm.js} +1 -1
  87. package/dist/{endpoints-CCzL3XD_.esm.js → endpoints-D3B9mUHh.esm.js} +24 -7
  88. package/dist/{events-DYiyoSlx.esm.js → events-ijlbX_Wx.esm.js} +2 -2
  89. package/dist/events.d.ts +1 -1
  90. package/dist/events.esm.js +1 -1
  91. package/dist/extensibility.d.ts +24 -64
  92. package/dist/extensibility.esm.js +35 -29
  93. package/dist/face-match.esm.js +2 -2
  94. package/dist/{faceCaptureManagerFactory-BxWPpxyd.d.ts → faceCaptureManagerFactory-CvtqcLxs.d.ts} +87 -54
  95. package/dist/{faceCaptureManagerFactory-CVnZ0fa5.esm.js → faceCaptureManagerFactory-pCmG4MeF.esm.js} +68 -7
  96. package/dist/faceCaptureSetup-BSextack.esm.js +2106 -0
  97. package/dist/{faceMatchManager-Ri4UbNz0.esm.js → faceMatchManager-Caal2zyV.esm.js} +2 -2
  98. package/dist/{faceMatchStateMachine-20DdZ3jg.esm.js → faceMatchStateMachine-BUc5FXYy.esm.js} +1 -1
  99. package/dist/{feature-management-CPQ4qv3F.esm.js → feature-management-B0sGlozZ.esm.js} +32 -7
  100. package/dist/feature-management.d.ts +1 -1
  101. package/dist/feature-management.esm.js +1 -1
  102. package/dist/field-comparison.esm.js +1 -1
  103. package/dist/{fieldComparisonManager-Cg6kPQQx.esm.js → fieldComparisonManager-BIs6HPJG.esm.js} +2 -2
  104. package/dist/fiscal-qr.d.ts +2 -56
  105. package/dist/fiscal-qr.esm.js +2 -308
  106. package/dist/fiscalQrManager-Bp_-3LJr.esm.js +34131 -0
  107. package/dist/fiscalQrManager-CHcBJwUM.d.ts +68 -0
  108. package/dist/flow-events.d.ts +1 -1
  109. package/dist/flow.d.ts +212 -185
  110. package/dist/flow.esm.js +119 -30
  111. package/dist/{flowCompletionService-tfeoGre9.esm.js → flowCompletionService-CLtbWhSK.esm.js} +2 -2
  112. package/dist/{flowServices-f5Ruz7R9.esm.js → flowServices-B5FwukTQ.esm.js} +91 -26
  113. package/dist/geolocation.esm.js +2 -2
  114. package/dist/{geolocationManager-CH6RfqFH.esm.js → geolocationManager-DIw-xq9a.esm.js} +2 -2
  115. package/dist/{geolocationStateMachine-DmbWFely.esm.js → geolocationStateMachine-DpG0TFOU.esm.js} +3 -3
  116. package/dist/getBrowser-CBiibsL-.esm.js +19 -0
  117. package/dist/{getBrowser-DNrQeL4T.esm.js → getBrowser-Cbe1C4Tn.esm.js} +2 -1
  118. package/dist/{getDeviceClass-9y-kbVDw.esm.js → getDeviceClass-5NYZg9s6.esm.js} +2 -2
  119. package/dist/getParsedUserAgent-B2iFDql1.esm.js +1278 -0
  120. package/dist/government-validation.d.ts +2 -85
  121. package/dist/government-validation.esm.js +3 -120
  122. package/dist/governmentValidationManager-D02vT4yY.d.ts +63 -0
  123. package/dist/governmentValidationManager-TjC9iVjH.esm.js +79 -0
  124. package/dist/governmentValidationStateMachine-D1ZnEqdd.esm.js +54 -0
  125. package/dist/home.d.ts +1 -1
  126. package/dist/home.esm.js +1 -1
  127. package/dist/id-ocr.d.ts +2 -2
  128. package/dist/id-ocr.esm.js +2 -2
  129. package/dist/id-selfie-flow.d.ts +3 -2
  130. package/dist/id-selfie-flow.esm.js +11 -10
  131. package/dist/id-verification.esm.js +2 -2
  132. package/dist/id.d.ts +29 -5
  133. package/dist/id.esm.js +48 -46
  134. package/dist/idCaptureDefaults-BcxjQDI3.esm.js +484 -0
  135. package/dist/{idCaptureManager-CqrqSjJV.d.ts → idCaptureManager-CvmHOWWd.d.ts} +227 -39
  136. package/dist/{idCaptureManager-BYwTZ2H8.esm.js → idCaptureManager-Vby8oYqh.esm.js} +259 -46
  137. package/dist/{idCaptureServices-44kwQItl.esm.js → idCaptureServices-CJIxD9ep.esm.js} +342 -31
  138. package/dist/idCaptureStateMachine-CmqihkUy.esm.js +5343 -0
  139. package/dist/{idOcrManager-DXc_xRN7.d.ts → idOcrManager-BF_cXZq8.d.ts} +1 -1
  140. package/dist/{idOcrManager-BIQYQXXj.esm.js → idOcrManager-DHU22hVn.esm.js} +2 -2
  141. package/dist/{idOcrStateMachine-cSxzHpHt.esm.js → idOcrStateMachine-33UvRAHE.esm.js} +1 -1
  142. package/dist/{idVerificationManager-JpV_SAsl.esm.js → idVerificationManager-CyaixD0D.esm.js} +2 -2
  143. package/dist/{idVerificationStateMachine-nPeUNyFq.esm.js → idVerificationStateMachine-BPGrQZEm.esm.js} +1 -1
  144. package/dist/identity-reuse.esm.js +2 -2
  145. package/dist/{identityReuseManager-kNCg9AbD.esm.js → identityReuseManager-CWaNHBO3.esm.js} +2 -2
  146. package/dist/{identityReuseStateMachine-DyulxDjP.esm.js → identityReuseStateMachine-CQgnATo5.esm.js} +1 -1
  147. package/dist/{index-CLMF0QLQ.d.ts → index-DLcJT5YP.d.ts} +1 -1
  148. package/dist/index.d.ts +1 -1
  149. package/dist/index.esm.js +1 -1
  150. package/dist/{invokeOnCaptureCallback-GpvMuz9o.esm.js → invokeOnCaptureCallback-BjzPjJ_p.esm.js} +1 -1
  151. package/dist/mandatory-consent.d.ts +2 -2
  152. package/dist/mandatory-consent.esm.js +2 -2
  153. package/dist/{mandatoryConsentManager-DyPzUmsZ.d.ts → mandatoryConsentManager-CJSyhTpi.d.ts} +5 -5
  154. package/dist/{mandatoryConsentManager-B4Niyg_u.esm.js → mandatoryConsentManager-Du-m-tZ_.esm.js} +2 -2
  155. package/dist/{mandatoryConsentStateMachine-B4-1u-L8.esm.js → mandatoryConsentStateMachine-DSDAk7WZ.esm.js} +1 -1
  156. package/dist/multipartRecordingService-B3C_zlev.esm.js +594 -0
  157. package/dist/{permissionGuards-KINpmKtI.esm.js → permissionGuards-uYZYFu4J.esm.js} +1 -1
  158. package/dist/{permissionServices-UvUcOSRb.esm.js → permissionServices-Bj_fyWtv.esm.js} +5 -5
  159. package/dist/personhood.d.ts +6 -5
  160. package/dist/personhood.esm.js +10 -10
  161. package/dist/phone.esm.js +2 -2
  162. package/dist/{phoneManager-FsJ0W2Ei.esm.js → phoneManager-N1-sbrY4.esm.js} +2 -2
  163. package/dist/{phoneStateMachine-Ba0wKHyX.esm.js → phoneStateMachine-jl8LJKCo.esm.js} +1 -1
  164. package/dist/{platform-BJrm5nzZ.esm.js → platform-DkcRc9JV.esm.js} +29 -1
  165. package/dist/qe-signature.d.ts +5 -3
  166. package/dist/qe-signature.esm.js +2 -2
  167. package/dist/recordingsRepository-CCWy13M-.esm.js +72 -0
  168. package/dist/redirect-to-mobile.esm.js +2 -2
  169. package/dist/{redirectToMobileManager-y4VQB11M.esm.js → redirectToMobileManager-DsFzdTwA.esm.js} +2 -2
  170. package/dist/{redirectToMobileStateMachine-Cyv2x0PP.esm.js → redirectToMobileStateMachine-v3otpT-L.esm.js} +1 -1
  171. package/dist/{rolldown-runtime-FZ4Itg2g.esm.js → rolldown-runtime-FDOR9p9I.esm.js} +1 -19
  172. package/dist/{runChildModule-Dukuw23X.esm.js → runChildModule-TuyGE00X.esm.js} +3 -21
  173. package/dist/safeStorage-B-trhxg6.esm.js +423 -0
  174. package/dist/{sdkVersion-D1Bm59g6.esm.js → sdkVersion-CLxKvdyz.esm.js} +1 -1
  175. package/dist/selfie.d.ts +5 -5
  176. package/dist/selfie.esm.js +14 -76
  177. package/dist/{selfieErrorUtils-C2PYBVsp.esm.js → selfieErrorUtils-C77GXJH6.esm.js} +30 -4
  178. package/dist/{selfieManager-Bj6B2ZVy.esm.js → selfieManager-CihVnODO.esm.js} +5 -5
  179. package/dist/{selfieManager-DwlCppg0.d.ts → selfieManager-D1KRJ39M.d.ts} +8 -11
  180. package/dist/selfieStateMachine-fwMmNtOi.esm.js +69 -0
  181. package/dist/{session-BFdLgN4i.esm.js → session-BHIeAamR.esm.js} +4 -5
  182. package/dist/session.d.ts +21 -11
  183. package/dist/session.esm.js +5 -5
  184. package/dist/{sessionInitializer-dlfDehHk.esm.js → sessionInitializer-BLoK7SP9.esm.js} +187 -68
  185. package/dist/{setup-BgoWtvIS.d.ts → setup-Cv-JM9QC.d.ts} +63 -69
  186. package/dist/{setup-BIAtLa8k.esm.js → setup-msLybMbC.esm.js} +226 -100
  187. package/dist/signature.esm.js +2 -2
  188. package/dist/{signatureManager-Ca43yhwk.esm.js → signatureManager-ChsB-nMD.esm.js} +2 -2
  189. package/dist/{signatureStateMachine-K1LMRrxG.esm.js → signatureStateMachine-BHPwkJZS.esm.js} +1 -1
  190. package/dist/{src-0Jurt29N.esm.js → src-35ekGRzK.esm.js} +1 -1
  191. package/dist/{stats-B0nFKawG.esm.js → stats-DkK-f8JT.esm.js} +1 -1
  192. package/dist/stats.esm.js +1 -1
  193. package/dist/{trueSightService---iW2KKJ.esm.js → trueSightService-CKrrfV0Q.esm.js} +7 -7
  194. package/dist/trust-graph.esm.js +1 -1
  195. package/dist/{types-BX_XkMsQ2.d.ts → types-9_esGTPj.d.ts} +1 -1
  196. package/dist/types-BT_Oalip.d.ts +1 -0
  197. package/dist/{types-DelMqZLe.d.ts → types-BjSly8cp.d.ts} +1 -1
  198. package/dist/{types-Hmd7U0JA.d.ts → types-CM-jtjJ2.d.ts} +6 -81
  199. package/dist/{types-Bdf8_LYB2.d.ts → types-CjKBS37a2.d.ts} +303 -13
  200. package/dist/{types-DVmXIdzW.d.ts → types-D0gekt4U.d.ts} +38 -5
  201. package/dist/types-DgDvvzg0.d.ts +10 -0
  202. package/dist/{types-KPvmag_B.d.ts → types-Do5rEXij.d.ts} +7 -4
  203. package/dist/types-ZT1XFIJ8.d.ts +6 -0
  204. package/dist/video-selfie.d.ts +59 -35
  205. package/dist/video-selfie.esm.js +510 -601
  206. package/dist/{videoSelfieCameraWarmer-NEhFZvWx.esm.js → videoSelfieCameraWarmer-CB1IzZkt.esm.js} +14 -153
  207. package/dist/videoSelfieFlowModuleMachine-BUe2uACW.esm.js +32 -0
  208. package/dist/{videoSelfieStepDetector-D3oo2ofo.d.ts → videoSelfieStepDetector-5YHFe0Mq.d.ts} +21 -5
  209. package/dist/virtualCameraCheck-WOloJ-do.esm.js +48 -0
  210. package/dist/warmup-CUUnwYxe.esm.js +714 -0
  211. package/dist/warmup-Cis2p6O0.d.ts +128 -0
  212. package/dist/wasm.d.ts +30 -6
  213. package/dist/wasm.esm.js +36 -4
  214. package/dist/{wasmDsFlagSync-BqUCwLY8.esm.js → wasmDsFlagSync-B2e8p268.esm.js} +2 -2
  215. package/dist/{wasmWebClient-DM8lkb0z.esm.js → wasmWebClient-B7baE-Wf.esm.js} +358 -28
  216. package/dist/watchlist-for-business.d.ts +2 -78
  217. package/dist/watchlist-for-business.esm.js +3 -102
  218. package/dist/watchlist.esm.js +2 -2
  219. package/dist/watchlistForBusinessManager-CpuuB1J2.esm.js +107 -0
  220. package/dist/watchlistForBusinessManager-CsnJnG-C.d.ts +99 -0
  221. package/dist/{watchlistForBusinessStateMachine-CxFnlshm.esm.js → watchlistForBusinessStateMachine-DEzgjz7C.esm.js} +13 -6
  222. package/dist/{watchlistManager-LoNZH9qm.esm.js → watchlistManager-CI8BHFob.esm.js} +2 -2
  223. package/dist/{watchlistStateMachine-DIKQDoUT.esm.js → watchlistStateMachine-DvOby3a-.esm.js} +1 -1
  224. package/dist/workflow.d.ts +12 -8
  225. package/dist/workflow.esm.js +48 -39
  226. package/package.json +4 -10
  227. package/dist/BrowserStorageProvider-k-FDkC4W.esm.js +0 -67
  228. package/dist/FaceDetectionProvider-Mh6q3EbA.d.ts +0 -349
  229. package/dist/IFaceAvatarCapability-BrL19G0s.d.ts +0 -23
  230. package/dist/IStorageCapability-ORkQfK3F.d.ts +0 -242
  231. package/dist/OpenViduRecordingProvider-Du98qevC.esm.js +0 -85
  232. package/dist/createFaceAvatar-BEj18KXi.d.ts +0 -50
  233. package/dist/document-upload.d.ts +0 -325
  234. package/dist/document-upload.esm.js +0 -197
  235. package/dist/electronicSignatureManager-CcUXQZS7.d.ts +0 -1300
  236. package/dist/faceCaptureSetup-Cd-04W_X.esm.js +0 -863
  237. package/dist/getBrowser-Cb8Zgrgp.esm.js +0 -7
  238. package/dist/getParsedUserAgent-pJjATANs.esm.js +0 -1622
  239. package/dist/governmentValidationStateMachine-CK9DrZXX.esm.js +0 -226
  240. package/dist/idCaptureDefaults-WeHbQM7W.esm.js +0 -225
  241. package/dist/idCaptureStateMachine-kZ5OpdfM.esm.js +0 -3342
  242. package/dist/lib-DAyUtOTj.esm.js +0 -12420
  243. package/dist/manualReviewService-D4IkipnN.esm.js +0 -15
  244. package/dist/mediaRecorderOptions-dALSV8af.esm.js +0 -40
  245. package/dist/onDeviceFaceResults-CUHwyZT4.esm.js +0 -646
  246. package/dist/openviduLazy-CCDpFWg1.esm.js +0 -10
  247. package/dist/recordingService-3NSENVwp.esm.js +0 -329
  248. package/dist/safeStorage-Ep56I-f_.esm.js +0 -982
  249. package/dist/selfieStateMachine-CHV_WNst.esm.js +0 -55
  250. package/dist/trueSight-B_icM8r2.esm.js +0 -1
  251. package/dist/types-EELWyWpd.d.ts +0 -6
  252. package/dist/types-Vb4P9ovf.d.ts +0 -22
  253. package/dist/warmup-Dv2alr2-.d.ts +0 -82
  254. package/dist/wasmDefaults-DTUrftxR.esm.js +0 -125
  255. package/dist/{Face2DProvider-UUQt_vRC.esm.js → Face2DProvider-BF48sz5c.esm.js} +1 -1
  256. package/dist/{PrivacyLensProvider-D8PS7AJa.esm.js → PrivacyLensProvider-EwnC_C5n.esm.js} +1 -1
  257. /package/dist/{types-BfgmV7s72.d.ts → types-BfgmV7s7.d.ts} +0 -0
  258. /package/dist/{types-CJ7Yl9K-2.d.ts → types-CJ7Yl9K-.d.ts} +0 -0
@@ -0,0 +1,476 @@
1
+ import { t as ensureWasmPipelines } from "./setup-msLybMbC.esm.js";
2
+ import { s as wasmRuntime } from "./warmup-CUUnwYxe.esm.js";
3
+ import { i as BaseWasmProvider } from "./safeStorage-B-trhxg6.esm.js";
4
+ import { c as trueSightHintTransition, r as noteTrueSightCaptureActivity } from "./trueSightService-CKrrfV0Q.esm.js";
5
+ import "./sessionInitializer-BLoK7SP9.esm.js";
6
+ import { t as addDeviceStats } from "./stats-DkK-f8JT.esm.js";
7
+ import { c as isIPhone14OrHigher, i as isDesktop } from "./platform-DkcRc9JV.esm.js";
8
+ import { i as requestCameraAccess, o as stopCameraStream, r as getCameraReacquisitionConstraints } from "./camera-sIa9ceW2.esm.js";
9
+ import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
10
+ import { a as StreamCanvasProcessingSession, n as startRecording, r as stopRecording$1, t as createRecordingSession } from "./recordingsRepository-CCWy13M-.esm.js";
11
+ import { i as hasBackCamera, n as getBackCameraStream, r as getDesktopCameraStream, t as ensureFrontCameraStream } from "./backCameraStream-BOtyQowf.esm.js";
12
+ //#region src/internal/faceCapture/onDeviceFaceResults.ts
13
+ /**
14
+ * On-device still-face capture is owned by the protected camera-cycle actor.
15
+ * Core uses this guard only to select the backwards-compatible validation and
16
+ * processing behavior after the native actor posts completion-only results.
17
+ */
18
+ const isOnDeviceMode = (config) => config.onDeviceFaceResultsSubmissionEnabled === true;
19
+ //#endregion
20
+ //#region src/internal/faceCapture/faceCaptureServices.ts
21
+ function sendLabelInspectionEvent() {
22
+ return addDeviceStats({ cameraLabelInspectionStatus: "FAIL" });
23
+ }
24
+ const MOBILE_SELFIE_CONSTRAINTS = {
25
+ video: {
26
+ facingMode: "user",
27
+ height: { ideal: 480 },
28
+ width: { ideal: 640 }
29
+ },
30
+ audio: false
31
+ };
32
+ const IPHONE14_SELFIE_CONSTRAINTS = {
33
+ video: { height: { ideal: 1080 } },
34
+ audio: false
35
+ };
36
+ function buildCameraConstraints(resolution, deviceId) {
37
+ if (resolution) return {
38
+ video: {
39
+ facingMode: "user",
40
+ deviceId: deviceId ? { exact: deviceId } : void 0,
41
+ height: resolution.height ? { ideal: resolution.height } : void 0,
42
+ width: resolution.width ? { ideal: resolution.width } : void 0
43
+ },
44
+ audio: false
45
+ };
46
+ if (isIPhone14OrHigher()) return IPHONE14_SELFIE_CONSTRAINTS;
47
+ return MOBILE_SELFIE_CONSTRAINTS;
48
+ }
49
+ function stopStream(stream) {
50
+ stopCameraStream(stream);
51
+ }
52
+ async function getFrontCameraStream(resolution) {
53
+ if (isDesktop()) {
54
+ if (resolution) return ensureFrontCameraStream((deviceId) => requestCameraAccess(buildCameraConstraints(resolution, deviceId)));
55
+ return ensureFrontCameraStream((deviceId) => getDesktopCameraStream(deviceId ? { deviceId } : {}));
56
+ }
57
+ return requestCameraAccess(resolution ? buildCameraConstraints(resolution) : buildCameraConstraints());
58
+ }
59
+ async function initializeCamera(params) {
60
+ const { config } = params;
61
+ await ensureWasmPipelines([isOnDeviceMode(config) ? "onDeviceSelfie" : "selfie"]);
62
+ const usingBackCamera = config.assistedOnboarding === true && await hasBackCamera();
63
+ const backCamera = usingBackCamera ? await getBackCameraStream() : void 0;
64
+ const stream = backCamera?.stream ?? await getFrontCameraStream(config.cameraResolution);
65
+ const constraints = getCameraReacquisitionConstraints(stream.getVideoTracks()[0], backCamera?.constraints);
66
+ return {
67
+ stream,
68
+ provider: params.provider,
69
+ usingBackCamera,
70
+ constraints
71
+ };
72
+ }
73
+ /**
74
+ * Encrypts the provided selfie image using WASM.
75
+ */
76
+ async function encryptSelfieImage({ canvas, dependencies }) {
77
+ const base64Image = canvas.getBase64Image();
78
+ if (!base64Image) throw new Error("Canvas image is empty or null");
79
+ return (await dependencies.getWasmUtil()).encryptImage(base64Image);
80
+ }
81
+ function startDetection(params) {
82
+ let lastStatus;
83
+ let session;
84
+ const { provider } = params;
85
+ const setStatus = (status) => {
86
+ if (session?.isDisposed() === true) return;
87
+ if (lastStatus === status) return;
88
+ lastStatus = status;
89
+ trueSightHintTransition("module.face-capture", "faceScan", status);
90
+ params.onUpdate(status);
91
+ };
92
+ const stopDetectionLoop = () => {
93
+ session?.dispose();
94
+ noteTrueSightCaptureActivity(false);
95
+ };
96
+ const reset = () => {
97
+ provider.reset();
98
+ };
99
+ const cleanup = () => {
100
+ stopDetectionLoop();
101
+ };
102
+ (async () => {
103
+ try {
104
+ provider.setCallbacks({
105
+ onFarAway: () => setStatus("tooFar"),
106
+ onTooClose: () => setStatus("tooClose"),
107
+ onTooManyFaces: () => setStatus("tooManyFaces"),
108
+ onNoFace: () => setStatus("idle"),
109
+ onCenterFace: () => setStatus("centerFace"),
110
+ onGetReady: () => setStatus("getReady"),
111
+ onGetReadyFinished: () => setStatus("getReadyFinished"),
112
+ onDark: () => {
113
+ if (params.config.validateBrightness) setStatus("dark");
114
+ },
115
+ onBlur: () => setStatus("blur"),
116
+ onFaceAngle: () => setStatus("faceAngle"),
117
+ onLenses: () => {
118
+ if (params.config.validateLenses) setStatus("lenses");
119
+ },
120
+ onMask: () => {
121
+ if (params.config.validateFaceMask) setStatus("faceMask");
122
+ },
123
+ onEyesClosed: () => {
124
+ if (params.config.validateClosedEyes) setStatus("eyesClosed");
125
+ },
126
+ onHeadWear: () => {
127
+ if (params.config.validateHeadCover) setStatus("headWear");
128
+ },
129
+ onFaceOccluded: () => setStatus("faceOcclusion"),
130
+ onFaceData: params.onPose,
131
+ onSwitchToManualCapture: () => {
132
+ setStatus("manualCapture");
133
+ stopDetectionLoop();
134
+ },
135
+ onCapture: (canvas, faceCoordinates) => {
136
+ setStatus("success");
137
+ params.onSuccess(canvas, faceCoordinates);
138
+ cleanup();
139
+ }
140
+ });
141
+ setStatus("detecting");
142
+ session = new StreamCanvasProcessingSession({
143
+ capturer: params.capturer,
144
+ provider,
145
+ onFrame: params.onFrame
146
+ });
147
+ noteTrueSightCaptureActivity(true);
148
+ } catch {
149
+ setStatus("error");
150
+ cleanup();
151
+ }
152
+ })();
153
+ return {
154
+ cleanup,
155
+ reset
156
+ };
157
+ }
158
+ function buildResolutionFromStream(stream) {
159
+ const track = stream.getVideoTracks()[0];
160
+ if (!track) return;
161
+ const settings = track.getSettings();
162
+ const width = settings.width;
163
+ const height = settings.height;
164
+ if (typeof width === "number" && typeof height === "number") return `${width}x${height}`;
165
+ }
166
+ async function startRecordingSession(params) {
167
+ if (params.config.deepsightLiveness === "VIDEOLIVENESS") return;
168
+ if (params.config.enableFaceRecording !== true) return;
169
+ if (params.existing) return params.existing;
170
+ const provider = params.config.recording?.capability;
171
+ if (!provider) return;
172
+ const clonedStream = params.clonedStream;
173
+ const hasAudio = clonedStream.getAudioTracks().length > 0;
174
+ const resolution = buildResolutionFromStream(clonedStream);
175
+ const session = await createRecordingSession("selfie");
176
+ const connection = await provider.connect({
177
+ sessionToken: session.token,
178
+ stream: clonedStream,
179
+ events: {}
180
+ });
181
+ await startRecording({
182
+ videoRecordingId: session.videoRecordingId,
183
+ type: "selfie",
184
+ resolution,
185
+ hasAudio
186
+ });
187
+ return {
188
+ token: session.token,
189
+ sessionId: session.sessionId,
190
+ videoRecordingId: session.videoRecordingId,
191
+ connection,
192
+ resolution,
193
+ hasAudio
194
+ };
195
+ }
196
+ async function stopRecording(session) {
197
+ try {
198
+ await stopRecording$1(session.videoRecordingId);
199
+ } finally {
200
+ await session.connection.disconnect();
201
+ }
202
+ }
203
+ async function initializeDeepsightSession(options) {
204
+ const { loadDeepsightSession } = await import("./deepsightLoader-Dm7ejW4v.esm.js");
205
+ return loadDeepsightSession({
206
+ ds: options.ds,
207
+ storage: options.storage
208
+ });
209
+ }
210
+ //#endregion
211
+ //#region ../infra/src/wasm/faceProcessingWasmApi.ts
212
+ const PROCESS_PHOTO_UNSUPPORTED_ERROR = "[Incode SDK] processPhoto is unsupported since ml-wasm-kit v2.14.49-post1 and will be removed in 3.0.0. Use the protected camera cycle (captureProtectedFrame) for manual capture.";
213
+ var FaceProcessingWasmApi = class {
214
+ constructor(runtime = wasmRuntime) {
215
+ this.runtime = runtime;
216
+ }
217
+ async setFacePositionConstraints(type, minX, minY, maxX, maxY) {
218
+ this.runtime.requireFaceProcessingApi("Unable to set face position constraints, cpp API hasn't been initialized").setFacePositionConstraints(this.runtime.pipelineTypeToWasmEnum(type), minX, minY, maxX, maxY);
219
+ }
220
+ async setFaceDetectionThresholds(type, brightnessThreshold, blurrinessThreshold, tiltRotationAngleThreshold, minMagicCropSize, autocaptureInterval, minFaceQualityScore, faceOcclusionThreshold, getReadyDelay, framesAggregationInterval, minFramesWithFace) {
221
+ this.runtime.requireFaceProcessingApi("Unable to set face detection thresholds, cpp API hasn't been initialized").setFaceProcessingThresholds(this.runtime.pipelineTypeToWasmEnum(type), brightnessThreshold, blurrinessThreshold, tiltRotationAngleThreshold, minMagicCropSize, autocaptureInterval, minFaceQualityScore, faceOcclusionThreshold, getReadyDelay, framesAggregationInterval, minFramesWithFace);
222
+ }
223
+ async setFaceAttributesThresholds(type, headwearThreshold, lensesThreshold, closedEyesThreshold, maskThreshold) {
224
+ this.runtime.requireFaceProcessingApi("Unable to set face attributes thresholds, cpp API hasn't been initialized").setFaceAttributesThresholds(this.runtime.pipelineTypeToWasmEnum(type), headwearThreshold, lensesThreshold, closedEyesThreshold, maskThreshold);
225
+ }
226
+ async setFaceChecksEnabled(type, isLensesCheckEnabled, isMaskCheckEnabled, isClosedEyesCheckEnabled, isHeadWearCheckEnabled, isOcclusionCheckEnabled) {
227
+ this.runtime.requireFaceProcessingApi("Unable to set face checks enabled flags, cpp API hasn't been initialized").setFaceChecksEnabled(this.runtime.pipelineTypeToWasmEnum(type), isLensesCheckEnabled, isMaskCheckEnabled, isClosedEyesCheckEnabled, isHeadWearCheckEnabled, isOcclusionCheckEnabled);
228
+ }
229
+ async setFaceDetectionMode(type, isVideoSelfie) {
230
+ this.runtime.requireFaceProcessingApi("Unable to set face detection mode, cpp API hasn't been initialized").setFaceProcessingMode(this.runtime.pipelineTypeToWasmEnum(type), isVideoSelfie);
231
+ }
232
+ async setFaceDetectionCallbacks(type, onFarAway, onTooClose, onTooManyFaces, onNoFace, onCapture, onGetReady, onGetReadyFinished, onCenterFace, onDark, onBlur, onFaceAngle, onLenses, onMask, onEyesClosed, onHeadWear, onSwitchToManualCapture, onFaceOccluded) {
233
+ this.runtime.requireFaceProcessingApi("Unable to set face detection callbacks, cpp API hasn't been initialized").setFaceProcessingCallbacks(this.runtime.pipelineTypeToWasmEnum(type), onFarAway, onTooClose, onTooManyFaces, onNoFace, onCapture, onGetReady, onGetReadyFinished, onCenterFace, onDark, onBlur, onFaceAngle, onLenses, onMask, onEyesClosed, onHeadWear, onSwitchToManualCapture, onFaceOccluded);
234
+ }
235
+ /**
236
+ * @deprecated Removed from ml-wasm-kit in v2.14.49-post1; scheduled for
237
+ * removal in 3.0.0. The signature stays available for source compatibility,
238
+ * but the canvas never reaches native code. Use
239
+ * `CameraCycleProvider.captureProtectedFrame` (the protected camera cycle's
240
+ * manual capture) instead.
241
+ */
242
+ processPhoto(_canvas) {
243
+ throw new Error(PROCESS_PHOTO_UNSUPPORTED_ERROR);
244
+ }
245
+ /**
246
+ * POSTs the staged on-device face-results JSON to `/omni/add/face-results`
247
+ * via the C++ `WebApi`. The C++ side encrypts the body with
248
+ * `SessionEncryptor` and routes through the WASM `WebClient` with inline
249
+ * encryption (`ie=true`) — this does NOT depend on the WebClient E2EE
250
+ * session setup, so it works whether `setupWasmConnection` was called with
251
+ * `encryptionEnabled` true or false.
252
+ *
253
+ * Reads from the `WebApi` instance the runtime constructs eagerly in
254
+ * `initialize()`. The C++ `OnDeviceSelfieWorkflow` has already staged the
255
+ * aggregated best-shot results into that instance via
256
+ * `WebApi::setFaceResults(...)` during per-frame processing (auto-capture) or
257
+ * through the protected camera-cycle manual-capture path.
258
+ */
259
+ postFaceResults(config) {
260
+ return this.runtime.requireWebApi("Unable to post face results, cpp API hasn't been initialized").postFaceResults(config ?? {});
261
+ }
262
+ /**
263
+ * Kept-dead: mirrors upstream `wasmApi.runSelfieCapture`. Nothing in the SDK
264
+ * calls it; it exists so the mirror stays 1:1 with upstream at the pinned tag.
265
+ */
266
+ async runSelfieCapture(image) {
267
+ const faceProcessingWasmApi = this.runtime.requireFaceProcessingApi("Unable to run Selfie Capture, cpp API hasn't been initialized");
268
+ if (image) {
269
+ await this.runtime.allocateImageBuffers(image.width, image.height);
270
+ this.runtime.writeFrame(image);
271
+ }
272
+ return faceProcessingWasmApi.runSelfieCapture();
273
+ }
274
+ };
275
+ const faceProcessingWasmApi = new FaceProcessingWasmApi();
276
+ //#endregion
277
+ //#region ../infra/src/providers/wasm/FaceDetectionProvider.ts
278
+ /**
279
+ * Best-effort `delete()` for Emscripten `embind`-bound handles. Plain
280
+ * JS values lack a `.delete` method and are skipped; proxy objects
281
+ * have it and need it called once to free the underlying C++ memory.
282
+ * Swallows errors because this runs at 15–30 Hz on the detection hot
283
+ * path — a throwing cleanup must never abort frame processing.
284
+ */
285
+ function tryDeleteEmbindHandle(value) {
286
+ const maybeDelete = value?.delete;
287
+ if (typeof maybeDelete !== "function") return;
288
+ try {
289
+ maybeDelete.call(value);
290
+ } catch {}
291
+ }
292
+ var FaceDetectionProvider = class extends BaseWasmProvider {
293
+ constructor() {
294
+ super(4);
295
+ this.defaultThresholds = {
296
+ frameMinX: 0,
297
+ frameMinY: 0,
298
+ frameMaxX: 1,
299
+ frameMaxY: 1,
300
+ brightnessThreshold: 50,
301
+ blurrinessThreshold: 50,
302
+ tiltRotationAngleThreshold: 15,
303
+ minMagicCropSize: 200,
304
+ headwearThreshold: .86,
305
+ lensesThreshold: .95,
306
+ closedEyesThreshold: .9,
307
+ maskThreshold: .85,
308
+ minFaceQualityScore: .63,
309
+ faceOcclusionThreshold: .3,
310
+ getReadyDelay: 2e3,
311
+ framesAggregationInterval: 2e3,
312
+ minFramesWithFace: 3
313
+ };
314
+ this.currentFrame = null;
315
+ }
316
+ async processFrame(image) {
317
+ this.currentFrame = image;
318
+ const result = await this.processFrameWasm(image);
319
+ if (this.onFaceDataCallback && result?.faces) {
320
+ let face;
321
+ try {
322
+ if ((typeof result.faces.size === "function" ? result.faces.size() : 0) > 0) {
323
+ face = typeof result.faces.get === "function" ? result.faces.get(0) : void 0;
324
+ if (face) this.onFaceDataCallback(face, {
325
+ width: image.width,
326
+ height: image.height
327
+ });
328
+ }
329
+ } catch {} finally {
330
+ tryDeleteEmbindHandle(face);
331
+ tryDeleteEmbindHandle(result.faces);
332
+ tryDeleteEmbindHandle(result);
333
+ }
334
+ }
335
+ }
336
+ async initialize(config) {
337
+ if (config.videoSelfie === true) {
338
+ this.pipelineType = 3;
339
+ await this.initializeBase(config, "videoSelfie");
340
+ } else if (config.useOnDeviceWorkflow === true) {
341
+ this.pipelineType = 5;
342
+ await this.initializeBase(config, "onDeviceSelfie");
343
+ } else await this.initializeBase(config, "selfie");
344
+ this.applyDefaults(config.autocaptureInterval ?? 0);
345
+ if (config.videoSelfie === true) this.setVideoSelfieMode(true);
346
+ }
347
+ processPhoto(canvas) {
348
+ faceProcessingWasmApi.processPhoto(canvas);
349
+ }
350
+ async postFaceResults(config) {
351
+ this.ensureInitialized();
352
+ return faceProcessingWasmApi.postFaceResults(config);
353
+ }
354
+ setCallbacks(callbacks) {
355
+ this.ensureInitialized();
356
+ this.onFaceDataCallback = callbacks.onFaceData;
357
+ const onCaptureWrapper = (wasmCanvas, face) => {
358
+ if (!wasmCanvas) return;
359
+ const frameCanvas = new IncodeCanvas(wasmCanvas);
360
+ frameCanvas.updateBase64Image();
361
+ frameCanvas.updateBlob();
362
+ const faceCoordinates = face ? this.formatFaceCoordinates(face) : this.createDefaultFaceCoordinates(frameCanvas);
363
+ callbacks.onCapture?.(frameCanvas, faceCoordinates);
364
+ };
365
+ this.currentOnCaptureWrapper = onCaptureWrapper;
366
+ faceProcessingWasmApi.setFaceDetectionCallbacks(this.getPipelineType(), callbacks.onFarAway ?? (() => {}), callbacks.onTooClose ?? (() => {}), callbacks.onTooManyFaces ?? (() => {}), callbacks.onNoFace ?? (() => {}), onCaptureWrapper, callbacks.onGetReady ?? (() => {}), callbacks.onGetReadyFinished ?? (() => {}), callbacks.onCenterFace ?? (() => {}), callbacks.onDark ?? (() => {}), callbacks.onBlur ?? (() => {}), callbacks.onFaceAngle ?? (() => {}), callbacks.onLenses ?? (() => {}), callbacks.onMask ?? (() => {}), callbacks.onEyesClosed ?? (() => {}), callbacks.onHeadWear ?? (() => {}), callbacks.onSwitchToManualCapture ?? (() => {}), callbacks.onFaceOccluded ?? (() => {}));
367
+ }
368
+ setPositionConstraints(constraints) {
369
+ this.ensureInitialized();
370
+ faceProcessingWasmApi.setFacePositionConstraints(this.getPipelineType(), constraints.minX, constraints.minY, constraints.maxX, constraints.maxY);
371
+ }
372
+ applyDefaults(autocaptureInterval = 0) {
373
+ this.ensureInitialized();
374
+ this.setThresholds({
375
+ brightnessThreshold: this.defaultThresholds.brightnessThreshold,
376
+ blurrinessThreshold: this.defaultThresholds.blurrinessThreshold,
377
+ tiltRotationAngleThreshold: this.defaultThresholds.tiltRotationAngleThreshold,
378
+ minMagicCropSize: this.defaultThresholds.minMagicCropSize,
379
+ autocaptureInterval,
380
+ minFaceQualityScore: this.defaultThresholds.minFaceQualityScore,
381
+ faceOcclusionThreshold: this.defaultThresholds.faceOcclusionThreshold,
382
+ getReadyDelay: this.defaultThresholds.getReadyDelay,
383
+ framesAggregationInterval: this.defaultThresholds.framesAggregationInterval,
384
+ minFramesWithFace: this.defaultThresholds.minFramesWithFace
385
+ });
386
+ this.setPositionConstraints({
387
+ minX: this.defaultThresholds.frameMinX,
388
+ minY: this.defaultThresholds.frameMinY,
389
+ maxX: this.defaultThresholds.frameMaxX,
390
+ maxY: this.defaultThresholds.frameMaxY
391
+ });
392
+ this.setAttributesThresholds({
393
+ headwearThreshold: this.defaultThresholds.headwearThreshold,
394
+ lensesThreshold: this.defaultThresholds.lensesThreshold,
395
+ closedEyesThreshold: this.defaultThresholds.closedEyesThreshold,
396
+ maskThreshold: this.defaultThresholds.maskThreshold
397
+ });
398
+ }
399
+ setAutocaptureInterval(interval) {
400
+ this.ensureInitialized();
401
+ if (!this.currentThresholds) {
402
+ this.applyDefaults(interval);
403
+ return;
404
+ }
405
+ this.setThresholds({
406
+ ...this.currentThresholds,
407
+ autocaptureInterval: interval
408
+ });
409
+ }
410
+ setThresholds(thresholds) {
411
+ this.ensureInitialized();
412
+ this.currentThresholds = { ...thresholds };
413
+ faceProcessingWasmApi.setFaceDetectionThresholds(this.getPipelineType(), thresholds.brightnessThreshold, thresholds.blurrinessThreshold, thresholds.tiltRotationAngleThreshold, thresholds.minMagicCropSize, thresholds.autocaptureInterval, thresholds.minFaceQualityScore, thresholds.faceOcclusionThreshold, thresholds.getReadyDelay, thresholds.framesAggregationInterval, thresholds.minFramesWithFace);
414
+ }
415
+ setAttributesThresholds(thresholds) {
416
+ this.ensureInitialized();
417
+ faceProcessingWasmApi.setFaceAttributesThresholds(this.getPipelineType(), thresholds.headwearThreshold, thresholds.lensesThreshold, thresholds.closedEyesThreshold, thresholds.maskThreshold);
418
+ }
419
+ setChecksEnabled(config) {
420
+ this.ensureInitialized();
421
+ faceProcessingWasmApi.setFaceChecksEnabled(this.getPipelineType(), config.lenses, config.mask, config.closedEyes, config.headWear, config.occlusion);
422
+ }
423
+ setVideoSelfieMode(enabled) {
424
+ this.ensureInitialized();
425
+ faceProcessingWasmApi.setFaceDetectionMode(this.getPipelineType(), enabled);
426
+ }
427
+ forceCapture() {
428
+ if (!this.currentFrame || !this.currentOnCaptureWrapper) return;
429
+ const frame = IncodeCanvas.fromImageData(this.currentFrame);
430
+ this.currentOnCaptureWrapper(frame.canvas);
431
+ }
432
+ reset() {
433
+ super.reset();
434
+ this.currentFrame = null;
435
+ this.onFaceDataCallback = void 0;
436
+ this.currentOnCaptureWrapper = void 0;
437
+ }
438
+ createDefaultFaceCoordinates(canvas) {
439
+ return {
440
+ rightEyeX: 0,
441
+ rightEyeY: 0,
442
+ leftEyeX: 0,
443
+ leftEyeY: 0,
444
+ noseTipX: 0,
445
+ noseTipY: 0,
446
+ rightMouthX: 0,
447
+ rightMouthY: 0,
448
+ mouthX: 0,
449
+ mouthY: 0,
450
+ x: 0,
451
+ y: 0,
452
+ width: canvas.width() ?? 0,
453
+ height: canvas.height() ?? 0
454
+ };
455
+ }
456
+ formatFaceCoordinates(face) {
457
+ return {
458
+ rightEyeX: face.rightEye.x,
459
+ rightEyeY: face.rightEye.y,
460
+ leftEyeX: face.leftEye.x,
461
+ leftEyeY: face.leftEye.y,
462
+ noseTipX: face.noseTip.x,
463
+ noseTipY: face.noseTip.y,
464
+ rightMouthX: face.rightMouthCorner.x,
465
+ rightMouthY: face.rightMouthCorner.y,
466
+ mouthX: face.leftMouthCorner.x,
467
+ mouthY: face.leftMouthCorner.y,
468
+ x: face.rect.x,
469
+ y: face.rect.y,
470
+ width: face.rect.width,
471
+ height: face.rect.height
472
+ };
473
+ }
474
+ };
475
+ //#endregion
476
+ export { sendLabelInspectionEvent as a, stopRecording as c, initializeDeepsightSession as i, stopStream as l, encryptSelfieImage as n, startDetection as o, initializeCamera as r, startRecordingSession as s, FaceDetectionProvider as t, isOnDeviceMode as u };
@@ -0,0 +1,36 @@
1
+ import { c as FaceAttributesThresholds, d as FaceDetectionCallbacks, f as FaceDetectionConfig, h as IFaceDetectionCapability, l as FaceChecksConfig, m as FacePositionConstraints, p as FaceDetectionThresholds, v as WebApiHostRequestConfig } from "./createFaceAvatar-BlcTYgJv.js";
2
+ import { t as BaseWasmProvider } from "./BaseWasmProvider-Dyi6dKp1.js";
3
+ //#region ../infra/src/providers/wasm/FaceDetectionProvider.d.ts
4
+ declare class FaceDetectionProvider extends BaseWasmProvider implements IFaceDetectionCapability {
5
+ private defaultThresholds;
6
+ private currentThresholds;
7
+ private currentFrame;
8
+ private onFaceDataCallback;
9
+ constructor();
10
+ processFrame(image: ImageData): Promise<void>;
11
+ initialize(config: FaceDetectionConfig): Promise<void>;
12
+ /**
13
+ * Last-registered onCapture callback — captured into a private
14
+ * field so `forceCapture()` (called from outside the WASM-callback
15
+ * lifecycle) can re-fire the same wrapper. `setCallbacks` rebinds
16
+ * this on each invocation, so the field always reflects the
17
+ * current consumer.
18
+ */
19
+ private currentOnCaptureWrapper;
20
+ processPhoto(canvas: HTMLCanvasElement): void;
21
+ postFaceResults(config?: WebApiHostRequestConfig): Promise<unknown>;
22
+ setCallbacks(callbacks: FaceDetectionCallbacks): void;
23
+ setPositionConstraints(constraints: FacePositionConstraints): void;
24
+ applyDefaults(autocaptureInterval?: number): void;
25
+ setAutocaptureInterval(interval: number): void;
26
+ setThresholds(thresholds: FaceDetectionThresholds): void;
27
+ setAttributesThresholds(thresholds: FaceAttributesThresholds): void;
28
+ setChecksEnabled(config: FaceChecksConfig): void;
29
+ setVideoSelfieMode(enabled: boolean): void;
30
+ forceCapture(): void;
31
+ reset(): void;
32
+ private createDefaultFaceCoordinates;
33
+ private formatFaceCoordinates;
34
+ }
35
+ //#endregion
36
+ export { FaceDetectionProvider as t };
@@ -1,35 +1,5 @@
1
- import { a as MLProviderConfig, i as IMLProviderCapability, o as IncodeCanvas } from "./IStorageCapability-ORkQfK3F.js";
2
- //#region ../infra/src/wasm/apiUtilities.d.ts
3
- /**
4
- * Shared WASM module loader.
5
- *
6
- * The pinned `webLib.wasm` (see `wasmDefaults.ts`) bundles BOTH the ML pipeline
7
- * APIs (used by `mlWasmJSApi.ts`) AND a C++ `WebClient` HTTP client (used by
8
- * `wasmWebClient.ts`). Both consumers must share a single instantiated
9
- * `wasmModule` — calling the glue `Module()` factory twice would re-instantiate
10
- * the WASM heap and produce divergent state.
11
- *
12
- * This module memoizes the load: the first caller (whichever arrives first —
13
- * ML init or HTTP init) triggers the fetch + glue load, and subsequent callers
14
- * await the same promise. Idempotent on success; on failure, the singleton is
15
- * cleared so the next caller retries.
16
- *
17
- * SIMD fallback mirrors the legacy behavior: try the SIMD binary + SIMD glue
18
- * (`webLibSimd.js` + `webLibSimd.wasm`) first, fall back to the non-SIMD pair
19
- * (`webLib.js` + `webLib.wasm`) on instantiation failure. Each binary MUST be
20
- * paired with its matching glue — the CDN ships them as paired artifacts and
21
- * mixing them produces an unusable module.
22
- */
23
- declare global {
24
- interface Window {
25
- Module?: WasmGlueFactory;
26
- wasmArrayBuffer: Uint8Array | null;
27
- }
28
- }
29
- /** Opaque handle for the loaded WASM module instance. */
30
- type WasmModule = Record<string, unknown>;
31
- type WasmGlueFactory = () => Promise<WasmModule>;
32
- //#endregion
1
+ import "./warmup-Cis2p6O0.js";
2
+ import { _ as MLProviderConfig, g as IMLProviderCapability, y as IncodeCanvas } from "./createFaceAvatar-BlcTYgJv.js";
33
3
  //#region ../infra/src/wasm/mlWasmBridgeTypes.d.ts
34
4
  /**
35
5
  * Decoded PDF417 barcode surfaced from the WASM ID-capture pipeline during
@@ -102,7 +72,11 @@ interface IdCaptureCallbacks {
102
72
  onBlur?: () => void;
103
73
  onGlare?: () => void;
104
74
  onCapturing?: () => void;
105
- onCapture?: () => void;
75
+ /**
76
+ * Receives the exact best-shot canvas detached by the Core ID workflow.
77
+ * The canvas is presentation-only; protected submission remains native-owned.
78
+ */
79
+ onCapture?: (canvas?: HTMLCanvasElement | null) => void;
106
80
  onBestFrame?: (blur: number, glare: number, orientation: string) => void;
107
81
  onIdNotDetected?: () => void;
108
82
  onSwitchToManualCapture?: () => void;