@incodetech/core 2.4.0 → 2.4.1-agentic.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/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
- package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-DN7NkJzV.esm.js} +7 -744
- package/dist/{FaceDetectionProvider-DcPOC2gS.esm.js → FaceDetectionProvider-CAY43vSI.esm.js} +28 -64
- package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
- package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
- package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-Cqiaxydi.d.ts} +31 -4
- package/dist/MultipartRecordingProvider-D9mauUdS.esm.js +146 -0
- package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
- package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-C3xNfOsv.d.ts} +12 -3
- package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
- package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-Dp2V-Uct.esm.js} +75 -22
- package/dist/WorkerEncoderRecordingProvider-B1ODYtgN.esm.js +80 -0
- package/dist/addressSearch-DzbE9Ogt.esm.js +254 -0
- package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-k-U-cL5m.esm.js} +1 -2
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-BObuHBjn.esm.js} +2 -2
- package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-Dfrd2-26.esm.js} +1 -1
- package/dist/{api-Cz90EHyu.esm.js → api-CpP4PS4S.esm.js} +8 -5
- package/dist/{apiError-DPwFas2f.esm.js → apiError-DH-CH4Nz.esm.js} +1 -1
- package/dist/attemptCarry-WOkfvFMw.esm.js +45 -0
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-CWmh7aSY.d.ts} +1 -1
- package/dist/{authenticationManager-2Lr5V_7p.esm.js → authenticationManager-DjX0XDyH.esm.js} +5 -5
- package/dist/{authenticationStateMachine-C99B0GFP.esm.js → authenticationStateMachine-BMbZL8wm.esm.js} +3 -3
- package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
- package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-DS1oDiUq.esm.js} +12 -107
- package/dist/{browser-DlFgHpoC-DnyrCR8r.esm.js → browser-pQZA35G2-DtkAf6sn.esm.js} +161 -150
- package/dist/{camera-sIa9ceW2.esm.js → camera-E_Kcre4O.esm.js} +15 -23
- package/dist/camera.d.ts +2 -2
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-C1nETQos.esm.js} +2 -2
- package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-DThXMDqr.esm.js} +2 -2
- package/dist/cnpj-Co1ottYN.esm.js +77 -0
- package/dist/connectivity-BCuEoQ-n.esm.js +114 -0
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-DMlSL6Ax.esm.js} +4 -3
- package/dist/{consentManager-Cv_0QKLD.d.ts → consentManager-bjfVXO7p.d.ts} +9 -2
- package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-DIYSMxKQ.esm.js} +20 -7
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-BFTdiEDB.esm.js} +2 -2
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-DNpC3wyf.esm.js} +3 -2
- package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-z8428oCM.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-B3iVsDyt.esm.js} +28 -20
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-CvI-pDT3.esm.js} +2 -2
- package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-BuHtUb0y.esm.js} +2 -2
- package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-CiVD9wyF.esm.js} +1 -1
- package/dist/{deepsightService-CKTYDIXD.esm.js → deepsightLoader-B7DEYoyY.esm.js} +40 -74
- package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-BGMtYwk3.esm.js} +177 -40
- package/dist/device.esm.js +2 -2
- package/dist/document-capture.d.ts +3 -3
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-CD5iQiUI.d.ts} +37 -4
- package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-DLPqruXJ.esm.js} +27 -19
- package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-DCvWQhFG.esm.js} +105 -56
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-9kwY8Bf5.d.ts} +1 -1
- package/dist/{dynamicFormsManager-DiKYjcF3.esm.js → dynamicFormsManager-DfqCEPg9.esm.js} +2 -2
- package/dist/{dynamicFormsStateMachine-DEI45xYW.esm.js → dynamicFormsStateMachine-USQMB-uV.esm.js} +2 -2
- package/dist/ekyb.d.ts +4 -4
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-BLOkwmWO.d.ts} +2 -2
- package/dist/{ekybManager-8WLkNcqg.esm.js → ekybManager-CR8YSYux.esm.js} +2 -2
- package/dist/{ekybStateMachine-BLRT45Ex.esm.js → ekybStateMachine-kHwdz6hm.esm.js} +28 -44
- package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-DlGIn9wA.d.ts} +2 -1
- package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-DymCvmVB.esm.js} +2 -2
- package/dist/ekycStateMachine-CoFCUJ2z.esm.js +7578 -0
- package/dist/ekycUtils-GRuMELYr.esm.js +1472 -0
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-CcIMOb_Y.esm.js → electronicSignatureManager-BCE3uA3z.esm.js} +4 -4
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-ButFktRm.esm.js → emailManager-CGoE3CUe.esm.js} +2 -2
- package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-KgHfDNvM.esm.js} +32 -20
- package/dist/{events-Du2A4-Qr.esm.js → events-ggpBBaZ8.esm.js} +2 -2
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +37 -22
- package/dist/extensibility.esm.js +36 -35
- package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-CQY41QT1.esm.js} +4 -1
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-DV2ULUYS.d.ts} +71 -66
- package/dist/{faceCaptureManagerFactory-BlGvXzXA.esm.js → faceCaptureManagerFactory-Dp90bedH.esm.js} +4 -4
- package/dist/{faceCaptureSetup-TY8RXc2N.esm.js → faceCaptureSetup-ZfiWg0fo.esm.js} +84 -457
- package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-D2xKPjjQ.esm.js} +2 -2
- package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-Z4UDLwAv.d.ts} +16 -7
- package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-CUvwiQi9.esm.js} +40 -27
- package/dist/{feature-management-B5rR10uS.esm.js → feature-management-BbCIA4og.esm.js} +35 -21
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-DgDbEeFZ.esm.js} +2 -2
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-BZeklojR.esm.js} +4 -4
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +10 -10
- package/dist/flow.esm.js +10 -9
- package/dist/{flowCompletionService-BDI5QpfR.esm.js → flowCompletionService-CcCnPs_T.esm.js} +2 -2
- package/dist/{flowServices-roD0oIQL.esm.js → flowServices-Dmnc8Rye.esm.js} +69 -185
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-6e1i9UIR.d.ts} +15 -17
- package/dist/{geolocationManager-DnONzWL5.esm.js → geolocationManager-BJJ3m_I8.esm.js} +6 -8
- package/dist/{geolocationStateMachine-eWy_G4Os.esm.js → geolocationStateMachine-CTI3m4Ie.esm.js} +12 -8
- package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-DoIWuKI8.esm.js} +1 -1
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-CjChjZ3C.esm.js} +2 -2
- package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-AEbn3Afi.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/home.esm.js +1 -1
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-ocr.esm.js +2 -2
- package/dist/id-selfie-flow.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +10 -9
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +3 -16
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-Dszuq9ng.esm.js} +3 -3
- package/dist/{idCaptureManager-BrfYjCm_.esm.js → idCaptureManager-B3oR4RnA.esm.js} +64 -17
- package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-CCA2D1Ah.d.ts} +68 -5
- package/dist/{idCaptureServices-BSj6EH2l.esm.js → idCaptureServices-DK0QboqT.esm.js} +29 -198
- package/dist/{idCaptureStateMachine-dXKBYHQp.esm.js → idCaptureStateMachine-zzar9MPy.esm.js} +914 -536
- package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-BTdHlJ9D.d.ts} +1 -1
- package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-xyEZNOBa.esm.js} +2 -2
- package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-DNKXh4Rn.esm.js} +2 -2
- package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-DdnvYfgN.esm.js} +2 -2
- package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-DtIBCa32.esm.js} +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-CcpovlfD.esm.js} +2 -2
- package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-DxZFWy47.esm.js} +1 -1
- package/dist/{index-CKQ9QBZP.d.ts → index-DC0P2Vzw.d.ts} +1 -1
- package/dist/{index-BKOWUhxG.d.ts → index-DEfwds5y.d.ts} +55 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-BJ0GVHGr.esm.js} +1 -1
- package/dist/kyb-checks.d.ts +3 -0
- package/dist/kyb-checks.esm.js +3 -0
- package/dist/kybChecksManager-CblEL97E.d.ts +95 -0
- package/dist/kybChecksManager-DpGOp4Su.esm.js +89 -0
- package/dist/kybChecksStateMachine-B43NAnv7.esm.js +718 -0
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-B4vCYslr.esm.js} +4 -3
- package/dist/{mandatoryConsentManager-BQ43yndC.d.ts → mandatoryConsentManager-B88Sm5nd.d.ts} +10 -3
- package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-DWslYPA3.esm.js} +20 -7
- package/dist/mediaRecorderOptions-B9-IEVtV.esm.js +70 -0
- package/dist/multipartRecordingService-BTqkHGG9.esm.js +407 -0
- package/dist/nationalIds-B91f_RuB.esm.js +99 -0
- package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-DFV-Ws0a.esm.js} +1 -1
- package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-D190ATGD.esm.js} +11 -9
- package/dist/phone-number.d.ts +7 -1
- package/dist/phone-number.esm.js +15 -2
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/phoneFormat-JJNaWthV.esm.js +75 -0
- package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-6nrJkvkG.d.ts} +5 -0
- package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-Dy5tODCU.esm.js} +3 -3
- package/dist/phoneServices-DJgyOzU2.esm.js +77 -0
- package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-DnlPhnw7.esm.js} +54 -82
- package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
- package/dist/{platform-DkcRc9JV.esm.js → platform-aPh7gTWh.esm.js} +15 -1
- package/dist/processFaceMatch-Bst83HaS.esm.js +21 -0
- package/dist/qe-signature.esm.js +1 -1
- package/dist/recordingService-CTko6Cjn.esm.js +397 -0
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-CgGaT2NP.esm.js} +5 -4
- package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-Dm9ctRCC.d.ts} +3 -1
- package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-CbhN8uVN.esm.js} +65 -26
- package/dist/resolveForm-O7-r79VA.esm.js +351 -0
- package/dist/{runChildModule-BF_atgNx.esm.js → runChildModule-BffFArwl.esm.js} +3 -3
- package/dist/{sdkVersion-CsIbltJF.esm.js → sdkVersion-CDd_gaR7.esm.js} +1 -1
- package/dist/selfie.d.ts +4 -4
- package/dist/selfie.esm.js +10 -10
- package/dist/{selfieErrorUtils-BY0-YbPW.esm.js → selfieErrorUtils-f4MgAG2A.esm.js} +1 -1
- package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-DmZFzs1-.d.ts} +1 -1
- package/dist/{selfieManager-vAAwzsHk.esm.js → selfieManager-hopelYEk.esm.js} +5 -5
- package/dist/{selfieStateMachine-BFVp3ElQ.esm.js → selfieStateMachine-DaZIVv3Q.esm.js} +3 -3
- package/dist/{session-CpwfoVdH.esm.js → session-CdSX4wsZ.esm.js} +77 -9
- package/dist/session.d.ts +96 -10
- package/dist/session.esm.js +7 -6
- package/dist/{sessionInitializer-BTjYgE-V.esm.js → sessionInitializer-DsL7X2j9.esm.js} +465 -206
- package/dist/{setup-YPKTUCY5.d.ts → setup-D9qt8YVU.d.ts} +2 -2
- package/dist/{setup-BInNAvQw.esm.js → setup-DDahygZs.esm.js} +44 -30
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-CwqjcxPg.esm.js} +2 -2
- package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-DBVDd1Eu.esm.js} +1 -1
- package/dist/{stats-BEvexnKC.esm.js → stats-CatA2dea.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/textRules-D4NRinKY.d.ts +41 -0
- package/dist/{tri-xzRLIIMN.esm.js → tri-DG6priFa.esm.js} +142 -8
- package/dist/tri.d.ts +1 -1
- package/dist/tri.esm-CzTNi5Q_.esm.js +3826 -0
- package/dist/tri.esm.js +1 -1
- package/dist/{trueSightService-BMT-TubT.esm.js → trueSightService-GuLthUVK.esm.js} +19 -10
- package/dist/trust-graph.esm.js +1 -1
- package/dist/types-B9C8W01q.d.ts +34 -0
- package/dist/{types-yPH8lAH-.d.ts → types-BEVHQbbC.d.ts} +2 -2
- package/dist/{types-BAxn7MpY.d.ts → types-BPm1JSu7.d.ts} +123 -48
- package/dist/{types-0L-eFDmr.d.ts → types-BgRHw-dR.d.ts} +1 -1
- package/dist/{types-B6HsSzpk.d.ts → types-CRaFu6wS.d.ts} +6 -3
- package/dist/types-CTaL0XJz.d.ts +80 -0
- package/dist/{types-Ckir_BEs.d.ts → types-Cd0J0F9D.d.ts} +1 -1
- package/dist/{types-CK8Jbjkp.d.ts → types-Csh8vzPo.d.ts} +1 -1
- package/dist/types-CuMJ2M7D.d.ts +210 -0
- package/dist/{types-DUnFZ08M.d.ts → types-CyNndVAT.d.ts} +16 -8
- package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
- package/dist/types-J6g6iKe_.d.ts +6 -0
- package/dist/{urlUtils-6jsE6rKp.esm.js → urlUtils-eYiyWjh0.esm.js} +4 -1
- package/dist/video-selfie.d.ts +8 -8
- package/dist/video-selfie.esm.js +97 -22
- package/dist/{videoSelfieCameraWarmer-D1xA0u8y.esm.js → videoSelfieCameraWarmer-e3irGfcO.esm.js} +18 -21
- package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-Dv3Mgws-.d.ts} +9 -4
- package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
- package/dist/{warmup-BElYWRh7.esm.js → warmup-DtB0DJpl.esm.js} +198 -27
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +3 -3
- package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-BtiR5pig.esm.js} +1 -1
- package/dist/wasmMetadataVersionSync-U8EFUr1T.esm.js +27 -0
- package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-BDrax6Eu.esm.js} +55 -26
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-DX2AyM4Y.d.ts} +54 -18
- package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-DqUpAEj_.esm.js} +37 -7
- package/dist/watchlistForBusinessStateMachine-DdaPl2PS.esm.js +166 -0
- package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-CdpXzT4B.esm.js} +2 -2
- package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-ofHW_lPk.esm.js} +1 -1
- package/dist/workflow.d.ts +5 -2
- package/dist/workflow.esm.js +60 -50
- package/package.json +12 -5
- package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
- package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
- package/dist/deepsightLoader-DeNvGU3c.esm.js +0 -55
- package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
- package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
- package/dist/thumbmark.esm-CRc0cYvz.esm.js +0 -1242
- package/dist/tri.esm-BIjHhBJ2.esm.js +0 -2620
- package/dist/types-BvLo3U4u.d.ts +0 -134
- package/dist/types-zOgZqMni.d.ts +0 -6
- package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
- /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as getToken
|
|
3
|
-
import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity, u as trueSightLog, y as isTrueSightTesting } from "./trueSightService-
|
|
4
|
-
import "./sessionInitializer-
|
|
5
|
-
import { t as addDeviceStats } from "./stats-
|
|
6
|
-
import {
|
|
1
|
+
import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
2
|
+
import { r as getToken } from "./api-CpP4PS4S.esm.js";
|
|
3
|
+
import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity, u as trueSightLog, y as isTrueSightTesting } from "./trueSightService-GuLthUVK.esm.js";
|
|
4
|
+
import "./sessionInitializer-DsL7X2j9.esm.js";
|
|
5
|
+
import { t as addDeviceStats } from "./stats-CatA2dea.esm.js";
|
|
6
|
+
import { c as isIPhone14OrHigher } from "./platform-aPh7gTWh.esm.js";
|
|
7
7
|
import { i as assign, n as enqueueActions, r as sendTo, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
8
8
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
9
|
+
import { s as isCameraDenialErrorName } from "./camera-E_Kcre4O.esm.js";
|
|
10
|
+
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-D190ATGD.esm.js";
|
|
11
|
+
import { a as sendLabelInspectionEvent, i as probeFaceCamera, l as getFaceUploadErrorCode, r as initializeDeepsightSession, t as FaceDetectionProvider, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-CAY43vSI.esm.js";
|
|
12
|
+
import { a as flagFaceManualReview, i as cameraCycleProvider, n as createCameraCycleOwnership, r as runProtectedAttempt, s as PROTECTED_CAPTURE_TARGET, t as electDesktopCameraDevice } from "./desktopCameraElection-BGMtYwk3.esm.js";
|
|
12
13
|
import { n as releaseFaceAvatarWarmup, r as warmFaceAvatar, t as createFaceAvatar } from "./createFaceAvatar-BNHdeFj8.esm.js";
|
|
13
14
|
import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
|
|
14
|
-
import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-
|
|
15
|
-
import {
|
|
16
|
-
import { t as getDeviceClass } from "./getDeviceClass-
|
|
15
|
+
import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-DFV-Ws0a.esm.js";
|
|
16
|
+
import { t as carryAttempts } from "./attemptCarry-WOkfvFMw.esm.js";
|
|
17
|
+
import { t as getDeviceClass } from "./getDeviceClass-DoIWuKI8.esm.js";
|
|
17
18
|
//#region src/internal/avatar/concealment.ts
|
|
18
19
|
/**
|
|
19
20
|
* Maps a backend concealment option to the internal avatar flags. `OPTION_NONE`
|
|
@@ -69,396 +70,6 @@ function logFaceCameraDiagnostic(event, fields) {
|
|
|
69
70
|
console.debug(`${FACE_CAMERA_DIAGNOSTIC_PREFIX} ${event} ${JSON.stringify(fields)}`);
|
|
70
71
|
}
|
|
71
72
|
//#endregion
|
|
72
|
-
//#region ../infra/src/media/VideoTrimmer.ts
|
|
73
|
-
/** A trim that runs longer than this uploads the full recording instead. */
|
|
74
|
-
const TRIM_TIMEOUT_MS = 1e4;
|
|
75
|
-
const trimmer = BrowserLazyImportProvider.getInstance().create(() => import("./videoTrimByCopy-BFfAiNpv.esm.js").then((module) => module.trimLastNSecondsByCopy), {
|
|
76
|
-
label: "Video liveness",
|
|
77
|
-
moduleName: "mediabunny",
|
|
78
|
-
timeoutMs: 1e4,
|
|
79
|
-
disabledMessage: "the full recording will be uploaded untrimmed."
|
|
80
|
-
});
|
|
81
|
-
/** Starts loading the trimmer, e.g. when a recording that will be trimmed starts. */
|
|
82
|
-
function preloadVideoTrimmer() {
|
|
83
|
-
trimmer.load();
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Keeps about the last `seconds` of a recording. Never rejects and never
|
|
87
|
-
* hangs: when the trimmer cannot load, fails, or takes longer than
|
|
88
|
-
* {@link TRIM_TIMEOUT_MS}, it resolves the untrimmed recording.
|
|
89
|
-
*/
|
|
90
|
-
async function trimLastNSeconds(videoBlob, seconds) {
|
|
91
|
-
const trim = await trimmer.load();
|
|
92
|
-
if (!trim) return videoBlob;
|
|
93
|
-
let timeout;
|
|
94
|
-
try {
|
|
95
|
-
return await Promise.race([trim(videoBlob, seconds), new Promise((resolve) => {
|
|
96
|
-
timeout = setTimeout(() => {
|
|
97
|
-
console.warn("[Video liveness] Trimming timed out; the full recording will be uploaded untrimmed.");
|
|
98
|
-
resolve(videoBlob);
|
|
99
|
-
}, TRIM_TIMEOUT_MS);
|
|
100
|
-
})]);
|
|
101
|
-
} catch (error) {
|
|
102
|
-
console.warn("[Video liveness] Trimming failed; the full recording will be uploaded untrimmed.", error);
|
|
103
|
-
return videoBlob;
|
|
104
|
-
} finally {
|
|
105
|
-
clearTimeout(timeout);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
//#endregion
|
|
109
|
-
//#region ../infra/src/providers/browser/LocalRecordingProvider.ts
|
|
110
|
-
function toBase64(videoBlob) {
|
|
111
|
-
return new Promise((resolve, reject) => {
|
|
112
|
-
const reader = new FileReader();
|
|
113
|
-
reader.onloadend = () => {
|
|
114
|
-
const base64 = reader.result.split(",")[1];
|
|
115
|
-
resolve(base64);
|
|
116
|
-
};
|
|
117
|
-
reader.onerror = () => reject(reader.error ?? /* @__PURE__ */ new Error("FileReader error"));
|
|
118
|
-
reader.readAsDataURL(videoBlob);
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
/** `MediaRecorderOptions.videoKeyFrameIntervalDuration`, see `startRecording`. */
|
|
122
|
-
const KEYFRAME_INTERVAL_MS = 1e3;
|
|
123
|
-
var LocalRecordingProvider = class {
|
|
124
|
-
constructor() {
|
|
125
|
-
this.mediaRecorder = null;
|
|
126
|
-
this._isRecording = false;
|
|
127
|
-
this._hasError = false;
|
|
128
|
-
this._error = null;
|
|
129
|
-
this.mimeType = "";
|
|
130
|
-
this.stream = null;
|
|
131
|
-
this.pauseRecordingBound = this.pauseRecording.bind(this);
|
|
132
|
-
}
|
|
133
|
-
get isRecording() {
|
|
134
|
-
return this._isRecording;
|
|
135
|
-
}
|
|
136
|
-
get hasError() {
|
|
137
|
-
return this._hasError;
|
|
138
|
-
}
|
|
139
|
-
get error() {
|
|
140
|
-
return this._error;
|
|
141
|
-
}
|
|
142
|
-
startRecording(stream) {
|
|
143
|
-
this.reset();
|
|
144
|
-
preloadVideoTrimmer();
|
|
145
|
-
this.registerEventListeners();
|
|
146
|
-
this.stream = stream;
|
|
147
|
-
try {
|
|
148
|
-
const options = getAdaptiveMediaRecorderOptions();
|
|
149
|
-
this.mimeType = options.mimeType;
|
|
150
|
-
const recorder = new MediaRecorder(stream.clone(), {
|
|
151
|
-
...options,
|
|
152
|
-
videoKeyFrameIntervalDuration: KEYFRAME_INTERVAL_MS
|
|
153
|
-
});
|
|
154
|
-
recorder.onerror = (event) => {
|
|
155
|
-
this._error = `Recording error: ${event}`;
|
|
156
|
-
this._isRecording = false;
|
|
157
|
-
this._hasError = true;
|
|
158
|
-
};
|
|
159
|
-
recorder.start();
|
|
160
|
-
this.mediaRecorder = recorder;
|
|
161
|
-
this._isRecording = true;
|
|
162
|
-
this._error = null;
|
|
163
|
-
this._hasError = false;
|
|
164
|
-
} catch (err) {
|
|
165
|
-
this._error = `Failed to start recording: ${err}`;
|
|
166
|
-
this._hasError = true;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
async stopRecording(trimSeconds, encrypt, generateChecksum) {
|
|
170
|
-
const recorder = this.mediaRecorder;
|
|
171
|
-
return new Promise((resolve, reject) => {
|
|
172
|
-
this.removeEventListeners();
|
|
173
|
-
if (recorder && this._isRecording) {
|
|
174
|
-
const chunks = [];
|
|
175
|
-
recorder.ondataavailable = (event) => {
|
|
176
|
-
if (event.data.size > 0) chunks.push(event.data);
|
|
177
|
-
};
|
|
178
|
-
recorder.onstop = async () => {
|
|
179
|
-
try {
|
|
180
|
-
const trimmedVideo = await trimLastNSeconds(new Blob(chunks, { type: this.mimeType }), trimSeconds);
|
|
181
|
-
const encryptedVideoBase64 = encrypt(await toBase64(trimmedVideo));
|
|
182
|
-
generateChecksum(await trimmedVideo.arrayBuffer());
|
|
183
|
-
this._isRecording = false;
|
|
184
|
-
resolve({
|
|
185
|
-
trimmedBlob: trimmedVideo,
|
|
186
|
-
encryptedVideo: encryptedVideoBase64
|
|
187
|
-
});
|
|
188
|
-
} catch (error) {
|
|
189
|
-
this._isRecording = false;
|
|
190
|
-
this._error = `Recording stop failed: ${error}`;
|
|
191
|
-
this._hasError = true;
|
|
192
|
-
reject(error);
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
recorder.stop();
|
|
196
|
-
this._isRecording = false;
|
|
197
|
-
} else resolve({
|
|
198
|
-
trimmedBlob: new Blob([], { type: this.mimeType }),
|
|
199
|
-
encryptedVideo: ""
|
|
200
|
-
});
|
|
201
|
-
recorder?.stream?.getTracks().forEach((track) => track.stop());
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Discards the in-progress recording without producing a result: detaches
|
|
206
|
-
* the recorder's handlers, stops it, releases its cloned tracks and clears
|
|
207
|
-
* the flags. Idempotent, and safe after `stopRecording` or when never
|
|
208
|
-
* started. Mirrors `MultipartRecordingProvider.reset()` so an attempt that is
|
|
209
|
-
* released before finalization cannot leave a live camera clone behind
|
|
210
|
-
* (ENG-56648).
|
|
211
|
-
*/
|
|
212
|
-
reset() {
|
|
213
|
-
this.removeEventListeners();
|
|
214
|
-
const recorder = this.mediaRecorder;
|
|
215
|
-
if (recorder) {
|
|
216
|
-
recorder.ondataavailable = null;
|
|
217
|
-
recorder.onerror = null;
|
|
218
|
-
recorder.onstop = null;
|
|
219
|
-
if (recorder.state !== "inactive") try {
|
|
220
|
-
recorder.stop();
|
|
221
|
-
} catch {}
|
|
222
|
-
recorder.stream?.getTracks().forEach((track) => track.stop());
|
|
223
|
-
this.mediaRecorder = null;
|
|
224
|
-
}
|
|
225
|
-
this.stream = null;
|
|
226
|
-
this._isRecording = false;
|
|
227
|
-
this._error = null;
|
|
228
|
-
this._hasError = false;
|
|
229
|
-
}
|
|
230
|
-
pauseRecording() {
|
|
231
|
-
if (!this._isRecording) return;
|
|
232
|
-
if (this.mediaRecorder?.state === "recording") try {
|
|
233
|
-
this.mediaRecorder.pause();
|
|
234
|
-
} catch {}
|
|
235
|
-
}
|
|
236
|
-
registerEventListeners() {
|
|
237
|
-
document.addEventListener("visibilitychange", this.pauseRecordingBound);
|
|
238
|
-
}
|
|
239
|
-
removeEventListeners() {
|
|
240
|
-
document.removeEventListener("visibilitychange", this.pauseRecordingBound);
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
//#endregion
|
|
244
|
-
//#region src/internal/recordings/recordingsRepository.ts
|
|
245
|
-
async function uploadDeepsightVideo(encryptedVideo, token) {
|
|
246
|
-
try {
|
|
247
|
-
return (await api.post(endpoints.deepsightVideoImport, {
|
|
248
|
-
video: encryptedVideo,
|
|
249
|
-
type: "selfie"
|
|
250
|
-
}, { headers: { "X-Incode-Hardware-Id": token } })).data.recordingId ?? "";
|
|
251
|
-
} catch {
|
|
252
|
-
return "";
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
//#endregion
|
|
256
|
-
//#region src/internal/faceCapture/recordingService.ts
|
|
257
|
-
/**
|
|
258
|
-
* Records on-device and uploads encrypted video for liveness.
|
|
259
|
-
*/
|
|
260
|
-
var LocalRecordingService = class {
|
|
261
|
-
constructor(wasmUtil, sessionToken) {
|
|
262
|
-
this.recorder = new LocalRecordingProvider();
|
|
263
|
-
this.sessionToken = sessionToken;
|
|
264
|
-
this.wasmUtil = wasmUtil;
|
|
265
|
-
}
|
|
266
|
-
async start(stream) {
|
|
267
|
-
this.recorder.startRecording(stream);
|
|
268
|
-
this.wasmUtil.osv();
|
|
269
|
-
}
|
|
270
|
-
async stop() {
|
|
271
|
-
if (!this.recorder.isRecording) return { recordingId: null };
|
|
272
|
-
this.wasmUtil.oev();
|
|
273
|
-
const result = await this.recorder.stopRecording(10, (base64) => this.wasmUtil.encryptImage(base64), (buffer) => this.wasmUtil.ckvcks(buffer));
|
|
274
|
-
if (!this.sessionToken) return { recordingId: null };
|
|
275
|
-
return { recordingId: await uploadDeepsightVideo(result.encryptedVideo, this.sessionToken) };
|
|
276
|
-
}
|
|
277
|
-
prepareUpload() {
|
|
278
|
-
return this.stop();
|
|
279
|
-
}
|
|
280
|
-
async stopAndGetVideo() {
|
|
281
|
-
if (!this.recorder.isRecording) return { videoBase64: void 0 };
|
|
282
|
-
try {
|
|
283
|
-
this.wasmUtil.oev();
|
|
284
|
-
const videoBase64 = (await this.recorder.stopRecording(10, (base64) => base64, () => {})).encryptedVideo;
|
|
285
|
-
return { videoBase64: videoBase64 ? videoBase64 : void 0 };
|
|
286
|
-
} catch {
|
|
287
|
-
return { videoBase64: void 0 };
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
cleanup() {
|
|
291
|
-
this.recorder.reset();
|
|
292
|
-
}
|
|
293
|
-
};
|
|
294
|
-
/**
|
|
295
|
-
* Records a regular Selfie capture locally and streams it through the scoped
|
|
296
|
-
* video-selfie-service multipart protocol. The recording is associated with
|
|
297
|
-
* the interview asynchronously by the backend's `selfie` scope consumer, so
|
|
298
|
-
* its upload id must not be forwarded to `/omni/add/face` as a legacy
|
|
299
|
-
* `recordingId`.
|
|
300
|
-
*
|
|
301
|
-
* The recording is scoped to the capture step (ENG-56648). The recorder
|
|
302
|
-
* records a stable `CameraCompositor` stream instead of a raw camera clone, so
|
|
303
|
-
* every attempt can end its own clone before PRC and POC run and the next
|
|
304
|
-
* attempt swaps a fresh clone into the same multipart upload. The owning
|
|
305
|
-
* controller completes the upload once the backend accepts a capture or the
|
|
306
|
-
* step ends without a retry.
|
|
307
|
-
*/
|
|
308
|
-
var MultipartFaceRecordingService = class {
|
|
309
|
-
constructor() {
|
|
310
|
-
this.recordingCompositor = createRecordingCompositor();
|
|
311
|
-
this.service = new MultipartRecordingService("selfie", new WorkerEncoderRecordingProvider(this.recordingCompositor));
|
|
312
|
-
this.audioSource = [];
|
|
313
|
-
this.needsVideoSourceReplacement = false;
|
|
314
|
-
this.pausedForAttempt = false;
|
|
315
|
-
this.startInFlight = false;
|
|
316
|
-
this.suspendRequested = false;
|
|
317
|
-
this.stopping = false;
|
|
318
|
-
}
|
|
319
|
-
async start(stream) {
|
|
320
|
-
if (this.stopping) throw new Error("Face recording already completed");
|
|
321
|
-
if (this.compositor) {
|
|
322
|
-
await this.resume(stream);
|
|
323
|
-
return;
|
|
324
|
-
}
|
|
325
|
-
const recordingSource = stream.clone();
|
|
326
|
-
const compositor = this.recordingCompositor;
|
|
327
|
-
this.startInFlight = true;
|
|
328
|
-
try {
|
|
329
|
-
const composite = compositor.start(recordingSource);
|
|
330
|
-
await this.service.start(composite);
|
|
331
|
-
} catch (error) {
|
|
332
|
-
compositor.stop();
|
|
333
|
-
recordingSource.getTracks().forEach((track) => track.stop());
|
|
334
|
-
this.service.cleanup();
|
|
335
|
-
throw error;
|
|
336
|
-
} finally {
|
|
337
|
-
this.startInFlight = false;
|
|
338
|
-
}
|
|
339
|
-
if (this.stopping) {
|
|
340
|
-
compositor.stop();
|
|
341
|
-
recordingSource.getTracks().forEach((track) => track.stop());
|
|
342
|
-
this.service.cleanup();
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
this.compositor = compositor;
|
|
346
|
-
this.recordingSource = recordingSource;
|
|
347
|
-
this.audioSource = recordingSource.getAudioTracks();
|
|
348
|
-
if (this.suspendRequested) {
|
|
349
|
-
this.suspendRequested = false;
|
|
350
|
-
this.suspend();
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* Pauses the container and ends the camera clone on the calling thread. The
|
|
355
|
-
* composite stream and the upload stay open for the next attempt.
|
|
356
|
-
*/
|
|
357
|
-
suspend() {
|
|
358
|
-
if (this.stopping) return;
|
|
359
|
-
if (!this.compositor) {
|
|
360
|
-
this.suspendRequested = this.startInFlight;
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
if (!this.pausedForAttempt) this.pausedForAttempt = this.service.pause();
|
|
364
|
-
this.releaseCameraClone({ keepAudio: true });
|
|
365
|
-
this.needsVideoSourceReplacement = true;
|
|
366
|
-
}
|
|
367
|
-
async prepareUpload() {
|
|
368
|
-
this.suspend();
|
|
369
|
-
return { recordingId: null };
|
|
370
|
-
}
|
|
371
|
-
async stop() {
|
|
372
|
-
await this.complete();
|
|
373
|
-
return { recordingId: null };
|
|
374
|
-
}
|
|
375
|
-
pauseForBackground() {
|
|
376
|
-
this.suspend();
|
|
377
|
-
}
|
|
378
|
-
async resumeFromBackground(stream) {
|
|
379
|
-
if (!this.compositor || this.stopping) return;
|
|
380
|
-
await this.resume(stream);
|
|
381
|
-
}
|
|
382
|
-
async stopAndGetVideo() {
|
|
383
|
-
await this.complete();
|
|
384
|
-
return { videoBase64: void 0 };
|
|
385
|
-
}
|
|
386
|
-
cleanup() {
|
|
387
|
-
this.suspendRequested = false;
|
|
388
|
-
this.pausedForAttempt = false;
|
|
389
|
-
this.needsVideoSourceReplacement = false;
|
|
390
|
-
this.releaseCameraClone({ keepAudio: false });
|
|
391
|
-
this.compositor?.stop();
|
|
392
|
-
this.compositor = void 0;
|
|
393
|
-
this.recordingSource = void 0;
|
|
394
|
-
this.audioSource = [];
|
|
395
|
-
this.service.cleanup();
|
|
396
|
-
}
|
|
397
|
-
/** Swaps this attempt's camera clone into the composite and resumes. */
|
|
398
|
-
async resume(stream) {
|
|
399
|
-
const compositor = this.compositor;
|
|
400
|
-
if (!compositor) return;
|
|
401
|
-
if (this.needsVideoSourceReplacement) {
|
|
402
|
-
const recordingSource = stream.clone();
|
|
403
|
-
recordingSource.getAudioTracks().forEach((track) => track.stop());
|
|
404
|
-
compositor.switchVideo(recordingSource);
|
|
405
|
-
this.needsVideoSourceReplacement = false;
|
|
406
|
-
this.recordingSource = recordingSource;
|
|
407
|
-
const result = await compositor.resume();
|
|
408
|
-
if (result !== "resumed") throw new Error(`Face recording camera did not resume: ${result}`);
|
|
409
|
-
}
|
|
410
|
-
if (this.pausedForAttempt && !this.service.resume()) throw new Error("Face recording did not resume");
|
|
411
|
-
this.pausedForAttempt = false;
|
|
412
|
-
}
|
|
413
|
-
/**
|
|
414
|
-
* Completes the scoped upload. The camera clone ends synchronously before the
|
|
415
|
-
* drain so a step that ends mid-attempt never pins the camera; the composite
|
|
416
|
-
* stays alive until the recorder has emitted its final chunk.
|
|
417
|
-
*/
|
|
418
|
-
async complete() {
|
|
419
|
-
this.stopping = true;
|
|
420
|
-
this.suspendRequested = false;
|
|
421
|
-
this.releaseCameraClone({ keepAudio: false });
|
|
422
|
-
try {
|
|
423
|
-
await this.service.stop();
|
|
424
|
-
} finally {
|
|
425
|
-
this.compositor?.stop();
|
|
426
|
-
this.compositor = void 0;
|
|
427
|
-
this.recordingSource = void 0;
|
|
428
|
-
this.audioSource = [];
|
|
429
|
-
this.pausedForAttempt = false;
|
|
430
|
-
this.needsVideoSourceReplacement = false;
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
releaseCameraClone(options) {
|
|
434
|
-
try {
|
|
435
|
-
this.compositor?.pause();
|
|
436
|
-
} catch {}
|
|
437
|
-
const tracks = options.keepAudio ? this.recordingSource?.getVideoTracks() ?? [] : /* @__PURE__ */ new Set([...this.recordingSource?.getTracks() ?? [], ...this.audioSource]);
|
|
438
|
-
for (const track of tracks) try {
|
|
439
|
-
track.stop();
|
|
440
|
-
} catch {}
|
|
441
|
-
}
|
|
442
|
-
};
|
|
443
|
-
/**
|
|
444
|
-
* Creates the recording service for the current configuration.
|
|
445
|
-
*
|
|
446
|
-
* Order of precedence:
|
|
447
|
-
* 1. `onDeviceFaceResultsSubmissionEnabled === true` → no recording. The
|
|
448
|
-
* on-device workflow never uploads media, only the staged face-results
|
|
449
|
-
* JSON via `WebApi.postFaceResults`. Mirrors V1's
|
|
450
|
-
* `FaceFlowManager.setRecorders()` early return.
|
|
451
|
-
* 2. `deepsightLiveness === 'VIDEOLIVENESS'` → local Deepsight recorder.
|
|
452
|
-
* 3. `enableFaceRecording === true` → scoped multipart recorder.
|
|
453
|
-
* 4. otherwise → no recording.
|
|
454
|
-
*/
|
|
455
|
-
function createRecordingService(params) {
|
|
456
|
-
if (params.config.onDeviceFaceResultsSubmissionEnabled === true) return;
|
|
457
|
-
if (params.localDelivery === true) return params.config.enableFaceRecording === true || params.config.deepsightLiveness === "VIDEOLIVENESS" ? new LocalRecordingService(params.wasmUtil, null) : void 0;
|
|
458
|
-
if (params.config.deepsightLiveness === "VIDEOLIVENESS") return new LocalRecordingService(params.wasmUtil, params.sessionToken);
|
|
459
|
-
if (params.config.enableFaceRecording === true) return new MultipartFaceRecordingService();
|
|
460
|
-
}
|
|
461
|
-
//#endregion
|
|
462
73
|
//#region src/internal/faceCapture/protectedFaceAttempt.ts
|
|
463
74
|
const ON_DEVICE_MANUAL_CAPTURE_TIMEOUT_MS = 2147483647;
|
|
464
75
|
/**
|
|
@@ -552,16 +163,14 @@ var ProtectedFaceRecorderHooks = class {
|
|
|
552
163
|
let nextAttemptNumber = 1;
|
|
553
164
|
/**
|
|
554
165
|
* Private composition object for one still-face attempt. It owns provider
|
|
555
|
-
* callbacks and
|
|
556
|
-
* presentation stream/canvas and allowlisted semantic results.
|
|
166
|
+
* callbacks and the camera-step options outside XState; the machine sees only
|
|
167
|
+
* the presentation stream/canvas and allowlisted semantic results.
|
|
557
168
|
*/
|
|
558
169
|
var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
559
170
|
constructor(options) {
|
|
560
171
|
this.options = options;
|
|
561
172
|
this.attemptId = `face-${nextAttemptNumber++}`;
|
|
562
|
-
this.
|
|
563
|
-
this.rawHandedOff = false;
|
|
564
|
-
this.rawStreamReleased = false;
|
|
173
|
+
this.probedUsingBackCamera = false;
|
|
565
174
|
this.released = false;
|
|
566
175
|
this.recorderTransferred = false;
|
|
567
176
|
this.pendingSignals = [];
|
|
@@ -572,7 +181,7 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
572
181
|
/** Per-attempt fallback when no step owner supplies the recording service. */
|
|
573
182
|
async createAttemptRecordingService() {
|
|
574
183
|
const wasmUtil = await this.options.dependencies.getWasmUtil();
|
|
575
|
-
return createRecordingService({
|
|
184
|
+
return (await import("./recordingService-CTko6Cjn.esm.js")).createRecordingService({
|
|
576
185
|
config: this.options.config,
|
|
577
186
|
wasmUtil,
|
|
578
187
|
sessionToken: getToken(),
|
|
@@ -583,14 +192,15 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
583
192
|
return this.options.delivery;
|
|
584
193
|
}
|
|
585
194
|
get usingBackCamera() {
|
|
586
|
-
return this.
|
|
195
|
+
return this.probedUsingBackCamera;
|
|
587
196
|
}
|
|
588
197
|
setDeepsightService(service) {
|
|
589
198
|
if (this.released || this.deepsightService) return;
|
|
590
199
|
this.deepsightService = service;
|
|
591
200
|
}
|
|
201
|
+
/** Tutorial-time preparation; the camera itself opens at attempt start. */
|
|
592
202
|
async preAcquire() {
|
|
593
|
-
await this.
|
|
203
|
+
await this.probe();
|
|
594
204
|
}
|
|
595
205
|
subscribeSignals(listener) {
|
|
596
206
|
if (this.released) return () => void 0;
|
|
@@ -608,23 +218,27 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
608
218
|
attemptId: this.attemptId,
|
|
609
219
|
target: this.options.target,
|
|
610
220
|
workflow: this.options.config.onDeviceFaceResultsSubmissionEnabled === true ? 5 : 4,
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
221
|
+
cameraStep: async () => {
|
|
222
|
+
const { usingBackCamera } = await this.probe();
|
|
223
|
+
const facing = usingBackCamera ? "environment" : "user";
|
|
224
|
+
const resolution = usingBackCamera ? void 0 : this.options.config.cameraResolution;
|
|
225
|
+
const width = resolution?.width ?? 0;
|
|
226
|
+
const height = resolution?.height ?? 0;
|
|
227
|
+
const hasResolution = width > 0 && height > 0;
|
|
228
|
+
return {
|
|
229
|
+
vs: facing,
|
|
230
|
+
di: await electDesktopCameraDevice(facing),
|
|
231
|
+
ew: hasResolution ? width : 0,
|
|
232
|
+
eh: hasResolution ? height : 0,
|
|
233
|
+
i14: isIPhone14OrHigher(),
|
|
234
|
+
pa: false
|
|
235
|
+
};
|
|
621
236
|
},
|
|
622
237
|
cycle: this.options.cycle,
|
|
623
238
|
cycleOwnership: this.cycleOwnership,
|
|
624
239
|
recorder: this.recorder,
|
|
625
|
-
|
|
240
|
+
afterReady: this.options.delivery === "protected" ? (displayStream) => this.attachProtectedCameraMetadata(displayStream) : void 0,
|
|
626
241
|
configureWorkflow: () => this.configureWorkflow(),
|
|
627
|
-
runPrc: () => this.runPrc(),
|
|
628
242
|
runPoc: () => this.runPoc(),
|
|
629
243
|
onStartupTiming,
|
|
630
244
|
faceResults: this.provider
|
|
@@ -704,16 +318,18 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
704
318
|
Promise.resolve(this.provider.dispose()).catch(() => void 0);
|
|
705
319
|
} catch {}
|
|
706
320
|
this.cycleOwnership.releaseByController();
|
|
707
|
-
if (!this.rawHandedOff) this.acquired?.then(({ stream }) => this.releaseRawStream(stream), () => void 0);
|
|
708
321
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
322
|
+
/**
|
|
323
|
+
* Runs the camera-free probe once per attempt, whether the tutorial
|
|
324
|
+
* pre-acquire or the camera step asks first. Every retry creates a fresh
|
|
325
|
+
* runtime, so the pipeline warm-up and the lens choice are re-checked per
|
|
326
|
+
* attempt.
|
|
327
|
+
*/
|
|
328
|
+
async probe() {
|
|
329
|
+
this.probed ??= this.options.probeCamera();
|
|
330
|
+
const result = await this.probed;
|
|
331
|
+
this.probedUsingBackCamera = result.usingBackCamera;
|
|
332
|
+
if (this.released) throw new Error("Protected face attempt was released");
|
|
717
333
|
return result;
|
|
718
334
|
}
|
|
719
335
|
async configureWorkflow() {
|
|
@@ -767,13 +383,6 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
767
383
|
});
|
|
768
384
|
this.emitDetection("detecting");
|
|
769
385
|
}
|
|
770
|
-
async runPrc() {
|
|
771
|
-
if (this.options.delivery === "protected") await this.attachProtectedCameraMetadata();
|
|
772
|
-
if (this.released) return;
|
|
773
|
-
const wasmUtil = await this.options.dependencies.getWasmUtil();
|
|
774
|
-
if (this.released) return;
|
|
775
|
-
await wasmUtil.prc();
|
|
776
|
-
}
|
|
777
386
|
async runPoc() {
|
|
778
387
|
if (this.options.delivery === "local") return;
|
|
779
388
|
const deepsight = this.deepsightService;
|
|
@@ -797,12 +406,11 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
797
406
|
const logs = deepsight.getPipelineState();
|
|
798
407
|
this.options.dependencies.trackCaptureAttemptFinished?.({ logs });
|
|
799
408
|
}
|
|
800
|
-
async attachProtectedCameraMetadata() {
|
|
409
|
+
async attachProtectedCameraMetadata(displayStream) {
|
|
801
410
|
const deepsight = this.deepsightService;
|
|
802
411
|
if (!deepsight) return;
|
|
803
412
|
try {
|
|
804
|
-
const
|
|
805
|
-
const [videoTrack] = stream.getVideoTracks();
|
|
413
|
+
const [videoTrack] = displayStream.getVideoTracks();
|
|
806
414
|
if (videoTrack) await deepsight.checkVirtualCamera(videoTrack);
|
|
807
415
|
} catch {
|
|
808
416
|
trueSightLog("warning", "deepsight", "faceScan", "protected camera metadata attachment failed");
|
|
@@ -819,13 +427,6 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
819
427
|
if (this.signalListener) this.signalListener(signal);
|
|
820
428
|
else this.pendingSignals.push(signal);
|
|
821
429
|
}
|
|
822
|
-
releaseRawStream(stream) {
|
|
823
|
-
if (this.rawHandedOff || this.rawStreamReleased) return;
|
|
824
|
-
this.rawStreamReleased = true;
|
|
825
|
-
try {
|
|
826
|
-
stopStream(stream);
|
|
827
|
-
} catch {}
|
|
828
|
-
}
|
|
829
430
|
};
|
|
830
431
|
//#endregion
|
|
831
432
|
//#region src/internal/faceCapture/protectedFaceController.ts
|
|
@@ -878,8 +479,9 @@ function createProtectedFaceControllerActor(options) {
|
|
|
878
479
|
const input = getControllerInput();
|
|
879
480
|
const pending = (async () => {
|
|
880
481
|
const wasmUtil = await input.dependencies.getWasmUtil();
|
|
482
|
+
const recordingModule = await import("./recordingService-CTko6Cjn.esm.js");
|
|
881
483
|
if (!active) return;
|
|
882
|
-
stepRecording ??= createRecordingService({
|
|
484
|
+
stepRecording ??= recordingModule.createRecordingService({
|
|
883
485
|
config: input.config,
|
|
884
486
|
wasmUtil,
|
|
885
487
|
sessionToken: getToken(),
|
|
@@ -921,10 +523,7 @@ function createProtectedFaceControllerActor(options) {
|
|
|
921
523
|
authHint: input.authHint,
|
|
922
524
|
faceDetection: capabilities.faceDetection,
|
|
923
525
|
cycle: capabilities.cycle,
|
|
924
|
-
|
|
925
|
-
config: input.config,
|
|
926
|
-
provider
|
|
927
|
-
}),
|
|
526
|
+
probeCamera: () => probeFaceCamera(input.config),
|
|
928
527
|
getRecordingService: getStepRecordingService
|
|
929
528
|
});
|
|
930
529
|
if (deepsightService) runtime.setDeepsightService(deepsightService);
|
|
@@ -1068,7 +667,8 @@ function createProtectedFaceControllerActor(options) {
|
|
|
1068
667
|
case "PROTECTED_ATTEMPT_FAILED":
|
|
1069
668
|
logDiagnostic("attempt-failed", {
|
|
1070
669
|
failureStage: event.failure.stage,
|
|
1071
|
-
failureCode: event.failure.code
|
|
670
|
+
failureCode: event.failure.code,
|
|
671
|
+
errorName: event.failure.errorName
|
|
1072
672
|
});
|
|
1073
673
|
noteTrueSightCaptureActivity(false);
|
|
1074
674
|
sendBack(event);
|
|
@@ -1204,6 +804,7 @@ function createDefaultProtectedFaceControllerActor(options) {
|
|
|
1204
804
|
}
|
|
1205
805
|
//#endregion
|
|
1206
806
|
//#region src/internal/faceCapture/faceCaptureSetup.ts
|
|
807
|
+
const DEEPSIGHT_INITIALIZATION_FAILED_CODE = "DEEPSIGHT_INITIALIZATION_FAILED";
|
|
1207
808
|
const getAttemptsFromConfig = (config) => {
|
|
1208
809
|
return config.captureAttempts ?? config.numberOfAttempts ?? 3;
|
|
1209
810
|
};
|
|
@@ -1485,11 +1086,16 @@ const faceCaptureMachine = setup({
|
|
|
1485
1086
|
hasStream: ({ context }) => context.stream !== void 0,
|
|
1486
1087
|
isCameraAndDeepsightReady: ({ context }) => context.stream !== void 0 && context.deepsightReady,
|
|
1487
1088
|
hasAttemptsRemaining: ({ context }) => context.attemptsRemaining > 0,
|
|
1089
|
+
isOutOfAttempts: ({ context }) => context.attemptsRemaining <= 0 && context.attemptsRemaining < getAttemptsFromConfig(context.config),
|
|
1488
1090
|
hasCapturedImage: ({ context }) => context.capturedImage !== void 0,
|
|
1489
1091
|
isAutoCaptureAllowed: ({ context }) => !context.retainManualMode,
|
|
1490
1092
|
canCommitProtectedManual: ({ context }) => context.manualCaptureTriggered && context.config.onDeviceFaceResultsSubmissionEnabled !== true,
|
|
1491
1093
|
isProtectedManualRefusal: ({ event }) => event.failure.stage === "manualCommit",
|
|
1492
1094
|
isProtectedUploadFailure: ({ event }) => event.failure.stage === "upload",
|
|
1095
|
+
isProtectedAcquireDenied: ({ event }) => {
|
|
1096
|
+
const { failure } = event;
|
|
1097
|
+
return failure.stage === "acquire" && isCameraDenialErrorName(failure.errorName);
|
|
1098
|
+
},
|
|
1493
1099
|
hasUploadValidationError: () => false,
|
|
1494
1100
|
isTerminalUploadError: () => false,
|
|
1495
1101
|
isNoAttemptsTerminal: () => false
|
|
@@ -1498,7 +1104,7 @@ const faceCaptureMachine = setup({
|
|
|
1498
1104
|
id: "faceCapture",
|
|
1499
1105
|
initial: "idle",
|
|
1500
1106
|
entry: "bindProtectedFaceController",
|
|
1501
|
-
context: ({ input }) => ({
|
|
1107
|
+
context: ({ input, self }) => ({
|
|
1502
1108
|
config: input.config,
|
|
1503
1109
|
dependencies: input.dependencies,
|
|
1504
1110
|
authHint: input.authHint,
|
|
@@ -1510,7 +1116,7 @@ const faceCaptureMachine = setup({
|
|
|
1510
1116
|
faceCoordinates: void 0,
|
|
1511
1117
|
uploadResponse: void 0,
|
|
1512
1118
|
processResponse: void 0,
|
|
1513
|
-
attemptsRemaining: getAttemptsFromConfig(input.config),
|
|
1119
|
+
attemptsRemaining: carryAttempts("faceCapture", self, (s) => ({ attemptsRemaining: s.context.attemptsRemaining })).attemptsRemaining ?? getAttemptsFromConfig(input.config),
|
|
1514
1120
|
uploadError: void 0,
|
|
1515
1121
|
permissionResult: void 0,
|
|
1516
1122
|
deepsightReady: false,
|
|
@@ -1535,6 +1141,10 @@ const faceCaptureMachine = setup({
|
|
|
1535
1141
|
},
|
|
1536
1142
|
states: {
|
|
1537
1143
|
idle: { on: { LOAD: [
|
|
1144
|
+
{
|
|
1145
|
+
target: "outOfAttempts",
|
|
1146
|
+
guard: "isOutOfAttempts"
|
|
1147
|
+
},
|
|
1538
1148
|
{
|
|
1539
1149
|
target: "tutorial",
|
|
1540
1150
|
guard: "hasShowTutorial"
|
|
@@ -1809,6 +1419,11 @@ const faceCaptureMachine = setup({
|
|
|
1809
1419
|
guard: "isProtectedUploadFailure",
|
|
1810
1420
|
actions: "setUploadFailureAndDecrement"
|
|
1811
1421
|
},
|
|
1422
|
+
{
|
|
1423
|
+
target: "#faceCapture.permissions.denied",
|
|
1424
|
+
guard: "isProtectedAcquireDenied",
|
|
1425
|
+
actions: "setPermissionDenied"
|
|
1426
|
+
},
|
|
1812
1427
|
{
|
|
1813
1428
|
target: "#faceCapture.error",
|
|
1814
1429
|
actions: "setProtectedFailure"
|
|
@@ -1832,7 +1447,11 @@ const faceCaptureMachine = setup({
|
|
|
1832
1447
|
target: "#faceCapture.error",
|
|
1833
1448
|
actions: assign({
|
|
1834
1449
|
deepsightReady: () => false,
|
|
1835
|
-
error: () =>
|
|
1450
|
+
error: () => ({
|
|
1451
|
+
type: DEEPSIGHT_INITIALIZATION_FAILED_CODE,
|
|
1452
|
+
message: "Deepsight initialization failed",
|
|
1453
|
+
moduleErrorCode: DEEPSIGHT_INITIALIZATION_FAILED_CODE
|
|
1454
|
+
})
|
|
1836
1455
|
})
|
|
1837
1456
|
}
|
|
1838
1457
|
}
|
|
@@ -1952,6 +1571,14 @@ const faceCaptureMachine = setup({
|
|
|
1952
1571
|
},
|
|
1953
1572
|
onError: { target: "finished" }
|
|
1954
1573
|
} },
|
|
1574
|
+
outOfAttempts: { always: [{
|
|
1575
|
+
target: "error",
|
|
1576
|
+
guard: "isNoAttemptsTerminal",
|
|
1577
|
+
actions: "setTerminalError"
|
|
1578
|
+
}, {
|
|
1579
|
+
target: "terminalProcessing",
|
|
1580
|
+
actions: "flagFaceManualReview"
|
|
1581
|
+
}] },
|
|
1955
1582
|
terminalProcessing: {
|
|
1956
1583
|
entry: ["completeProtectedRecording", "cleanup"],
|
|
1957
1584
|
invoke: {
|