@incodetech/core 2.4.1-agentic → 2.4.1-agentic.10
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/{BaseWasmProvider-Bq3OHo7P.d.ts → BaseWasmProvider-bBNquvYn.d.ts} +2 -2
- package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
- package/dist/{multipartRecordingService-DMBxHKS2.esm.js → CameraCompositor-DN7NkJzV.esm.js} +7 -734
- package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
- package/dist/{FaceDetectionProvider-B83VmClw.esm.js → FaceDetectionProvider-BSLpXAGx.esm.js} +11 -12
- package/dist/{IIdCaptureCapability-CGcEt2Cw.d.ts → IIdCaptureCapability-C-5M8pP1.d.ts} +2 -2
- package/dist/{IWasmUtilCapability-Cqiaxydi.d.ts → IWasmUtilCapability-BRn0wz8v.d.ts} +2 -2
- package/dist/MultipartRecordingProvider-BfQPSgSO.esm.js +151 -0
- package/dist/{StreamCanvasCapture-C3xNfOsv.d.ts → StreamCanvasCapture-ixfy84ys.d.ts} +2 -2
- package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
- package/dist/{WasmUtilProvider-GTkoJyFY.esm.js → WasmUtilProvider-C_puwvVn.esm.js} +2 -2
- package/dist/WorkerEncoderRecordingProvider-CyCrQnZR.esm.js +80 -0
- package/dist/addressSearch-B_4JYKa-.esm.js +72 -0
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-CQ08atTC.esm.js → antifraudManager-BWCVkSu2.esm.js} +2 -2
- package/dist/{antifraudStateMachine-BcsUTTIr.esm.js → antifraudStateMachine-CX9I2f3s.esm.js} +1 -1
- package/dist/{api-BO8JA7Pf.esm.js → api-BSnbg4HO.esm.js} +4 -0
- package/dist/{apiError-CfuIvnUy.esm.js → apiError-Bmwy1Fa7.esm.js} +1 -1
- package/dist/{attemptCarry-BjTJ6bMQ.esm.js → attemptCarry-zQH85Elh.esm.js} +2 -2
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-DvmklBTE.esm.js → authenticationManager-BoiOaB0m.esm.js} +5 -5
- package/dist/{authenticationManager-C-cOki0Y.d.ts → authenticationManager-CISxaY6N.d.ts} +1 -1
- package/dist/{authenticationStateMachine-BL2ptOA0.esm.js → authenticationStateMachine-BMD1JLwr.esm.js} +3 -3
- package/dist/avatar.d.ts +1 -1
- package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
- package/dist/{backCameraStream-C5_NNfUN.esm.js → backCameraStream-DS1oDiUq.esm.js} +10 -65
- package/dist/{browser-pQZA35G2-DtkAf6sn.esm.js → browser-pQZA35G2-PIj2uGBm.esm.js} +1 -1
- package/dist/camera.d.ts +2 -2
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-CM0fuqDC.esm.js → certificateIssuanceManager-DzDuQTsK.esm.js} +2 -2
- package/dist/{certificateIssuanceStateMachine-kksIUOPD.esm.js → certificateIssuanceStateMachine-BAOYLACb.esm.js} +2 -2
- package/dist/{connectivity-HSl0diCx.esm.js → connectivity-BCuEoQ-n.esm.js} +2 -21
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-_q9yJUku.d.ts → consentManager-7aHaehwF.d.ts} +5 -5
- package/dist/{consentManager-CBwFozhv.esm.js → consentManager-DFSKQTcR.esm.js} +2 -2
- package/dist/{consentStateMachine-CpmRAcr2.esm.js → consentStateMachine-4nZIH2O8.esm.js} +1 -1
- package/dist/{cpf-uAZTPUBy.esm.js → cpf-BIADjddF.esm.js} +1 -25
- package/dist/{createFaceAvatar-lYX0VTYs.d.ts → createFaceAvatar-BimBTONm.d.ts} +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-64O8t10a.esm.js → crossDocumentDataMatchManager-D7ka2qOC.esm.js} +2 -2
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-CLgJQcx0.esm.js → curpValidationManager-BVTt7IgC.esm.js} +2 -2
- package/dist/{curpValidationManager-CXpFE-Mv.d.ts → curpValidationManager-DEqTUWdu.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-Bx9YhVkJ.esm.js → curpValidationStateMachine-FB_MRbZQ.esm.js} +2 -2
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-DWt_0YtJ.esm.js → customFieldsManager-gbsq53p6.esm.js} +2 -2
- package/dist/{customWatchlistManager-D8o-2Nej.esm.js → customWatchlistManager-50APwk4Z.esm.js} +2 -2
- package/dist/{customWatchlistStateMachine-Sbi6DIcK.esm.js → customWatchlistStateMachine-CpEVPzuT.esm.js} +1 -1
- package/dist/{deepsightService-twg3bXqY.esm.js → deepsightLoader-BKCT8UT1.esm.js} +34 -29
- package/dist/definitionSource-BHNxbuiv.esm.js +184 -0
- package/dist/{desktopCameraElection-kHY2IDJi.esm.js → desktopCameraElection-Dvvw7PRY.esm.js} +5 -5
- package/dist/document-capture.d.ts +3 -3
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-CMSC_Mhd.esm.js → documentCaptureManager-BG5TuqJz.esm.js} +3 -2
- package/dist/{documentCaptureManager-6tnnDkMX.d.ts → documentCaptureManager-DDfviFg0.d.ts} +25 -4
- package/dist/{documentCaptureStateMachine-BCwD5Rto.esm.js → documentCaptureStateMachine-C7PW_Ah9.esm.js} +67 -26
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-DU6W1e20.esm.js → dynamicFormsManager-B0bpHhhJ.esm.js} +2 -2
- package/dist/{dynamicFormsStateMachine-C8Z7k3vo.esm.js → dynamicFormsStateMachine-2ZHyejBc.esm.js} +2 -2
- package/dist/ekyb.d.ts +4 -4
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-TB6ZG5lX.d.ts → ekybManager-BLOkwmWO.d.ts} +2 -2
- package/dist/{ekybManager-TGfqyjuu.esm.js → ekybManager-P9mC7W9J.esm.js} +2 -2
- package/dist/{ekybStateMachine-DBgFuEPK.esm.js → ekybStateMachine-C7HKaeVr.esm.js} +7 -3
- package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
- package/dist/ekyc-prefill.d.ts +17 -0
- package/dist/ekyc-prefill.esm.js +3 -0
- package/dist/ekyc.d.ts +3 -2
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-C2cgG2Pl.esm.js → ekycManager-CeeJoRFY.esm.js} +2 -2
- package/dist/{ekycManager-BSQteIfC.d.ts → ekycManager-q1fos6IY.d.ts} +2 -1
- package/dist/ekycPrefillManager-C6BFFKxc.esm.js +102 -0
- package/dist/ekycPrefillManager-PPGVZbWk.d.ts +565 -0
- package/dist/ekycPrefillStateMachine-Dku90kZL.esm.js +686 -0
- package/dist/ekycRules-BLX7Elcb.esm.js +319 -0
- package/dist/{ekycStateMachine-CuNF7z4O.esm.js → ekycStateMachine-DBTczgGE.esm.js} +719 -596
- package/dist/{ekycUtils-BFncpC4F.esm.js → ekycUtils-Dcff8BOD.esm.js} +103 -14
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-C7pqXsRm.esm.js → electronicSignatureManager-BKQuhJm_.esm.js} +4 -4
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-FH_CP0cT.esm.js → emailManager-CGmKbsBL.esm.js} +2 -2
- package/dist/{emailStateMachine-Cx-uTaBV.esm.js → emailStateMachine-CGY1UGs2.esm.js} +2 -2
- package/dist/{events-CQteqXfy.esm.js → events-C7h7oaTE.esm.js} +1 -1
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +20 -18
- package/dist/extensibility.esm.js +37 -35
- package/dist/{externalFetch-CQY41QT1.esm.js → externalFetch-cUjJYyXj.esm.js} +1 -1
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-C-xKdj-d.d.ts → faceCaptureManagerFactory-BVwVGa3z.d.ts} +7 -7
- package/dist/{faceCaptureManagerFactory-CBm05KnT.esm.js → faceCaptureManagerFactory-ClFsByZc.esm.js} +4 -4
- package/dist/{faceCaptureSetup-BQjCbL51.esm.js → faceCaptureSetup-9hv5GC_H.esm.js} +12 -403
- package/dist/{faceMatchManager-Z4UDLwAv.d.ts → faceMatchManager-BZtEw6bB.d.ts} +9 -3
- package/dist/{faceMatchManager-B2zp7yP4.esm.js → faceMatchManager-CRe7Nvm6.esm.js} +2 -2
- package/dist/{faceMatchStateMachine-ByTMQCUC.esm.js → faceMatchStateMachine-EX9QhxFE.esm.js} +28 -14
- package/dist/{feature-management-DjAG5lsJ.esm.js → feature-management-CmKTG_T5.esm.js} +35 -21
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-CC0vKmpf.esm.js → fieldComparisonManager-DuosZJso.esm.js} +2 -2
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-Be-r4oZj.esm.js → fiscalQrManager-ji0qDaTW.esm.js} +3 -3
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +33 -18
- package/dist/flow.esm.js +82 -17
- package/dist/{flowCompletionService-ChMU2v79.esm.js → flowCompletionService-DvcH16XO.esm.js} +24 -3
- package/dist/{flowServices-g2tVWsJl.esm.js → flowServices-Ca2vKNt2.esm.js} +84 -139
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-DLbvZwUB.esm.js → geolocationManager-CiG32lIm.esm.js} +2 -2
- package/dist/{geolocationStateMachine-CAJVongM.esm.js → geolocationStateMachine-5rnTEOuw.esm.js} +3 -3
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-CkX9TEkh.esm.js → governmentValidationManager-BivVZNVe.esm.js} +2 -2
- package/dist/{governmentValidationStateMachine-PTPCP26N.esm.js → governmentValidationStateMachine-CeSDNgha.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/home.esm.js +1 -1
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +2 -2
- package/dist/id-ocr.esm.js +3 -19
- package/dist/id-selfie-flow.d.ts +3 -3
- package/dist/id-selfie-flow.esm.js +10 -9
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +4 -4
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-MSQoqScU.esm.js → idCaptureDefaults-DBnOC28H.esm.js} +3 -3
- package/dist/{idCaptureManager-zZdTcpG1.esm.js → idCaptureManager-B5xqok0L.esm.js} +9 -8
- package/dist/{idCaptureManager-DzTfQ1Am.d.ts → idCaptureManager-CG8zbAp0.d.ts} +10 -8
- package/dist/{idCaptureServices-8OHinO0N.esm.js → idCaptureServices-BIF_7rub.esm.js} +27 -196
- package/dist/{idCaptureStateMachine-B3G6XoDG.esm.js → idCaptureStateMachine-B5cfgKvn.esm.js} +50 -22
- package/dist/idOcrCpfUtils-Nfln1Psb.esm.js +18 -0
- package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-B5xeI2lg.d.ts} +3 -3
- package/dist/{idOcrManager-B64-fjWg.esm.js → idOcrManager-DNbVTMIu.esm.js} +2 -2
- package/dist/{idOcrStateMachine-B1aZnobs.esm.js → idOcrStateMachine-MAGnpWkb.esm.js} +8 -7
- package/dist/{idVerificationManager-_Kebv-Ue.esm.js → idVerificationManager-BEAkamNm.esm.js} +2 -2
- package/dist/{idVerificationStateMachine-DQn6c84z.esm.js → idVerificationStateMachine-D5mBN2Ye.esm.js} +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-DDXkNVZi.esm.js → identityReuseManager-M8-BTjar.esm.js} +2 -2
- package/dist/{identityReuseStateMachine-Bcnkbjf8.esm.js → identityReuseStateMachine-D5bXgw9h.esm.js} +1 -1
- package/dist/{index-DEfwds5y.d.ts → index-Btj1EhiM.d.ts} +43 -19
- package/dist/{index-DMDAk85K.d.ts → index-CSPOoqah.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-CXIBwBeE.esm.js → invokeOnCaptureCallback-C1-j4fsq.esm.js} +1 -1
- package/dist/kyb-checks.d.ts +3 -0
- package/dist/kyb-checks.esm.js +3 -0
- package/dist/kybChecksManager-CblEL97E.d.ts +95 -0
- package/dist/kybChecksManager-CnqwgKoV.esm.js +89 -0
- package/dist/kybChecksStateMachine-Be41K_NS.esm.js +719 -0
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-xx3mY-xw.d.ts → mandatoryConsentManager-CYOJd_IZ.d.ts} +20 -11
- package/dist/{mandatoryConsentManager-43W5d_8G.esm.js → mandatoryConsentManager-LFhUlLvO.esm.js} +2 -2
- package/dist/{mandatoryConsentStateMachine-CVlgdlnt.esm.js → mandatoryConsentStateMachine-DTSyDqQs.esm.js} +11 -5
- package/dist/mediaRecorderOptions-B9-IEVtV.esm.js +70 -0
- package/dist/multipartRecordingService-CCiRpByl.esm.js +407 -0
- package/dist/{permissionGuards-B3OPL8Si.esm.js → permissionGuards-DjQUR1du.esm.js} +1 -1
- package/dist/{permissionServices-DnBAN_hW.esm.js → permissionServices-CZpORUWY.esm.js} +8 -6
- package/dist/phone.esm.js +2 -2
- package/dist/phoneFormat-DEpESpz2.esm.js +87 -0
- package/dist/{phoneManager-C6jut_pz.esm.js → phoneManager-C-qD3p3N.esm.js} +3 -3
- package/dist/phoneServices-BdR1nmSO.esm.js +77 -0
- package/dist/{phoneStateMachine-T1-drWfG.esm.js → phoneStateMachine-2FMTdjtJ.esm.js} +20 -60
- package/dist/{processFaceMatch-BWme3kVV.esm.js → processFaceMatch-B1YnoBer.esm.js} +1 -1
- package/dist/qe-signature.esm.js +1 -1
- package/dist/recordingService-BVSCo0ac.esm.js +397 -0
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-BJXC6Kx9.esm.js → redirectToMobileManager-CqyDfDxs.esm.js} +3 -3
- package/dist/{redirectToMobileStateMachine-BBMAc2Gb.esm.js → redirectToMobileStateMachine-CXqfo2Gd.esm.js} +40 -22
- package/dist/resolveForm-f9PhUo9j.esm.js +143 -0
- package/dist/{runChildModule-DPHTqSdF.esm.js → runChildModule-BmteMhR7.esm.js} +2 -2
- package/dist/{sdkVersion-C3_P-Qbq.esm.js → sdkVersion-KZROt6l3.esm.js} +1 -1
- package/dist/selfie.d.ts +4 -4
- package/dist/selfie.esm.js +10 -10
- package/dist/{selfieErrorUtils-BL0BLMnp.esm.js → selfieErrorUtils-fqxp645p.esm.js} +1 -1
- package/dist/{selfieManager-Cbliomv7.esm.js → selfieManager-A-n3k9Tu.esm.js} +5 -5
- package/dist/{selfieManager-BMmpUii2.d.ts → selfieManager-DREuBhXZ.d.ts} +1 -1
- package/dist/{selfieStateMachine-B5m_Kn0O.esm.js → selfieStateMachine-48PKdKrw.esm.js} +3 -3
- package/dist/{session-DAaAewMX.esm.js → session-D0DWDKp9.esm.js} +4 -4
- package/dist/session.d.ts +2 -2
- package/dist/session.esm.js +6 -6
- package/dist/{sessionInitializer-CWFT4dfw.esm.js → sessionInitializer-I92b2dmL.esm.js} +94 -24
- package/dist/{setup-CDAKwTr7.esm.js → setup-BpjzWqR1.esm.js} +25 -27
- package/dist/{setup-D9qt8YVU.d.ts → setup-CG6oLkAa.d.ts} +2 -2
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-BeEVCcsC.esm.js → signatureManager-M9vQBj19.esm.js} +2 -2
- package/dist/{signatureStateMachine-_1c1vSid.esm.js → signatureStateMachine-0_frzAN5.esm.js} +1 -1
- package/dist/{stats-BpMz-hTP.esm.js → stats-C2sigf9p.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/step-up.d.ts +378 -0
- package/dist/step-up.esm.js +639 -0
- package/dist/textRules-D4NRinKY.d.ts +41 -0
- package/dist/{tri-BajQnjbf.esm.js → tri-DaUNvo-o.esm.js} +29 -34
- package/dist/tri.d.ts +2 -2
- package/dist/tri.esm-Df5eKLsY.esm.js +2165 -0
- package/dist/tri.esm.js +2 -2
- package/dist/{trueSightService-BujtUIW6.esm.js → trueSightService-DHYTBCIn.esm.js} +4 -4
- package/dist/trust-graph.esm.js +1 -1
- package/dist/types-B-PIc0en.d.ts +115 -0
- package/dist/{types-C397LhmN.d.ts → types-BgRHw-dR.d.ts} +1 -1
- package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
- package/dist/{types-xEEWCx1j.d.ts → types-BqlZSoZ-.d.ts} +5 -5
- package/dist/types-CTaL0XJz.d.ts +80 -0
- package/dist/{types-e8fCsvvk.d.ts → types-Cbm9J2yF.d.ts} +1 -1
- package/dist/{types--3HDl2SF.d.ts → types-CgihAhT_.d.ts} +3 -3
- package/dist/{types-ZTZelfbM.d.ts → types-CyNndVAT.d.ts} +14 -6
- package/dist/{types-B2FK_wYb.d.ts → types-DEa3taWc.d.ts} +9 -41
- package/dist/{types-PTZHRhGX.d.ts → types-P9LzsfRo.d.ts} +3 -2
- package/dist/{types-DuD8TRJU.d.ts → types-TisHEbBg.d.ts} +12 -4
- package/dist/types-kLsU6Jkt.d.ts +6 -0
- package/dist/{urlUtils-eYiyWjh0.esm.js → urlUtils-B2wagB5v.esm.js} +14 -1
- package/dist/usStates-CwOQ2kAx.esm.js +209 -0
- package/dist/video-selfie.d.ts +5 -4
- package/dist/video-selfie.esm.js +9 -7
- package/dist/{videoSelfieCameraWarmer-DjkPpoj_.esm.js → videoSelfieCameraWarmer-CTOpqhov.esm.js} +16 -14
- package/dist/{videoSelfieStepDetector-RfSmlFFW.d.ts → videoSelfieStepDetector-4XE2QI5q.d.ts} +4 -4
- package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
- package/dist/{warmup-BkfxQZsC.esm.js → warmup-9iKKNNuW.esm.js} +69 -20
- package/dist/{warmup-BO57syF6.d.ts → warmup-BNhIuURi.d.ts} +18 -2
- package/dist/wasm.d.ts +9 -3
- package/dist/wasm.esm.js +3 -3
- package/dist/{wasmDsFlagSync-BhU5H2oR.esm.js → wasmDsFlagSync-lRIgn5Ic.esm.js} +1 -1
- package/dist/{wasmWebClient-DTj9auyA.esm.js → wasmWebClient-C3v3s_4H.esm.js} +34 -19
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-CVay6-9A.esm.js → watchlistForBusinessManager-C1S5y5yj.esm.js} +2 -2
- package/dist/{watchlistForBusinessStateMachine-DA6K5na4.esm.js → watchlistForBusinessStateMachine-Bj_hnoK5.esm.js} +1 -1
- package/dist/{watchlistManager-B8gQ_rw3.esm.js → watchlistManager-BpegtZbc.esm.js} +2 -2
- package/dist/{watchlistStateMachine-CSi_ZhtT.esm.js → watchlistStateMachine-Bgkh1gra.esm.js} +1 -1
- package/dist/workflow.d.ts +226 -41
- package/dist/workflow.esm.js +163 -67
- package/package.json +21 -5
- package/dist/addressSearch-41sMcnJk.esm.js +0 -604
- package/dist/deepsightLoader-DMxtowCm.esm.js +0 -33
- package/dist/tri.esm-CzTNi5Q_.esm.js +0 -3826
- package/dist/types-D9r3zRfY.d.ts +0 -6
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
//#region src/shared/usStates.ts
|
|
2
|
+
const usStates = {
|
|
3
|
+
AL: {
|
|
4
|
+
code: "AL",
|
|
5
|
+
name: "Alabama"
|
|
6
|
+
},
|
|
7
|
+
AK: {
|
|
8
|
+
code: "AK",
|
|
9
|
+
name: "Alaska"
|
|
10
|
+
},
|
|
11
|
+
AZ: {
|
|
12
|
+
code: "AZ",
|
|
13
|
+
name: "Arizona"
|
|
14
|
+
},
|
|
15
|
+
AR: {
|
|
16
|
+
code: "AR",
|
|
17
|
+
name: "Arkansas"
|
|
18
|
+
},
|
|
19
|
+
CA: {
|
|
20
|
+
code: "CA",
|
|
21
|
+
name: "California"
|
|
22
|
+
},
|
|
23
|
+
CO: {
|
|
24
|
+
code: "CO",
|
|
25
|
+
name: "Colorado"
|
|
26
|
+
},
|
|
27
|
+
CT: {
|
|
28
|
+
code: "CT",
|
|
29
|
+
name: "Connecticut"
|
|
30
|
+
},
|
|
31
|
+
DE: {
|
|
32
|
+
code: "DE",
|
|
33
|
+
name: "Delaware"
|
|
34
|
+
},
|
|
35
|
+
FL: {
|
|
36
|
+
code: "FL",
|
|
37
|
+
name: "Florida"
|
|
38
|
+
},
|
|
39
|
+
GA: {
|
|
40
|
+
code: "GA",
|
|
41
|
+
name: "Georgia"
|
|
42
|
+
},
|
|
43
|
+
HI: {
|
|
44
|
+
code: "HI",
|
|
45
|
+
name: "Hawaii"
|
|
46
|
+
},
|
|
47
|
+
ID: {
|
|
48
|
+
code: "ID",
|
|
49
|
+
name: "Idaho"
|
|
50
|
+
},
|
|
51
|
+
IL: {
|
|
52
|
+
code: "IL",
|
|
53
|
+
name: "Illinois"
|
|
54
|
+
},
|
|
55
|
+
IN: {
|
|
56
|
+
code: "IN",
|
|
57
|
+
name: "Indiana"
|
|
58
|
+
},
|
|
59
|
+
IA: {
|
|
60
|
+
code: "IA",
|
|
61
|
+
name: "Iowa"
|
|
62
|
+
},
|
|
63
|
+
KS: {
|
|
64
|
+
code: "KS",
|
|
65
|
+
name: "Kansas"
|
|
66
|
+
},
|
|
67
|
+
KY: {
|
|
68
|
+
code: "KY",
|
|
69
|
+
name: "Kentucky"
|
|
70
|
+
},
|
|
71
|
+
LA: {
|
|
72
|
+
code: "LA",
|
|
73
|
+
name: "Louisiana"
|
|
74
|
+
},
|
|
75
|
+
ME: {
|
|
76
|
+
code: "ME",
|
|
77
|
+
name: "Maine"
|
|
78
|
+
},
|
|
79
|
+
MD: {
|
|
80
|
+
code: "MD",
|
|
81
|
+
name: "Maryland"
|
|
82
|
+
},
|
|
83
|
+
MA: {
|
|
84
|
+
code: "MA",
|
|
85
|
+
name: "Massachusetts"
|
|
86
|
+
},
|
|
87
|
+
MI: {
|
|
88
|
+
code: "MI",
|
|
89
|
+
name: "Michigan"
|
|
90
|
+
},
|
|
91
|
+
MN: {
|
|
92
|
+
code: "MN",
|
|
93
|
+
name: "Minnesota"
|
|
94
|
+
},
|
|
95
|
+
MS: {
|
|
96
|
+
code: "MS",
|
|
97
|
+
name: "Mississippi"
|
|
98
|
+
},
|
|
99
|
+
MO: {
|
|
100
|
+
code: "MO",
|
|
101
|
+
name: "Missouri"
|
|
102
|
+
},
|
|
103
|
+
MT: {
|
|
104
|
+
code: "MT",
|
|
105
|
+
name: "Montana"
|
|
106
|
+
},
|
|
107
|
+
NE: {
|
|
108
|
+
code: "NE",
|
|
109
|
+
name: "Nebraska"
|
|
110
|
+
},
|
|
111
|
+
NV: {
|
|
112
|
+
code: "NV",
|
|
113
|
+
name: "Nevada"
|
|
114
|
+
},
|
|
115
|
+
NH: {
|
|
116
|
+
code: "NH",
|
|
117
|
+
name: "New Hampshire"
|
|
118
|
+
},
|
|
119
|
+
NJ: {
|
|
120
|
+
code: "NJ",
|
|
121
|
+
name: "New Jersey"
|
|
122
|
+
},
|
|
123
|
+
NM: {
|
|
124
|
+
code: "NM",
|
|
125
|
+
name: "New Mexico"
|
|
126
|
+
},
|
|
127
|
+
NY: {
|
|
128
|
+
code: "NY",
|
|
129
|
+
name: "New York"
|
|
130
|
+
},
|
|
131
|
+
NC: {
|
|
132
|
+
code: "NC",
|
|
133
|
+
name: "North Carolina"
|
|
134
|
+
},
|
|
135
|
+
ND: {
|
|
136
|
+
code: "ND",
|
|
137
|
+
name: "North Dakota"
|
|
138
|
+
},
|
|
139
|
+
OH: {
|
|
140
|
+
code: "OH",
|
|
141
|
+
name: "Ohio"
|
|
142
|
+
},
|
|
143
|
+
OK: {
|
|
144
|
+
code: "OK",
|
|
145
|
+
name: "Oklahoma"
|
|
146
|
+
},
|
|
147
|
+
OR: {
|
|
148
|
+
code: "OR",
|
|
149
|
+
name: "Oregon"
|
|
150
|
+
},
|
|
151
|
+
PA: {
|
|
152
|
+
code: "PA",
|
|
153
|
+
name: "Pennsylvania"
|
|
154
|
+
},
|
|
155
|
+
RI: {
|
|
156
|
+
code: "RI",
|
|
157
|
+
name: "Rhode Island"
|
|
158
|
+
},
|
|
159
|
+
SC: {
|
|
160
|
+
code: "SC",
|
|
161
|
+
name: "South Carolina"
|
|
162
|
+
},
|
|
163
|
+
SD: {
|
|
164
|
+
code: "SD",
|
|
165
|
+
name: "South Dakota"
|
|
166
|
+
},
|
|
167
|
+
TN: {
|
|
168
|
+
code: "TN",
|
|
169
|
+
name: "Tennessee"
|
|
170
|
+
},
|
|
171
|
+
TX: {
|
|
172
|
+
code: "TX",
|
|
173
|
+
name: "Texas"
|
|
174
|
+
},
|
|
175
|
+
UT: {
|
|
176
|
+
code: "UT",
|
|
177
|
+
name: "Utah"
|
|
178
|
+
},
|
|
179
|
+
VT: {
|
|
180
|
+
code: "VT",
|
|
181
|
+
name: "Vermont"
|
|
182
|
+
},
|
|
183
|
+
VA: {
|
|
184
|
+
code: "VA",
|
|
185
|
+
name: "Virginia"
|
|
186
|
+
},
|
|
187
|
+
WA: {
|
|
188
|
+
code: "WA",
|
|
189
|
+
name: "Washington"
|
|
190
|
+
},
|
|
191
|
+
WV: {
|
|
192
|
+
code: "WV",
|
|
193
|
+
name: "West Virginia"
|
|
194
|
+
},
|
|
195
|
+
WI: {
|
|
196
|
+
code: "WI",
|
|
197
|
+
name: "Wisconsin"
|
|
198
|
+
},
|
|
199
|
+
WY: {
|
|
200
|
+
code: "WY",
|
|
201
|
+
name: "Wyoming"
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
const usStateOptions = Object.values(usStates).map((state) => ({
|
|
205
|
+
value: state.code,
|
|
206
|
+
label: state.name
|
|
207
|
+
}));
|
|
208
|
+
//#endregion
|
|
209
|
+
export { usStates as n, usStateOptions as t };
|
package/dist/video-selfie.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { c as WasmPipeline } from "./warmup-
|
|
1
|
+
import { c as WasmPipeline } from "./warmup-BNhIuURi.js";
|
|
2
2
|
import { A as StateMachine, _ as MachineContext, c as AnyEventObject, p as EventObject, v as MetaObject, y as NonReducibleUnknown } from "./spawn-D9jgw9pW.js";
|
|
3
3
|
import { t as Manager } from "./Manager-C9T5amUN.js";
|
|
4
4
|
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
|
-
import { t as DetectionOrientation } from "./IIdCaptureCapability-
|
|
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-
|
|
7
|
+
import { t as DetectionOrientation } from "./IIdCaptureCapability-C-5M8pP1.js";
|
|
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-4XE2QI5q.js";
|
|
9
9
|
//#region ../infra/src/capabilities/ITimerCapability.d.ts
|
|
10
10
|
type TimerHandle = ReturnType<typeof setTimeout>;
|
|
11
11
|
type ITimerCapability = {
|
|
@@ -299,7 +299,8 @@ type VideoSelfieCameraWarmer = {
|
|
|
299
299
|
/**
|
|
300
300
|
* Stop a warmed-but-unused stream. Call on unmount when capture never started
|
|
301
301
|
* so the camera light doesn't stay on. No-op once the stream has been consumed
|
|
302
|
-
* by the recording machine.
|
|
302
|
+
* by the recording machine. After `dispose()`, `warm()` does nothing and
|
|
303
|
+
* `acquireCamera` always acquires a fresh stream.
|
|
303
304
|
*/
|
|
304
305
|
dispose(): void;
|
|
305
306
|
};
|
package/dist/video-selfie.esm.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
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-BpjzWqR1.esm.js";
|
|
2
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-C_puwvVn.esm.js";
|
|
3
|
+
import { t as api, u as endpoints } from "./api-BSnbg4HO.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 {
|
|
6
|
+
import { f as facingModeForStep, m as videoSelfieWasmPipelines, p as resolveVideoSelfieSteps } from "./flowServices-Ca2vKNt2.esm.js";
|
|
7
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 { t as carryAttempts } from "./attemptCarry-
|
|
11
|
-
import { i as createRecordingCompositor, n as WorkerEncoderRecordingProvider, t as MultipartRecordingService } from "./multipartRecordingService-DMBxHKS2.esm.js";
|
|
10
|
+
import { t as carryAttempts } from "./attemptCarry-zQH85Elh.esm.js";
|
|
12
11
|
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-
|
|
12
|
+
import { n as defaultAcquireCamera, r as createDefaultStepDetector, s as isConnectionError, t as createVideoSelfieCameraWarmer } from "./videoSelfieCameraWarmer-CTOpqhov.esm.js";
|
|
13
|
+
import { r as createRecordingCompositor } from "./CameraCompositor-DN7NkJzV.esm.js";
|
|
14
|
+
import { t as WorkerEncoderRecordingProvider } from "./WorkerEncoderRecordingProvider-CyCrQnZR.esm.js";
|
|
15
|
+
import { t as MultipartRecordingService } from "./multipartRecordingService-CCiRpByl.esm.js";
|
|
14
16
|
import { t as videoSelfieFlowModuleMachine } from "./videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js";
|
|
15
17
|
//#region ../../node_modules/.pnpm/audio-recorder-polyfill@0.4.1/node_modules/audio-recorder-polyfill/wave-encoder/index.js
|
|
16
18
|
var wave_encoder_default = () => {
|
package/dist/{videoSelfieCameraWarmer-DjkPpoj_.esm.js → videoSelfieCameraWarmer-CTOpqhov.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-BSnbg4HO.esm.js";
|
|
2
2
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
3
|
-
import {
|
|
3
|
+
import { f as facingModeForStep, p as resolveVideoSelfieSteps } from "./flowServices-Ca2vKNt2.esm.js";
|
|
4
4
|
import { i as requestCameraWithFallback, r as requestCameraAccess } from "./camera-E_Kcre4O.esm.js";
|
|
5
|
-
import { t as checkPermission } from "./permissionServices-
|
|
6
|
-
import { c as uploadSelfie, n as encryptSelfieImage, o as startDetection, s as processFace, t as FaceDetectionProvider, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { t as checkPermission } from "./permissionServices-CZpORUWY.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-BSLpXAGx.esm.js";
|
|
7
|
+
import { t as StreamCanvasProcessingSession } from "./StreamCanvasProcessingSession-CBnbTnOr.esm.js";
|
|
8
|
+
import { n as getBackCameraStream } from "./backCameraStream-DS1oDiUq.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-fqxp645p.esm.js";
|
|
11
|
+
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-DBnOC28H.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) {
|
|
@@ -470,10 +470,10 @@ function createVideoSelfieCameraWarmer(config, steps = resolveVideoSelfieSteps(c
|
|
|
470
470
|
const firstFacing = facingModeForStep(steps[0] ?? "selfie");
|
|
471
471
|
let warming = null;
|
|
472
472
|
let warmed = null;
|
|
473
|
-
let
|
|
473
|
+
let handedOff = null;
|
|
474
474
|
return {
|
|
475
475
|
warm() {
|
|
476
|
-
if (warming) return;
|
|
476
|
+
if (warming || handedOff) return;
|
|
477
477
|
warming = (async () => {
|
|
478
478
|
try {
|
|
479
479
|
if (await checkPermission() !== "granted") return null;
|
|
@@ -485,8 +485,8 @@ function createVideoSelfieCameraWarmer(config, steps = resolveVideoSelfieSteps(c
|
|
|
485
485
|
})();
|
|
486
486
|
},
|
|
487
487
|
async acquireCamera(facingMode, withAudio) {
|
|
488
|
-
if (!
|
|
489
|
-
|
|
488
|
+
if (!handedOff && facingMode === firstFacing && withAudio) {
|
|
489
|
+
handedOff = "consumed";
|
|
490
490
|
const stream = warmed ?? (warming ? await warming : null);
|
|
491
491
|
warmed = null;
|
|
492
492
|
if (stream) return stream;
|
|
@@ -494,12 +494,14 @@ function createVideoSelfieCameraWarmer(config, steps = resolveVideoSelfieSteps(c
|
|
|
494
494
|
return defaultAcquireCamera(facingMode, withAudio);
|
|
495
495
|
},
|
|
496
496
|
dispose() {
|
|
497
|
-
if (
|
|
497
|
+
if (handedOff) return;
|
|
498
|
+
handedOff = "disposed";
|
|
498
499
|
if (warmed) {
|
|
499
500
|
stopStream(warmed);
|
|
500
501
|
warmed = null;
|
|
501
502
|
} else if (warming) warming.then((stream) => {
|
|
502
|
-
|
|
503
|
+
stopStream(stream);
|
|
504
|
+
warmed = null;
|
|
503
505
|
});
|
|
504
506
|
}
|
|
505
507
|
};
|
package/dist/{videoSelfieStepDetector-RfSmlFFW.d.ts → videoSelfieStepDetector-4XE2QI5q.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as FlowModuleConfig } from "./types-
|
|
2
|
-
import "./IWasmUtilCapability-
|
|
3
|
-
import { n as DetectionStatus } from "./types
|
|
1
|
+
import { i as FlowModuleConfig } from "./types-TisHEbBg.js";
|
|
2
|
+
import "./IWasmUtilCapability-BRn0wz8v.js";
|
|
3
|
+
import { n as DetectionStatus } from "./types-CgihAhT_.js";
|
|
4
4
|
import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
5
|
-
import { t as DetectionOrientation } from "./IIdCaptureCapability-
|
|
5
|
+
import { t as DetectionOrientation } from "./IIdCaptureCapability-C-5M8pP1.js";
|
|
6
6
|
//#region src/modules/video-selfie/types.d.ts
|
|
7
7
|
/**
|
|
8
8
|
* The capture steps a Video Selfie session can run, in flow order. Which steps
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/internal/virtualCameraCheck.ts
|
|
2
|
+
const frameSources = {
|
|
3
|
+
front: "FRONT_ID",
|
|
4
|
+
back: "BACK_ID",
|
|
5
|
+
selfie: "SELFIE"
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Runs the native post-capture check (`poc`).
|
|
9
|
+
*
|
|
10
|
+
* Since ml-wasm-kit v2.14.53 (ADR 0008, single-run IAD) the binding keeps its
|
|
11
|
+
* output argument for arity but never writes into it: the post-capture
|
|
12
|
+
* verdicts travel only inside the signed capture metadata that the protected
|
|
13
|
+
* upload carries. The JavaScript verdict this function used to derive from
|
|
14
|
+
* that output — the `/omni/log/frame/v2` frame upload, the
|
|
15
|
+
* `virtualCameraDetected` device stat and `setZc` — is gone with it (the same
|
|
16
|
+
* removal ms-incodesmile-web made in ENG-58409). The name is kept so the
|
|
17
|
+
* protected attempts' POC step reads the same.
|
|
18
|
+
*/
|
|
19
|
+
async function runVirtualCameraCheck({ wasmUtil }) {
|
|
20
|
+
await wasmUtil.poc({
|
|
21
|
+
canvas: null,
|
|
22
|
+
itr: null,
|
|
23
|
+
skipped: null
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { runVirtualCameraCheck as n, frameSources as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as __exportAll } from "./rolldown-runtime-B-1-B7_t.esm.js";
|
|
2
|
-
import {
|
|
2
|
+
import { D as WASM_MODEL_FILES, F as reportWasmIntegritySummary, M as buildModelVariantSources, N as missingWasmModelError, P as resolveWasmSource, T as isDefaultCdnWasmConfig, b as SemaphoreProvider, c as wasmCallWrapper, f as rearmWasmCallDiagnostics, g as acquireWasmStorageFallback, h as onWasmModuleReset, j as WASM_PIPELINE_OPTIONAL_MODEL_NAMES, k as WASM_PIPELINE_MODELS, l as notePipelineStatePulled, m as loadWasmModule, n as createWebApiHostAdapter, p as resetWasmCallDiagnostics, v as emitWasmDiagnostic, x as DEFAULT_WASM_VERSION } from "./wasmWebClient-C3v3s_4H.esm.js";
|
|
3
3
|
import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
4
4
|
import { t as bindWasmMetadataV2Applier } from "./wasmMetadataVersionSync-U8EFUr1T.esm.js";
|
|
5
5
|
//#region ../infra/src/wasm/wasmEnumMaps.ts
|
|
@@ -449,6 +449,7 @@ var WasmRuntime = class WasmRuntime {
|
|
|
449
449
|
this.wasmModule = null;
|
|
450
450
|
this.workflowApiUtilities = null;
|
|
451
451
|
this.utilityApi = null;
|
|
452
|
+
this.parkedUtilityApi = null;
|
|
452
453
|
this.idCaptureWasmApi = null;
|
|
453
454
|
this.faceProcessingWasmApi = null;
|
|
454
455
|
this.cameraCycleApi = null;
|
|
@@ -473,7 +474,7 @@ var WasmRuntime = class WasmRuntime {
|
|
|
473
474
|
this.wasmModule = wasmModule;
|
|
474
475
|
this.usedSimd_ = simdUsed;
|
|
475
476
|
this.workflowApiUtilities = new this.wasmModule.WorkflowApiUtilities();
|
|
476
|
-
this.utilityApi =
|
|
477
|
+
this.utilityApi = this.takeUtilityApi(this.wasmModule);
|
|
477
478
|
this.utilityApi.setProductionMode(module.showLogs !== true);
|
|
478
479
|
this.utilityApi.smv(this.metadataV2Enabled_);
|
|
479
480
|
installWasmDiagnosticsSink(this.utilityApi);
|
|
@@ -491,6 +492,43 @@ var WasmRuntime = class WasmRuntime {
|
|
|
491
492
|
}
|
|
492
493
|
}
|
|
493
494
|
/**
|
|
495
|
+
* The UtilityApi for `wasmModule`: the parked one when it belongs to that
|
|
496
|
+
* module, else a new one. A parked handle of another module is deleted
|
|
497
|
+
* first; that module is gone, so a failure there must not stop this one.
|
|
498
|
+
*/
|
|
499
|
+
takeUtilityApi(wasmModule) {
|
|
500
|
+
const parked = this.parkedUtilityApi;
|
|
501
|
+
this.parkedUtilityApi = null;
|
|
502
|
+
if (parked?.module === wasmModule) return parked.handle;
|
|
503
|
+
deleteWasmHandle(null, parked?.handle ?? null);
|
|
504
|
+
return new wasmModule.UtilityApi();
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* Parks the UtilityApi of the module being freed instead of deleting it (see
|
|
508
|
+
* `parkedUtilityApi`). Without a module to tie it to, it is deleted as
|
|
509
|
+
* before.
|
|
510
|
+
*/
|
|
511
|
+
parkUtilityApi(firstFailure, wasmModule, handle) {
|
|
512
|
+
if (handle === null) return firstFailure;
|
|
513
|
+
if (wasmModule === null) return deleteWasmHandle(firstFailure, handle);
|
|
514
|
+
const previous = this.parkedUtilityApi;
|
|
515
|
+
this.parkedUtilityApi = {
|
|
516
|
+
module: wasmModule,
|
|
517
|
+
handle
|
|
518
|
+
};
|
|
519
|
+
return previous !== null && previous.handle !== handle ? deleteWasmHandle(firstFailure, previous.handle) : firstFailure;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* Deletes the parked UtilityApi, if any. Runs when `resetWasmModule()` drops
|
|
523
|
+
* the memoized module: its handle can never be reused, and deleting it lets
|
|
524
|
+
* the module be garbage-collected. Never throws.
|
|
525
|
+
*/
|
|
526
|
+
releaseParkedUtilityApi() {
|
|
527
|
+
const parked = this.parkedUtilityApi;
|
|
528
|
+
this.parkedUtilityApi = null;
|
|
529
|
+
deleteWasmHandle(null, parked?.handle ?? null);
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
494
532
|
* Returns initialization status
|
|
495
533
|
* @returns
|
|
496
534
|
*/
|
|
@@ -532,12 +570,15 @@ var WasmRuntime = class WasmRuntime {
|
|
|
532
570
|
this.requireWorkflowApiUtilities("Unable to update pipeline state, cpp API hasn't been initialized").handleDetectionCallAndUpdateState(this.pipelineTypeToWasmEnum(type));
|
|
533
571
|
}
|
|
534
572
|
/**
|
|
535
|
-
* Free allocated memory
|
|
573
|
+
* Free allocated memory. The UtilityApi is parked for the next
|
|
574
|
+
* `initialize()` on the same module rather than deleted (see
|
|
575
|
+
* `parkedUtilityApi`).
|
|
536
576
|
*/
|
|
537
577
|
async freeResources() {
|
|
538
578
|
this.loadedModels.clear();
|
|
539
579
|
const stream = this.unprotectedStream;
|
|
540
580
|
const modelsBuffers = this.modelsBuffers;
|
|
581
|
+
const wasmModule = this.wasmModule;
|
|
541
582
|
const workflowApiUtilities = this.workflowApiUtilities;
|
|
542
583
|
const utilityApi = this.utilityApi;
|
|
543
584
|
const idCaptureWasmApi = this.idCaptureWasmApi;
|
|
@@ -567,7 +608,7 @@ var WasmRuntime = class WasmRuntime {
|
|
|
567
608
|
let firstFailure = releaseCameraCycleResources(stream, cameraCycleApi);
|
|
568
609
|
firstFailure = deleteWasmHandle(firstFailure, modelsBuffers);
|
|
569
610
|
firstFailure = deleteWasmHandle(firstFailure, workflowApiUtilities);
|
|
570
|
-
firstFailure =
|
|
611
|
+
firstFailure = this.parkUtilityApi(firstFailure, wasmModule, utilityApi);
|
|
571
612
|
firstFailure = deleteWasmHandle(firstFailure, idCaptureWasmApi);
|
|
572
613
|
firstFailure = deleteWasmHandle(firstFailure, faceProcessingWasmApi);
|
|
573
614
|
firstFailure = deleteWasmHandle(firstFailure, cameraCycleApi);
|
|
@@ -637,25 +678,32 @@ var WasmRuntime = class WasmRuntime {
|
|
|
637
678
|
let cleanupFailure = null;
|
|
638
679
|
try {
|
|
639
680
|
if (pipelines === null) throw new Error(message);
|
|
640
|
-
|
|
681
|
+
const downloads = /* @__PURE__ */ new Map();
|
|
682
|
+
const loadModel = (path) => {
|
|
683
|
+
const resolvedSource = this.resolveModelSource(isWasmModelEntry(path) ? path.source : path);
|
|
684
|
+
const loaded = this.loadedModels.get(resolvedSource);
|
|
685
|
+
if (loaded) return Promise.resolve(loaded);
|
|
686
|
+
let download = downloads.get(resolvedSource);
|
|
687
|
+
if (!download) {
|
|
688
|
+
download = resolveWasmSource(resolvedSource, {
|
|
689
|
+
kind: "model",
|
|
690
|
+
file: isWasmModelEntry(path) ? path.file : void 0
|
|
691
|
+
}).then((model) => {
|
|
692
|
+
this.loadedModels.set(resolvedSource, model);
|
|
693
|
+
return model;
|
|
694
|
+
});
|
|
695
|
+
downloads.set(resolvedSource, download);
|
|
696
|
+
}
|
|
697
|
+
return download;
|
|
698
|
+
};
|
|
699
|
+
const pipelineModels = await Promise.all(Array.from(pipelines, async ([type, modelsPaths]) => {
|
|
700
|
+
return [type, await Promise.all(modelsPaths.map(loadModel))];
|
|
701
|
+
}));
|
|
702
|
+
for (const [type, pipelineBuffers] of pipelineModels) {
|
|
641
703
|
const wasmType = this.pipelineTypeToWasmEnum(type);
|
|
642
|
-
const pipelineBuffers = [];
|
|
643
704
|
const sizes = new (this.requireWasmModule(message)).VectorInt();
|
|
644
705
|
sizeVectors.push(sizes);
|
|
645
|
-
for (const
|
|
646
|
-
const file = isWasmModelEntry(path) ? path.file : void 0;
|
|
647
|
-
const resolvedSource = this.resolveModelSource(isWasmModelEntry(path) ? path.source : path);
|
|
648
|
-
let model = this.loadedModels.get(resolvedSource);
|
|
649
|
-
if (!model) {
|
|
650
|
-
model = await resolveWasmSource(resolvedSource, {
|
|
651
|
-
kind: "model",
|
|
652
|
-
file
|
|
653
|
-
});
|
|
654
|
-
this.loadedModels.set(resolvedSource, model);
|
|
655
|
-
}
|
|
656
|
-
sizes.push_back(model.byteLength);
|
|
657
|
-
pipelineBuffers.push(model);
|
|
658
|
-
}
|
|
706
|
+
for (const model of pipelineBuffers) sizes.push_back(model.byteLength);
|
|
659
707
|
buffSizes.set(wasmType, sizes);
|
|
660
708
|
modelData.set(wasmType, pipelineBuffers);
|
|
661
709
|
}
|
|
@@ -889,6 +937,7 @@ WasmRuntime.UNINITIALIZED_ENUM_MAP_MESSAGE = "Unable to map pipeline type, cpp A
|
|
|
889
937
|
/** Process-wide runtime. One binary, one heap, one owner. */
|
|
890
938
|
const wasmRuntime = new WasmRuntime();
|
|
891
939
|
bindWasmMetadataV2Applier((enabled) => wasmRuntime.setMetadataV2Enabled(enabled));
|
|
940
|
+
onWasmModuleReset(() => wasmRuntime.releaseParkedUtilityApi());
|
|
892
941
|
//#endregion
|
|
893
942
|
//#region ../infra/src/wasm/warmup.ts
|
|
894
943
|
var warmup_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -3,6 +3,16 @@ type WasmSource = string | ArrayBuffer | Uint8Array;
|
|
|
3
3
|
type WasmGlueModule = {
|
|
4
4
|
Module?: unknown;
|
|
5
5
|
};
|
|
6
|
+
/**
|
|
7
|
+
* Lazily imports a JavaScript glue module, for example
|
|
8
|
+
* `() => import('@incodetech/wasm-assets/webLib.js')`.
|
|
9
|
+
*
|
|
10
|
+
* Resolve to the glue module unchanged. Do not wrap its `Module` factory to
|
|
11
|
+
* construct, configure or delete WASM API objects such as `UtilityApi`:
|
|
12
|
+
* deleting one ends the page's fingerprint and behavior signal collection
|
|
13
|
+
* for good, and the SDK cannot restart it (ENG-62947). The SDK already
|
|
14
|
+
* silences WASM output unless `showLogs` is `true`.
|
|
15
|
+
*/
|
|
6
16
|
type WasmGlueLoader = () => Promise<WasmGlueModule>;
|
|
7
17
|
type WasmPipeline = 'selfie' | 'onDeviceSelfie' | 'idCapture' | 'videoSelfie' | 'videoSelfieId';
|
|
8
18
|
declare const WASM_MODEL_FILES: {
|
|
@@ -63,9 +73,15 @@ type WasmModuleConfig = {
|
|
|
63
73
|
* `wasmSimdPath`.
|
|
64
74
|
*/
|
|
65
75
|
glueCodeSimdPath?: string;
|
|
66
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Lazy ES-module loader for the standard JavaScript glue. Resolves to the
|
|
78
|
+
* glue module unchanged; see {@link WasmGlueLoader}.
|
|
79
|
+
*/
|
|
67
80
|
loadGlue?: WasmGlueLoader;
|
|
68
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Lazy ES-module loader for the SIMD JavaScript glue. Resolves to the glue
|
|
83
|
+
* module unchanged; see {@link WasmGlueLoader}.
|
|
84
|
+
*/
|
|
69
85
|
loadGlueSimd?: WasmGlueLoader;
|
|
70
86
|
/**
|
|
71
87
|
* Enables the SIMD-first load attempt.
|
package/dist/wasm.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as WASM_MODEL_FILES, c as WasmPipeline, l as WasmSource, o as WasmGlueLoader, r as warmupWasm, s as WasmModelName, t as WarmupConfig } from "./warmup-
|
|
2
|
-
import { c as setWasmConfig, i as initializeWasmUtil, n as WasmConfig, r as ensureWasmPipelines, s as resolveWasmConfigForPipelines, u as upgradeToWasmHttpClient } from "./setup-
|
|
1
|
+
import { a as WASM_MODEL_FILES, c as WasmPipeline, l as WasmSource, o as WasmGlueLoader, r as warmupWasm, s as WasmModelName, t as WarmupConfig } from "./warmup-BNhIuURi.js";
|
|
2
|
+
import { c as setWasmConfig, i as initializeWasmUtil, n as WasmConfig, r as ensureWasmPipelines, s as resolveWasmConfigForPipelines, u as upgradeToWasmHttpClient } from "./setup-CG6oLkAa.js";
|
|
3
3
|
//#region ../infra/src/wasm/wasmDefaults.d.ts
|
|
4
4
|
/** The WASM version bundled and tested with this SDK release. */
|
|
5
|
-
declare const DEFAULT_WASM_VERSION = "v2.14.54-
|
|
5
|
+
declare const DEFAULT_WASM_VERSION = "v2.14.54-post1";
|
|
6
6
|
type UrlWasmConfig = WarmupConfig & {
|
|
7
7
|
wasmPath: string;
|
|
8
8
|
wasmSimdPath: string;
|
|
@@ -25,7 +25,13 @@ type DefineWasmOptions = {
|
|
|
25
25
|
pipelines: readonly WasmPipeline[];
|
|
26
26
|
wasm: WasmSource;
|
|
27
27
|
wasmSimd?: WasmSource;
|
|
28
|
+
/**
|
|
29
|
+
* Imports the standard glue, e.g.
|
|
30
|
+
* `() => import('@incodetech/wasm-assets/webLib.js')`. Return the module
|
|
31
|
+
* unchanged; see {@link WasmGlueLoader}.
|
|
32
|
+
*/
|
|
28
33
|
glue: WasmGlueLoader;
|
|
34
|
+
/** Imports the SIMD glue. Return the module unchanged, like `glue`. */
|
|
29
35
|
glueSimd?: WasmGlueLoader;
|
|
30
36
|
models: Partial<Record<WasmModelName, WasmSource>>;
|
|
31
37
|
/**
|
package/dist/wasm.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as warmupWasm } from "./warmup-
|
|
3
|
-
import { a as resolveWasmConfigForPipelines, c as upgradeToWasmHttpClient, n as initializeWasmUtil, o as setWasmConfig, t as ensureWasmPipelines } from "./setup-
|
|
1
|
+
import { A as WASM_PIPELINE_MODEL_NAMES, C as buildWasmConfigFromBasePath, D as WASM_MODEL_FILES, E as resolveWasmConfig, O as WASM_PIPELINE_LAZY_MODEL_NAMES, S as buildDefaultWasmConfig, x as DEFAULT_WASM_VERSION } from "./wasmWebClient-C3v3s_4H.esm.js";
|
|
2
|
+
import { s as warmupWasm } from "./warmup-9iKKNNuW.esm.js";
|
|
3
|
+
import { a as resolveWasmConfigForPipelines, c as upgradeToWasmHttpClient, n as initializeWasmUtil, o as setWasmConfig, t as ensureWasmPipelines } from "./setup-BpjzWqR1.esm.js";
|
|
4
4
|
//#region src/defineWasm.ts
|
|
5
5
|
function requiredModels(pipelines) {
|
|
6
6
|
const models = /* @__PURE__ */ new Set();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as utilityWasmApi } from "./WasmUtilProvider-
|
|
1
|
+
import { i as utilityWasmApi } from "./WasmUtilProvider-C_puwvVn.esm.js";
|
|
2
2
|
//#region ../infra/src/wasm/wasmDsFlagSync.ts
|
|
3
3
|
/**
|
|
4
4
|
* Sets the Deepsight (ds) flag that the WASM utility API receives on every
|