@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,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { a as isIOS, c as isIPhone14OrHigher, d as isSafari, i as isDesktop, t as isAndroid } from "./platform-DkcRc9JV.esm.js";
|
|
2
|
+
import { i as requestCameraAccess, n as enumerateVideoDevices, o as stopCameraStream, t as applyTrackConstraints } from "./camera-sIa9ceW2.esm.js";
|
|
3
3
|
import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
|
|
4
|
-
import { t as getBrowser } from "./getBrowser-
|
|
4
|
+
import { t as getBrowser } from "./getBrowser-Cbe1C4Tn.esm.js";
|
|
5
5
|
//#region src/internal/camera/backCameraStream.ts
|
|
6
6
|
const BACK_CAMERA_KEYWORDS = [
|
|
7
7
|
"rear",
|
|
@@ -46,6 +46,10 @@ function isBackCameraLabel(label) {
|
|
|
46
46
|
const lowercaseLabel = label.toLowerCase();
|
|
47
47
|
return BACK_CAMERA_KEYWORDS.some((keyword) => lowercaseLabel.includes(keyword));
|
|
48
48
|
}
|
|
49
|
+
function isBackFacingTrack(track) {
|
|
50
|
+
const settings = track.getSettings();
|
|
51
|
+
return isBackCameraLabel(track.label) || settings.facingMode === "environment";
|
|
52
|
+
}
|
|
49
53
|
function classifyCamera(device, index, totalDevices) {
|
|
50
54
|
let cameraType;
|
|
51
55
|
if (device.label === "") cameraType = totalDevices === 1 || index + 1 <= totalDevices / 2 ? "front" : "back";
|
|
@@ -97,7 +101,7 @@ function selectMainCameraFromStream(track, cameras) {
|
|
|
97
101
|
const settings = track.getSettings();
|
|
98
102
|
const activeCamera = cameras.find((c) => c.deviceId === settings.deviceId || c.label !== "" && c.label === track.label);
|
|
99
103
|
if (!activeCamera) return void 0;
|
|
100
|
-
if ((
|
|
104
|
+
if (isBackFacingTrack(track) && cameras.length > 1) {
|
|
101
105
|
cameras.forEach((camera) => {
|
|
102
106
|
if (camera.deviceId === activeCamera.deviceId) camera.cameraType = "back";
|
|
103
107
|
else if (!isBackCameraLabel(camera.label)) camera.cameraType = "front";
|
|
@@ -209,8 +213,11 @@ async function getAndroidBackCameraStream(fallbackLevel = 0) {
|
|
|
209
213
|
const mainCamera = selectMainCameraFromStream(track, await getCameras());
|
|
210
214
|
stopCameraStream(initialStream);
|
|
211
215
|
if (!mainCamera) throw new Error("Could not identify main camera");
|
|
216
|
+
const acquisitionConstraints = getAndroidFinalConstraints(mainCamera, fallbackLevel);
|
|
217
|
+
const finalStream = await requestCameraAccess({ video: acquisitionConstraints });
|
|
212
218
|
return {
|
|
213
|
-
stream:
|
|
219
|
+
stream: finalStream,
|
|
220
|
+
constraints: await applyAutofocusHint(finalStream, acquisitionConstraints),
|
|
214
221
|
fallbackLevel
|
|
215
222
|
};
|
|
216
223
|
} catch (error) {
|
|
@@ -228,16 +235,52 @@ async function getAndroidBackCameraStream(fallbackLevel = 0) {
|
|
|
228
235
|
}
|
|
229
236
|
}
|
|
230
237
|
async function getFirefoxAndroidBackCameraStream() {
|
|
238
|
+
const requestConstraints = getDesktopConstraints({ facingMode: "environment" });
|
|
239
|
+
const acquisitionConstraints = getVideoTrackConstraints(requestConstraints);
|
|
240
|
+
const stream = await requestCameraAccess(requestConstraints);
|
|
231
241
|
return {
|
|
232
|
-
stream
|
|
242
|
+
stream,
|
|
243
|
+
constraints: await applyAutofocusHint(stream, acquisitionConstraints),
|
|
233
244
|
fallbackLevel: 0
|
|
234
245
|
};
|
|
235
246
|
}
|
|
236
|
-
|
|
247
|
+
/**
|
|
248
|
+
* Preserve SDK 1's iOS focus-distance hint and request the browser's continuous
|
|
249
|
+
* autofocus mode on any selected back-camera track that advertises it.
|
|
250
|
+
*
|
|
251
|
+
* This is deliberately capability-gated and best-effort. A fixed focus
|
|
252
|
+
* distance on Android can blur a close document, while an unsupported advanced
|
|
253
|
+
* constraint must never make camera acquisition fail.
|
|
254
|
+
*/
|
|
255
|
+
async function applyAutofocusHint(stream, acquisitionConstraints, includeIOSFocusDistance = false) {
|
|
237
256
|
const videoTrack = stream.getVideoTracks()[0];
|
|
257
|
+
if (!videoTrack) return acquisitionConstraints;
|
|
258
|
+
let focusMode;
|
|
238
259
|
try {
|
|
239
|
-
|
|
260
|
+
const advertisedModes = (videoTrack.getCapabilities?.())?.focusMode;
|
|
261
|
+
const supportedModes = Array.isArray(advertisedModes) ? advertisedModes : advertisedModes ? [advertisedModes] : [];
|
|
262
|
+
focusMode = supportedModes.includes("continuous") ? "continuous" : supportedModes.includes("auto") ? "auto" : void 0;
|
|
240
263
|
} catch {}
|
|
264
|
+
if (!focusMode && !includeIOSFocusDistance) return acquisitionConstraints;
|
|
265
|
+
const focusConstraints = {
|
|
266
|
+
...focusMode ? { focusMode } : {},
|
|
267
|
+
...includeIOSFocusDistance ? { focusDistance: 1 } : {}
|
|
268
|
+
};
|
|
269
|
+
const constraints = {
|
|
270
|
+
...acquisitionConstraints,
|
|
271
|
+
advanced: [...acquisitionConstraints.advanced ?? [], focusConstraints]
|
|
272
|
+
};
|
|
273
|
+
try {
|
|
274
|
+
await applyTrackConstraints(videoTrack, constraints);
|
|
275
|
+
return constraints;
|
|
276
|
+
} catch {
|
|
277
|
+
try {
|
|
278
|
+
await applyTrackConstraints(videoTrack, { advanced: [focusConstraints] });
|
|
279
|
+
return constraints;
|
|
280
|
+
} catch {
|
|
281
|
+
return acquisitionConstraints;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
241
284
|
}
|
|
242
285
|
function getIOSConstraints() {
|
|
243
286
|
return {
|
|
@@ -250,9 +293,13 @@ function getIOSConstraints() {
|
|
|
250
293
|
};
|
|
251
294
|
}
|
|
252
295
|
async function getIOSCameraStream() {
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
|
|
296
|
+
const requestConstraints = getIOSConstraints();
|
|
297
|
+
const acquisitionConstraints = getVideoTrackConstraints(requestConstraints);
|
|
298
|
+
const stream = await requestCameraAccess(requestConstraints);
|
|
299
|
+
return {
|
|
300
|
+
stream,
|
|
301
|
+
constraints: await applyAutofocusHint(stream, acquisitionConstraints, true)
|
|
302
|
+
};
|
|
256
303
|
}
|
|
257
304
|
function getDesktopVideoConstraints(level) {
|
|
258
305
|
switch (level) {
|
|
@@ -331,17 +378,26 @@ function getDesktopConstraints(options, level = 0) {
|
|
|
331
378
|
}
|
|
332
379
|
};
|
|
333
380
|
}
|
|
334
|
-
|
|
381
|
+
function getVideoTrackConstraints(constraints) {
|
|
382
|
+
return constraints.video && typeof constraints.video !== "boolean" ? constraints.video : {};
|
|
383
|
+
}
|
|
384
|
+
async function getDesktopCameraStreamResult(options, fallbackLevel = 0) {
|
|
335
385
|
if (fallbackLevel > 5) throw new Error("Failed to get desktop camera after all fallback attempts");
|
|
336
386
|
const constraints = getDesktopConstraints(options, fallbackLevel);
|
|
337
387
|
try {
|
|
338
|
-
return
|
|
388
|
+
return {
|
|
389
|
+
stream: await requestCameraAccess(constraints),
|
|
390
|
+
constraints: getVideoTrackConstraints(constraints)
|
|
391
|
+
};
|
|
339
392
|
} catch (error) {
|
|
340
393
|
const nextLevel = fallbackLevel + 1;
|
|
341
394
|
if (nextLevel > 5) throw error;
|
|
342
|
-
return
|
|
395
|
+
return getDesktopCameraStreamResult(options, nextLevel);
|
|
343
396
|
}
|
|
344
397
|
}
|
|
398
|
+
async function getDesktopCameraStream(options, fallbackLevel = 0) {
|
|
399
|
+
return (await getDesktopCameraStreamResult(options, fallbackLevel)).stream;
|
|
400
|
+
}
|
|
345
401
|
/**
|
|
346
402
|
* Pick the best back-facing device from a list already filtered by label.
|
|
347
403
|
* Prefers the highest megapixel count when labels advertise it, else the first.
|
|
@@ -377,17 +433,17 @@ function selectBestBackDevice(devices) {
|
|
|
377
433
|
* An explicit deviceId from the caller is always trusted as-is.
|
|
378
434
|
*/
|
|
379
435
|
async function getDesktopBackCameraStream(deviceId) {
|
|
380
|
-
if (deviceId) return
|
|
381
|
-
const original = await
|
|
382
|
-
const track = original.getVideoTracks()[0];
|
|
436
|
+
if (deviceId) return getDesktopCameraStreamResult({ deviceId });
|
|
437
|
+
const original = await getDesktopCameraStreamResult({ facingMode: "environment" });
|
|
438
|
+
const track = original.stream.getVideoTracks()[0];
|
|
383
439
|
if (track && isBackCameraLabel(track.label)) return original;
|
|
384
440
|
const backDevices = (await enumerateVideoDevices()).filter((d) => isBackCameraLabel(d.label));
|
|
385
441
|
if (backDevices.length === 0) return original;
|
|
386
442
|
const target = selectBestBackDevice(backDevices);
|
|
387
443
|
if (track && track.getSettings().deviceId === target.deviceId) return original;
|
|
388
444
|
try {
|
|
389
|
-
const corrected = await
|
|
390
|
-
stopCameraStream(original);
|
|
445
|
+
const corrected = await getDesktopCameraStreamResult({ deviceId: target.deviceId });
|
|
446
|
+
stopCameraStream(original.stream);
|
|
391
447
|
return corrected;
|
|
392
448
|
} catch {
|
|
393
449
|
return original;
|
|
@@ -431,12 +487,17 @@ async function ensureFrontCameraStream(open) {
|
|
|
431
487
|
}
|
|
432
488
|
}
|
|
433
489
|
async function getBackCameraStream(deviceId) {
|
|
434
|
-
if (isIOS()) return
|
|
490
|
+
if (isIOS()) return getIOSCameraStream();
|
|
435
491
|
if (isAndroid()) {
|
|
436
492
|
if (getBrowser() === "firefox") return getFirefoxAndroidBackCameraStream();
|
|
437
493
|
return getAndroidBackCameraStream(0);
|
|
438
494
|
}
|
|
439
|
-
|
|
495
|
+
const acquired = await getDesktopBackCameraStream(deviceId);
|
|
496
|
+
const constraints = await applyAutofocusHint(acquired.stream, acquired.constraints);
|
|
497
|
+
return {
|
|
498
|
+
stream: acquired.stream,
|
|
499
|
+
constraints
|
|
500
|
+
};
|
|
440
501
|
}
|
|
441
502
|
//#endregion
|
|
442
|
-
export { hasBackCamera as i, getBackCameraStream as n, getDesktopCameraStream as r, ensureFrontCameraStream as t };
|
|
503
|
+
export { isBackFacingTrack as a, hasBackCamera as i, getBackCameraStream as n, getDesktopCameraStream as r, ensureFrontCameraStream as t };
|
|
@@ -126,6 +126,24 @@ async function requestCameraWithFallback(baseConstraints, fallbacks = DEFAULT_RE
|
|
|
126
126
|
}
|
|
127
127
|
throw new Error("All camera resolution fallbacks failed");
|
|
128
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* Preserve the constraints used for an acquired camera while pinning future
|
|
131
|
+
* acquisitions to the device the browser actually selected.
|
|
132
|
+
*
|
|
133
|
+
* Protected WASM PRC/POC may reacquire the stream. Advisory constraints such
|
|
134
|
+
* as `facingMode` are not enough on devices with multiple matching cameras,
|
|
135
|
+
* so the selected device must be replayed as an exact constraint.
|
|
136
|
+
*/
|
|
137
|
+
function getCameraReacquisitionConstraints(track, acquisitionConstraints) {
|
|
138
|
+
if (!track) return acquisitionConstraints;
|
|
139
|
+
const constraints = acquisitionConstraints ?? track.getConstraints();
|
|
140
|
+
const selectedDeviceId = track.getSettings().deviceId;
|
|
141
|
+
if (!selectedDeviceId) return constraints;
|
|
142
|
+
return {
|
|
143
|
+
...constraints,
|
|
144
|
+
deviceId: { exact: selectedDeviceId }
|
|
145
|
+
};
|
|
146
|
+
}
|
|
129
147
|
function stopCameraStream(stream) {
|
|
130
148
|
for (const track of stream.getTracks()) track.stop();
|
|
131
149
|
}
|
|
@@ -137,4 +155,4 @@ async function applyTrackConstraints(track, constraints) {
|
|
|
137
155
|
await track.applyConstraints(constraints);
|
|
138
156
|
}
|
|
139
157
|
//#endregion
|
|
140
|
-
export {
|
|
158
|
+
export { requestCameraWithFallback as a, isCameraGrantedInDocument as c, requestCameraAccess as i, enumerateVideoDevices as n, stopCameraStream as o, getCameraReacquisitionConstraints as r, clearCameraGrantedInDocument as s, applyTrackConstraints as t };
|
package/dist/camera.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as requestPermission, t as checkPermission } from "./permissionServices-
|
|
1
|
+
import { i as requestPermission, t as checkPermission } from "./permissionServices-Bj_fyWtv.esm.js";
|
|
2
2
|
export { checkPermission as checkCameraPermission, requestPermission as requestCameraPermission };
|
|
@@ -170,6 +170,25 @@ var IncodeCanvas = class IncodeCanvas {
|
|
|
170
170
|
if (base64) this.blobData = IncodeCanvas.base64ToBlob(base64);
|
|
171
171
|
}
|
|
172
172
|
/**
|
|
173
|
+
* Creates a JPEG Blob without synchronously encoding the canvas as base64.
|
|
174
|
+
* Returns `null` when the canvas is invalid, encoding is unavailable, or the
|
|
175
|
+
* browser cannot produce a Blob.
|
|
176
|
+
*/
|
|
177
|
+
async updateBlobAsync(jpegQuality = 1) {
|
|
178
|
+
if (!this.checkCanvas() || typeof this.canvas.toBlob !== "function") return null;
|
|
179
|
+
const blob = await new Promise((resolve) => {
|
|
180
|
+
this.canvas.toBlob(resolve, "image/jpeg", jpegQuality);
|
|
181
|
+
});
|
|
182
|
+
if (!blob) return null;
|
|
183
|
+
if (this.blobData?.url) URL.revokeObjectURL(this.blobData.url);
|
|
184
|
+
const blobData = {
|
|
185
|
+
blob,
|
|
186
|
+
url: URL.createObjectURL(blob)
|
|
187
|
+
};
|
|
188
|
+
this.blobData = blobData;
|
|
189
|
+
return blobData;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
173
192
|
* Converts a base64 string to a Blob and creates a URL for it.
|
|
174
193
|
*/
|
|
175
194
|
static base64ToBlob(base64) {
|
|
@@ -1,307 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./StateMachine-EDpYWy0i.js";
|
|
3
|
-
import { t as Manager } from "./Manager-CQQ99QOI.js";
|
|
4
|
-
import "./Actor-iTq7YY48.js";
|
|
5
|
-
//#region src/modules/certificate-issuance/certificateIssuanceConstants.d.ts
|
|
6
|
-
declare const MIN_PASSWORD_LENGTH = 8;
|
|
7
|
-
declare const PASSWORD_VALIDATION_KEYS: readonly ["length", "uppercase", "lowercase", "number"];
|
|
8
|
-
declare const REQUIREMENT_I18N_KEYS: Record<PasswordValidationKey, string>;
|
|
9
|
-
//#endregion
|
|
10
|
-
//#region src/modules/certificate-issuance/types.d.ts
|
|
11
|
-
type CertificateIssuanceType = 'ONE_TIME' | 'SHORT_TERM' | 'LONG_TERM';
|
|
12
|
-
/**
|
|
13
|
-
* Configuration for the certificate issuance module.
|
|
14
|
-
*/
|
|
15
|
-
type CertificateIssuanceConfig = {
|
|
16
|
-
/** Issuance region (from flow `moduleConfiguration`) */
|
|
17
|
-
region: string;
|
|
18
|
-
/** Certificate validity period */
|
|
19
|
-
type: CertificateIssuanceType;
|
|
20
|
-
};
|
|
21
|
-
type IssueCertificateResponse = {
|
|
22
|
-
blob: Blob;
|
|
23
|
-
};
|
|
24
|
-
type PasswordValidations = {
|
|
25
|
-
length: boolean;
|
|
26
|
-
uppercase: boolean;
|
|
27
|
-
lowercase: boolean;
|
|
28
|
-
number: boolean;
|
|
29
|
-
};
|
|
30
|
-
type PasswordValidationKey = (typeof PASSWORD_VALIDATION_KEYS)[number];
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/modules/certificate-issuance/certificateIssuanceStateMachine.d.ts
|
|
33
|
-
type CertificateIssuanceContext = {
|
|
34
|
-
config: CertificateIssuanceConfig;
|
|
35
|
-
password: string;
|
|
36
|
-
passwordValidations: PasswordValidations;
|
|
37
|
-
certificateBlob: Blob | undefined;
|
|
38
|
-
};
|
|
39
|
-
type CertificateIssuanceInput = {
|
|
40
|
-
config: CertificateIssuanceConfig;
|
|
41
|
-
};
|
|
42
|
-
declare const certificateIssuanceMachine: StateMachine<CertificateIssuanceContext, {
|
|
43
|
-
type: "LOAD";
|
|
44
|
-
} | {
|
|
45
|
-
type: "PASSWORD_CHANGED";
|
|
46
|
-
password: string;
|
|
47
|
-
} | {
|
|
48
|
-
type: "SUBMIT_PASSWORD";
|
|
49
|
-
} | {
|
|
50
|
-
type: "DOWNLOADED";
|
|
51
|
-
} | {
|
|
52
|
-
type: "DOWNLOAD_FAILED";
|
|
53
|
-
} | {
|
|
54
|
-
type: "FINISH";
|
|
55
|
-
}, {
|
|
56
|
-
[x: string]: ActorRefFromLogic<PromiseActorLogic<IssueCertificateResponse, {
|
|
57
|
-
password: string;
|
|
58
|
-
}, EventObject>> | undefined;
|
|
59
|
-
}, {
|
|
60
|
-
src: "issueCertificate";
|
|
61
|
-
logic: PromiseActorLogic<IssueCertificateResponse, {
|
|
62
|
-
password: string;
|
|
63
|
-
}, EventObject>;
|
|
64
|
-
id: string | undefined;
|
|
65
|
-
}, Values<{
|
|
66
|
-
setPassword: {
|
|
67
|
-
type: "setPassword";
|
|
68
|
-
params: NonReducibleUnknown;
|
|
69
|
-
};
|
|
70
|
-
setBlob: {
|
|
71
|
-
type: "setBlob";
|
|
72
|
-
params: NonReducibleUnknown;
|
|
73
|
-
};
|
|
74
|
-
}>, {
|
|
75
|
-
type: "isPasswordValid";
|
|
76
|
-
params: unknown;
|
|
77
|
-
}, never, "error" | "idle" | "processing" | "success" | "finished" | "password" | "downloaded", string, CertificateIssuanceInput, NonReducibleUnknown, EventObject, MetaObject, {
|
|
78
|
-
readonly id: "certificateIssuance";
|
|
79
|
-
readonly initial: "idle";
|
|
80
|
-
readonly context: ({ input }: {
|
|
81
|
-
spawn: {
|
|
82
|
-
<TSrc extends "issueCertificate">(logic: TSrc, ...[options]: {
|
|
83
|
-
src: "issueCertificate";
|
|
84
|
-
logic: PromiseActorLogic<IssueCertificateResponse, {
|
|
85
|
-
password: string;
|
|
86
|
-
}, EventObject>;
|
|
87
|
-
id: string | undefined;
|
|
88
|
-
} extends (infer T) ? T extends {
|
|
89
|
-
src: "issueCertificate";
|
|
90
|
-
logic: PromiseActorLogic<IssueCertificateResponse, {
|
|
91
|
-
password: string;
|
|
92
|
-
}, EventObject>;
|
|
93
|
-
id: string | undefined;
|
|
94
|
-
} ? T extends {
|
|
95
|
-
src: TSrc;
|
|
96
|
-
} ? ConditionalRequired<[options?: ({
|
|
97
|
-
id?: T["id"] | undefined;
|
|
98
|
-
systemId?: string;
|
|
99
|
-
input?: InputFrom<T["logic"]> | undefined;
|
|
100
|
-
syncSnapshot?: boolean;
|
|
101
|
-
} & { [K in RequiredActorOptions<T>]: unknown; }) | undefined], IsNotNever<RequiredActorOptions<T>>> : never : never : never): ActorRefFromLogic<GetConcreteByKey<{
|
|
102
|
-
src: "issueCertificate";
|
|
103
|
-
logic: PromiseActorLogic<IssueCertificateResponse, {
|
|
104
|
-
password: string;
|
|
105
|
-
}, EventObject>;
|
|
106
|
-
id: string | undefined;
|
|
107
|
-
}, "src", TSrc>["logic"]>;
|
|
108
|
-
<TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: ({
|
|
109
|
-
id?: never;
|
|
110
|
-
systemId?: string;
|
|
111
|
-
input?: InputFrom<TLogic> | undefined;
|
|
112
|
-
syncSnapshot?: boolean;
|
|
113
|
-
} & { [K in RequiredLogicInput<TLogic>]: unknown; }) | undefined], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
|
|
114
|
-
};
|
|
115
|
-
input: CertificateIssuanceInput;
|
|
116
|
-
self: ActorRef<MachineSnapshot<CertificateIssuanceContext, {
|
|
117
|
-
type: "LOAD";
|
|
118
|
-
} | {
|
|
119
|
-
type: "PASSWORD_CHANGED";
|
|
120
|
-
password: string;
|
|
121
|
-
} | {
|
|
122
|
-
type: "SUBMIT_PASSWORD";
|
|
123
|
-
} | {
|
|
124
|
-
type: "DOWNLOADED";
|
|
125
|
-
} | {
|
|
126
|
-
type: "DOWNLOAD_FAILED";
|
|
127
|
-
} | {
|
|
128
|
-
type: "FINISH";
|
|
129
|
-
}, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, {
|
|
130
|
-
type: "LOAD";
|
|
131
|
-
} | {
|
|
132
|
-
type: "PASSWORD_CHANGED";
|
|
133
|
-
password: string;
|
|
134
|
-
} | {
|
|
135
|
-
type: "SUBMIT_PASSWORD";
|
|
136
|
-
} | {
|
|
137
|
-
type: "DOWNLOADED";
|
|
138
|
-
} | {
|
|
139
|
-
type: "DOWNLOAD_FAILED";
|
|
140
|
-
} | {
|
|
141
|
-
type: "FINISH";
|
|
142
|
-
}, AnyEventObject>;
|
|
143
|
-
}) => {
|
|
144
|
-
config: CertificateIssuanceConfig;
|
|
145
|
-
password: string;
|
|
146
|
-
passwordValidations: PasswordValidations;
|
|
147
|
-
certificateBlob: undefined;
|
|
148
|
-
};
|
|
149
|
-
readonly states: {
|
|
150
|
-
readonly idle: {
|
|
151
|
-
readonly on: {
|
|
152
|
-
readonly LOAD: {
|
|
153
|
-
readonly target: "password";
|
|
154
|
-
};
|
|
155
|
-
};
|
|
156
|
-
};
|
|
157
|
-
readonly password: {
|
|
158
|
-
readonly on: {
|
|
159
|
-
readonly PASSWORD_CHANGED: {
|
|
160
|
-
readonly actions: "setPassword";
|
|
161
|
-
};
|
|
162
|
-
readonly SUBMIT_PASSWORD: {
|
|
163
|
-
readonly target: "processing";
|
|
164
|
-
readonly guard: "isPasswordValid";
|
|
165
|
-
};
|
|
166
|
-
};
|
|
167
|
-
};
|
|
168
|
-
readonly processing: {
|
|
169
|
-
readonly invoke: {
|
|
170
|
-
readonly id: "issueCertificate";
|
|
171
|
-
readonly src: "issueCertificate";
|
|
172
|
-
readonly input: ({ context }: {
|
|
173
|
-
context: CertificateIssuanceContext;
|
|
174
|
-
event: {
|
|
175
|
-
type: "LOAD";
|
|
176
|
-
} | {
|
|
177
|
-
type: "PASSWORD_CHANGED";
|
|
178
|
-
password: string;
|
|
179
|
-
} | {
|
|
180
|
-
type: "SUBMIT_PASSWORD";
|
|
181
|
-
} | {
|
|
182
|
-
type: "DOWNLOADED";
|
|
183
|
-
} | {
|
|
184
|
-
type: "DOWNLOAD_FAILED";
|
|
185
|
-
} | {
|
|
186
|
-
type: "FINISH";
|
|
187
|
-
};
|
|
188
|
-
self: ActorRef<MachineSnapshot<CertificateIssuanceContext, {
|
|
189
|
-
type: "LOAD";
|
|
190
|
-
} | {
|
|
191
|
-
type: "PASSWORD_CHANGED";
|
|
192
|
-
password: string;
|
|
193
|
-
} | {
|
|
194
|
-
type: "SUBMIT_PASSWORD";
|
|
195
|
-
} | {
|
|
196
|
-
type: "DOWNLOADED";
|
|
197
|
-
} | {
|
|
198
|
-
type: "DOWNLOAD_FAILED";
|
|
199
|
-
} | {
|
|
200
|
-
type: "FINISH";
|
|
201
|
-
}, Record<string, AnyActorRef>, StateValue, string, unknown, any, any>, {
|
|
202
|
-
type: "LOAD";
|
|
203
|
-
} | {
|
|
204
|
-
type: "PASSWORD_CHANGED";
|
|
205
|
-
password: string;
|
|
206
|
-
} | {
|
|
207
|
-
type: "SUBMIT_PASSWORD";
|
|
208
|
-
} | {
|
|
209
|
-
type: "DOWNLOADED";
|
|
210
|
-
} | {
|
|
211
|
-
type: "DOWNLOAD_FAILED";
|
|
212
|
-
} | {
|
|
213
|
-
type: "FINISH";
|
|
214
|
-
}, AnyEventObject>;
|
|
215
|
-
}) => {
|
|
216
|
-
password: string;
|
|
217
|
-
};
|
|
218
|
-
readonly onDone: {
|
|
219
|
-
readonly target: "success";
|
|
220
|
-
readonly actions: "setBlob";
|
|
221
|
-
};
|
|
222
|
-
readonly onError: {
|
|
223
|
-
readonly target: "error";
|
|
224
|
-
};
|
|
225
|
-
};
|
|
226
|
-
};
|
|
227
|
-
readonly success: {
|
|
228
|
-
readonly on: {
|
|
229
|
-
readonly DOWNLOADED: {
|
|
230
|
-
readonly target: "downloaded";
|
|
231
|
-
};
|
|
232
|
-
readonly DOWNLOAD_FAILED: {
|
|
233
|
-
readonly target: "error";
|
|
234
|
-
};
|
|
235
|
-
readonly FINISH: {
|
|
236
|
-
readonly target: "finished";
|
|
237
|
-
};
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
|
-
readonly downloaded: {
|
|
241
|
-
readonly on: {
|
|
242
|
-
readonly FINISH: {
|
|
243
|
-
readonly target: "finished";
|
|
244
|
-
};
|
|
245
|
-
};
|
|
246
|
-
};
|
|
247
|
-
readonly error: {
|
|
248
|
-
readonly after: {
|
|
249
|
-
readonly 3000: {
|
|
250
|
-
readonly target: "finished";
|
|
251
|
-
};
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
|
-
readonly finished: {
|
|
255
|
-
readonly type: "final";
|
|
256
|
-
};
|
|
257
|
-
};
|
|
258
|
-
}>;
|
|
259
|
-
//#endregion
|
|
260
|
-
//#region src/modules/certificate-issuance/certificateIssuanceActor.d.ts
|
|
261
|
-
type CreateCertificateIssuanceActorOptions = {
|
|
262
|
-
config: CertificateIssuanceConfig;
|
|
263
|
-
};
|
|
264
|
-
//#endregion
|
|
265
|
-
//#region src/modules/certificate-issuance/certificateIssuanceManager.d.ts
|
|
266
|
-
type CertificateIssuanceIdleState = {
|
|
267
|
-
status: 'idle';
|
|
268
|
-
};
|
|
269
|
-
type CertificateIssuancePasswordState = {
|
|
270
|
-
status: 'password';
|
|
271
|
-
password: string;
|
|
272
|
-
passwordValidations: PasswordValidations;
|
|
273
|
-
canSubmit: boolean;
|
|
274
|
-
};
|
|
275
|
-
type CertificateIssuanceProcessingState = {
|
|
276
|
-
status: 'processing';
|
|
277
|
-
};
|
|
278
|
-
type CertificateIssuanceErrorState = {
|
|
279
|
-
status: 'error';
|
|
280
|
-
};
|
|
281
|
-
type CertificateIssuanceSuccessState = {
|
|
282
|
-
status: 'success';
|
|
283
|
-
blob: Blob;
|
|
284
|
-
};
|
|
285
|
-
type CertificateIssuanceDownloadedState = {
|
|
286
|
-
status: 'downloaded';
|
|
287
|
-
};
|
|
288
|
-
type CertificateIssuanceFinishedState = {
|
|
289
|
-
status: 'finished';
|
|
290
|
-
};
|
|
291
|
-
type CertificateIssuanceState = CertificateIssuanceIdleState | CertificateIssuancePasswordState | CertificateIssuanceProcessingState | CertificateIssuanceSuccessState | CertificateIssuanceDownloadedState | CertificateIssuanceErrorState | CertificateIssuanceFinishedState;
|
|
292
|
-
declare function createCertificateIssuanceManager(options: CreateCertificateIssuanceActorOptions): Manager<CertificateIssuanceState> & {
|
|
293
|
-
load(): void;
|
|
294
|
-
setPassword(password: string): void;
|
|
295
|
-
submitPassword(): void;
|
|
296
|
-
markDownloaded(): void;
|
|
297
|
-
reportDownloadError(): void;
|
|
298
|
-
finish(): void;
|
|
299
|
-
};
|
|
300
|
-
type CertificateIssuanceManager = ReturnType<typeof createCertificateIssuanceManager>;
|
|
301
|
-
//#endregion
|
|
1
|
+
import { a as CertificateIssuanceActor, c as CertificateIssuanceType, d as PasswordValidations, f as MIN_PASSWORD_LENGTH, i as createCertificateIssuanceManagerFromActor, l as IssueCertificateResponse, m as REQUIREMENT_I18N_KEYS, n as CertificateIssuanceState, o as certificateIssuanceMachine, p as PASSWORD_VALIDATION_KEYS, r as createCertificateIssuanceManager, s as CertificateIssuanceConfig, t as CertificateIssuanceManager, u as PasswordValidationKey } from "./certificateIssuanceManager-DCgEidHz.js";
|
|
302
2
|
//#region src/modules/certificate-issuance/certificateIssuanceUtils.d.ts
|
|
303
3
|
declare function emptyPasswordValidations(): PasswordValidations;
|
|
304
4
|
declare function validatePassword(value: string): PasswordValidations;
|
|
305
5
|
declare function isPasswordValid(validations: PasswordValidations): boolean;
|
|
306
6
|
//#endregion
|
|
307
|
-
export { type CertificateIssuanceConfig, type CertificateIssuanceManager, type CertificateIssuanceState, type CertificateIssuanceType, type IssueCertificateResponse, MIN_PASSWORD_LENGTH, PASSWORD_VALIDATION_KEYS, type PasswordValidationKey, type PasswordValidations, REQUIREMENT_I18N_KEYS, certificateIssuanceMachine, createCertificateIssuanceManager, emptyPasswordValidations, isPasswordValid, validatePassword };
|
|
7
|
+
export { type CertificateIssuanceActor, type CertificateIssuanceConfig, type CertificateIssuanceManager, type CertificateIssuanceState, type CertificateIssuanceType, type IssueCertificateResponse, MIN_PASSWORD_LENGTH, PASSWORD_VALIDATION_KEYS, type PasswordValidationKey, type PasswordValidations, REQUIREMENT_I18N_KEYS, certificateIssuanceMachine, createCertificateIssuanceManager, createCertificateIssuanceManagerFromActor, emptyPasswordValidations, isPasswordValid, validatePassword };
|
|
@@ -1,66 +1,3 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
//#region src/modules/certificate-issuance/certificateIssuanceActor.ts
|
|
5
|
-
/**
|
|
6
|
-
* Creates and starts a certificate issuance actor.
|
|
7
|
-
*/
|
|
8
|
-
function createCertificateIssuanceActor(options) {
|
|
9
|
-
return createActor(certificateIssuanceMachine, { input: { config: options.config } }).start();
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
//#region src/modules/certificate-issuance/certificateIssuanceManager.ts
|
|
13
|
-
function mapState(snapshot) {
|
|
14
|
-
const typedSnapshot = snapshot;
|
|
15
|
-
const { context } = typedSnapshot;
|
|
16
|
-
if (typedSnapshot.matches("password")) return {
|
|
17
|
-
status: "password",
|
|
18
|
-
password: context.password,
|
|
19
|
-
passwordValidations: context.passwordValidations,
|
|
20
|
-
canSubmit: isPasswordValid(context.passwordValidations)
|
|
21
|
-
};
|
|
22
|
-
if (typedSnapshot.matches("processing")) return { status: "processing" };
|
|
23
|
-
if (typedSnapshot.matches("error")) return { status: "error" };
|
|
24
|
-
if (typedSnapshot.matches("success")) return {
|
|
25
|
-
status: "success",
|
|
26
|
-
blob: context.certificateBlob
|
|
27
|
-
};
|
|
28
|
-
if (typedSnapshot.matches("downloaded")) return { status: "downloaded" };
|
|
29
|
-
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
30
|
-
return { status: "idle" };
|
|
31
|
-
}
|
|
32
|
-
function createApi({ actor }) {
|
|
33
|
-
return {
|
|
34
|
-
load() {
|
|
35
|
-
actor.send({ type: "LOAD" });
|
|
36
|
-
},
|
|
37
|
-
setPassword(password) {
|
|
38
|
-
actor.send({
|
|
39
|
-
type: "PASSWORD_CHANGED",
|
|
40
|
-
password
|
|
41
|
-
});
|
|
42
|
-
},
|
|
43
|
-
submitPassword() {
|
|
44
|
-
actor.send({ type: "SUBMIT_PASSWORD" });
|
|
45
|
-
},
|
|
46
|
-
markDownloaded() {
|
|
47
|
-
actor.send({ type: "DOWNLOADED" });
|
|
48
|
-
},
|
|
49
|
-
reportDownloadError() {
|
|
50
|
-
actor.send({ type: "DOWNLOAD_FAILED" });
|
|
51
|
-
},
|
|
52
|
-
finish() {
|
|
53
|
-
actor.send({ type: "FINISH" });
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function createCertificateIssuanceManager(options) {
|
|
58
|
-
return createManager({
|
|
59
|
-
actor: createCertificateIssuanceActor(options),
|
|
60
|
-
mapState,
|
|
61
|
-
createApi,
|
|
62
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.certificateIssuance)
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
//#endregion
|
|
66
|
-
export { MIN_PASSWORD_LENGTH, PASSWORD_VALIDATION_KEYS, REQUIREMENT_I18N_KEYS, certificateIssuanceMachine, createCertificateIssuanceManager, emptyPasswordValidations, isPasswordValid, validatePassword };
|
|
1
|
+
import { a as MIN_PASSWORD_LENGTH, i as validatePassword, n as emptyPasswordValidations, o as PASSWORD_VALIDATION_KEYS, r as isPasswordValid, s as REQUIREMENT_I18N_KEYS, t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-BBD5h8c4.esm.js";
|
|
2
|
+
import { n as createCertificateIssuanceManagerFromActor, t as createCertificateIssuanceManager } from "./certificateIssuanceManager-Bfvkq7Cy.esm.js";
|
|
3
|
+
export { MIN_PASSWORD_LENGTH, PASSWORD_VALIDATION_KEYS, REQUIREMENT_I18N_KEYS, certificateIssuanceMachine, createCertificateIssuanceManager, createCertificateIssuanceManagerFromActor, emptyPasswordValidations, isPasswordValid, validatePassword };
|