@incodetech/core 2.2.0 → 2.3.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.txt +281 -0
- package/dist/BaseWasmProvider-Dyi6dKp1.d.ts +65 -0
- package/dist/{BrowserDiagnosticsCryptoProvider-B8vorxN5.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-BA1d_au0.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-zh9TC62P.esm.js → authenticationManager-C4B4-29g.esm.js} +5 -5
- package/dist/{authenticationManager-BBMGTcwW.d.ts → authenticationManager-DXTIUcma.d.ts} +7 -1
- package/dist/{authenticationStateMachine-xzi-vnvE.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--wMKWECS.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-fFVIRBNv.esm.js → dynamicFormsManager-Dt98SDfV.esm.js} +16 -5
- package/dist/{dynamicFormsStateMachine-D6D7oEYk.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-Y3MkoXpC.esm.js → ekybManager-DNZKrKF3.esm.js} +2 -2
- package/dist/{ekybStateMachine-3nlnqdlr.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-DGbAJ00W.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-CVnZ0fa5.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-CPQ4qv3F.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-tfeoGre9.esm.js → flowCompletionService-CLtbWhSK.esm.js} +2 -2
- package/dist/{flowServices-f5Ruz7R9.esm.js → flowServices-B5FwukTQ.esm.js} +91 -26
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-CH6RfqFH.esm.js → geolocationManager-DIw-xq9a.esm.js} +2 -2
- package/dist/{geolocationStateMachine-DmbWFely.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-BYwTZ2H8.esm.js → idCaptureManager-Vby8oYqh.esm.js} +259 -46
- package/dist/{idCaptureServices-44kwQItl.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-Dukuw23X.esm.js → runChildModule-TuyGE00X.esm.js} +3 -21
- package/dist/safeStorage-B-trhxg6.esm.js +423 -0
- package/dist/{sdkVersion-D1Bm59g6.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-Bj6B2ZVy.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-BFdLgN4i.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-dlfDehHk.esm.js → sessionInitializer-BLoK7SP9.esm.js} +187 -68
- package/dist/{setup-BgoWtvIS.d.ts → setup-Cv-JM9QC.d.ts} +63 -69
- package/dist/{setup-BIAtLa8k.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---iW2KKJ.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-NEhFZvWx.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-Cd-04W_X.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-kZ5OpdfM.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-CUHwyZT4.esm.js +0 -646
- package/dist/openviduLazy-CCDpFWg1.esm.js +0 -10
- package/dist/recordingService-3NSENVwp.esm.js +0 -329
- package/dist/safeStorage-Ep56I-f_.esm.js +0 -982
- package/dist/selfieStateMachine-CHV_WNst.esm.js +0 -55
- package/dist/trueSight-B_icM8r2.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
|
@@ -1,226 +0,0 @@
|
|
|
1
|
-
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
2
|
-
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
3
|
-
import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
|
|
4
|
-
import { i as assign, t as setup } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
5
|
-
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
6
|
-
import { n as isOtpComplete, t as computeOtpValidationErrors } from "./otp-D2k3PeSL.esm.js";
|
|
7
|
-
//#region src/modules/government-validation/governmentValidationServices.ts
|
|
8
|
-
async function processGovernmentValidation(signal) {
|
|
9
|
-
const res = await api.post(endpoints.governmentValidation, {}, { signal });
|
|
10
|
-
if (!res.ok) throw new Error(`POST ${endpoints.governmentValidation} failed: ${res.status} ${res.statusText}`);
|
|
11
|
-
return res.data;
|
|
12
|
-
}
|
|
13
|
-
async function submitGovernmentValidationOtp(params, signal) {
|
|
14
|
-
const res = await api.post(endpoints.governmentValidation, { otpCode: params.code }, { signal });
|
|
15
|
-
if (!res.ok) throw new Error(`POST ${endpoints.governmentValidation} (OTP) failed: ${res.status} ${res.statusText}`);
|
|
16
|
-
return res.data;
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region src/modules/government-validation/governmentValidationStateMachine.ts
|
|
20
|
-
const RESEND_TIMER_SECONDS = 30;
|
|
21
|
-
const governmentValidationMachine = setup({
|
|
22
|
-
types: {
|
|
23
|
-
context: {},
|
|
24
|
-
events: {},
|
|
25
|
-
input: {}
|
|
26
|
-
},
|
|
27
|
-
delays: { AUTO_PROCEED: 3e3 },
|
|
28
|
-
actors: {
|
|
29
|
-
processValidation: fromPromise(async ({ signal }) => {
|
|
30
|
-
return processGovernmentValidation(signal);
|
|
31
|
-
}),
|
|
32
|
-
submitOtp: fromPromise(async ({ input, signal }) => {
|
|
33
|
-
return submitGovernmentValidationOtp({ code: input.code }, signal);
|
|
34
|
-
}),
|
|
35
|
-
resendTimer: fromCallback(({ sendBack }) => {
|
|
36
|
-
const timer = BrowserTimerProvider.getInstance();
|
|
37
|
-
let seconds = RESEND_TIMER_SECONDS;
|
|
38
|
-
const interval = timer.setInterval(() => {
|
|
39
|
-
seconds -= 1;
|
|
40
|
-
sendBack({ type: "TICK" });
|
|
41
|
-
if (seconds <= 0) timer.clearInterval(interval);
|
|
42
|
-
}, 1e3);
|
|
43
|
-
return () => timer.clearInterval(interval);
|
|
44
|
-
})
|
|
45
|
-
},
|
|
46
|
-
actions: {
|
|
47
|
-
setError: assign(({ event }) => ({ error: String(event.error) })),
|
|
48
|
-
setErrorFromResponse: assign({ error: () => "Government validation failed" }),
|
|
49
|
-
setUnknownError: assign({ error: () => "Unknown validation status" }),
|
|
50
|
-
clearError: assign({ error: () => void 0 }),
|
|
51
|
-
setOtpCode: assign(({ event }) => ({
|
|
52
|
-
otpCode: event.code,
|
|
53
|
-
otpError: void 0,
|
|
54
|
-
otpValidationErrors: void 0
|
|
55
|
-
})),
|
|
56
|
-
validateOtpField: assign(({ context }) => {
|
|
57
|
-
const errors = computeOtpValidationErrors(context.otpCode);
|
|
58
|
-
return { otpValidationErrors: errors.otp ? errors : void 0 };
|
|
59
|
-
}),
|
|
60
|
-
setOtpError: assign(({ context }) => ({
|
|
61
|
-
otpError: "Invalid OTP code",
|
|
62
|
-
attemptsRemaining: context.attemptsRemaining - 1
|
|
63
|
-
})),
|
|
64
|
-
clearOtpError: assign({
|
|
65
|
-
otpError: () => void 0,
|
|
66
|
-
otpCode: () => "",
|
|
67
|
-
otpValidationErrors: () => void 0
|
|
68
|
-
}),
|
|
69
|
-
startResendTimer: assign({
|
|
70
|
-
resendTimer: () => RESEND_TIMER_SECONDS,
|
|
71
|
-
resendTimerActive: () => true
|
|
72
|
-
}),
|
|
73
|
-
tickResendTimer: assign(({ context }) => {
|
|
74
|
-
const newTimer = Math.max(0, context.resendTimer - 1);
|
|
75
|
-
return {
|
|
76
|
-
resendTimer: newTimer,
|
|
77
|
-
resendTimerActive: newTimer > 0
|
|
78
|
-
};
|
|
79
|
-
}),
|
|
80
|
-
resetContext: assign(({ context }) => ({
|
|
81
|
-
config: context.config,
|
|
82
|
-
error: void 0,
|
|
83
|
-
otpCode: "",
|
|
84
|
-
otpError: void 0,
|
|
85
|
-
otpValidationErrors: void 0,
|
|
86
|
-
attemptsRemaining: context.config.maxOtpAttempts ?? 3,
|
|
87
|
-
resendTimer: 0,
|
|
88
|
-
resendTimerActive: false
|
|
89
|
-
}))
|
|
90
|
-
},
|
|
91
|
-
guards: {
|
|
92
|
-
isBackgroundExecution: ({ context }) => context.config.backgroundExecution,
|
|
93
|
-
isProcessing: (_, params) => params.response.statusCode === -1,
|
|
94
|
-
isSuccess: (_, params) => params.response.statusCode === 0 && params.response.governmentValidation?.validationStatus?.status === "OK",
|
|
95
|
-
isError: (_, params) => params.response.statusCode > 0 || params.response.governmentValidation?.validationStatus?.status === "FAIL",
|
|
96
|
-
isOtpRequested: (_, params) => params.response.otpResponse?.authBridge?.otpCodeRequested === true,
|
|
97
|
-
isUnknown: (_, params) => params.response.governmentValidation?.validationStatus?.status === "UNKNOWN",
|
|
98
|
-
hasAttemptsRemaining: ({ context }) => context.attemptsRemaining > 0,
|
|
99
|
-
hasCompleteOtp: ({ context }) => isOtpComplete(context.otpCode),
|
|
100
|
-
canResend: ({ context }) => !context.resendTimerActive
|
|
101
|
-
}
|
|
102
|
-
}).createMachine({
|
|
103
|
-
id: "governmentValidation",
|
|
104
|
-
initial: "idle",
|
|
105
|
-
context: ({ input }) => ({
|
|
106
|
-
config: input.config,
|
|
107
|
-
error: void 0,
|
|
108
|
-
otpCode: "",
|
|
109
|
-
otpError: void 0,
|
|
110
|
-
otpValidationErrors: void 0,
|
|
111
|
-
attemptsRemaining: input.config.maxOtpAttempts ?? 3,
|
|
112
|
-
resendTimer: 0,
|
|
113
|
-
resendTimerActive: false
|
|
114
|
-
}),
|
|
115
|
-
states: {
|
|
116
|
-
idle: { on: { LOAD: { target: "loading" } } },
|
|
117
|
-
loading: { invoke: {
|
|
118
|
-
id: "processValidation",
|
|
119
|
-
src: "processValidation",
|
|
120
|
-
onDone: [
|
|
121
|
-
{
|
|
122
|
-
target: "finished",
|
|
123
|
-
guard: "isBackgroundExecution"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
target: "awaitingOtp",
|
|
127
|
-
guard: {
|
|
128
|
-
type: "isOtpRequested",
|
|
129
|
-
params: ({ event }) => ({ response: event.output })
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
target: "displaySuccess",
|
|
134
|
-
guard: {
|
|
135
|
-
type: "isSuccess",
|
|
136
|
-
params: ({ event }) => ({ response: event.output })
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
target: "displayProcessing",
|
|
141
|
-
guard: {
|
|
142
|
-
type: "isProcessing",
|
|
143
|
-
params: ({ event }) => ({ response: event.output })
|
|
144
|
-
}
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
target: "displayUnknown",
|
|
148
|
-
guard: {
|
|
149
|
-
type: "isUnknown",
|
|
150
|
-
params: ({ event }) => ({ response: event.output })
|
|
151
|
-
},
|
|
152
|
-
actions: "setUnknownError"
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
target: "displayError",
|
|
156
|
-
actions: "setErrorFromResponse"
|
|
157
|
-
}
|
|
158
|
-
],
|
|
159
|
-
onError: [{
|
|
160
|
-
target: "finished",
|
|
161
|
-
guard: "isBackgroundExecution"
|
|
162
|
-
}, {
|
|
163
|
-
target: "displayError",
|
|
164
|
-
actions: "setError"
|
|
165
|
-
}]
|
|
166
|
-
} },
|
|
167
|
-
awaitingOtp: {
|
|
168
|
-
entry: "startResendTimer",
|
|
169
|
-
invoke: {
|
|
170
|
-
id: "resendTimer",
|
|
171
|
-
src: "resendTimer"
|
|
172
|
-
},
|
|
173
|
-
on: {
|
|
174
|
-
TICK: { actions: "tickResendTimer" },
|
|
175
|
-
OTP_CHANGED: { actions: "setOtpCode" },
|
|
176
|
-
VALIDATE_OTP: { actions: "validateOtpField" },
|
|
177
|
-
SUBMIT_OTP: [{
|
|
178
|
-
guard: "hasCompleteOtp",
|
|
179
|
-
target: "verifyingOtp"
|
|
180
|
-
}, { actions: "validateOtpField" }],
|
|
181
|
-
RESEND_OTP: {
|
|
182
|
-
target: "loading",
|
|
183
|
-
guard: "canResend"
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
verifyingOtp: { invoke: {
|
|
188
|
-
id: "submitOtp",
|
|
189
|
-
src: "submitOtp",
|
|
190
|
-
input: ({ context }) => ({ code: context.otpCode }),
|
|
191
|
-
onDone: [
|
|
192
|
-
{
|
|
193
|
-
target: "displaySuccess",
|
|
194
|
-
guard: {
|
|
195
|
-
type: "isSuccess",
|
|
196
|
-
params: ({ event }) => ({ response: event.output })
|
|
197
|
-
}
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
target: "awaitingOtp",
|
|
201
|
-
guard: "hasAttemptsRemaining",
|
|
202
|
-
actions: "setOtpError"
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
target: "displayError",
|
|
206
|
-
actions: assign({ error: () => "Maximum OTP attempts exceeded" })
|
|
207
|
-
}
|
|
208
|
-
],
|
|
209
|
-
onError: [{
|
|
210
|
-
target: "awaitingOtp",
|
|
211
|
-
guard: "hasAttemptsRemaining",
|
|
212
|
-
actions: "setOtpError"
|
|
213
|
-
}, {
|
|
214
|
-
target: "displayError",
|
|
215
|
-
actions: "setError"
|
|
216
|
-
}]
|
|
217
|
-
} },
|
|
218
|
-
displaySuccess: { after: { AUTO_PROCEED: { target: "finished" } } },
|
|
219
|
-
displayProcessing: { after: { AUTO_PROCEED: { target: "finished" } } },
|
|
220
|
-
displayError: { after: { AUTO_PROCEED: { target: "finished" } } },
|
|
221
|
-
displayUnknown: { after: { AUTO_PROCEED: { target: "finished" } } },
|
|
222
|
-
finished: { type: "final" }
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
//#endregion
|
|
226
|
-
export { governmentValidationMachine as t };
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { i as getBarcodeEnhanceModelUrl } from "./wasmDefaults-DTUrftxR.esm.js";
|
|
2
|
-
import { a as getResolvedModelsBasePath, c as mlWasmJSApi_default, i as BaseWasmProvider } from "./safeStorage-Ep56I-f_.esm.js";
|
|
3
|
-
import { t as IncodeCanvas } from "./canvas-E1zGkel4.esm.js";
|
|
4
|
-
//#region ../infra/src/providers/wasm/IdCaptureProvider.ts
|
|
5
|
-
var IdCaptureProvider = class extends BaseWasmProvider {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(0);
|
|
8
|
-
this.lastProcessResult = null;
|
|
9
|
-
this.capturedCanvas = null;
|
|
10
|
-
this.originalCapturedCanvas = null;
|
|
11
|
-
this.lastDecodedBarcode = null;
|
|
12
|
-
this.barcodeEnhancementModelLoaded = false;
|
|
13
|
-
}
|
|
14
|
-
async initialize(config) {
|
|
15
|
-
if (config.videoSelfie === true) {
|
|
16
|
-
this.pipelineType = 2;
|
|
17
|
-
await this.initializeBase(config, "videoSelfieId");
|
|
18
|
-
} else await this.initializeBase(config, "idCapture");
|
|
19
|
-
}
|
|
20
|
-
setCallbacks(callbacks) {
|
|
21
|
-
this.ensureInitialized();
|
|
22
|
-
const onCaptureWrapper = () => {
|
|
23
|
-
callbacks.onCapture?.();
|
|
24
|
-
};
|
|
25
|
-
mlWasmJSApi_default.setIdCaptureCallbacks(this.getPipelineType(), callbacks.onFarAway ?? (() => {}), callbacks.onDetectionStarted ?? (() => {}), callbacks.onMaskChange ? (show, mask, top, orientation) => callbacks.onMaskChange?.(show, mask, top, orientation) : () => {}, callbacks.onBlur ?? (() => {}), callbacks.onGlare ?? (() => {}), callbacks.onCapturing ?? (() => {}), callbacks.onCapture ? onCaptureWrapper : () => {}, callbacks.onBestFrame ? (blur, glare, orientation) => callbacks.onBestFrame?.(blur, glare, orientation) : () => {}, callbacks.onIdNotDetected ?? (() => {}), callbacks.onSwitchToManualCapture ?? (() => {}), callbacks.onIdTypeChange ? (idType) => callbacks.onIdTypeChange?.(idType) : () => {}, callbacks.onIdSideChange ? (side) => callbacks.onIdSideChange?.(side) : () => {}, callbacks.onCapturingCounterValueChange ? (value) => callbacks.onCapturingCounterValueChange?.(value) : () => {});
|
|
26
|
-
if (callbacks.onBarcodeDecoded) {
|
|
27
|
-
const onBarcodeDecoded = callbacks.onBarcodeDecoded;
|
|
28
|
-
mlWasmJSApi_default.setIdBarcodeDecodedCallback(this.getPipelineType(), (decoded) => {
|
|
29
|
-
this.lastDecodedBarcode = decoded;
|
|
30
|
-
onBarcodeDecoded(decoded);
|
|
31
|
-
});
|
|
32
|
-
} else mlWasmJSApi_default.setIdBarcodeDecodedCallback(this.getPipelineType(), () => {});
|
|
33
|
-
}
|
|
34
|
-
setThresholds(thresholds) {
|
|
35
|
-
this.ensureInitialized();
|
|
36
|
-
mlWasmJSApi_default.setIdCaptureThresholds(this.getPipelineType(), thresholds.blurThreshold, thresholds.blurChangeThreshold, thresholds.glareThreshold, thresholds.clsThreshold, thresholds.sideThreshold, thresholds.iouThreshold, thresholds.idDetectedTimeout, thresholds.autocaptureTimeout, thresholds.framesAggregationInterval);
|
|
37
|
-
}
|
|
38
|
-
setGeometry(geometry) {
|
|
39
|
-
this.ensureInitialized();
|
|
40
|
-
mlWasmJSApi_default.setIdCaptureGeometryParams(this.getPipelineType(), geometry.areaDown, geometry.areaUp, geometry.areaIOSPassportUp, geometry.areaIOSPassportDown, geometry.widthIOSUp, geometry.widthIOSDown, geometry.widthDown, geometry.widthUp, geometry.windowOuterWidth, geometry.windowOuterHeight, geometry.windowInnerWidth, geometry.windowInnerHeight);
|
|
41
|
-
}
|
|
42
|
-
setSettings(settings) {
|
|
43
|
-
this.ensureInitialized();
|
|
44
|
-
mlWasmJSApi_default.setIdCaptureConfigParams(this.getPipelineType(), settings.isFixedMask, settings.isIPhone14OrHigher, settings.idType, settings.blurCheckEnabled, settings.glareCheckEnabled, settings.faceQualityCheckEnabled, settings.iouCheckEnabled, settings.fpsLimitEnabled);
|
|
45
|
-
}
|
|
46
|
-
setModelType(modelType) {
|
|
47
|
-
this.ensureInitialized();
|
|
48
|
-
let wasmModelType;
|
|
49
|
-
switch (modelType) {
|
|
50
|
-
case "v1":
|
|
51
|
-
wasmModelType = 0;
|
|
52
|
-
break;
|
|
53
|
-
case "v2":
|
|
54
|
-
wasmModelType = 1;
|
|
55
|
-
break;
|
|
56
|
-
case "v3":
|
|
57
|
-
wasmModelType = 2;
|
|
58
|
-
break;
|
|
59
|
-
default: throw new Error(`Unknown model type: ${modelType}`);
|
|
60
|
-
}
|
|
61
|
-
mlWasmJSApi_default.setIdCaptureModelType(this.getPipelineType(), wasmModelType);
|
|
62
|
-
}
|
|
63
|
-
setBarcodeCaptureEnabled(enabled) {
|
|
64
|
-
this.ensureInitialized();
|
|
65
|
-
mlWasmJSApi_default.setIdBarcodeCaptureEnabled(this.getPipelineType(), enabled);
|
|
66
|
-
}
|
|
67
|
-
setBarcodeAutoCaptureOnDecode(enabled) {
|
|
68
|
-
this.ensureInitialized();
|
|
69
|
-
mlWasmJSApi_default.setIdBarcodeAutoCaptureOnDecode(this.getPipelineType(), enabled);
|
|
70
|
-
}
|
|
71
|
-
async setBarcodeEnhancementModel() {
|
|
72
|
-
this.ensureInitialized();
|
|
73
|
-
if (this.barcodeEnhancementModelLoaded) return true;
|
|
74
|
-
const modelUrl = getBarcodeEnhanceModelUrl(getResolvedModelsBasePath());
|
|
75
|
-
const applied = await mlWasmJSApi_default.setIdBarcodeEnhancementModel(this.getPipelineType(), modelUrl);
|
|
76
|
-
this.barcodeEnhancementModelLoaded = applied;
|
|
77
|
-
return applied;
|
|
78
|
-
}
|
|
79
|
-
getLastDecodedBarcode() {
|
|
80
|
-
return this.lastDecodedBarcode;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Processes a frame through the WASM pipeline and stores the result.
|
|
84
|
-
*/
|
|
85
|
-
async processFrame(image) {
|
|
86
|
-
const result = await this.processFrameWasm(image);
|
|
87
|
-
const pipelineType = this.getPipelineType();
|
|
88
|
-
if (result && (pipelineType === 0 || pipelineType === 2)) this.lastProcessResult = result;
|
|
89
|
-
else this.lastProcessResult = null;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Gets the last process result from the most recent frame processing.
|
|
93
|
-
* @returns The last process result with quad coordinates, or null if not available
|
|
94
|
-
*/
|
|
95
|
-
getLastProcessResult() {
|
|
96
|
-
return this.lastProcessResult;
|
|
97
|
-
}
|
|
98
|
-
transformPerspective(canvas, frameRect) {
|
|
99
|
-
this.ensureInitialized();
|
|
100
|
-
const originalWidth = canvas.width();
|
|
101
|
-
const originalHeight = canvas.height();
|
|
102
|
-
try {
|
|
103
|
-
const imageData = canvas.getImageData();
|
|
104
|
-
if (!imageData) return canvas;
|
|
105
|
-
const transformedCanvas = mlWasmJSApi_default.IdPerspectiveTransform(imageData, frameRect);
|
|
106
|
-
if (transformedCanvas) {
|
|
107
|
-
const wrappedCanvas = new IncodeCanvas(transformedCanvas);
|
|
108
|
-
const wrappedWidth = wrappedCanvas.width();
|
|
109
|
-
const wrappedHeight = wrappedCanvas.height();
|
|
110
|
-
if (wrappedWidth === originalWidth && wrappedHeight === originalHeight) {
|
|
111
|
-
const croppedCanvas = this.cropCanvasToRect(wrappedCanvas, {
|
|
112
|
-
x: Math.round(frameRect.x),
|
|
113
|
-
y: Math.round(frameRect.y),
|
|
114
|
-
w: Math.round(frameRect.w),
|
|
115
|
-
h: Math.round(frameRect.h)
|
|
116
|
-
});
|
|
117
|
-
if (croppedCanvas) return croppedCanvas;
|
|
118
|
-
}
|
|
119
|
-
return wrappedCanvas;
|
|
120
|
-
}
|
|
121
|
-
return canvas;
|
|
122
|
-
} catch (_error) {
|
|
123
|
-
return canvas;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
/**
|
|
127
|
-
* Crops a canvas to the specified rectangle region.
|
|
128
|
-
* @param canvas - The canvas to crop
|
|
129
|
-
* @param rect - The rectangle to crop to (x, y, w, h)
|
|
130
|
-
* @returns A new IncodeCanvas with the cropped region, or null if cropping fails
|
|
131
|
-
*/
|
|
132
|
-
cropCanvasToRect(canvas, rect) {
|
|
133
|
-
const canvasWidth = canvas.width();
|
|
134
|
-
const canvasHeight = canvas.height();
|
|
135
|
-
if (!canvasWidth || !canvasHeight) return null;
|
|
136
|
-
const x = Math.max(0, Math.min(rect.x, canvasWidth));
|
|
137
|
-
const y = Math.max(0, Math.min(rect.y, canvasHeight));
|
|
138
|
-
const w = Math.max(1, Math.min(rect.w, canvasWidth - x));
|
|
139
|
-
const h = Math.max(1, Math.min(rect.h, canvasHeight - y));
|
|
140
|
-
const croppedCanvasElement = document.createElement("canvas");
|
|
141
|
-
croppedCanvasElement.width = w;
|
|
142
|
-
croppedCanvasElement.height = h;
|
|
143
|
-
const ctx = croppedCanvasElement.getContext("2d");
|
|
144
|
-
if (!ctx) return null;
|
|
145
|
-
ctx.drawImage(canvas.canvas, x, y, w, h, 0, 0, w, h);
|
|
146
|
-
return new IncodeCanvas(croppedCanvasElement);
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Gets the captured canvas (transformed for preview).
|
|
150
|
-
* @returns The captured canvas, or null if not available
|
|
151
|
-
*/
|
|
152
|
-
getCapturedCanvas() {
|
|
153
|
-
return this.capturedCanvas;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Gets the original captured canvas (full frame for upload).
|
|
157
|
-
* @returns The original captured canvas, or null if not available
|
|
158
|
-
*/
|
|
159
|
-
getOriginalCapturedCanvas() {
|
|
160
|
-
return this.originalCapturedCanvas;
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Sets the captured canvases (original and transformed).
|
|
164
|
-
* @param original - The original full-frame canvas (for upload)
|
|
165
|
-
* @param transformed - The transformed canvas (for preview)
|
|
166
|
-
*/
|
|
167
|
-
setCapturedCanvases(original, transformed) {
|
|
168
|
-
this.originalCapturedCanvas = original;
|
|
169
|
-
this.capturedCanvas = transformed;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Re-arms WASM detection without discarding the captured result.
|
|
173
|
-
*
|
|
174
|
-
* Detection-session teardown runs immediately after a successful capture.
|
|
175
|
-
* The captured canvases must remain available for the subsequent upload and
|
|
176
|
-
* are only replaced by `setCapturedCanvases()` or cleared by a full reset.
|
|
177
|
-
*/
|
|
178
|
-
resetDetectionState() {
|
|
179
|
-
super.reset();
|
|
180
|
-
this.lastProcessResult = null;
|
|
181
|
-
this.lastDecodedBarcode = null;
|
|
182
|
-
}
|
|
183
|
-
reset() {
|
|
184
|
-
this.resetDetectionState();
|
|
185
|
-
this.capturedCanvas = null;
|
|
186
|
-
this.originalCapturedCanvas = null;
|
|
187
|
-
}
|
|
188
|
-
async dispose() {
|
|
189
|
-
await super.dispose();
|
|
190
|
-
this.barcodeEnhancementModelLoaded = false;
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region ../infra/src/wasm/idCaptureDefaults.ts
|
|
195
|
-
/**
|
|
196
|
-
* Default WASM thresholds for ID capture quality checks.
|
|
197
|
-
* Based on legacy pipelinesConfig.ts values.
|
|
198
|
-
*/
|
|
199
|
-
const DEFAULT_ID_CAPTURE_THRESHOLDS = {
|
|
200
|
-
blurThreshold: .2,
|
|
201
|
-
blurChangeThreshold: .2,
|
|
202
|
-
glareThreshold: .3,
|
|
203
|
-
clsThreshold: .98,
|
|
204
|
-
sideThreshold: .8,
|
|
205
|
-
iouThreshold: .8,
|
|
206
|
-
idDetectedTimeout: 1e4,
|
|
207
|
-
autocaptureTimeout: 5e3,
|
|
208
|
-
framesAggregationInterval: 3e3
|
|
209
|
-
};
|
|
210
|
-
/**
|
|
211
|
-
* Default geometry parameters for ID detection.
|
|
212
|
-
* Window dimensions must be provided at runtime.
|
|
213
|
-
*/
|
|
214
|
-
const DEFAULT_ID_CAPTURE_GEOMETRY = {
|
|
215
|
-
areaDown: 25e3,
|
|
216
|
-
areaUp: 55e3,
|
|
217
|
-
areaIOSPassportUp: 3e4,
|
|
218
|
-
areaIOSPassportDown: 2e4,
|
|
219
|
-
widthIOSUp: 160,
|
|
220
|
-
widthIOSDown: 85,
|
|
221
|
-
widthDown: 110,
|
|
222
|
-
widthUp: 205
|
|
223
|
-
};
|
|
224
|
-
//#endregion
|
|
225
|
-
export { DEFAULT_ID_CAPTURE_THRESHOLDS as n, IdCaptureProvider as r, DEFAULT_ID_CAPTURE_GEOMETRY as t };
|