@incodetech/core 0.0.0-dev-20260902-40c6c934 → 0.0.0-dev-20260902-6bf995eb
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/{BrowserDiagnosticsCryptoProvider-DDehiRaB.esm.js → BrowserDiagnosticsCryptoProvider-DwmAfiwB.esm.js} +1 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-3eSyevaX.esm.js → apiError-DhziHa4B.esm.js} +1 -1
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-CjdHY09X.esm.js → authenticationManager-CpFvm_na.esm.js} +3 -3
- package/dist/{authenticationStateMachine-C_-KyW3t.esm.js → authenticationStateMachine-DZ_KW_eb.esm.js} +2 -2
- package/dist/consent.d.ts +1 -1
- package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
- package/dist/{deepsightLoader-D_lzPrKE.esm.js → deepsightLoader-BCsoAbCL.esm.js} +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-C_LF5Uv2.esm.js → dynamicFormsManager-DIkSROGe.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-CHBZqg0W.esm.js → dynamicFormsStateMachine-DPMGFx9g.esm.js} +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-x7MaCF3a.esm.js → ekybManager-Dbyzu1GZ.esm.js} +1 -1
- package/dist/{ekybStateMachine-Cp6b6_Rf.esm.js → ekybStateMachine-D6ERRSpc.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-Bx-xotVy.esm.js → electronicSignatureManager-YTvxmh25.esm.js} +1 -1
- package/dist/extensibility.d.ts +2 -2
- package/dist/extensibility.esm.js +10 -10
- package/dist/{faceCaptureManagerFactory-BReY4BtR.esm.js → faceCaptureManagerFactory-BKkwc_5_.esm.js} +1 -1
- package/dist/{faceCaptureSetup-Bv167dJ_.esm.js → faceCaptureSetup-xL2SFeyk.esm.js} +1 -1
- package/dist/{feature-management-BumvjbYe.esm.js → feature-management-DhZKhR-O.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-Bzh4Krlm.esm.js → flowCompletionService-DxeTRrHM.esm.js} +1 -1
- package/dist/{flowServices-Bfmyxinu.esm.js → flowServices-DgVmmebu.esm.js} +4 -4
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-BaHIjwWE.esm.js → geolocationManager-B0LFtKtF.esm.js} +1 -1
- package/dist/{geolocationStateMachine-C6rbMxr_.esm.js → geolocationStateMachine-CCYT-s6u.esm.js} +1 -1
- package/dist/id-selfie-flow.esm.js +7 -7
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-DmE5jure.esm.js → idCaptureDefaults-DgGzVUmU.esm.js} +204 -2
- package/dist/{idCaptureManager-D8KY-mW1.esm.js → idCaptureManager-ECBbFIAT.esm.js} +3 -3
- package/dist/{idCaptureServices-DHpiJd7h.esm.js → idCaptureServices-B5ASsfjX.esm.js} +22 -10
- package/dist/{idCaptureStateMachine-DDb_iure.esm.js → idCaptureStateMachine-F8G8jBSq.esm.js} +7 -7
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +1 -1
- package/dist/{mandatoryConsentManager-BJnylLZO.d.ts → mandatoryConsentManager-CSh8HjSF.d.ts} +4 -4
- package/dist/{onDeviceFaceResults-CXmiMB_O.esm.js → onDeviceFaceResults-BpdmWw3Z.esm.js} +4 -4
- package/dist/personhood.esm.js +4 -4
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{runChildModule-BPkyrLp_.esm.js → runChildModule-D4Xiapvw.esm.js} +1 -1
- package/dist/{sdkVersion-CZd6xrgl.esm.js → sdkVersion-C5w7mfrv.esm.js} +1 -1
- package/dist/selfie.esm.js +5 -5
- package/dist/{selfieManager-H2WLUZKr.esm.js → selfieManager-FWxSq5Dv.esm.js} +3 -3
- package/dist/{selfieStateMachine-CK1ZYYA0.esm.js → selfieStateMachine-CU7NYRVn.esm.js} +2 -2
- package/dist/{session-CkgbWFiv.esm.js → session-Bm4DVQLE.esm.js} +3 -3
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-CZIq0IlV.esm.js → sessionInitializer-CJ_RHW0q.esm.js} +3 -3
- package/dist/{setup-CN-owHPJ.esm.js → setup-D4Zh-sVr.esm.js} +4 -4
- package/dist/{trueSightService-BIO7pDks.esm.js → trueSightService-JMWO92g9.esm.js} +2 -2
- package/dist/video-selfie.esm.js +4 -3
- package/dist/{videoSelfieCameraWarmer-B_tfCmf7.esm.js → videoSelfieCameraWarmer-LNxKbRCG.esm.js} +4 -206
- package/dist/wasm.esm.js +1 -1
- package/dist/workflow.esm.js +14 -14
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-D4Zh-sVr.esm.js";
|
|
2
2
|
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { s as createActor, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
5
5
|
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-CyCdsfox.esm.js";
|
|
6
6
|
import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
|
|
7
7
|
import { o as resetWasmMotionPrimedForModule, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-J5S1dEIf.esm.js";
|
|
8
|
-
import { n as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-
|
|
9
|
-
import { m as resolveIdCaptureThresholds, p as resolveCaptureOptimizingTreatment } from "./idCaptureServices-
|
|
8
|
+
import { n as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-F8G8jBSq.esm.js";
|
|
9
|
+
import { m as resolveIdCaptureThresholds, p as resolveCaptureOptimizingTreatment } from "./idCaptureServices-B5ASsfjX.esm.js";
|
|
10
10
|
//#region src/modules/id/digitalUpload/instrumentation.ts
|
|
11
11
|
const TERMINAL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
|
|
12
12
|
function isHoldingState(value) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as ensureWasmPipelines } from "./setup-
|
|
2
|
-
import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-
|
|
1
|
+
import { t as ensureWasmPipelines } from "./setup-D4Zh-sVr.esm.js";
|
|
2
|
+
import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-DhZKhR-O.esm.js";
|
|
3
3
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
5
5
|
import { i as isDesktop } from "./platform-DkcRc9JV.esm.js";
|
|
@@ -10,7 +10,7 @@ import { n as startRecording, r as stopRecording$1, t as createRecordingSession
|
|
|
10
10
|
import { a as isBackFacingTrack, n as getBackCameraStream } from "./backCameraStream-DE_5qY04.esm.js";
|
|
11
11
|
import { t as getDeviceClass } from "./getDeviceClass-q9LxdYDh.esm.js";
|
|
12
12
|
import { t as MultipartRecordingService } from "./multipartRecordingService-BMuxdyLL.esm.js";
|
|
13
|
-
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-
|
|
13
|
+
import { i as CameraCompositor, n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-DgGzVUmU.esm.js";
|
|
14
14
|
//#region src/internal/camera/cameraServices.ts
|
|
15
15
|
function createCameraServices(camera) {
|
|
16
16
|
return {
|
|
@@ -585,7 +585,7 @@ function buildResolutionFromStream(stream) {
|
|
|
585
585
|
}
|
|
586
586
|
function preloadIdRecordingProvider(config) {}
|
|
587
587
|
const multipartIdSessions = /* @__PURE__ */ new WeakMap();
|
|
588
|
-
function createMultipartSessionHandle(service, resolution, hasAudio) {
|
|
588
|
+
function createMultipartSessionHandle(service, compositor, resolution, hasAudio) {
|
|
589
589
|
const session = {
|
|
590
590
|
token: "",
|
|
591
591
|
sessionId: "",
|
|
@@ -602,7 +602,10 @@ function createMultipartSessionHandle(service, resolution, hasAudio) {
|
|
|
602
602
|
resolution,
|
|
603
603
|
hasAudio
|
|
604
604
|
};
|
|
605
|
-
multipartIdSessions.set(session,
|
|
605
|
+
multipartIdSessions.set(session, {
|
|
606
|
+
compositor,
|
|
607
|
+
service
|
|
608
|
+
});
|
|
606
609
|
return session;
|
|
607
610
|
}
|
|
608
611
|
async function startRecordingSession(params) {
|
|
@@ -612,8 +615,17 @@ async function startRecordingSession(params) {
|
|
|
612
615
|
const resolution = buildResolutionFromStream(params.stream);
|
|
613
616
|
if (!params.config.recording?.capability) {
|
|
614
617
|
const service = new MultipartRecordingService(params.type);
|
|
615
|
-
|
|
616
|
-
|
|
618
|
+
const recordingSource = params.stream.clone();
|
|
619
|
+
const compositor = new CameraCompositor({ fps: 30 });
|
|
620
|
+
try {
|
|
621
|
+
const recordingStream = compositor.start(recordingSource);
|
|
622
|
+
await service.start(recordingStream);
|
|
623
|
+
} catch (error) {
|
|
624
|
+
compositor.stop();
|
|
625
|
+
service.cleanup();
|
|
626
|
+
throw error;
|
|
627
|
+
}
|
|
628
|
+
return createMultipartSessionHandle(service, compositor, resolution, hasAudio);
|
|
617
629
|
}
|
|
618
630
|
const provider = params.config.recording.capability;
|
|
619
631
|
const clonedStream = params.stream.clone();
|
|
@@ -639,10 +651,10 @@ async function startRecordingSession(params) {
|
|
|
639
651
|
};
|
|
640
652
|
}
|
|
641
653
|
function stopRecording(session) {
|
|
642
|
-
const
|
|
643
|
-
if (
|
|
654
|
+
const multipartSession = multipartIdSessions.get(session);
|
|
655
|
+
if (multipartSession) {
|
|
644
656
|
multipartIdSessions.delete(session);
|
|
645
|
-
|
|
657
|
+
multipartSession.service.stop().catch(() => {}).finally(() => multipartSession.compositor.stop());
|
|
646
658
|
return;
|
|
647
659
|
}
|
|
648
660
|
(async () => {
|
package/dist/{idCaptureStateMachine-DDb_iure.esm.js → idCaptureStateMachine-F8G8jBSq.esm.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-D4Zh-sVr.esm.js";
|
|
2
2
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
3
|
-
import { s as exposeExperimentOnce } from "./feature-management-
|
|
3
|
+
import { s as exposeExperimentOnce } from "./feature-management-DhZKhR-O.esm.js";
|
|
4
4
|
import { n as revokeObjectURL } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
|
|
5
5
|
import { r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
|
|
6
|
-
import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-
|
|
6
|
+
import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-JMWO92g9.esm.js";
|
|
7
7
|
import { n as eventModuleNames, s as recordExperimentAssignmentOnce } from "./events-ijlbX_Wx.esm.js";
|
|
8
|
-
import { t as getDisableIpify } from "./sessionInitializer-
|
|
8
|
+
import { t as getDisableIpify } from "./sessionInitializer-CJ_RHW0q.esm.js";
|
|
9
9
|
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
10
10
|
import { t as addDeviceStats } from "./stats-DkK-f8JT.esm.js";
|
|
11
11
|
import { a as isIOS, s as isIPad, t as isAndroid, u as isMacOsSafari } from "./platform-DkcRc9JV.esm.js";
|
|
12
|
-
import "./session-
|
|
12
|
+
import "./session-Bm4DVQLE.esm.js";
|
|
13
13
|
import { c as not, i as assign, l as raise, n as enqueueActions, o as and, r as sendTo, t as setup } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
14
14
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
15
15
|
import { n as getUrlSearchParam, t as buildUrlWithSearchParams } from "./urlUtils-D6phjq1-.esm.js";
|
|
@@ -22,7 +22,7 @@ import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
|
|
|
22
22
|
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
|
|
23
23
|
import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-BHw_SD3h.esm.js";
|
|
24
24
|
import { r as flagIdManualReview, t as imageFileToDataUrl } from "./imageFile-CLaua6xO.esm.js";
|
|
25
|
-
import { _ as getIdCameraStream, a as processId, c as stopStream, d as validateUploadResponse, f as ID_ERROR_CODES, g as OPTIMIZING_WATCHDOG_MARGIN_MS, h as CAPTURE_OPTIMIZING, l as uploadIdImage, m as resolveIdCaptureThresholds, o as startRecordingSession, r as initializeIdCapture, s as stopRecording, t as addBarcode, u as uploadManualIdFile } from "./idCaptureServices-
|
|
25
|
+
import { _ as getIdCameraStream, a as processId, c as stopStream, d as validateUploadResponse, f as ID_ERROR_CODES, g as OPTIMIZING_WATCHDOG_MARGIN_MS, h as CAPTURE_OPTIMIZING, l as uploadIdImage, m as resolveIdCaptureThresholds, o as startRecordingSession, r as initializeIdCapture, s as stopRecording, t as addBarcode, u as uploadManualIdFile } from "./idCaptureServices-B5ASsfjX.esm.js";
|
|
26
26
|
//#region src/modules/id/digitalUpload/digitalUploadErrors.ts
|
|
27
27
|
const TERMINAL_FAIL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
|
|
28
28
|
function isKnownFailReason(reason) {
|
|
@@ -2123,7 +2123,7 @@ const startRecordingActor = fromPromise(async ({ input }) => {
|
|
|
2123
2123
|
});
|
|
2124
2124
|
const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
|
|
2125
2125
|
if (!input.dependencies) return;
|
|
2126
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
2126
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-BCsoAbCL.esm.js");
|
|
2127
2127
|
return loadDeepsightSession({
|
|
2128
2128
|
ds: input.ds,
|
|
2129
2129
|
storage: input.dependencies.storage,
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as reset, r as isConfigured, s as setup } from "./setup-
|
|
1
|
+
import { i as reset, r as isConfigured, s as setup } from "./setup-D4Zh-sVr.esm.js";
|
|
2
2
|
export { isConfigured, reset, setup };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as MandatoryConsentConfig } from "./types-DJ2OM9rw.js";
|
|
2
|
-
import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-
|
|
2
|
+
import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-CSh8HjSF.js";
|
|
3
3
|
export { type MandatoryConsentActor, type MandatoryConsentConfig, type MandatoryConsentManager, type MandatoryConsentState, createMandatoryConsentManager, createMandatoryConsentManagerFromActor, mandatoryConsentMachine };
|
package/dist/{mandatoryConsentManager-BJnylLZO.d.ts → mandatoryConsentManager-CSh8HjSF.d.ts}
RENAMED
|
@@ -61,14 +61,14 @@ declare const mandatoryConsentMachine: StateMachine<MandatoryConsentContext, {
|
|
|
61
61
|
type: "clearError";
|
|
62
62
|
params: NonReducibleUnknown;
|
|
63
63
|
};
|
|
64
|
-
resetContext: {
|
|
65
|
-
type: "resetContext";
|
|
66
|
-
params: NonReducibleUnknown;
|
|
67
|
-
};
|
|
68
64
|
toggleSigned: {
|
|
69
65
|
type: "toggleSigned";
|
|
70
66
|
params: NonReducibleUnknown;
|
|
71
67
|
};
|
|
68
|
+
resetContext: {
|
|
69
|
+
type: "resetContext";
|
|
70
|
+
params: NonReducibleUnknown;
|
|
71
|
+
};
|
|
72
72
|
}>, {
|
|
73
73
|
type: "canSubmit";
|
|
74
74
|
params: unknown;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as ensureWasmPipelines } from "./setup-
|
|
1
|
+
import { t as ensureWasmPipelines } from "./setup-D4Zh-sVr.esm.js";
|
|
2
2
|
import { i as BaseWasmProvider, l as wasmRuntime } from "./safeStorage-0bZuUtSP.esm.js";
|
|
3
3
|
import { r as getToken } from "./api-Bx3gKW_y.esm.js";
|
|
4
|
-
import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-
|
|
5
|
-
import "./sessionInitializer-
|
|
4
|
+
import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-JMWO92g9.esm.js";
|
|
5
|
+
import "./sessionInitializer-CJ_RHW0q.esm.js";
|
|
6
6
|
import { t as addDeviceStats } from "./stats-DkK-f8JT.esm.js";
|
|
7
7
|
import { c as isIPhone14OrHigher, i as isDesktop } from "./platform-DkcRc9JV.esm.js";
|
|
8
8
|
import { a as stopCameraStream, r as requestCameraAccess } from "./camera-_2sXMXiF.esm.js";
|
|
@@ -516,7 +516,7 @@ async function stopRecording(session) {
|
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
518
|
async function initializeDeepsightSession(options) {
|
|
519
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
519
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-BCsoAbCL.esm.js");
|
|
520
520
|
return loadDeepsightSession({
|
|
521
521
|
ds: options.ds,
|
|
522
522
|
storage: options.storage
|
package/dist/personhood.esm.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-D4Zh-sVr.esm.js";
|
|
2
2
|
import { r as WasmUtilProvider } from "./safeStorage-0bZuUtSP.esm.js";
|
|
3
3
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
4
4
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
5
|
-
import { C as createApi$1, v as randomUUID, y as getStoredHttpConfig } from "./trueSightService-
|
|
5
|
+
import { C as createApi$1, v as randomUUID, y as getStoredHttpConfig } from "./trueSightService-JMWO92g9.esm.js";
|
|
6
6
|
import { n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
|
|
7
|
-
import { _ as getDeviceFingerprintInfo, g as getThumbmarkId, n as getFingerprintEnabled, p as isBrowserSimulation, v as BrowserEnvironmentProvider } from "./sessionInitializer-
|
|
7
|
+
import { _ as getDeviceFingerprintInfo, g as getThumbmarkId, n as getFingerprintEnabled, p as isBrowserSimulation, v as BrowserEnvironmentProvider } from "./sessionInitializer-CJ_RHW0q.esm.js";
|
|
8
8
|
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
9
9
|
import { i as assign, s as createActor, t as setup, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
10
10
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
11
11
|
import { a as stopCameraStream, r as requestCameraAccess } from "./camera-_2sXMXiF.esm.js";
|
|
12
12
|
import { i as requestPermission, t as checkPermission } from "./permissionServices-J5S1dEIf.esm.js";
|
|
13
|
-
import { f as stopStream, l as startDetection, p as FaceDetectionProvider, s as initializeDeepsightSession } from "./onDeviceFaceResults-
|
|
13
|
+
import { f as stopStream, l as startDetection, p as FaceDetectionProvider, s as initializeDeepsightSession } from "./onDeviceFaceResults-BpdmWw3Z.esm.js";
|
|
14
14
|
import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
|
|
15
15
|
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
|
|
16
16
|
//#region src/modules/personhood/personhoodServices.ts
|
package/dist/qe-signature.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-
|
|
1
|
+
import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-YTvxmh25.esm.js";
|
|
2
2
|
//#region src/modules/qe-signature/index.ts
|
|
3
3
|
function createQeSignatureManager(options) {
|
|
4
4
|
return createElectronicSignatureManager({ config: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
|
|
2
|
-
import { a as notifyTrueSightManagerStopped, i as notifyTrueSightFlowEvent } from "./trueSightService-
|
|
2
|
+
import { a as notifyTrueSightManagerStopped, i as notifyTrueSightFlowEvent } from "./trueSightService-JMWO92g9.esm.js";
|
|
3
3
|
import { C as createEventBus } from "./events-ijlbX_Wx.esm.js";
|
|
4
4
|
import { s as createActor } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
5
5
|
import { t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
package/dist/selfie.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-D4Zh-sVr.esm.js";
|
|
2
2
|
import { r as WasmUtilProvider } from "./safeStorage-0bZuUtSP.esm.js";
|
|
3
3
|
import { n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
|
|
4
4
|
import { i as assign, s as createActor } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
5
5
|
import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
6
|
-
import { t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
7
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
6
|
+
import { t as faceCaptureMachine } from "./faceCaptureSetup-xL2SFeyk.esm.js";
|
|
7
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-BKkwc_5_.esm.js";
|
|
8
8
|
import { r as processFace } from "./selfieErrorUtils-C3lAFggs.esm.js";
|
|
9
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
10
|
-
import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-
|
|
9
|
+
import { t as selfieMachine } from "./selfieStateMachine-CU7NYRVn.esm.js";
|
|
10
|
+
import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-FWxSq5Dv.esm.js";
|
|
11
11
|
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-BjzPjJ_p.esm.js";
|
|
12
12
|
//#region src/modules/selfie/selfieCaptureOnlyStateMachine.ts
|
|
13
13
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-D4Zh-sVr.esm.js";
|
|
2
2
|
import { r as WasmUtilProvider } from "./safeStorage-0bZuUtSP.esm.js";
|
|
3
3
|
import { n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
|
|
4
4
|
import { s as createActor } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
5
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
6
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
5
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-BKkwc_5_.esm.js";
|
|
6
|
+
import { t as selfieMachine } from "./selfieStateMachine-CU7NYRVn.esm.js";
|
|
7
7
|
//#region src/modules/selfie/selfieActor.ts
|
|
8
8
|
function createSelfieActor(options) {
|
|
9
9
|
const dependencies = options.dependencies ?? {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as assign } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
2
2
|
import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
3
|
-
import { n as manualFaceUploadMachine, t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
4
|
-
import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-
|
|
3
|
+
import { n as manualFaceUploadMachine, t as faceCaptureMachine } from "./faceCaptureSetup-xL2SFeyk.esm.js";
|
|
4
|
+
import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-BpdmWw3Z.esm.js";
|
|
5
5
|
import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
|
|
6
6
|
import { a as uploadSelfie, i as uploadManualSelfie, n as validateUploadResponse, r as processFace } from "./selfieErrorUtils-C3lAFggs.esm.js";
|
|
7
7
|
//#region src/modules/selfie/selfieStateMachine.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as getApi } from "./api-Bx3gKW_y.esm.js";
|
|
2
|
-
import { h as noteSessionCreated, l as trueSightLog } from "./trueSightService-
|
|
3
|
-
import "./sessionInitializer-
|
|
2
|
+
import { h as noteSessionCreated, l as trueSightLog } from "./trueSightService-JMWO92g9.esm.js";
|
|
3
|
+
import "./sessionInitializer-CJ_RHW0q.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
5
|
-
import { i as toIncodeApiError } from "./apiError-
|
|
5
|
+
import { i as toIncodeApiError } from "./apiError-DhziHa4B.esm.js";
|
|
6
6
|
//#region src/internal/session/sessionService.ts
|
|
7
7
|
/**
|
|
8
8
|
* HTTP status codes the QR validation endpoint emits, keyed by their semantic
|
package/dist/session.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as initializeSession } from "./sessionInitializer-
|
|
2
|
-
import { t as IncodeApiError } from "./apiError-
|
|
3
|
-
import { a as refreshQrUrlUuid, i as createSession, n as QrValidationError, o as validateQrUuid, r as bootstrapSession, t as QR_VALIDATION_ERROR_CODES } from "./session-
|
|
4
|
-
import { n as getFinishStatus } from "./flowCompletionService-
|
|
1
|
+
import { i as initializeSession } from "./sessionInitializer-CJ_RHW0q.esm.js";
|
|
2
|
+
import { t as IncodeApiError } from "./apiError-DhziHa4B.esm.js";
|
|
3
|
+
import { a as refreshQrUrlUuid, i as createSession, n as QrValidationError, o as validateQrUuid, r as bootstrapSession, t as QR_VALIDATION_ERROR_CODES } from "./session-Bm4DVQLE.esm.js";
|
|
4
|
+
import { n as getFinishStatus } from "./flowCompletionService-DxeTRrHM.esm.js";
|
|
5
5
|
export { IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as updateFeatureManagementUser } from "./feature-management-
|
|
1
|
+
import { E as updateFeatureManagementUser } from "./feature-management-DhZKhR-O.esm.js";
|
|
2
2
|
import { c as setToken, r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
|
|
3
|
-
import { _ as noteTokenActivated, d as fetchFeatureConfig, f as isFeatureEnabled, l as trueSightLog, m as noteEnvironment, p as resetFeatureConfigCache, s as startTrueSightCollection } from "./trueSightService-
|
|
3
|
+
import { _ as noteTokenActivated, d as fetchFeatureConfig, f as isFeatureEnabled, l as trueSightLog, m as noteEnvironment, p as resetFeatureConfigCache, s as startTrueSightCollection } from "./trueSightService-JMWO92g9.esm.js";
|
|
4
4
|
import { v as addEvent, y as getAnalyticsBatcher } from "./events-ijlbX_Wx.esm.js";
|
|
5
|
-
import { t as SDK_VERSION } from "./sdkVersion-
|
|
5
|
+
import { t as SDK_VERSION } from "./sdkVersion-C5w7mfrv.esm.js";
|
|
6
6
|
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
7
7
|
import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue } from "./stats-DkK-f8JT.esm.js";
|
|
8
8
|
import { n as UAParser, t as getParsedUserAgent } from "./getParsedUserAgent-pJjATANs.esm.js";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { d as deriveSiblingJsPath, f as WASM_MODEL_FILES } from "./wasmWebClient-BJCaFeBL.esm.js";
|
|
2
2
|
import { c as warmupWasm, r as WasmUtilProvider, s as setWasmOnDeviceMode, t as resolveLocalStorage } from "./safeStorage-0bZuUtSP.esm.js";
|
|
3
3
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
4
|
-
import { C as resetFeatureManagement, D as applyEnvironment, O as getEnvironment, S as optOutFeatureManagement, b as initializeFeatureManagement, c as resetResolvedExperiments, k as resetEnvironment, v as getIsFeatureManagementLocked, w as resetFeatureManagementProviderInstance } from "./feature-management-
|
|
4
|
+
import { C as resetFeatureManagement, D as applyEnvironment, O as getEnvironment, S as optOutFeatureManagement, b as initializeFeatureManagement, c as resetResolvedExperiments, k as resetEnvironment, v as getIsFeatureManagementLocked, w as resetFeatureManagementProviderInstance } from "./feature-management-DhZKhR-O.esm.js";
|
|
5
5
|
import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
|
|
6
6
|
import { a as resetApi, i as isApiConfigured, n as getApi, r as getToken, s as setHttpRequestObserver, t as api } from "./api-Bx3gKW_y.esm.js";
|
|
7
|
-
import { S as upgradeToWasmHttpClient$1, b as installFreshHttpClient, g as noteTestingSignals, l as trueSightLog, n as initializeTrueSightDiagnostics, o as resetTrueSight, t as finalizeTrueSight, u as categoryForEndpoint, x as resetHttpClientState, y as getStoredHttpConfig } from "./trueSightService-
|
|
7
|
+
import { S as upgradeToWasmHttpClient$1, b as installFreshHttpClient, g as noteTestingSignals, l as trueSightLog, n as initializeTrueSightDiagnostics, o as resetTrueSight, t as finalizeTrueSight, u as categoryForEndpoint, x as resetHttpClientState, y as getStoredHttpConfig } from "./trueSightService-JMWO92g9.esm.js";
|
|
8
8
|
import { b as resetAnalyticsBatcher, c as resetExperimentAssignments, x as setAnalyticsBatcher, y as getAnalyticsBatcher } from "./events-ijlbX_Wx.esm.js";
|
|
9
|
-
import { a as resetSessionInit, d as resolveStandaloneFlowPolicy, f as setStandaloneFlowPolicy, i as initializeSession, l as registerFlowPreloader, o as setClientFingerprintEnabled, s as setClientIpLookupEnabled, u as resetStandaloneFlowPolicy, v as BrowserEnvironmentProvider } from "./sessionInitializer-
|
|
9
|
+
import { a as resetSessionInit, d as resolveStandaloneFlowPolicy, f as setStandaloneFlowPolicy, i as initializeSession, l as registerFlowPreloader, o as setClientFingerprintEnabled, s as setClientIpLookupEnabled, u as resetStandaloneFlowPolicy, v as BrowserEnvironmentProvider } from "./sessionInitializer-CJ_RHW0q.esm.js";
|
|
10
10
|
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
11
11
|
import { r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-DkK-f8JT.esm.js";
|
|
12
12
|
import { a as resetTRI, n as initializeTRI, o as resetTRIProviderInstance } from "./tri-4RsGrIt6.esm.js";
|
|
13
|
-
import { n as preloadDashboardFlow, r as resetDashboardFlowCache } from "./flowServices-
|
|
13
|
+
import { n as preloadDashboardFlow, r as resetDashboardFlowCache } from "./flowServices-DgVmmebu.esm.js";
|
|
14
14
|
//#region ../infra/src/wasm/wasmDefaults.ts
|
|
15
15
|
const WASM_CDN_BASE_URL = "https://cdn.incodesmile.com/ml-wasm-kit-release";
|
|
16
16
|
/** The WASM version bundled and tested with this SDK release. */
|
|
@@ -2,7 +2,7 @@ import { a as setWebApiHttpTransport, i as initializeWasmWebClient, o as setupWa
|
|
|
2
2
|
import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
|
|
3
3
|
import { i as isApiConfigured, n as getApi, o as setClient, r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
|
|
4
4
|
import { S as subscribeEvent, n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
|
|
5
|
-
import { t as SDK_VERSION } from "./sdkVersion-
|
|
5
|
+
import { t as SDK_VERSION } from "./sdkVersion-C5w7mfrv.esm.js";
|
|
6
6
|
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
7
7
|
//#region ../infra/src/http/createApi.ts
|
|
8
8
|
var FetchHttpError = class extends Error {
|
|
@@ -1320,7 +1320,7 @@ let cryptoProviderPromise = null;
|
|
|
1320
1320
|
* the service's prewarm).
|
|
1321
1321
|
*/
|
|
1322
1322
|
function loadDiagnosticsCryptoProvider() {
|
|
1323
|
-
cryptoProviderPromise ??= import("./BrowserDiagnosticsCryptoProvider-
|
|
1323
|
+
cryptoProviderPromise ??= import("./BrowserDiagnosticsCryptoProvider-DwmAfiwB.esm.js").then((module) => new module.BrowserDiagnosticsCryptoProvider());
|
|
1324
1324
|
return cryptoProviderPromise;
|
|
1325
1325
|
}
|
|
1326
1326
|
/**
|
package/dist/video-selfie.esm.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { t as ensureWasmPipelines } from "./setup-
|
|
1
|
+
import { t as ensureWasmPipelines } from "./setup-D4Zh-sVr.esm.js";
|
|
2
2
|
import { r as WasmUtilProvider } from "./safeStorage-0bZuUtSP.esm.js";
|
|
3
3
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
4
4
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
5
5
|
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
6
|
-
import { d as videoSelfieWasmPipelines, l as facingModeForStep, u as resolveVideoSelfieSteps } from "./flowServices-
|
|
6
|
+
import { d as videoSelfieWasmPipelines, l as facingModeForStep, u as resolveVideoSelfieSteps } from "./flowServices-DgVmmebu.esm.js";
|
|
7
7
|
import { i as assign, r as sendTo, s as createActor, t as setup, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
8
8
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
9
9
|
import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
|
|
10
10
|
import { t as MultipartRecordingService } from "./multipartRecordingService-BMuxdyLL.esm.js";
|
|
11
|
+
import { i as CameraCompositor } from "./idCaptureDefaults-DgGzVUmU.esm.js";
|
|
11
12
|
import { t as VIDEO_SELFIE_VALIDATION_ATTEMPTS_EXHAUSTED_CODE } from "./advanceableErrors-CpF2cBy6.esm.js";
|
|
12
|
-
import {
|
|
13
|
+
import { a as isConnectionError, n as defaultAcquireCamera, r as createDefaultStepDetector, t as createVideoSelfieCameraWarmer } from "./videoSelfieCameraWarmer-LNxKbRCG.esm.js";
|
|
13
14
|
import { t as videoSelfieFlowModuleMachine } from "./videoSelfieFlowModuleMachine-BUe2uACW.esm.js";
|
|
14
15
|
//#region src/modules/video-selfie/videoSelfieWasm.ts
|
|
15
16
|
function warmupVideoSelfieWasm(config, steps = resolveVideoSelfieSteps(config)) {
|
package/dist/{videoSelfieCameraWarmer-B_tfCmf7.esm.js → videoSelfieCameraWarmer-LNxKbRCG.esm.js}
RENAMED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
2
2
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
3
3
|
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
4
|
-
import { l as facingModeForStep, u as resolveVideoSelfieSteps } from "./flowServices-
|
|
4
|
+
import { l as facingModeForStep, u as resolveVideoSelfieSteps } from "./flowServices-DgVmmebu.esm.js";
|
|
5
5
|
import { i as requestCameraWithFallback, r as requestCameraAccess } from "./camera-_2sXMXiF.esm.js";
|
|
6
6
|
import { t as checkPermission } from "./permissionServices-J5S1dEIf.esm.js";
|
|
7
|
-
import { a as encryptSelfieImage, l as startDetection, p as FaceDetectionProvider } from "./onDeviceFaceResults-
|
|
7
|
+
import { a as encryptSelfieImage, l as startDetection, p as FaceDetectionProvider } from "./onDeviceFaceResults-BpdmWw3Z.esm.js";
|
|
8
8
|
import { a as StreamCanvasProcessingSession } from "./recordingsRepository-CCWy13M-.esm.js";
|
|
9
9
|
import { n as getBackCameraStream } from "./backCameraStream-DE_5qY04.esm.js";
|
|
10
10
|
import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
|
|
11
11
|
import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
|
|
12
12
|
import { a as uploadSelfie, r as processFace, t as getFaceErrorCodeFromUnknown } from "./selfieErrorUtils-C3lAFggs.esm.js";
|
|
13
13
|
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
|
|
14
|
-
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-
|
|
14
|
+
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-DgGzVUmU.esm.js";
|
|
15
15
|
//#region src/modules/video-selfie/videoSelfieCompareService.ts
|
|
16
16
|
async function postVideoSelfieCompare(endpoint, base64Image) {
|
|
17
17
|
return (await api.post(endpoint, { base64Image })).data;
|
|
@@ -435,208 +435,6 @@ async function validateIdFrame(step, config, base64Image) {
|
|
|
435
435
|
return { outcome: "success" };
|
|
436
436
|
}
|
|
437
437
|
//#endregion
|
|
438
|
-
//#region ../infra/src/media/CameraCompositor.ts
|
|
439
|
-
const MAX_COMPOSITE_LONG_EDGE = 1280;
|
|
440
|
-
const MAX_COMPOSITE_SHORT_EDGE = 720;
|
|
441
|
-
const FRAME_INTERVAL_TOLERANCE_RATIO = .9;
|
|
442
|
-
const DEFAULT_RESUME_TIMEOUT_MS = 2e3;
|
|
443
|
-
/**
|
|
444
|
-
* Composites the *active* camera into a canvas and exposes the canvas as a
|
|
445
|
-
* single, stable `MediaStream` to record. Switching cameras (front ↔ back)
|
|
446
|
-
* just repoints what the canvas draws — the output stream and its audio track
|
|
447
|
-
* are never replaced — so a single `MediaRecorder` produces one continuous
|
|
448
|
-
* video that follows the camera switches (V1 parity), instead of restarting
|
|
449
|
-
* per camera.
|
|
450
|
-
*
|
|
451
|
-
* The audio track from the initial stream is carried through unchanged across
|
|
452
|
-
* video switches, so there's no audio glitch when the camera flips.
|
|
453
|
-
*/
|
|
454
|
-
var CameraCompositor = class {
|
|
455
|
-
constructor(options = {}) {
|
|
456
|
-
this.canvas = null;
|
|
457
|
-
this.ctx = null;
|
|
458
|
-
this.video = null;
|
|
459
|
-
this.frameRequestId = null;
|
|
460
|
-
this.frameRequestKind = null;
|
|
461
|
-
this.lastDrawTimeMs = null;
|
|
462
|
-
this.lastVideoTimeSeconds = null;
|
|
463
|
-
this.audioTrack = null;
|
|
464
|
-
this.videoTrack = null;
|
|
465
|
-
this.composite = null;
|
|
466
|
-
this.fps = options.fps ?? 30;
|
|
467
|
-
this.frameIntervalMs = this.fps > 0 ? 1e3 / this.fps : 0;
|
|
468
|
-
this.resumeTimeoutMs = options.resumeTimeoutMs ?? DEFAULT_RESUME_TIMEOUT_MS;
|
|
469
|
-
}
|
|
470
|
-
/**
|
|
471
|
-
* Begin compositing `stream` and return the composite stream to record. The
|
|
472
|
-
* stream's audio track (if any) is carried through unchanged across later
|
|
473
|
-
* `switchVideo` calls.
|
|
474
|
-
*/
|
|
475
|
-
start(stream) {
|
|
476
|
-
this.canvas = document.createElement("canvas");
|
|
477
|
-
this.ctx = this.canvas.getContext("2d");
|
|
478
|
-
this.video = document.createElement("video");
|
|
479
|
-
this.video.muted = true;
|
|
480
|
-
this.video.playsInline = true;
|
|
481
|
-
this.audioTrack = stream.getAudioTracks()[0] ?? null;
|
|
482
|
-
this.setVideoSource(stream);
|
|
483
|
-
const composite = this.canvas.captureStream(this.fps);
|
|
484
|
-
if (this.audioTrack) composite.addTrack(this.audioTrack);
|
|
485
|
-
this.composite = composite;
|
|
486
|
-
this.startDrawLoop();
|
|
487
|
-
return composite;
|
|
488
|
-
}
|
|
489
|
-
/**
|
|
490
|
-
* Swap the camera feeding the canvas without interrupting the composite
|
|
491
|
-
* stream. Pass a video-only stream (audio is kept from `start`). The previous
|
|
492
|
-
* video track is stopped.
|
|
493
|
-
*/
|
|
494
|
-
switchVideo(stream) {
|
|
495
|
-
if (!this.composite) return;
|
|
496
|
-
const previousVideoTrack = this.videoTrack;
|
|
497
|
-
this.setVideoSource(stream);
|
|
498
|
-
this.startDrawLoop();
|
|
499
|
-
if (previousVideoTrack) previousVideoTrack.stop();
|
|
500
|
-
}
|
|
501
|
-
/** The composite stream being recorded, if compositing is active. */
|
|
502
|
-
get stream() {
|
|
503
|
-
return this.composite ?? void 0;
|
|
504
|
-
}
|
|
505
|
-
/** Pause source playback and drawing while the page is backgrounded. */
|
|
506
|
-
pause() {
|
|
507
|
-
this.finishResume("timed-out");
|
|
508
|
-
this.cancelDrawLoop();
|
|
509
|
-
this.video?.pause();
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
* Restart source playback and wait for a genuinely new camera frame to be
|
|
513
|
-
* drawn into the stable canvas stream. The caller must not resume encoding
|
|
514
|
-
* until this resolves with `resumed`.
|
|
515
|
-
*/
|
|
516
|
-
async resume(signal) {
|
|
517
|
-
const video = this.video;
|
|
518
|
-
if (!video || !this.composite) return "timed-out";
|
|
519
|
-
if (this.audioTrack?.readyState === "ended") return "audio-ended";
|
|
520
|
-
if (!this.videoTrack || this.videoTrack.readyState === "ended") return "video-ended";
|
|
521
|
-
if (signal?.aborted) return "timed-out";
|
|
522
|
-
try {
|
|
523
|
-
await video.play();
|
|
524
|
-
} catch {
|
|
525
|
-
return "timed-out";
|
|
526
|
-
}
|
|
527
|
-
if (signal?.aborted) return "timed-out";
|
|
528
|
-
this.finishResume("timed-out");
|
|
529
|
-
return new Promise((resolve) => {
|
|
530
|
-
const timeout = setTimeout(() => {
|
|
531
|
-
this.finishResume("timed-out");
|
|
532
|
-
}, this.resumeTimeoutMs);
|
|
533
|
-
if (signal) {
|
|
534
|
-
const onAbort = () => this.finishResume("timed-out");
|
|
535
|
-
this.resumeWaiter = {
|
|
536
|
-
resolve,
|
|
537
|
-
timeout,
|
|
538
|
-
signal,
|
|
539
|
-
onAbort
|
|
540
|
-
};
|
|
541
|
-
signal.addEventListener("abort", onAbort, { once: true });
|
|
542
|
-
if (signal.aborted) {
|
|
543
|
-
this.finishResume("timed-out");
|
|
544
|
-
return;
|
|
545
|
-
}
|
|
546
|
-
} else this.resumeWaiter = {
|
|
547
|
-
resolve,
|
|
548
|
-
timeout
|
|
549
|
-
};
|
|
550
|
-
this.startDrawLoop(false);
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
/** Stop compositing and release the canvas, audio, and video tracks. */
|
|
554
|
-
stop() {
|
|
555
|
-
this.finishResume("timed-out");
|
|
556
|
-
this.cancelDrawLoop();
|
|
557
|
-
this.videoTrack?.stop();
|
|
558
|
-
this.audioTrack?.stop();
|
|
559
|
-
this.composite?.getTracks().forEach((track) => track.stop());
|
|
560
|
-
if (this.video) this.video.srcObject = null;
|
|
561
|
-
this.canvas = null;
|
|
562
|
-
this.ctx = null;
|
|
563
|
-
this.video = null;
|
|
564
|
-
this.videoTrack = null;
|
|
565
|
-
this.audioTrack = null;
|
|
566
|
-
this.composite = null;
|
|
567
|
-
}
|
|
568
|
-
setVideoSource(stream) {
|
|
569
|
-
this.videoTrack = stream.getVideoTracks()[0] ?? null;
|
|
570
|
-
const video = this.video;
|
|
571
|
-
if (!video) return;
|
|
572
|
-
video.srcObject = new MediaStream(stream.getVideoTracks());
|
|
573
|
-
video.play().catch(() => {});
|
|
574
|
-
}
|
|
575
|
-
startDrawLoop(resetSourceTime = true) {
|
|
576
|
-
this.cancelDrawLoop();
|
|
577
|
-
this.lastDrawTimeMs = null;
|
|
578
|
-
if (resetSourceTime) this.lastVideoTimeSeconds = null;
|
|
579
|
-
const draw = (timeMs) => {
|
|
580
|
-
const elapsed = this.lastDrawTimeMs === null ? Infinity : timeMs - this.lastDrawTimeMs;
|
|
581
|
-
if ((this.frameIntervalMs === 0 || elapsed >= this.frameIntervalMs * FRAME_INTERVAL_TOLERANCE_RATIO) && this.drawCurrentFrame()) {
|
|
582
|
-
this.lastDrawTimeMs = timeMs;
|
|
583
|
-
this.finishResume("resumed");
|
|
584
|
-
}
|
|
585
|
-
this.scheduleNextFrame(draw);
|
|
586
|
-
};
|
|
587
|
-
this.scheduleNextFrame(draw);
|
|
588
|
-
}
|
|
589
|
-
finishResume(result) {
|
|
590
|
-
const waiter = this.resumeWaiter;
|
|
591
|
-
if (!waiter) return;
|
|
592
|
-
this.resumeWaiter = void 0;
|
|
593
|
-
clearTimeout(waiter.timeout);
|
|
594
|
-
if ("signal" in waiter) waiter.signal.removeEventListener("abort", waiter.onAbort);
|
|
595
|
-
waiter.resolve(result);
|
|
596
|
-
}
|
|
597
|
-
scheduleNextFrame(callback) {
|
|
598
|
-
const video = this.video;
|
|
599
|
-
if (video && typeof video.requestVideoFrameCallback === "function") {
|
|
600
|
-
this.frameRequestKind = "video";
|
|
601
|
-
this.frameRequestId = video.requestVideoFrameCallback(callback);
|
|
602
|
-
return;
|
|
603
|
-
}
|
|
604
|
-
this.frameRequestKind = "animation";
|
|
605
|
-
this.frameRequestId = requestAnimationFrame(callback);
|
|
606
|
-
}
|
|
607
|
-
cancelDrawLoop() {
|
|
608
|
-
if (this.frameRequestId === null) return;
|
|
609
|
-
if (this.frameRequestKind === "video" && this.video && typeof this.video.cancelVideoFrameCallback === "function") this.video.cancelVideoFrameCallback(this.frameRequestId);
|
|
610
|
-
else cancelAnimationFrame(this.frameRequestId);
|
|
611
|
-
this.frameRequestId = null;
|
|
612
|
-
this.frameRequestKind = null;
|
|
613
|
-
}
|
|
614
|
-
drawCurrentFrame() {
|
|
615
|
-
const video = this.video;
|
|
616
|
-
const canvas = this.canvas;
|
|
617
|
-
const ctx = this.ctx;
|
|
618
|
-
if (!video || !canvas || !ctx || video.videoWidth <= 0) return false;
|
|
619
|
-
if (this.lastVideoTimeSeconds === video.currentTime) return false;
|
|
620
|
-
const dimensions = this.getBoundedDimensions(video.videoWidth, video.videoHeight);
|
|
621
|
-
if (canvas.width !== dimensions.width || canvas.height !== dimensions.height) {
|
|
622
|
-
canvas.width = dimensions.width;
|
|
623
|
-
canvas.height = dimensions.height;
|
|
624
|
-
}
|
|
625
|
-
ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
|
|
626
|
-
this.lastVideoTimeSeconds = video.currentTime;
|
|
627
|
-
return true;
|
|
628
|
-
}
|
|
629
|
-
getBoundedDimensions(width, height) {
|
|
630
|
-
const longEdge = Math.max(width, height);
|
|
631
|
-
const shortEdge = Math.min(width, height);
|
|
632
|
-
const scale = Math.min(1, MAX_COMPOSITE_LONG_EDGE / longEdge, MAX_COMPOSITE_SHORT_EDGE / shortEdge);
|
|
633
|
-
return {
|
|
634
|
-
width: Math.max(1, Math.round(width * scale)),
|
|
635
|
-
height: Math.max(1, Math.round(height * scale))
|
|
636
|
-
};
|
|
637
|
-
}
|
|
638
|
-
};
|
|
639
|
-
//#endregion
|
|
640
438
|
//#region src/modules/video-selfie/videoSelfieCameraWarmer.ts
|
|
641
439
|
/**
|
|
642
440
|
* Acquire the camera for a Video Selfie step. The rear (`environment`) steps
|
|
@@ -711,4 +509,4 @@ function createVideoSelfieCameraWarmer(config, steps = resolveVideoSelfieSteps(c
|
|
|
711
509
|
};
|
|
712
510
|
}
|
|
713
511
|
//#endregion
|
|
714
|
-
export {
|
|
512
|
+
export { isConnectionError as a, delay as i, defaultAcquireCamera as n, isSelfieValidationError as o, createDefaultStepDetector as r, isWrongVideoSelfieIdSide as s, createVideoSelfieCameraWarmer as t };
|
package/dist/wasm.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { f as WASM_MODEL_FILES, h as WASM_PIPELINE_MODEL_NAMES, p as WASM_PIPELINE_LAZY_MODEL_NAMES } from "./wasmWebClient-BJCaFeBL.esm.js";
|
|
2
|
-
import { a as resolveWasmConfigForPipelines, c as upgradeToWasmHttpClient, d as buildDefaultWasmConfig, f as buildWasmConfigFromBasePath, m as resolveWasmConfig, n as initializeWasmUtil, o as setWasmConfig, t as ensureWasmPipelines, u as DEFAULT_WASM_VERSION } from "./setup-
|
|
2
|
+
import { a as resolveWasmConfigForPipelines, c as upgradeToWasmHttpClient, d as buildDefaultWasmConfig, f as buildWasmConfigFromBasePath, m as resolveWasmConfig, n as initializeWasmUtil, o as setWasmConfig, t as ensureWasmPipelines, u as DEFAULT_WASM_VERSION } from "./setup-D4Zh-sVr.esm.js";
|
|
3
3
|
import { c as warmupWasm } from "./safeStorage-0bZuUtSP.esm.js";
|
|
4
4
|
//#region src/defineWasm.ts
|
|
5
5
|
function requiredModels(pipelines) {
|