@incodetech/core 2.3.0-rc.1 → 2.3.0-rc.3
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-CU6kBvqv.esm.js → BrowserDiagnosticsCryptoProvider-C2E4mGEX.esm.js} +1 -1
- package/dist/{FaceDetectionProvider-BfhWkK90.esm.js → FaceDetectionProvider-DAVK6BAe.esm.js} +4 -4
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-Budb6m6w.esm.js → apiError-BArJSmSN.esm.js} +1 -1
- package/dist/authentication.d.ts +2 -2
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-cMXhG70r.esm.js → authenticationManager-DNciG_Ri.esm.js} +3 -3
- package/dist/{authenticationManager-CjXBjC-c.d.ts → authenticationManager-DcTHmYmL.d.ts} +1 -1
- package/dist/{authenticationStateMachine-MOYz4HCf.esm.js → authenticationStateMachine-BFOcuSH6.esm.js} +2 -2
- package/dist/consent.d.ts +1 -1
- package/dist/{consentManager-BhYFeKiG.d.ts → consentManager-uhDPdU6i.d.ts} +8 -8
- package/dist/{deepsightLoader-DDv3vhXU.esm.js → deepsightLoader-DPJZSnHo.esm.js} +3 -3
- package/dist/document-capture.d.ts +1 -1
- package/dist/{documentCaptureManager-DensIj5F.d.ts → documentCaptureManager-DD0qtFdE.d.ts} +1 -1
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-BbS-XMFc.esm.js → dynamicFormsManager-BDi3ffWG.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-D8zHBCh4.esm.js → dynamicFormsStateMachine-B7-mpYDT.esm.js} +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-5aiac8wL.esm.js → ekybManager-BfpqWpNP.esm.js} +1 -1
- package/dist/{ekybStateMachine-Bn2IE9rx.esm.js → ekybStateMachine-BGnzaF__.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-BJJH0Tvi.esm.js → electronicSignatureManager-Bc8MLmTL.esm.js} +1 -1
- package/dist/extensibility.d.ts +8 -8
- package/dist/extensibility.esm.js +10 -10
- package/dist/{faceCaptureManagerFactory-BeUl8fl1.d.ts → faceCaptureManagerFactory-Cx-8SqRy.d.ts} +45 -37
- package/dist/{faceCaptureManagerFactory-B7Ms6pSs.esm.js → faceCaptureManagerFactory-qPW__uXd.esm.js} +1 -1
- package/dist/{faceCaptureSetup-bkAlr5d8.esm.js → faceCaptureSetup-DpM1YYl9.esm.js} +264 -42
- package/dist/{feature-management-E0mq0pMs.esm.js → feature-management-Bzr9uaS4.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/flow.esm.js +3 -3
- package/dist/{flowCompletionService-DJp1odGN.esm.js → flowCompletionService-D0qKFy5Y.esm.js} +1 -1
- package/dist/{flowServices-DjPFGs_D.esm.js → flowServices-CnyFU9Bz.esm.js} +4 -4
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-D5906YXx.esm.js → geolocationManager-BqM__4xb.esm.js} +1 -1
- package/dist/{geolocationStateMachine-BVOduc3y.esm.js → geolocationStateMachine-DpxY4O3h.esm.js} +1 -1
- package/dist/id-selfie-flow.esm.js +8 -7
- package/dist/id.d.ts +2 -2
- package/dist/id.esm.js +4 -4
- package/dist/idCaptureDefaults-Cd-qOMUt.esm.js +282 -0
- package/dist/{idCaptureManager-rfV9dIXy.esm.js → idCaptureManager-CO4WBQQN.esm.js} +3 -3
- package/dist/{idCaptureManager-DKESug0R.d.ts → idCaptureManager-De7O0TOD.d.ts} +23 -4
- package/dist/{idCaptureServices-i1KxugN7.esm.js → idCaptureServices-CFuKdAW7.esm.js} +58 -11
- package/dist/{idCaptureStateMachine-Ne_PXth_.esm.js → idCaptureStateMachine-CzyZ_21z.esm.js} +210 -66
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/{identityReuseManager-v2TH5g7e.d.ts → identityReuseManager-BFDI7iFK.d.ts} +4 -4
- package/dist/index.esm.js +1 -1
- package/dist/mandatory-consent.d.ts +1 -1
- package/dist/{mandatoryConsentManager-vhv1co_n.d.ts → mandatoryConsentManager-Csfl7_XQ.d.ts} +4 -4
- package/dist/{multipartRecordingService-OEgIRvqC.esm.js → multipartRecordingService-CuXLH4tK.esm.js} +446 -1
- package/dist/personhood.esm.js +4 -4
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{runChildModule-CI1gGWN1.esm.js → runChildModule-CTeh8a1T.esm.js} +1 -1
- package/dist/{sdkVersion-BZh6dj53.esm.js → sdkVersion-DYlnESxD.esm.js} +1 -1
- package/dist/selfie.d.ts +2 -2
- package/dist/selfie.esm.js +5 -5
- package/dist/{selfieManager-B-2c1n_x.esm.js → selfieManager-CFGf-DmP.esm.js} +3 -3
- package/dist/{selfieManager-4RRLi21P.d.ts → selfieManager-jXqwqosi.d.ts} +1 -1
- package/dist/{selfieStateMachine-Bzx41R8d.esm.js → selfieStateMachine-BJVwANex.esm.js} +2 -2
- package/dist/{session-3LmvAU4S.esm.js → session-Cs6z9Stj.esm.js} +3 -3
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-BFk33E67.esm.js → sessionInitializer-DKCQfxZ2.esm.js} +3 -3
- package/dist/{setup-BWG-hivt.esm.js → setup-B-qr0dC6.esm.js} +4 -4
- package/dist/{trueSightService-BN-Hzw82.esm.js → trueSightService-De306VXK.esm.js} +3 -3
- package/dist/video-selfie.esm.js +4 -5
- package/dist/{videoSelfieCameraWarmer-B8PcYqmz.esm.js → videoSelfieCameraWarmer-BRz5aQPN.esm.js} +3 -3
- package/dist/wasm.esm.js +1 -1
- package/dist/workflow.esm.js +14 -14
- package/package.json +3 -3
- package/dist/idCaptureDefaults-CbPA-Auz.esm.js +0 -727
package/dist/{multipartRecordingService-OEgIRvqC.esm.js → multipartRecordingService-CuXLH4tK.esm.js}
RENAMED
|
@@ -47,6 +47,451 @@ function getAdaptiveMediaRecorderOptions() {
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
//#endregion
|
|
50
|
+
//#region ../infra/src/media/cameraCompositorWorker.ts
|
|
51
|
+
/**
|
|
52
|
+
* Whether the worker transport is available here. Every probe must hold;
|
|
53
|
+
* anything missing routes `CameraCompositor` to its main-thread path.
|
|
54
|
+
*/
|
|
55
|
+
function canUseCameraCompositorWorker() {
|
|
56
|
+
const g = globalThis;
|
|
57
|
+
return typeof g.MediaStreamTrackProcessor === "function" && typeof g.MediaStreamTrackGenerator === "function" && typeof g.Worker === "function" && typeof g.OffscreenCanvas === "function" && typeof g.VideoFrame === "function";
|
|
58
|
+
}
|
|
59
|
+
function createTrackProcessor(track) {
|
|
60
|
+
const Ctor = globalThis.MediaStreamTrackProcessor;
|
|
61
|
+
if (!Ctor) throw new Error("MediaStreamTrackProcessor unavailable");
|
|
62
|
+
return new Ctor({ track });
|
|
63
|
+
}
|
|
64
|
+
function createTrackGenerator() {
|
|
65
|
+
const Ctor = globalThis.MediaStreamTrackGenerator;
|
|
66
|
+
if (!Ctor) throw new Error("MediaStreamTrackGenerator unavailable");
|
|
67
|
+
return new Ctor({ kind: "video" });
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The worker's entire logic. SELF-CONTAINED (serialized via toString into the
|
|
71
|
+
* blob): no module references. Frame loop: read → scale within the bound →
|
|
72
|
+
* write → close. The processor buffers at most one frame, so reads always
|
|
73
|
+
* yield the freshest frame; while paused, frames are still read and closed so
|
|
74
|
+
* the camera's frame pool stays healthy — an unclosed VideoFrame can stall the
|
|
75
|
+
* capture pipeline, which the recording must never do.
|
|
76
|
+
*/
|
|
77
|
+
function cameraCompositorWorkerMain(scope) {
|
|
78
|
+
const g = globalThis;
|
|
79
|
+
let maxLongEdge = 1280;
|
|
80
|
+
let maxShortEdge = 720;
|
|
81
|
+
let canvas = null;
|
|
82
|
+
let ctx = null;
|
|
83
|
+
let writer = null;
|
|
84
|
+
let activeReader = null;
|
|
85
|
+
let generation = 0;
|
|
86
|
+
let paused = false;
|
|
87
|
+
let announceNextFrame = false;
|
|
88
|
+
const boundedSize = (width, height) => {
|
|
89
|
+
const scale = Math.min(1, maxLongEdge / Math.max(width, height), maxShortEdge / Math.min(width, height));
|
|
90
|
+
return {
|
|
91
|
+
width: Math.max(1, Math.round(width * scale)),
|
|
92
|
+
height: Math.max(1, Math.round(height * scale))
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
const scaled = (frame) => {
|
|
96
|
+
const size = boundedSize(frame.displayWidth, frame.displayHeight);
|
|
97
|
+
if (!canvas || !ctx || size.width === frame.displayWidth && size.height === frame.displayHeight) return frame;
|
|
98
|
+
if (canvas.width !== size.width || canvas.height !== size.height) {
|
|
99
|
+
canvas.width = size.width;
|
|
100
|
+
canvas.height = size.height;
|
|
101
|
+
}
|
|
102
|
+
ctx.drawImage(frame, 0, 0, size.width, size.height);
|
|
103
|
+
const out = new g.VideoFrame(canvas, { timestamp: frame.timestamp });
|
|
104
|
+
frame.close();
|
|
105
|
+
return out;
|
|
106
|
+
};
|
|
107
|
+
const pump = async (readable, gen) => {
|
|
108
|
+
const reader = readable.getReader();
|
|
109
|
+
activeReader = reader;
|
|
110
|
+
try {
|
|
111
|
+
for (;;) {
|
|
112
|
+
const { value: frame, done } = await reader.read();
|
|
113
|
+
if (done) {
|
|
114
|
+
if (gen === generation) scope.postMessage({ type: "ended" });
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (gen !== generation) {
|
|
118
|
+
frame.close();
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
if (paused || !writer) {
|
|
122
|
+
frame.close();
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
await writer.write(scaled(frame));
|
|
126
|
+
if (announceNextFrame) {
|
|
127
|
+
announceNextFrame = false;
|
|
128
|
+
scope.postMessage({ type: "frame" });
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
} catch (error) {
|
|
132
|
+
if (gen === generation) scope.postMessage({
|
|
133
|
+
type: "fatal",
|
|
134
|
+
message: String(error)
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
const switchSource = (readable) => {
|
|
139
|
+
generation += 1;
|
|
140
|
+
const previous = activeReader;
|
|
141
|
+
activeReader = null;
|
|
142
|
+
previous?.cancel().catch(() => {});
|
|
143
|
+
pump(readable, generation);
|
|
144
|
+
};
|
|
145
|
+
scope.onmessage = (event) => {
|
|
146
|
+
const message = event.data;
|
|
147
|
+
switch (message.type) {
|
|
148
|
+
case "start":
|
|
149
|
+
maxLongEdge = message.maxLongEdge;
|
|
150
|
+
maxShortEdge = message.maxShortEdge;
|
|
151
|
+
canvas = new g.OffscreenCanvas(1, 1);
|
|
152
|
+
ctx = canvas.getContext("2d");
|
|
153
|
+
writer = message.writable.getWriter();
|
|
154
|
+
announceNextFrame = true;
|
|
155
|
+
switchSource(message.readable);
|
|
156
|
+
break;
|
|
157
|
+
case "source":
|
|
158
|
+
switchSource(message.readable);
|
|
159
|
+
break;
|
|
160
|
+
case "pause":
|
|
161
|
+
paused = true;
|
|
162
|
+
break;
|
|
163
|
+
case "resume":
|
|
164
|
+
paused = false;
|
|
165
|
+
announceNextFrame = true;
|
|
166
|
+
break;
|
|
167
|
+
default: break;
|
|
168
|
+
}
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
/** Assembles the classic-worker script from the serialized worker main. */
|
|
172
|
+
function buildCameraCompositorWorkerSource() {
|
|
173
|
+
return [`const workerMain = ${cameraCompositorWorkerMain.toString()};`, "workerMain(self);"].join("\n");
|
|
174
|
+
}
|
|
175
|
+
//#endregion
|
|
176
|
+
//#region ../infra/src/media/CameraCompositor.ts
|
|
177
|
+
const MAX_COMPOSITE_LONG_EDGE = 1280;
|
|
178
|
+
const MAX_COMPOSITE_SHORT_EDGE = 720;
|
|
179
|
+
const FRAME_INTERVAL_TOLERANCE_RATIO = .9;
|
|
180
|
+
const DEFAULT_RESUME_TIMEOUT_MS = 2e3;
|
|
181
|
+
/**
|
|
182
|
+
* Composites the *active* camera into a single, stable `MediaStream` to
|
|
183
|
+
* record. Switching cameras (front ↔ back) just repoints the source — the
|
|
184
|
+
* output stream and its audio track are never replaced — so a single
|
|
185
|
+
* `MediaRecorder` produces one continuous video that follows the camera
|
|
186
|
+
* switches (V1 parity), instead of restarting per camera.
|
|
187
|
+
*
|
|
188
|
+
* Two transports (ENG-55397):
|
|
189
|
+
* - **Worker (preferred, Chromium 94+):** camera track →
|
|
190
|
+
* `MediaStreamTrackProcessor` → worker scales on an `OffscreenCanvas` →
|
|
191
|
+
* `MediaStreamTrackGenerator`. The main thread is not in the frame path, so
|
|
192
|
+
* the recording stays at camera rate while the synchronous ID detection
|
|
193
|
+
* tick saturates the main thread (measured: 4–9 fps main-thread vs 30 fps
|
|
194
|
+
* worker on a Galaxy S21 under the same load).
|
|
195
|
+
* - **Main thread (fallback):** hidden `<video>` → rVFC/rAF → canvas →
|
|
196
|
+
* `captureStream`, for Safari, Firefox and strict-CSP hosts that block blob
|
|
197
|
+
* workers.
|
|
198
|
+
*
|
|
199
|
+
* A worker that dies mid-recording (GPU-process crash, OOM) is released at
|
|
200
|
+
* once; the composite track stays valid but receives no further frames, and
|
|
201
|
+
* the next `resume()` reports `timed-out` so the caller reacquires the camera
|
|
202
|
+
* instead of talking to a dead worker.
|
|
203
|
+
*
|
|
204
|
+
* The audio track from the initial stream is carried through unchanged across
|
|
205
|
+
* video switches, so there's no audio glitch when the camera flips.
|
|
206
|
+
*/
|
|
207
|
+
var CameraCompositor = class {
|
|
208
|
+
constructor(options = {}) {
|
|
209
|
+
this.canvas = null;
|
|
210
|
+
this.ctx = null;
|
|
211
|
+
this.video = null;
|
|
212
|
+
this.transport = null;
|
|
213
|
+
this.generator = null;
|
|
214
|
+
this.frameRequestId = null;
|
|
215
|
+
this.frameRequestKind = null;
|
|
216
|
+
this.sourceExceedsTargetFps = false;
|
|
217
|
+
this.lastDrawTimeMs = null;
|
|
218
|
+
this.lastVideoTimeSeconds = null;
|
|
219
|
+
this.audioTrack = null;
|
|
220
|
+
this.videoTrack = null;
|
|
221
|
+
this.composite = null;
|
|
222
|
+
this.fps = options.fps ?? 30;
|
|
223
|
+
this.frameIntervalMs = this.fps > 0 ? 1e3 / this.fps : 0;
|
|
224
|
+
this.resumeTimeoutMs = options.resumeTimeoutMs ?? DEFAULT_RESUME_TIMEOUT_MS;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Begin compositing `stream` and return the composite stream to record. The
|
|
228
|
+
* stream's audio track (if any) is carried through unchanged across later
|
|
229
|
+
* `switchVideo` calls.
|
|
230
|
+
*/
|
|
231
|
+
start(stream) {
|
|
232
|
+
this.audioTrack = stream.getAudioTracks()[0] ?? null;
|
|
233
|
+
const composite = this.startWorkerTransport(stream) ?? this.startMainThread(stream);
|
|
234
|
+
if (this.audioTrack) composite.addTrack(this.audioTrack);
|
|
235
|
+
this.composite = composite;
|
|
236
|
+
return composite;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Swap the camera feeding the composite without interrupting the composite
|
|
240
|
+
* stream. Pass a video-only stream (audio is kept from `start`). The previous
|
|
241
|
+
* video track is stopped.
|
|
242
|
+
*/
|
|
243
|
+
switchVideo(stream) {
|
|
244
|
+
if (!this.composite) return;
|
|
245
|
+
const previousVideoTrack = this.videoTrack;
|
|
246
|
+
if (this.transport) {
|
|
247
|
+
this.videoTrack = stream.getVideoTracks()[0] ?? null;
|
|
248
|
+
if (this.videoTrack) try {
|
|
249
|
+
const processor = createTrackProcessor(this.videoTrack);
|
|
250
|
+
this.postToWorker({
|
|
251
|
+
type: "source",
|
|
252
|
+
readable: processor.readable
|
|
253
|
+
}, [processor.readable]);
|
|
254
|
+
} catch {}
|
|
255
|
+
} else if (this.video) {
|
|
256
|
+
this.setVideoSource(stream);
|
|
257
|
+
this.startDrawLoop();
|
|
258
|
+
} else this.videoTrack = stream.getVideoTracks()[0] ?? null;
|
|
259
|
+
if (previousVideoTrack) previousVideoTrack.stop();
|
|
260
|
+
}
|
|
261
|
+
/** The composite stream being recorded, if compositing is active. */
|
|
262
|
+
get stream() {
|
|
263
|
+
return this.composite ?? void 0;
|
|
264
|
+
}
|
|
265
|
+
/** Pause source playback and drawing while the page is backgrounded. */
|
|
266
|
+
pause() {
|
|
267
|
+
this.finishResume("timed-out");
|
|
268
|
+
if (this.transport) {
|
|
269
|
+
this.postToWorker({ type: "pause" });
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
this.cancelDrawLoop();
|
|
273
|
+
this.video?.pause();
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Restart source playback and wait for a genuinely new camera frame to reach
|
|
277
|
+
* the stable composite stream. The caller must not resume encoding until
|
|
278
|
+
* this resolves with `resumed`.
|
|
279
|
+
*/
|
|
280
|
+
async resume(signal) {
|
|
281
|
+
const video = this.video;
|
|
282
|
+
if (!this.composite || !video && !this.transport) return "timed-out";
|
|
283
|
+
if (this.audioTrack?.readyState === "ended") return "audio-ended";
|
|
284
|
+
if (!this.videoTrack || this.videoTrack.readyState === "ended") return "video-ended";
|
|
285
|
+
if (signal?.aborted) return "timed-out";
|
|
286
|
+
if (video && !this.transport) {
|
|
287
|
+
try {
|
|
288
|
+
await video.play();
|
|
289
|
+
} catch {
|
|
290
|
+
return "timed-out";
|
|
291
|
+
}
|
|
292
|
+
if (signal?.aborted) return "timed-out";
|
|
293
|
+
}
|
|
294
|
+
this.finishResume("timed-out");
|
|
295
|
+
return new Promise((resolve) => {
|
|
296
|
+
const timeout = setTimeout(() => {
|
|
297
|
+
this.finishResume("timed-out");
|
|
298
|
+
}, this.resumeTimeoutMs);
|
|
299
|
+
if (signal) {
|
|
300
|
+
const onAbort = () => this.finishResume("timed-out");
|
|
301
|
+
this.resumeWaiter = {
|
|
302
|
+
resolve,
|
|
303
|
+
timeout,
|
|
304
|
+
signal,
|
|
305
|
+
onAbort
|
|
306
|
+
};
|
|
307
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
308
|
+
if (signal.aborted) {
|
|
309
|
+
this.finishResume("timed-out");
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
} else this.resumeWaiter = {
|
|
313
|
+
resolve,
|
|
314
|
+
timeout
|
|
315
|
+
};
|
|
316
|
+
if (this.transport) {
|
|
317
|
+
this.postToWorker({ type: "resume" });
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
this.startDrawLoop(false);
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
/** Stop compositing and release the worker, canvas, audio and video tracks. */
|
|
324
|
+
stop() {
|
|
325
|
+
this.finishResume("timed-out");
|
|
326
|
+
this.cancelDrawLoop();
|
|
327
|
+
this.releaseWorker();
|
|
328
|
+
this.generator?.stop();
|
|
329
|
+
this.generator = null;
|
|
330
|
+
this.videoTrack?.stop();
|
|
331
|
+
this.audioTrack?.stop();
|
|
332
|
+
this.composite?.getTracks().forEach((track) => track.stop());
|
|
333
|
+
if (this.video) this.video.srcObject = null;
|
|
334
|
+
this.canvas = null;
|
|
335
|
+
this.ctx = null;
|
|
336
|
+
this.video = null;
|
|
337
|
+
this.videoTrack = null;
|
|
338
|
+
this.audioTrack = null;
|
|
339
|
+
this.composite = null;
|
|
340
|
+
}
|
|
341
|
+
/**
|
|
342
|
+
* Worker transport. Returns `null` — and leaves nothing behind — when the
|
|
343
|
+
* browser lacks insertable streams or a strict `worker-src` CSP blocks blob
|
|
344
|
+
* workers, so `start` falls through to the main-thread path. Never throws.
|
|
345
|
+
*/
|
|
346
|
+
startWorkerTransport(stream) {
|
|
347
|
+
const track = stream.getVideoTracks()[0];
|
|
348
|
+
if (!track || !canUseCameraCompositorWorker()) return null;
|
|
349
|
+
let worker = null;
|
|
350
|
+
let generator = null;
|
|
351
|
+
let blobUrl = null;
|
|
352
|
+
try {
|
|
353
|
+
const processor = createTrackProcessor(track);
|
|
354
|
+
generator = createTrackGenerator();
|
|
355
|
+
blobUrl = URL.createObjectURL(new Blob([buildCameraCompositorWorkerSource()], { type: "text/javascript" }));
|
|
356
|
+
worker = new Worker(blobUrl);
|
|
357
|
+
worker.onmessage = (event) => this.onWorkerMessage(event.data);
|
|
358
|
+
worker.onerror = (event) => this.onWorkerMessage({
|
|
359
|
+
type: "fatal",
|
|
360
|
+
message: event?.message || "worker error"
|
|
361
|
+
});
|
|
362
|
+
const message = {
|
|
363
|
+
type: "start",
|
|
364
|
+
readable: processor.readable,
|
|
365
|
+
writable: generator.writable,
|
|
366
|
+
maxLongEdge: MAX_COMPOSITE_LONG_EDGE,
|
|
367
|
+
maxShortEdge: MAX_COMPOSITE_SHORT_EDGE
|
|
368
|
+
};
|
|
369
|
+
worker.postMessage(message, [processor.readable, generator.writable]);
|
|
370
|
+
} catch {
|
|
371
|
+
worker?.terminate();
|
|
372
|
+
generator?.stop();
|
|
373
|
+
if (blobUrl) URL.revokeObjectURL(blobUrl);
|
|
374
|
+
return null;
|
|
375
|
+
}
|
|
376
|
+
this.videoTrack = track;
|
|
377
|
+
this.transport = {
|
|
378
|
+
worker,
|
|
379
|
+
blobUrl
|
|
380
|
+
};
|
|
381
|
+
this.generator = generator;
|
|
382
|
+
return new MediaStream([generator]);
|
|
383
|
+
}
|
|
384
|
+
/** Terminates the worker and frees its blob; idempotent. */
|
|
385
|
+
releaseWorker() {
|
|
386
|
+
if (!this.transport) return;
|
|
387
|
+
this.transport.worker.terminate();
|
|
388
|
+
URL.revokeObjectURL(this.transport.blobUrl);
|
|
389
|
+
this.transport = null;
|
|
390
|
+
}
|
|
391
|
+
startMainThread(stream) {
|
|
392
|
+
this.canvas = document.createElement("canvas");
|
|
393
|
+
this.ctx = this.canvas.getContext("2d");
|
|
394
|
+
this.video = document.createElement("video");
|
|
395
|
+
this.video.muted = true;
|
|
396
|
+
this.video.playsInline = true;
|
|
397
|
+
this.setVideoSource(stream);
|
|
398
|
+
const composite = this.canvas.captureStream(this.fps);
|
|
399
|
+
this.startDrawLoop();
|
|
400
|
+
return composite;
|
|
401
|
+
}
|
|
402
|
+
postToWorker(message, transfer = []) {
|
|
403
|
+
this.transport?.worker.postMessage(message, transfer);
|
|
404
|
+
}
|
|
405
|
+
onWorkerMessage(message) {
|
|
406
|
+
if (!this.transport) return;
|
|
407
|
+
switch (message.type) {
|
|
408
|
+
case "frame":
|
|
409
|
+
this.finishResume("resumed");
|
|
410
|
+
break;
|
|
411
|
+
case "ended":
|
|
412
|
+
this.finishResume("video-ended");
|
|
413
|
+
break;
|
|
414
|
+
case "fatal":
|
|
415
|
+
this.releaseWorker();
|
|
416
|
+
this.finishResume("timed-out");
|
|
417
|
+
break;
|
|
418
|
+
default: break;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
setVideoSource(stream) {
|
|
422
|
+
this.videoTrack = stream.getVideoTracks()[0] ?? null;
|
|
423
|
+
const sourceFps = this.videoTrack && typeof this.videoTrack.getSettings === "function" ? this.videoTrack.getSettings().frameRate : void 0;
|
|
424
|
+
this.sourceExceedsTargetFps = typeof sourceFps === "number" && sourceFps > this.fps;
|
|
425
|
+
const video = this.video;
|
|
426
|
+
if (!video) return;
|
|
427
|
+
video.srcObject = new MediaStream(stream.getVideoTracks());
|
|
428
|
+
video.play().catch(() => {});
|
|
429
|
+
}
|
|
430
|
+
startDrawLoop(resetSourceTime = true) {
|
|
431
|
+
this.cancelDrawLoop();
|
|
432
|
+
this.lastDrawTimeMs = null;
|
|
433
|
+
if (resetSourceTime) this.lastVideoTimeSeconds = null;
|
|
434
|
+
const draw = (timeMs) => {
|
|
435
|
+
const elapsed = this.lastDrawTimeMs === null ? Infinity : timeMs - this.lastDrawTimeMs;
|
|
436
|
+
if ((!(this.frameIntervalMs > 0 && (this.frameRequestKind !== "video" || this.sourceExceedsTargetFps)) || elapsed >= this.frameIntervalMs * FRAME_INTERVAL_TOLERANCE_RATIO) && this.drawCurrentFrame()) {
|
|
437
|
+
this.lastDrawTimeMs = timeMs;
|
|
438
|
+
this.finishResume("resumed");
|
|
439
|
+
}
|
|
440
|
+
this.scheduleNextFrame(draw);
|
|
441
|
+
};
|
|
442
|
+
this.scheduleNextFrame(draw);
|
|
443
|
+
}
|
|
444
|
+
finishResume(result) {
|
|
445
|
+
const waiter = this.resumeWaiter;
|
|
446
|
+
if (!waiter) return;
|
|
447
|
+
this.resumeWaiter = void 0;
|
|
448
|
+
clearTimeout(waiter.timeout);
|
|
449
|
+
if ("signal" in waiter) waiter.signal.removeEventListener("abort", waiter.onAbort);
|
|
450
|
+
waiter.resolve(result);
|
|
451
|
+
}
|
|
452
|
+
scheduleNextFrame(callback) {
|
|
453
|
+
const video = this.video;
|
|
454
|
+
if (video && typeof video.requestVideoFrameCallback === "function") {
|
|
455
|
+
this.frameRequestKind = "video";
|
|
456
|
+
this.frameRequestId = video.requestVideoFrameCallback(callback);
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
this.frameRequestKind = "animation";
|
|
460
|
+
this.frameRequestId = requestAnimationFrame(callback);
|
|
461
|
+
}
|
|
462
|
+
cancelDrawLoop() {
|
|
463
|
+
if (this.frameRequestId === null) return;
|
|
464
|
+
if (this.frameRequestKind === "video" && this.video && typeof this.video.cancelVideoFrameCallback === "function") this.video.cancelVideoFrameCallback(this.frameRequestId);
|
|
465
|
+
else cancelAnimationFrame(this.frameRequestId);
|
|
466
|
+
this.frameRequestId = null;
|
|
467
|
+
this.frameRequestKind = null;
|
|
468
|
+
}
|
|
469
|
+
drawCurrentFrame() {
|
|
470
|
+
const video = this.video;
|
|
471
|
+
const canvas = this.canvas;
|
|
472
|
+
const ctx = this.ctx;
|
|
473
|
+
if (!video || !canvas || !ctx || video.videoWidth <= 0) return false;
|
|
474
|
+
if (this.lastVideoTimeSeconds === video.currentTime) return false;
|
|
475
|
+
const dimensions = this.getBoundedDimensions(video.videoWidth, video.videoHeight);
|
|
476
|
+
if (canvas.width !== dimensions.width || canvas.height !== dimensions.height) {
|
|
477
|
+
canvas.width = dimensions.width;
|
|
478
|
+
canvas.height = dimensions.height;
|
|
479
|
+
}
|
|
480
|
+
ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
|
|
481
|
+
this.lastVideoTimeSeconds = video.currentTime;
|
|
482
|
+
return true;
|
|
483
|
+
}
|
|
484
|
+
getBoundedDimensions(width, height) {
|
|
485
|
+
const longEdge = Math.max(width, height);
|
|
486
|
+
const shortEdge = Math.min(width, height);
|
|
487
|
+
const scale = Math.min(1, MAX_COMPOSITE_LONG_EDGE / longEdge, MAX_COMPOSITE_SHORT_EDGE / shortEdge);
|
|
488
|
+
return {
|
|
489
|
+
width: Math.max(1, Math.round(width * scale)),
|
|
490
|
+
height: Math.max(1, Math.round(height * scale))
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
//#endregion
|
|
50
495
|
//#region ../infra/src/providers/browser/MultipartRecordingProvider.ts
|
|
51
496
|
/**
|
|
52
497
|
* How often `MediaRecorder` hands us buffered data (incremental blobs).
|
|
@@ -602,4 +1047,4 @@ var MultipartRecordingService = class {
|
|
|
602
1047
|
}
|
|
603
1048
|
};
|
|
604
1049
|
//#endregion
|
|
605
|
-
export {
|
|
1050
|
+
export { CameraCompositor as n, getAdaptiveMediaRecorderOptions as r, MultipartRecordingService as t };
|
package/dist/personhood.esm.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-B-qr0dC6.esm.js";
|
|
2
2
|
import { r as WasmUtilProvider } from "./safeStorage-B-trhxg6.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 { b as getStoredHttpConfig, w as createApi$1, y as randomUUID } from "./trueSightService-
|
|
5
|
+
import { b as getStoredHttpConfig, w as createApi$1, y as randomUUID } from "./trueSightService-De306VXK.esm.js";
|
|
6
6
|
import { n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
|
|
7
|
-
import { b as BrowserEnvironmentProvider, h as isBrowserSimulation, n as getFingerprintEnabled, v as getThumbmarkId, y as getDeviceFingerprintInfo } from "./sessionInitializer-
|
|
7
|
+
import { b as BrowserEnvironmentProvider, h as isBrowserSimulation, n as getFingerprintEnabled, v as getThumbmarkId, y as getDeviceFingerprintInfo } from "./sessionInitializer-DKCQfxZ2.esm.js";
|
|
8
8
|
import { t as endpoints } from "./endpoints-B-3Q-LUw.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 { i as requestCameraAccess, o as stopCameraStream } from "./camera-sIa9ceW2.esm.js";
|
|
12
12
|
import { i as requestPermission, t as checkPermission } from "./permissionServices-Bj_fyWtv.esm.js";
|
|
13
|
-
import { i as initializeDeepsightSession, o as startDetection, s as stopStream, t as FaceDetectionProvider } from "./FaceDetectionProvider-
|
|
13
|
+
import { i as initializeDeepsightSession, o as startDetection, s as stopStream, t as FaceDetectionProvider } from "./FaceDetectionProvider-DAVK6BAe.esm.js";
|
|
14
14
|
import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
|
|
15
15
|
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-C9jtgBdT.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-Bc8MLmTL.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-De306VXK.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.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
|
|
2
|
-
import { _ as SelfieCaptureOnlyConfig, a as SelfieCaptureOnlyMachine, c as SelfieActor, g as processFace, h as ProcessFaceResponse, i as SelfieCaptureOnlyActor, l as SelfieMachine, n as FaceCaptureManagerState, o as selfieCaptureOnlyMachine, r as CreateSelfieCaptureOnlyActorOptions, t as FaceCaptureManager, u as selfieMachine, v as SelfieConfig } from "./faceCaptureManagerFactory-
|
|
2
|
+
import { _ as SelfieCaptureOnlyConfig, a as SelfieCaptureOnlyMachine, c as SelfieActor, g as processFace, h as ProcessFaceResponse, i as SelfieCaptureOnlyActor, l as SelfieMachine, n as FaceCaptureManagerState, o as selfieCaptureOnlyMachine, r as CreateSelfieCaptureOnlyActorOptions, t as FaceCaptureManager, u as selfieMachine, v as SelfieConfig } from "./faceCaptureManagerFactory-Cx-8SqRy.js";
|
|
3
3
|
import { n as PermissionStatus, t as PermissionResult } from "./types-BEwVKkLJ.js";
|
|
4
4
|
import { a as FaceCapturedImageData, i as FaceCaptureOnlyResponse, n as DetectionStatus, o as FaceErrorCode } from "./types-Bnl58jUQ.js";
|
|
5
5
|
import { n as DeepsightService } from "./StreamCanvasCapture-_8gdW5Lk.js";
|
|
6
6
|
import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
7
|
-
import { i as createSelfieManagerFromActor, n as SelfieState, r as createSelfieManager, t as SelfieManager } from "./selfieManager-
|
|
7
|
+
import { i as createSelfieManagerFromActor, n as SelfieState, r as createSelfieManager, t as SelfieManager } from "./selfieManager-jXqwqosi.js";
|
|
8
8
|
//#region src/modules/selfie/selfieCaptureOnlyManager.d.ts
|
|
9
9
|
type SelfieCaptureOnlyState = FaceCaptureManagerState;
|
|
10
10
|
type SelfieCaptureOnlyManager = FaceCaptureManager;
|
package/dist/selfie.esm.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-B-qr0dC6.esm.js";
|
|
2
2
|
import { r as WasmUtilProvider } from "./safeStorage-B-trhxg6.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
5
|
import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
6
|
-
import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
7
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
6
|
+
import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-DpM1YYl9.esm.js";
|
|
7
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-qPW__uXd.esm.js";
|
|
8
8
|
import { s as PROTECTED_CAPTURE_TARGET } from "./createCameraCycleOwnership-CX3hJGKc.esm.js";
|
|
9
9
|
import { r as processFace } from "./selfieErrorUtils-UiQ46EBa.esm.js";
|
|
10
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
11
|
-
import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-
|
|
10
|
+
import { t as selfieMachine } from "./selfieStateMachine-BJVwANex.esm.js";
|
|
11
|
+
import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-CFGf-DmP.esm.js";
|
|
12
12
|
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-BjzPjJ_p.esm.js";
|
|
13
13
|
/**
|
|
14
14
|
* Selfie state machine variant for the captureOnly flow. Shares the full base
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-B-qr0dC6.esm.js";
|
|
2
2
|
import { r as WasmUtilProvider } from "./safeStorage-B-trhxg6.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-qPW__uXd.esm.js";
|
|
6
|
+
import { t as selfieMachine } from "./selfieStateMachine-BJVwANex.esm.js";
|
|
7
7
|
//#region src/modules/selfie/selfieActor.ts
|
|
8
8
|
function createSelfieActor(options) {
|
|
9
9
|
const dependencies = options.dependencies ?? {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-CQQ99QOI.js";
|
|
2
2
|
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
|
|
3
|
-
import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-
|
|
3
|
+
import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-Cx-8SqRy.js";
|
|
4
4
|
//#region src/modules/selfie/selfieManager.d.ts
|
|
5
5
|
type SelfieState = FaceCaptureManagerState;
|
|
6
6
|
/**
|
|
@@ -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 createDefaultProtectedFaceControllerActor, r as manualFaceUploadMachine, t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
4
|
-
import { c as isOnDeviceMode } from "./FaceDetectionProvider-
|
|
3
|
+
import { n as createDefaultProtectedFaceControllerActor, r as manualFaceUploadMachine, t as faceCaptureMachine } from "./faceCaptureSetup-DpM1YYl9.esm.js";
|
|
4
|
+
import { c as isOnDeviceMode } from "./FaceDetectionProvider-DAVK6BAe.esm.js";
|
|
5
5
|
import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
|
|
6
6
|
import { s as PROTECTED_CAPTURE_TARGET } from "./createCameraCycleOwnership-CX3hJGKc.esm.js";
|
|
7
7
|
import { i as uploadManualSelfie, n as validateUploadResponse, r as processFace } from "./selfieErrorUtils-UiQ46EBa.esm.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { n as getApi } from "./api-Bx3gKW_y.esm.js";
|
|
2
|
-
import { g as noteSessionCreated, l as trueSightLog } from "./trueSightService-
|
|
3
|
-
import "./sessionInitializer-
|
|
2
|
+
import { g as noteSessionCreated, l as trueSightLog } from "./trueSightService-De306VXK.esm.js";
|
|
3
|
+
import "./sessionInitializer-DKCQfxZ2.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
|
|
5
|
-
import { i as toIncodeApiError } from "./apiError-
|
|
5
|
+
import { i as toIncodeApiError } from "./apiError-BArJSmSN.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, l as whenSessionFingerprintSettled } 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, l as whenSessionFingerprintSettled } from "./sessionInitializer-DKCQfxZ2.esm.js";
|
|
2
|
+
import { t as IncodeApiError } from "./apiError-BArJSmSN.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-Cs6z9Stj.esm.js";
|
|
4
|
+
import { n as getFinishStatus } from "./flowCompletionService-D0qKFy5Y.esm.js";
|
|
5
5
|
export { IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid, whenSessionFingerprintSettled };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { E as updateFeatureManagementUser } from "./feature-management-
|
|
1
|
+
import { E as updateFeatureManagementUser } from "./feature-management-Bzr9uaS4.esm.js";
|
|
2
2
|
import { c as setToken, r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
|
|
3
|
-
import { d as fetchFeatureConfig, f as isFeatureEnabled, h as noteEnvironment, l as trueSightLog, p as resetFeatureConfigCache, s as startTrueSightCollection, v as noteTokenActivated } from "./trueSightService-
|
|
3
|
+
import { d as fetchFeatureConfig, f as isFeatureEnabled, h as noteEnvironment, l as trueSightLog, p as resetFeatureConfigCache, s as startTrueSightCollection, v as noteTokenActivated } from "./trueSightService-De306VXK.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-DYlnESxD.esm.js";
|
|
6
6
|
import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
|
|
7
7
|
import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue } from "./stats-CZcy2J53.esm.js";
|
|
8
8
|
import { t as getParsedUserAgent } from "./getParsedUserAgent-B2iFDql1.esm.js";
|
|
@@ -2,16 +2,16 @@ import { f as deriveSiblingJsPath, p as WASM_MODEL_FILES, v as buildModelVariant
|
|
|
2
2
|
import { i as setWasmOnDeviceMode, o as warmupWasm } from "./warmup-CUUnwYxe.esm.js";
|
|
3
3
|
import { r as WasmUtilProvider, t as resolveLocalStorage } from "./safeStorage-B-trhxg6.esm.js";
|
|
4
4
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
5
|
-
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-
|
|
5
|
+
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-Bzr9uaS4.esm.js";
|
|
6
6
|
import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
|
|
7
7
|
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";
|
|
8
|
-
import { C as upgradeToWasmHttpClient$1, S as resetHttpClientState, _ as noteTestingSignals, b as getStoredHttpConfig, l as trueSightLog, n as initializeTrueSightDiagnostics, o as resetTrueSight, t as finalizeTrueSight, u as categoryForEndpoint, x as installFreshHttpClient } from "./trueSightService-
|
|
8
|
+
import { C as upgradeToWasmHttpClient$1, S as resetHttpClientState, _ as noteTestingSignals, b as getStoredHttpConfig, l as trueSightLog, n as initializeTrueSightDiagnostics, o as resetTrueSight, t as finalizeTrueSight, u as categoryForEndpoint, x as installFreshHttpClient } from "./trueSightService-De306VXK.esm.js";
|
|
9
9
|
import { b as resetAnalyticsBatcher, c as resetExperimentAssignments, x as setAnalyticsBatcher, y as getAnalyticsBatcher } from "./events-ijlbX_Wx.esm.js";
|
|
10
|
-
import { a as resetSessionInit, b as BrowserEnvironmentProvider, c as setClientIpLookupEnabled, d as registerFlowPreloader, f as resetStandaloneFlowPolicy, i as initializeSession, m as setStandaloneFlowPolicy, o as setClientFingerprintEnabled, p as resolveStandaloneFlowPolicy, s as setClientHostingApp } from "./sessionInitializer-
|
|
10
|
+
import { a as resetSessionInit, b as BrowserEnvironmentProvider, c as setClientIpLookupEnabled, d as registerFlowPreloader, f as resetStandaloneFlowPolicy, i as initializeSession, m as setStandaloneFlowPolicy, o as setClientFingerprintEnabled, p as resolveStandaloneFlowPolicy, s as setClientHostingApp } from "./sessionInitializer-DKCQfxZ2.esm.js";
|
|
11
11
|
import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
|
|
12
12
|
import { r as resetDeviceStatsQueue, t as addDeviceStats } from "./stats-CZcy2J53.esm.js";
|
|
13
13
|
import { a as resetTRI, n as initializeTRI, o as resetTRIProviderInstance } from "./tri-4RsGrIt6.esm.js";
|
|
14
|
-
import { i as resetDashboardFlowCache, r as preloadDashboardFlow } from "./flowServices-
|
|
14
|
+
import { i as resetDashboardFlowCache, r as preloadDashboardFlow } from "./flowServices-CnyFU9Bz.esm.js";
|
|
15
15
|
//#region ../infra/src/wasm/wasmDefaults.ts
|
|
16
16
|
const WASM_CDN_BASE_URL = "https://cdn.incodesmile.com/ml-wasm-kit-release";
|
|
17
17
|
/** 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-DYlnESxD.esm.js";
|
|
6
6
|
import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
|
|
7
7
|
//#region ../infra/src/http/createApi.ts
|
|
8
8
|
var FetchHttpError = class extends Error {
|
|
@@ -336,7 +336,7 @@ const createWasmApi = async (config) => {
|
|
|
336
336
|
const upperMethod = normalizeMethod(method);
|
|
337
337
|
const requestParams = params ?? query;
|
|
338
338
|
const fullUrl = buildUrl(defaults.baseURL, url, requestParams);
|
|
339
|
-
const needsSchemeHeader =
|
|
339
|
+
const needsSchemeHeader = useSha256 && isEncryptionEnabled();
|
|
340
340
|
const mergedHeaders = {
|
|
341
341
|
...defaults.headers,
|
|
342
342
|
...needsSchemeHeader ? { "X-RSA-Encryption-Scheme": RSA_OAEP_SHA256_SCHEME } : {},
|
|
@@ -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-C2E4mGEX.esm.js").then((module) => new module.BrowserDiagnosticsCryptoProvider());
|
|
1324
1324
|
return cryptoProviderPromise;
|
|
1325
1325
|
}
|
|
1326
1326
|
/**
|