@incodetech/core 2.4.1 → 2.5.0-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/Actor-DqjOqDfU.d.ts +1 -0
- package/dist/{BaseWasmProvider-Bq3OHo7P.d.ts → BaseWasmProvider-CPdofn7R.d.ts} +3 -5
- package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
- package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-C7N1N61V.esm.js} +61 -744
- package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
- package/dist/{FaceDetectionProvider-J_-1Cwck.esm.js → FaceDetectionProvider-Dv9iXub0.esm.js} +38 -66
- package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
- package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
- package/dist/{IIdCaptureCapability-CGcEt2Cw.d.ts → IIdCaptureCapability-CAxToGns.d.ts} +3 -3
- package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-CLWIYHB4.d.ts} +35 -7
- package/dist/Manager-BvXAwDv9.esm.js +125 -0
- package/dist/{Manager-C9T5amUN.d.ts → Manager-DufwKlav.d.ts} +1 -7
- package/dist/{MotionSensorProvider-DYxh8TjR.esm.js → MotionSensorProvider-X4_2eBGd.esm.js} +15 -0
- package/dist/MultipartRecordingProvider-BtMQZEbg.esm.js +151 -0
- package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
- package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-BqaHTJF0.d.ts} +36 -5
- package/dist/{StreamCanvasCapture-C9jtgBdT.esm.js → StreamCanvasCapture-CXd87trH.esm.js} +18 -3
- package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
- package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-DVFDFlIL.esm.js} +135 -25
- package/dist/WorkerEncoderRecordingProvider-BO7urYwT.esm.js +80 -0
- package/dist/addressSearch-BKlynuBr.esm.js +71 -0
- package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-CxZyPRyh.esm.js} +4 -2
- package/dist/ae-signature.d.ts +2 -2
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-BI2zr7YX.esm.js} +5 -3
- package/dist/{antifraudManager-DbGCvlJs.d.ts → antifraudManager-BxfCsyA7.d.ts} +3 -3
- package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-TWUu8wLN.esm.js} +4 -6
- package/dist/{api-Cz90EHyu.esm.js → api-BNxrW8xK.esm.js} +13 -6
- package/dist/{apiError-9Yi8xMeB.esm.js → apiError-BAfdBGxH.esm.js} +1 -1
- package/dist/attemptCarry-DWM8lV9V.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-BJElkTsj.d.ts} +2 -2
- package/dist/{authenticationManager-pKQS4fHT.esm.js → authenticationManager-DFzByAYo.esm.js} +7 -6
- package/dist/{authenticationStateMachine-D_DygKtQ.esm.js → authenticationStateMachine-CKTOhwwc.esm.js} +50 -18
- package/dist/avatar.d.ts +1 -1
- package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
- package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-6qVHvj76.esm.js} +12 -107
- package/dist/{browser-DlFgHpoC-DnyrCR8r.esm.js → browser-pQZA35G2-CG3C-xGt.esm.js} +161 -150
- package/dist/calendarDate-DcqGuEht.esm.js +35 -0
- package/dist/{callback-645_omgz.d.ts → callback-BmjJ1G-5.d.ts} +1 -1
- package/dist/camera-9yYDUOsO.d.ts +5 -0
- package/dist/{camera-sIa9ceW2.esm.js → camera-CJKApt0x.esm.js} +19 -20
- package/dist/camera.d.ts +9 -5
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.d.ts +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-Dr8A4Lgr.d.ts → certificateIssuanceManager-BcYhxO63.d.ts} +4 -3
- package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-P44yBRop.esm.js} +5 -3
- package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-BPBrILt6.esm.js} +4 -4
- package/dist/cnpj-Bl_olpdX.esm.js +79 -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-D43w2ms-.esm.js} +7 -4
- package/dist/{consentManager-Ca8FHlC4.d.ts → consentManager-Duzd8paN.d.ts} +17 -9
- package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-CLK8PfM4.esm.js} +25 -15
- package/dist/cpf-DDXMTLYr.esm.js +37 -0
- package/dist/{createFaceAvatar-lYX0VTYs.d.ts → createFaceAvatar-Ct9QrQ66.d.ts} +1 -1
- package/dist/cross-document-data-match.d.ts +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-Cag_bcyW.esm.js} +6 -5
- package/dist/{crossDocumentDataMatchManager-yCWCOzcU.d.ts → crossDocumentDataMatchManager-crZcIUSY.d.ts} +3 -3
- package/dist/curp-DZGvefg3.esm.js +14 -0
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-C6WmQToS.esm.js} +6 -3
- package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-CmL52FU8.d.ts} +4 -4
- package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-BbJ4YAzE.esm.js} +41 -34
- package/dist/custom-fields.d.ts +1 -1
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.d.ts +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-BBy6X9nh.esm.js} +15 -17
- package/dist/{customFieldsManager-CF-cO8ap.d.ts → customFieldsManager-CdWTbsew.d.ts} +3 -3
- package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-CtBMy2EF.esm.js} +5 -3
- package/dist/{customWatchlistManager-DolUswyR.d.ts → customWatchlistManager-lJrveDS4.d.ts} +3 -3
- package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-SS2ssNCg.esm.js} +4 -6
- package/dist/deepsightCaptureConfig-Nm_K8twx.esm.js +70 -0
- package/dist/{deepsightService-C3DVBOZd.esm.js → deepsightLoader-BInnND1H.esm.js} +41 -74
- package/dist/definitionSource-B-Z2EgJJ.esm.js +234 -0
- package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-JNBOXqvK.esm.js} +278 -44
- package/dist/device.d.ts +3 -3
- package/dist/device.esm.js +16 -16
- package/dist/document-capture.d.ts +3 -3
- package/dist/document-capture.esm.js +2 -2
- package/dist/document-signature.d.ts +123 -0
- package/dist/document-signature.esm.js +149 -0
- package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-CGDtkfWj.esm.js} +30 -20
- package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-sJWgqtUy.d.ts} +42 -8
- package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-flAt9D4q.esm.js} +110 -63
- package/dist/documentSignatureStateMachine-DrRyICFT.esm.js +219 -0
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-C45pTncO.d.ts} +4 -4
- package/dist/{dynamicFormsManager-DK_oc5Oy.esm.js → dynamicFormsManager-CxLq2KzT.esm.js} +5 -3
- package/dist/{dynamicFormsStateMachine-CGlIAWZ6.esm.js → dynamicFormsStateMachine-By-maT_4.esm.js} +12 -13
- package/dist/ekyb.d.ts +5 -5
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-BflWuTe4.d.ts} +5 -5
- package/dist/{ekybManager-BLgkiWXw.esm.js → ekybManager-CE19Pcdb.esm.js} +5 -3
- package/dist/{ekybStateMachine-BfgOUZMK.esm.js → ekybStateMachine-q7JQ-x9l.esm.js} +1233 -124
- package/dist/ekybUtils-Z9MhFAer.esm.js +150 -0
- package/dist/ekyc-prefill.d.ts +17 -0
- package/dist/ekyc-prefill.esm.js +3 -0
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-BKVQazAb.d.ts} +49 -7
- package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-p3uenUEi.esm.js} +39 -16
- package/dist/ekycPrefillManager-BcLhkpp8.d.ts +566 -0
- package/dist/ekycPrefillManager-gPX3XE7u.esm.js +103 -0
- package/dist/ekycPrefillStateMachine-SBnBKPGA.esm.js +685 -0
- package/dist/ekycRules-BH_Ll_0A.esm.js +482 -0
- package/dist/ekycStateMachine-D0NAHzS7.esm.js +8514 -0
- package/dist/ekycUtils-DEvtEyBI.esm.js +1501 -0
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-DTSLOvKR.d.ts → electronicSignatureManager-5tYz-a4o.d.ts} +4 -3
- package/dist/{electronicSignatureManager-CjKvJ6E-.esm.js → electronicSignatureManager-C1M-Yxf2.esm.js} +12 -18
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-ButFktRm.esm.js → emailManager-DWnhEsUf.esm.js} +5 -3
- package/dist/{emailManager-Dy6omJVp.d.ts → emailManager-pM7ZPuMa.d.ts} +3 -3
- package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine--T9PHflK.esm.js} +35 -25
- package/dist/events-ChMS-UzR.esm.js +299 -0
- package/dist/events.d.ts +4 -1
- package/dist/events.esm.js +2 -1
- package/dist/extensibility.d.ts +57 -41
- package/dist/extensibility.esm.js +39 -37
- package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-cUjJYyXj.esm.js} +4 -1
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-BDGhg24q.esm.js → faceCaptureManagerFactory-18QW0lmV.esm.js} +29 -12
- package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-CHqmyOjM.d.ts} +101 -77
- package/dist/{faceCaptureSetup-CvGYG4GZ.esm.js → faceCaptureSetup-CFToXwHy.esm.js} +181 -513
- package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-C5b5WtcY.d.ts} +23 -7
- package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-DIStK4qi.esm.js} +5 -3
- package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-DagrRdo2.esm.js} +70 -42
- package/dist/{feature-management-D4ne_hXW.esm.js → feature-management-BlscKbeV.esm.js} +37 -22
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.d.ts +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-BnWBtMN7.esm.js} +7 -7
- package/dist/{fieldComparisonManager-CUX4gza2.d.ts → fieldComparisonManager-mFOHRhVd.d.ts} +3 -3
- package/dist/fiscal-qr.d.ts +1 -1
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-BxXaLhin.esm.js} +9 -8
- package/dist/{fiscalQrManager-D0Iy7EKR.d.ts → fiscalQrManager-DFnFVpP9.d.ts} +3 -3
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +73 -24
- package/dist/flow.esm.js +261 -66
- package/dist/{flowCompletionService-Cemwaa5b.esm.js → flowCompletionService-DNLssMAg.esm.js} +2 -2
- package/dist/flowServices-Bzq3piUR.esm.js +951 -0
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-CENrvxpK.d.ts} +19 -20
- package/dist/{geolocationManager-B0dc5rW9.esm.js → geolocationManager-DoLbpx5e.esm.js} +9 -9
- package/dist/{geolocationStateMachine-B3rcoODF.esm.js → geolocationStateMachine-d5_E7gAm.esm.js} +16 -14
- package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-Dcy9erbl.esm.js} +1 -1
- package/dist/government-validation.d.ts +1 -1
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-CaZxyEOO.esm.js} +5 -3
- package/dist/{governmentValidationManager-B82zOut8.d.ts → governmentValidationManager-De_vU7bm.d.ts} +4 -4
- package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-DeHHhlcf.esm.js} +4 -6
- package/dist/home.d.ts +4 -3
- package/dist/home.esm.js +4 -2
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +2 -2
- package/dist/id-ocr.esm.js +3 -19
- package/dist/id-selfie-flow.d.ts +7 -6
- package/dist/id-selfie-flow.esm.js +14 -12
- package/dist/id-verification.d.ts +1 -1
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +6 -19
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-R3rHuTOE.esm.js} +4 -4
- package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-CgkQW3Xc.d.ts} +88 -14
- package/dist/{idCaptureManager-IouAnrFm.esm.js → idCaptureManager-D_YGMeCW.esm.js} +81 -26
- package/dist/{idCaptureServices-VTKIPSpT.esm.js → idCaptureServices-CP6AxsFW.esm.js} +36 -213
- package/dist/{idCaptureStateMachine-_Pn2Xkpb.esm.js → idCaptureStateMachine-BdBtGQZP.esm.js} +2922 -2498
- package/dist/idOcrCpfUtils-D5Gwskxu.esm.js +18 -0
- package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-C0C7lFGd.d.ts} +7 -6
- package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-XTbpfHoF.esm.js} +5 -3
- package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-B-00PgPh.esm.js} +20 -16
- package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-B4NYLlUl.esm.js} +5 -3
- package/dist/{idVerificationManager-BJapZfpy.d.ts → idVerificationManager-B6R8xNZq.d.ts} +4 -3
- package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-B48Ikl-7.esm.js} +4 -6
- package/dist/identity-reuse.d.ts +2 -2
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/identity-search.d.ts +97 -0
- package/dist/identity-search.esm.js +96 -0
- package/dist/{identityReuseManager-ooAbp6Kc.d.ts → identityReuseManager-CZ-qJ_Aa.d.ts} +82 -15
- package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-tFeYm_So.esm.js} +9 -4
- package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-Ckf39qFu.esm.js} +24 -31
- package/dist/{index-BKOWUhxG.d.ts → index-CNck5TLp.d.ts} +93 -22
- package/dist/{index-CKQ9QBZP.d.ts → index-CoePktWH.d.ts} +2 -2
- package/dist/index-DHuAkTe0.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-DNQX9k5e.esm.js} +1 -1
- package/dist/kyb-checks.d.ts +3 -0
- package/dist/kyb-checks.esm.js +3 -0
- package/dist/kybChecksManager-B7Di9auB.d.ts +95 -0
- package/dist/kybChecksManager-DP76y-Qz.esm.js +90 -0
- package/dist/kybChecksStateMachine-OKLT8Zoc.esm.js +716 -0
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-NX1lz6nk.esm.js} +7 -4
- package/dist/{mandatoryConsentManager-qYojnZYg.d.ts → mandatoryConsentManager-kzr5kdc_.d.ts} +28 -11
- package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-D1J2NQSI.esm.js} +35 -19
- package/dist/mediaRecorderOptions-Di_V9TnZ.esm.js +87 -0
- package/dist/multipartRecordingService-Cz-cWrpV.esm.js +407 -0
- package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-Cyh71hOt.esm.js} +1 -1
- package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-BrtDMB0Z.esm.js} +31 -15
- 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-C3q0Ukh4.esm.js +27 -0
- package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-D1QPNbu0.esm.js} +6 -4
- package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-VO1HEoUZ.d.ts} +8 -3
- package/dist/phoneServices-DC7AuUed.esm.js +73 -0
- package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-CxCPxTIy.esm.js} +56 -84
- package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
- package/dist/{platform-DkcRc9JV.esm.js → platform-GIg4uPWe.esm.js} +15 -4
- package/dist/processFaceMatch-BQoiqLVh.esm.js +21 -0
- package/dist/qe-signature.d.ts +2 -2
- package/dist/qe-signature.esm.js +1 -1
- package/dist/recordingService-CSCvD2tB.esm.js +404 -0
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-Db99n9Yu.d.ts} +7 -4
- package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-Dcpg5GfP.esm.js} +10 -6
- package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-BMehrtVP.esm.js} +82 -46
- package/dist/resolveForm-DaaQSVWp.esm.js +146 -0
- package/dist/{runChildModule-DSpP41Hl.esm.js → runChildModule-DNEmc7of.esm.js} +9 -7
- package/dist/{sdkVersion-DKHwWEyH.esm.js → sdkVersion-etdZfyCR.esm.js} +1 -1
- package/dist/selfie.d.ts +6 -6
- package/dist/selfie.esm.js +15 -13
- package/dist/{selfieErrorUtils-DoN1KFSQ.esm.js → selfieErrorUtils-DT-uhK20.esm.js} +1 -1
- package/dist/{selfieManager-DtQegA6T.esm.js → selfieManager-CdS6a7Q8.esm.js} +7 -6
- package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-DrBYj5kA.d.ts} +2 -2
- package/dist/{selfieStateMachine-CnCwJZuC.esm.js → selfieStateMachine-ChCl3nyf.esm.js} +5 -5
- package/dist/{session-CNUfjlRc.esm.js → session-VXYuRYzb.esm.js} +78 -9
- package/dist/session.d.ts +85 -9
- package/dist/session.esm.js +7 -6
- package/dist/{sessionInitializer-JM_glXR2.esm.js → sessionInitializer-BT_CmYcX.esm.js} +442 -208
- package/dist/{setup-C5tfWt6W.esm.js → setup-BXrgDdfx.esm.js} +42 -29
- package/dist/{setup-YPKTUCY5.d.ts → setup-rcXgYUcY.d.ts} +7 -6
- package/dist/signature.d.ts +1 -1
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-B737Gkvk.esm.js} +5 -3
- package/dist/{signatureManager-BpVt_Jv7.d.ts → signatureManager-daT_8fj_.d.ts} +3 -3
- package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-B-QG7fk0.esm.js} +5 -7
- package/dist/{spawn-D9jgw9pW.d.ts → spawn-COZKetCS.d.ts} +1 -1
- package/dist/{stats-BEvexnKC.esm.js → stats-CrqhpKkP.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/step-up.d.ts +379 -0
- package/dist/step-up.esm.js +640 -0
- package/dist/textRules-D4NRinKY.d.ts +41 -0
- package/dist/{tri-xzRLIIMN.esm.js → tri-BD9z6z0w.esm.js} +137 -8
- package/dist/tri.d.ts +2 -2
- package/dist/tri.esm-DYdFtcDH.esm.js +3105 -0
- package/dist/tri.esm.js +2 -2
- package/dist/trueSight-BymJD5cW.esm.js +1 -0
- package/dist/{trueSightService-fLmL_cyg.esm.js → trueSightService-BwyLhIAo.esm.js} +25 -14
- package/dist/trust-graph.d.ts +87 -27
- package/dist/trust-graph.esm.js +6 -25
- package/dist/trustGraphStateMachine-BxvReuo1.esm.js +58 -0
- package/dist/{types-B6HsSzpk.d.ts → types-4Re9FSOw.d.ts} +77 -8
- package/dist/types-B-PIc0en.d.ts +115 -0
- package/dist/types-B9C8W01q.d.ts +34 -0
- package/dist/types-BNkzXOXE.d.ts +45 -0
- package/dist/{types-0L-eFDmr.d.ts → types-BgRHw-dR.d.ts} +1 -1
- package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
- package/dist/types-BtrJ5fkm.d.ts +6 -0
- package/dist/{types-Ckir_BEs.d.ts → types-C1056-J1.d.ts} +3 -2
- package/dist/{types-BQA7lRDV.d.ts → types-C3rfDzgE.d.ts} +4 -2
- package/dist/{events-Du2A4-Qr.esm.js → types-CBQN04Rh.esm.js} +6 -300
- package/dist/{types-yPH8lAH-.d.ts → types-CEGG70FK.d.ts} +16 -3
- package/dist/types-CTaL0XJz.d.ts +80 -0
- package/dist/types-CXTDuzUJ.d.ts +16 -0
- package/dist/{types-BEwVKkLJ.d.ts → types-CeEcakO7.d.ts} +7 -1
- package/dist/{types-DUnFZ08M.d.ts → types-Cy6Lx3L6.d.ts} +18 -10
- package/dist/types-DEa3taWc.d.ts +217 -0
- package/dist/{types-CK8Jbjkp.d.ts → types-DHpz4Y37.d.ts} +1 -1
- package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
- package/dist/{types-BAxn7MpY.d.ts → types-b0l9b83G.d.ts} +134 -52
- package/dist/urlUtils-B2wagB5v.esm.js +39 -0
- package/dist/usStates-CwOQ2kAx.esm.js +209 -0
- package/dist/video-selfie.d.ts +17 -15
- package/dist/video-selfie.esm.js +100 -24
- package/dist/{videoSelfieCameraWarmer-BBNKiau1.esm.js → videoSelfieCameraWarmer-DgRlU_8q.esm.js} +27 -28
- package/dist/{videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js → videoSelfieFlowModuleMachine-IWdxw1TW.esm.js} +1 -1
- package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-DC_Qh7qI.d.ts} +24 -9
- package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
- package/dist/{warmup-BElYWRh7.esm.js → warmup-BN8dG2KX.esm.js} +378 -57
- package/dist/{warmup-BO57syF6.d.ts → warmup-SWu5L7cW.d.ts} +19 -2
- package/dist/wasm.d.ts +9 -3
- package/dist/wasm.esm.js +3 -3
- package/dist/wasmDeepsightConfigSync-DukEcrU8.esm.js +77 -0
- package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-DwBfTlgB.esm.js} +1 -1
- package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-B2P6Vlvv.esm.js} +77 -29
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.d.ts +1 -1
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-DxeSH80T.esm.js} +40 -8
- package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-l7ZERQcV.d.ts} +57 -21
- package/dist/watchlistForBusinessStateMachine-BC9UWLuZ.esm.js +169 -0
- package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-BHzmC9OC.esm.js} +5 -3
- package/dist/{watchlistManager-DJQOd8Pw.d.ts → watchlistManager-DQq4GxBO.d.ts} +3 -3
- package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-Bxzn16iJ.esm.js} +4 -6
- package/dist/workflow.d.ts +10 -6
- package/dist/workflow.esm.js +95 -60
- package/dist/{xstate-actors.esm-8Gzepa_A.esm.js → xstate-actors.esm-BCcwgosu.esm.js} +1 -1
- package/dist/xstate.cjs-D6Ur0X1F.d.ts +7 -0
- package/dist/{xstate.esm-DSajW7CJ.esm.js → xstate.esm-CIqUf_i6.esm.js} +1 -125
- package/package.json +35 -8
- package/dist/Actor-DpTj5PFb.d.ts +0 -1
- package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
- package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
- package/dist/camera-9wWD-pwg.d.ts +0 -4
- package/dist/cpf-uAZTPUBy.esm.js +0 -61
- package/dist/deepsightLoader-sH7920zw.esm.js +0 -55
- package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
- package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
- package/dist/flowServices-X6Rwf_7E.esm.js +0 -688
- package/dist/index-DpTj5PFb.d.ts +0 -1
- 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/urlUtils-6jsE6rKp.esm.js +0 -23
- package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
- /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
|
@@ -1,19 +1,21 @@
|
|
|
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 "./
|
|
5
|
-
import { t as addDeviceStats } from "./stats-
|
|
6
|
-
import {
|
|
7
|
-
import { i as assign, n as enqueueActions, r as sendTo, t as setup } from "./xstate.esm-
|
|
8
|
-
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
2
|
+
import { r as getToken } from "./api-BNxrW8xK.esm.js";
|
|
3
|
+
import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity, u as trueSightLog, y as isTrueSightTesting } from "./trueSightService-BwyLhIAo.esm.js";
|
|
4
|
+
import "./trueSight-BymJD5cW.esm.js";
|
|
5
|
+
import { t as addDeviceStats } from "./stats-CrqhpKkP.esm.js";
|
|
6
|
+
import { s as isIPhone14OrHigher } from "./platform-GIg4uPWe.esm.js";
|
|
7
|
+
import { i as assign, n as enqueueActions, r as sendTo, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
8
|
+
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
9
|
+
import { c as isCameraDenialErrorName } from "./camera-CJKApt0x.esm.js";
|
|
10
|
+
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-BrtDMB0Z.esm.js";
|
|
11
|
+
import { t as getDeviceClass } from "./getDeviceClass-Dcy9erbl.esm.js";
|
|
12
|
+
import { n as recordsLivenessClip, r as wantsDeepsightMotion } from "./deepsightCaptureConfig-Nm_K8twx.esm.js";
|
|
13
|
+
import { a as sendLabelInspectionEvent, i as probeFaceCamera, l as getFaceUploadErrorCode, r as initializeDeepsightSession, t as FaceDetectionProvider, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-Dv9iXub0.esm.js";
|
|
14
|
+
import { a as cameraCycleProvider, c as deepsightSignalConfigActor, i as runProtectedAttempt, l as PROTECTED_CAPTURE_TARGET, n as createCameraCycleOwnership, o as flagFaceManualReview, r as readIadCameraStepGates, t as electDesktopCameraDevice } from "./desktopCameraElection-JNBOXqvK.esm.js";
|
|
12
15
|
import { n as releaseFaceAvatarWarmup, r as warmFaceAvatar, t as createFaceAvatar } from "./createFaceAvatar-BNHdeFj8.esm.js";
|
|
13
16
|
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-bsWdEDxP.esm.js";
|
|
17
|
+
import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-Cyh71hOt.esm.js";
|
|
18
|
+
import { t as carryAttempts } from "./attemptCarry-DWM8lV9V.esm.js";
|
|
17
19
|
//#region src/internal/avatar/concealment.ts
|
|
18
20
|
/**
|
|
19
21
|
* Maps a backend concealment option to the internal avatar flags. `OPTION_NONE`
|
|
@@ -69,398 +71,17 @@ function logFaceCameraDiagnostic(event, fields) {
|
|
|
69
71
|
console.debug(`${FACE_CAMERA_DIAGNOSTIC_PREFIX} ${event} ${JSON.stringify(fields)}`);
|
|
70
72
|
}
|
|
71
73
|
//#endregion
|
|
72
|
-
//#region
|
|
73
|
-
|
|
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
|
-
};
|
|
74
|
+
//#region src/internal/faceCapture/protectedFaceAttempt.ts
|
|
75
|
+
const ON_DEVICE_MANUAL_CAPTURE_TIMEOUT_MS = 2147483647;
|
|
443
76
|
/**
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
*
|
|
447
|
-
*
|
|
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.
|
|
77
|
+
* Merged session recordings carry sound, as in SDK 1. Only for the uploaded
|
|
78
|
+
* session recording (`createRecordingService`'s multipart branch): local and
|
|
79
|
+
* liveness-clip recordings ({@link recordsLivenessClip}) stay video-only. The
|
|
80
|
+
* permission step reads it too, so camera and mic are asked in one prompt.
|
|
454
81
|
*/
|
|
455
|
-
function
|
|
456
|
-
|
|
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();
|
|
82
|
+
function requestsFaceSessionAudio(config) {
|
|
83
|
+
return config.mergeSessionRecordings === true && config.enableFaceRecording === true && config.onDeviceFaceResultsSubmissionEnabled !== true && !recordsLivenessClip(config);
|
|
460
84
|
}
|
|
461
|
-
//#endregion
|
|
462
|
-
//#region src/internal/faceCapture/protectedFaceAttempt.ts
|
|
463
|
-
const ON_DEVICE_MANUAL_CAPTURE_TIMEOUT_MS = 2147483647;
|
|
464
85
|
/**
|
|
465
86
|
* Recorder hooks for one protected face attempt.
|
|
466
87
|
*
|
|
@@ -476,7 +97,8 @@ var ProtectedFaceRecorderHooks = class {
|
|
|
476
97
|
this.delivery = delivery;
|
|
477
98
|
this.getRecordingService = getRecordingService;
|
|
478
99
|
this.disposed = false;
|
|
479
|
-
|
|
100
|
+
const recordsClip = delivery === "local" ? config.deepsightLiveness === "VIDEOLIVENESS" : recordsLivenessClip(config);
|
|
101
|
+
this.mode = config.onDeviceFaceResultsSubmissionEnabled === true || config.enableFaceRecording !== true && !recordsClip ? "none" : "finalizeBeforePoc";
|
|
480
102
|
}
|
|
481
103
|
async start(unprotectedStream) {
|
|
482
104
|
if (this.mode === "none") return;
|
|
@@ -552,16 +174,14 @@ var ProtectedFaceRecorderHooks = class {
|
|
|
552
174
|
let nextAttemptNumber = 1;
|
|
553
175
|
/**
|
|
554
176
|
* Private composition object for one still-face attempt. It owns provider
|
|
555
|
-
* callbacks and
|
|
556
|
-
* presentation stream/canvas and allowlisted semantic results.
|
|
177
|
+
* callbacks and the camera-step options outside XState; the machine sees only
|
|
178
|
+
* the presentation stream/canvas and allowlisted semantic results.
|
|
557
179
|
*/
|
|
558
180
|
var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
559
181
|
constructor(options) {
|
|
560
182
|
this.options = options;
|
|
561
183
|
this.attemptId = `face-${nextAttemptNumber++}`;
|
|
562
|
-
this.
|
|
563
|
-
this.rawHandedOff = false;
|
|
564
|
-
this.rawStreamReleased = false;
|
|
184
|
+
this.probedUsingBackCamera = false;
|
|
565
185
|
this.released = false;
|
|
566
186
|
this.recorderTransferred = false;
|
|
567
187
|
this.pendingSignals = [];
|
|
@@ -572,7 +192,7 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
572
192
|
/** Per-attempt fallback when no step owner supplies the recording service. */
|
|
573
193
|
async createAttemptRecordingService() {
|
|
574
194
|
const wasmUtil = await this.options.dependencies.getWasmUtil();
|
|
575
|
-
return createRecordingService({
|
|
195
|
+
return (await import("./recordingService-CSCvD2tB.esm.js")).createRecordingService({
|
|
576
196
|
config: this.options.config,
|
|
577
197
|
wasmUtil,
|
|
578
198
|
sessionToken: getToken(),
|
|
@@ -583,14 +203,15 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
583
203
|
return this.options.delivery;
|
|
584
204
|
}
|
|
585
205
|
get usingBackCamera() {
|
|
586
|
-
return this.
|
|
206
|
+
return this.probedUsingBackCamera;
|
|
587
207
|
}
|
|
588
208
|
setDeepsightService(service) {
|
|
589
209
|
if (this.released || this.deepsightService) return;
|
|
590
210
|
this.deepsightService = service;
|
|
591
211
|
}
|
|
212
|
+
/** Tutorial-time preparation; the camera itself opens at attempt start. */
|
|
592
213
|
async preAcquire() {
|
|
593
|
-
await this.
|
|
214
|
+
await this.probe();
|
|
594
215
|
}
|
|
595
216
|
subscribeSignals(listener) {
|
|
596
217
|
if (this.released) return () => void 0;
|
|
@@ -608,23 +229,29 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
608
229
|
attemptId: this.attemptId,
|
|
609
230
|
target: this.options.target,
|
|
610
231
|
workflow: this.options.config.onDeviceFaceResultsSubmissionEnabled === true ? 5 : 4,
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
232
|
+
cameraStep: async () => {
|
|
233
|
+
const { usingBackCamera } = await this.probe();
|
|
234
|
+
const facing = usingBackCamera ? "environment" : "user";
|
|
235
|
+
const resolution = usingBackCamera ? void 0 : this.options.config.cameraResolution;
|
|
236
|
+
const width = resolution?.width ?? 0;
|
|
237
|
+
const height = resolution?.height ?? 0;
|
|
238
|
+
const hasResolution = width > 0 && height > 0;
|
|
239
|
+
return {
|
|
240
|
+
vs: facing,
|
|
241
|
+
di: await electDesktopCameraDevice(facing),
|
|
242
|
+
ew: hasResolution ? width : 0,
|
|
243
|
+
eh: hasResolution ? height : 0,
|
|
244
|
+
i14: isIPhone14OrHigher(),
|
|
245
|
+
pa: false,
|
|
246
|
+
...this.options.delivery === "protected" ? readIadCameraStepGates() : {}
|
|
247
|
+
};
|
|
621
248
|
},
|
|
622
249
|
cycle: this.options.cycle,
|
|
623
250
|
cycleOwnership: this.cycleOwnership,
|
|
251
|
+
recordAudio: this.options.delivery === "protected" && requestsFaceSessionAudio(this.options.config),
|
|
624
252
|
recorder: this.recorder,
|
|
625
|
-
|
|
253
|
+
afterReady: this.options.delivery === "protected" ? (displayStream) => this.attachProtectedCameraMetadata(displayStream) : void 0,
|
|
626
254
|
configureWorkflow: () => this.configureWorkflow(),
|
|
627
|
-
runPrc: () => this.runPrc(),
|
|
628
255
|
runPoc: () => this.runPoc(),
|
|
629
256
|
onStartupTiming,
|
|
630
257
|
faceResults: this.provider
|
|
@@ -704,16 +331,18 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
704
331
|
Promise.resolve(this.provider.dispose()).catch(() => void 0);
|
|
705
332
|
} catch {}
|
|
706
333
|
this.cycleOwnership.releaseByController();
|
|
707
|
-
if (!this.rawHandedOff) this.acquired?.then(({ stream }) => this.releaseRawStream(stream), () => void 0);
|
|
708
334
|
}
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
335
|
+
/**
|
|
336
|
+
* Runs the camera-free probe once per attempt, whether the tutorial
|
|
337
|
+
* pre-acquire or the camera step asks first. Every retry creates a fresh
|
|
338
|
+
* runtime, so the pipeline warm-up and the lens choice are re-checked per
|
|
339
|
+
* attempt.
|
|
340
|
+
*/
|
|
341
|
+
async probe() {
|
|
342
|
+
this.probed ??= this.options.probeCamera();
|
|
343
|
+
const result = await this.probed;
|
|
344
|
+
this.probedUsingBackCamera = result.usingBackCamera;
|
|
345
|
+
if (this.released) throw new Error("Protected face attempt was released");
|
|
717
346
|
return result;
|
|
718
347
|
}
|
|
719
348
|
async configureWorkflow() {
|
|
@@ -767,13 +396,6 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
767
396
|
});
|
|
768
397
|
this.emitDetection("detecting");
|
|
769
398
|
}
|
|
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
399
|
async runPoc() {
|
|
778
400
|
if (this.options.delivery === "local") return;
|
|
779
401
|
const deepsight = this.deepsightService;
|
|
@@ -797,12 +419,11 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
797
419
|
const logs = deepsight.getPipelineState();
|
|
798
420
|
this.options.dependencies.trackCaptureAttemptFinished?.({ logs });
|
|
799
421
|
}
|
|
800
|
-
async attachProtectedCameraMetadata() {
|
|
422
|
+
async attachProtectedCameraMetadata(displayStream) {
|
|
801
423
|
const deepsight = this.deepsightService;
|
|
802
424
|
if (!deepsight) return;
|
|
803
425
|
try {
|
|
804
|
-
const
|
|
805
|
-
const [videoTrack] = stream.getVideoTracks();
|
|
426
|
+
const [videoTrack] = displayStream.getVideoTracks();
|
|
806
427
|
if (videoTrack) await deepsight.checkVirtualCamera(videoTrack);
|
|
807
428
|
} catch {
|
|
808
429
|
trueSightLog("warning", "deepsight", "faceScan", "protected camera metadata attachment failed");
|
|
@@ -819,13 +440,6 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
|
|
|
819
440
|
if (this.signalListener) this.signalListener(signal);
|
|
820
441
|
else this.pendingSignals.push(signal);
|
|
821
442
|
}
|
|
822
|
-
releaseRawStream(stream) {
|
|
823
|
-
if (this.rawHandedOff || this.rawStreamReleased) return;
|
|
824
|
-
this.rawStreamReleased = true;
|
|
825
|
-
try {
|
|
826
|
-
stopStream(stream);
|
|
827
|
-
} catch {}
|
|
828
|
-
}
|
|
829
443
|
};
|
|
830
444
|
//#endregion
|
|
831
445
|
//#region src/internal/faceCapture/protectedFaceController.ts
|
|
@@ -878,8 +492,9 @@ function createProtectedFaceControllerActor(options) {
|
|
|
878
492
|
const input = getControllerInput();
|
|
879
493
|
const pending = (async () => {
|
|
880
494
|
const wasmUtil = await input.dependencies.getWasmUtil();
|
|
495
|
+
const recordingModule = await import("./recordingService-CSCvD2tB.esm.js");
|
|
881
496
|
if (!active) return;
|
|
882
|
-
stepRecording ??= createRecordingService({
|
|
497
|
+
stepRecording ??= recordingModule.createRecordingService({
|
|
883
498
|
config: input.config,
|
|
884
499
|
wasmUtil,
|
|
885
500
|
sessionToken: getToken(),
|
|
@@ -921,10 +536,7 @@ function createProtectedFaceControllerActor(options) {
|
|
|
921
536
|
authHint: input.authHint,
|
|
922
537
|
faceDetection: capabilities.faceDetection,
|
|
923
538
|
cycle: capabilities.cycle,
|
|
924
|
-
|
|
925
|
-
config: input.config,
|
|
926
|
-
provider
|
|
927
|
-
}),
|
|
539
|
+
probeCamera: () => probeFaceCamera(input.config),
|
|
928
540
|
getRecordingService: getStepRecordingService
|
|
929
541
|
});
|
|
930
542
|
if (deepsightService) runtime.setDeepsightService(deepsightService);
|
|
@@ -1068,7 +680,8 @@ function createProtectedFaceControllerActor(options) {
|
|
|
1068
680
|
case "PROTECTED_ATTEMPT_FAILED":
|
|
1069
681
|
logDiagnostic("attempt-failed", {
|
|
1070
682
|
failureStage: event.failure.stage,
|
|
1071
|
-
failureCode: event.failure.code
|
|
683
|
+
failureCode: event.failure.code,
|
|
684
|
+
errorName: event.failure.errorName
|
|
1072
685
|
});
|
|
1073
686
|
noteTrueSightCaptureActivity(false);
|
|
1074
687
|
sendBack(event);
|
|
@@ -1204,6 +817,7 @@ function createDefaultProtectedFaceControllerActor(options) {
|
|
|
1204
817
|
}
|
|
1205
818
|
//#endregion
|
|
1206
819
|
//#region src/internal/faceCapture/faceCaptureSetup.ts
|
|
820
|
+
const DEEPSIGHT_INITIALIZATION_FAILED_CODE = "DEEPSIGHT_INITIALIZATION_FAILED";
|
|
1207
821
|
const getAttemptsFromConfig = (config) => {
|
|
1208
822
|
return config.captureAttempts ?? config.numberOfAttempts ?? 3;
|
|
1209
823
|
};
|
|
@@ -1241,6 +855,7 @@ const faceCaptureMachine = setup({
|
|
|
1241
855
|
target: PROTECTED_CAPTURE_TARGET.selfie,
|
|
1242
856
|
delivery: "protected"
|
|
1243
857
|
}),
|
|
858
|
+
deepsightSignalConfig: deepsightSignalConfigActor,
|
|
1244
859
|
runAvatar: fromCallback(({ input, sendBack }) => {
|
|
1245
860
|
const { obfuscateWithAvatar, avatarVariant } = concealmentToAvatar(input.config.selfieConcealmentOption);
|
|
1246
861
|
if (!obfuscateWithAvatar || !input.stream) return () => {};
|
|
@@ -1312,7 +927,9 @@ const faceCaptureMachine = setup({
|
|
|
1312
927
|
processResponse: void 0,
|
|
1313
928
|
attemptsRemaining: getAttemptsFromConfig(context.config),
|
|
1314
929
|
uploadError: void 0,
|
|
930
|
+
userNotRecognized: void 0,
|
|
1315
931
|
permissionResult: void 0,
|
|
932
|
+
retryDeniedMotionPermission: false,
|
|
1316
933
|
deepsightReady: false,
|
|
1317
934
|
manualCaptureTriggered: false,
|
|
1318
935
|
retainManualMode: false,
|
|
@@ -1336,7 +953,7 @@ const faceCaptureMachine = setup({
|
|
|
1336
953
|
setUploadErrorFromUploadValidation: assign({ uploadError: () => FACE_ERROR_CODES.SERVER }),
|
|
1337
954
|
setTerminalError: assign({ error: () => "Authentication failed" }),
|
|
1338
955
|
cleanup: () => void 0,
|
|
1339
|
-
setPermissionResultFromEvent: assign({ permissionResult: ({ event }) => event.output }),
|
|
956
|
+
setPermissionResultFromEvent: assign({ permissionResult: ({ context, event }) => resolveStoredPermissionResult(event.output, context.permissionResult) }),
|
|
1340
957
|
setPermissionDenied: assign({ permissionResult: () => "denied" }),
|
|
1341
958
|
setPermissionPrompt: assign({ permissionResult: () => "prompt" }),
|
|
1342
959
|
setPermissionRefresh: assign({ permissionResult: () => "refresh" }),
|
|
@@ -1470,10 +1087,10 @@ const faceCaptureMachine = setup({
|
|
|
1470
1087
|
return false;
|
|
1471
1088
|
},
|
|
1472
1089
|
isReadyForCapture: ({ context, event }) => {
|
|
1473
|
-
return isReadyForCaptureFromPermission(resolveStoredPermissionResult("output" in event ? event.output : void 0, context.permissionResult), context.config
|
|
1090
|
+
return isReadyForCaptureFromPermission(resolveStoredPermissionResult("output" in event ? event.output : void 0, context.permissionResult), wantsDeepsightMotion(context.config));
|
|
1474
1091
|
},
|
|
1475
1092
|
needsMotionPrimeOnly: ({ context, event }) => {
|
|
1476
|
-
return needsMotionPrimeOnlyFromPermission(resolveStoredPermissionResult("output" in event ? event.output : void 0, context.permissionResult), context.config
|
|
1093
|
+
return needsMotionPrimeOnlyFromPermission(resolveStoredPermissionResult("output" in event ? event.output : void 0, context.permissionResult), wantsDeepsightMotion(context.config));
|
|
1477
1094
|
},
|
|
1478
1095
|
isPermissionDeniedError: ({ event }) => {
|
|
1479
1096
|
if ("error" in event) {
|
|
@@ -1485,11 +1102,16 @@ const faceCaptureMachine = setup({
|
|
|
1485
1102
|
hasStream: ({ context }) => context.stream !== void 0,
|
|
1486
1103
|
isCameraAndDeepsightReady: ({ context }) => context.stream !== void 0 && context.deepsightReady,
|
|
1487
1104
|
hasAttemptsRemaining: ({ context }) => context.attemptsRemaining > 0,
|
|
1105
|
+
isOutOfAttempts: ({ context }) => context.attemptsRemaining <= 0 && context.attemptsRemaining < getAttemptsFromConfig(context.config),
|
|
1488
1106
|
hasCapturedImage: ({ context }) => context.capturedImage !== void 0,
|
|
1489
1107
|
isAutoCaptureAllowed: ({ context }) => !context.retainManualMode,
|
|
1490
1108
|
canCommitProtectedManual: ({ context }) => context.manualCaptureTriggered && context.config.onDeviceFaceResultsSubmissionEnabled !== true,
|
|
1491
1109
|
isProtectedManualRefusal: ({ event }) => event.failure.stage === "manualCommit",
|
|
1492
1110
|
isProtectedUploadFailure: ({ event }) => event.failure.stage === "upload",
|
|
1111
|
+
isProtectedAcquireDenied: ({ event }) => {
|
|
1112
|
+
const { failure } = event;
|
|
1113
|
+
return failure.stage === "acquire" && isCameraDenialErrorName(failure.errorName);
|
|
1114
|
+
},
|
|
1493
1115
|
hasUploadValidationError: () => false,
|
|
1494
1116
|
isTerminalUploadError: () => false,
|
|
1495
1117
|
isNoAttemptsTerminal: () => false
|
|
@@ -1498,35 +1120,47 @@ const faceCaptureMachine = setup({
|
|
|
1498
1120
|
id: "faceCapture",
|
|
1499
1121
|
initial: "idle",
|
|
1500
1122
|
entry: "bindProtectedFaceController",
|
|
1501
|
-
context: ({ input }) =>
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1123
|
+
context: ({ input, self }) => {
|
|
1124
|
+
const carried = carryAttempts("faceCapture", self, (s) => ({
|
|
1125
|
+
attemptsRemaining: s.context.attemptsRemaining,
|
|
1126
|
+
userNotRecognized: s.context.userNotRecognized
|
|
1127
|
+
}));
|
|
1128
|
+
return {
|
|
1129
|
+
config: input.config,
|
|
1130
|
+
dependencies: input.dependencies,
|
|
1131
|
+
authHint: input.authHint,
|
|
1132
|
+
stream: void 0,
|
|
1133
|
+
usingBackCamera: false,
|
|
1134
|
+
error: void 0,
|
|
1135
|
+
detectionStatus: "idle",
|
|
1136
|
+
capturedImage: void 0,
|
|
1137
|
+
faceCoordinates: void 0,
|
|
1138
|
+
uploadResponse: void 0,
|
|
1139
|
+
processResponse: void 0,
|
|
1140
|
+
attemptsRemaining: carried.attemptsRemaining ?? getAttemptsFromConfig(input.config),
|
|
1141
|
+
uploadError: void 0,
|
|
1142
|
+
userNotRecognized: carried.userNotRecognized,
|
|
1143
|
+
permissionResult: void 0,
|
|
1144
|
+
retryDeniedMotionPermission: false,
|
|
1145
|
+
deepsightReady: false,
|
|
1146
|
+
encryptedBase64Image: void 0,
|
|
1147
|
+
uploadRecordingId: void 0,
|
|
1148
|
+
manualCaptureTriggered: false,
|
|
1149
|
+
retainManualMode: false,
|
|
1150
|
+
captureOnlyResult: void 0,
|
|
1151
|
+
avatarCanvas: void 0,
|
|
1152
|
+
faceFeed: void 0,
|
|
1153
|
+
protectedVisible: true
|
|
1154
|
+
};
|
|
1155
|
+
},
|
|
1156
|
+
invoke: [{
|
|
1527
1157
|
id: "protectedFaceController",
|
|
1528
1158
|
src: "protectedFaceController"
|
|
1529
|
-
},
|
|
1159
|
+
}, {
|
|
1160
|
+
id: "deepsightSignalConfig",
|
|
1161
|
+
src: "deepsightSignalConfig",
|
|
1162
|
+
input: ({ context }) => context.config
|
|
1163
|
+
}],
|
|
1530
1164
|
on: {
|
|
1531
1165
|
QUIT: { target: "#faceCapture.closed" },
|
|
1532
1166
|
PROTECTED_VISIBILITY: { actions: "setProtectedVisibility" },
|
|
@@ -1535,6 +1169,10 @@ const faceCaptureMachine = setup({
|
|
|
1535
1169
|
},
|
|
1536
1170
|
states: {
|
|
1537
1171
|
idle: { on: { LOAD: [
|
|
1172
|
+
{
|
|
1173
|
+
target: "outOfAttempts",
|
|
1174
|
+
guard: "isOutOfAttempts"
|
|
1175
|
+
},
|
|
1538
1176
|
{
|
|
1539
1177
|
target: "tutorial",
|
|
1540
1178
|
guard: "hasShowTutorial"
|
|
@@ -1755,32 +1393,45 @@ const faceCaptureMachine = setup({
|
|
|
1755
1393
|
BACK: "idle",
|
|
1756
1394
|
REQUEST_PERMISSION: "requesting"
|
|
1757
1395
|
} },
|
|
1758
|
-
requesting: {
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1396
|
+
requesting: {
|
|
1397
|
+
exit: assign({ retryDeniedMotionPermission: false }),
|
|
1398
|
+
invoke: {
|
|
1399
|
+
id: "requestPermission",
|
|
1400
|
+
src: "requestPermission",
|
|
1401
|
+
input: ({ context }) => ({
|
|
1402
|
+
permissionResult: context.permissionResult === "refresh" ? void 0 : context.permissionResult,
|
|
1403
|
+
requestMotionPermission: wantsDeepsightMotion(context.config),
|
|
1404
|
+
retryDeniedMotionPermission: context.retryDeniedMotionPermission,
|
|
1405
|
+
requestAudio: requestsFaceSessionAudio(context.config)
|
|
1406
|
+
}),
|
|
1407
|
+
onDone: [
|
|
1408
|
+
{
|
|
1409
|
+
target: "motionDenied",
|
|
1410
|
+
guard: ({ event }) => event.output === "motionDenied"
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
target: "#faceCapture.capture",
|
|
1414
|
+
guard: "isReadyForCapture",
|
|
1415
|
+
actions: "setPermissionResultFromEvent"
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
target: "denied",
|
|
1419
|
+
guard: ({ event }) => event.output === "denied",
|
|
1420
|
+
actions: "setPermissionResultFromEvent"
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
target: "waitingForUser",
|
|
1424
|
+
actions: "setPermissionResultFromEvent"
|
|
1425
|
+
}
|
|
1426
|
+
],
|
|
1427
|
+
onError: { target: "denied" }
|
|
1428
|
+
}
|
|
1429
|
+
},
|
|
1430
|
+
denied: { entry: "setPermissionRefresh" },
|
|
1431
|
+
motionDenied: { on: { REQUEST_PERMISSION: {
|
|
1432
|
+
target: "requesting",
|
|
1433
|
+
actions: assign({ retryDeniedMotionPermission: true })
|
|
1434
|
+
} } }
|
|
1784
1435
|
}
|
|
1785
1436
|
},
|
|
1786
1437
|
capture: {
|
|
@@ -1809,6 +1460,11 @@ const faceCaptureMachine = setup({
|
|
|
1809
1460
|
guard: "isProtectedUploadFailure",
|
|
1810
1461
|
actions: "setUploadFailureAndDecrement"
|
|
1811
1462
|
},
|
|
1463
|
+
{
|
|
1464
|
+
target: "#faceCapture.permissions.denied",
|
|
1465
|
+
guard: "isProtectedAcquireDenied",
|
|
1466
|
+
actions: "setPermissionDenied"
|
|
1467
|
+
},
|
|
1812
1468
|
{
|
|
1813
1469
|
target: "#faceCapture.error",
|
|
1814
1470
|
actions: "setProtectedFailure"
|
|
@@ -1832,7 +1488,11 @@ const faceCaptureMachine = setup({
|
|
|
1832
1488
|
target: "#faceCapture.error",
|
|
1833
1489
|
actions: assign({
|
|
1834
1490
|
deepsightReady: () => false,
|
|
1835
|
-
error: () =>
|
|
1491
|
+
error: () => ({
|
|
1492
|
+
type: DEEPSIGHT_INITIALIZATION_FAILED_CODE,
|
|
1493
|
+
message: "Deepsight initialization failed",
|
|
1494
|
+
moduleErrorCode: DEEPSIGHT_INITIALIZATION_FAILED_CODE
|
|
1495
|
+
})
|
|
1836
1496
|
})
|
|
1837
1497
|
}
|
|
1838
1498
|
}
|
|
@@ -1952,6 +1612,14 @@ const faceCaptureMachine = setup({
|
|
|
1952
1612
|
},
|
|
1953
1613
|
onError: { target: "finished" }
|
|
1954
1614
|
} },
|
|
1615
|
+
outOfAttempts: { always: [{
|
|
1616
|
+
target: "error",
|
|
1617
|
+
guard: "isNoAttemptsTerminal",
|
|
1618
|
+
actions: "setTerminalError"
|
|
1619
|
+
}, {
|
|
1620
|
+
target: "terminalProcessing",
|
|
1621
|
+
actions: "flagFaceManualReview"
|
|
1622
|
+
}] },
|
|
1955
1623
|
terminalProcessing: {
|
|
1956
1624
|
entry: ["completeProtectedRecording", "cleanup"],
|
|
1957
1625
|
invoke: {
|