@incodetech/core 2.3.2 → 2.4.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 +1243 -3
- package/dist/Actor-DpTj5PFb.d.ts +1 -0
- package/dist/{BaseWasmProvider-Dyi6dKp1.d.ts → BaseWasmProvider-BL9wIRnN.d.ts} +2 -2
- package/dist/{FaceDetectionProvider-DtmtCKa9.esm.js → FaceDetectionProvider-BjTer9h3.esm.js} +126 -10
- package/dist/HttpRequestError-Bh0pNGSC.esm.js +35 -0
- package/dist/{IIdCaptureCapability-RNiFhvXR.d.ts → IIdCaptureCapability-DBsv9-7M.d.ts} +2 -2
- package/dist/{IWasmUtilCapability-CNWRl7jr.d.ts → IWasmUtilCapability-CPX0RGdQ.d.ts} +28 -5
- package/dist/{Manager-CQQ99QOI.d.ts → Manager-C9T5amUN.d.ts} +7 -1
- package/dist/{MotionSensorProvider-DyhbM4Si.esm.js → MotionSensorProvider-DYxh8TjR.esm.js} +1 -1
- package/dist/{ekycStateMachine-UeJRO8_p.esm.js → PhoneValidationProvider-SZiOS0jB.esm.js} +232 -827
- package/dist/{StreamCanvasCapture-_8gdW5Lk.d.ts → StreamCanvasCapture-DVmzJux5.d.ts} +2 -2
- package/dist/{safeStorage-BdU9_m2E.esm.js → WasmUtilProvider-CIdnE7Fx.esm.js} +95 -46
- package/dist/{addressSearch-DyHGgeX8.esm.js → addressSearch-BiYZjvp3.esm.js} +143 -4
- package/dist/{advanceableErrors-CpF2cBy6.esm.js → advanceableErrors-q_pfU3Cn.esm.js} +5 -4
- package/dist/ae-signature.d.ts +2 -2
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-BY36bS12.d.ts → antifraudManager-DbGCvlJs.d.ts} +2 -2
- package/dist/{antifraudManager-DNkw66oW.esm.js → antifraudManager-HL08jeDX.esm.js} +3 -3
- package/dist/{antifraudStateMachine-DBeq47D2.esm.js → antifraudStateMachine-DoJVzblM.esm.js} +3 -3
- package/dist/{apiError-CmGEmaGU.esm.js → apiError-DcSWedC6.esm.js} +2 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-CboRCl_N.d.ts → authenticationManager-CANv5-W5.d.ts} +2 -8
- package/dist/{authenticationManager-BFjSjtQ_.esm.js → authenticationManager-SaiAxqvS.esm.js} +6 -6
- package/dist/{authenticationStateMachine-Dfo34ZiI.esm.js → authenticationStateMachine-CHSxmV7z.esm.js} +5 -6
- package/dist/avatar.d.ts +1 -1
- package/dist/{backCameraStream-B0-YgP_y.esm.js → backCameraStream-CMvXj4X4.esm.js} +1 -1
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.d.ts +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-C3-CI0_s.esm.js → certificateIssuanceManager-CMg4SgL4.esm.js} +3 -3
- package/dist/{certificateIssuanceManager-DCgEidHz.d.ts → certificateIssuanceManager-Dr8A4Lgr.d.ts} +2 -3
- package/dist/{certificateIssuanceStateMachine-CxqS_nD-.esm.js → certificateIssuanceStateMachine-Cs64QmYH.esm.js} +4 -4
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-B6E1XJDw.esm.js → consentManager-CjrxY737.esm.js} +3 -3
- package/dist/{consentManager-2h_w6wFc.d.ts → consentManager-DgzWQpAR.d.ts} +6 -7
- package/dist/{consentStateMachine-DTSfdGiW.esm.js → consentStateMachine-BCj5Jb3g.esm.js} +3 -3
- package/dist/{createCameraCycleOwnership-DnwTl1ad.esm.js → createCameraCycleOwnership-kdlhkmmY.esm.js} +71 -65
- package/dist/{createFaceAvatar-BlcTYgJv.d.ts → createFaceAvatar-DXgmQmQy.d.ts} +1 -1
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-9XhFVZ5S.esm.js → crossDocumentDataMatchManager-BHnGRsto.esm.js} +4 -4
- package/dist/{crossDocumentDataMatchManager-Dq8Z3SOg.d.ts → crossDocumentDataMatchManager-yCWCOzcU.d.ts} +2 -2
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-DNuZn9fn.d.ts → curpValidationManager-B-1EZbP_.d.ts} +3 -3
- package/dist/{curpValidationManager-DbIMYFcJ.esm.js → curpValidationManager-DBNIn8BF.esm.js} +15 -22
- package/dist/{curpValidationStateMachine-g5kMfuLj.esm.js → curpValidationStateMachine-DAxImy8p.esm.js} +4 -4
- package/dist/custom-fields.d.ts +1 -1
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-CzWZTkW-.esm.js → customFieldsManager-BV6UyLFV.esm.js} +4 -4
- package/dist/{customFieldsManager-8-W2KY4n.d.ts → customFieldsManager-CF-cO8ap.d.ts} +2 -2
- package/dist/{customWatchlistManager-DWTED5Ur.esm.js → customWatchlistManager-DML0UPzf.esm.js} +3 -3
- package/dist/{customWatchlistManager-PBWHr_oM.d.ts → customWatchlistManager-DolUswyR.d.ts} +2 -2
- package/dist/{customWatchlistStateMachine-DOQou6TW.esm.js → customWatchlistStateMachine-D9gI5uu7.esm.js} +3 -3
- package/dist/deepsightLoader-DvfAYnzg.esm.js +55 -0
- package/dist/{deepsightLoader-v-dLejS-.esm.js → deepsightService-DLGO9yv1.esm.js} +51 -56
- package/dist/device.esm.js +1 -1
- package/dist/document-capture.d.ts +2 -2
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-BRPxqYD2.esm.js → documentCaptureManager-C9XUnYU6.esm.js} +17 -18
- package/dist/{documentCaptureManager-lEtCM320.d.ts → documentCaptureManager-DkyDtm3Y.d.ts} +11 -34
- package/dist/{documentCaptureStateMachine-D312sSIu.esm.js → documentCaptureStateMachine-BHDsCfhL.esm.js} +55 -58
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-C-9Jhnd3.esm.js → dynamicFormsManager-5uIXobxi.esm.js} +3 -3
- package/dist/{dynamicFormsManager-D5R_uxLQ.d.ts → dynamicFormsManager-C0dHs1ty.d.ts} +3 -3
- package/dist/{dynamicFormsStateMachine-DGI_F2PP.esm.js → dynamicFormsStateMachine-DQmok084.esm.js} +4 -4
- package/dist/ekyb.d.ts +5 -5
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-BwRuGAwt.d.ts → ekybManager-BaZ_7CEu.d.ts} +4 -4
- package/dist/{ekybManager-DeoMcZEz.esm.js → ekybManager-CazShiQz.esm.js} +23 -27
- package/dist/{ekybStateMachine-D1IJ1Z72.esm.js → ekybStateMachine-hstiCNmW.esm.js} +338 -13
- package/dist/ekyc.d.ts +2 -2
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-BX2d46FY.esm.js → ekycManager-BdJRUsz0.esm.js} +29 -36
- package/dist/{ekycManager-DLzDuBzI.d.ts → ekycManager-DW-ynodd.d.ts} +3 -3
- package/dist/ekycStateMachine-x6Klot8g.esm.js +1444 -0
- package/dist/{ekycUtils-D6wfSpPN.esm.js → ekycUtils-zY8CdKJL.esm.js} +53 -3
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-yYUc30na.esm.js → electronicSignatureManager-Bc8spG8p.esm.js} +10 -10
- package/dist/{electronicSignatureManager-Ds-KEVTq.d.ts → electronicSignatureManager-DTSLOvKR.d.ts} +2 -3
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-bR1N5rV_.esm.js → emailManager-CtlKRRaR.esm.js} +20 -26
- package/dist/{emailManager-CADXW_9X.d.ts → emailManager-Dy6omJVp.d.ts} +2 -2
- package/dist/{emailStateMachine-Bc_6oIYw.esm.js → emailStateMachine-5Neq3rE5.esm.js} +4 -4
- package/dist/{endpoints-B-3Q-LUw.esm.js → endpoints-DHzlkQNe.esm.js} +2 -0
- package/dist/{events-ijlbX_Wx.esm.js → events-CAgFE-k3.esm.js} +19 -7
- package/dist/events.d.ts +3 -2
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +38 -38
- package/dist/extensibility.esm.js +36 -36
- package/dist/{externalFetch-BKBThAUC.esm.js → externalFetch-DrR9xshk.esm.js} +3 -2
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-m-7ae67q.d.ts → faceCaptureManagerFactory-jKQ2QtY-.d.ts} +11 -51
- package/dist/{faceCaptureManagerFactory-B6i9QcAk.esm.js → faceCaptureManagerFactory-uFm1AcaY.esm.js} +19 -54
- package/dist/{faceCaptureSetup-DU1mjRr6.esm.js → faceCaptureSetup-Cu2wabzo.esm.js} +99 -395
- package/dist/{faceMatchManager-Bmv0HzuY.esm.js → faceMatchManager-9Nj9aPci.esm.js} +3 -3
- package/dist/{faceMatchManager-BnvrZM2F.d.ts → faceMatchManager-DIgG-UFS.d.ts} +1 -2
- package/dist/{faceMatchStateMachine-mRIHQ3dA.esm.js → faceMatchStateMachine-B9ZUnlyU.esm.js} +6 -4
- package/dist/{feature-management-C8CuN0os.esm.js → feature-management-BTbYruNe.esm.js} +3 -3
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.d.ts +2 -2
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-CBvEGxFx.d.ts → fieldComparisonManager-CUX4gza2.d.ts} +6 -3
- package/dist/{fieldComparisonManager-CC-klG0h.esm.js → fieldComparisonManager-Dk38hXZP.esm.js} +35 -17
- package/dist/fiscal-qr.d.ts +1 -1
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-B1STmT6z.d.ts → fiscalQrManager-D0Iy7EKR.d.ts} +2 -2
- package/dist/fiscalQrManager-DmBkQfs0.esm.js +6798 -0
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +14 -13
- package/dist/flow.esm.js +14 -14
- package/dist/{flowCompletionService-DccgtDnm.esm.js → flowCompletionService-xnn_SlJU.esm.js} +2 -2
- package/dist/{flowServices-CdsWsppG.esm.js → flowServices-DA64AEZC.esm.js} +11 -7
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-CGHBxtMb.esm.js → geolocationManager-CqNLY45e.esm.js} +6 -7
- package/dist/{geolocationManager-Cz744E5S.d.ts → geolocationManager-Dn24g1fl.d.ts} +2 -3
- package/dist/{geolocationStateMachine-CdEb1Gn0.esm.js → geolocationStateMachine-D-cQi7ar.esm.js} +4 -4
- package/dist/{getDeviceClass-5NYZg9s6.esm.js → getDeviceClass-bsWdEDxP.esm.js} +1 -1
- package/dist/{getParsedUserAgent-B2iFDql1.esm.js → getParsedUserAgent-DhQPeKqw.esm.js} +1 -1
- package/dist/government-validation.d.ts +1 -1
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-D02vT4yY.d.ts → governmentValidationManager-B82zOut8.d.ts} +3 -3
- package/dist/{governmentValidationManager-CacFOtKO.esm.js → governmentValidationManager-CP0SiOOe.esm.js} +3 -3
- package/dist/{governmentValidationStateMachine-CoaZOSTP.esm.js → governmentValidationStateMachine-C3YQ8yCZ.esm.js} +3 -3
- package/dist/home.d.ts +3 -26
- package/dist/home.esm.js +2 -2
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-ocr.esm.js +2 -2
- package/dist/id-selfie-flow.d.ts +6 -9
- package/dist/id-selfie-flow.esm.js +23 -28
- package/dist/id-verification.d.ts +1 -1
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +4 -4
- package/dist/id.esm.js +4 -205
- package/dist/{idCaptureDefaults-Dl64Trv5.esm.js → idCaptureDefaults-CBg73RnV.esm.js} +8 -5
- package/dist/{idCaptureManager-BHwL2Z0V.d.ts → idCaptureManager-BY97SRCV.d.ts} +242 -98
- package/dist/{idCaptureManager-BNmVJQkd.esm.js → idCaptureManager-D4V8vXtY.esm.js} +276 -210
- package/dist/{idCaptureServices-dtDG2HXS.esm.js → idCaptureServices-DJ33k3-p.esm.js} +21 -39
- package/dist/{idCaptureStateMachine-BbiZD3uf.esm.js → idCaptureStateMachine-PJt0yzom.esm.js} +989 -872
- package/dist/{idOcrManager-CFlDwUvN.d.ts → idOcrManager-BTdHlJ9D.d.ts} +2 -3
- package/dist/{idOcrManager-ByWuQ4ej.esm.js → idOcrManager-DxoCesYP.esm.js} +3 -3
- package/dist/{idOcrStateMachine-Bt_abXQQ.esm.js → idOcrStateMachine-kPn7DB2I.esm.js} +3 -3
- package/dist/{idVerificationManager-BB4Pj_N6.d.ts → idVerificationManager-BJapZfpy.d.ts} +2 -3
- package/dist/{idVerificationManager-DT42c77H.esm.js → idVerificationManager-CDhRUU5n.esm.js} +3 -3
- package/dist/{idVerificationStateMachine-DbDVIh9t.esm.js → idVerificationStateMachine-0HTVVxse.esm.js} +3 -3
- package/dist/identity-reuse.d.ts +2 -2
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-yG3acUrQ.esm.js → identityReuseManager-BleUi6TK.esm.js} +26 -13
- package/dist/{identityReuseManager-BXEBBI3N.d.ts → identityReuseManager-ooAbp6Kc.d.ts} +164 -46
- package/dist/{identityReuseStateMachine-BhAkuIra.esm.js → identityReuseStateMachine-BrBUpfn5.esm.js} +89 -23
- package/dist/{index-CeaC32qI.d.ts → index-DfEuu-Ew.d.ts} +2 -2
- package/dist/index-DpTj5PFb.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-BjzPjJ_p.esm.js → invokeOnCaptureCallback-BW7V3vub.esm.js} +1 -1
- package/dist/lamejs-B6TzhU5q.esm.js +10 -0
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-7dI0D08q.esm.js → mandatoryConsentManager-CX_Dyht7.esm.js} +3 -3
- package/dist/{mandatoryConsentManager-DFVm_i2B.d.ts → mandatoryConsentManager-TkX57U6f.d.ts} +3 -4
- package/dist/{mandatoryConsentStateMachine-DC5Mo6M1.esm.js → mandatoryConsentStateMachine-CoaSB7P7.esm.js} +3 -3
- package/dist/{multipartRecordingService-mwKFTlhR.esm.js → multipartRecordingService-DbeQpXdU.esm.js} +2 -2
- package/dist/{permissionGuards-D6TfVop2.esm.js → permissionGuards-Bf4LbHjC.esm.js} +1 -1
- package/dist/{permissionServices-EY3_Vx6c.esm.js → permissionServices-d2UW0r_L.esm.js} +34 -3
- package/dist/phone-number.d.ts +24 -0
- package/dist/phone-number.esm.js +1922 -0
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-IjhSv5XS.esm.js → phoneManager-BGBcpqsk.esm.js} +31 -22
- package/dist/{phoneManager-BBU8Lq0O.d.ts → phoneManager-BO-LTih5.d.ts} +16 -3
- package/dist/{phoneStateMachine-CXdXufKg.esm.js → phoneStateMachine-CEm2y7yG.esm.js} +39 -20
- package/dist/phoneValidation-DnBcNUNh.esm.js +48 -0
- package/dist/qe-signature.d.ts +2 -2
- package/dist/qe-signature.esm.js +1 -1
- package/dist/redirect-to-mobile.d.ts +1 -1
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-FLEWJtv8.esm.js → redirectToMobileManager-B1yQHFLu.esm.js} +4 -4
- package/dist/{redirectToMobileManager-BD2PvT5B.d.ts → redirectToMobileManager-CVsvpVbQ.d.ts} +2 -2
- package/dist/{redirectToMobileStateMachine-CSWWgUTO.esm.js → redirectToMobileStateMachine--Sr9NEVT.esm.js} +5 -5
- package/dist/{rolldown-runtime-FDOR9p9I.esm.js → rolldown-runtime-B-1-B7_t.esm.js} +10 -1
- package/dist/{runChildModule-B2Y_hlix.esm.js → runChildModule-vdxQMCmO.esm.js} +13 -12
- package/dist/safeStorage-UxDrnjwa.esm.js +35 -0
- package/dist/{sdkVersion-N1UiyFiY.esm.js → sdkVersion-F5YZbjip.esm.js} +1 -1
- package/dist/selfie.d.ts +4 -4
- package/dist/selfie.esm.js +12 -12
- package/dist/selfieErrorUtils-D-tsgEuX.esm.js +21 -0
- package/dist/{selfieManager-BSZG891S.d.ts → selfieManager-1J0IEyFq.d.ts} +2 -8
- package/dist/{selfieManager-AS6wfUvZ.esm.js → selfieManager-26pENXxw.esm.js} +6 -6
- package/dist/selfieStateMachine-BhfKsl3I.esm.js +41 -0
- package/dist/{session-BESZc05k.esm.js → session-Bu7djCsj.esm.js} +5 -5
- package/dist/session.d.ts +15 -3
- package/dist/session.esm.js +30 -5
- package/dist/sessionInitializer-jxbfCnE-.esm.js +974 -0
- package/dist/{setup-BuPbxpwF.esm.js → setup-C38QkrSP.esm.js} +232 -112
- package/dist/{setup-Cyko6cAn.d.ts → setup-lgkQ8dJW.d.ts} +20 -11
- package/dist/signature.d.ts +1 -1
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-DGBSWz2_.d.ts → signatureManager-BpVt_Jv7.d.ts} +2 -2
- package/dist/{signatureManager-B72np4ZO.esm.js → signatureManager-qqXyH93e.esm.js} +7 -11
- package/dist/{signatureStateMachine-ce_XMA3l.esm.js → signatureStateMachine-BkRSrkKp.esm.js} +3 -3
- package/dist/splitTrackedName-3zJRd2RD.esm.js +19 -0
- package/dist/{src-35ekGRzK.esm.js → src-DJAJjRYQ.esm.js} +1 -1
- package/dist/{stats-CZcy2J53.esm.js → stats-DmG_tkGk.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/{sessionInitializer-CnhAkMUN.esm.js → thumbmark.esm-CRc0cYvz.esm.js} +33 -776
- package/dist/{trueSightService-M5VpCo96.esm.js → trueSightService-BWgRVGIT.esm.js} +893 -900
- package/dist/trust-graph.d.ts +1 -2
- package/dist/trust-graph.esm.js +2 -2
- package/dist/{types-C0oWGUzg.d.ts → types-0L-eFDmr.d.ts} +1 -1
- package/dist/{types-C1g9itHE.d.ts → types-BGXxRwQM.d.ts} +6 -7
- package/dist/{types-BfgmV7s7.d.ts → types-BQA7lRDV.d.ts} +1 -1
- package/dist/{types-CxGdmzxa.d.ts → types-BvFmYX5c.d.ts} +1 -1
- package/dist/{types-Cx-1zo-i.d.ts → types-BvLo3U4u.d.ts} +1 -1
- package/dist/types-C71Zo6vl.d.ts +6 -0
- package/dist/{types-DEGVXwsk2.d.ts → types-CyPUIpzf.d.ts} +110 -62
- package/dist/{types-Bx-BWveD.d.ts → types-DTYr9pCB.d.ts} +1 -1
- package/dist/{types-BjSly8cp.d.ts → types-DUnFZ08M.d.ts} +1 -1
- package/dist/{types-ESdtnHtg.d.ts → types-zpO4fU6a.d.ts} +3 -4
- package/dist/{urlUtils-D6phjq1-.esm.js → urlUtils-6jsE6rKp.esm.js} +9 -1
- package/dist/video-selfie.d.ts +6 -9
- package/dist/video-selfie.esm.js +1386 -1344
- package/dist/{videoSelfieCameraWarmer-q9ZjvXu9.esm.js → videoSelfieCameraWarmer-C366RKqu.esm.js} +11 -11
- package/dist/{videoSelfieFlowModuleMachine-BUe2uACW.esm.js → videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js} +1 -1
- package/dist/{videoSelfieStepDetector-ChYgFM15.d.ts → videoSelfieStepDetector-C5QHOvWb.d.ts} +4 -4
- package/dist/videoTrimByCopy-BFfAiNpv.esm.js +15901 -0
- package/dist/{warmup-Cis2p6O0.d.ts → warmup-BUPPRAA1.d.ts} +7 -0
- package/dist/{warmup-ChDwHSel.esm.js → warmup-DMtbyb2l.esm.js} +27 -9
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +4 -4
- package/dist/{wasmDsFlagSync-DYrLUEII.esm.js → wasmDsFlagSync-BXCGqP48.esm.js} +1 -1
- package/dist/{wasmWebClient-B7baE-Wf.esm.js → wasmWebClient-kbYZ2sxw.esm.js} +259 -20
- package/dist/watchlist-for-business.d.ts +1 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-CsnJnG-C.d.ts → watchlistForBusinessManager-B3GDPZrr.d.ts} +2 -2
- package/dist/{watchlistForBusinessManager-CIMkpEhu.esm.js → watchlistForBusinessManager-BvF4jK3S.esm.js} +7 -5
- package/dist/{watchlistForBusinessStateMachine-CJ-MvUre.esm.js → watchlistForBusinessStateMachine-121XK-Et.esm.js} +3 -3
- package/dist/{watchlistManager-CixcLNDT.esm.js → watchlistManager-CNWEOYSq.esm.js} +3 -3
- package/dist/{watchlistManager-DLXef90v.d.ts → watchlistManager-DJQOd8Pw.d.ts} +2 -2
- package/dist/{watchlistStateMachine-CBqk2w-h.esm.js → watchlistStateMachine-Dgfm42w2.esm.js} +3 -3
- package/dist/workflow.d.ts +34 -5
- package/dist/workflow.esm.js +64 -46
- package/dist/{xstate-actors.esm-BXeQ-Ucz.esm.js → xstate-actors.esm-8Gzepa_A.esm.js} +1 -1
- package/dist/{xstate.esm-BuFLFuzz.esm.js → xstate.esm-DSajW7CJ.esm.js} +24 -10
- package/package.json +13 -5
- package/dist/Actor-iTq7YY48.d.ts +0 -1
- package/dist/StateMachine-EDpYWy0i.d.ts +0 -6
- package/dist/fiscalQrManager-DbCVMIBx.esm.js +0 -34143
- package/dist/index-B8weJxmL.d.ts +0 -1
- package/dist/selfieErrorUtils-UiQ46EBa.esm.js +0 -116
- package/dist/selfieStateMachine-DY7vJVNY.esm.js +0 -71
- package/dist/types-BN5RPPIZ.esm.js +0 -34
- package/dist/types-Bt9RuRqt.d.ts +0 -6
- package/dist/virtualCameraCheck-Cjab7FTI.esm.js +0 -48
- /package/dist/{types-BSBzhHRH.d.ts → types-BSBzhHRH2.d.ts} +0 -0
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CAgFE-k3.esm.js";
|
|
2
|
+
import { u as BrowserStorageProvider } from "./setup-C38QkrSP.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
|
-
import { s as createActor, u as createManager } from "./xstate.esm-
|
|
5
|
-
import {
|
|
4
|
+
import { i as assign, s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
5
|
+
import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
6
|
+
import { t as splitTrackedName } from "./splitTrackedName-3zJRd2RD.esm.js";
|
|
7
|
+
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-BXCGqP48.esm.js";
|
|
6
8
|
import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
9
|
+
import { c as resetWasmMotionPrimedForModule, o as requiresMotionPermissionUserGesture, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-d2UW0r_L.esm.js";
|
|
10
|
+
import { t as getDeviceClass } from "./getDeviceClass-bsWdEDxP.esm.js";
|
|
11
|
+
import { _ as mapDeviceWalletScreenName, c as createIdCaptureOnlyDeliveryActor, d as captureOnlyNeedsBack, f as hasOnCaptureCallback, g as BrowserDigitalCredentialsProvider, l as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, p as pickIdCaptureOnlyConfig, s as attachIdProtectedCaptureController, t as idCaptureMachine, u as findIdProtectedCaptureController } from "./idCaptureStateMachine-PJt0yzom.esm.js";
|
|
12
|
+
import { _ as ID_ERROR_CODES, b as resolveIdCaptureThresholds, v as resolveCaptureOptimizingTreatment, y as resolveCountdownStepMs } from "./idCaptureServices-DJ33k3-p.esm.js";
|
|
13
|
+
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-BW7V3vub.esm.js";
|
|
10
14
|
//#region src/modules/id/digitalUpload/instrumentation.ts
|
|
11
15
|
const TERMINAL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
|
|
12
16
|
function isHoldingState(value) {
|
|
@@ -41,23 +45,6 @@ function mapDigitalIdScreenName(value, failReason) {
|
|
|
41
45
|
return "uploadDigitalid.review.default";
|
|
42
46
|
}
|
|
43
47
|
//#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
48
|
//#region src/modules/digital-id-redirect/instrumentation.ts
|
|
62
49
|
/**
|
|
63
50
|
* Maps a digital-ID web-redirect (Trinsic iDIN/FTN) child-machine snapshot value
|
|
@@ -86,67 +73,6 @@ function mapDigitalIdRedirectScreenName(value) {
|
|
|
86
73
|
}
|
|
87
74
|
}
|
|
88
75
|
//#endregion
|
|
89
|
-
//#region src/modules/id/manualUpload/instrumentation.ts
|
|
90
|
-
/**
|
|
91
|
-
* Maps an ID Manual Upload child-machine snapshot to the exact Figma
|
|
92
|
-
* "Tracked Events" screen name. Source: ID Manual Upload Figma file
|
|
93
|
-
* (`https://www.figma.com/design/WCx6d4zXG5nu946mu0KZNO/ID-Manual-Upload---Latest-Design?node-id=2462-18986`).
|
|
94
|
-
*
|
|
95
|
-
* Family is `IDmanual.*` — emitted cross-family under the parent
|
|
96
|
-
* `idCapture` module token (same precedent as `uploadDigitalid.*` from
|
|
97
|
-
* the digital-upload sub-flow). Manual upload has no standalone manager
|
|
98
|
-
* or module token of its own.
|
|
99
|
-
*
|
|
100
|
-
* The mapper returns Figma-verbatim strings (e.g.
|
|
101
|
-
* `'IDmanual.upload.uploadedFrontandBack'`) which the adapter emits as-is
|
|
102
|
-
* on `event.screen`. See `docs/patterns/INSTRUMENTATION.md`.
|
|
103
|
-
*
|
|
104
|
-
* In-scope Figma screens (driven from child SM state + context):
|
|
105
|
-
*
|
|
106
|
-
* - `IDmanual.upload.default` — selecting, ID tab, no front file yet
|
|
107
|
-
* - `IDmanual.upload.uploadedFront` — selecting, ID tab, front uploaded,
|
|
108
|
-
* back still needed
|
|
109
|
-
* - `IDmanual.upload.uploadedFrontandBack` — selecting, ID tab, both
|
|
110
|
-
* sides uploaded (or `onlyFront`/`skipBackFromServer` short-circuit)
|
|
111
|
-
* - `IDmanual.upload.passport` — selecting, passport tab, no file
|
|
112
|
-
* - `IDmanual.upload.uploadedPassport` — selecting, passport tab,
|
|
113
|
-
* passport uploaded
|
|
114
|
-
* - `IDmanual.error.document` — selecting, with a populated
|
|
115
|
-
* `errorMessage`
|
|
116
|
-
*
|
|
117
|
-
* Figma screens intentionally NOT mapped here (parent-level surfaces or
|
|
118
|
-
* shared with other families):
|
|
119
|
-
*
|
|
120
|
-
* - `IDmanual.documentchooser.default` / `IDmanual.howtoverify` —
|
|
121
|
-
* the chooser and the "how to verify" tutorial are PARENT-LEVEL
|
|
122
|
-
* `idCapture` surfaces (one shared React component, fired BEFORE the
|
|
123
|
-
* user picks manual-vs-digital). The Upload Digital ID canvas
|
|
124
|
-
* describes the same physical pixels under its own family name.
|
|
125
|
-
* Decision (Option A, recorded in `.cursor/commands/sync-events.md`):
|
|
126
|
-
* keep emitting the neutral parent names `idCapture.documentchooser`
|
|
127
|
-
* and `idCapture.tutorial.{front,back,passport}` and treat the
|
|
128
|
-
* per-canvas Figma names as design-side aliases. Per-flow attribution
|
|
129
|
-
* would require a `selectedDocumentType`-aware override at the parent
|
|
130
|
-
* dispatcher — explicitly NOT shipped here.
|
|
131
|
-
* - `digitalID.success.default` — appears on the canvas for reference,
|
|
132
|
-
* but the actual success surface is emitted by `mapDigitalIdScreenName`
|
|
133
|
-
* as `uploadDigitalid.success.default`. Manual upload has no dedicated
|
|
134
|
-
* success screen; `finished` returns control to the parent SM.
|
|
135
|
-
*
|
|
136
|
-
* Returns `undefined` for transient (`uploadingFront`/`uploadingBack`/
|
|
137
|
-
* `uploadingPassport`/`checkRetries`) and terminal (`retriesExhausted`/
|
|
138
|
-
* `exhausted`/`finished`) states — the parent dispatcher falls back to
|
|
139
|
-
* its existing default (`idCapture.manualIdUpload`) for those beats.
|
|
140
|
-
*/
|
|
141
|
-
function mapIdManualUploadScreenName(value, context) {
|
|
142
|
-
if (value !== "selecting" || context === void 0) return;
|
|
143
|
-
if (context.errorMessage !== null) return "IDmanual.error.document";
|
|
144
|
-
if (context.activeTab === "passport") return context.passportUploaded ? "IDmanual.upload.uploadedPassport" : "IDmanual.upload.passport";
|
|
145
|
-
if (!context.frontUploaded) return "IDmanual.upload.default";
|
|
146
|
-
if (context.backUploaded || context.skipBackFromServer || context.onlyFront) return "IDmanual.upload.uploadedFrontandBack";
|
|
147
|
-
return "IDmanual.upload.uploadedFront";
|
|
148
|
-
}
|
|
149
|
-
//#endregion
|
|
150
76
|
//#region src/internal/idCapture/idCaptureManagerFactory.ts
|
|
151
77
|
function getPermissionStatus(snapshot) {
|
|
152
78
|
if (!snapshot.matches("permissions")) return;
|
|
@@ -160,7 +86,7 @@ function getPermissionStatus(snapshot) {
|
|
|
160
86
|
function getCaptureStatus(snapshot) {
|
|
161
87
|
const matches = {
|
|
162
88
|
initializing: snapshot.matches({ capture: "initializing" }),
|
|
163
|
-
detecting: snapshot.matches({ capture: "detecting" }) || snapshot.matches({ capture: "choosingDetectionStrategy" }) || snapshot.matches({ capture: { detectingWithOptimization: "searching" } }),
|
|
89
|
+
detecting: snapshot.matches({ capture: "detecting" }) || snapshot.matches({ capture: "help" }) || snapshot.matches({ capture: "choosingDetectionStrategy" }) || snapshot.matches({ capture: { detectingWithOptimization: "searching" } }),
|
|
164
90
|
manualCaptureWaiting: snapshot.matches({ capture: "manualCaptureWaiting" }),
|
|
165
91
|
capturing: snapshot.matches({ capture: "capturing" }),
|
|
166
92
|
capturingManual: snapshot.matches({ capture: "capturingManual" }),
|
|
@@ -223,7 +149,7 @@ function getErrorTitleKey(errorCode, currentMode) {
|
|
|
223
149
|
function getErrorSubtitleKey(errorCode, uploadResponse, currentMode) {
|
|
224
150
|
if (!errorCode) return void 0;
|
|
225
151
|
const isPassport = currentMode === "passport";
|
|
226
|
-
if (errorCode === "WRONG_DOCUMENT_SIDE") return
|
|
152
|
+
if (errorCode === "WRONG_DOCUMENT_SIDE") return currentMode === "back" ? "idv2.capture.processing.errors.wrongSide.back.subtitle" : "idv2.capture.processing.errors.wrongSide.front.subtitle";
|
|
227
153
|
if (errorCode === "CLASSIFICATION_FAILED") return isPassport ? "idv2.capture.processing.errors.classification.subtitlePassport" : "idv2.capture.processing.errors.classification.subtitle";
|
|
228
154
|
return {
|
|
229
155
|
UPLOAD_ERROR: "idv2.capture.processing.errors.upload.subtitle",
|
|
@@ -245,6 +171,7 @@ function getErrorSubtitleKey(errorCode, uploadResponse, currentMode) {
|
|
|
245
171
|
}
|
|
246
172
|
function shouldCaptureBack(context) {
|
|
247
173
|
if (context.isDigitalUpload) return false;
|
|
174
|
+
if (hasOnCaptureCallback(context.config)) return captureOnlyNeedsBack(context);
|
|
248
175
|
if (!(context.currentMode === "front" || context.currentMode === "passport")) return false;
|
|
249
176
|
if (context.config.onlyBack) return false;
|
|
250
177
|
if (context.config.usSmartCapture && context.currentMode === "front") return false;
|
|
@@ -283,7 +210,7 @@ function mapCaptureState(snapshot, context, presentationStream) {
|
|
|
283
210
|
status: "capture",
|
|
284
211
|
captureStatus,
|
|
285
212
|
stream: presentationStream,
|
|
286
|
-
usingBackCamera: context.usingBackCamera ??
|
|
213
|
+
usingBackCamera: context.usingBackCamera ?? getDeviceClass() !== "desktop",
|
|
287
214
|
detectionStatus: context.detectionStatus,
|
|
288
215
|
attemptsRemaining: context.attemptsRemaining,
|
|
289
216
|
uploadError,
|
|
@@ -291,6 +218,7 @@ function mapCaptureState(snapshot, context, presentationStream) {
|
|
|
291
218
|
selectedDocumentType: getEffectiveSelectedDocumentType(context),
|
|
292
219
|
tutorialEnabled: context.config.showTutorial === true,
|
|
293
220
|
counterValue: context.counterValue,
|
|
221
|
+
countdownStepMs: resolveCountdownStepMs(context.config),
|
|
294
222
|
orientation: context.orientation,
|
|
295
223
|
idType: context.idType,
|
|
296
224
|
previewImageUrl: context.previewImageUrl,
|
|
@@ -316,7 +244,8 @@ function mapPermissionsState(snapshot, context) {
|
|
|
316
244
|
permissionStatus: getPermissionStatus(snapshot) ?? "idle",
|
|
317
245
|
selectedDocumentType: getEffectiveSelectedDocumentType(context),
|
|
318
246
|
currentMode: context.currentMode,
|
|
319
|
-
tutorialEnabled: context.config.showTutorial === true
|
|
247
|
+
tutorialEnabled: context.config.showTutorial === true,
|
|
248
|
+
requiresMotionPermissionUserGesture: requiresMotionPermissionUserGesture(context.config.ds)
|
|
320
249
|
};
|
|
321
250
|
}
|
|
322
251
|
function getLoadingPhase(snapshot) {
|
|
@@ -331,12 +260,14 @@ function mapLoadingState(snapshot, phase) {
|
|
|
331
260
|
phase,
|
|
332
261
|
tutorialEnabled: snapshot.context.config.showTutorial === true,
|
|
333
262
|
selectedDocumentType: getEffectiveSelectedDocumentType(snapshot.context),
|
|
334
|
-
currentMode: snapshot.context.currentMode
|
|
263
|
+
currentMode: snapshot.context.currentMode,
|
|
264
|
+
requiresMotionPermissionUserGesture: requiresMotionPermissionUserGesture(snapshot.context.config.ds)
|
|
335
265
|
};
|
|
336
266
|
}
|
|
337
267
|
function getTutorialPhase(snapshot) {
|
|
338
268
|
if (snapshot.matches({ tutorial: "checkingPermission" })) return "checkingPermission";
|
|
339
269
|
if (snapshot.matches({ tutorial: "waitingForPermission" })) return "waitingForPermission";
|
|
270
|
+
if (snapshot.matches({ tutorial: "requestingMotionPermission" })) return "waitingForPermission";
|
|
340
271
|
if (snapshot.matches({ tutorial: { initializingCamera: { userIntent: "clicked" } } })) return "waitingForCamera";
|
|
341
272
|
if (snapshot.matches({ tutorial: "initializingCamera" })) return "initializingCamera";
|
|
342
273
|
return "ready";
|
|
@@ -346,57 +277,8 @@ function mapTutorialState(snapshot, context) {
|
|
|
346
277
|
status: "tutorial",
|
|
347
278
|
phase: getTutorialPhase(snapshot),
|
|
348
279
|
selectedDocumentType: getEffectiveSelectedDocumentType(context),
|
|
349
|
-
currentMode: context.currentMode
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
function mapManualUploadState(snapshot) {
|
|
353
|
-
const { config } = snapshot.context;
|
|
354
|
-
const { showIdTab, showPassportTab } = getManualUploadTabs(config);
|
|
355
|
-
const childSnapshot = snapshot.children["manualIdUpload"]?.getSnapshot();
|
|
356
|
-
const childCtx = childSnapshot?.context;
|
|
357
|
-
const childValue = childSnapshot?.value;
|
|
358
|
-
const phase = childValue === "retriesExhausted" ? "exhausted" : childValue === "uploadingFront" || childValue === "uploadingBack" || childValue === "uploadingPassport" ? "uploading" : "selecting";
|
|
359
|
-
const uploadingSide = childValue === "uploadingFront" ? "front" : childValue === "uploadingBack" ? "back" : childValue === "uploadingPassport" ? "passport" : void 0;
|
|
360
|
-
/**
|
|
361
|
-
* Server told us the document doesn't need a back side (e.g. passport-class
|
|
362
|
-
* docs, single-sided IDs). Treat the back slot as uploaded so the UI shows
|
|
363
|
-
* a green check rather than hiding the slot — matches v1's behavior and
|
|
364
|
-
* keeps both slots visible once the front has been processed.
|
|
365
|
-
*/
|
|
366
|
-
const backUploaded = (childCtx?.backUploaded ?? false) || (childCtx?.skipBackFromServer ?? false);
|
|
367
|
-
/**
|
|
368
|
-
* Manual upload is client-authoritative for the back side: the slot must be
|
|
369
|
-
* shown or hidden before any upload round-trip, so there is no
|
|
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.
|
|
374
|
-
*/
|
|
375
|
-
const onlyFront = config.onlyFront === true;
|
|
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;
|
|
381
|
-
return {
|
|
382
|
-
status: "manualUpload",
|
|
383
|
-
phase,
|
|
384
|
-
uploadingSide,
|
|
385
|
-
activeTab: childCtx?.activeTab ?? "id",
|
|
386
|
-
showIdTab,
|
|
387
|
-
showPassportTab,
|
|
388
|
-
showFrontSlot,
|
|
389
|
-
showBackSlot,
|
|
390
|
-
frontFileName: childCtx?.frontFile?.name,
|
|
391
|
-
backFileName: childCtx?.backFile?.name,
|
|
392
|
-
passportFileName: childCtx?.passportFile?.name,
|
|
393
|
-
frontUploaded: childCtx?.frontUploaded ?? false,
|
|
394
|
-
backUploaded,
|
|
395
|
-
passportUploaded: childCtx?.passportUploaded ?? false,
|
|
396
|
-
canContinue,
|
|
397
|
-
retriesLeft: childCtx?.retriesLeft ?? snapshot.context.config.captureAttempts,
|
|
398
|
-
errorKey: childCtx?.errorMessage ?? null,
|
|
399
|
-
errorSide: childCtx?.errorSide ?? null
|
|
280
|
+
currentMode: context.currentMode,
|
|
281
|
+
requiresMotionPermissionUserGesture: requiresMotionPermissionUserGesture(context.config.ds)
|
|
400
282
|
};
|
|
401
283
|
}
|
|
402
284
|
function mapDigitalUploadState(snapshot) {
|
|
@@ -466,7 +348,8 @@ function mapState(snapshot, presentationStream) {
|
|
|
466
348
|
if (loadingPhase) return mapLoadingState(snapshot, loadingPhase);
|
|
467
349
|
if (snapshot.matches("chooser")) return {
|
|
468
350
|
status: "chooser",
|
|
469
|
-
availableDocumentTypes: context.availableDocumentTypes
|
|
351
|
+
availableDocumentTypes: context.availableDocumentTypes,
|
|
352
|
+
digitalIdRedirectOptions: context.digitalIdRedirectOptions
|
|
470
353
|
};
|
|
471
354
|
if (snapshot.matches("loading")) return mapLoadingState(snapshot, "bootstrapping");
|
|
472
355
|
if (snapshot.matches("tutorial")) return mapTutorialState(snapshot, context);
|
|
@@ -509,7 +392,6 @@ function mapState(snapshot, presentationStream) {
|
|
|
509
392
|
status: "error",
|
|
510
393
|
error: context.error ?? "Unknown error"
|
|
511
394
|
};
|
|
512
|
-
if (snapshot.matches("manualIdUpload")) return mapManualUploadState(snapshot);
|
|
513
395
|
if (snapshot.matches("digitalIdUpload")) return mapDigitalUploadState(snapshot);
|
|
514
396
|
if (snapshot.matches("digitalIdRedirect") || snapshot.matches("digitalIdRedirectReturning")) return mapDigitalIdRedirectState(snapshot);
|
|
515
397
|
if (snapshot.matches("deviceWallet") || snapshot.matches("digitalIdRouting")) return mapDeviceWalletState(snapshot);
|
|
@@ -525,11 +407,18 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
|
|
|
525
407
|
resetWasmMotionPrimedForModule();
|
|
526
408
|
actor.send({ type: "LOAD" });
|
|
527
409
|
},
|
|
528
|
-
|
|
410
|
+
/**
|
|
411
|
+
* Picks a chooser option. For `'digitalIdRedirect'`, pass the provider of
|
|
412
|
+
* the card the user tapped (`digitalIdRedirectOptions[].providerId`) so the
|
|
413
|
+
* verification is created for that provider; without it the first
|
|
414
|
+
* configured redirect method is launched (backwards compatible).
|
|
415
|
+
*/
|
|
416
|
+
selectDocument(documentType, options) {
|
|
529
417
|
trackElementClicked?.(`selectDocument.${documentType}`);
|
|
530
418
|
actor.send({
|
|
531
419
|
type: "SELECT_DOCUMENT",
|
|
532
|
-
documentType
|
|
420
|
+
documentType,
|
|
421
|
+
providerId: options?.providerId
|
|
533
422
|
});
|
|
534
423
|
},
|
|
535
424
|
async nextStep() {
|
|
@@ -545,6 +434,15 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
|
|
|
545
434
|
actor.send({ type: "NEXT_STEP" });
|
|
546
435
|
},
|
|
547
436
|
/**
|
|
437
|
+
* Continues from Tutorial into permission orchestration. When iOS requires
|
|
438
|
+
* a user gesture for Deepsight motion, the motion-only request starts from
|
|
439
|
+
* this event; otherwise Core proceeds to its existing permission state.
|
|
440
|
+
*/
|
|
441
|
+
continueToPermission() {
|
|
442
|
+
trackElementClicked?.("nextStep");
|
|
443
|
+
actor.send({ type: "CONTINUE_TO_PERMISSION" });
|
|
444
|
+
},
|
|
445
|
+
/**
|
|
548
446
|
* Requests camera (and, when deepsight is enabled, motion) permission.
|
|
549
447
|
* Effective in `permissions.idle`, `permissions.waitingForUser`,
|
|
550
448
|
* `permissions.motionOnly`, `permissions.learnMore`, `tutorial.ready`,
|
|
@@ -552,8 +450,8 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
|
|
|
552
450
|
* the camera pre-warms it records the user's intent to continue, so the
|
|
553
451
|
* tutorial advances to capture as soon as the warm-up finishes).
|
|
554
452
|
*/
|
|
555
|
-
requestPermission() {
|
|
556
|
-
trackElementClicked?.("requestPermission");
|
|
453
|
+
requestPermission(options) {
|
|
454
|
+
if (options?.trigger !== "automatic") trackElementClicked?.("requestPermission");
|
|
557
455
|
actor.send({ type: "REQUEST_PERMISSION" });
|
|
558
456
|
},
|
|
559
457
|
goToLearnMore() {
|
|
@@ -591,6 +489,18 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
|
|
|
591
489
|
trackElementClicked?.("switchToManualCapture");
|
|
592
490
|
actor.send({ type: "SWITCH_TO_MANUAL_CAPTURE" });
|
|
593
491
|
},
|
|
492
|
+
switchToAutoCapture() {
|
|
493
|
+
trackElementClicked?.("secondaryCTA.takePhotoAutomatically");
|
|
494
|
+
actor.send({ type: "SWITCH_TO_AUTO_CAPTURE" });
|
|
495
|
+
},
|
|
496
|
+
/** Pauses live detection; returns false when capture can no longer enter Help. */
|
|
497
|
+
openHelp() {
|
|
498
|
+
actor.send({ type: "OPEN_HELP" });
|
|
499
|
+
return actor.getSnapshot().matches({ capture: "help" });
|
|
500
|
+
},
|
|
501
|
+
closeHelp() {
|
|
502
|
+
actor.send({ type: "CLOSE_HELP" });
|
|
503
|
+
},
|
|
594
504
|
continueToBack() {
|
|
595
505
|
trackElementClicked?.("continueToBack");
|
|
596
506
|
actor.send({ type: "CONTINUE_TO_BACK" });
|
|
@@ -621,35 +531,6 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
|
|
|
621
531
|
detectionArea
|
|
622
532
|
});
|
|
623
533
|
},
|
|
624
|
-
/**
|
|
625
|
-
* Manual upload: tab change (ID / Passport). Resets per-tab file selections.
|
|
626
|
-
* Note: there is intentionally no `switchToManualUpload` method — entry to
|
|
627
|
-
* the manual-upload flow is gated by config + Chooser to prevent a
|
|
628
|
-
* dev-console bypass of live camera capture.
|
|
629
|
-
*/
|
|
630
|
-
manualUploadChangeTab(tab) {
|
|
631
|
-
trackElementClicked?.(`manualUpload.tab.${tab}`);
|
|
632
|
-
actor.send({
|
|
633
|
-
type: "MANUAL_UPLOAD_TAB_CHANGED",
|
|
634
|
-
tab
|
|
635
|
-
});
|
|
636
|
-
},
|
|
637
|
-
manualUploadSelectFile(side, file) {
|
|
638
|
-
trackElementClicked?.(`manualUpload.select.${side}`);
|
|
639
|
-
actor.send({
|
|
640
|
-
type: "MANUAL_UPLOAD_FILE_SELECTED",
|
|
641
|
-
side,
|
|
642
|
-
file
|
|
643
|
-
});
|
|
644
|
-
},
|
|
645
|
-
manualUploadContinue() {
|
|
646
|
-
trackElementClicked?.("manualUpload.continue");
|
|
647
|
-
actor.send({ type: "MANUAL_UPLOAD_CONTINUE" });
|
|
648
|
-
},
|
|
649
|
-
manualUploadReset() {
|
|
650
|
-
trackElementClicked?.("manualUpload.reset");
|
|
651
|
-
actor.send({ type: "MANUAL_UPLOAD_RESET" });
|
|
652
|
-
},
|
|
653
534
|
digitalUploadNextStep() {
|
|
654
535
|
trackElementClicked?.("digitalUpload.nextStep");
|
|
655
536
|
actor.send({ type: "DIGITAL_UPLOAD_NEXT_STEP" });
|
|
@@ -742,8 +623,7 @@ function getCaptureLiveCueScreen(screens, detectionStatus) {
|
|
|
742
623
|
switch (detectionStatus) {
|
|
743
624
|
case "wrongSide": return `${screens.capturePrefix}.livecue-${screens.liveCueSide}`;
|
|
744
625
|
case "blur": return `${screens.capturePrefix}.livecue-blur`;
|
|
745
|
-
case "farAway":
|
|
746
|
-
case "idNotDetected": return `${screens.capturePrefix}.livecue-align`;
|
|
626
|
+
case "farAway": return `${screens.capturePrefix}.livecue-align`;
|
|
747
627
|
case "glare": return `${screens.capturePrefix}.livecue-glare`;
|
|
748
628
|
case "offline": return `${screens.capturePrefix}.livecue-dark`;
|
|
749
629
|
case "manualCapture": return `${screens.capturePrefix}.manual`;
|
|
@@ -753,17 +633,17 @@ function getCaptureLiveCueScreen(screens, detectionStatus) {
|
|
|
753
633
|
}
|
|
754
634
|
function getCaptureErrorScreen(screens, errorCode) {
|
|
755
635
|
switch (errorCode) {
|
|
756
|
-
case "WRONG_DOCUMENT_SIDE": return `${screens.errorPrefix}.
|
|
636
|
+
case "WRONG_DOCUMENT_SIDE": return `${screens.errorPrefix}.wrongSide`;
|
|
757
637
|
case "GLARE_DETECTED": return `${screens.errorPrefix}.glare`;
|
|
758
638
|
case "LOW_SHARPNESS": return `${screens.errorPrefix}.blur`;
|
|
759
|
-
case "READABILITY_ISSUE": return `${screens.errorPrefix}.
|
|
639
|
+
case "READABILITY_ISSUE": return `${screens.errorPrefix}.notReadable`;
|
|
760
640
|
case "ID_TYPE_UNACCEPTABLE":
|
|
761
|
-
case "CLASSIFICATION_FAILED": return `${screens.errorPrefix}.
|
|
641
|
+
case "CLASSIFICATION_FAILED": return `${screens.errorPrefix}.notAccepted`;
|
|
762
642
|
case "RETRY_EXHAUSTED_CONTINUE_TO_BACK":
|
|
763
643
|
case "RETRY_EXHAUSTED_SKIP_BACK":
|
|
764
644
|
case "NO_MORE_TRIES": return `${screens.errorPrefix}.failedExhausted`;
|
|
765
645
|
case "NO_TOKEN":
|
|
766
|
-
case "SERVER_ERROR": return `${screens.errorPrefix}.
|
|
646
|
+
case "SERVER_ERROR": return `${screens.errorPrefix}.noConnection`;
|
|
767
647
|
default: return `${screens.errorPrefix}.failed`;
|
|
768
648
|
}
|
|
769
649
|
}
|
|
@@ -781,10 +661,12 @@ function getCaptureSubstateScreen(snapshot, screens) {
|
|
|
781
661
|
case "checkingStream":
|
|
782
662
|
case "initializing":
|
|
783
663
|
case "initializingDeepsight": return "idCapture.loader.preparingcamera";
|
|
784
|
-
case "detecting":
|
|
664
|
+
case "detecting":
|
|
665
|
+
case "help": return getCaptureLiveCueScreen(screens, context.detectionStatus);
|
|
785
666
|
case "manualCaptureWaiting": return `${screens.capturePrefix}.manual`;
|
|
786
667
|
case "capturing": return `${screens.capturePrefix}.takingphoto`;
|
|
787
668
|
case "capturingManual": return `${screens.capturePrefix}.manual`;
|
|
669
|
+
case "submittingBarcode":
|
|
788
670
|
case "uploading":
|
|
789
671
|
case "uploadCompleted":
|
|
790
672
|
case "validatingUpload": return `${screens.analyzingPrefix}.uploading`;
|
|
@@ -794,6 +676,7 @@ function getCaptureSubstateScreen(snapshot, screens) {
|
|
|
794
676
|
if (typeof captureValue === "object" && captureValue !== null) {
|
|
795
677
|
const substates = Object.keys(captureValue);
|
|
796
678
|
if (substates.includes("checkingStream") || substates.includes("initializing") || substates.includes("initializingDeepsight")) return "idCapture.loader.preparingcamera";
|
|
679
|
+
if (substates.includes("detectingWithOptimization")) return captureValue.detectingWithOptimization === "searching" ? getCaptureLiveCueScreen(screens, context.detectionStatus) : `${screens.capturePrefix}.default`;
|
|
797
680
|
if (substates.includes("detecting")) return getCaptureLiveCueScreen(screens, context.detectionStatus);
|
|
798
681
|
if (substates.includes("manualCaptureWaiting")) return `${screens.capturePrefix}.manual`;
|
|
799
682
|
if (substates.includes("capturing")) return `${screens.capturePrefix}.takingphoto`;
|
|
@@ -814,7 +697,7 @@ function getPermissionScreen(value) {
|
|
|
814
697
|
default: return "idCapture.permissions.default";
|
|
815
698
|
}
|
|
816
699
|
}
|
|
817
|
-
function
|
|
700
|
+
function getIdCaptureTrackedName(snapshot) {
|
|
818
701
|
const { value, context } = snapshot;
|
|
819
702
|
if (value === void 0 || value === null) return void 0;
|
|
820
703
|
const topLevel = topLevelStateName(value);
|
|
@@ -826,7 +709,7 @@ function getIdCaptureScreenName(snapshot) {
|
|
|
826
709
|
case "chooser": return "idCapture.documentchooser";
|
|
827
710
|
case "loading": return "idCapture.loader.default";
|
|
828
711
|
case "tutorial": return screens.tutorial;
|
|
829
|
-
case "ageVerification": return "idCapture.tutorial.
|
|
712
|
+
case "ageVerification": return "idCapture.tutorial.ageVerification";
|
|
830
713
|
case "permissions": return getPermissionScreen(value);
|
|
831
714
|
case "capture": return getCaptureSubstateScreen(snapshot, screens);
|
|
832
715
|
case "mandatoryConsent": return "idCapture.mandatoryConsent";
|
|
@@ -843,11 +726,6 @@ function getIdCaptureScreenName(snapshot) {
|
|
|
843
726
|
const childContext = child?.context;
|
|
844
727
|
return mapDigitalIdScreenName(child?.value, childContext?.failReason ?? null);
|
|
845
728
|
}
|
|
846
|
-
case "manualIdUpload": {
|
|
847
|
-
const child = snapshot.children["manualIdUpload"]?.getSnapshot();
|
|
848
|
-
const childContext = child?.context;
|
|
849
|
-
return mapIdManualUploadScreenName(child?.value, childContext) ?? "idCapture.manualIdUpload";
|
|
850
|
-
}
|
|
851
729
|
case "digitalIdRedirect":
|
|
852
730
|
case "digitalIdRedirectReturning": {
|
|
853
731
|
const child = snapshot.children["digitalIdRedirect"]?.getSnapshot();
|
|
@@ -862,8 +740,13 @@ function getIdCaptureScreenName(snapshot) {
|
|
|
862
740
|
default: return `idCapture.${topLevel}`;
|
|
863
741
|
}
|
|
864
742
|
}
|
|
865
|
-
function
|
|
866
|
-
|
|
743
|
+
function getIdCaptureScreenName(snapshot) {
|
|
744
|
+
const name = getIdCaptureTrackedName(snapshot);
|
|
745
|
+
return name?.startsWith("idCapture.") ? splitTrackedName(name).screen : name;
|
|
746
|
+
}
|
|
747
|
+
function getIdCaptureStateName(snapshot) {
|
|
748
|
+
const name = getIdCaptureTrackedName(snapshot);
|
|
749
|
+
return name?.startsWith("idCapture.") ? splitTrackedName(name).state : void 0;
|
|
867
750
|
}
|
|
868
751
|
/**
|
|
869
752
|
* Figma-aligned, machine-stable reason token per upload error code. Mirrors the
|
|
@@ -961,8 +844,10 @@ function createIdCaptureManagerFromActor(actor, visibilityObserver = new Browser
|
|
|
961
844
|
actor,
|
|
962
845
|
mapState: (snapshot) => mapState(snapshot, protectedCaptureController?.getProjection().stream),
|
|
963
846
|
createApi,
|
|
847
|
+
beforeStop: () => actor.send({ type: "QUIT" }),
|
|
964
848
|
instrumentation: createManagerInstrumentation(eventModuleNames.idCapture, {
|
|
965
|
-
getEventScreenName:
|
|
849
|
+
getEventScreenName: getIdCaptureScreenName,
|
|
850
|
+
getEventStateName: getIdCaptureStateName,
|
|
966
851
|
getErrorName: getIdCaptureErrorName,
|
|
967
852
|
getErrorPayload: getIdCaptureErrorPayload,
|
|
968
853
|
visibilityObserver: {
|
|
@@ -977,20 +862,6 @@ function createIdCaptureManagerFromActor(actor, visibilityObserver = new Browser
|
|
|
977
862
|
});
|
|
978
863
|
}
|
|
979
864
|
//#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
|
|
994
865
|
//#region src/modules/id/idCaptureActor.ts
|
|
995
866
|
function createIdCaptureActor(options) {
|
|
996
867
|
const dependencies = {
|
|
@@ -1012,6 +883,197 @@ function createIdCaptureActor(options) {
|
|
|
1012
883
|
} }).start();
|
|
1013
884
|
}
|
|
1014
885
|
//#endregion
|
|
886
|
+
//#region src/modules/id/idCaptureOnlyStateMachine.ts
|
|
887
|
+
function buildSubImage(canvas) {
|
|
888
|
+
if (!canvas) return void 0;
|
|
889
|
+
canvas.updateBlob();
|
|
890
|
+
const blobData = canvas.getBlobData();
|
|
891
|
+
if (!blobData) return void 0;
|
|
892
|
+
const imageBase64 = canvas.getBase64Image() ?? "";
|
|
893
|
+
if (!imageBase64) return void 0;
|
|
894
|
+
return {
|
|
895
|
+
imageBase64,
|
|
896
|
+
blob: blobData.blob,
|
|
897
|
+
url: blobData.url
|
|
898
|
+
};
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Local finalize for the captureOnly flow. Reads the canvases the base
|
|
902
|
+
* machine's `storeCapturedCanvasInProvider` already prepared:
|
|
903
|
+
* - `originalCanvas` — full unprocessed frame.
|
|
904
|
+
* - `transformedCanvas` — homography-warped crop produced by the WASM
|
|
905
|
+
* `transformPerspective`.
|
|
906
|
+
*
|
|
907
|
+
* Deepsight metadata is best-effort; failure does not block delivery.
|
|
908
|
+
*/
|
|
909
|
+
async function finalizeIdCaptureOnly(input, signal) {
|
|
910
|
+
const originalCanvas = input.canvas;
|
|
911
|
+
if (!originalCanvas) throw new Error(ID_ERROR_CODES.UPLOAD_ERROR);
|
|
912
|
+
const imageData = originalCanvas.getImageData() ?? void 0;
|
|
913
|
+
let metadata = "";
|
|
914
|
+
if (input.deepsightService && imageData) try {
|
|
915
|
+
await input.deepsightService.analyzeFrame(imageData);
|
|
916
|
+
if (signal.aborted) throw new DOMException("Aborted", "AbortError");
|
|
917
|
+
metadata = input.deepsightService.getMetadata();
|
|
918
|
+
} catch (error) {
|
|
919
|
+
if (error?.name === "AbortError") throw error;
|
|
920
|
+
}
|
|
921
|
+
const imageBase64 = originalCanvas.getBase64Image() ?? "";
|
|
922
|
+
originalCanvas.updateBlob();
|
|
923
|
+
const blobData = originalCanvas.getBlobData();
|
|
924
|
+
if (!blobData) throw new Error(ID_ERROR_CODES.UPLOAD_ERROR);
|
|
925
|
+
return {
|
|
926
|
+
imageBase64,
|
|
927
|
+
blob: blobData.blob,
|
|
928
|
+
url: blobData.url,
|
|
929
|
+
metadata,
|
|
930
|
+
croppedImage: buildSubImage(input.croppedCanvas ?? null)
|
|
931
|
+
};
|
|
932
|
+
}
|
|
933
|
+
/**
|
|
934
|
+
* ID capture state machine variant for the captureOnly flow. Shares the full
|
|
935
|
+
* base ID-capture state tree (chooser, tutorial, permissions, capture,
|
|
936
|
+
* front/back finished, processing, finished); only the upload, process, and
|
|
937
|
+
* recording steps are local instead of remote.
|
|
938
|
+
*/
|
|
939
|
+
const idCaptureOnlyMachine = idCaptureMachine.provide({
|
|
940
|
+
actors: {
|
|
941
|
+
/** No backend processing in captureOnly. */
|
|
942
|
+
processId: fromPromise(async () => ({ isDocumentExpired: false })) },
|
|
943
|
+
actions: {
|
|
944
|
+
attachProtectedController: assign(({ self }) => {
|
|
945
|
+
attachIdProtectedCaptureController(self, createIdProtectedCaptureController({ finalizeCaptureOnly: finalizeIdCaptureOnly }));
|
|
946
|
+
return {};
|
|
947
|
+
}),
|
|
948
|
+
/**
|
|
949
|
+
* Routes the rich payload from local delivery into `captureOnlyImages`
|
|
950
|
+
* keyed by side instead of the regular `capturedImages` slot.
|
|
951
|
+
*/
|
|
952
|
+
storeCapturedImage: assign(({ context, event }) => {
|
|
953
|
+
if (!("output" in event) || !context.currentMode) return { captureOnlyImages: context.captureOnlyImages };
|
|
954
|
+
const image = event.output;
|
|
955
|
+
const side = context.currentMode === "back" ? "back" : "front";
|
|
956
|
+
return {
|
|
957
|
+
captureOnlyImages: {
|
|
958
|
+
...context.captureOnlyImages,
|
|
959
|
+
[side]: image
|
|
960
|
+
},
|
|
961
|
+
previewImageUrl: image.croppedImage?.url ?? image.url ?? context.previewImageUrl
|
|
962
|
+
};
|
|
963
|
+
})
|
|
964
|
+
},
|
|
965
|
+
guards: {
|
|
966
|
+
hasUploadValidationError: () => false,
|
|
967
|
+
/** No backend answer in captureOnly: the SDK config decides. */
|
|
968
|
+
shouldContinueToBack: ({ context }) => captureOnlyNeedsBack(context)
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
function provideIdCaptureOnlyController(controller) {
|
|
972
|
+
return provideIdProtectedCaptureController(idCaptureOnlyMachine, controller).provide({ actors: { captureOnlyDelivery: createIdCaptureOnlyDeliveryActor(controller) } });
|
|
973
|
+
}
|
|
974
|
+
//#endregion
|
|
975
|
+
//#region src/modules/id/idCaptureOnlyActor.ts
|
|
976
|
+
/**
|
|
977
|
+
* Defaults the capture-only flow applies for every {@link IdCaptureConfig}
|
|
978
|
+
* option the integrator doesn't set. Capture-only doesn't talk to a backend, so
|
|
979
|
+
* the upload/processing-oriented flags (device wallet, barcode, extra pages,
|
|
980
|
+
* smart capture, …) all default off; both document types are accepted. The
|
|
981
|
+
* integrator overrides only what they care about — `onCapture` is the one field
|
|
982
|
+
* they must supply.
|
|
983
|
+
*/
|
|
984
|
+
const DEFAULT_ID_CAPTURE_ONLY_CONFIG = {
|
|
985
|
+
showTutorial: true,
|
|
986
|
+
captureAttempts: 3,
|
|
987
|
+
isDeepsightEnabled: false,
|
|
988
|
+
enableId: true,
|
|
989
|
+
enablePassport: true,
|
|
990
|
+
deviceWallet: false,
|
|
991
|
+
onlyFront: false,
|
|
992
|
+
onlyBack: false,
|
|
993
|
+
barcodeCapture: false,
|
|
994
|
+
fetchAdditionalPage: false,
|
|
995
|
+
secondId: false,
|
|
996
|
+
thirdId: false,
|
|
997
|
+
autoCaptureTimeout: 5,
|
|
998
|
+
deviceIdleTimeout: 10,
|
|
999
|
+
digitalIdsUpload: false,
|
|
1000
|
+
showDocumentChooserScreen: false,
|
|
1001
|
+
enableIdRecording: false,
|
|
1002
|
+
usSmartCapture: false,
|
|
1003
|
+
perCountryPerDocOverrides: {}
|
|
1004
|
+
};
|
|
1005
|
+
function createIdCaptureOnlyActor(options) {
|
|
1006
|
+
const mergedConfig = {
|
|
1007
|
+
...DEFAULT_ID_CAPTURE_ONLY_CONFIG,
|
|
1008
|
+
...options.config
|
|
1009
|
+
};
|
|
1010
|
+
const config = {
|
|
1011
|
+
...mergedConfig,
|
|
1012
|
+
thresholds: resolveIdCaptureThresholds(mergedConfig)
|
|
1013
|
+
};
|
|
1014
|
+
return createActor(provideIdCaptureOnlyController(createIdProtectedCaptureController({ finalizeCaptureOnly: finalizeIdCaptureOnly })), { input: {
|
|
1015
|
+
config,
|
|
1016
|
+
dependencies: options.dependencies
|
|
1017
|
+
} }).start();
|
|
1018
|
+
}
|
|
1019
|
+
//#endregion
|
|
1020
|
+
//#region src/modules/id/idCaptureOnlyManager.ts
|
|
1021
|
+
/** A back-only capture (`onlyBack`) has no front image (ENG-58695). */
|
|
1022
|
+
function buildCaptureOnlyResponse({ front, back }) {
|
|
1023
|
+
if (front) return {
|
|
1024
|
+
frontImage: front,
|
|
1025
|
+
backImage: back
|
|
1026
|
+
};
|
|
1027
|
+
if (back) return {
|
|
1028
|
+
frontImage: void 0,
|
|
1029
|
+
backImage: back
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
/**
|
|
1033
|
+
* Wraps an ID captureOnly actor with a manager that fires `onCapture` exactly
|
|
1034
|
+
* once when the actor reaches the `finished` final state. `complete` fires
|
|
1035
|
+
* for both `finished` and `closed` — gating on `finished` prevents a
|
|
1036
|
+
* user-quit mid-capture from delivering a partial payload.
|
|
1037
|
+
*/
|
|
1038
|
+
function attachOnCaptureFiring(actor, config) {
|
|
1039
|
+
const subscription = actor.subscribe({ complete: () => {
|
|
1040
|
+
const snapshot = actor.getSnapshot();
|
|
1041
|
+
if (!snapshot.matches("finished")) return;
|
|
1042
|
+
const response = buildCaptureOnlyResponse(snapshot.context.captureOnlyImages);
|
|
1043
|
+
if (!response) return;
|
|
1044
|
+
invokeOnCaptureCallback(config.onCapture, response, eventModuleNames.id);
|
|
1045
|
+
} });
|
|
1046
|
+
return () => subscription.unsubscribe();
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* `visibilityObserver` is an optional override escape-hatch — first-party
|
|
1050
|
+
* callers omit it and the downstream factory defaults to
|
|
1051
|
+
* `BrowserVisibilityObserverProvider`. Pass a custom or no-op observer to
|
|
1052
|
+
* disable `background`/`foreground` tracking or to run in a non-DOM
|
|
1053
|
+
* environment (e.g. SSR / tests).
|
|
1054
|
+
*/
|
|
1055
|
+
function createIdCaptureOnlyManagerFromActor(actor, config, visibilityObserver) {
|
|
1056
|
+
const unsubscribe = attachOnCaptureFiring(actor, config);
|
|
1057
|
+
const manager = createIdCaptureManagerFromActor(actor, visibilityObserver);
|
|
1058
|
+
return {
|
|
1059
|
+
...manager,
|
|
1060
|
+
stop: () => {
|
|
1061
|
+
unsubscribe();
|
|
1062
|
+
manager.stop();
|
|
1063
|
+
}
|
|
1064
|
+
};
|
|
1065
|
+
}
|
|
1066
|
+
/**
|
|
1067
|
+
* Creates a captureOnly ID capture manager.
|
|
1068
|
+
*
|
|
1069
|
+
* Unlike {@link createIdCaptureManager}, the captured ID image(s) are
|
|
1070
|
+
* delivered locally to the integrator's `onCapture` callback instead of
|
|
1071
|
+
* being uploaded to the Incode backend. `onCapture` is required.
|
|
1072
|
+
*/
|
|
1073
|
+
function createIdCaptureOnlyManager(options) {
|
|
1074
|
+
return createIdCaptureOnlyManagerFromActor(createIdCaptureOnlyActor(options), options.config);
|
|
1075
|
+
}
|
|
1076
|
+
//#endregion
|
|
1015
1077
|
//#region src/modules/id/idCaptureManager.ts
|
|
1016
1078
|
/**
|
|
1017
1079
|
* Creates a manager for the regular ID capture flow. The shared
|
|
@@ -1019,11 +1081,15 @@ function createIdCaptureActor(options) {
|
|
|
1019
1081
|
* `internal/idCapture/idCaptureManagerFactory.ts`; this file is a thin
|
|
1020
1082
|
* wrapper that creates the actor and delegates to the factory.
|
|
1021
1083
|
*
|
|
1022
|
-
*
|
|
1023
|
-
*
|
|
1084
|
+
* A config with an `onCapture` callback runs the captureOnly flow instead
|
|
1085
|
+
* (see `createIdCaptureOnlyManager`): no backend, images go to `onCapture`.
|
|
1024
1086
|
*/
|
|
1025
1087
|
function createIdCaptureManager(options) {
|
|
1088
|
+
if (hasOnCaptureCallback(options.config)) return createIdCaptureOnlyManager({
|
|
1089
|
+
config: pickIdCaptureOnlyConfig(options.config),
|
|
1090
|
+
dependencies: options.dependencies
|
|
1091
|
+
});
|
|
1026
1092
|
return createIdCaptureManagerFromActor(createIdCaptureActor(options));
|
|
1027
1093
|
}
|
|
1028
1094
|
//#endregion
|
|
1029
|
-
export {
|
|
1095
|
+
export { idCaptureOnlyMachine as a, createIdCaptureOnlyActor as i, createIdCaptureOnlyManager as n, createIdCaptureActor as o, createIdCaptureOnlyManagerFromActor as r, createIdCaptureManagerFromActor as s, createIdCaptureManager as t };
|