@incodetech/core 2.4.0-rc.4 → 2.4.1-agentic
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/{FaceDetectionProvider-CzQEFzP8.esm.js → FaceDetectionProvider-B83VmClw.esm.js} +29 -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/{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/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-GTkoJyFY.esm.js} +75 -22
- package/dist/{addressSearch-DPjIKJrX.esm.js → addressSearch-41sMcnJk.esm.js} +72 -31
- 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-CQ08atTC.esm.js} +2 -2
- package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-BcsUTTIr.esm.js} +1 -1
- package/dist/{api-Cz90EHyu.esm.js → api-BO8JA7Pf.esm.js} +6 -5
- package/dist/{apiError-B_uY7RO6.esm.js → apiError-CfuIvnUy.esm.js} +1 -1
- package/dist/attemptCarry-BjTJ6bMQ.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-C-cOki0Y.d.ts} +1 -1
- package/dist/{authenticationManager-CSHZQTlb.esm.js → authenticationManager-DvmklBTE.esm.js} +5 -5
- package/dist/{authenticationStateMachine-DrO14KyC.esm.js → authenticationStateMachine-BL2ptOA0.esm.js} +3 -3
- package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-C5_NNfUN.esm.js} +3 -43
- 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.esm.js +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-CM0fuqDC.esm.js} +2 -2
- package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-kksIUOPD.esm.js} +2 -2
- package/dist/cnpj-Co1ottYN.esm.js +77 -0
- package/dist/connectivity-HSl0diCx.esm.js +133 -0
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-CBwFozhv.esm.js} +4 -3
- package/dist/{consentManager-Cv_0QKLD.d.ts → consentManager-_q9yJUku.d.ts} +14 -7
- package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-CpmRAcr2.esm.js} +20 -7
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-64O8t10a.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-CLgJQcx0.esm.js} +3 -2
- package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-CXpFE-Mv.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-Bx9YhVkJ.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-DWt_0YtJ.esm.js} +2 -2
- package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-D8o-2Nej.esm.js} +2 -2
- package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-Sbi6DIcK.esm.js} +1 -1
- package/dist/{deepsightLoader-DkrG5zbN.esm.js → deepsightLoader-DMxtowCm.esm.js} +6 -28
- package/dist/{deepsightService-BrltL1DF.esm.js → deepsightService-twg3bXqY.esm.js} +20 -59
- package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-kHY2IDJi.esm.js} +177 -40
- package/dist/device.esm.js +2 -2
- package/dist/document-capture.d.ts +2 -2
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-6tnnDkMX.d.ts} +14 -2
- package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-CMSC_Mhd.esm.js} +26 -19
- package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-BCwD5Rto.esm.js} +43 -35
- 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-D7Xnjm7B.esm.js → dynamicFormsManager-DU6W1e20.esm.js} +2 -2
- package/dist/{dynamicFormsStateMachine-Cgk0VPP4.esm.js → dynamicFormsStateMachine-C8Z7k3vo.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-TB6ZG5lX.d.ts} +2 -2
- package/dist/{ekybManager-yj_Y36jM.esm.js → ekybManager-TGfqyjuu.esm.js} +2 -2
- package/dist/{ekybStateMachine-DIRBMkaD.esm.js → ekybStateMachine-DBgFuEPK.esm.js} +26 -44
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-BSQteIfC.d.ts} +1 -1
- package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-C2cgG2Pl.esm.js} +2 -2
- package/dist/ekycStateMachine-CuNF7z4O.esm.js +7505 -0
- package/dist/ekycUtils-BFncpC4F.esm.js +1401 -0
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-Btsa7Prh.esm.js → electronicSignatureManager-C7pqXsRm.esm.js} +4 -4
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-ButFktRm.esm.js → emailManager-FH_CP0cT.esm.js} +2 -2
- package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-Cx-uTaBV.esm.js} +32 -20
- package/dist/{events-Du2A4-Qr.esm.js → events-CQteqXfy.esm.js} +2 -2
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +35 -21
- package/dist/extensibility.esm.js +34 -34
- 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-C-xKdj-d.d.ts} +71 -66
- package/dist/{faceCaptureManagerFactory-CdDfnyyb.esm.js → faceCaptureManagerFactory-CBm05KnT.esm.js} +4 -4
- package/dist/{faceCaptureSetup-CCucWLdy.esm.js → faceCaptureSetup-BQjCbL51.esm.js} +82 -64
- package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-B2zp7yP4.esm.js} +2 -2
- package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-Z4UDLwAv.d.ts} +16 -7
- package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-ByTMQCUC.esm.js} +40 -27
- package/dist/{feature-management-DCD0I_XZ.esm.js → feature-management-DjAG5lsJ.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-CC0vKmpf.esm.js} +2 -2
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-Be-r4oZj.esm.js} +4 -4
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +10 -10
- package/dist/flow.esm.js +8 -11
- package/dist/{flowCompletionService-xFODSJEq.esm.js → flowCompletionService-ChMU2v79.esm.js} +2 -2
- package/dist/{flowServices-COMEf-WP.esm.js → flowServices-g2tVWsJl.esm.js} +8 -50
- 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-B2C2yfrn.esm.js → geolocationManager-DLbvZwUB.esm.js} +6 -8
- package/dist/{geolocationStateMachine-Dbg9jw62.esm.js → geolocationStateMachine-CAJVongM.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-CkX9TEkh.esm.js} +2 -2
- package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-PTPCP26N.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.esm.js +2 -2
- package/dist/id-selfie-flow.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +9 -9
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +3 -16
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-MSQoqScU.esm.js} +3 -3
- package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-DzTfQ1Am.d.ts} +66 -5
- package/dist/{idCaptureManager-DZtgScdd.esm.js → idCaptureManager-zZdTcpG1.esm.js} +63 -17
- package/dist/{idCaptureServices-mpibFz4U.esm.js → idCaptureServices-8OHinO0N.esm.js} +9 -9
- package/dist/{idCaptureStateMachine-DWJOHeGn.esm.js → idCaptureStateMachine-B3G6XoDG.esm.js} +914 -536
- package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-B64-fjWg.esm.js} +2 -2
- package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-B1aZnobs.esm.js} +2 -2
- package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-_Kebv-Ue.esm.js} +2 -2
- package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-DQn6c84z.esm.js} +1 -1
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-DDXkNVZi.esm.js} +2 -2
- package/dist/{identityReuseManager-B1birg5X.d.ts → identityReuseManager-ooAbp6Kc.d.ts} +4 -4
- package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-Bcnkbjf8.esm.js} +1 -1
- package/dist/{index-BKOWUhxG.d.ts → index-DEfwds5y.d.ts} +55 -8
- package/dist/{index-CKQ9QBZP.d.ts → index-DMDAk85K.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-CXIBwBeE.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-43W5d_8G.esm.js} +4 -3
- package/dist/{mandatoryConsentManager-okPILEru.d.ts → mandatoryConsentManager-xx3mY-xw.d.ts} +13 -6
- package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-CVlgdlnt.esm.js} +20 -7
- package/dist/{multipartRecordingService-CLwrF5wD.esm.js → multipartRecordingService-DMBxHKS2.esm.js} +3 -13
- package/dist/nationalIds-B91f_RuB.esm.js +99 -0
- package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-B3OPL8Si.esm.js} +1 -1
- package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-DnBAN_hW.esm.js} +4 -4
- 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/{phoneManager-BO-LTih5.d.ts → phoneManager-6nrJkvkG.d.ts} +5 -0
- package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-C6jut_pz.esm.js} +3 -3
- package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-T1-drWfG.esm.js} +37 -25
- 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-BWme3kVV.esm.js +21 -0
- package/dist/qe-signature.esm.js +1 -1
- 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-BJXC6Kx9.esm.js} +4 -3
- package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-Dm9ctRCC.d.ts} +3 -1
- package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-BBMAc2Gb.esm.js} +27 -6
- package/dist/{runChildModule-C09a9ACV.esm.js → runChildModule-DPHTqSdF.esm.js} +3 -3
- package/dist/{sdkVersion-xE2xE2_9.esm.js → sdkVersion-C3_P-Qbq.esm.js} +1 -1
- package/dist/selfie.d.ts +4 -4
- package/dist/selfie.esm.js +10 -10
- package/dist/{selfieErrorUtils-CoXIxVCy.esm.js → selfieErrorUtils-BL0BLMnp.esm.js} +1 -1
- package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-BMmpUii2.d.ts} +1 -1
- package/dist/{selfieManager-RcVUu1KJ.esm.js → selfieManager-Cbliomv7.esm.js} +5 -5
- package/dist/{selfieStateMachine-nWbIRIBD.esm.js → selfieStateMachine-B5m_Kn0O.esm.js} +3 -3
- package/dist/{session-Cr4IVgYu.esm.js → session-DAaAewMX.esm.js} +77 -9
- package/dist/session.d.ts +96 -10
- package/dist/session.esm.js +7 -6
- package/dist/{sessionInitializer-c3CChZts.esm.js → sessionInitializer-CWFT4dfw.esm.js} +402 -202
- package/dist/{setup-BvKrAlOo.esm.js → setup-CDAKwTr7.esm.js} +32 -19
- package/dist/{setup-YPKTUCY5.d.ts → setup-D9qt8YVU.d.ts} +2 -2
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-BeEVCcsC.esm.js} +2 -2
- package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-_1c1vSid.esm.js} +1 -1
- package/dist/{stats-BEvexnKC.esm.js → stats-BpMz-hTP.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/{tri-xzRLIIMN.esm.js → tri-BajQnjbf.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-BAvhAU7T.esm.js → trueSightService-BujtUIW6.esm.js} +19 -10
- package/dist/trust-graph.esm.js +1 -1
- package/dist/{types-yPH8lAH-.d.ts → types--3HDl2SF.d.ts} +2 -2
- package/dist/types-B2FK_wYb.d.ts +249 -0
- package/dist/types-B9C8W01q.d.ts +34 -0
- package/dist/{types-0L-eFDmr.d.ts → types-C397LhmN.d.ts} +1 -1
- package/dist/types-D9r3zRfY.d.ts +6 -0
- package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
- package/dist/{types-B6HsSzpk.d.ts → types-DuD8TRJU.d.ts} +3 -2
- package/dist/{types-Ckir_BEs.d.ts → types-PTZHRhGX.d.ts} +1 -1
- package/dist/{types-DUnFZ08M.d.ts → types-ZTZelfbM.d.ts} +2 -2
- package/dist/{types-CK8Jbjkp.d.ts → types-e8fCsvvk.d.ts} +1 -1
- package/dist/{types-BAxn7MpY.d.ts → types-xEEWCx1j.d.ts} +123 -48
- 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 +95 -22
- package/dist/{videoSelfieCameraWarmer-LeE2vbAW.esm.js → videoSelfieCameraWarmer-DjkPpoj_.esm.js} +18 -21
- package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-RfSmlFFW.d.ts} +9 -4
- package/dist/{warmup-BElYWRh7.esm.js → warmup-BkfxQZsC.esm.js} +175 -11
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +3 -3
- package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-BhU5H2oR.esm.js} +1 -1
- package/dist/wasmMetadataVersionSync-U8EFUr1T.esm.js +27 -0
- package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-DTj9auyA.esm.js} +43 -17
- 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-CZZOFkGl.esm.js → watchlistForBusinessManager-CVay6-9A.esm.js} +37 -7
- package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-DX2AyM4Y.d.ts} +54 -18
- package/dist/watchlistForBusinessStateMachine-DA6K5na4.esm.js +166 -0
- package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-B8gQ_rw3.esm.js} +2 -2
- package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-CSi_ZhtT.esm.js} +1 -1
- package/dist/workflow.d.ts +5 -2
- package/dist/workflow.esm.js +57 -47
- package/package.json +3 -2
- package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
- 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,10 +1,11 @@
|
|
|
1
1
|
import { y as IncodeCanvas } from "./createFaceAvatar-lYX0VTYs.js";
|
|
2
|
-
import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-
|
|
3
|
-
import { a as IStorageCapability } from "./IWasmUtilCapability-
|
|
2
|
+
import { a as RegulationTypes, n as Flow, o as TutorialIdConfig } from "./types-DuD8TRJU.js";
|
|
3
|
+
import { a as IStorageCapability } from "./IWasmUtilCapability-Cqiaxydi.js";
|
|
4
4
|
import { t as PermissionResult } from "./types-BEwVKkLJ.js";
|
|
5
|
-
import { n as DeepsightService, t as StreamCanvasCapture } from "./StreamCanvasCapture-
|
|
5
|
+
import { n as DeepsightService, t as StreamCanvasCapture } from "./StreamCanvasCapture-C3xNfOsv.js";
|
|
6
6
|
import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
7
7
|
import { i as Pdf417DecodeResult, n as IIdCaptureCapability, r as IdCaptureSettings, t as DetectionOrientation } from "./IIdCaptureCapability-CGcEt2Cw.js";
|
|
8
|
+
import { n as IGeolocationCapability, t as GeolocationCoords } from "./IGeolocationCapability-r49Qo7rR.js";
|
|
8
9
|
//#region ../infra/src/capabilities/IDigitalCredentialsCapability.d.ts
|
|
9
10
|
/**
|
|
10
11
|
* Digital Credentials capability — wraps the W3C Digital Credentials API
|
|
@@ -95,25 +96,68 @@ type RedirectReturnParams = {
|
|
|
95
96
|
resultsAccessKey: string;
|
|
96
97
|
};
|
|
97
98
|
//#endregion
|
|
99
|
+
//#region src/modules/id/deviceWallet/types.d.ts
|
|
100
|
+
/** Which wallet backend the handshake talks to. */
|
|
101
|
+
type DeviceWalletPlatform = 'ios' | 'android';
|
|
102
|
+
/** Explicit provider override, mirroring V1's `DigitalIdWalletProvider`. */
|
|
103
|
+
type DeviceWalletProvider = 'apple_web' | 'google';
|
|
104
|
+
type DeviceWalletDecision = 'ACCEPTED' | 'REJECTED';
|
|
105
|
+
/**
|
|
106
|
+
* Failure classification.
|
|
107
|
+
* - `UNSUPPORTED_PLATFORM` — no Credentials API. The digital-ID funnel
|
|
108
|
+
* resolves this away before the machine is invoked; kept for the defensive
|
|
109
|
+
* path when the machine is started on an unsupported environment anyway.
|
|
110
|
+
* - `NO_CREDENTIAL` — the wallet sheet completed without a credential (user
|
|
111
|
+
* dismissed, or no eligible digital ID on the device).
|
|
112
|
+
* - `WALLET_ERROR` — anything else (request/decrypt HTTP failure, the
|
|
113
|
+
* Credentials API rejecting, missing activation, protocol errors).
|
|
114
|
+
*/
|
|
115
|
+
type DeviceWalletFailReason = 'UNSUPPORTED_PLATFORM' | 'NO_CREDENTIAL' | 'WALLET_ERROR';
|
|
116
|
+
/** Response of both decrypt endpoints. Attributes are not inline (see above). */
|
|
117
|
+
type DeviceWalletDecryptResponse = {
|
|
118
|
+
success: boolean;
|
|
119
|
+
decision?: DeviceWalletDecision;
|
|
120
|
+
[key: string]: unknown;
|
|
121
|
+
};
|
|
122
|
+
/** Injectable service seam (mirrors digital-id-redirect's services pattern). */
|
|
123
|
+
type DeviceWalletServices = {
|
|
124
|
+
/** Builds the wallet request payload for the platform. */
|
|
125
|
+
requestWalletData: (platform: DeviceWalletPlatform, signal?: AbortSignal) => Promise<DigitalCredentialRequestOptions>;
|
|
126
|
+
/** Forwards the opaque wallet response for backend decryption. */
|
|
127
|
+
decryptWalletResponse: (platform: DeviceWalletPlatform, walletResponse: string, signal?: AbortSignal) => Promise<DeviceWalletDecryptResponse>;
|
|
128
|
+
};
|
|
129
|
+
/**
|
|
130
|
+
* Terminal machine output read by the ID-Capture parent (`onDone`).
|
|
131
|
+
* Projected by the machine's ROOT `output` — a top-level final node's own
|
|
132
|
+
* `output` does not propagate in this XState version.
|
|
133
|
+
*/
|
|
134
|
+
type DeviceWalletOutput = {
|
|
135
|
+
result: 'success';
|
|
136
|
+
decision: DeviceWalletDecision | undefined;
|
|
137
|
+
response: DeviceWalletDecryptResponse;
|
|
138
|
+
} | {
|
|
139
|
+
result: 'dismissed';
|
|
140
|
+
};
|
|
141
|
+
//#endregion
|
|
98
142
|
//#region src/modules/id/digitalIdRegistry.d.ts
|
|
99
143
|
/**
|
|
100
144
|
* True when a digital-ID method uses a full-page web-redirect flow (Trinsic
|
|
101
|
-
* iDIN
|
|
145
|
+
* iDIN, FTN, itsme, …). Accepts both the module `FlowType` value (`REDIRECT`) and the
|
|
102
146
|
* backend value (`WEB_REDIRECT`). (Lives here rather than in
|
|
103
147
|
* `idCaptureHelpers` to keep the registry free of circular imports; the
|
|
104
148
|
* helpers re-export it.)
|
|
105
149
|
*/
|
|
106
150
|
declare function isRedirectFlowType(flowType: string): boolean;
|
|
107
151
|
/** Digital-ID document schemes the SDK knows how to verify. */
|
|
108
|
-
type DigitalIdDocumentType = 'mDL' | 'iDIN' | 'FTN';
|
|
152
|
+
type DigitalIdDocumentType = 'mDL' | 'iDIN' | 'FTN' | 'itsme' | 'SPID' | 'MitID' | 'BankIDSweden' | 'FranceIdentite' | 'IdentiteNumerique' | 'LAWallet' | 'DigiLocker';
|
|
109
153
|
/** One way to fulfil a `DigitalIdDocumentType`, in funnel priority order. */
|
|
110
154
|
type DigitalIdFunnelEntry = {
|
|
111
155
|
/**
|
|
112
156
|
* Incode-native device-wallet handshake (Apple Wallet web / Google
|
|
113
|
-
* Wallet). Activation is computed by `
|
|
114
|
-
*
|
|
115
|
-
* `
|
|
116
|
-
* its own.
|
|
157
|
+
* Wallet). Activation is computed by `hasEligibleDeviceWallet` — an
|
|
158
|
+
* enabled wallet method in `config.digitalIds` that this device can
|
|
159
|
+
* reach, else the `deviceWallet` flag — so this entry carries no
|
|
160
|
+
* config-field name of its own.
|
|
117
161
|
*/
|
|
118
162
|
kind: 'incodeWallet';
|
|
119
163
|
/** Chooser tile this entry surfaces as. */
|
|
@@ -129,6 +173,11 @@ type DigitalIdFunnelEntry = {
|
|
|
129
173
|
* activates this entry (e.g. `IDIN`).
|
|
130
174
|
*/
|
|
131
175
|
method: string;
|
|
176
|
+
/**
|
|
177
|
+
* ISO alpha-2 countries the provider serves. Fallback for chooser
|
|
178
|
+
* ranking when the backend sends a method without `countries`.
|
|
179
|
+
*/
|
|
180
|
+
countries?: readonly string[];
|
|
132
181
|
};
|
|
133
182
|
declare const DIGITAL_ID_REGISTRY: Record<DigitalIdDocumentType, readonly DigitalIdFunnelEntry[]>;
|
|
134
183
|
declare const DIGITAL_ID_DOCUMENT_TYPES: DigitalIdDocumentType[];
|
|
@@ -144,6 +193,19 @@ type ResolvedDigitalIdRoute = {
|
|
|
144
193
|
type DigitalIdPlatformSupport = {
|
|
145
194
|
/** `IDigitalCredentialsCapability.isAvailable()`. */
|
|
146
195
|
credentialsAvailable: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* The OS wallet this device reaches (`resolveWalletPlatform()`): `ios` for
|
|
198
|
+
* Apple Wallet (iOS / iPadOS / macOS Safari), `android` for Google Wallet
|
|
199
|
+
* (everything else). Drives the per-wallet hard filter — Apple Wallet is
|
|
200
|
+
* never offered on `android`, Google Wallet never on `ios`. Omitted → no
|
|
201
|
+
* per-wallet filtering (callers that predate the filter).
|
|
202
|
+
*/
|
|
203
|
+
walletPlatform?: DeviceWalletPlatform;
|
|
204
|
+
/**
|
|
205
|
+
* Whether this is a Samsung device (`isSamsungDevice()`). Samsung Wallet is
|
|
206
|
+
* Samsung-only. Omitted → not filtered.
|
|
207
|
+
*/
|
|
208
|
+
samsungDevice?: boolean;
|
|
147
209
|
};
|
|
148
210
|
/**
|
|
149
211
|
* Resolves the implementation that should fulfil a digital-ID document type:
|
|
@@ -152,47 +214,31 @@ type DigitalIdPlatformSupport = {
|
|
|
152
214
|
*/
|
|
153
215
|
declare function resolveDigitalIdImplementation(docType: DigitalIdDocumentType, config: Pick<IdCaptureConfig, 'deviceWallet' | 'digitalIds'>, platform: DigitalIdPlatformSupport): ResolvedDigitalIdRoute | undefined;
|
|
154
216
|
//#endregion
|
|
155
|
-
//#region src/
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
* - `UNSUPPORTED_PLATFORM` — no Credentials API. The digital-ID funnel
|
|
164
|
-
* resolves this away before the machine is invoked; kept for the defensive
|
|
165
|
-
* path when the machine is started on an unsupported environment anyway.
|
|
166
|
-
* - `NO_CREDENTIAL` — the wallet sheet completed without a credential (user
|
|
167
|
-
* dismissed, or no eligible digital ID on the device).
|
|
168
|
-
* - `WALLET_ERROR` — anything else (request/decrypt HTTP failure, the
|
|
169
|
-
* Credentials API rejecting, missing activation, protocol errors).
|
|
170
|
-
*/
|
|
171
|
-
type DeviceWalletFailReason = 'UNSUPPORTED_PLATFORM' | 'NO_CREDENTIAL' | 'WALLET_ERROR';
|
|
172
|
-
/** Response of both decrypt endpoints. Attributes are not inline (see above). */
|
|
173
|
-
type DeviceWalletDecryptResponse = {
|
|
174
|
-
success: boolean;
|
|
175
|
-
decision?: DeviceWalletDecision;
|
|
176
|
-
[key: string]: unknown;
|
|
177
|
-
};
|
|
178
|
-
/** Injectable service seam (mirrors digital-id-redirect's services pattern). */
|
|
179
|
-
type DeviceWalletServices = {
|
|
180
|
-
/** Builds the wallet request payload for the platform. */
|
|
181
|
-
requestWalletData: (platform: DeviceWalletPlatform, signal?: AbortSignal) => Promise<DigitalCredentialRequestOptions>;
|
|
182
|
-
/** Forwards the opaque wallet response for backend decryption. */
|
|
183
|
-
decryptWalletResponse: (platform: DeviceWalletPlatform, walletResponse: string, signal?: AbortSignal) => Promise<DeviceWalletDecryptResponse>;
|
|
217
|
+
//#region ../infra/src/capabilities/ILocaleCapability.d.ts
|
|
218
|
+
type ILocaleCapability = {
|
|
219
|
+
/**
|
|
220
|
+
* The user's preferred languages as BCP 47 tags, most preferred first
|
|
221
|
+
* (`navigator.languages`, e.g. `['sv-SE', 'en-GB']`). Empty when the
|
|
222
|
+
* environment exposes none.
|
|
223
|
+
*/
|
|
224
|
+
getPreferredLanguages(): readonly string[];
|
|
184
225
|
};
|
|
226
|
+
//#endregion
|
|
227
|
+
//#region src/modules/id/digitalIdCountry.d.ts
|
|
185
228
|
/**
|
|
186
|
-
*
|
|
187
|
-
*
|
|
188
|
-
* `
|
|
229
|
+
* The country signals ID Capture ranks digital-ID options by. Every field is
|
|
230
|
+
* optional; an absent one is simply not consulted. `createIdCaptureActor`
|
|
231
|
+
* fills `ipCountry` and `locale`; the GPS pair is opt-in.
|
|
189
232
|
*/
|
|
190
|
-
type
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
233
|
+
type DigitalIdCountryDetectionDependencies = {
|
|
234
|
+
/** IP → ISO alpha-2. Defaults to the backend geo-IP lookup. */
|
|
235
|
+
ipCountry?: (signal?: AbortSignal) => Promise<string | undefined>;
|
|
236
|
+
/** Browser language preferences, read for their region subtag. */
|
|
237
|
+
locale?: ILocaleCapability;
|
|
238
|
+
/** Position source for the GPS signal. Needs `reverseGeocodeCountry`. */
|
|
239
|
+
geolocation?: IGeolocationCapability;
|
|
240
|
+
/** Coordinates → ISO alpha-2. Without it the GPS signal is skipped. */
|
|
241
|
+
reverseGeocodeCountry?: (coords: GeolocationCoords, signal?: AbortSignal) => Promise<string | undefined>;
|
|
196
242
|
};
|
|
197
243
|
//#endregion
|
|
198
244
|
//#region ../infra/src/capabilities/IAnalyticsCapability.d.ts
|
|
@@ -752,6 +798,19 @@ type IdCaptureContext = {
|
|
|
752
798
|
* `availableDocumentTypes` whenever this list is non-empty.
|
|
753
799
|
*/
|
|
754
800
|
digitalIdRedirectOptions: IdCaptureDigitalIdRedirectOption[];
|
|
801
|
+
/**
|
|
802
|
+
* Countries the user is likely in, strongest signal first, from the
|
|
803
|
+
* `detectingCountry` step before the chooser; `digitalIdRedirectOptions`
|
|
804
|
+
* is ranked by them. `undefined` until detection ran — it only runs when
|
|
805
|
+
* ranking can change the order — and `[]` when no signal answered.
|
|
806
|
+
*/
|
|
807
|
+
detectedCountries: string[] | undefined;
|
|
808
|
+
/**
|
|
809
|
+
* The wallet family this device certainly reaches, read once from the user
|
|
810
|
+
* agent when the machine starts (`resolveWalletDevice`); names the wallet on
|
|
811
|
+
* the Digital ID chooser card. `undefined` when the OS is not certain.
|
|
812
|
+
*/
|
|
813
|
+
walletDevice: 'apple' | 'samsung' | 'android' | undefined;
|
|
755
814
|
/**
|
|
756
815
|
* Provider picked on the chooser (`SELECT_DOCUMENT` with `providerId`).
|
|
757
816
|
* Preset on the `digitalIdRedirect` child so the verification is created for
|
|
@@ -786,6 +845,15 @@ type IdCaptureEvent = {
|
|
|
786
845
|
* Omitted → the first configured redirect method is launched.
|
|
787
846
|
*/
|
|
788
847
|
providerId?: DigitalIdProviderId;
|
|
848
|
+
} |
|
|
849
|
+
/**
|
|
850
|
+
* On the chooser: the user picked the country to view options for. The
|
|
851
|
+
* redirect options are re-ranked with it as the strongest country; nothing
|
|
852
|
+
* is added or removed.
|
|
853
|
+
*/
|
|
854
|
+
{
|
|
855
|
+
type: 'SET_CHOOSER_COUNTRY';
|
|
856
|
+
country: string;
|
|
789
857
|
} | {
|
|
790
858
|
type: 'NEXT_STEP';
|
|
791
859
|
} | {
|
|
@@ -927,6 +995,13 @@ type IdCaptureDependencies = {
|
|
|
927
995
|
* `BrowserDigitalCredentialsProvider` at the composition points.
|
|
928
996
|
*/
|
|
929
997
|
credentials?: IDigitalCredentialsCapability;
|
|
998
|
+
/**
|
|
999
|
+
* Country signals the chooser ranks digital-ID redirect options by (GPS →
|
|
1000
|
+
* IP → browser locale; see `detectDigitalIdCountries`). `createIdCaptureActor`
|
|
1001
|
+
* fills the IP and locale signals; the GPS pair is opt-in. Absent (direct
|
|
1002
|
+
* machine construction) → no ranking, backend order.
|
|
1003
|
+
*/
|
|
1004
|
+
countryDetection?: DigitalIdCountryDetectionDependencies;
|
|
930
1005
|
trackCaptureAttemptFinished?: (payload: {
|
|
931
1006
|
logs: string;
|
|
932
1007
|
resolution?: string;
|
|
@@ -970,4 +1045,4 @@ type IdCaptureOutput = {
|
|
|
970
1045
|
skipFaceMatch: boolean;
|
|
971
1046
|
} | undefined;
|
|
972
1047
|
//#endregion
|
|
973
|
-
export {
|
|
1048
|
+
export { DigitalIdCountryDetectionDependencies as A, DeviceWalletDecryptResponse as B, IdCapturedImageData as C, IdFlowStep as D, IdErrorCode as E, DigitalIdPlatformSupport as F, DeviceWalletServices as G, DeviceWalletOutput as H, ResolvedDigitalIdRoute as I, RedirectReturnParams as J, DigitalIdProviderId as K, isRedirectFlowType as L, DIGITAL_ID_REGISTRY as M, DigitalIdDocumentType as N, UploadIdResponse as O, DigitalIdFunnelEntry as P, resolveDigitalIdImplementation as R, IdCaptureThresholds as S, IdError as T, DeviceWalletPlatform as U, DeviceWalletFailReason as V, DeviceWalletProvider as W, IDigitalCredentialsCapability as Y, IdCaptureGeometry as _, CaptureOnlyResponse as a, IdCaptureOnlyConfig as b, DetectionStatus as c, IdCaptureContext as d, IdCaptureDependencies as f, IdCaptureEvent as g, IdCaptureDigitalIdRedirectOption as h, CaptureIdResponse as i, DIGITAL_ID_DOCUMENT_TYPES as j, IAnalyticsCapability as k, ID_ERROR_CODES as l, IdCaptureDigitalIdMethod as m, AcceptedDocumentType as n, CapturedImage as o, IdCaptureDigitalIdFlowType as p, FailureReason as q, AddBarcodeV3Response as r, DetectionArea as s, AcceptedDocument as t, IdCaptureConfig as u, IdCaptureInput as v, IdDocumentType as w, IdCaptureOutput as x, IdCaptureMode as y, DeviceWalletDecision as z };
|
|
@@ -6,6 +6,9 @@ function getUrlSearchParam(url, param) {
|
|
|
6
6
|
return null;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
+
function resolveAgainstPageOrigin(path) {
|
|
10
|
+
return new URL(path, window.location.origin).href;
|
|
11
|
+
}
|
|
9
12
|
function buildUrlWithSearchParams(baseUrl, params) {
|
|
10
13
|
const url = new URL(baseUrl);
|
|
11
14
|
for (const [key, value] of Object.entries(params)) if (value !== void 0) url.searchParams.set(key, value);
|
|
@@ -20,4 +23,4 @@ function stripUrlQueryAndFragment(url) {
|
|
|
20
23
|
}
|
|
21
24
|
}
|
|
22
25
|
//#endregion
|
|
23
|
-
export { getUrlSearchParam as n,
|
|
26
|
+
export { stripUrlQueryAndFragment as i, getUrlSearchParam as n, resolveAgainstPageOrigin as r, buildUrlWithSearchParams as t };
|
package/dist/video-selfie.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import "./Actor-DpTj5PFb.js";
|
|
|
5
5
|
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
|
|
6
6
|
import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
7
7
|
import { t as DetectionOrientation } from "./IIdCaptureCapability-CGcEt2Cw.js";
|
|
8
|
-
import { a as FacingMode, i as CameraCompositor, n as VideoSelfieDetectionStatus, o as VideoSelfieConfig, r as VideoSelfieValidationFailure, s as
|
|
8
|
+
import { a as FacingMode, c as VideoSelfieStep, i as CameraCompositor, n as VideoSelfieDetectionStatus, o as VideoSelfieConfig, r as VideoSelfieValidationFailure, s as VideoSelfieSpeechResult, t as StepDetector } from "./videoSelfieStepDetector-RfSmlFFW.js";
|
|
9
9
|
//#region ../infra/src/capabilities/ITimerCapability.d.ts
|
|
10
10
|
type TimerHandle = ReturnType<typeof setTimeout>;
|
|
11
11
|
type ITimerCapability = {
|
|
@@ -162,7 +162,7 @@ type VideoSelfieRecordingDependencies = {
|
|
|
162
162
|
* `error` for diagnostics/hosts, the UI shows its generic fallback);
|
|
163
163
|
* `maxVideoLengthReached` is the configured recording limit; and
|
|
164
164
|
* `validationAttemptsExhausted` terminates the module after the last allowed
|
|
165
|
-
* ID or
|
|
165
|
+
* ID, selfie, or speech validation failure.
|
|
166
166
|
*/
|
|
167
167
|
type VideoSelfieErrorKind = 'connection' | 'technical' | 'maxVideoLengthReached' | 'validationAttemptsExhausted';
|
|
168
168
|
//#endregion
|
|
@@ -201,7 +201,7 @@ type VideoSelfieRecordingState = {
|
|
|
201
201
|
orientation: DetectionOrientation | undefined;
|
|
202
202
|
/** Validation failure shown during the current retry/exhaustion dwell. */
|
|
203
203
|
validationFailure: VideoSelfieValidationFailure | undefined;
|
|
204
|
-
/** Remaining validation attempts for the active capture step; `-1` means unlimited. */
|
|
204
|
+
/** Remaining validation attempts for the active capture or speech step; `-1` means unlimited. */
|
|
205
205
|
attemptsRemaining: number;
|
|
206
206
|
/** The completed upload id, available during `success` and `finished`. */
|
|
207
207
|
recordingId: string | null;
|
|
@@ -216,7 +216,7 @@ type VideoSelfieRecordingState = {
|
|
|
216
216
|
* the connection-error copy; raw detail stays in `error` for diagnostics)
|
|
217
217
|
* or `technical` (recoverable technical failures), or
|
|
218
218
|
* `maxVideoLengthReached` (the configured recording limit), or
|
|
219
|
-
* `validationAttemptsExhausted` (terminal ID/selfie validation failure).
|
|
219
|
+
* `validationAttemptsExhausted` (terminal ID/selfie/speech validation failure).
|
|
220
220
|
* Set when `status === 'error'`.
|
|
221
221
|
*/
|
|
222
222
|
errorKind: VideoSelfieErrorKind | undefined;
|
|
@@ -238,6 +238,8 @@ declare function createVideoSelfieRecordingManager(options?: CreateVideoSelfieRe
|
|
|
238
238
|
* facing mode differs; finalizes the upload on the last step.
|
|
239
239
|
*/
|
|
240
240
|
nextStep(): void;
|
|
241
|
+
/** Report a speech verdict; Core counts rejections and finalizes on exhaustion. */
|
|
242
|
+
reportSpeechResult(result: VideoSelfieSpeechResult): void;
|
|
241
243
|
/** Abandon the session without finalizing the upload. */
|
|
242
244
|
abort(): void;
|
|
243
245
|
};
|
|
@@ -340,9 +342,7 @@ type ConsentRecorder = {
|
|
|
340
342
|
/** Start capturing audio from the given stream (uses its audio tracks). */
|
|
341
343
|
start(stream: MediaStream): void;
|
|
342
344
|
/** Stop, encode to MP3 base64, and upload. Resolves the backend verdict. */
|
|
343
|
-
submit(): Promise<
|
|
344
|
-
success: boolean;
|
|
345
|
-
}>;
|
|
345
|
+
submit(): Promise<VideoSelfieSpeechResult>;
|
|
346
346
|
/** Stop and discard without uploading (consent check disabled, or abort). */
|
|
347
347
|
cancel(): void;
|
|
348
348
|
};
|
|
@@ -383,4 +383,4 @@ declare const videoSelfieFlowModuleMachine: StateMachine<MachineContext, AnyEven
|
|
|
383
383
|
//#region src/internal/orchestration/advanceableErrors.d.ts
|
|
384
384
|
declare const VIDEO_SELFIE_VALIDATION_ATTEMPTS_EXHAUSTED_CODE = "VIDEO_SELFIE_VALIDATION_ATTEMPTS_EXHAUSTED";
|
|
385
385
|
//#endregion
|
|
386
|
-
export { type ConsentRecorder, type CreateVideoSelfieRecordingActorOptions, VIDEO_SELFIE_VALIDATION_ATTEMPTS_EXHAUSTED_CODE, type VideoSelfieCameraWarmer, type VideoSelfieConfig, type VideoSelfieQuestion, type VideoSelfieRecordingManager, type VideoSelfieRecordingState, type VideoSelfieRecordingStatus, type VideoSelfieStep, createConsentRecorder, createVideoSelfieCameraWarmer, createVideoSelfieRecordingManager, facingModeForStep, getVideoSelfieQuestions, getVoiceConsentPhrase, resolveVideoSelfieSteps, videoSelfieFlowModuleMachine, videoSelfieWasmPipelines, warmupVideoSelfieWasm };
|
|
386
|
+
export { type ConsentRecorder, type CreateVideoSelfieRecordingActorOptions, VIDEO_SELFIE_VALIDATION_ATTEMPTS_EXHAUSTED_CODE, type VideoSelfieCameraWarmer, type VideoSelfieConfig, type VideoSelfieQuestion, type VideoSelfieRecordingManager, type VideoSelfieRecordingState, type VideoSelfieRecordingStatus, type VideoSelfieSpeechResult, type VideoSelfieStep, createConsentRecorder, createVideoSelfieCameraWarmer, createVideoSelfieRecordingManager, facingModeForStep, getVideoSelfieQuestions, getVoiceConsentPhrase, resolveVideoSelfieSteps, videoSelfieFlowModuleMachine, videoSelfieWasmPipelines, warmupVideoSelfieWasm };
|
package/dist/video-selfie.esm.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { t as ensureWasmPipelines } from "./setup-
|
|
2
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
3
|
-
import { t as api, u as endpoints } from "./api-
|
|
1
|
+
import { t as ensureWasmPipelines } from "./setup-CDAKwTr7.esm.js";
|
|
2
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-GTkoJyFY.esm.js";
|
|
3
|
+
import { t as api, u as endpoints } from "./api-BO8JA7Pf.esm.js";
|
|
4
4
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
5
5
|
import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
|
|
6
|
-
import { d as facingModeForStep, f as resolveVideoSelfieSteps, p as videoSelfieWasmPipelines } from "./flowServices-
|
|
7
|
-
import { i as assign, r as sendTo, s as createActor, t as setup, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
6
|
+
import { d as facingModeForStep, f as resolveVideoSelfieSteps, p as videoSelfieWasmPipelines } from "./flowServices-g2tVWsJl.esm.js";
|
|
7
|
+
import { i as assign, l as raise, r as sendTo, s as createActor, t as setup, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
8
8
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
9
9
|
import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
10
|
+
import { t as carryAttempts } from "./attemptCarry-BjTJ6bMQ.esm.js";
|
|
11
|
+
import { i as createRecordingCompositor, n as WorkerEncoderRecordingProvider, t as MultipartRecordingService } from "./multipartRecordingService-DMBxHKS2.esm.js";
|
|
12
|
+
import { t as VIDEO_SELFIE_VALIDATION_ATTEMPTS_EXHAUSTED_CODE } from "./advanceableErrors-k-U-cL5m.esm.js";
|
|
13
|
+
import { n as defaultAcquireCamera, r as createDefaultStepDetector, s as isConnectionError, t as createVideoSelfieCameraWarmer } from "./videoSelfieCameraWarmer-DjkPpoj_.esm.js";
|
|
13
14
|
import { t as videoSelfieFlowModuleMachine } from "./videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js";
|
|
14
15
|
//#region ../../node_modules/.pnpm/audio-recorder-polyfill@0.4.1/node_modules/audio-recorder-polyfill/wave-encoder/index.js
|
|
15
16
|
var wave_encoder_default = () => {
|
|
@@ -726,6 +727,7 @@ const videoSelfieRecordingSetup = setup({
|
|
|
726
727
|
error: () => "Video selfie validation attempts exhausted",
|
|
727
728
|
errorKind: () => "validationAttemptsExhausted"
|
|
728
729
|
}),
|
|
730
|
+
consumeSpeechAttempt: assign({ speechAttemptsRemaining: ({ context }) => context.speechAttemptsRemaining === UNLIMITED_ATTEMPTS ? UNLIMITED_ATTEMPTS : Math.max(0, context.speechAttemptsRemaining - 1) }),
|
|
729
731
|
resetSession: assign(({ context }) => ({
|
|
730
732
|
stepIndex: 0,
|
|
731
733
|
cameraSwitchRetried: false,
|
|
@@ -739,6 +741,7 @@ const videoSelfieRecordingSetup = setup({
|
|
|
739
741
|
recordingId: null,
|
|
740
742
|
error: void 0,
|
|
741
743
|
errorKind: void 0,
|
|
744
|
+
speechAccepted: false,
|
|
742
745
|
resumeState: "recording"
|
|
743
746
|
})),
|
|
744
747
|
cleanup: ({ context }) => {
|
|
@@ -771,9 +774,15 @@ const videoSelfieRecordingSetup = setup({
|
|
|
771
774
|
}
|
|
772
775
|
},
|
|
773
776
|
guards: {
|
|
777
|
+
ignoreSpeechResult: ({ context }) => context.steps[context.stepIndex] !== "speech" || context.speechAccepted,
|
|
778
|
+
speechSubmissionFailed: ({ event }) => event.type === "SPEECH_RESULT" && event.result.errorKind !== void 0,
|
|
779
|
+
speechWasAccepted: ({ event }) => event.type === "SPEECH_RESULT" && event.result.success,
|
|
780
|
+
isLastSpeechAttempt: ({ context }) => context.speechAttemptsRemaining !== UNLIMITED_ATTEMPTS && context.speechAttemptsRemaining <= 1,
|
|
781
|
+
speechAccepted: ({ context }) => context.speechAccepted,
|
|
774
782
|
shouldEnterWasmGate: ({ context }) => context.ensureWasmReady !== void 0 && context.errorKind !== "maxVideoLengthReached" && context.errorKind !== "validationAttemptsExhausted",
|
|
775
783
|
isLastStep: ({ context }) => context.stepIndex >= context.steps.length - 1,
|
|
776
784
|
hasAttemptsRemaining: ({ context }) => context.attemptsRemaining === UNLIMITED_ATTEMPTS || context.attemptsRemaining > 0,
|
|
785
|
+
isOutOfAttempts: ({ context }) => context.attemptsRemaining === 0 || context.steps.includes("speech") && context.speechAttemptsRemaining === 0,
|
|
777
786
|
nextStepFlipsId: ({ context }) => context.steps[context.stepIndex] === "frontId" && context.steps[context.stepIndex + 1] === "backId",
|
|
778
787
|
nextStepFlipsCamera: ({ context }) => facingModeForStep(context.steps[context.stepIndex]) !== facingModeForStep(context.steps[context.stepIndex + 1]),
|
|
779
788
|
uploadReturnedNoRecordingId: ({ event }) => recordingIdFromEvent(event) === null,
|
|
@@ -812,11 +821,39 @@ const ADVANCE_TRANSITIONS = [
|
|
|
812
821
|
actions: "advanceStep"
|
|
813
822
|
}
|
|
814
823
|
];
|
|
824
|
+
const SPEECH_RESULT_TRANSITIONS = [
|
|
825
|
+
{ guard: "ignoreSpeechResult" },
|
|
826
|
+
{
|
|
827
|
+
guard: "speechSubmissionFailed",
|
|
828
|
+
target: "error",
|
|
829
|
+
actions: videoSelfieRecordingSetup.assign(({ event }) => ({
|
|
830
|
+
error: "Speech validation could not be completed",
|
|
831
|
+
errorKind: event.type === "SPEECH_RESULT" ? event.result.errorKind : void 0
|
|
832
|
+
}))
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
guard: "speechWasAccepted",
|
|
836
|
+
actions: videoSelfieRecordingSetup.assign({ speechAccepted: () => true })
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
guard: "isLastSpeechAttempt",
|
|
840
|
+
target: "finalizing",
|
|
841
|
+
actions: ["consumeSpeechAttempt", "setValidationAttemptsExhausted"]
|
|
842
|
+
},
|
|
843
|
+
{ actions: "consumeSpeechAttempt" }
|
|
844
|
+
];
|
|
815
845
|
const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
816
846
|
id: "videoSelfieRecording",
|
|
817
847
|
initial: "idle",
|
|
818
|
-
context: ({ input }) => {
|
|
848
|
+
context: ({ input, self }) => {
|
|
819
849
|
const visibilityObserver = input.visibilityObserver;
|
|
850
|
+
const carried = carryAttempts("videoSelfieRecording", self, (s) => ({
|
|
851
|
+
attemptsRemaining: s.context.attemptsRemaining,
|
|
852
|
+
speechAttemptsRemaining: s.context.speechAttemptsRemaining
|
|
853
|
+
}));
|
|
854
|
+
const perStep = normalizeAttempts(input.attemptsPerStep);
|
|
855
|
+
const attempts = perStep === UNLIMITED_ATTEMPTS ? perStep : Math.min(perStep, carried.attemptsRemaining ?? perStep);
|
|
856
|
+
const speechAttempts = perStep === UNLIMITED_ATTEMPTS ? perStep : Math.min(perStep, carried.speechAttemptsRemaining ?? perStep);
|
|
820
857
|
const compositor = input.dependencies?.createCompositor?.() ?? createRecordingCompositor();
|
|
821
858
|
return {
|
|
822
859
|
service: input.dependencies?.createRecordingService?.() ?? new MultipartRecordingService("videoselfie", new WorkerEncoderRecordingProvider(compositor)),
|
|
@@ -836,8 +873,10 @@ const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
|
836
873
|
orientation: void 0,
|
|
837
874
|
detectionError: void 0,
|
|
838
875
|
validationFailure: void 0,
|
|
839
|
-
attemptsPerStep:
|
|
840
|
-
attemptsRemaining:
|
|
876
|
+
attemptsPerStep: attempts,
|
|
877
|
+
attemptsRemaining: attempts,
|
|
878
|
+
speechAttemptsRemaining: speechAttempts,
|
|
879
|
+
speechAccepted: false,
|
|
841
880
|
maxVideoLengthSeconds: normalizeMaxVideoLength(input.maxVideoLengthSeconds),
|
|
842
881
|
recordingId: null,
|
|
843
882
|
error: void 0,
|
|
@@ -861,10 +900,18 @@ const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
|
861
900
|
FOREGROUND: { actions: "markPageVisible" }
|
|
862
901
|
},
|
|
863
902
|
states: {
|
|
864
|
-
idle: { on: { START: [
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
903
|
+
idle: { on: { START: [
|
|
904
|
+
{
|
|
905
|
+
target: "error",
|
|
906
|
+
guard: "isOutOfAttempts",
|
|
907
|
+
actions: "setValidationAttemptsExhausted"
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
target: "preparingWasm",
|
|
911
|
+
guard: "shouldEnterWasmGate"
|
|
912
|
+
},
|
|
913
|
+
{ target: "acquiringCamera" }
|
|
914
|
+
] } },
|
|
868
915
|
preparingWasm: { invoke: {
|
|
869
916
|
src: "prepareWasm",
|
|
870
917
|
input: ({ context }) => ({ ensure: context.ensureWasmReady }),
|
|
@@ -916,6 +963,10 @@ const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
|
916
963
|
} },
|
|
917
964
|
recording: {
|
|
918
965
|
entry: "clearDetectionFeedback",
|
|
966
|
+
always: {
|
|
967
|
+
guard: "speechAccepted",
|
|
968
|
+
actions: [assign({ speechAccepted: () => false }), raise({ type: "NEXT_STEP" })]
|
|
969
|
+
},
|
|
919
970
|
invoke: {
|
|
920
971
|
src: "detectStep",
|
|
921
972
|
input: ({ context }) => ({
|
|
@@ -937,6 +988,7 @@ const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
|
937
988
|
ORIENTATION: { actions: "setOrientation" },
|
|
938
989
|
DETECTION_DONE: ADVANCE_TRANSITIONS,
|
|
939
990
|
NEXT_STEP: ADVANCE_TRANSITIONS,
|
|
991
|
+
SPEECH_RESULT: SPEECH_RESULT_TRANSITIONS,
|
|
940
992
|
VALIDATION_FAILED: {
|
|
941
993
|
target: "validationFeedback",
|
|
942
994
|
actions: "setValidationFailure"
|
|
@@ -1038,7 +1090,10 @@ const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
|
1038
1090
|
after: { CAMERA_RELEASE_SETTLE: { target: "switchingCamera" } }
|
|
1039
1091
|
},
|
|
1040
1092
|
pausing: {
|
|
1041
|
-
on: {
|
|
1093
|
+
on: {
|
|
1094
|
+
SPEECH_RESULT: SPEECH_RESULT_TRANSITIONS,
|
|
1095
|
+
MAX_VIDEO_LENGTH_REACHED: { actions: "setMaxVideoLengthReached" }
|
|
1096
|
+
},
|
|
1042
1097
|
invoke: {
|
|
1043
1098
|
src: "pauseCapture",
|
|
1044
1099
|
input: ({ context }) => ({
|
|
@@ -1071,6 +1126,7 @@ const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
|
1071
1126
|
}
|
|
1072
1127
|
},
|
|
1073
1128
|
suspended: { on: {
|
|
1129
|
+
SPEECH_RESULT: SPEECH_RESULT_TRANSITIONS,
|
|
1074
1130
|
FOREGROUND: {
|
|
1075
1131
|
target: "resumingCompositor",
|
|
1076
1132
|
actions: "markPageVisible"
|
|
@@ -1082,6 +1138,7 @@ const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
|
1082
1138
|
} },
|
|
1083
1139
|
resumingCompositor: {
|
|
1084
1140
|
on: {
|
|
1141
|
+
SPEECH_RESULT: SPEECH_RESULT_TRANSITIONS,
|
|
1085
1142
|
BACKGROUND: {
|
|
1086
1143
|
target: "pausing",
|
|
1087
1144
|
actions: "markPageHidden"
|
|
@@ -1118,6 +1175,7 @@ const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
|
1118
1175
|
},
|
|
1119
1176
|
reacquiringCamera: {
|
|
1120
1177
|
on: {
|
|
1178
|
+
SPEECH_RESULT: SPEECH_RESULT_TRANSITIONS,
|
|
1121
1179
|
BACKGROUND: {
|
|
1122
1180
|
target: "pausing",
|
|
1123
1181
|
actions: "markPageHidden"
|
|
@@ -1148,6 +1206,7 @@ const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
|
1148
1206
|
},
|
|
1149
1207
|
validatingRecoveredCamera: {
|
|
1150
1208
|
on: {
|
|
1209
|
+
SPEECH_RESULT: SPEECH_RESULT_TRANSITIONS,
|
|
1151
1210
|
BACKGROUND: {
|
|
1152
1211
|
target: "pausing",
|
|
1153
1212
|
actions: "markPageHidden"
|
|
@@ -1181,6 +1240,7 @@ const videoSelfieRecordingMachine = videoSelfieRecordingSetup.createMachine({
|
|
|
1181
1240
|
},
|
|
1182
1241
|
resumingRecorder: {
|
|
1183
1242
|
on: {
|
|
1243
|
+
SPEECH_RESULT: SPEECH_RESULT_TRANSITIONS,
|
|
1184
1244
|
BACKGROUND: {
|
|
1185
1245
|
target: "pausing",
|
|
1186
1246
|
actions: "markPageHidden"
|
|
@@ -1341,7 +1401,7 @@ function mapState(snapshot) {
|
|
|
1341
1401
|
detectionStatus: context.detectionStatus,
|
|
1342
1402
|
orientation: context.orientation,
|
|
1343
1403
|
validationFailure: context.validationFailure,
|
|
1344
|
-
attemptsRemaining: context.attemptsRemaining,
|
|
1404
|
+
attemptsRemaining: steps[stepIndex] === "speech" ? context.speechAttemptsRemaining : context.attemptsRemaining,
|
|
1345
1405
|
recordingId: context.recordingId,
|
|
1346
1406
|
error: context.error,
|
|
1347
1407
|
errorKind: context.errorKind
|
|
@@ -1363,6 +1423,13 @@ function createApi({ actor }) {
|
|
|
1363
1423
|
nextStep() {
|
|
1364
1424
|
actor.send({ type: "NEXT_STEP" });
|
|
1365
1425
|
},
|
|
1426
|
+
/** Report a speech verdict; Core counts rejections and finalizes on exhaustion. */
|
|
1427
|
+
reportSpeechResult(result) {
|
|
1428
|
+
actor.send({
|
|
1429
|
+
type: "SPEECH_RESULT",
|
|
1430
|
+
result
|
|
1431
|
+
});
|
|
1432
|
+
},
|
|
1366
1433
|
/** Abandon the session without finalizing the upload. */
|
|
1367
1434
|
abort() {
|
|
1368
1435
|
actor.send({ type: "ABORT" });
|
|
@@ -1412,8 +1479,8 @@ async function getVoiceConsentPhrase() {
|
|
|
1412
1479
|
}
|
|
1413
1480
|
/**
|
|
1414
1481
|
* Uploads the recorded consent audio (base64 MP3) for speech-to-text
|
|
1415
|
-
* validation.
|
|
1416
|
-
*
|
|
1482
|
+
* validation. Transport/technical failures carry an error kind so they do not
|
|
1483
|
+
* consume validation attempts.
|
|
1417
1484
|
*/
|
|
1418
1485
|
async function addSpeech(base64Mp3) {
|
|
1419
1486
|
try {
|
|
@@ -1421,8 +1488,11 @@ async function addSpeech(base64Mp3) {
|
|
|
1421
1488
|
base64Media: base64Mp3,
|
|
1422
1489
|
audioOnly: true
|
|
1423
1490
|
})).data.success === true };
|
|
1424
|
-
} catch {
|
|
1425
|
-
return {
|
|
1491
|
+
} catch (error) {
|
|
1492
|
+
return {
|
|
1493
|
+
success: false,
|
|
1494
|
+
errorKind: isConnectionError(error) ? "connection" : "technical"
|
|
1495
|
+
};
|
|
1426
1496
|
}
|
|
1427
1497
|
}
|
|
1428
1498
|
//#endregion
|
|
@@ -1435,7 +1505,10 @@ function createConsentRecorder() {
|
|
|
1435
1505
|
},
|
|
1436
1506
|
async submit() {
|
|
1437
1507
|
const base64 = await provider.stopAsBase64();
|
|
1438
|
-
if (base64.length === 0) return {
|
|
1508
|
+
if (base64.length === 0) return {
|
|
1509
|
+
success: false,
|
|
1510
|
+
errorKind: "technical"
|
|
1511
|
+
};
|
|
1439
1512
|
return addSpeech(base64);
|
|
1440
1513
|
},
|
|
1441
1514
|
cancel() {
|
package/dist/{videoSelfieCameraWarmer-LeE2vbAW.esm.js → videoSelfieCameraWarmer-DjkPpoj_.esm.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-BO8JA7Pf.esm.js";
|
|
2
2
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
3
|
-
import { d as facingModeForStep, f as resolveVideoSelfieSteps } from "./flowServices-
|
|
4
|
-
import {
|
|
5
|
-
import { t as checkPermission } from "./permissionServices-
|
|
6
|
-
import { c as
|
|
7
|
-
import { o as StreamCanvasProcessingSession } from "./multipartRecordingService-
|
|
8
|
-
import {
|
|
3
|
+
import { d as facingModeForStep, f as resolveVideoSelfieSteps } from "./flowServices-g2tVWsJl.esm.js";
|
|
4
|
+
import { i as requestCameraWithFallback, r as requestCameraAccess } from "./camera-E_Kcre4O.esm.js";
|
|
5
|
+
import { t as checkPermission } from "./permissionServices-DnBAN_hW.esm.js";
|
|
6
|
+
import { c as uploadSelfie, n as encryptSelfieImage, o as startDetection, s as processFace, t as FaceDetectionProvider, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-B83VmClw.esm.js";
|
|
7
|
+
import { o as StreamCanvasProcessingSession } from "./multipartRecordingService-DMBxHKS2.esm.js";
|
|
8
|
+
import { t as getBackCameraStream } from "./backCameraStream-C5_NNfUN.esm.js";
|
|
9
9
|
import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
|
|
10
|
-
import { t as getFaceErrorCodeFromUnknown } from "./selfieErrorUtils-
|
|
11
|
-
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-
|
|
10
|
+
import { t as getFaceErrorCodeFromUnknown } from "./selfieErrorUtils-BL0BLMnp.esm.js";
|
|
11
|
+
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-MSQoqScU.esm.js";
|
|
12
12
|
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-C9jtgBdT.esm.js";
|
|
13
13
|
//#region src/modules/video-selfie/videoSelfieCompareService.ts
|
|
14
14
|
async function postVideoSelfieCompare(endpoint, base64Image) {
|
|
@@ -23,6 +23,14 @@ const compareVideoSelfieBackId = (base64Image) => postVideoSelfieCompare(endpoin
|
|
|
23
23
|
/** Compare OCR from a back-ID frame against the captured ID's OCR. */
|
|
24
24
|
const compareVideoSelfieBackOcr = (base64Image) => postVideoSelfieCompare(endpoints.videoSelfieCompareBackOcr, base64Image);
|
|
25
25
|
//#endregion
|
|
26
|
+
//#region src/modules/video-selfie/videoSelfieErrors.ts
|
|
27
|
+
/** HTTP transport failures, rather than backend validation verdicts. */
|
|
28
|
+
function isConnectionError(error) {
|
|
29
|
+
if (typeof error !== "object" || error === null || !("status" in error)) return false;
|
|
30
|
+
const status = error.status;
|
|
31
|
+
return typeof status === "number" && (status === 0 || status === 408 || status === 429 || status >= 500);
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
26
34
|
//#region src/modules/video-selfie/videoSelfieStepDetector.ts
|
|
27
35
|
/** Default autocapture window for the selfie step when the config omits one. */
|
|
28
36
|
const SELFIE_AUTOCAPTURE_MS = 1e4;
|
|
@@ -95,17 +103,6 @@ function isSelfieValidationError(error) {
|
|
|
95
103
|
const SELFIE_SUBMIT_ATTEMPTS = 3;
|
|
96
104
|
const SELFIE_SUBMIT_BACKOFF_MS = 2e3;
|
|
97
105
|
/**
|
|
98
|
-
* True for HTTP-transport-shaped failures — network error / client-side
|
|
99
|
-
* timeout (status 0), 408, 429, 5xx — as opposed to a backend verdict.
|
|
100
|
-
* Plain Errors (aborts, programming faults) are not connection errors.
|
|
101
|
-
*/
|
|
102
|
-
function isConnectionError(error) {
|
|
103
|
-
if (typeof error !== "object" || error === null || !("status" in error)) return false;
|
|
104
|
-
const status = error.status;
|
|
105
|
-
if (typeof status !== "number") return false;
|
|
106
|
-
return status === 0 || status === 408 || status === 429 || status >= 500;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
106
|
* True for errors where the selfie submission never got a meaningful backend
|
|
110
107
|
* verdict, as opposed to a validation outcome. Re-sending the same payload
|
|
111
108
|
* can succeed, so these are retried in place instead of failing the whole
|
|
@@ -508,4 +505,4 @@ function createVideoSelfieCameraWarmer(config, steps = resolveVideoSelfieSteps(c
|
|
|
508
505
|
};
|
|
509
506
|
}
|
|
510
507
|
//#endregion
|
|
511
|
-
export {
|
|
508
|
+
export { isSelfieValidationError as a, delay as i, defaultAcquireCamera as n, isWrongVideoSelfieIdSide as o, createDefaultStepDetector as r, isConnectionError as s, createVideoSelfieCameraWarmer as t };
|