@incodetech/core 0.0.0-dev-20260715-b208c5e1 → 0.0.0-dev-20260715-dcc78bcd

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 (282) hide show
  1. package/dist/{3dAvatarProvider-BYxFCuIv.esm.js → 3dAvatarProvider-D9H4rR6_.esm.js} +811 -880
  2. package/dist/Actor-iTq7YY48.d.ts +1 -0
  3. package/dist/{BrowserStorageProvider-CBXGCHnK.esm.js → BrowserStorageProvider-P6aUarE9.esm.js} +1 -2
  4. package/dist/{BrowserTimerProvider-CHloo0eQ.esm.js → BrowserTimerProvider-BXhgNxLt.esm.js} +1 -2
  5. package/dist/{BrowserVisibilityObserverProvider-B04zvOXW.esm.js → BrowserVisibilityObserverProvider-sJclps4C.esm.js} +1 -3
  6. package/dist/{Face2DProvider-TeN1Xqr0.esm.js → Face2DProvider-xWUeSJZI.esm.js} +10 -22
  7. package/dist/{createFaceAvatar-BjBu2CrU.d.ts → FaceDetectionProvider-BHweGBEM.d.ts} +108 -159
  8. package/dist/IFaceAvatarCapability-BrL19G0s.d.ts +23 -0
  9. package/dist/IStorageCapability-B8IGxCwe.d.ts +131 -0
  10. package/dist/{ITimerCapability-G7lQg-be.esm.js → ITimerCapability-DgdDzp8G.esm.js} +1 -2
  11. package/dist/{Manager-DE5DydXZ.d.ts → Manager-CQQ99QOI.d.ts} +1 -0
  12. package/dist/{MotionSensorProvider-BkHKMCPE.esm.js → MotionSensorProvider-DYvM90IX.esm.js} +1 -2
  13. package/dist/{OpenViduRecordingProvider-xR5osKzW.esm.js → OpenViduRecordingProvider-Du98qevC.esm.js} +2 -4
  14. package/dist/{PrivacyLensProvider-CqlsCaJv.esm.js → PrivacyLensProvider-BrYSd1dr.esm.js} +2 -5
  15. package/dist/StateMachine-EDpYWy0i.d.ts +6 -0
  16. package/dist/{StreamCanvasCapture-CRk7c7u7.esm.js → StreamCanvasCapture-D2XcXCZ4.esm.js} +2 -4
  17. package/dist/{WasmUtilProvider-BNQ2PBjG.esm.js → WasmUtilProvider-DAshwHhX.esm.js} +38 -71
  18. package/dist/{addressSearch-B2NxSpHl.esm.js → addressSearch-DH-IPF-w.esm.js} +10 -21
  19. package/dist/ae-signature.d.ts +2 -6
  20. package/dist/ae-signature.esm.js +10 -11
  21. package/dist/antifraud.d.ts +1 -6
  22. package/dist/antifraud.esm.js +3 -8
  23. package/dist/{antifraudManager-C490m0p4.d.ts → antifraudManager-BY36bS12.d.ts} +3 -3
  24. package/dist/{antifraudManager-C1xnhF2Q.esm.js → antifraudManager-CL2YhiVX.esm.js} +11 -8
  25. package/dist/{antifraudStateMachine-BQVw46N5.esm.js → antifraudStateMachine-Bf-IiCq7.esm.js} +5 -7
  26. package/dist/{api-DsbUi7TO.esm.js → api-BDTZNnca.esm.js} +1 -2
  27. package/dist/{apiError-DkOXfFBu.esm.js → apiError-COvIGYWe.esm.js} +1 -2
  28. package/dist/authentication.d.ts +2 -19
  29. package/dist/authentication.esm.js +3 -34
  30. package/dist/{authenticationManager-DZXQpCjQ.esm.js → authenticationManager-DM7ttL5V.esm.js} +7 -10
  31. package/dist/{authenticationManager-BD81fnrn.d.ts → authenticationManager-G-k-13Fe.d.ts} +3 -4
  32. package/dist/{authenticationStateMachine-CJrTbLWU.esm.js → authenticationStateMachine-DiI8jfmO.esm.js} +11 -15
  33. package/dist/avatar.d.ts +2 -2
  34. package/dist/avatar.esm.js +2 -3
  35. package/dist/{backCameraStream-DYnfq7Hr.esm.js → backCameraStream-Heg6vA1j.esm.js} +4 -7
  36. package/dist/browser-DlFgHpoC-DnyrCR8r.esm.js +1513 -0
  37. package/dist/callback-645_omgz.d.ts +133 -0
  38. package/dist/{camera-B0yWS33x.esm.js → camera-BmFEyPP_.esm.js} +1 -2
  39. package/dist/camera.d.ts +1 -2
  40. package/dist/camera.esm.js +2 -6
  41. package/dist/{canvas-DsJa51yU.esm.js → canvas-E1zGkel4.esm.js} +1 -2
  42. package/dist/certificate-issuance.d.ts +34 -39
  43. package/dist/certificate-issuance.esm.js +4 -11
  44. package/dist/{certificateIssuanceStateMachine-CpewPqas.esm.js → certificateIssuanceStateMachine-Ce568YfR.esm.js} +7 -11
  45. package/dist/{clientLifecycle-CCJMDjFe.esm.js → clientLifecycle-DzT65Fvf.esm.js} +23 -29
  46. package/dist/consent.d.ts +1 -4
  47. package/dist/consent.esm.js +3 -8
  48. package/dist/{consentManager-r4MTIoV3.esm.js → consentManager-D3GyyH5u.esm.js} +5 -7
  49. package/dist/{consentManager-QGuw4zmH.d.ts → consentManager-DLOyIZzt.d.ts} +58 -64
  50. package/dist/{consentStateMachine-DnqwsZ7o.esm.js → consentStateMachine-Pc3Ez3mV.esm.js} +5 -7
  51. package/dist/{cpf-B9htWzDt.esm.js → cpf-BIADjddF.esm.js} +1 -2
  52. package/dist/cpf-ocr.d.ts +1 -5
  53. package/dist/cpf-ocr.esm.js +2 -8
  54. package/dist/{cpfOcrManager-RkeZCqSz.d.ts → cpfOcrManager-CQkUAeWO.d.ts} +21 -23
  55. package/dist/{cpfOcrManager-D6ZQ9kkv.esm.js → cpfOcrManager-Cwm0MesJ.esm.js} +7 -12
  56. package/dist/createFaceAvatar-BEj18KXi.d.ts +50 -0
  57. package/dist/{createFaceAvatar-B_v2At2h.esm.js → createFaceAvatar-CwVapQiu.esm.js} +5 -9
  58. package/dist/cross-document-data-match.d.ts +1 -5
  59. package/dist/cross-document-data-match.esm.js +2 -8
  60. package/dist/{crossDocumentDataMatchManager-DoFG_S91.esm.js → crossDocumentDataMatchManager-9rdIO8Qk.esm.js} +12 -12
  61. package/dist/{crossDocumentDataMatchManager-CdiqxhJm.d.ts → crossDocumentDataMatchManager-Dq8Z3SOg.d.ts} +3 -3
  62. package/dist/curp-validation.d.ts +1 -11
  63. package/dist/curp-validation.esm.js +3 -8
  64. package/dist/{curpValidationManager-07oV78Bn.d.ts → curpValidationManager--HSBTwOy.d.ts} +4 -6
  65. package/dist/{curpValidationManager-D6jt1Gs9.esm.js → curpValidationManager-C2i9Lzx9.esm.js} +11 -7
  66. package/dist/{curpValidationStateMachine-Dlw4qfFb.esm.js → curpValidationStateMachine-7i3TD8J2.esm.js} +22 -14
  67. package/dist/custom-fields.d.ts +2 -5
  68. package/dist/custom-fields.esm.js +24 -11
  69. package/dist/custom-watchlist.d.ts +1 -3
  70. package/dist/custom-watchlist.esm.js +11 -10
  71. package/dist/{customWatchlistStateMachine-D8w0mNxm.esm.js → customWatchlistStateMachine-D23XTxl2.esm.js} +5 -7
  72. package/dist/{dateUtils-BW6mBV6p.esm.js → dateUtils-CvG0FvK8.esm.js} +1 -2
  73. package/dist/{deepsightService-CV1NAkg9.esm.js → deepsightLoader-CQWGVLP0.esm.js} +62 -14
  74. package/dist/deepsightService-CR-CYdka.d.ts +218 -0
  75. package/dist/device.d.ts +0 -1
  76. package/dist/device.esm.js +5 -10
  77. package/dist/document-capture.d.ts +1 -6
  78. package/dist/document-capture.esm.js +3 -16
  79. package/dist/document-upload.d.ts +48 -55
  80. package/dist/document-upload.esm.js +8 -14
  81. package/dist/{documentCaptureManager-HNu28khr.d.ts → documentCaptureManager-Biz_PFqs.d.ts} +190 -199
  82. package/dist/{documentCaptureManager-pufyUaQz.esm.js → documentCaptureManager-DijbJFun.esm.js} +5 -7
  83. package/dist/{documentCaptureStateMachine-CaJgb_Vn.esm.js → documentCaptureStateMachine-qgsrlcVh.esm.js} +11 -15
  84. package/dist/dynamic-forms.d.ts +1 -4
  85. package/dist/dynamic-forms.esm.js +3 -10
  86. package/dist/{dynamicFormsManager-C3jlNlWK.esm.js → dynamicFormsManager-COik5bJ7.esm.js} +41 -7
  87. package/dist/{dynamicFormsManager-HQhUJCLg.d.ts → dynamicFormsManager-Dposae2l.d.ts} +3 -4
  88. package/dist/{dynamicFormsStateMachine-DdpJI6ne.esm.js → dynamicFormsStateMachine-BV-Fn13x.esm.js} +7 -11
  89. package/dist/ekyb.d.ts +4 -11
  90. package/dist/ekyb.esm.js +3 -20
  91. package/dist/{ekybManager-l67BnqxH.esm.js → ekybManager-BTcW4poN.esm.js} +17 -7
  92. package/dist/{ekybManager-CZUVEWMw.d.ts → ekybManager-CBX0tM04.d.ts} +4 -5
  93. package/dist/{ekybStateMachine-BmfNaHRF.esm.js → ekybStateMachine-DmZLm35R.esm.js} +16 -25
  94. package/dist/ekyc.d.ts +2 -7
  95. package/dist/ekyc.esm.js +3 -11
  96. package/dist/{ekycManager-ClRqj2rg.d.ts → ekycManager-BFpHbBoT.d.ts} +4 -5
  97. package/dist/{ekycManager-B_uUa1iN.esm.js → ekycManager-BSMlIpGA.esm.js} +14 -7
  98. package/dist/{ekycStateMachine-BD8GjdL5.esm.js → ekycStateMachine-a7oP-XWo.esm.js} +140 -201
  99. package/dist/electronic-signature.d.ts +2 -5
  100. package/dist/electronic-signature.esm.js +2 -10
  101. package/dist/{electronicSignatureManager-CzMj-Tjm.esm.js → electronicSignatureManager-DSZu9OHT.esm.js} +9 -14
  102. package/dist/email.d.ts +1 -5
  103. package/dist/email.esm.js +3 -10
  104. package/dist/{emailManager-Lv9BHgel.d.ts → emailManager-CADXW_9X.d.ts} +4 -7
  105. package/dist/{emailManager-BsynjdWX.esm.js → emailManager-c-mDLieD.esm.js} +76 -12
  106. package/dist/{emailStateMachine-Z-Jf4qOc.esm.js → emailStateMachine-ChNwY22u.esm.js} +7 -9
  107. package/dist/{endpoints-CwrFQfW7.esm.js → endpoints-DLQ0g4-R.esm.js} +33 -2
  108. package/dist/{events-aeCkGlnn.esm.js → events-Dy8PyVO5.esm.js} +4 -168
  109. package/dist/events.d.ts +1 -9
  110. package/dist/events.esm.js +2 -4
  111. package/dist/extensibility.d.ts +30 -42
  112. package/dist/extensibility.esm.js +29 -87
  113. package/dist/{externalFetch-hvmz_npP.esm.js → externalFetch-BKBThAUC.esm.js} +2 -4
  114. package/dist/face-match.d.ts +1 -5
  115. package/dist/face-match.esm.js +3 -8
  116. package/dist/{faceCaptureManagerFactory-CGFQg1kl.d.ts → faceCaptureManagerFactory-BWD3O4Eg.d.ts} +50 -14
  117. package/dist/{faceCaptureManagerFactory-BIH53wvb.esm.js → faceCaptureManagerFactory-CZLSziU3.esm.js} +49 -28
  118. package/dist/{faceCaptureSetup-shrwrZaK.esm.js → faceCaptureSetup-__lVldUG.esm.js} +12 -15
  119. package/dist/{faceMatchManager-BrNYVk-p.esm.js → faceMatchManager-B7jlv77Q.esm.js} +24 -7
  120. package/dist/{faceMatchManager-X2eQo0o-.d.ts → faceMatchManager-CJQG1W1u.d.ts} +4 -4
  121. package/dist/{faceMatchStateMachine-CbeacEqd.esm.js → faceMatchStateMachine-DD7FxtUj.esm.js} +6 -9
  122. package/dist/field-comparison.d.ts +1 -4
  123. package/dist/field-comparison.esm.js +2 -7
  124. package/dist/{fieldComparisonManager-BxhleGNI.esm.js → fieldComparisonManager-5LlxYad-.esm.js} +6 -11
  125. package/dist/{fieldComparisonManager-Dg03uIX1.d.ts → fieldComparisonManager-CBvEGxFx.d.ts} +3 -5
  126. package/dist/fiscal-qr.d.ts +1 -6
  127. package/dist/fiscal-qr.esm.js +14 -29
  128. package/dist/flow-events.d.ts +2 -9
  129. package/dist/flow.d.ts +13 -19
  130. package/dist/flow.esm.js +109 -34
  131. package/dist/{flowCompletionService-qf-s8Uxl.esm.js → flowCompletionService-DQSC7Kso.esm.js} +4 -6
  132. package/dist/{flowServices-CJXaWFlZ.esm.js → flowServices-BQEUaMg6.esm.js} +10 -11
  133. package/dist/geolocation.d.ts +1 -4
  134. package/dist/geolocation.esm.js +3 -9
  135. package/dist/{geolocationManager-CAtyY00b.d.ts → geolocationManager-BWhRzBjk.d.ts} +3 -4
  136. package/dist/{geolocationManager-4j_DV3jW.esm.js → geolocationManager-D58ehBHU.esm.js} +19 -8
  137. package/dist/{geolocationStateMachine-BE72KBAX.esm.js → geolocationStateMachine-BorcBNZ6.esm.js} +6 -8
  138. package/dist/getBrowser-Cb8Zgrgp.esm.js +7 -0
  139. package/dist/{getDeviceClass-BdgmyOOu.esm.js → getDeviceClass-CeBiEayS.esm.js} +1 -2
  140. package/dist/{getDeviceClass-DsNb6nEl.esm.js → getDeviceClass-CkgnSJel.esm.js} +3 -5
  141. package/dist/{getBrowser-CZ66VtC7.esm.js → getParsedUserAgent-pJjATANs.esm.js} +109 -30
  142. package/dist/government-validation.d.ts +3 -6
  143. package/dist/government-validation.esm.js +7 -13
  144. package/dist/{governmentValidationStateMachine-BfZ_WQC0.esm.js → governmentValidationStateMachine-DkakcwTj.esm.js} +8 -11
  145. package/dist/home.d.ts +14 -22
  146. package/dist/home.esm.js +3 -8
  147. package/dist/http.d.ts +0 -1
  148. package/dist/http.esm.js +2 -4
  149. package/dist/id-ocr.d.ts +1 -5
  150. package/dist/id-ocr.esm.js +3 -9
  151. package/dist/id-verification.d.ts +1 -4
  152. package/dist/id-verification.esm.js +3 -8
  153. package/dist/id.d.ts +105 -18
  154. package/dist/id.esm.js +40 -50
  155. package/dist/{idCaptureDefaults-Df8XKQ0o.esm.js → idCaptureDefaults-Dzfws4i0.esm.js} +9 -16
  156. package/dist/{idCaptureManager-Fr9c67Rx.esm.js → idCaptureManager-BGAdNNVq.esm.js} +117 -23
  157. package/dist/{idCaptureManager-BXG8kVMW.d.ts → idCaptureManager-CSGbGORT.d.ts} +12 -113
  158. package/dist/{idCaptureStateMachine-CpjwdaYN.esm.js → idCaptureStateMachine-DYgckwCg.esm.js} +56 -195
  159. package/dist/{idOcrManager-DLF3J2cx.esm.js → idOcrManager-niAg-BE0.esm.js} +4 -7
  160. package/dist/{idOcrManager-DnhdGuVX.d.ts → idOcrManager-vXa7GdRh.d.ts} +60 -66
  161. package/dist/{idOcrStateMachine-BPXTUjNY.esm.js → idOcrStateMachine-CpZZL411.esm.js} +13 -18
  162. package/dist/{idVerificationManager-BD2FO09A.d.ts → idVerificationManager-BB4Pj_N6.d.ts} +31 -35
  163. package/dist/{idVerificationManager-23kPMn7T.esm.js → idVerificationManager-CujJqsiX.esm.js} +4 -7
  164. package/dist/{idVerificationStateMachine-C1eMEu_Y.esm.js → idVerificationStateMachine-D-1GlgC5.esm.js} +5 -7
  165. package/dist/identity-reuse.d.ts +1 -4
  166. package/dist/identity-reuse.esm.js +3 -8
  167. package/dist/{identityReuseManager-Ct-9qYpC.esm.js → identityReuseManager-DHfJZTVo.esm.js} +24 -7
  168. package/dist/{identityReuseManager-DOufEjLa.d.ts → identityReuseManager-aTyLyYrr.d.ts} +38 -43
  169. package/dist/{identityReuseStateMachine-Cqc-NwEQ.esm.js → identityReuseStateMachine-CM45EBrb.esm.js} +6 -8
  170. package/dist/index-B8weJxmL.d.ts +1 -0
  171. package/dist/index-BKOWUhxG.d.ts +258 -0
  172. package/dist/{index-WMHgnbC1.d.ts → index-CKbmDFNq.d.ts} +160 -165
  173. package/dist/{index-Bk5nhSg2.d.ts → index-DQ2fdqoI.d.ts} +3 -3
  174. package/dist/index.d.ts +1 -3
  175. package/dist/index.esm.js +2 -15
  176. package/dist/{invokeOnCaptureCallback-Bs09kdY_.esm.js → invokeOnCaptureCallback-B-QfsCQY.esm.js} +2 -4
  177. package/dist/{lib-DvZ6nVvW.esm.js → lib-DAyUtOTj.esm.js} +1510 -1589
  178. package/dist/mandatory-consent.d.ts +1 -10
  179. package/dist/mandatory-consent.esm.js +3 -8
  180. package/dist/{mandatoryConsentManager-D0qQHcl2.d.ts → mandatoryConsentManager-BlB4bX6_.d.ts} +59 -65
  181. package/dist/{mandatoryConsentManager-Bh_n0uEP.esm.js → mandatoryConsentManager-CQC-zA4P.esm.js} +4 -7
  182. package/dist/{mandatoryConsentStateMachine-DYeKH1L7.esm.js → mandatoryConsentStateMachine-BN4Obfl7.esm.js} +5 -7
  183. package/dist/{mediaRecorderOptions-BIn657lu.esm.js → mediaRecorderOptions-BhSZDDNb.esm.js} +2 -4
  184. package/dist/{mediapipeShared-B-RiRyLN.esm.js → mediapipeShared-B0iQQ5k7.esm.js} +2 -6
  185. package/dist/{onDeviceFaceResults-CJuDp67S.esm.js → onDeviceFaceResults-LRTvBL7m.esm.js} +18 -84
  186. package/dist/openviduLazy-CCDpFWg1.esm.js +10 -0
  187. package/dist/{otp-D_9QPNbs.d.ts → otp-CEWfTj9v.d.ts} +0 -1
  188. package/dist/{otp-Bbe_izFJ.esm.js → otp-D2k3PeSL.esm.js} +3 -14
  189. package/dist/{permissionGuards-CayfS8OY.esm.js → permissionGuards-DguX5vFY.esm.js} +2 -4
  190. package/dist/{permissionServices-B7lD6fiG.esm.js → permissionServices-DwNCUB2I.esm.js} +4 -9
  191. package/dist/personhood.d.ts +13 -20
  192. package/dist/personhood.esm.js +153 -72
  193. package/dist/phone.d.ts +1 -5
  194. package/dist/phone.esm.js +3 -10
  195. package/dist/{phoneManager-85eRUhJD.d.ts → phoneManager-BBU8Lq0O.d.ts} +4 -7
  196. package/dist/{phoneManager-Byive8Xl.esm.js → phoneManager-KbcmjEeH.esm.js} +82 -12
  197. package/dist/{phoneStateMachine-BlYF4nKx.esm.js → phoneStateMachine-wDQtaT38.esm.js} +7 -9
  198. package/dist/{platform-BoeUeUrV.esm.js → platform-wmV7oTAJ.esm.js} +1 -9
  199. package/dist/qe-signature.d.ts +2 -6
  200. package/dist/qe-signature.esm.js +10 -11
  201. package/dist/{recordingService-BzQUrf40.esm.js → recordingService-TuBlOjvH.esm.js} +15 -19
  202. package/dist/redirect-to-mobile.d.ts +1 -6
  203. package/dist/redirect-to-mobile.esm.js +3 -10
  204. package/dist/{redirectToMobileManager-DrxIfZr8.esm.js → redirectToMobileManager-EGXGKftv.esm.js} +25 -8
  205. package/dist/{redirectToMobileManager-2TtzpSOw.d.ts → redirectToMobileManager-NVQM3o5P.d.ts} +3 -4
  206. package/dist/{redirectToMobileStateMachine-BetR6r8p.esm.js → redirectToMobileStateMachine-D-8ipBq2.esm.js} +7 -9
  207. package/dist/rolldown-runtime-FZ4Itg2g.esm.js +42 -0
  208. package/dist/{runChildModule-FH_tixbR.esm.js → runChildModule-Crz1nHwJ.esm.js} +5 -9
  209. package/dist/selfie.d.ts +7 -20
  210. package/dist/selfie.esm.js +40 -46
  211. package/dist/{selfieManager-CdUnYjmt.esm.js → selfieManager-C4_2DgTF.esm.js} +7 -10
  212. package/dist/{selfieManager-d7nkO-UP.d.ts → selfieManager-CN8wJ14s.d.ts} +3 -4
  213. package/dist/{selfieStateMachine-zz4WqziP.esm.js → selfieStateMachine-ODRceav2.esm.js} +15 -20
  214. package/dist/selfieUploadService-B4LnSIf6.esm.js +62 -0
  215. package/dist/session-CQ2x2aLl.esm.js +1 -0
  216. package/dist/session.d.ts +2 -9
  217. package/dist/session.esm.js +153 -15
  218. package/dist/sessionInitializer-Cjpnacyg.esm.js +1801 -0
  219. package/dist/{setup-BxB6QUto.d.ts → setup-CgBvqGWw.d.ts} +2 -4
  220. package/dist/{setup-DCyhfufM.esm.js → setup-Hyb_Yiuu.esm.js} +126 -18
  221. package/dist/signature.d.ts +2 -6
  222. package/dist/signature.esm.js +6 -9
  223. package/dist/{signatureStateMachine-U8ewxW1t.esm.js → signatureStateMachine-BmKPC5A9.esm.js} +5 -7
  224. package/dist/spawn-D9jgw9pW.d.ts +1441 -0
  225. package/dist/{stats-BVy52wLy.esm.js → stats-Bu6bL_CX.esm.js} +3 -5
  226. package/dist/stats.esm.js +2 -5
  227. package/dist/topLevelStateName-B5i2avbh.esm.js +41 -0
  228. package/dist/{tri-Calc36Ny.esm.js → tri-N-xlKhZK.esm.js} +3 -7
  229. package/dist/tri.d.ts +2 -2
  230. package/dist/tri.esm-BIjHhBJ2.esm.js +2620 -0
  231. package/dist/tri.esm.js +2 -4
  232. package/dist/trust-graph.d.ts +4 -5
  233. package/dist/trust-graph.esm.js +13 -9
  234. package/dist/{types-Db2ooXIu.esm.js → types-BN5RPPIZ.esm.js} +1 -2
  235. package/dist/{types-ZezaAAbn.d.ts → types-BfgmV7s7.d.ts} +2 -2
  236. package/dist/{types-NizIIgLD.d.ts → types-BnEHzP1K.d.ts} +3 -5
  237. package/dist/{types-DCOl8zy6.d.ts → types-Vb4P9ovf.d.ts} +1 -3
  238. package/dist/{types-C0D4Brd6.d.ts → types-ctqh-iS4.d.ts} +80 -6
  239. package/dist/{urlUtils-CpiYwn7w.esm.js → urlUtils-D6phjq1-.esm.js} +1 -2
  240. package/dist/{video-DXf5H9rY.esm.js → video-BtSWtHy1.esm.js} +1 -2
  241. package/dist/video-selfie.d.ts +10 -15
  242. package/dist/video-selfie.esm.js +114 -106
  243. package/dist/{videoSelfieSteps-DAky5sq5.esm.js → videoSelfieSteps-DHcibfYH.esm.js} +1 -2
  244. package/dist/wasm.d.ts +2 -4
  245. package/dist/wasm.esm.js +3 -15
  246. package/dist/watchlist-for-business.d.ts +1 -3
  247. package/dist/watchlist-for-business.esm.js +9 -9
  248. package/dist/watchlist.d.ts +1 -3
  249. package/dist/watchlist.esm.js +11 -10
  250. package/dist/{watchlistForBusinessStateMachine-Bbn_dcVT.esm.js → watchlistForBusinessStateMachine-BC_-3fJs.esm.js} +5 -7
  251. package/dist/{watchlistStateMachine-SZ-1xpe4.esm.js → watchlistStateMachine-CL2j3aRl.esm.js} +5 -7
  252. package/dist/workflow.d.ts +124 -146
  253. package/dist/workflow.esm.js +75 -80
  254. package/dist/xstate-actors.esm-CtI5S0f4.esm.js +310 -0
  255. package/dist/{xstate.esm-nY3M5UYm.esm.js → xstate.esm-Cf4e0Cfd.esm.js} +136 -610
  256. package/package.json +2 -2
  257. package/dist/Actor-CdjYVucI.d.ts +0 -2
  258. package/dist/FaceDetectionProvider-D-zCGbS9.d.ts +0 -119
  259. package/dist/IWasmUtilCapability-CuiW_6d1.d.ts +0 -150
  260. package/dist/StateMachine-BTkXO3Na.d.ts +0 -2
  261. package/dist/StreamCanvasCapture-D9u4hwul.d.ts +0 -42
  262. package/dist/ae-signature-eQWjmzE8.esm.js +0 -12
  263. package/dist/browser-DlFgHpoC-BTB6a7n-.esm.js +0 -1425
  264. package/dist/browserSimulation-CQjwFn0Z.esm.js +0 -1256
  265. package/dist/canvas-COIxuirO.d.ts +0 -112
  266. package/dist/chunk-CIKcdghV.esm.js +0 -49
  267. package/dist/deepsightLoader-BppeThau.esm.js +0 -67
  268. package/dist/deepsightService-mkIAy_Eq.d.ts +0 -69
  269. package/dist/http-C3Pq6njG.esm.js +0 -0
  270. package/dist/index-BD6ZVw2f.d.ts +0 -93
  271. package/dist/openviduLazy-CuGqb-8Q.esm.js +0 -12
  272. package/dist/openviduLazy-DNb0xHJp.esm.js +0 -3
  273. package/dist/qe-signature-D9XM2d-F.esm.js +0 -12
  274. package/dist/session--C2lbjK5.esm.js +0 -152
  275. package/dist/sessionInitializer-Dx_oPfHP.esm.js +0 -548
  276. package/dist/tri.esm-BDhptA8x.esm.js +0 -2593
  277. /package/dist/{IVisibilityObserverCapability-C3tAkSfF.d.ts → IVisibilityObserverCapability-D4tvIB5v.d.ts} +0 -0
  278. /package/dist/{camera-DRH7co71.d.ts → camera-9wWD-pwg.d.ts} +0 -0
  279. /package/dist/{flowCompletionService-DGcE_OvO.d.ts → flowCompletionService-BlAHsKyv.d.ts} +0 -0
  280. /package/dist/{types-DawqnFVn.d.ts → types-BT-aiBYV.d.ts} +0 -0
  281. /package/dist/{types-B6KIOo6S.d.ts → types-Bk_6dmDa.d.ts} +0 -0
  282. /package/dist/{warmup-CE9Fhs6N.d.ts → warmup-Dv2alr2-.d.ts} +0 -0
@@ -1,7 +1,6 @@
1
- import { t as WasmUtilProvider } from "./WasmUtilProvider-BNQ2PBjG.esm.js";
2
- import { t as MotionSensorProvider } from "./MotionSensorProvider-BkHKMCPE.esm.js";
3
- import { a as stopCameraStream, r as requestCameraAccess } from "./camera-B0yWS33x.esm.js";
4
-
1
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-DAshwHhX.esm.js";
2
+ import { t as MotionSensorProvider } from "./MotionSensorProvider-DYvM90IX.esm.js";
3
+ import { a as stopCameraStream, r as requestCameraAccess } from "./camera-BmFEyPP_.esm.js";
5
4
  //#region ../infra/src/media/cameraPermissionSession.ts
6
5
  const CAMERA_PERMISSIONS_GRANTED_KEY = "cameraPermissionsGranted";
7
6
  function isCameraGrantedInSession() {
@@ -12,7 +11,6 @@ function markCameraPermissionsGrantedInSession() {
12
11
  if (typeof sessionStorage === "undefined") return;
13
12
  sessionStorage.setItem(CAMERA_PERMISSIONS_GRANTED_KEY, String(true));
14
13
  }
15
-
16
14
  //#endregion
17
15
  //#region ../infra/src/media/permissions.ts
18
16
  async function queryPermission(name) {
@@ -26,7 +24,6 @@ async function queryPermission(name) {
26
24
  async function queryCameraPermission() {
27
25
  return queryPermission("camera");
28
26
  }
29
-
30
27
  //#endregion
31
28
  //#region src/internal/permissions/wasmMotionPrimeState.ts
32
29
  let wasmMotionPrimedForModule = false;
@@ -39,7 +36,6 @@ function markWasmMotionPrimedForModule() {
39
36
  function isWasmMotionPrimedForModule() {
40
37
  return wasmMotionPrimedForModule;
41
38
  }
42
-
43
39
  //#endregion
44
40
  //#region src/internal/permissions/permissionServices.ts
45
41
  function isCameraGrantedForMotionPrime(options) {
@@ -128,6 +124,5 @@ async function invokeRequestPermissionActor(input) {
128
124
  }
129
125
  return requestPermission({ requestMotion: true });
130
126
  }
131
-
132
127
  //#endregion
133
- export { isWasmMotionPrimedForModule as a, requestPermission as i, invokeRequestPermissionActor as n, resetWasmMotionPrimedForModule as o, primeMotionFromUserGestureIfNeeded as r, checkPermission as t };
128
+ export { isWasmMotionPrimedForModule as a, requestPermission as i, invokeRequestPermissionActor as n, resetWasmMotionPrimedForModule as o, primeMotionFromUserGestureIfNeeded as r, checkPermission as t };
@@ -1,22 +1,14 @@
1
- import "./warmup-CE9Fhs6N.js";
2
- import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-BTkXO3Na.js";
3
- import { t as Manager } from "./Manager-DE5DydXZ.js";
4
- import { t as ActorRefFrom } from "./Actor-CdjYVucI.js";
5
- import { t as CameraStream } from "./camera-DRH7co71.js";
6
- import "./types-DCOl8zy6.js";
7
- import "./types-B6KIOo6S.js";
8
- import { t as IncodeCanvas } from "./canvas-COIxuirO.js";
9
- import "./createFaceAvatar-BjBu2CrU.js";
10
- import "./types-NizIIgLD.js";
11
- import { i as IStorageCapability, t as IWasmUtilCapability } from "./IWasmUtilCapability-CuiW_6d1.js";
12
- import { n as PermissionStatus, t as PermissionResult } from "./types-DawqnFVn.js";
13
- import { n as DetectionStatus } from "./types-C0D4Brd6.js";
14
- import { t as FaceDetectionProvider } from "./FaceDetectionProvider-D-zCGbS9.js";
15
- import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D9u4hwul.js";
16
- import { t as DeepsightService } from "./deepsightService-mkIAy_Eq.js";
17
-
1
+ import { A as StateMachine, i as ActorRefFrom, l as AnyStateMachine } from "./spawn-D9jgw9pW.js";
2
+ import "./StateMachine-EDpYWy0i.js";
3
+ import { t as Manager } from "./Manager-CQQ99QOI.js";
4
+ import "./Actor-iTq7YY48.js";
5
+ import { t as CameraStream } from "./camera-9wWD-pwg.js";
6
+ import { n as StreamCanvasCapture, r as IncodeCanvas, t as DeepsightService } from "./deepsightService-CR-CYdka.js";
7
+ import { t as FaceDetectionProvider } from "./FaceDetectionProvider-BHweGBEM.js";
8
+ import { t as IStorageCapability } from "./IStorageCapability-B8IGxCwe.js";
9
+ import { n as DetectionStatus, s as IWasmUtilCapability } from "./types-ctqh-iS4.js";
10
+ import { n as PermissionStatus, t as PermissionResult } from "./types-BT-aiBYV.js";
18
11
  //#region src/modules/personhood/types.d.ts
19
-
20
12
  /**
21
13
  * Head pose (degrees) computed per-frame from the WASM face detector.
22
14
  * Used internally by the personhood detection actor to accumulate the
@@ -339,12 +331,13 @@ type PersonhoodEvent = {
339
331
  type: 'QUIT';
340
332
  } | {
341
333
  type: 'RESET';
342
- }
334
+ } |
343
335
  /**
344
336
  * Triggered from the UI when the user declines camera access but still
345
337
  * wants a verdict (server fallback). Also dispatched automatically when
346
338
  * the device has no camera at all.
347
- */ | {
339
+ */
340
+ {
348
341
  type: 'USE_FALLBACK';
349
342
  } | {
350
343
  type: 'DETECTION_UPDATE';
@@ -1,31 +1,18 @@
1
- import { t as WasmUtilProvider } from "./WasmUtilProvider-BNQ2PBjG.esm.js";
2
- import { t as BrowserTimerProvider } from "./BrowserTimerProvider-CHloo0eQ.esm.js";
3
- import { t as api } from "./api-DsbUi7TO.esm.js";
4
- import { a as createApi_default, t as getStoredHttpConfig } from "./clientLifecycle-CCJMDjFe.esm.js";
5
- import { n as eventModuleNames } from "./events-aeCkGlnn.esm.js";
6
- import { t as endpoints } from "./endpoints-CwrFQfW7.esm.js";
7
- import "./stats-BVy52wLy.esm.js";
8
- import { d as BrowserEnvironmentProvider, n as getFingerprintEnabled, u as getDeviceFingerprintInfo } from "./sessionInitializer-Dx_oPfHP.esm.js";
9
- import "./getBrowser-CZ66VtC7.esm.js";
10
- import { n as getThumbmarkId, t as isBrowserSimulation } from "./browserSimulation-CQjwFn0Z.esm.js";
11
- import "./platform-BoeUeUrV.esm.js";
12
- import "./tri-Calc36Ny.esm.js";
13
- import { a as fromPromise, i as fromCallback, l as createManager, r as assign, s as createActor, t as setup } from "./xstate.esm-nY3M5UYm.esm.js";
14
- import "./MotionSensorProvider-BkHKMCPE.esm.js";
15
- import { i as requestPermission, t as checkPermission } from "./permissionServices-B7lD6fiG.esm.js";
16
- import { a as stopCameraStream, r as requestCameraAccess } from "./camera-B0yWS33x.esm.js";
17
- import { t as BrowserStorageProvider } from "./BrowserStorageProvider-CBXGCHnK.esm.js";
18
- import { b as FaceDetectionProvider, f as stopStream, l as startDetection, s as initializeDeepsightSession } from "./onDeviceFaceResults-CJuDp67S.esm.js";
19
- import { t as sleep } from "./ITimerCapability-G7lQg-be.esm.js";
20
- import "./canvas-DsJa51yU.esm.js";
21
- import "./backCameraStream-DYnfq7Hr.esm.js";
22
- import "./video-DXf5H9rY.esm.js";
23
- import "./getDeviceClass-BdgmyOOu.esm.js";
24
- import "./deepsightService-CV1NAkg9.esm.js";
25
- import "./getDeviceClass-DsNb6nEl.esm.js";
26
- import "./types-Db2ooXIu.esm.js";
27
- import { t as StreamCanvasCapture } from "./StreamCanvasCapture-CRk7c7u7.esm.js";
28
-
1
+ import { t as WasmUtilProvider } from "./WasmUtilProvider-DAshwHhX.esm.js";
2
+ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
3
+ import { t as api } from "./api-BDTZNnca.esm.js";
4
+ import { a as createApi$1, t as getStoredHttpConfig } from "./clientLifecycle-DzT65Fvf.esm.js";
5
+ import { n as eventModuleNames } from "./events-Dy8PyVO5.esm.js";
6
+ import { t as endpoints } from "./endpoints-DLQ0g4-R.esm.js";
7
+ import { c as isBrowserSimulation, d as getThumbmarkId, f as getDeviceFingerprintInfo, n as getFingerprintEnabled, p as BrowserEnvironmentProvider } from "./sessionInitializer-Cjpnacyg.esm.js";
8
+ import { c as createManager, o as createActor, r as assign, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
9
+ import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
10
+ import { i as requestPermission, t as checkPermission } from "./permissionServices-DwNCUB2I.esm.js";
11
+ import { a as stopCameraStream, r as requestCameraAccess } from "./camera-BmFEyPP_.esm.js";
12
+ import { t as BrowserStorageProvider } from "./BrowserStorageProvider-P6aUarE9.esm.js";
13
+ import { f as stopStream, l as startDetection, s as initializeDeepsightSession, v as FaceDetectionProvider } from "./onDeviceFaceResults-LRTvBL7m.esm.js";
14
+ import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
15
+ import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
29
16
  //#region ../infra/src/crypto/randomUUID.ts
30
17
  /**
31
18
  * Cryptographically-strong UUID v4 (RFC 4122).
@@ -38,7 +25,6 @@ import { t as StreamCanvasCapture } from "./StreamCanvasCapture-CRk7c7u7.esm.js"
38
25
  function randomUUID() {
39
26
  return crypto.randomUUID();
40
27
  }
41
-
42
28
  //#endregion
43
29
  //#region src/modules/personhood/personhoodServices.ts
44
30
  /**
@@ -234,18 +220,6 @@ async function analyzeLiveness(params) {
234
220
  };
235
221
  }
236
222
  /**
237
- * Minimum combined yaw+pitch range (in degrees) required across the
238
- * detection window to clear the no-motion guard. A static photo or a
239
- * face with no head movement will fall below this.
240
- */
241
- const MIN_POSE_MOTION_DEG = 4;
242
- /**
243
- * Upper bound of motion (degrees) that adds confidence — beyond this,
244
- * additional head movement doesn't increase our belief that there's a
245
- * human (and may just be noise from a moving phone).
246
- */
247
- const MAX_POSE_MOTION_FOR_BONUS_DEG = 50;
248
- /**
249
223
  * Ceiling for on-device verdicts. Intentionally below 1.0 — nothing short
250
224
  * of a signed server round-trip should claim perfect confidence, and the
251
225
  * ceiling is strictly below what a server verdict would return so the two
@@ -253,13 +227,6 @@ const MAX_POSE_MOTION_FOR_BONUS_DEG = 50;
253
227
  */
254
228
  const LOCAL_CONFIDENCE_CEILING = .95;
255
229
  /**
256
- * Default pass threshold when `PersonhoodConfig.threshold` is omitted. Single
257
- * source of truth — keep `PersonhoodConfig.threshold`'s JSDoc and PERSONHOOD.md
258
- * in sync with this value. (A clean local pass without strong head motion lands
259
- * around here, so this is the effective on-device gate.)
260
- */
261
- const DEFAULT_PERSONHOOD_THRESHOLD = .75;
262
- /**
263
230
  * Produces a verdict entirely on-device using an **additive** confidence
264
231
  * model. Each positive signal contributes a measurable amount to the score;
265
232
  * penalties subtract. This means clean passes vary — a user who swings
@@ -284,7 +251,7 @@ const DEFAULT_PERSONHOOD_THRESHOLD = .75;
284
251
  * - Detection didn't reach 'success' → -0.2
285
252
  */
286
253
  function produceLocalVerdict(params) {
287
- const threshold = params.threshold ?? DEFAULT_PERSONHOOD_THRESHOLD;
254
+ const threshold = params.threshold ?? .75;
288
255
  const reasons = [];
289
256
  let confidence = .4;
290
257
  if (params.detectionOutcome === "success") confidence += .25;
@@ -294,12 +261,11 @@ function produceLocalVerdict(params) {
294
261
  }
295
262
  if (params.liveness) {
296
263
  const motion = params.liveness.yawRange + params.liveness.pitchRange;
297
- if (motion < MIN_POSE_MOTION_DEG) {
264
+ if (motion < 4) {
298
265
  reasons.push("no_motion");
299
266
  confidence -= .5;
300
267
  } else {
301
- const span = MAX_POSE_MOTION_FOR_BONUS_DEG - MIN_POSE_MOTION_DEG;
302
- const motionRatio = Math.min(1, Math.max(0, (motion - MIN_POSE_MOTION_DEG) / span));
268
+ const motionRatio = Math.min(1, Math.max(0, (motion - 4) / 46));
303
269
  confidence += .25 * motionRatio;
304
270
  }
305
271
  if (!hasExplicitSpoofSignal(params.liveness.analysisStatus)) confidence += .05;
@@ -318,7 +284,7 @@ function produceLocalVerdict(params) {
318
284
  reasons.push("emulator");
319
285
  confidence -= .9;
320
286
  }
321
- const SUBSUMED_HINTS = new Set(["navigator.webdriver", "automation-marker"]);
287
+ const SUBSUMED_HINTS = /* @__PURE__ */ new Set(["navigator.webdriver", "automation-marker"]);
322
288
  if (params.signals.headlessHints.filter((hint) => !SUBSUMED_HINTS.has(hint)).length > 0) {
323
289
  reasons.push("headless");
324
290
  confidence -= .3;
@@ -502,7 +468,7 @@ async function fetchPersonhoodAuthToken(params = {}) {
502
468
  };
503
469
  try {
504
470
  let res;
505
- if (params.authBaseUrl) res = await createApi_default({
471
+ if (params.authBaseUrl) res = await createApi$1({
506
472
  apiURL: params.authBaseUrl,
507
473
  customHeaders: getStoredHttpConfig()?.customHeaders
508
474
  }).post(authPath, body, reqConfig);
@@ -582,7 +548,7 @@ function buildSpoofCheckResults(params) {
582
548
  check: "motionLiveness",
583
549
  result: "unknown"
584
550
  });
585
- if (liveness.yawRange + liveness.pitchRange >= MIN_POSE_MOTION_DEG) results.push({
551
+ if (liveness.yawRange + liveness.pitchRange >= 4) results.push({
586
552
  check: "headMotion",
587
553
  result: "passed"
588
554
  });
@@ -695,7 +661,6 @@ function isApiNotConfigured(error) {
695
661
  function generateEvidenceId(siteKey) {
696
662
  return `ph_${(siteKey || "site").replace(/[^a-zA-Z0-9_-]/g, "").slice(0, 12)}_${randomUUID().replace(/-/g, "")}`;
697
663
  }
698
-
699
664
  //#endregion
700
665
  //#region src/modules/personhood/personhoodSignals.ts
701
666
  /**
@@ -773,12 +738,19 @@ async function safeGetDeviceInfo() {
773
738
  return;
774
739
  }
775
740
  }
776
-
777
741
  //#endregion
778
742
  //#region src/modules/personhood/types.ts
779
743
  const PERSONHOOD_ERROR_CODES = {
780
744
  CAMERA_DENIED: "CAMERA_DENIED",
781
745
  DETECTION_FAILED: "DETECTION_FAILED",
746
+ /**
747
+ * The OAuth2 token fetch (`POST /omni/oauth2/token`,
748
+ * client-credentials) failed — non-2xx, network error, or no
749
+ * `access_token` in the response. The flow halts before the user
750
+ * opens the camera so a misconfigured `clientId` / `clientSecret`
751
+ * surfaces immediately instead of walking them through a capture we
752
+ * can't authenticate the verify hop for.
753
+ */
782
754
  AUTH_TOKEN_FAILED: "AUTH_TOKEN_FAILED",
783
755
  VERIFY_FAILED: "VERIFY_FAILED",
784
756
  INJECTION_SUSPECTED: "INJECTION_SUSPECTED",
@@ -786,10 +758,13 @@ const PERSONHOOD_ERROR_CODES = {
786
758
  TIMEOUT: "TIMEOUT",
787
759
  UNKNOWN: "UNKNOWN"
788
760
  };
789
-
790
- //#endregion
791
- //#region src/modules/personhood/personhoodStateMachine.ts
792
- const _personhoodMachine = setup({
761
+ /**
762
+ * Public machine value. Typed as `AnyStateMachine` for declaration file
763
+ * portability — mirrors the convention used by `selfieMachine` and the
764
+ * other Core modules. Type safety is enforced by the `setup()` config
765
+ * above, not by the exported binding.
766
+ */
767
+ const personhoodMachine = setup({
793
768
  types: {
794
769
  context: {},
795
770
  events: {},
@@ -848,6 +823,12 @@ const _personhoodMachine = setup({
848
823
  });
849
824
  return cleanup;
850
825
  }),
826
+ /**
827
+ * Local verdict — the PRD's primary path. Runs entirely on-device, no
828
+ * network round-trip. Wrapped in `fromPromise` only so the machine can
829
+ * `invoke` it the same way it does an async actor; the body itself is
830
+ * synchronous and returns immediately.
831
+ */
851
832
  produceLocalVerdict: fromPromise(async ({ input }) => {
852
833
  return produceLocalVerdict({
853
834
  siteKey: input.config.siteKey,
@@ -857,6 +838,11 @@ const _personhoodMachine = setup({
857
838
  liveness: input.liveness
858
839
  });
859
840
  }),
841
+ /**
842
+ * Server fallback — only reached when the on-device path is impossible
843
+ * (no camera, permission denied, browser unsupported). Integrators see
844
+ * the same verdict shape either way.
845
+ */
860
846
  requestServerFallback: fromPromise(async ({ input, signal }) => {
861
847
  return requestServerFallbackVerdict({
862
848
  siteKey: input.config.siteKey,
@@ -866,6 +852,21 @@ const _personhoodMachine = setup({
866
852
  signal
867
853
  });
868
854
  }),
855
+ /**
856
+ * Mints the OAuth2 Bearer token (client-credentials grant) for the
857
+ * verify hop. Hits `POST /omni/oauth2/token` on the omni base, or —
858
+ * when `config.authBaseUrl` is set — the auth server's own
859
+ * `/oauth2/token` directly (see {@link fetchPersonhoodAuthToken}).
860
+ * Runs in parallel with the other init tasks (signals + Deepsight) so
861
+ * the network round-trip overlaps
862
+ * with the WASM and camera-permission work — token is available
863
+ * by the time the user finishes the capture and we need to
864
+ * verify. The fetched token is assigned into actor context
865
+ * (`context.token`) by `setTokenFromEvent` and threaded into the
866
+ * downstream `analyzeLiveness` and `verifyOnDevice` actors as an
867
+ * explicit input, isolated from the main `currentToken` other
868
+ * modules use and from any concurrent personhood instances.
869
+ */
869
870
  fetchToken: fromPromise(async ({ input, signal }) => {
870
871
  return fetchPersonhoodAuthToken({
871
872
  clientId: input.config.clientId,
@@ -875,6 +876,14 @@ const _personhoodMachine = setup({
875
876
  signal
876
877
  });
877
878
  }),
879
+ /**
880
+ * On-device verify — POST `/omni/personhood/verify` with the
881
+ * Deepsight metadata + derived `spoofCheckResults`, returns the
882
+ * server's authoritative verdict. The local verdict from
883
+ * {@link produceLocalVerdict} is used as a fallback if the
884
+ * network call fails. This is what becomes the final
885
+ * `state.verdict` the UI / integrator sees.
886
+ */
878
887
  verifyOnDevice: fromPromise(async ({ input, signal }) => {
879
888
  return verifyPersonhoodOnDevice({
880
889
  metadata: input.liveness?.metadata ?? "",
@@ -896,6 +905,12 @@ const _personhoodMachine = setup({
896
905
  };
897
906
  }),
898
907
  setDetectionStatus: assign({ detectionStatus: ({ event }) => event.status }),
908
+ /**
909
+ * Commits the final head-pose ranges reported by the detection callback
910
+ * into context. This happens ONCE at DETECTION_SUCCESS, not per-frame —
911
+ * keeping pose off the hot XState path prevents React re-renders on
912
+ * every detector frame.
913
+ */
899
914
  setCapturedImageAndRangeFromEvent: assign(({ event }) => {
900
915
  const e = event;
901
916
  return {
@@ -909,6 +924,14 @@ const _personhoodMachine = setup({
909
924
  setResetDetection: assign({ resetDetection: ({ event }) => event.reset }),
910
925
  setSignalsFromEvent: assign({ signals: ({ event }) => event.output }),
911
926
  setTokenFromEvent: assign({ token: ({ event }) => event.output }),
927
+ /**
928
+ * Stash the local verdict from the `processing` step's actor
929
+ * output so the subsequent `verifyOnServer` step can use it as a
930
+ * fallback if the network call fails. The same event also drives
931
+ * `setVerdictFromEvent` (the existing action), but that one
932
+ * writes to `verdict` — which we DON'T want to set yet because
933
+ * the final verdict comes from the server.
934
+ */
912
935
  setLocalVerdictFromEvent: assign({ localVerdict: ({ event }) => event.output }),
913
936
  setVerdictFromEvent: assign({ verdict: ({ event }) => event.output }),
914
937
  setPermissionResultFromEvent: assign({ permissionResult: ({ event }) => event.output }),
@@ -917,6 +940,11 @@ const _personhoodMachine = setup({
917
940
  error: () => ({ code: PERSONHOOD_ERROR_CODES.CAMERA_DENIED })
918
941
  }),
919
942
  setDetectionError: assign({ error: () => ({ code: PERSONHOOD_ERROR_CODES.DETECTION_FAILED }) }),
943
+ /**
944
+ * Records that the server-fallback path is being taken because the camera
945
+ * could not be initialized (no device / OS block), so the fallback verdict
946
+ * reports `no_camera` rather than the default `permission_denied`.
947
+ */
920
948
  setFallbackReasonNoCamera: assign({ fallbackReason: () => "no_camera" }),
921
949
  setTokenError: assign({ error: ({ event }) => ({
922
950
  code: PERSONHOOD_ERROR_CODES.AUTH_TOKEN_FAILED,
@@ -926,10 +954,21 @@ const _personhoodMachine = setup({
926
954
  code: PERSONHOOD_ERROR_CODES.VERIFY_FAILED,
927
955
  message: String(event.error ?? "verify failed")
928
956
  }) }),
957
+ /**
958
+ * Local-synthesis failure — the deterministic on-device verdict
959
+ * computation threw. Distinct from `setVerifyError` which is for
960
+ * the server verify hop; the verify hop never even ran here.
961
+ */
929
962
  setLocalVerdictError: assign({ error: ({ event }) => ({
930
963
  code: PERSONHOOD_ERROR_CODES.UNKNOWN,
931
964
  message: String(event.error ?? "local verdict synthesis failed")
932
965
  }) }),
966
+ /**
967
+ * Server verify hop failed unrecoverably — fall back to the local
968
+ * verdict the integrator can still trust. Named (vs. an inline
969
+ * `assign`) so the machine config stays consistent with
970
+ * `setup({ actions: { ... } })`'s typed-action contract.
971
+ */
933
972
  setVerdictToLocal: assign({ verdict: ({ context }) => context.localVerdict }),
934
973
  stopMediaStream: assign(({ context }) => {
935
974
  context.frameCapturer?.dispose();
@@ -1014,6 +1053,12 @@ const _personhoodMachine = setup({
1014
1053
  guard: "hasShowTutorial"
1015
1054
  }, { target: "collectingSignals" }] } },
1016
1055
  tutorial: { on: { NEXT_STEP: { target: "collectingSignals" } } },
1056
+ /**
1057
+ * Two prep tasks run in parallel: collect device/behavioral signals and
1058
+ * boot the Deepsight session (PRC warmup). Both are needed before we
1059
+ * touch the camera; running them concurrently keeps the pre-capture
1060
+ * latency budget under the PRD's 1.5s p50 target.
1061
+ */
1017
1062
  collectingSignals: {
1018
1063
  type: "parallel",
1019
1064
  states: {
@@ -1048,6 +1093,20 @@ const _personhoodMachine = setup({
1048
1093
  done: { type: "final" }
1049
1094
  }
1050
1095
  },
1096
+ /**
1097
+ * Third parallel branch — fetches the personhood session
1098
+ * token. Latency-overlap with signals + Deepsight init so
1099
+ * the network round-trip is "free" by the time the user
1100
+ * finishes capturing. The mock-verify path returns a
1101
+ * synthetic token without hitting the network, so this
1102
+ * branch only fails when a real backend was configured AND
1103
+ * the call genuinely failed (non-2xx, network error,
1104
+ * missing token in the response). In that case we record
1105
+ * the error and let the parallel `onDone` route the flow
1106
+ * to the terminal `error` state — there's no point opening
1107
+ * the camera if we know we can't authenticate the verify
1108
+ * hop afterwards.
1109
+ */
1051
1110
  token: {
1052
1111
  initial: "running",
1053
1112
  states: {
@@ -1184,6 +1243,12 @@ const _personhoodMachine = setup({
1184
1243
  }
1185
1244
  }
1186
1245
  },
1246
+ /**
1247
+ * On-device liveness analysis — Deepsight virtual-camera check + pipeline
1248
+ * analysis + pose-motion range. Runs after a good capture but before we
1249
+ * synthesize the verdict, so {@link produceLocalVerdict} can fold these
1250
+ * signals in. This is the actual "local liveness" step per PRD #4.
1251
+ */
1187
1252
  analyzing: {
1188
1253
  exit: "stopMediaStream",
1189
1254
  invoke: {
@@ -1222,6 +1287,14 @@ const _personhoodMachine = setup({
1222
1287
  actions: "setLocalVerdictError"
1223
1288
  }
1224
1289
  } },
1290
+ /**
1291
+ * On-device verify hop. Sends the Deepsight metadata + derived
1292
+ * `spoofCheckResults` to `/omni/personhood/verify` (authenticated
1293
+ * with `Authorization: Bearer <token>`) and uses the server's
1294
+ * response as the final verdict. Falls back to the local
1295
+ * verdict if the network call fails — better to deliver SOMETHING
1296
+ * than nothing, but a reachable backend always wins.
1297
+ */
1225
1298
  verifyingOnServer: { invoke: {
1226
1299
  id: "verifyOnDevice",
1227
1300
  src: "verifyOnDevice",
@@ -1240,6 +1313,12 @@ const _personhoodMachine = setup({
1240
1313
  actions: "setVerdictToLocal"
1241
1314
  }
1242
1315
  } },
1316
+ /**
1317
+ * Server fallback path — only reached when on-device liveness can't run
1318
+ * (currently: after the user explicitly denies camera permission). The
1319
+ * network call is gated by `config.mockVerify` the same as the primary
1320
+ * path, so the dev demo works offline.
1321
+ */
1243
1322
  serverFallback: { invoke: {
1244
1323
  id: "requestServerFallback",
1245
1324
  src: "requestServerFallback",
@@ -1271,14 +1350,6 @@ const _personhoodMachine = setup({
1271
1350
  }
1272
1351
  }
1273
1352
  });
1274
- /**
1275
- * Public machine value. Typed as `AnyStateMachine` for declaration file
1276
- * portability — mirrors the convention used by `selfieMachine` and the
1277
- * other Core modules. Type safety is enforced by the `setup()` config
1278
- * above, not by the exported binding.
1279
- */
1280
- const personhoodMachine = _personhoodMachine;
1281
-
1282
1353
  //#endregion
1283
1354
  //#region src/modules/personhood/personhoodActor.ts
1284
1355
  /**
@@ -1305,7 +1376,6 @@ function createPersonhoodActor(options) {
1305
1376
  dependencies
1306
1377
  } }).start();
1307
1378
  }
1308
-
1309
1379
  //#endregion
1310
1380
  //#region src/modules/personhood/personhoodManager.ts
1311
1381
  /**
@@ -1412,32 +1482,44 @@ function mapState(snapshot) {
1412
1482
  }
1413
1483
  function createApi({ actor, trackElementClicked }) {
1414
1484
  return {
1485
+ /** Starts the flow (goes to tutorial or capture depending on config). */
1415
1486
  load() {
1416
1487
  actor.send({ type: "LOAD" });
1417
1488
  },
1489
+ /** Advances from tutorial → capture. */
1418
1490
  nextStep() {
1419
1491
  trackElementClicked?.("nextStep");
1420
1492
  actor.send({ type: "NEXT_STEP" });
1421
1493
  },
1494
+ /** Triggers `getUserMedia` when in `permissions.idle`. */
1422
1495
  requestPermission() {
1423
1496
  trackElementClicked?.("requestPermission");
1424
1497
  actor.send({ type: "REQUEST_PERMISSION" });
1425
1498
  },
1499
+ /** Shows the permission rationale view. */
1426
1500
  goToLearnMore() {
1427
1501
  trackElementClicked?.("goToLearnMore");
1428
1502
  actor.send({ type: "GO_TO_LEARN_MORE" });
1429
1503
  },
1504
+ /** Returns from learn-more → permission prompt. */
1430
1505
  back() {
1431
1506
  trackElementClicked?.("back");
1432
1507
  actor.send({ type: "BACK" });
1433
1508
  },
1509
+ /** Dismisses the widget into the terminal `closed` state. */
1434
1510
  close() {
1435
1511
  trackElementClicked?.("close");
1436
1512
  actor.send({ type: "QUIT" });
1437
1513
  },
1514
+ /** Resets from the (non-final) `error` state back to `idle`. */
1438
1515
  reset() {
1439
1516
  actor.send({ type: "RESET" });
1440
1517
  },
1518
+ /**
1519
+ * Skip the on-device path and hit the server fallback. Wired to the
1520
+ * "Continue without camera" button on the permission-denied screen; also
1521
+ * dispatched automatically when the device has no camera at all.
1522
+ */
1441
1523
  useFallback() {
1442
1524
  trackElementClicked?.("useFallback");
1443
1525
  actor.send({ type: "USE_FALLBACK" });
@@ -1495,6 +1577,5 @@ function createPersonhoodManagerFromActor(actor) {
1495
1577
  function createPersonhoodManager(options) {
1496
1578
  return wrapActor(createPersonhoodActor(options));
1497
1579
  }
1498
-
1499
1580
  //#endregion
1500
- export { PERSONHOOD_ERROR_CODES, createPersonhoodActor, createPersonhoodManager, createPersonhoodManagerFromActor, personhoodMachine };
1581
+ export { PERSONHOOD_ERROR_CODES, createPersonhoodActor, createPersonhoodManager, createPersonhoodManagerFromActor, personhoodMachine };
package/dist/phone.d.ts CHANGED
@@ -1,6 +1,2 @@
1
- import "./StateMachine-BTkXO3Na.js";
2
- import "./Manager-DE5DydXZ.js";
3
- import "./Actor-CdjYVucI.js";
4
- import "./otp-D_9QPNbs.js";
5
- import { n as PhoneState, o as phoneMachine, r as createPhoneManager, s as PhoneConfig, t as PhoneManager } from "./phoneManager-85eRUhJD.js";
1
+ import { n as PhoneState, o as phoneMachine, r as createPhoneManager, s as PhoneConfig, t as PhoneManager } from "./phoneManager-BBU8Lq0O.js";
6
2
  export { type PhoneConfig, type PhoneManager, type PhoneState, createPhoneManager, phoneMachine };
package/dist/phone.esm.js CHANGED
@@ -1,10 +1,3 @@
1
- import "./BrowserTimerProvider-CHloo0eQ.esm.js";
2
- import "./api-DsbUi7TO.esm.js";
3
- import "./events-aeCkGlnn.esm.js";
4
- import "./endpoints-CwrFQfW7.esm.js";
5
- import "./xstate.esm-nY3M5UYm.esm.js";
6
- import "./otp-Bbe_izFJ.esm.js";
7
- import { t as phoneMachine } from "./phoneStateMachine-BlYF4nKx.esm.js";
8
- import { t as createPhoneManager } from "./phoneManager-Byive8Xl.esm.js";
9
-
10
- export { createPhoneManager, phoneMachine };
1
+ import { t as phoneMachine } from "./phoneStateMachine-wDQtaT38.esm.js";
2
+ import { t as createPhoneManager } from "./phoneManager-KbcmjEeH.esm.js";
3
+ export { createPhoneManager, phoneMachine };
@@ -1,9 +1,8 @@
1
- import { t as Manager } from "./Manager-DE5DydXZ.js";
2
- import { t as ActorRefFrom } from "./Actor-CdjYVucI.js";
3
- import { t as OtpValidationErrors } from "./otp-D_9QPNbs.js";
4
-
1
+ import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
2
+ import { t as Manager } from "./Manager-CQQ99QOI.js";
3
+ import "./Actor-iTq7YY48.js";
4
+ import { t as OtpValidationErrors } from "./otp-CEWfTj9v.js";
5
5
  //#region src/modules/phone/types.d.ts
6
-
7
6
  /**
8
7
  * Configuration options for phone verification.
9
8
  *
@@ -69,7 +68,6 @@ type PhoneValidationErrors = {
69
68
  };
70
69
  //#endregion
71
70
  //#region src/modules/phone/phoneStateMachine.d.ts
72
-
73
71
  declare const phoneMachine: any;
74
72
  type PhoneMachine = typeof phoneMachine;
75
73
  //#endregion
@@ -80,7 +78,6 @@ type CreatePhoneActorOptions = {
80
78
  type PhoneActor = ActorRefFrom<PhoneMachine>;
81
79
  //#endregion
82
80
  //#region src/modules/phone/phoneManager.d.ts
83
-
84
81
  /** Phone manager is in initial state, waiting for `load()` to be called */
85
82
  type PhoneIdleState = {
86
83
  status: 'idle';