@incodetech/core 2.2.0 → 2.3.0-rc.1
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-CU6kBvqv.esm.js} +1 -1
- package/dist/{BrowserVisibilityObserverProvider-BX1BiLDK.esm.js → BrowserVisibilityObserverProvider-BrJN1B8A.esm.js} +2 -0
- package/dist/FaceDetectionProvider-BfhWkK90.esm.js +431 -0
- package/dist/FaceDetectionProvider-LdZ47bWy.d.ts +36 -0
- package/dist/{IIdCaptureCapability-DHTT3FC2.d.ts → IIdCaptureCapability-RNiFhvXR.d.ts} +7 -33
- package/dist/IWasmUtilCapability-CNWRl7jr.d.ts +117 -0
- package/dist/{MotionSensorProvider-DGiV77J_.esm.js → MotionSensorProvider-BgTYwg9L.esm.js} +1 -1
- package/dist/{StreamCanvasCapture-D2XcXCZ4.esm.js → StreamCanvasCapture-C9jtgBdT.esm.js} +2 -2
- package/dist/{deepsightService-DLVQS_RH.d.ts → StreamCanvasCapture-_8gdW5Lk.d.ts} +54 -41
- package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
- package/dist/{addressSearch-D1XpBdUS.esm.js → addressSearch-DyHGgeX8.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-DNkw66oW.esm.js} +2 -2
- package/dist/{antifraudStateMachine-Bf_JVNwn.esm.js → antifraudStateMachine-DBeq47D2.esm.js} +1 -1
- package/dist/{apiError-BA1d_au0.esm.js → apiError-Budb6m6w.esm.js} +14 -2
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-BBMGTcwW.d.ts → authenticationManager-CjXBjC-c.d.ts} +7 -1
- package/dist/{authenticationManager-zh9TC62P.esm.js → authenticationManager-cMXhG70r.esm.js} +5 -5
- package/dist/{authenticationStateMachine-xzi-vnvE.esm.js → authenticationStateMachine-MOYz4HCf.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-C3-CI0_s.esm.js +69 -0
- package/dist/certificateIssuanceManager-DCgEidHz.d.ts +312 -0
- package/dist/{certificateIssuanceStateMachine-D_R92TYu.esm.js → certificateIssuanceStateMachine-CxqS_nD-.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-B6E1XJDw.esm.js} +2 -2
- package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-BhYFeKiG.d.ts} +4 -4
- package/dist/{consentStateMachine-D9D4ON8Z.esm.js → consentStateMachine-DTSfdGiW.esm.js} +1 -1
- package/dist/createCameraCycleOwnership-CX3hJGKc.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-9XhFVZ5S.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-DbIMYFcJ.esm.js} +2 -2
- package/dist/{curpValidationManager-DVGr7Fq7.d.ts → curpValidationManager-SSKNrm5Z.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-Ds7KMacK.esm.js → curpValidationStateMachine-g5kMfuLj.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-8-W2KY4n.d.ts +141 -0
- package/dist/customFieldsManager-CzWZTkW-.esm.js +264 -0
- package/dist/customWatchlistManager-DWTED5Ur.esm.js +73 -0
- package/dist/customWatchlistManager-PBWHr_oM.d.ts +64 -0
- package/dist/{customWatchlistStateMachine-YWSgKLbF.esm.js → customWatchlistStateMachine-DOQou6TW.esm.js} +1 -1
- package/dist/{deepsightLoader--wMKWECS.esm.js → deepsightLoader-DDv3vhXU.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-CwAiM9WY.esm.js} +2 -2
- package/dist/{documentCaptureManager-B3t0ydtg.d.ts → documentCaptureManager-DensIj5F.d.ts} +83 -83
- package/dist/{documentCaptureStateMachine-BM4Ex_5x.esm.js → documentCaptureStateMachine-DfGOBapD.esm.js} +5 -5
- package/dist/dynamic-forms.d.ts +1 -1
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-fFVIRBNv.esm.js → dynamicFormsManager-BbS-XMFc.esm.js} +16 -5
- package/dist/{dynamicFormsManager-fhK0yINk.d.ts → dynamicFormsManager-D5R_uxLQ.d.ts} +25 -3
- package/dist/{dynamicFormsStateMachine-D6D7oEYk.esm.js → dynamicFormsStateMachine-D8zHBCh4.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-5aiac8wL.esm.js} +2 -2
- package/dist/{ekybStateMachine-3nlnqdlr.esm.js → ekybStateMachine-Bn2IE9rx.esm.js} +3 -3
- package/dist/ekyc.esm.js +2 -2
- package/dist/{ekycManager-DgT48ky6.esm.js → ekycManager-BlQ-Qj4E.esm.js} +2 -2
- package/dist/{ekycStateMachine-CQwqiR-R.esm.js → ekycStateMachine-CshSNJhh.esm.js} +2 -2
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/electronic-signature.esm.js +2 -2
- package/dist/{electronicSignatureManager-DGbAJ00W.esm.js → electronicSignatureManager-BJJH0Tvi.esm.js} +357 -51
- package/dist/electronicSignatureManager-Ds-KEVTq.d.ts +2786 -0
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-BY0jeYwR.esm.js → emailManager-bR1N5rV_.esm.js} +2 -2
- package/dist/{emailStateMachine-Crw8QVmc.esm.js → emailStateMachine-Bc_6oIYw.esm.js} +1 -1
- package/dist/{endpoints-CCzL3XD_.esm.js → endpoints-B-3Q-LUw.esm.js} +24 -10
- 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-CVnZ0fa5.esm.js → faceCaptureManagerFactory-B7Ms6pSs.esm.js} +68 -7
- package/dist/{faceCaptureManagerFactory-BxWPpxyd.d.ts → faceCaptureManagerFactory-BeUl8fl1.d.ts} +86 -54
- package/dist/faceCaptureSetup-bkAlr5d8.esm.js +2067 -0
- package/dist/{faceMatchManager-Ri4UbNz0.esm.js → faceMatchManager-Bmv0HzuY.esm.js} +2 -2
- package/dist/{faceMatchStateMachine-20DdZ3jg.esm.js → faceMatchStateMachine-mRIHQ3dA.esm.js} +1 -1
- package/dist/{feature-management-CPQ4qv3F.esm.js → feature-management-E0mq0pMs.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-CC-klG0h.esm.js} +2 -2
- package/dist/fiscal-qr.d.ts +2 -56
- package/dist/fiscal-qr.esm.js +2 -308
- package/dist/fiscalQrManager-B1STmT6z.d.ts +71 -0
- package/dist/fiscalQrManager-BunLVFbd.esm.js +34143 -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-DJp1odGN.esm.js} +2 -2
- package/dist/{flowServices-f5Ruz7R9.esm.js → flowServices-DjPFGs_D.esm.js} +91 -26
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-CH6RfqFH.esm.js → geolocationManager-D5906YXx.esm.js} +2 -2
- package/dist/{geolocationStateMachine-DmbWFely.esm.js → geolocationStateMachine-BVOduc3y.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-CacFOtKO.esm.js +79 -0
- package/dist/governmentValidationManager-D02vT4yY.d.ts +63 -0
- package/dist/governmentValidationStateMachine-CoaZOSTP.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-CbPA-Auz.esm.js +727 -0
- package/dist/{idCaptureManager-CqrqSjJV.d.ts → idCaptureManager-DKESug0R.d.ts} +230 -43
- package/dist/{idCaptureManager-BYwTZ2H8.esm.js → idCaptureManager-rfV9dIXy.esm.js} +259 -46
- package/dist/{idCaptureServices-44kwQItl.esm.js → idCaptureServices-i1KxugN7.esm.js} +285 -72
- package/dist/idCaptureStateMachine-Ne_PXth_.esm.js +5333 -0
- package/dist/{idOcrManager-DXc_xRN7.d.ts → idOcrManager-BF_cXZq8.d.ts} +1 -1
- package/dist/{idOcrManager-BIQYQXXj.esm.js → idOcrManager-r46XfZGE.esm.js} +2 -2
- package/dist/{idOcrStateMachine-cSxzHpHt.esm.js → idOcrStateMachine-ClDEP-VI.esm.js} +1 -1
- package/dist/{idVerificationManager-JpV_SAsl.esm.js → idVerificationManager-DT42c77H.esm.js} +2 -2
- package/dist/{idVerificationStateMachine-nPeUNyFq.esm.js → idVerificationStateMachine-DbDVIh9t.esm.js} +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-kNCg9AbD.esm.js → identityReuseManager-yG3acUrQ.esm.js} +2 -2
- package/dist/{identityReuseStateMachine-DyulxDjP.esm.js → identityReuseStateMachine-BhAkuIra.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-B4Niyg_u.esm.js → mandatoryConsentManager-7dI0D08q.esm.js} +2 -2
- package/dist/{mandatoryConsentManager-DyPzUmsZ.d.ts → mandatoryConsentManager-vhv1co_n.d.ts} +1 -1
- package/dist/{mandatoryConsentStateMachine-B4-1u-L8.esm.js → mandatoryConsentStateMachine-DC5Mo6M1.esm.js} +1 -1
- package/dist/multipartRecordingService-OEgIRvqC.esm.js +605 -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-IjhSv5XS.esm.js} +2 -2
- package/dist/{phoneStateMachine-Ba0wKHyX.esm.js → phoneStateMachine-CXdXufKg.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/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-y4VQB11M.esm.js → redirectToMobileManager-FLEWJtv8.esm.js} +2 -2
- package/dist/{redirectToMobileStateMachine-Cyv2x0PP.esm.js → redirectToMobileStateMachine-CSWWgUTO.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-CI1gGWN1.esm.js} +3 -21
- package/dist/safeStorage-B-trhxg6.esm.js +423 -0
- package/dist/{sdkVersion-D1Bm59g6.esm.js → sdkVersion-BZh6dj53.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-UiQ46EBa.esm.js} +30 -4
- package/dist/{selfieManager-DwlCppg0.d.ts → selfieManager-4RRLi21P.d.ts} +8 -11
- package/dist/{selfieManager-Bj6B2ZVy.esm.js → selfieManager-B-2c1n_x.esm.js} +5 -5
- package/dist/selfieStateMachine-Bzx41R8d.esm.js +69 -0
- package/dist/{session-BFdLgN4i.esm.js → session-3LmvAU4S.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-BFk33E67.esm.js} +187 -68
- package/dist/{setup-BIAtLa8k.esm.js → setup-BWG-hivt.esm.js} +226 -100
- package/dist/{setup-BgoWtvIS.d.ts → setup-Cv-JM9QC.d.ts} +63 -69
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-Ca43yhwk.esm.js → signatureManager-B72np4ZO.esm.js} +2 -2
- package/dist/{signatureStateMachine-K1LMRrxG.esm.js → signatureStateMachine-ce_XMA3l.esm.js} +1 -1
- package/dist/{src-0Jurt29N.esm.js → src-35ekGRzK.esm.js} +1 -1
- package/dist/{stats-B0nFKawG.esm.js → stats-CZcy2J53.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/{trueSightService---iW2KKJ.esm.js → trueSightService-BN-Hzw82.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-Bnl58jUQ.d.ts} +6 -85
- package/dist/types-ChAowIxT.d.ts +6 -0
- 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-Bdf8_LYB2.d.ts → types-byBHOzCG2.d.ts} +305 -25
- package/dist/video-selfie.d.ts +59 -35
- package/dist/video-selfie.esm.js +510 -601
- package/dist/{videoSelfieCameraWarmer-NEhFZvWx.esm.js → videoSelfieCameraWarmer-B8PcYqmz.esm.js} +14 -153
- package/dist/videoSelfieFlowModuleMachine-BUe2uACW.esm.js +32 -0
- package/dist/{videoSelfieStepDetector-D3oo2ofo.d.ts → videoSelfieStepDetector-Co0Gu2k2.d.ts} +59 -13
- package/dist/virtualCameraCheck-Cjab7FTI.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-CIMkpEhu.esm.js +107 -0
- package/dist/watchlistForBusinessManager-CsnJnG-C.d.ts +99 -0
- package/dist/{watchlistForBusinessStateMachine-CxFnlshm.esm.js → watchlistForBusinessStateMachine-CJ-MvUre.esm.js} +13 -6
- package/dist/{watchlistManager-LoNZH9qm.esm.js → watchlistManager-CixcLNDT.esm.js} +2 -2
- package/dist/{watchlistStateMachine-DIKQDoUT.esm.js → watchlistStateMachine-CBqk2w-h.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,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-BWG-hivt.esm.js";
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { s as createActor, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
5
|
-
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-
|
|
6
|
-
import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-
|
|
7
|
-
import { o as resetWasmMotionPrimedForModule, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-
|
|
8
|
-
import { n as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-
|
|
9
|
-
import {
|
|
5
|
+
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-B2e8p268.esm.js";
|
|
6
|
+
import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
|
|
7
|
+
import { o as resetWasmMotionPrimedForModule, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-Bj_fyWtv.esm.js";
|
|
8
|
+
import { a as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, o as findIdProtectedCaptureController, s as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-Ne_PXth_.esm.js";
|
|
9
|
+
import { _ as resolveCaptureOptimizingTreatment, v as resolveIdCaptureThresholds } from "./idCaptureServices-i1KxugN7.esm.js";
|
|
10
10
|
//#region src/modules/id/digitalUpload/instrumentation.ts
|
|
11
11
|
const TERMINAL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
|
|
12
12
|
function isHoldingState(value) {
|
|
@@ -41,6 +41,51 @@ function mapDigitalIdScreenName(value, failReason) {
|
|
|
41
41
|
return "uploadDigitalid.review.default";
|
|
42
42
|
}
|
|
43
43
|
//#endregion
|
|
44
|
+
//#region src/modules/id/deviceWallet/instrumentation.ts
|
|
45
|
+
/**
|
|
46
|
+
* Maps a device-wallet child-machine snapshot to a tracked screen name.
|
|
47
|
+
* Family is `deviceWallet.*` — emitted cross-family under the parent
|
|
48
|
+
* `idCapture` module token, same as `mapDigitalIdScreenName`. See
|
|
49
|
+
* `docs/patterns/INSTRUMENTATION.md`.
|
|
50
|
+
*/
|
|
51
|
+
function mapDeviceWalletScreenName(value, failReason) {
|
|
52
|
+
if (value === "presenting") return "deviceWallet.wallet.default";
|
|
53
|
+
if (value === "failed") {
|
|
54
|
+
if (failReason === "NO_CREDENTIAL") return "deviceWallet.error.nocredential";
|
|
55
|
+
if (failReason === "UNSUPPORTED_PLATFORM") return "deviceWallet.error.unsupported";
|
|
56
|
+
return "deviceWallet.error.default";
|
|
57
|
+
}
|
|
58
|
+
return "deviceWallet.loading.default";
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/modules/digital-id-redirect/instrumentation.ts
|
|
62
|
+
/**
|
|
63
|
+
* Maps a digital-ID web-redirect (Trinsic iDIN/FTN) child-machine snapshot value
|
|
64
|
+
* to the ID-Capture "Tracked Events" screen name. Like `digitalUpload`'s
|
|
65
|
+
* `mapDigitalIdScreenName`, this is emitted cross-family under the parent
|
|
66
|
+
* `idCapture` module token (all ID-Capture children ride under
|
|
67
|
+
* `eventModuleNames.idCapture`) on `event.screen`.
|
|
68
|
+
*
|
|
69
|
+
* Names mirror the user-visible phases the ID-Capture UI renders
|
|
70
|
+
* (`digitalIdRedirect.tsx`): loader / redirecting / succeeded / failed / error.
|
|
71
|
+
* The provider chooser is intentionally absent — inside ID-Capture the provider
|
|
72
|
+
* is preset from `config.digitalIds`, so no chooser screen is shown.
|
|
73
|
+
* `finished`/`closed` are terminal and surface no screen of their own.
|
|
74
|
+
*
|
|
75
|
+
* TODO(design): confirm the exact strings against the digital-id-redirect Figma
|
|
76
|
+
* "Tracked Events" canvas when it exists (mirrors the digitalUpload source note).
|
|
77
|
+
* See docs/patterns/INSTRUMENTATION.md.
|
|
78
|
+
*/
|
|
79
|
+
function mapDigitalIdRedirectScreenName(value) {
|
|
80
|
+
switch (value) {
|
|
81
|
+
case "readyToRedirect": return "idCapture.digitalIdRedirect.redirecting.default";
|
|
82
|
+
case "succeeded": return "idCapture.digitalIdRedirect.succeeded.default";
|
|
83
|
+
case "failed": return "idCapture.digitalIdRedirect.failed.default";
|
|
84
|
+
case "error": return "idCapture.digitalIdRedirect.error.default";
|
|
85
|
+
default: return "idCapture.digitalIdRedirect.loader.default";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
44
89
|
//#region src/modules/id/manualUpload/instrumentation.ts
|
|
45
90
|
/**
|
|
46
91
|
* Maps an ID Manual Upload child-machine snapshot to the exact Figma
|
|
@@ -208,17 +253,43 @@ function shouldCaptureBack(context) {
|
|
|
208
253
|
function shouldCaptureFront(context) {
|
|
209
254
|
return context.config.usSmartCapture === true && context.currentMode === "back" && context.uploadResponse?.forceFrontIdCapture === true;
|
|
210
255
|
}
|
|
211
|
-
|
|
256
|
+
/**
|
|
257
|
+
* Resolves the document method represented by camera-facing manager states.
|
|
258
|
+
*
|
|
259
|
+
* Machine context keeps `selectedDocumentType` as the literal chooser
|
|
260
|
+
* selection. Direct-entry flows never dispatch `SELECT_DOCUMENT`, so resolve
|
|
261
|
+
* their effective type only at the public manager boundary. An explicit
|
|
262
|
+
* selection always wins, including non-camera methods. Without one, infer only
|
|
263
|
+
* from the machine's already-derived available camera methods: capture-mode
|
|
264
|
+
* flags such as `onlyBack` and `usSmartCapture` must not manufacture an ID
|
|
265
|
+
* method for a Digital-ID-only or otherwise malformed configuration.
|
|
266
|
+
*/
|
|
267
|
+
function getEffectiveSelectedDocumentType(context) {
|
|
268
|
+
if (context.selectedDocumentType !== void 0) return context.selectedDocumentType;
|
|
269
|
+
let isIdAvailable = false;
|
|
270
|
+
let isPassportAvailable = false;
|
|
271
|
+
for (const docType of context.availableDocumentTypes ?? []) {
|
|
272
|
+
if (docType === "id") isIdAvailable = true;
|
|
273
|
+
if (docType === "passport") isPassportAvailable = true;
|
|
274
|
+
}
|
|
275
|
+
if (isIdAvailable && isPassportAvailable) return context.currentMode === "passport" ? "passport" : "id";
|
|
276
|
+
if (isIdAvailable) return "id";
|
|
277
|
+
if (isPassportAvailable) return "passport";
|
|
278
|
+
}
|
|
279
|
+
function mapCaptureState(snapshot, context, presentationStream) {
|
|
212
280
|
const captureStatus = getCaptureStatus(snapshot) ?? "initializing";
|
|
213
281
|
const { uploadError, uploadResponse } = context;
|
|
214
282
|
return {
|
|
215
283
|
status: "capture",
|
|
216
284
|
captureStatus,
|
|
217
|
-
stream:
|
|
285
|
+
stream: presentationStream,
|
|
286
|
+
usingBackCamera: context.usingBackCamera ?? true,
|
|
218
287
|
detectionStatus: context.detectionStatus,
|
|
219
288
|
attemptsRemaining: context.attemptsRemaining,
|
|
220
289
|
uploadError,
|
|
221
290
|
currentMode: context.currentMode,
|
|
291
|
+
selectedDocumentType: getEffectiveSelectedDocumentType(context),
|
|
292
|
+
tutorialEnabled: context.config.showTutorial === true,
|
|
222
293
|
counterValue: context.counterValue,
|
|
223
294
|
orientation: context.orientation,
|
|
224
295
|
idType: context.idType,
|
|
@@ -231,14 +302,52 @@ function mapCaptureState(snapshot, context) {
|
|
|
231
302
|
captureFeedbackMode: context.captureFeedbackMode,
|
|
232
303
|
uploadErrorMessage: uploadError ? getErrorTitleKey(uploadError, context.currentMode) : void 0,
|
|
233
304
|
uploadErrorDescription: uploadError ? getErrorSubtitleKey(uploadError, uploadResponse, context.currentMode) : void 0,
|
|
305
|
+
acceptedDocuments: uploadResponse?.acceptedDocuments,
|
|
306
|
+
countryCode: uploadResponse?.countryCode,
|
|
234
307
|
needsBackCapture: shouldCaptureBack(context),
|
|
235
308
|
needsFrontCapture: shouldCaptureFront(context),
|
|
236
309
|
showCaptureButtonInAuto: context.config.showCaptureButtonInAuto ?? false,
|
|
237
310
|
canRetry: context.attemptsRemaining > 0
|
|
238
311
|
};
|
|
239
312
|
}
|
|
240
|
-
function
|
|
241
|
-
return
|
|
313
|
+
function mapPermissionsState(snapshot, context) {
|
|
314
|
+
return {
|
|
315
|
+
status: "permissions",
|
|
316
|
+
permissionStatus: getPermissionStatus(snapshot) ?? "idle",
|
|
317
|
+
selectedDocumentType: getEffectiveSelectedDocumentType(context),
|
|
318
|
+
currentMode: context.currentMode,
|
|
319
|
+
tutorialEnabled: context.config.showTutorial === true
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
function getLoadingPhase(snapshot) {
|
|
323
|
+
if (snapshot.matches({ capture: "checkingStream" })) return "checkingStream";
|
|
324
|
+
if (snapshot.matches({ capture: "initializingDeepsight" })) return "initializingDeepsight";
|
|
325
|
+
if (snapshot.matches({ capture: "initializing" })) return "initializingCamera";
|
|
326
|
+
if (snapshot.matches({ permissions: "idle" })) return "permissionsIdle";
|
|
327
|
+
}
|
|
328
|
+
function mapLoadingState(snapshot, phase) {
|
|
329
|
+
return {
|
|
330
|
+
status: "loading",
|
|
331
|
+
phase,
|
|
332
|
+
tutorialEnabled: snapshot.context.config.showTutorial === true,
|
|
333
|
+
selectedDocumentType: getEffectiveSelectedDocumentType(snapshot.context),
|
|
334
|
+
currentMode: snapshot.context.currentMode
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
function getTutorialPhase(snapshot) {
|
|
338
|
+
if (snapshot.matches({ tutorial: "checkingPermission" })) return "checkingPermission";
|
|
339
|
+
if (snapshot.matches({ tutorial: "waitingForPermission" })) return "waitingForPermission";
|
|
340
|
+
if (snapshot.matches({ tutorial: { initializingCamera: { userIntent: "clicked" } } })) return "waitingForCamera";
|
|
341
|
+
if (snapshot.matches({ tutorial: "initializingCamera" })) return "initializingCamera";
|
|
342
|
+
return "ready";
|
|
343
|
+
}
|
|
344
|
+
function mapTutorialState(snapshot, context) {
|
|
345
|
+
return {
|
|
346
|
+
status: "tutorial",
|
|
347
|
+
phase: getTutorialPhase(snapshot),
|
|
348
|
+
selectedDocumentType: getEffectiveSelectedDocumentType(context),
|
|
349
|
+
currentMode: context.currentMode
|
|
350
|
+
};
|
|
242
351
|
}
|
|
243
352
|
function mapManualUploadState(snapshot) {
|
|
244
353
|
const { config } = snapshot.context;
|
|
@@ -258,14 +367,17 @@ function mapManualUploadState(snapshot) {
|
|
|
258
367
|
/**
|
|
259
368
|
* Manual upload is client-authoritative for the back side: the slot must be
|
|
260
369
|
* shown or hidden before any upload round-trip, so there is no
|
|
261
|
-
* `skipBackIdCapture` to defer to yet.
|
|
262
|
-
* directly here
|
|
263
|
-
* opposite: it forwards
|
|
370
|
+
* `skipBackIdCapture` to defer to yet. The side-only flags are therefore read
|
|
371
|
+
* directly here (`onlyFront`: ENG-50532; `onlyBack`: ENG-51547). The camera
|
|
372
|
+
* path is the opposite: it forwards only-front and waits for the server's
|
|
373
|
+
* answer.
|
|
264
374
|
*/
|
|
265
375
|
const onlyFront = config.onlyFront === true;
|
|
266
|
-
const
|
|
267
|
-
const
|
|
268
|
-
const
|
|
376
|
+
const onlyBack = config.onlyBack === true;
|
|
377
|
+
const idTabCanContinue = onlyBack && backUploaded || !onlyBack && (childCtx?.frontUploaded ?? false) && (onlyFront || backUploaded);
|
|
378
|
+
const canContinue = childCtx?.activeTab === "id" ? idTabCanContinue : !onlyBack && (childCtx?.passportUploaded ?? false);
|
|
379
|
+
const showFrontSlot = !onlyBack;
|
|
380
|
+
const showBackSlot = onlyBack || !onlyFront;
|
|
269
381
|
return {
|
|
270
382
|
status: "manualUpload",
|
|
271
383
|
phase,
|
|
@@ -273,6 +385,7 @@ function mapManualUploadState(snapshot) {
|
|
|
273
385
|
activeTab: childCtx?.activeTab ?? "id",
|
|
274
386
|
showIdTab,
|
|
275
387
|
showPassportTab,
|
|
388
|
+
showFrontSlot,
|
|
276
389
|
showBackSlot,
|
|
277
390
|
frontFileName: childCtx?.frontFile?.name,
|
|
278
391
|
backFileName: childCtx?.backFile?.name,
|
|
@@ -312,34 +425,55 @@ function mapDigitalUploadState(snapshot) {
|
|
|
312
425
|
pickerRequestId: childCtx?.pickerRequestId ?? 0
|
|
313
426
|
};
|
|
314
427
|
}
|
|
315
|
-
function
|
|
428
|
+
function mapDigitalIdRedirectState(snapshot) {
|
|
429
|
+
const childSnapshot = snapshot.children["digitalIdRedirect"]?.getSnapshot();
|
|
430
|
+
const childCtx = childSnapshot?.context;
|
|
431
|
+
const childValue = childSnapshot?.value;
|
|
432
|
+
return {
|
|
433
|
+
status: "digitalIdRedirect",
|
|
434
|
+
phase: (() => {
|
|
435
|
+
if (childValue === "readyToRedirect") return "redirecting";
|
|
436
|
+
if (childValue === "succeeded") return "success";
|
|
437
|
+
if (childValue === "failed") return "failed";
|
|
438
|
+
if (childValue === "error") return "error";
|
|
439
|
+
return "loading";
|
|
440
|
+
})(),
|
|
441
|
+
launchUrl: childCtx?.launchUrl,
|
|
442
|
+
failureReason: childCtx?.failureReason,
|
|
443
|
+
providerId: childCtx?.selectedProvider ?? childCtx?.config.provider
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
function mapDeviceWalletState(snapshot) {
|
|
447
|
+
const childSnapshot = snapshot.children["deviceWallet"]?.getSnapshot();
|
|
448
|
+
const childCtx = childSnapshot?.context;
|
|
449
|
+
const childValue = childSnapshot?.value;
|
|
450
|
+
return {
|
|
451
|
+
status: "deviceWallet",
|
|
452
|
+
phase: (() => {
|
|
453
|
+
if (childValue === "presenting") return "presenting";
|
|
454
|
+
if (childValue === "decrypting") return "decrypting";
|
|
455
|
+
if (childValue === "failed") return "failed";
|
|
456
|
+
return "requesting";
|
|
457
|
+
})(),
|
|
458
|
+
failReason: childCtx?.failReason ?? null,
|
|
459
|
+
platform: childCtx?.platform
|
|
460
|
+
};
|
|
461
|
+
}
|
|
462
|
+
function mapState(snapshot, presentationStream) {
|
|
316
463
|
const { context } = snapshot;
|
|
317
464
|
if (snapshot.matches("idle")) return { status: "idle" };
|
|
318
|
-
|
|
465
|
+
const loadingPhase = getLoadingPhase(snapshot);
|
|
466
|
+
if (loadingPhase) return mapLoadingState(snapshot, loadingPhase);
|
|
319
467
|
if (snapshot.matches("chooser")) return {
|
|
320
468
|
status: "chooser",
|
|
321
469
|
availableDocumentTypes: context.availableDocumentTypes
|
|
322
470
|
};
|
|
323
|
-
if (snapshot.matches("loading")) return
|
|
324
|
-
if (snapshot.matches("tutorial")) return
|
|
325
|
-
status: "tutorial",
|
|
326
|
-
selectedDocumentType: context.selectedDocumentType,
|
|
327
|
-
currentMode: context.currentMode
|
|
328
|
-
};
|
|
471
|
+
if (snapshot.matches("loading")) return mapLoadingState(snapshot, "bootstrapping");
|
|
472
|
+
if (snapshot.matches("tutorial")) return mapTutorialState(snapshot, context);
|
|
329
473
|
if (snapshot.matches("ageVerification")) return { status: "ageVerification" };
|
|
330
474
|
if (snapshot.matches("closed")) return { status: "closed" };
|
|
331
|
-
if (snapshot.matches("permissions"))
|
|
332
|
-
|
|
333
|
-
if (permissionStatus === void 0) return {
|
|
334
|
-
status: "permissions",
|
|
335
|
-
permissionStatus: "idle"
|
|
336
|
-
};
|
|
337
|
-
return {
|
|
338
|
-
status: "permissions",
|
|
339
|
-
permissionStatus
|
|
340
|
-
};
|
|
341
|
-
}
|
|
342
|
-
if (snapshot.matches("capture")) return mapCaptureState(snapshot, context);
|
|
475
|
+
if (snapshot.matches("permissions")) return mapPermissionsState(snapshot, context);
|
|
476
|
+
if (snapshot.matches("capture")) return mapCaptureState(snapshot, context, presentationStream);
|
|
343
477
|
if (snapshot.matches("mandatoryConsent")) return {
|
|
344
478
|
status: "mandatoryConsent",
|
|
345
479
|
regulationType: context.uploadResponse?.regulationType ?? "Other"
|
|
@@ -377,6 +511,8 @@ function mapState(snapshot) {
|
|
|
377
511
|
};
|
|
378
512
|
if (snapshot.matches("manualIdUpload")) return mapManualUploadState(snapshot);
|
|
379
513
|
if (snapshot.matches("digitalIdUpload")) return mapDigitalUploadState(snapshot);
|
|
514
|
+
if (snapshot.matches("digitalIdRedirect") || snapshot.matches("digitalIdRedirectReturning")) return mapDigitalIdRedirectState(snapshot);
|
|
515
|
+
if (snapshot.matches("deviceWallet") || snapshot.matches("digitalIdRouting")) return mapDeviceWalletState(snapshot);
|
|
380
516
|
return { status: "idle" };
|
|
381
517
|
}
|
|
382
518
|
function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished }) {
|
|
@@ -385,7 +521,7 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
|
|
|
385
521
|
return {
|
|
386
522
|
load() {
|
|
387
523
|
const { config } = actor.getSnapshot().context;
|
|
388
|
-
|
|
524
|
+
setWasmDsFlagSync(config.ds === true);
|
|
389
525
|
resetWasmMotionPrimedForModule();
|
|
390
526
|
actor.send({ type: "LOAD" });
|
|
391
527
|
},
|
|
@@ -408,6 +544,14 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
|
|
|
408
544
|
}
|
|
409
545
|
actor.send({ type: "NEXT_STEP" });
|
|
410
546
|
},
|
|
547
|
+
/**
|
|
548
|
+
* Requests camera (and, when deepsight is enabled, motion) permission.
|
|
549
|
+
* Effective in `permissions.idle`, `permissions.waitingForUser`,
|
|
550
|
+
* `permissions.motionOnly`, `permissions.learnMore`, `tutorial.ready`,
|
|
551
|
+
* `tutorial.checkingPermission`, and `tutorial.initializingCamera` (while
|
|
552
|
+
* the camera pre-warms it records the user's intent to continue, so the
|
|
553
|
+
* tutorial advances to capture as soon as the warm-up finishes).
|
|
554
|
+
*/
|
|
411
555
|
requestPermission() {
|
|
412
556
|
trackElementClicked?.("requestPermission");
|
|
413
557
|
actor.send({ type: "REQUEST_PERMISSION" });
|
|
@@ -536,6 +680,36 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
|
|
|
536
680
|
digitalUploadChooseAnother() {
|
|
537
681
|
trackElementClicked?.("digitalUpload.chooseAnother");
|
|
538
682
|
actor.send({ type: "DIGITAL_UPLOAD_CHOOSE_ANOTHER" });
|
|
683
|
+
},
|
|
684
|
+
/** Retry a failed Digital ID web-redirect — creates a NEW verification. */
|
|
685
|
+
digitalIdRedirectRetry() {
|
|
686
|
+
trackElementClicked?.("digitalIdRedirect.retry");
|
|
687
|
+
actor.send({ type: "DIGITAL_ID_REDIRECT_RETRY" });
|
|
688
|
+
},
|
|
689
|
+
/** Fall back from the Digital ID web-redirect to the chooser. */
|
|
690
|
+
digitalIdRedirectUseAnotherMethod() {
|
|
691
|
+
trackElementClicked?.("digitalIdRedirect.useAnotherMethod");
|
|
692
|
+
actor.send({ type: "DIGITAL_ID_REDIRECT_USE_ANOTHER_METHOD" });
|
|
693
|
+
},
|
|
694
|
+
/** Acknowledge the Digital ID web-redirect success screen and advance. */
|
|
695
|
+
digitalIdRedirectContinue() {
|
|
696
|
+
trackElementClicked?.("digitalIdRedirect.continue");
|
|
697
|
+
actor.send({ type: "DIGITAL_ID_REDIRECT_CONTINUE" });
|
|
698
|
+
},
|
|
699
|
+
/** Refresh an expiring launch URL (no new verification / billing event). */
|
|
700
|
+
digitalIdRedirectRefresh() {
|
|
701
|
+
trackElementClicked?.("digitalIdRedirect.refresh");
|
|
702
|
+
actor.send({ type: "DIGITAL_ID_REDIRECT_REFRESH" });
|
|
703
|
+
},
|
|
704
|
+
/** Retry a failed device-wallet (mDL) handshake from the start. */
|
|
705
|
+
deviceWalletRetry() {
|
|
706
|
+
trackElementClicked?.("deviceWallet.retry");
|
|
707
|
+
actor.send({ type: "DEVICE_WALLET_RETRY" });
|
|
708
|
+
},
|
|
709
|
+
/** Fall back from the device-wallet handshake to the chooser. */
|
|
710
|
+
deviceWalletUseAnotherMethod() {
|
|
711
|
+
trackElementClicked?.("deviceWallet.useAnotherMethod");
|
|
712
|
+
actor.send({ type: "DEVICE_WALLET_USE_ANOTHER_METHOD" });
|
|
539
713
|
}
|
|
540
714
|
};
|
|
541
715
|
}
|
|
@@ -674,6 +848,17 @@ function getIdCaptureScreenName(snapshot) {
|
|
|
674
848
|
const childContext = child?.context;
|
|
675
849
|
return mapIdManualUploadScreenName(child?.value, childContext) ?? "idCapture.manualIdUpload";
|
|
676
850
|
}
|
|
851
|
+
case "digitalIdRedirect":
|
|
852
|
+
case "digitalIdRedirectReturning": {
|
|
853
|
+
const child = snapshot.children["digitalIdRedirect"]?.getSnapshot();
|
|
854
|
+
return mapDigitalIdRedirectScreenName(child?.value);
|
|
855
|
+
}
|
|
856
|
+
case "deviceWallet":
|
|
857
|
+
case "digitalIdRouting": {
|
|
858
|
+
const child = snapshot.children["deviceWallet"]?.getSnapshot();
|
|
859
|
+
const childContext = child?.context;
|
|
860
|
+
return mapDeviceWalletScreenName(child?.value, childContext?.failReason ?? null);
|
|
861
|
+
}
|
|
677
862
|
default: return `idCapture.${topLevel}`;
|
|
678
863
|
}
|
|
679
864
|
}
|
|
@@ -770,28 +955,56 @@ function getIdCaptureErrorPayload(snapshot) {
|
|
|
770
955
|
* `docs/patterns/CAPABILITY.md`). Pass a fake/no-op to override (tests do).
|
|
771
956
|
*/
|
|
772
957
|
function createIdCaptureManagerFromActor(actor, visibilityObserver = new BrowserVisibilityObserverProvider()) {
|
|
958
|
+
const protectedCaptureController = findIdProtectedCaptureController(actor);
|
|
959
|
+
protectedCaptureController?.setVisible(visibilityObserver.isVisible());
|
|
773
960
|
return createManager({
|
|
774
961
|
actor,
|
|
775
|
-
mapState,
|
|
962
|
+
mapState: (snapshot) => mapState(snapshot, protectedCaptureController?.getProjection().stream),
|
|
776
963
|
createApi,
|
|
777
964
|
instrumentation: createManagerInstrumentation(eventModuleNames.idCapture, {
|
|
778
965
|
getEventScreenName: mapIdCaptureScreenName,
|
|
779
966
|
getErrorName: getIdCaptureErrorName,
|
|
780
967
|
getErrorPayload: getIdCaptureErrorPayload,
|
|
781
|
-
visibilityObserver
|
|
968
|
+
visibilityObserver: {
|
|
969
|
+
isVisible: () => visibilityObserver.isVisible(),
|
|
970
|
+
onVisibilityChange: (listener) => visibilityObserver.onVisibilityChange((visible) => {
|
|
971
|
+
protectedCaptureController?.setVisible(visible);
|
|
972
|
+
actor.send({ type: visible ? "FOREGROUND" : "BACKGROUND" });
|
|
973
|
+
listener(visible);
|
|
974
|
+
})
|
|
975
|
+
}
|
|
782
976
|
})
|
|
783
977
|
});
|
|
784
978
|
}
|
|
785
979
|
//#endregion
|
|
980
|
+
//#region ../infra/src/providers/browser/BrowserDigitalCredentialsProvider.ts
|
|
981
|
+
var BrowserDigitalCredentialsProvider = class {
|
|
982
|
+
isAvailable() {
|
|
983
|
+
return typeof navigator !== "undefined" && typeof navigator.credentials?.get === "function" && typeof globalThis.DigitalCredential !== "undefined";
|
|
984
|
+
}
|
|
985
|
+
async get(request, options) {
|
|
986
|
+
return { response: (await navigator.credentials.get({
|
|
987
|
+
mediation: "required",
|
|
988
|
+
signal: options?.signal,
|
|
989
|
+
digital: { requests: [request] }
|
|
990
|
+
}))?.data?.response };
|
|
991
|
+
}
|
|
992
|
+
};
|
|
993
|
+
//#endregion
|
|
786
994
|
//#region src/modules/id/idCaptureActor.ts
|
|
787
995
|
function createIdCaptureActor(options) {
|
|
788
|
-
const dependencies =
|
|
996
|
+
const dependencies = {
|
|
997
|
+
...options.dependencies,
|
|
998
|
+
storage: options.dependencies?.storage ?? new BrowserStorageProvider(),
|
|
999
|
+
credentials: options.dependencies?.credentials ?? new BrowserDigitalCredentialsProvider()
|
|
1000
|
+
};
|
|
789
1001
|
const treatment = resolveCaptureOptimizingTreatment(options.config);
|
|
790
|
-
|
|
791
|
-
config
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
1002
|
+
const config = {
|
|
1003
|
+
...options.config,
|
|
1004
|
+
thresholds: resolveIdCaptureThresholds(options.config, treatment?.framesAggregationInterval)
|
|
1005
|
+
};
|
|
1006
|
+
return createActor(provideIdProtectedCaptureController(idCaptureMachine, createIdProtectedCaptureController()), { input: {
|
|
1007
|
+
config,
|
|
795
1008
|
dependencies,
|
|
796
1009
|
captureFeedbackMode: treatment?.mode ?? "countdown",
|
|
797
1010
|
captureWindowMs: treatment?.captureWindowMs,
|