@incodetech/core 2.2.0-rc.8 → 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.
- package/THIRD_PARTY_NOTICES.txt +281 -0
- package/dist/BaseWasmProvider-Dyi6dKp1.d.ts +65 -0
- package/dist/{BrowserDiagnosticsCryptoProvider-DslcXorZ.esm.js → BrowserDiagnosticsCryptoProvider-C_9o3L2L.esm.js} +1 -1
- package/dist/{BrowserVisibilityObserverProvider-BX1BiLDK.esm.js → BrowserVisibilityObserverProvider-BrJN1B8A.esm.js} +2 -0
- package/dist/FaceDetectionProvider-DTetAE8H.esm.js +476 -0
- package/dist/FaceDetectionProvider-LdZ47bWy.d.ts +36 -0
- package/dist/{IIdCaptureCapability-DHTT3FC2.d.ts → IIdCaptureCapability-RNiFhvXR.d.ts} +7 -33
- package/dist/IWasmUtilCapability-CXXDA5l1.d.ts +159 -0
- package/dist/{MotionSensorProvider-DGiV77J_.esm.js → MotionSensorProvider-BgTYwg9L.esm.js} +1 -1
- package/dist/{deepsightService-DLVQS_RH.d.ts → StreamCanvasCapture-B3YT2Bt6.d.ts} +54 -41
- package/dist/{StreamCanvasCapture-D2XcXCZ4.esm.js → StreamCanvasCapture-C9jtgBdT.esm.js} +2 -2
- package/dist/{addressSearch-D1XpBdUS.esm.js → addressSearch-BRSu_aGA.esm.js} +1 -1
- package/dist/advanceableErrors-CpF2cBy6.esm.js +21 -0
- package/dist/ae-signature.d.ts +4 -2
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-CQFNgSPt.esm.js → antifraudManager-Bg9ynGum.esm.js} +2 -2
- package/dist/{antifraudStateMachine-Bf_JVNwn.esm.js → antifraudStateMachine-BHxehiJZ.esm.js} +1 -1
- package/dist/{apiError-D4rZe9BR.esm.js → apiError-D0v5hFyN.esm.js} +14 -2
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-EfCuQy_Y.esm.js → authenticationManager-C4B4-29g.esm.js} +5 -5
- package/dist/{authenticationManager-BBMGTcwW.d.ts → authenticationManager-DXTIUcma.d.ts} +7 -1
- package/dist/{authenticationStateMachine-B9l3sHEg.esm.js → authenticationStateMachine-DJ0zUm-A.esm.js} +6 -62
- package/dist/avatar.d.ts +1 -2
- package/dist/avatar.esm.js +1 -1
- package/dist/{backCameraStream-CUeYm5eu.esm.js → backCameraStream-BOtyQowf.esm.js} +83 -22
- package/dist/{camera-_2sXMXiF.esm.js → camera-sIa9ceW2.esm.js} +19 -1
- package/dist/camera.esm.js +1 -1
- package/dist/{canvas-E1zGkel4.esm.js → canvas-BxFzWTt-.esm.js} +19 -0
- package/dist/certificate-issuance.d.ts +2 -302
- package/dist/certificate-issuance.esm.js +3 -66
- package/dist/certificateIssuanceManager-Bfvkq7Cy.esm.js +69 -0
- package/dist/certificateIssuanceManager-DCgEidHz.d.ts +312 -0
- package/dist/{certificateIssuanceStateMachine-D_R92TYu.esm.js → certificateIssuanceStateMachine-BBD5h8c4.esm.js} +1 -1
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-BxjpLZAG.esm.js → consentManager-B5Vqdez-.esm.js} +2 -2
- package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
- package/dist/{consentStateMachine-D9D4ON8Z.esm.js → consentStateMachine-DbUmqWgV.esm.js} +1 -1
- package/dist/createCameraCycleOwnership-DQ5-F2oW.esm.js +826 -0
- package/dist/{createFaceAvatar-DQKaRise.esm.js → createFaceAvatar-BNHdeFj8.esm.js} +2 -2
- package/dist/createFaceAvatar-BlcTYgJv.d.ts +497 -0
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-CGT0V6RV.esm.js → crossDocumentDataMatchManager-QMOGwHXR.esm.js} +2 -2
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-6Nmkn5u1.esm.js → curpValidationManager-D1ppROcF.esm.js} +2 -2
- package/dist/{curpValidationManager-DVGr7Fq7.d.ts → curpValidationManager-SSKNrm5Z.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-Ds7KMacK.esm.js → curpValidationStateMachine-DvUPC_8S.esm.js} +1 -1
- package/dist/custom-fields.d.ts +2 -114
- package/dist/custom-fields.esm.js +2 -232
- package/dist/custom-watchlist.d.ts +2 -51
- package/dist/custom-watchlist.esm.js +3 -70
- package/dist/customFieldsManager-2j_PBq4U.esm.js +264 -0
- package/dist/customFieldsManager-8-W2KY4n.d.ts +141 -0
- package/dist/customWatchlistManager-DUVrEdw9.esm.js +73 -0
- package/dist/customWatchlistManager-PBWHr_oM.d.ts +64 -0
- package/dist/{customWatchlistStateMachine-YWSgKLbF.esm.js → customWatchlistStateMachine-qZVgkKgP.esm.js} +1 -1
- package/dist/{deepsightLoader-DEcRUKfT.esm.js → deepsightLoader-Dm7ejW4v.esm.js} +27 -71
- package/dist/device.d.ts +25 -2
- package/dist/device.esm.js +69 -7
- package/dist/document-capture.d.ts +2 -2
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-DsQQhWry.esm.js → documentCaptureManager-DR_Wv-3H.esm.js} +2 -2
- package/dist/{documentCaptureManager-B3t0ydtg.d.ts → documentCaptureManager-DensIj5F.d.ts} +83 -83
- package/dist/{documentCaptureStateMachine-BM4Ex_5x.esm.js → documentCaptureStateMachine-CWOATHfE.esm.js} +5 -5
- package/dist/dynamic-forms.d.ts +1 -1
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-fhK0yINk.d.ts → dynamicFormsManager-D5R_uxLQ.d.ts} +25 -3
- package/dist/{dynamicFormsManager-CmvBSrzC.esm.js → dynamicFormsManager-Dt98SDfV.esm.js} +16 -5
- package/dist/{dynamicFormsStateMachine-C37Rtz1G.esm.js → dynamicFormsStateMachine-obKr4IIp.esm.js} +35 -3
- package/dist/ekyb.d.ts +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-Bx6dG89U.esm.js → ekybManager-DNZKrKF3.esm.js} +2 -2
- package/dist/{ekybStateMachine-uscz9zIj.esm.js → ekybStateMachine-DjhHQXZ8.esm.js} +3 -3
- package/dist/ekyc.esm.js +2 -2
- package/dist/{ekycManager-DgT48ky6.esm.js → ekycManager-CmQBpeiI.esm.js} +2 -2
- package/dist/{ekycStateMachine-CQwqiR-R.esm.js → ekycStateMachine-CmdW2gVm.esm.js} +2 -2
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/electronic-signature.esm.js +2 -2
- package/dist/electronicSignatureManager-Ds-KEVTq.d.ts +2786 -0
- package/dist/{electronicSignatureManager-_QiHi1U5.esm.js → electronicSignatureManager-DzulxM4_.esm.js} +357 -51
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-BY0jeYwR.esm.js → emailManager-B5ek_UfM.esm.js} +2 -2
- package/dist/{emailStateMachine-Crw8QVmc.esm.js → emailStateMachine-CyPFZ7dW.esm.js} +1 -1
- package/dist/{endpoints-CCzL3XD_.esm.js → endpoints-D3B9mUHh.esm.js} +24 -7
- package/dist/{events-DYiyoSlx.esm.js → events-ijlbX_Wx.esm.js} +2 -2
- package/dist/events.d.ts +1 -1
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +24 -64
- package/dist/extensibility.esm.js +35 -29
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-BxWPpxyd.d.ts → faceCaptureManagerFactory-CvtqcLxs.d.ts} +87 -54
- package/dist/{faceCaptureManagerFactory-Bkueb8mk.esm.js → faceCaptureManagerFactory-pCmG4MeF.esm.js} +68 -7
- package/dist/faceCaptureSetup-BSextack.esm.js +2106 -0
- package/dist/{faceMatchManager-Ri4UbNz0.esm.js → faceMatchManager-Caal2zyV.esm.js} +2 -2
- package/dist/{faceMatchStateMachine-20DdZ3jg.esm.js → faceMatchStateMachine-BUc5FXYy.esm.js} +1 -1
- package/dist/{feature-management-B3Uygq6K.esm.js → feature-management-B0sGlozZ.esm.js} +32 -7
- package/dist/feature-management.d.ts +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-Cg6kPQQx.esm.js → fieldComparisonManager-BIs6HPJG.esm.js} +2 -2
- package/dist/fiscal-qr.d.ts +2 -56
- package/dist/fiscal-qr.esm.js +2 -308
- package/dist/fiscalQrManager-Bp_-3LJr.esm.js +34131 -0
- package/dist/fiscalQrManager-CHcBJwUM.d.ts +68 -0
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +212 -185
- package/dist/flow.esm.js +119 -30
- package/dist/{flowCompletionService-UakxNaeg.esm.js → flowCompletionService-CLtbWhSK.esm.js} +2 -2
- package/dist/{flowServices-CD5m8HqZ.esm.js → flowServices-B5FwukTQ.esm.js} +91 -26
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-Bz6wJrfI.esm.js → geolocationManager-DIw-xq9a.esm.js} +2 -2
- package/dist/{geolocationStateMachine-psEJIVjN.esm.js → geolocationStateMachine-DpG0TFOU.esm.js} +3 -3
- package/dist/getBrowser-CBiibsL-.esm.js +19 -0
- package/dist/{getBrowser-DNrQeL4T.esm.js → getBrowser-Cbe1C4Tn.esm.js} +2 -1
- package/dist/{getDeviceClass-9y-kbVDw.esm.js → getDeviceClass-5NYZg9s6.esm.js} +2 -2
- package/dist/getParsedUserAgent-B2iFDql1.esm.js +1278 -0
- package/dist/government-validation.d.ts +2 -85
- package/dist/government-validation.esm.js +3 -120
- package/dist/governmentValidationManager-D02vT4yY.d.ts +63 -0
- package/dist/governmentValidationManager-TjC9iVjH.esm.js +79 -0
- package/dist/governmentValidationStateMachine-D1ZnEqdd.esm.js +54 -0
- package/dist/home.d.ts +1 -1
- package/dist/home.esm.js +1 -1
- package/dist/id-ocr.d.ts +2 -2
- package/dist/id-ocr.esm.js +2 -2
- package/dist/id-selfie-flow.d.ts +3 -2
- package/dist/id-selfie-flow.esm.js +11 -10
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +29 -5
- package/dist/id.esm.js +48 -46
- package/dist/idCaptureDefaults-BcxjQDI3.esm.js +484 -0
- package/dist/{idCaptureManager-CqrqSjJV.d.ts → idCaptureManager-CvmHOWWd.d.ts} +227 -39
- package/dist/{idCaptureManager-BJAquKfp.esm.js → idCaptureManager-Vby8oYqh.esm.js} +259 -46
- package/dist/{idCaptureServices-CM6ki4IH.esm.js → idCaptureServices-CJIxD9ep.esm.js} +342 -31
- package/dist/idCaptureStateMachine-CmqihkUy.esm.js +5343 -0
- package/dist/{idOcrManager-DXc_xRN7.d.ts → idOcrManager-BF_cXZq8.d.ts} +1 -1
- package/dist/{idOcrManager-BIQYQXXj.esm.js → idOcrManager-DHU22hVn.esm.js} +2 -2
- package/dist/{idOcrStateMachine-cSxzHpHt.esm.js → idOcrStateMachine-33UvRAHE.esm.js} +1 -1
- package/dist/{idVerificationManager-JpV_SAsl.esm.js → idVerificationManager-CyaixD0D.esm.js} +2 -2
- package/dist/{idVerificationStateMachine-nPeUNyFq.esm.js → idVerificationStateMachine-BPGrQZEm.esm.js} +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-kNCg9AbD.esm.js → identityReuseManager-CWaNHBO3.esm.js} +2 -2
- package/dist/{identityReuseStateMachine-DyulxDjP.esm.js → identityReuseStateMachine-CQgnATo5.esm.js} +1 -1
- package/dist/{index-CLMF0QLQ.d.ts → index-DLcJT5YP.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-GpvMuz9o.esm.js → invokeOnCaptureCallback-BjzPjJ_p.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-DyPzUmsZ.d.ts → mandatoryConsentManager-CJSyhTpi.d.ts} +5 -5
- package/dist/{mandatoryConsentManager-B4Niyg_u.esm.js → mandatoryConsentManager-Du-m-tZ_.esm.js} +2 -2
- package/dist/{mandatoryConsentStateMachine-B4-1u-L8.esm.js → mandatoryConsentStateMachine-DSDAk7WZ.esm.js} +1 -1
- package/dist/multipartRecordingService-B3C_zlev.esm.js +594 -0
- package/dist/{permissionGuards-KINpmKtI.esm.js → permissionGuards-uYZYFu4J.esm.js} +1 -1
- package/dist/{permissionServices-UvUcOSRb.esm.js → permissionServices-Bj_fyWtv.esm.js} +5 -5
- package/dist/personhood.d.ts +6 -5
- package/dist/personhood.esm.js +10 -10
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-FsJ0W2Ei.esm.js → phoneManager-N1-sbrY4.esm.js} +2 -2
- package/dist/{phoneStateMachine-Ba0wKHyX.esm.js → phoneStateMachine-jl8LJKCo.esm.js} +1 -1
- package/dist/{platform-BJrm5nzZ.esm.js → platform-DkcRc9JV.esm.js} +29 -1
- package/dist/qe-signature.d.ts +5 -3
- package/dist/qe-signature.esm.js +2 -2
- package/dist/recordingsRepository-CCWy13M-.esm.js +72 -0
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-y4VQB11M.esm.js → redirectToMobileManager-DsFzdTwA.esm.js} +2 -2
- package/dist/{redirectToMobileStateMachine-Cyv2x0PP.esm.js → redirectToMobileStateMachine-v3otpT-L.esm.js} +1 -1
- package/dist/{rolldown-runtime-FZ4Itg2g.esm.js → rolldown-runtime-FDOR9p9I.esm.js} +1 -19
- package/dist/{runChildModule-BR2RIfRg.esm.js → runChildModule-TuyGE00X.esm.js} +3 -21
- package/dist/safeStorage-B-trhxg6.esm.js +423 -0
- package/dist/{sdkVersion-BWOdgLZ1.esm.js → sdkVersion-CLxKvdyz.esm.js} +1 -1
- package/dist/selfie.d.ts +5 -5
- package/dist/selfie.esm.js +14 -76
- package/dist/{selfieErrorUtils-C2PYBVsp.esm.js → selfieErrorUtils-C77GXJH6.esm.js} +30 -4
- package/dist/{selfieManager-BlImAV-k.esm.js → selfieManager-CihVnODO.esm.js} +5 -5
- package/dist/{selfieManager-DwlCppg0.d.ts → selfieManager-D1KRJ39M.d.ts} +8 -11
- package/dist/selfieStateMachine-fwMmNtOi.esm.js +69 -0
- package/dist/{session-Bp17qJsu.esm.js → session-BHIeAamR.esm.js} +4 -5
- package/dist/session.d.ts +21 -11
- package/dist/session.esm.js +5 -5
- package/dist/{sessionInitializer-CcqQD9Q4.esm.js → sessionInitializer-BLoK7SP9.esm.js} +187 -68
- package/dist/{setup-BgoWtvIS.d.ts → setup-Cv-JM9QC.d.ts} +63 -69
- package/dist/{setup-CXj5ozZN.esm.js → setup-msLybMbC.esm.js} +226 -100
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-Ca43yhwk.esm.js → signatureManager-ChsB-nMD.esm.js} +2 -2
- package/dist/{signatureStateMachine-K1LMRrxG.esm.js → signatureStateMachine-BHPwkJZS.esm.js} +1 -1
- package/dist/{src-0Jurt29N.esm.js → src-35ekGRzK.esm.js} +1 -1
- package/dist/{stats-B0nFKawG.esm.js → stats-DkK-f8JT.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/{trueSightService-D05SY_Ij.esm.js → trueSightService-CKrrfV0Q.esm.js} +7 -7
- package/dist/trust-graph.esm.js +1 -1
- package/dist/{types-BX_XkMsQ2.d.ts → types-9_esGTPj.d.ts} +1 -1
- package/dist/types-BT_Oalip.d.ts +1 -0
- package/dist/{types-DelMqZLe.d.ts → types-BjSly8cp.d.ts} +1 -1
- package/dist/{types-Hmd7U0JA.d.ts → types-CM-jtjJ2.d.ts} +6 -81
- package/dist/{types-Bdf8_LYB2.d.ts → types-CjKBS37a2.d.ts} +303 -13
- package/dist/{types-DVmXIdzW.d.ts → types-D0gekt4U.d.ts} +38 -5
- package/dist/types-DgDvvzg0.d.ts +10 -0
- package/dist/{types-KPvmag_B.d.ts → types-Do5rEXij.d.ts} +7 -4
- package/dist/types-ZT1XFIJ8.d.ts +6 -0
- package/dist/video-selfie.d.ts +59 -35
- package/dist/video-selfie.esm.js +510 -601
- package/dist/{videoSelfieCameraWarmer-BhTWYfGn.esm.js → videoSelfieCameraWarmer-CB1IzZkt.esm.js} +14 -153
- package/dist/videoSelfieFlowModuleMachine-BUe2uACW.esm.js +32 -0
- package/dist/{videoSelfieStepDetector-D3oo2ofo.d.ts → videoSelfieStepDetector-5YHFe0Mq.d.ts} +21 -5
- package/dist/virtualCameraCheck-WOloJ-do.esm.js +48 -0
- package/dist/warmup-CUUnwYxe.esm.js +714 -0
- package/dist/warmup-Cis2p6O0.d.ts +128 -0
- package/dist/wasm.d.ts +30 -6
- package/dist/wasm.esm.js +36 -4
- package/dist/{wasmDsFlagSync-BqUCwLY8.esm.js → wasmDsFlagSync-B2e8p268.esm.js} +2 -2
- package/dist/{wasmWebClient-DM8lkb0z.esm.js → wasmWebClient-B7baE-Wf.esm.js} +358 -28
- package/dist/watchlist-for-business.d.ts +2 -78
- package/dist/watchlist-for-business.esm.js +3 -102
- package/dist/watchlist.esm.js +2 -2
- package/dist/watchlistForBusinessManager-CpuuB1J2.esm.js +107 -0
- package/dist/watchlistForBusinessManager-CsnJnG-C.d.ts +99 -0
- package/dist/{watchlistForBusinessStateMachine-CxFnlshm.esm.js → watchlistForBusinessStateMachine-DEzgjz7C.esm.js} +13 -6
- package/dist/{watchlistManager-LoNZH9qm.esm.js → watchlistManager-CI8BHFob.esm.js} +2 -2
- package/dist/{watchlistStateMachine-DIKQDoUT.esm.js → watchlistStateMachine-DvOby3a-.esm.js} +1 -1
- package/dist/workflow.d.ts +12 -8
- package/dist/workflow.esm.js +48 -39
- package/package.json +4 -10
- package/dist/BrowserStorageProvider-k-FDkC4W.esm.js +0 -67
- package/dist/FaceDetectionProvider-Mh6q3EbA.d.ts +0 -349
- package/dist/IFaceAvatarCapability-BrL19G0s.d.ts +0 -23
- package/dist/IStorageCapability-ORkQfK3F.d.ts +0 -242
- package/dist/OpenViduRecordingProvider-Du98qevC.esm.js +0 -85
- package/dist/createFaceAvatar-BEj18KXi.d.ts +0 -50
- package/dist/document-upload.d.ts +0 -325
- package/dist/document-upload.esm.js +0 -197
- package/dist/electronicSignatureManager-CcUXQZS7.d.ts +0 -1300
- package/dist/faceCaptureSetup-BECAis8R.esm.js +0 -863
- package/dist/getBrowser-Cb8Zgrgp.esm.js +0 -7
- package/dist/getParsedUserAgent-pJjATANs.esm.js +0 -1622
- package/dist/governmentValidationStateMachine-CK9DrZXX.esm.js +0 -226
- package/dist/idCaptureDefaults-WeHbQM7W.esm.js +0 -225
- package/dist/idCaptureStateMachine-fi-Gq1AH.esm.js +0 -3342
- package/dist/lib-DAyUtOTj.esm.js +0 -12420
- package/dist/manualReviewService-D4IkipnN.esm.js +0 -15
- package/dist/mediaRecorderOptions-dALSV8af.esm.js +0 -40
- package/dist/onDeviceFaceResults-CB62pUQf.esm.js +0 -646
- package/dist/openviduLazy-CCDpFWg1.esm.js +0 -10
- package/dist/recordingService-BRgmVnUT.esm.js +0 -329
- package/dist/safeStorage-Ep56I-f_.esm.js +0 -982
- package/dist/selfieStateMachine-CPXEC4wV.esm.js +0 -55
- package/dist/trueSight-CY0Ibfm9.esm.js +0 -1
- package/dist/types-EELWyWpd.d.ts +0 -6
- package/dist/types-Vb4P9ovf.d.ts +0 -22
- package/dist/warmup-Dv2alr2-.d.ts +0 -82
- package/dist/wasmDefaults-DTUrftxR.esm.js +0 -125
- package/dist/{Face2DProvider-UUQt_vRC.esm.js → Face2DProvider-BF48sz5c.esm.js} +1 -1
- package/dist/{PrivacyLensProvider-D8PS7AJa.esm.js → PrivacyLensProvider-EwnC_C5n.esm.js} +1 -1
- /package/dist/{types-BfgmV7s72.d.ts → types-BfgmV7s7.d.ts} +0 -0
- /package/dist/{types-CJ7Yl9K-2.d.ts → types-CJ7Yl9K-.d.ts} +0 -0
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
import { c as wasmCallWrapper, s as ML_CALL_MAX_POLLS } from "./wasmWebClient-B7baE-Wf.esm.js";
|
|
2
|
+
import { a as waitForWasm, n as getWasmStatus, o as warmupWasm, r as isWasmReady, s as wasmRuntime } from "./warmup-CUUnwYxe.esm.js";
|
|
3
|
+
//#region ../infra/src/wasm/utilityWasmApi.ts
|
|
4
|
+
/**
|
|
5
|
+
* Utility / metadata domain facade over {@link WasmRuntime}.
|
|
6
|
+
*
|
|
7
|
+
* Holds no WASM state — the runtime owns every handle and buffer. The one
|
|
8
|
+
* qualification: it owns exactly two JS-side flags that the C++ side does not
|
|
9
|
+
* persist and that must be replayed into it at call time —
|
|
10
|
+
*
|
|
11
|
+
* - `dsEnabled_` (deepsight) is passed as an argument on every
|
|
12
|
+
* `prc`/`poc`/`rsp`/`ssl` call;
|
|
13
|
+
* - `inspectorOpened_` is pushed into C++ inside {@link getMetadata}, right
|
|
14
|
+
* before reading the metadata, because `setInspectorOpened` may legitimately be
|
|
15
|
+
* called before WASM is initialized.
|
|
16
|
+
*
|
|
17
|
+
* Both are deliberately **unguarded** setters: they never throw, so the SDK can
|
|
18
|
+
* record them during setup and have them honored once WASM comes up.
|
|
19
|
+
*
|
|
20
|
+
* `prc`/`poc`/`rsp` are the only methods here that hold the ML semaphore.
|
|
21
|
+
* `ssl`/`stl`/`osv`/`oev`/`ckvcks` and everything else are unlocked **by design**
|
|
22
|
+
* (decision D6) — never add locking.
|
|
23
|
+
*
|
|
24
|
+
* Method names, argument order and the pre-initialization error strings are
|
|
25
|
+
* copied verbatim from the mirrored upstream `wasmApi.ts` so a WASM version bump
|
|
26
|
+
* stays a diff against upstream (`docs/processes/WASM_VERSION_MIGRATION.md`).
|
|
27
|
+
* `setSdkPlatform`'s message says "device type" on purpose — do not "fix" it.
|
|
28
|
+
*/
|
|
29
|
+
var UtilityWasmApi = class {
|
|
30
|
+
constructor(runtime = wasmRuntime) {
|
|
31
|
+
this.runtime = runtime;
|
|
32
|
+
this.inspectorOpened_ = false;
|
|
33
|
+
this.dsEnabled_ = false;
|
|
34
|
+
}
|
|
35
|
+
ens(image) {
|
|
36
|
+
return this.runtime.requireUtilityApi("Unable to encrypt the image, cpp API hasn't been initialized").ens(image);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Native label inspection has been unavailable since
|
|
40
|
+
* v2.14.49-post1; scheduled for removal in 3.0.0. Protected PRC/POC owns
|
|
41
|
+
* the authoritative decision: use `prc()` followed by `poc()` instead.
|
|
42
|
+
*/
|
|
43
|
+
isVirtualCamera(_label) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
estimatePerformance() {
|
|
47
|
+
return this.runtime.requireUtilityApi("Unable to estimate performance, cpp API hasn't been initialized").estimatePerformance();
|
|
48
|
+
}
|
|
49
|
+
async analyzeFrame(image) {
|
|
50
|
+
const message = "Unable to analyze the frame, cpp API hasn't been initialized";
|
|
51
|
+
this.runtime.requireUtilityApi(message);
|
|
52
|
+
await this.runtime.allocateImageBuffers(image.width, image.height);
|
|
53
|
+
this.runtime.writeFrame(image);
|
|
54
|
+
this.runtime.requireUtilityApi(message).analyzeFrame();
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Sets the native (C++) utility API's production mode. When `true`, the WASM
|
|
58
|
+
* module suppresses its verbose debug logging; when `false`, it emits it.
|
|
59
|
+
*
|
|
60
|
+
* @param productionMode - `true` to silence WASM logs, `false` to emit them.
|
|
61
|
+
* @throws If the WASM C++ API has not been initialized yet.
|
|
62
|
+
*/
|
|
63
|
+
async setProductionMode(productionMode) {
|
|
64
|
+
this.runtime.requireUtilityApi("Unable to set production mode, cpp API hasn't been initialized").setProductionMode(productionMode);
|
|
65
|
+
}
|
|
66
|
+
setSdkVersion(sdkVersion) {
|
|
67
|
+
this.runtime.requireUtilityApi("Unable to set sdk version, cpp API hasn't been initialized").setSdkVersion(sdkVersion);
|
|
68
|
+
}
|
|
69
|
+
setSdkPlatform(sdkPlatform) {
|
|
70
|
+
this.runtime.requireUtilityApi("Unable to set device type, cpp API hasn't been initialized").setSdkPlatform(sdkPlatform);
|
|
71
|
+
}
|
|
72
|
+
setDeviceInfo(deviceInfo, overrideExisting = true) {
|
|
73
|
+
this.runtime.requireUtilityApi("Unable to set device info, cpp API hasn't been initialized").setDeviceInfo(deviceInfo, overrideExisting);
|
|
74
|
+
}
|
|
75
|
+
setBrowserInfo(browserInfo, overrideExisting = true) {
|
|
76
|
+
this.runtime.requireUtilityApi("Unable to set browser info, cpp API hasn't been initialized").setBrowserInfo(browserInfo, overrideExisting);
|
|
77
|
+
}
|
|
78
|
+
setCameraInfo(cameraInfo, overrideExisting = true) {
|
|
79
|
+
this.runtime.requireUtilityApi("Unable to set camera info, cpp API hasn't been initialized").setCameraInfo(cameraInfo, overrideExisting);
|
|
80
|
+
}
|
|
81
|
+
setZc(zc) {
|
|
82
|
+
this.runtime.requireUtilityApi("Unable to set zc, cpp API hasn't been initialized").setZc(zc);
|
|
83
|
+
}
|
|
84
|
+
setMotionStatus(motionStatus) {
|
|
85
|
+
this.runtime.requireUtilityApi("Unable to set motion status, cpp API hasn't been initialized").setMotionStatus(motionStatus);
|
|
86
|
+
}
|
|
87
|
+
setInspectorOpened(inspectorOpened) {
|
|
88
|
+
this.inspectorOpened_ = inspectorOpened;
|
|
89
|
+
}
|
|
90
|
+
getInspectorOpened() {
|
|
91
|
+
return this.inspectorOpened_;
|
|
92
|
+
}
|
|
93
|
+
setBackgroundMode(backgroundMode) {
|
|
94
|
+
this.runtime.requireUtilityApi("Unable to set background mode, cpp API hasn't been initialized").setBackgroundMode(backgroundMode);
|
|
95
|
+
}
|
|
96
|
+
setDsEnabled(enabled) {
|
|
97
|
+
this.dsEnabled_ = enabled;
|
|
98
|
+
}
|
|
99
|
+
getCheck() {
|
|
100
|
+
return this.runtime.requireUtilityApi("Unable to get check, cpp API hasn't been initialized").getCheck();
|
|
101
|
+
}
|
|
102
|
+
getMetadata() {
|
|
103
|
+
const utilityApi = this.runtime.requireUtilityApi("Unable to get metadata, cpp API hasn't been initialized");
|
|
104
|
+
utilityApi.setInspectorOpened(this.inspectorOpened_);
|
|
105
|
+
return utilityApi.getMetadata();
|
|
106
|
+
}
|
|
107
|
+
async prc() {
|
|
108
|
+
const message = "Unable to prc, cpp API hasn't been initialized";
|
|
109
|
+
this.runtime.requireUtilityApi(message);
|
|
110
|
+
await wasmCallWrapper(this.runtime.mlCallSemaphore, () => this.runtime.requireUtilityApi(message).prc(this.dsEnabled_, false), true, {
|
|
111
|
+
maxPolls: ML_CALL_MAX_POLLS,
|
|
112
|
+
label: "prc"
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
async poc(output) {
|
|
116
|
+
const message = "Unable to poc, cpp API hasn't been initialized";
|
|
117
|
+
this.runtime.requireUtilityApi(message);
|
|
118
|
+
await wasmCallWrapper(this.runtime.mlCallSemaphore, () => this.runtime.requireUtilityApi(message).poc(this.dsEnabled_, output), true, {
|
|
119
|
+
maxPolls: ML_CALL_MAX_POLLS,
|
|
120
|
+
label: "poc"
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
async rsp() {
|
|
124
|
+
const message = "Unable to rsp, cpp API hasn't been initialized";
|
|
125
|
+
this.runtime.requireUtilityApi(message);
|
|
126
|
+
await wasmCallWrapper(this.runtime.mlCallSemaphore, () => this.runtime.requireUtilityApi(message).rsp(this.dsEnabled_), true, {
|
|
127
|
+
maxPolls: ML_CALL_MAX_POLLS,
|
|
128
|
+
label: "rsp"
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
ssl() {
|
|
132
|
+
this.runtime.requireUtilityApi("Unable to ssl, cpp API hasn't been initialized").ssl(this.dsEnabled_);
|
|
133
|
+
}
|
|
134
|
+
stl() {
|
|
135
|
+
this.runtime.requireUtilityApi("Unable to stl, cpp API hasn't been initialized").stl();
|
|
136
|
+
}
|
|
137
|
+
osv() {
|
|
138
|
+
this.runtime.requireUtilityApi("Unable to set sensor beginning timestamp, cpp API hasn't been initialized").osv();
|
|
139
|
+
}
|
|
140
|
+
oev() {
|
|
141
|
+
this.runtime.requireUtilityApi("Unable to set sensor ending timestamp, cpp API hasn't been initialized").oev();
|
|
142
|
+
}
|
|
143
|
+
ckvcks(data) {
|
|
144
|
+
this.runtime.requireUtilityApi("Unable to ckvcks, cpp API hasn't been initialized").ckvcks(data);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Clear all states, not related to ml pipelines
|
|
148
|
+
*/
|
|
149
|
+
resetOther() {
|
|
150
|
+
this.runtime.requireUtilityApi("Unable to reset other states, cpp API hasn't been initialized").resetOther();
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Full reset. Pipelines first, then the non-pipeline state — the order the
|
|
154
|
+
* mirrored upstream wrapper uses.
|
|
155
|
+
*/
|
|
156
|
+
reset() {
|
|
157
|
+
this.runtime.resetAllPipelines();
|
|
158
|
+
this.resetOther();
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
const utilityWasmApi = new UtilityWasmApi();
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region ../infra/src/providers/wasm/BaseWasmProvider.ts
|
|
164
|
+
/**
|
|
165
|
+
* Base provider class that abstracts common WASM functionality.
|
|
166
|
+
* This serves as a foundation for specific ML capability providers
|
|
167
|
+
* like FaceDetectionProvider and IdCaptureProvider.
|
|
168
|
+
*/
|
|
169
|
+
var BaseWasmProvider = class {
|
|
170
|
+
/**
|
|
171
|
+
* Creates a new BaseWasmProvider
|
|
172
|
+
* @param pipelineType - The WASM pipeline type this provider uses
|
|
173
|
+
*/
|
|
174
|
+
constructor(pipelineType) {
|
|
175
|
+
this._isInitialized = false;
|
|
176
|
+
this.pipelineType = pipelineType;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Returns whether this provider has been initialized.
|
|
180
|
+
*/
|
|
181
|
+
get initialized() {
|
|
182
|
+
return this._isInitialized;
|
|
183
|
+
}
|
|
184
|
+
getPipelineType() {
|
|
185
|
+
if (this.pipelineType === void 0) throw new Error(`${this.constructor.name} has no pipeline type configured.`);
|
|
186
|
+
return this.pipelineType;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Initializes the provider by ensuring WASM is loaded
|
|
190
|
+
* @param config - Provider configuration
|
|
191
|
+
* @param pipeline - The pipeline type to warm up ('selfie', 'idCapture', etc.)
|
|
192
|
+
*/
|
|
193
|
+
async initializeBase(config, pipeline) {
|
|
194
|
+
if (this._isInitialized) return;
|
|
195
|
+
const status = getWasmStatus();
|
|
196
|
+
if (status.isLoading || isWasmReady() || status.error) {
|
|
197
|
+
if (!(status.isLoading && status.loadedPipelines.includes(pipeline))) await waitForWasm();
|
|
198
|
+
if (this.pipelineType !== void 0 && !getWasmStatus().loadedPipelines.includes(pipeline)) throw new Error(`WASM pipeline "${pipeline}" is not loaded.`);
|
|
199
|
+
} else {
|
|
200
|
+
if (!config.wasmPath || !config.glueCodePath && !config.loadGlue) throw new Error("WASM path and glue code path are required. Call warmupWasm() first.");
|
|
201
|
+
await warmupWasm({
|
|
202
|
+
...config,
|
|
203
|
+
wasmPath: config.wasmPath,
|
|
204
|
+
glueCodePath: config.glueCodePath ?? "",
|
|
205
|
+
pipelines: [pipeline]
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
this._isInitialized = true;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Ensures the provider is initialized before performing operations.
|
|
212
|
+
* @throws Error if not initialized
|
|
213
|
+
*/
|
|
214
|
+
ensureInitialized() {
|
|
215
|
+
if (!this._isInitialized) throw new Error(`${this.constructor.name} not initialized. Call initialize() first.`);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Processes a frame through the WASM pipeline
|
|
219
|
+
* @param image - Image data to process
|
|
220
|
+
* @returns The pipeline result (type depends on pipeline - WASM returns any)
|
|
221
|
+
*/
|
|
222
|
+
async processFrameWasm(image) {
|
|
223
|
+
this.ensureInitialized();
|
|
224
|
+
const pipelineType = this.getPipelineType();
|
|
225
|
+
await wasmRuntime.allocateImageBuffers(image.width, image.height);
|
|
226
|
+
await wasmRuntime.handleDetectionCallAndUpdateState(pipelineType);
|
|
227
|
+
return await wasmRuntime.process(pipelineType, image);
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Resets the pipeline to its initial state.
|
|
231
|
+
* Safe to call even if not initialized (no-op in that case).
|
|
232
|
+
*/
|
|
233
|
+
reset() {
|
|
234
|
+
if (this._isInitialized && this.pipelineType !== void 0) wasmRuntime.resetPipeline(this.pipelineType);
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* Disposes of resources and resets initialization state.
|
|
238
|
+
* Safe to call even if not initialized.
|
|
239
|
+
*/
|
|
240
|
+
async dispose() {
|
|
241
|
+
this.reset();
|
|
242
|
+
this._isInitialized = false;
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region ../infra/src/providers/wasm/WasmUtilProvider.ts
|
|
247
|
+
var WasmUtilProvider = class WasmUtilProvider extends BaseWasmProvider {
|
|
248
|
+
static async getInstance() {
|
|
249
|
+
if (WasmUtilProvider.instance) return WasmUtilProvider.instance;
|
|
250
|
+
if (WasmUtilProvider.initPromise) return WasmUtilProvider.initPromise;
|
|
251
|
+
WasmUtilProvider.initPromise = (async () => {
|
|
252
|
+
const instance = new WasmUtilProvider();
|
|
253
|
+
await instance.initializeBase({}, "selfie");
|
|
254
|
+
WasmUtilProvider.instance = instance;
|
|
255
|
+
return instance;
|
|
256
|
+
})();
|
|
257
|
+
return WasmUtilProvider.initPromise;
|
|
258
|
+
}
|
|
259
|
+
static resetInstance() {
|
|
260
|
+
WasmUtilProvider.instance = void 0;
|
|
261
|
+
WasmUtilProvider.initPromise = void 0;
|
|
262
|
+
}
|
|
263
|
+
constructor() {
|
|
264
|
+
super(void 0);
|
|
265
|
+
}
|
|
266
|
+
async initialize(config) {
|
|
267
|
+
if (this.initialized) return;
|
|
268
|
+
const pipeline = config.pipelines?.[0] ?? "selfie";
|
|
269
|
+
await this.initializeBase(config, pipeline);
|
|
270
|
+
}
|
|
271
|
+
async processFrame(_image) {
|
|
272
|
+
throw new Error("WasmUtilProvider does not support frame processing. Use encryptImage() instead.");
|
|
273
|
+
}
|
|
274
|
+
encryptImage(image) {
|
|
275
|
+
this.ensureInitialized();
|
|
276
|
+
return utilityWasmApi.ens(image);
|
|
277
|
+
}
|
|
278
|
+
setSdkVersion(version) {
|
|
279
|
+
this.ensureInitialized();
|
|
280
|
+
utilityWasmApi.setSdkVersion(version);
|
|
281
|
+
}
|
|
282
|
+
setSdkPlatform(platform) {
|
|
283
|
+
this.ensureInitialized();
|
|
284
|
+
utilityWasmApi.setSdkPlatform(platform);
|
|
285
|
+
}
|
|
286
|
+
setDeviceInfo(deviceInfo, overrideExisting = true) {
|
|
287
|
+
this.ensureInitialized();
|
|
288
|
+
utilityWasmApi.setDeviceInfo(deviceInfo, overrideExisting);
|
|
289
|
+
}
|
|
290
|
+
setBrowserInfo(browserInfo, overrideExisting = true) {
|
|
291
|
+
this.ensureInitialized();
|
|
292
|
+
utilityWasmApi.setBrowserInfo(browserInfo, overrideExisting);
|
|
293
|
+
}
|
|
294
|
+
setCameraInfo(cameraInfo, overrideExisting = true) {
|
|
295
|
+
this.ensureInitialized();
|
|
296
|
+
utilityWasmApi.setCameraInfo(cameraInfo, overrideExisting);
|
|
297
|
+
}
|
|
298
|
+
setMotionStatus(status) {
|
|
299
|
+
this.ensureInitialized();
|
|
300
|
+
utilityWasmApi.setMotionStatus(status);
|
|
301
|
+
}
|
|
302
|
+
setBackgroundMode(backgroundMode) {
|
|
303
|
+
this.ensureInitialized();
|
|
304
|
+
utilityWasmApi.setBackgroundMode(backgroundMode);
|
|
305
|
+
}
|
|
306
|
+
setOnDeviceMode(enabled) {
|
|
307
|
+
wasmRuntime.setOnDeviceMode(enabled);
|
|
308
|
+
}
|
|
309
|
+
setZc(zc) {
|
|
310
|
+
this.ensureInitialized();
|
|
311
|
+
utilityWasmApi.setZc(zc);
|
|
312
|
+
}
|
|
313
|
+
setInspectorOpened(opened) {
|
|
314
|
+
this.ensureInitialized();
|
|
315
|
+
utilityWasmApi.setInspectorOpened(opened);
|
|
316
|
+
}
|
|
317
|
+
getInspectorOpened() {
|
|
318
|
+
return utilityWasmApi.getInspectorOpened();
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Toggles the WASM module's production mode. When `true`, the native module
|
|
322
|
+
* suppresses its verbose debug logging/console output; when `false`, those
|
|
323
|
+
* logs are emitted. The SDK forces this to `true` by default and only flips
|
|
324
|
+
* it off when the caller opts in via `setup({ wasm: { showLogs: true } })`.
|
|
325
|
+
*
|
|
326
|
+
* @param productionMode - `true` to silence WASM logs, `false` to emit them.
|
|
327
|
+
*/
|
|
328
|
+
async setProductionMode(productionMode) {
|
|
329
|
+
this.ensureInitialized();
|
|
330
|
+
await utilityWasmApi.setProductionMode(productionMode);
|
|
331
|
+
}
|
|
332
|
+
getMetadata() {
|
|
333
|
+
this.ensureInitialized();
|
|
334
|
+
return utilityWasmApi.getMetadata();
|
|
335
|
+
}
|
|
336
|
+
async analyzeFrame(image) {
|
|
337
|
+
this.ensureInitialized();
|
|
338
|
+
await utilityWasmApi.analyzeFrame(image);
|
|
339
|
+
}
|
|
340
|
+
getCheck() {
|
|
341
|
+
this.ensureInitialized();
|
|
342
|
+
return utilityWasmApi.getCheck();
|
|
343
|
+
}
|
|
344
|
+
getPipelineState() {
|
|
345
|
+
this.ensureInitialized();
|
|
346
|
+
return wasmRuntime.getPipelineState();
|
|
347
|
+
}
|
|
348
|
+
estimatePerformance() {
|
|
349
|
+
this.ensureInitialized();
|
|
350
|
+
return utilityWasmApi.estimatePerformance();
|
|
351
|
+
}
|
|
352
|
+
isVirtualCamera(label) {
|
|
353
|
+
return utilityWasmApi.isVirtualCamera(label);
|
|
354
|
+
}
|
|
355
|
+
async prc() {
|
|
356
|
+
this.ensureInitialized();
|
|
357
|
+
await utilityWasmApi.prc();
|
|
358
|
+
}
|
|
359
|
+
async poc(output) {
|
|
360
|
+
this.ensureInitialized();
|
|
361
|
+
await utilityWasmApi.poc(output);
|
|
362
|
+
}
|
|
363
|
+
async rsp() {
|
|
364
|
+
this.ensureInitialized();
|
|
365
|
+
await utilityWasmApi.rsp();
|
|
366
|
+
}
|
|
367
|
+
ssl() {
|
|
368
|
+
this.ensureInitialized();
|
|
369
|
+
utilityWasmApi.ssl();
|
|
370
|
+
}
|
|
371
|
+
stl() {
|
|
372
|
+
this.ensureInitialized();
|
|
373
|
+
utilityWasmApi.stl();
|
|
374
|
+
}
|
|
375
|
+
osv() {
|
|
376
|
+
this.ensureInitialized();
|
|
377
|
+
utilityWasmApi.osv();
|
|
378
|
+
}
|
|
379
|
+
oev() {
|
|
380
|
+
this.ensureInitialized();
|
|
381
|
+
utilityWasmApi.oev();
|
|
382
|
+
}
|
|
383
|
+
ckvcks(data) {
|
|
384
|
+
this.ensureInitialized();
|
|
385
|
+
utilityWasmApi.ckvcks(data);
|
|
386
|
+
}
|
|
387
|
+
};
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region ../infra/src/storage/safeStorage.ts
|
|
390
|
+
/**
|
|
391
|
+
* Storage resolvers that tolerate hosts which make Web Storage unreachable.
|
|
392
|
+
*
|
|
393
|
+
* Two hostile shapes occur in the field, and they fail differently:
|
|
394
|
+
*
|
|
395
|
+
* 1. **Deleted bare global** — a page mitigates self-XSS with
|
|
396
|
+
* `delete window.localStorage` and keeps a module-private reference. Since
|
|
397
|
+
* `window` *is* the global object, the identifier stops resolving: a bare
|
|
398
|
+
* read throws `ReferenceError`. `typeof` is the only safe probe, because it
|
|
399
|
+
* is the one operator that tolerates an unresolvable identifier.
|
|
400
|
+
* 2. **Blocked storage** — a webview or a cross-origin/partitioned context
|
|
401
|
+
* makes the accessor itself throw (`SecurityError`). Here `typeof` is *not*
|
|
402
|
+
* enough: it invokes the getter, so the throw escapes the guard.
|
|
403
|
+
*
|
|
404
|
+
* Handling only one shape leaves the other live, so always go through these
|
|
405
|
+
* resolvers instead of touching the globals directly. A `null` return means
|
|
406
|
+
* "no storage in this host" — callers degrade, they do not throw.
|
|
407
|
+
*/
|
|
408
|
+
function resolveLocalStorage() {
|
|
409
|
+
try {
|
|
410
|
+
return typeof localStorage === "undefined" ? null : localStorage;
|
|
411
|
+
} catch {
|
|
412
|
+
return null;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
function resolveSessionStorage() {
|
|
416
|
+
try {
|
|
417
|
+
return typeof sessionStorage === "undefined" ? null : sessionStorage;
|
|
418
|
+
} catch {
|
|
419
|
+
return null;
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
//#endregion
|
|
423
|
+
export { utilityWasmApi as a, BaseWasmProvider as i, resolveSessionStorage as n, WasmUtilProvider as r, resolveLocalStorage as t };
|
package/dist/selfie.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
|
|
2
|
-
import { a as SelfieCaptureOnlyMachine, c as SelfieActor, g as
|
|
3
|
-
import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
4
|
-
import { a as FaceCapturedImageData, i as FaceCaptureOnlyResponse, n as DetectionStatus, o as FaceErrorCode } from "./types-Hmd7U0JA.js";
|
|
2
|
+
import { _ as SelfieCaptureOnlyConfig, a as SelfieCaptureOnlyMachine, c as SelfieActor, g as processFace, h as ProcessFaceResponse, i as SelfieCaptureOnlyActor, l as SelfieMachine, n as FaceCaptureManagerState, o as selfieCaptureOnlyMachine, r as CreateSelfieCaptureOnlyActorOptions, t as FaceCaptureManager, u as selfieMachine, v as SelfieConfig } from "./faceCaptureManagerFactory-CvtqcLxs.js";
|
|
5
3
|
import { n as PermissionStatus, t as PermissionResult } from "./types-BEwVKkLJ.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { a as FaceCapturedImageData, i as FaceCaptureOnlyResponse, n as DetectionStatus, o as FaceErrorCode } from "./types-CM-jtjJ2.js";
|
|
5
|
+
import { n as DeepsightService } from "./StreamCanvasCapture-B3YT2Bt6.js";
|
|
6
|
+
import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
7
|
+
import { i as createSelfieManagerFromActor, n as SelfieState, r as createSelfieManager, t as SelfieManager } from "./selfieManager-D1KRJ39M.js";
|
|
8
8
|
//#region src/modules/selfie/selfieCaptureOnlyManager.d.ts
|
|
9
9
|
type SelfieCaptureOnlyState = FaceCaptureManagerState;
|
|
10
10
|
type SelfieCaptureOnlyManager = FaceCaptureManager;
|
package/dist/selfie.esm.js
CHANGED
|
@@ -1,53 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as eventModuleNames } from "./events-
|
|
4
|
-
import {
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-msLybMbC.esm.js";
|
|
2
|
+
import { r as WasmUtilProvider } from "./safeStorage-B-trhxg6.esm.js";
|
|
3
|
+
import { n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
|
|
4
|
+
import { s as createActor } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
5
5
|
import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
6
|
-
import { t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
7
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Performs local finalization of a captured face frame: stops local video
|
|
15
|
-
* recording (if any), runs deepsight metadata extraction, and assembles the
|
|
16
|
-
* rich payload delivered to the integrator's `onCapture` callback.
|
|
17
|
-
*/
|
|
18
|
-
async function finalizeFaceCaptureOnly(ctx, signal) {
|
|
19
|
-
const canvas = ctx.capturedImage;
|
|
20
|
-
if (!canvas) throw new Error("selfieCaptureOnly: no captured image");
|
|
21
|
-
let videoBase64;
|
|
22
|
-
try {
|
|
23
|
-
videoBase64 = (await ctx.recordingService?.stopAndGetVideo())?.videoBase64;
|
|
24
|
-
} catch {
|
|
25
|
-
videoBase64 = void 0;
|
|
26
|
-
}
|
|
27
|
-
if (signal.aborted) throw new DOMException("Aborted", "AbortError");
|
|
28
|
-
let metadata = "";
|
|
29
|
-
try {
|
|
30
|
-
if (ctx.deepsightService) {
|
|
31
|
-
const imageData = canvas.getImageData();
|
|
32
|
-
if (imageData) await ctx.deepsightService.analyzeFrame(imageData);
|
|
33
|
-
if (signal.aborted) throw new DOMException("Aborted", "AbortError");
|
|
34
|
-
metadata = ctx.deepsightService.getMetadata();
|
|
35
|
-
}
|
|
36
|
-
} catch (error) {
|
|
37
|
-
if (error?.name === "AbortError") throw error;
|
|
38
|
-
metadata = "";
|
|
39
|
-
}
|
|
40
|
-
const imageBase64 = canvas.getBase64Image() ?? "";
|
|
41
|
-
const blobData = canvas.getBlobData();
|
|
42
|
-
if (!blobData) throw new Error("selfieCaptureOnly: failed to build image blob");
|
|
43
|
-
return {
|
|
44
|
-
imageBase64,
|
|
45
|
-
blob: blobData.blob,
|
|
46
|
-
url: blobData.url,
|
|
47
|
-
metadata,
|
|
48
|
-
videoBase64
|
|
49
|
-
};
|
|
50
|
-
}
|
|
6
|
+
import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-BSextack.esm.js";
|
|
7
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-pCmG4MeF.esm.js";
|
|
8
|
+
import { s as PROTECTED_CAPTURE_TARGET } from "./createCameraCycleOwnership-DQ5-F2oW.esm.js";
|
|
9
|
+
import { r as processFace } from "./selfieErrorUtils-C77GXJH6.esm.js";
|
|
10
|
+
import { t as selfieMachine } from "./selfieStateMachine-fwMmNtOi.esm.js";
|
|
11
|
+
import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-CihVnODO.esm.js";
|
|
12
|
+
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-BjzPjJ_p.esm.js";
|
|
51
13
|
/**
|
|
52
14
|
* Selfie state machine variant for the captureOnly flow. Shares the full base
|
|
53
15
|
* face-capture state tree; only the upload/process step is local instead of
|
|
@@ -55,37 +17,13 @@ async function finalizeFaceCaptureOnly(ctx, signal) {
|
|
|
55
17
|
*/
|
|
56
18
|
const selfieCaptureOnlyMachine = faceCaptureMachine.provide({
|
|
57
19
|
actors: {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
* unencrypted. The downstream `encryptedBase64Image`/`recordingId` fields
|
|
62
|
-
* are inert because `uploadFace` no longer reads them.
|
|
63
|
-
*/
|
|
64
|
-
prepareFaceUpload: fromPromise(async () => ({
|
|
65
|
-
encryptedBase64Image: "",
|
|
66
|
-
recordingId: null
|
|
67
|
-
})),
|
|
68
|
-
/**
|
|
69
|
-
* "Upload" becomes local finalize. The rich payload is routed to the
|
|
70
|
-
* typed `captureOnlyResult` context slot by the body-overridden
|
|
71
|
-
* `setUploadResponseFromEvent` action below, rather than the loose
|
|
72
|
-
* `uploadResponse: Record<string, unknown>` channel the base flow uses.
|
|
73
|
-
*/
|
|
74
|
-
uploadFace: fromPromise(async ({ input, signal }) => {
|
|
75
|
-
return await finalizeFaceCaptureOnly(input, signal);
|
|
20
|
+
protectedFaceController: createDefaultProtectedFaceControllerActor({
|
|
21
|
+
target: PROTECTED_CAPTURE_TARGET.selfie,
|
|
22
|
+
delivery: "local"
|
|
76
23
|
}),
|
|
77
24
|
/** No backend processing in captureOnly. */
|
|
78
25
|
processFace: fromPromise(async () => ({}))
|
|
79
26
|
},
|
|
80
|
-
actions: {
|
|
81
|
-
/**
|
|
82
|
-
* Override the regular upload-response handler to populate the typed
|
|
83
|
-
* `captureOnlyResult` slot the captureOnly manager reads on `finished`.
|
|
84
|
-
* The regular `uploadResponse` channel is left undefined — the variant's
|
|
85
|
-
* guards (`hasUploadValidationError`, `isTerminalUploadError`) both
|
|
86
|
-
* return false, so nothing downstream needs it.
|
|
87
|
-
*/
|
|
88
|
-
setUploadResponseFromEvent: assign({ captureOnlyResult: ({ event }) => event.output }) },
|
|
89
27
|
guards: {
|
|
90
28
|
hasUploadValidationError: () => false,
|
|
91
29
|
isTerminalUploadError: () => false
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { t as addDeviceStats } from "./stats-
|
|
4
|
-
import { t as getDeviceClass } from "./getDeviceClass-9y-kbVDw.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
3
|
+
import { t as addDeviceStats } from "./stats-DkK-f8JT.esm.js";
|
|
5
4
|
import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
|
|
5
|
+
import { t as getDeviceClass } from "./getDeviceClass-5NYZg9s6.esm.js";
|
|
6
6
|
//#region src/modules/selfie/selfieUploadService.ts
|
|
7
7
|
/**
|
|
8
8
|
* Uploads a selfie image to the backend.
|
|
@@ -36,6 +36,32 @@ async function uploadSelfie({ encryptedBase64Image, faceCoordinates, signal, met
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
+
* Uploads a selfie the user picked from device storage. Same endpoint and
|
|
40
|
+
* encryption as {@link uploadSelfie}, plus `captureType=UPLOAD`; there is no
|
|
41
|
+
* camera, so no face coordinates, deepsight metadata or recording id.
|
|
42
|
+
*/
|
|
43
|
+
async function uploadManualSelfie({ base64Image, dependencies, imageType = "selfie", signal }) {
|
|
44
|
+
try {
|
|
45
|
+
const payload = {
|
|
46
|
+
base64Image: (await dependencies.getWasmUtil()).encryptImage(base64Image),
|
|
47
|
+
encrypted: true,
|
|
48
|
+
clientInfo: { deviceClass: getDeviceClass() }
|
|
49
|
+
};
|
|
50
|
+
const res = await api.post(endpoints.selfie, payload, {
|
|
51
|
+
signal,
|
|
52
|
+
query: {
|
|
53
|
+
imageType,
|
|
54
|
+
captureType: "UPLOAD"
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
if (!res.ok) throw new Error(`POST ${endpoints.selfie} failed: ${res.status} ${res.statusText}`);
|
|
58
|
+
return res.data;
|
|
59
|
+
} catch (error) {
|
|
60
|
+
const errorCode = getFaceErrorCodeFromHttpError(error);
|
|
61
|
+
throw withTransportStatus(new Error(errorCode ?? FACE_ERROR_CODES.SERVER), error);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
39
65
|
* Copies the HTTP status of `source` onto `target`. The code alone cannot say
|
|
40
66
|
* whether the request got a verdict or never reached the backend — a network
|
|
41
67
|
* failure and a 5xx both map to `SERVER_ERROR` — so a caller that retries
|
|
@@ -87,4 +113,4 @@ const validateUploadResponse = ({ config, response }) => {
|
|
|
87
113
|
if (config.validateHeadCover && response.hasHeadCover) return FACE_ERROR_CODES.HEAD_COVER;
|
|
88
114
|
};
|
|
89
115
|
//#endregion
|
|
90
|
-
export { uploadSelfie as i, validateUploadResponse as n, processFace as r, getFaceErrorCodeFromUnknown as t };
|
|
116
|
+
export { uploadSelfie as a, uploadManualSelfie as i, validateUploadResponse as n, processFace as r, getFaceErrorCodeFromUnknown as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { n as eventModuleNames } from "./events-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-msLybMbC.esm.js";
|
|
2
|
+
import { r as WasmUtilProvider } from "./safeStorage-B-trhxg6.esm.js";
|
|
3
|
+
import { n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
|
|
4
4
|
import { s as createActor } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
5
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
6
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
5
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-pCmG4MeF.esm.js";
|
|
6
|
+
import { t as selfieMachine } from "./selfieStateMachine-fwMmNtOi.esm.js";
|
|
7
7
|
//#region src/modules/selfie/selfieActor.ts
|
|
8
8
|
function createSelfieActor(options) {
|
|
9
9
|
const dependencies = options.dependencies ?? {
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-CQQ99QOI.js";
|
|
2
2
|
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
|
|
3
|
-
import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-
|
|
4
|
-
//#region src/modules/selfie/selfieUploadService.d.ts
|
|
5
|
-
type ProcessFaceImageType = 'selfie' | 'videoSelfie';
|
|
6
|
-
type ProcessFaceResponse = {
|
|
7
|
-
faceMatch: boolean;
|
|
8
|
-
confidence: number;
|
|
9
|
-
existingUser: boolean;
|
|
10
|
-
};
|
|
11
|
-
declare function processFace(imageType?: ProcessFaceImageType, signal?: AbortSignal): Promise<ProcessFaceResponse>;
|
|
12
|
-
//#endregion
|
|
3
|
+
import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-CvtqcLxs.js";
|
|
13
4
|
//#region src/modules/selfie/selfieManager.d.ts
|
|
14
5
|
type SelfieState = FaceCaptureManagerState;
|
|
15
6
|
/**
|
|
@@ -31,6 +22,9 @@ declare function createSelfieManagerFromActor(actor: SelfieActor, visibilityObse
|
|
|
31
22
|
reset(): void;
|
|
32
23
|
retryCapture(): void;
|
|
33
24
|
capture(): void;
|
|
25
|
+
goToManualUpload(): void;
|
|
26
|
+
manualUploadSelectFile(file: File): void;
|
|
27
|
+
manualUploadContinue(): void;
|
|
34
28
|
};
|
|
35
29
|
/**
|
|
36
30
|
* Creates a selfie manager instance for handling selfie capture flow.
|
|
@@ -71,7 +65,10 @@ declare function createSelfieManager(options: CreateSelfieActorOptions): Manager
|
|
|
71
65
|
reset(): void;
|
|
72
66
|
retryCapture(): void;
|
|
73
67
|
capture(): void;
|
|
68
|
+
goToManualUpload(): void;
|
|
69
|
+
manualUploadSelectFile(file: File): void;
|
|
70
|
+
manualUploadContinue(): void;
|
|
74
71
|
};
|
|
75
72
|
type SelfieManager = FaceCaptureManager;
|
|
76
73
|
//#endregion
|
|
77
|
-
export {
|
|
74
|
+
export { createSelfieManagerFromActor as i, SelfieState as n, createSelfieManager as r, SelfieManager as t };
|