@incodetech/core 0.0.0-dev-20260909-14ef44cf → 0.0.0-dev-20260911-3c28f170
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-BqvOagjI.esm.js → BrowserDiagnosticsCryptoProvider-D8H3nWpr.esm.js} +1 -1
- package/dist/{MotionSensorProvider-nnSH-kVd.esm.js → MotionSensorProvider-Vlyhbcty.esm.js} +1 -1
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{apiError-CE5YD5T0.esm.js → apiError-CY6lWIaQ.esm.js} +1 -1
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-BMqAIjH1.esm.js → authenticationManager-BxkiSz79.esm.js} +4 -4
- package/dist/{authenticationStateMachine-BKMxS3yH.esm.js → authenticationStateMachine-DAQ4dBAD.esm.js} +2 -2
- package/dist/camera.esm.js +1 -1
- package/dist/{deepsightLoader-nTArZgT2.esm.js → deepsightLoader-Cpjfw3EQ.esm.js} +5 -5
- package/dist/device.esm.js +5 -2
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-BqY_B0Ii.esm.js → documentCaptureManager-BTpHZMgW.esm.js} +1 -1
- package/dist/{documentCaptureStateMachine-D_9dw5b1.esm.js → documentCaptureStateMachine-CPizkpcg.esm.js} +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-HVbJKaF8.esm.js → dynamicFormsManager-CKkEm4x5.esm.js} +1 -1
- package/dist/{dynamicFormsStateMachine-BGYqEGcO.esm.js → dynamicFormsStateMachine-CoBVJjYk.esm.js} +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-D080qI3d.esm.js → ekybManager-hFZnmQzb.esm.js} +1 -1
- package/dist/{ekybStateMachine-4Ac_gP-0.esm.js → ekybStateMachine-CHzi9XHk.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-CuZp9R8p.esm.js → electronicSignatureManager-vLj_aBwI.esm.js} +1 -1
- package/dist/extensibility.esm.js +12 -12
- package/dist/{faceCaptureManagerFactory-waLeHRj_.esm.js → faceCaptureManagerFactory-BRuA7cbI.esm.js} +3 -3
- package/dist/{faceCaptureSetup-JxQbmDt_.esm.js → faceCaptureSetup-Bhpk__dy.esm.js} +3 -3
- package/dist/{feature-management-DkbzJPHi.esm.js → feature-management-Dd_npJ0p.esm.js} +30 -5
- package/dist/feature-management.esm.js +1 -1
- package/dist/flow.d.ts +202 -177
- package/dist/flow.esm.js +107 -24
- package/dist/{flowCompletionService-1HFgv9BU.esm.js → flowCompletionService-cuWgokHI.esm.js} +1 -1
- package/dist/{flowServices-C2pUbFWe.esm.js → flowServices-CzgZ-VRv.esm.js} +83 -14
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-CeDChUNS.esm.js → geolocationManager-Vh9KYMeo.esm.js} +1 -1
- package/dist/{geolocationStateMachine-C1fxKLJP.esm.js → geolocationStateMachine-BPzG-LrP.esm.js} +1 -1
- package/dist/id-selfie-flow.esm.js +8 -8
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-CbCpNaoY.esm.js → idCaptureDefaults-Dic5mQfO.esm.js} +3 -2
- package/dist/{idCaptureManager-Cpd9uT8z.esm.js → idCaptureManager-De-5JavX.esm.js} +5 -5
- package/dist/{idCaptureServices-X5poMwbu.esm.js → idCaptureServices-BZvFZyyy.esm.js} +4 -4
- package/dist/{idCaptureStateMachine-BZPAUJzI.esm.js → idCaptureStateMachine-UTll8mMx.esm.js} +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{onDeviceFaceResults-BgIPrRr2.esm.js → onDeviceFaceResults-CU5XlhqG.esm.js} +6 -5
- package/dist/{permissionGuards-BHw_SD3h.esm.js → permissionGuards-DxbvOoZJ.esm.js} +1 -1
- package/dist/{permissionServices-J5S1dEIf.esm.js → permissionServices-f7nBnW5P.esm.js} +2 -2
- package/dist/personhood.esm.js +6 -6
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{runChildModule-Bq791c2t.esm.js → runChildModule-6P8ofHxL.esm.js} +1 -1
- package/dist/safeStorage-Dp9m6aOh.esm.js +422 -0
- package/dist/{sdkVersion-Bc55H50S.esm.js → sdkVersion-DlL6SxXs.esm.js} +1 -1
- package/dist/selfie.esm.js +6 -6
- package/dist/{selfieManager-I_h3YE2X.esm.js → selfieManager-C4esDm_H.esm.js} +4 -4
- package/dist/{selfieStateMachine-DJwDxPAT.esm.js → selfieStateMachine-B7vhKLV7.esm.js} +2 -2
- package/dist/{session-CoY3St8F.esm.js → session-DWnBmR2a.esm.js} +3 -3
- package/dist/session.d.ts +16 -1
- package/dist/session.esm.js +5 -5
- package/dist/{sessionInitializer-BEjB0UVH.esm.js → sessionInitializer-DUpE6yBR.esm.js} +92 -33
- package/dist/{setup-DLn1eHU9.esm.js → setup-CQNSur1c.esm.js} +8 -6
- package/dist/{setup-B9s2jaZK.d.ts → setup-D6yz9se2.d.ts} +14 -0
- package/dist/{trueSightService-VUN8WK4N.esm.js → trueSightService-CvdDnFul.esm.js} +2 -2
- package/dist/video-selfie.esm.js +5 -5
- package/dist/{videoSelfieCameraWarmer-Dkey7P7h.esm.js → videoSelfieCameraWarmer-Gcgw9ze7.esm.js} +4 -4
- package/dist/{safeStorage-0bZuUtSP.esm.js → warmup-BOM-sD-6.esm.js} +14 -434
- package/dist/wasm.d.ts +1 -1
- package/dist/wasm.esm.js +2 -2
- package/dist/{wasmDsFlagSync-CyCdsfox.esm.js → wasmDsFlagSync-C3k_VK9o.esm.js} +1 -1
- package/dist/workflow.esm.js +15 -15
- package/package.json +3 -3
|
@@ -0,0 +1,422 @@
|
|
|
1
|
+
import { c as wasmCallWrapper, s as ML_CALL_MAX_POLLS } from "./wasmWebClient-BJCaFeBL.esm.js";
|
|
2
|
+
import { a as waitForWasm, n as getWasmStatus, o as warmupWasm, r as isWasmReady, s as wasmRuntime } from "./warmup-BOM-sD-6.esm.js";
|
|
3
|
+
//#region ../infra/src/wasm/utilityWasmApi.ts
|
|
4
|
+
/**
|
|
5
|
+
* Utility / metadata domain facade over {@link WasmRuntime}.
|
|
6
|
+
*
|
|
7
|
+
* Holds no WASM state — the runtime owns every handle and buffer. The one
|
|
8
|
+
* qualification: it owns exactly two JS-side flags that the C++ side does not
|
|
9
|
+
* persist and that must be replayed into it at call time —
|
|
10
|
+
*
|
|
11
|
+
* - `dsEnabled_` (deepsight) is passed as an argument on every
|
|
12
|
+
* `prc`/`poc`/`rsp`/`ssl` call;
|
|
13
|
+
* - `inspectorOpened_` is pushed into C++ inside {@link getMetadata}, right
|
|
14
|
+
* before reading the metadata, because `setInspectorOpened` may legitimately be
|
|
15
|
+
* called before WASM is initialized.
|
|
16
|
+
*
|
|
17
|
+
* Both are deliberately **unguarded** setters: they never throw, so the SDK can
|
|
18
|
+
* record them during setup and have them honored once WASM comes up.
|
|
19
|
+
*
|
|
20
|
+
* `prc`/`poc`/`rsp` are the only methods here that hold the ML semaphore.
|
|
21
|
+
* `ssl`/`stl`/`osv`/`oev`/`ckvcks` and everything else are unlocked **by design**
|
|
22
|
+
* (decision D6) — never add locking.
|
|
23
|
+
*
|
|
24
|
+
* Method names, argument order and the pre-initialization error strings are
|
|
25
|
+
* copied verbatim from the mirrored upstream `wasmApi.ts` so a WASM version bump
|
|
26
|
+
* stays a diff against upstream (`docs/processes/WASM_VERSION_MIGRATION.md`).
|
|
27
|
+
* `setSdkPlatform`'s message says "device type" on purpose — do not "fix" it.
|
|
28
|
+
*/
|
|
29
|
+
var UtilityWasmApi = class {
|
|
30
|
+
constructor(runtime = wasmRuntime) {
|
|
31
|
+
this.runtime = runtime;
|
|
32
|
+
this.inspectorOpened_ = false;
|
|
33
|
+
this.dsEnabled_ = false;
|
|
34
|
+
}
|
|
35
|
+
ens(image) {
|
|
36
|
+
return this.runtime.requireUtilityApi("Unable to encrypt the image, cpp API hasn't been initialized").ens(image);
|
|
37
|
+
}
|
|
38
|
+
isVirtualCamera(label) {
|
|
39
|
+
const utilityApi = this.runtime.requireUtilityApi("Unable to check if the camera is virtual, cpp API hasn't been initialized");
|
|
40
|
+
if (label) return utilityApi.isVirtualCamera(label);
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
estimatePerformance() {
|
|
44
|
+
return this.runtime.requireUtilityApi("Unable to estimate performance, cpp API hasn't been initialized").estimatePerformance();
|
|
45
|
+
}
|
|
46
|
+
async analyzeFrame(image) {
|
|
47
|
+
const message = "Unable to analyze the frame, cpp API hasn't been initialized";
|
|
48
|
+
this.runtime.requireUtilityApi(message);
|
|
49
|
+
await this.runtime.allocateImageBuffers(image.width, image.height);
|
|
50
|
+
this.runtime.writeFrame(image);
|
|
51
|
+
this.runtime.requireUtilityApi(message).analyzeFrame();
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Sets the native (C++) utility API's production mode. When `true`, the WASM
|
|
55
|
+
* module suppresses its verbose debug logging; when `false`, it emits it.
|
|
56
|
+
*
|
|
57
|
+
* @param productionMode - `true` to silence WASM logs, `false` to emit them.
|
|
58
|
+
* @throws If the WASM C++ API has not been initialized yet.
|
|
59
|
+
*/
|
|
60
|
+
async setProductionMode(productionMode) {
|
|
61
|
+
this.runtime.requireUtilityApi("Unable to set production mode, cpp API hasn't been initialized").setProductionMode(productionMode);
|
|
62
|
+
}
|
|
63
|
+
setSdkVersion(sdkVersion) {
|
|
64
|
+
this.runtime.requireUtilityApi("Unable to set sdk version, cpp API hasn't been initialized").setSdkVersion(sdkVersion);
|
|
65
|
+
}
|
|
66
|
+
setSdkPlatform(sdkPlatform) {
|
|
67
|
+
this.runtime.requireUtilityApi("Unable to set device type, cpp API hasn't been initialized").setSdkPlatform(sdkPlatform);
|
|
68
|
+
}
|
|
69
|
+
setDeviceInfo(deviceInfo, overrideExisting = true) {
|
|
70
|
+
this.runtime.requireUtilityApi("Unable to set device info, cpp API hasn't been initialized").setDeviceInfo(deviceInfo, overrideExisting);
|
|
71
|
+
}
|
|
72
|
+
setBrowserInfo(browserInfo, overrideExisting = true) {
|
|
73
|
+
this.runtime.requireUtilityApi("Unable to set browser info, cpp API hasn't been initialized").setBrowserInfo(browserInfo, overrideExisting);
|
|
74
|
+
}
|
|
75
|
+
setCameraInfo(cameraInfo, overrideExisting = true) {
|
|
76
|
+
this.runtime.requireUtilityApi("Unable to set camera info, cpp API hasn't been initialized").setCameraInfo(cameraInfo, overrideExisting);
|
|
77
|
+
}
|
|
78
|
+
setZc(zc) {
|
|
79
|
+
this.runtime.requireUtilityApi("Unable to set zc, cpp API hasn't been initialized").setZc(zc);
|
|
80
|
+
}
|
|
81
|
+
setMotionStatus(motionStatus) {
|
|
82
|
+
this.runtime.requireUtilityApi("Unable to set motion status, cpp API hasn't been initialized").setMotionStatus(motionStatus);
|
|
83
|
+
}
|
|
84
|
+
setInspectorOpened(inspectorOpened) {
|
|
85
|
+
this.inspectorOpened_ = inspectorOpened;
|
|
86
|
+
}
|
|
87
|
+
getInspectorOpened() {
|
|
88
|
+
return this.inspectorOpened_;
|
|
89
|
+
}
|
|
90
|
+
setBackgroundMode(backgroundMode) {
|
|
91
|
+
this.runtime.requireUtilityApi("Unable to set background mode, cpp API hasn't been initialized").setBackgroundMode(backgroundMode);
|
|
92
|
+
}
|
|
93
|
+
setDsEnabled(enabled) {
|
|
94
|
+
this.dsEnabled_ = enabled;
|
|
95
|
+
}
|
|
96
|
+
getCheck() {
|
|
97
|
+
return this.runtime.requireUtilityApi("Unable to get check, cpp API hasn't been initialized").getCheck();
|
|
98
|
+
}
|
|
99
|
+
getMetadata() {
|
|
100
|
+
const utilityApi = this.runtime.requireUtilityApi("Unable to get metadata, cpp API hasn't been initialized");
|
|
101
|
+
utilityApi.setInspectorOpened(this.inspectorOpened_);
|
|
102
|
+
return utilityApi.getMetadata();
|
|
103
|
+
}
|
|
104
|
+
async prc() {
|
|
105
|
+
const message = "Unable to prc, cpp API hasn't been initialized";
|
|
106
|
+
this.runtime.requireUtilityApi(message);
|
|
107
|
+
await wasmCallWrapper(this.runtime.mlCallSemaphore, () => this.runtime.requireUtilityApi(message).prc(this.dsEnabled_, false), true, {
|
|
108
|
+
maxPolls: ML_CALL_MAX_POLLS,
|
|
109
|
+
label: "prc"
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
async poc(output) {
|
|
113
|
+
const message = "Unable to poc, cpp API hasn't been initialized";
|
|
114
|
+
this.runtime.requireUtilityApi(message);
|
|
115
|
+
await wasmCallWrapper(this.runtime.mlCallSemaphore, () => this.runtime.requireUtilityApi(message).poc(this.dsEnabled_, output), true, {
|
|
116
|
+
maxPolls: ML_CALL_MAX_POLLS,
|
|
117
|
+
label: "poc"
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
async rsp() {
|
|
121
|
+
const message = "Unable to rsp, cpp API hasn't been initialized";
|
|
122
|
+
this.runtime.requireUtilityApi(message);
|
|
123
|
+
await wasmCallWrapper(this.runtime.mlCallSemaphore, () => this.runtime.requireUtilityApi(message).rsp(this.dsEnabled_), true, {
|
|
124
|
+
maxPolls: ML_CALL_MAX_POLLS,
|
|
125
|
+
label: "rsp"
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
ssl() {
|
|
129
|
+
this.runtime.requireUtilityApi("Unable to ssl, cpp API hasn't been initialized").ssl(this.dsEnabled_);
|
|
130
|
+
}
|
|
131
|
+
stl() {
|
|
132
|
+
this.runtime.requireUtilityApi("Unable to stl, cpp API hasn't been initialized").stl();
|
|
133
|
+
}
|
|
134
|
+
osv() {
|
|
135
|
+
this.runtime.requireUtilityApi("Unable to set sensor beginning timestamp, cpp API hasn't been initialized").osv();
|
|
136
|
+
}
|
|
137
|
+
oev() {
|
|
138
|
+
this.runtime.requireUtilityApi("Unable to set sensor ending timestamp, cpp API hasn't been initialized").oev();
|
|
139
|
+
}
|
|
140
|
+
ckvcks(data) {
|
|
141
|
+
this.runtime.requireUtilityApi("Unable to ckvcks, cpp API hasn't been initialized").ckvcks(data);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Clear all states, not related to ml pipelines
|
|
145
|
+
*/
|
|
146
|
+
resetOther() {
|
|
147
|
+
this.runtime.requireUtilityApi("Unable to reset other states, cpp API hasn't been initialized").resetOther();
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Full reset. Pipelines first, then the non-pipeline state — the order the
|
|
151
|
+
* mirrored upstream wrapper uses.
|
|
152
|
+
*/
|
|
153
|
+
reset() {
|
|
154
|
+
this.runtime.resetAllPipelines();
|
|
155
|
+
this.resetOther();
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
const utilityWasmApi = new UtilityWasmApi();
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region ../infra/src/providers/wasm/BaseWasmProvider.ts
|
|
161
|
+
/**
|
|
162
|
+
* Base provider class that abstracts common WASM functionality.
|
|
163
|
+
* This serves as a foundation for specific ML capability providers
|
|
164
|
+
* like FaceDetectionProvider and IdCaptureProvider.
|
|
165
|
+
*/
|
|
166
|
+
var BaseWasmProvider = class {
|
|
167
|
+
/**
|
|
168
|
+
* Creates a new BaseWasmProvider
|
|
169
|
+
* @param pipelineType - The WASM pipeline type this provider uses
|
|
170
|
+
*/
|
|
171
|
+
constructor(pipelineType) {
|
|
172
|
+
this._isInitialized = false;
|
|
173
|
+
this.pipelineType = pipelineType;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Returns whether this provider has been initialized.
|
|
177
|
+
*/
|
|
178
|
+
get initialized() {
|
|
179
|
+
return this._isInitialized;
|
|
180
|
+
}
|
|
181
|
+
getPipelineType() {
|
|
182
|
+
if (this.pipelineType === void 0) throw new Error(`${this.constructor.name} has no pipeline type configured.`);
|
|
183
|
+
return this.pipelineType;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Initializes the provider by ensuring WASM is loaded
|
|
187
|
+
* @param config - Provider configuration
|
|
188
|
+
* @param pipeline - The pipeline type to warm up ('selfie', 'idCapture', etc.)
|
|
189
|
+
*/
|
|
190
|
+
async initializeBase(config, pipeline) {
|
|
191
|
+
if (this._isInitialized) return;
|
|
192
|
+
const status = getWasmStatus();
|
|
193
|
+
if (status.isLoading || isWasmReady() || status.error) {
|
|
194
|
+
if (!(status.isLoading && status.loadedPipelines.includes(pipeline))) await waitForWasm();
|
|
195
|
+
if (this.pipelineType !== void 0 && !getWasmStatus().loadedPipelines.includes(pipeline)) throw new Error(`WASM pipeline "${pipeline}" is not loaded.`);
|
|
196
|
+
} else {
|
|
197
|
+
if (!config.wasmPath || !config.glueCodePath && !config.loadGlue) throw new Error("WASM path and glue code path are required. Call warmupWasm() first.");
|
|
198
|
+
await warmupWasm({
|
|
199
|
+
...config,
|
|
200
|
+
wasmPath: config.wasmPath,
|
|
201
|
+
glueCodePath: config.glueCodePath ?? "",
|
|
202
|
+
pipelines: [pipeline]
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
this._isInitialized = true;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Ensures the provider is initialized before performing operations.
|
|
209
|
+
* @throws Error if not initialized
|
|
210
|
+
*/
|
|
211
|
+
ensureInitialized() {
|
|
212
|
+
if (!this._isInitialized) throw new Error(`${this.constructor.name} not initialized. Call initialize() first.`);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Processes a frame through the WASM pipeline
|
|
216
|
+
* @param image - Image data to process
|
|
217
|
+
* @returns The pipeline result (type depends on pipeline - WASM returns any)
|
|
218
|
+
*/
|
|
219
|
+
async processFrameWasm(image) {
|
|
220
|
+
this.ensureInitialized();
|
|
221
|
+
const pipelineType = this.getPipelineType();
|
|
222
|
+
await wasmRuntime.allocateImageBuffers(image.width, image.height);
|
|
223
|
+
await wasmRuntime.handleDetectionCallAndUpdateState(pipelineType);
|
|
224
|
+
return await wasmRuntime.process(image, pipelineType);
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Resets the pipeline to its initial state.
|
|
228
|
+
* Safe to call even if not initialized (no-op in that case).
|
|
229
|
+
*/
|
|
230
|
+
reset() {
|
|
231
|
+
if (this._isInitialized && this.pipelineType !== void 0) wasmRuntime.resetPipeline(this.pipelineType);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Disposes of resources and resets initialization state.
|
|
235
|
+
* Safe to call even if not initialized.
|
|
236
|
+
*/
|
|
237
|
+
async dispose() {
|
|
238
|
+
this.reset();
|
|
239
|
+
this._isInitialized = false;
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
//#endregion
|
|
243
|
+
//#region ../infra/src/providers/wasm/WasmUtilProvider.ts
|
|
244
|
+
var WasmUtilProvider = class WasmUtilProvider extends BaseWasmProvider {
|
|
245
|
+
static async getInstance() {
|
|
246
|
+
if (WasmUtilProvider.instance) return WasmUtilProvider.instance;
|
|
247
|
+
if (WasmUtilProvider.initPromise) return WasmUtilProvider.initPromise;
|
|
248
|
+
WasmUtilProvider.initPromise = (async () => {
|
|
249
|
+
const instance = new WasmUtilProvider();
|
|
250
|
+
await instance.initializeBase({}, "selfie");
|
|
251
|
+
WasmUtilProvider.instance = instance;
|
|
252
|
+
return instance;
|
|
253
|
+
})();
|
|
254
|
+
return WasmUtilProvider.initPromise;
|
|
255
|
+
}
|
|
256
|
+
static resetInstance() {
|
|
257
|
+
WasmUtilProvider.instance = void 0;
|
|
258
|
+
WasmUtilProvider.initPromise = void 0;
|
|
259
|
+
}
|
|
260
|
+
constructor() {
|
|
261
|
+
super(void 0);
|
|
262
|
+
}
|
|
263
|
+
async initialize(config) {
|
|
264
|
+
if (this.initialized) return;
|
|
265
|
+
const pipeline = config.pipelines?.[0] ?? "selfie";
|
|
266
|
+
await this.initializeBase(config, pipeline);
|
|
267
|
+
}
|
|
268
|
+
async processFrame(_image) {
|
|
269
|
+
throw new Error("WasmUtilProvider does not support frame processing. Use encryptImage() instead.");
|
|
270
|
+
}
|
|
271
|
+
encryptImage(image) {
|
|
272
|
+
this.ensureInitialized();
|
|
273
|
+
return utilityWasmApi.ens(image);
|
|
274
|
+
}
|
|
275
|
+
setSdkVersion(version) {
|
|
276
|
+
this.ensureInitialized();
|
|
277
|
+
utilityWasmApi.setSdkVersion(version);
|
|
278
|
+
}
|
|
279
|
+
setSdkPlatform(platform) {
|
|
280
|
+
this.ensureInitialized();
|
|
281
|
+
utilityWasmApi.setSdkPlatform(platform);
|
|
282
|
+
}
|
|
283
|
+
setDeviceInfo(deviceInfo, overrideExisting = true) {
|
|
284
|
+
this.ensureInitialized();
|
|
285
|
+
utilityWasmApi.setDeviceInfo(deviceInfo, overrideExisting);
|
|
286
|
+
}
|
|
287
|
+
setBrowserInfo(browserInfo, overrideExisting = true) {
|
|
288
|
+
this.ensureInitialized();
|
|
289
|
+
utilityWasmApi.setBrowserInfo(browserInfo, overrideExisting);
|
|
290
|
+
}
|
|
291
|
+
setCameraInfo(cameraInfo, overrideExisting = true) {
|
|
292
|
+
this.ensureInitialized();
|
|
293
|
+
utilityWasmApi.setCameraInfo(cameraInfo, overrideExisting);
|
|
294
|
+
}
|
|
295
|
+
setMotionStatus(status) {
|
|
296
|
+
this.ensureInitialized();
|
|
297
|
+
utilityWasmApi.setMotionStatus(status);
|
|
298
|
+
}
|
|
299
|
+
setBackgroundMode(backgroundMode) {
|
|
300
|
+
this.ensureInitialized();
|
|
301
|
+
utilityWasmApi.setBackgroundMode(backgroundMode);
|
|
302
|
+
}
|
|
303
|
+
setOnDeviceMode(enabled) {
|
|
304
|
+
this.ensureInitialized();
|
|
305
|
+
wasmRuntime.setOnDeviceMode(enabled);
|
|
306
|
+
}
|
|
307
|
+
setZc(zc) {
|
|
308
|
+
this.ensureInitialized();
|
|
309
|
+
utilityWasmApi.setZc(zc);
|
|
310
|
+
}
|
|
311
|
+
setInspectorOpened(opened) {
|
|
312
|
+
this.ensureInitialized();
|
|
313
|
+
utilityWasmApi.setInspectorOpened(opened);
|
|
314
|
+
}
|
|
315
|
+
getInspectorOpened() {
|
|
316
|
+
return utilityWasmApi.getInspectorOpened();
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Toggles the WASM module's production mode. When `true`, the native module
|
|
320
|
+
* suppresses its verbose debug logging/console output; when `false`, those
|
|
321
|
+
* logs are emitted. The SDK forces this to `true` by default and only flips
|
|
322
|
+
* it off when the caller opts in via `setup({ wasm: { showLogs: true } })`.
|
|
323
|
+
*
|
|
324
|
+
* @param productionMode - `true` to silence WASM logs, `false` to emit them.
|
|
325
|
+
*/
|
|
326
|
+
async setProductionMode(productionMode) {
|
|
327
|
+
this.ensureInitialized();
|
|
328
|
+
await utilityWasmApi.setProductionMode(productionMode);
|
|
329
|
+
}
|
|
330
|
+
getMetadata() {
|
|
331
|
+
this.ensureInitialized();
|
|
332
|
+
return utilityWasmApi.getMetadata();
|
|
333
|
+
}
|
|
334
|
+
async analyzeFrame(image) {
|
|
335
|
+
this.ensureInitialized();
|
|
336
|
+
await utilityWasmApi.analyzeFrame(image);
|
|
337
|
+
}
|
|
338
|
+
getCheck() {
|
|
339
|
+
this.ensureInitialized();
|
|
340
|
+
return utilityWasmApi.getCheck();
|
|
341
|
+
}
|
|
342
|
+
getPipelineState() {
|
|
343
|
+
this.ensureInitialized();
|
|
344
|
+
return wasmRuntime.getPipelineState();
|
|
345
|
+
}
|
|
346
|
+
estimatePerformance() {
|
|
347
|
+
this.ensureInitialized();
|
|
348
|
+
return utilityWasmApi.estimatePerformance();
|
|
349
|
+
}
|
|
350
|
+
isVirtualCamera(label) {
|
|
351
|
+
this.ensureInitialized();
|
|
352
|
+
return utilityWasmApi.isVirtualCamera(label);
|
|
353
|
+
}
|
|
354
|
+
async prc() {
|
|
355
|
+
this.ensureInitialized();
|
|
356
|
+
await utilityWasmApi.prc();
|
|
357
|
+
}
|
|
358
|
+
async poc(output) {
|
|
359
|
+
this.ensureInitialized();
|
|
360
|
+
await utilityWasmApi.poc(output);
|
|
361
|
+
}
|
|
362
|
+
async rsp() {
|
|
363
|
+
this.ensureInitialized();
|
|
364
|
+
await utilityWasmApi.rsp();
|
|
365
|
+
}
|
|
366
|
+
ssl() {
|
|
367
|
+
this.ensureInitialized();
|
|
368
|
+
utilityWasmApi.ssl();
|
|
369
|
+
}
|
|
370
|
+
stl() {
|
|
371
|
+
this.ensureInitialized();
|
|
372
|
+
utilityWasmApi.stl();
|
|
373
|
+
}
|
|
374
|
+
osv() {
|
|
375
|
+
this.ensureInitialized();
|
|
376
|
+
utilityWasmApi.osv();
|
|
377
|
+
}
|
|
378
|
+
oev() {
|
|
379
|
+
this.ensureInitialized();
|
|
380
|
+
utilityWasmApi.oev();
|
|
381
|
+
}
|
|
382
|
+
ckvcks(data) {
|
|
383
|
+
this.ensureInitialized();
|
|
384
|
+
utilityWasmApi.ckvcks(data);
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region ../infra/src/storage/safeStorage.ts
|
|
389
|
+
/**
|
|
390
|
+
* Storage resolvers that tolerate hosts which make Web Storage unreachable.
|
|
391
|
+
*
|
|
392
|
+
* Two hostile shapes occur in the field, and they fail differently:
|
|
393
|
+
*
|
|
394
|
+
* 1. **Deleted bare global** — a page mitigates self-XSS with
|
|
395
|
+
* `delete window.localStorage` and keeps a module-private reference. Since
|
|
396
|
+
* `window` *is* the global object, the identifier stops resolving: a bare
|
|
397
|
+
* read throws `ReferenceError`. `typeof` is the only safe probe, because it
|
|
398
|
+
* is the one operator that tolerates an unresolvable identifier.
|
|
399
|
+
* 2. **Blocked storage** — a webview or a cross-origin/partitioned context
|
|
400
|
+
* makes the accessor itself throw (`SecurityError`). Here `typeof` is *not*
|
|
401
|
+
* enough: it invokes the getter, so the throw escapes the guard.
|
|
402
|
+
*
|
|
403
|
+
* Handling only one shape leaves the other live, so always go through these
|
|
404
|
+
* resolvers instead of touching the globals directly. A `null` return means
|
|
405
|
+
* "no storage in this host" — callers degrade, they do not throw.
|
|
406
|
+
*/
|
|
407
|
+
function resolveLocalStorage() {
|
|
408
|
+
try {
|
|
409
|
+
return typeof localStorage === "undefined" ? null : localStorage;
|
|
410
|
+
} catch {
|
|
411
|
+
return null;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
function resolveSessionStorage() {
|
|
415
|
+
try {
|
|
416
|
+
return typeof sessionStorage === "undefined" ? null : sessionStorage;
|
|
417
|
+
} catch {
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
//#endregion
|
|
422
|
+
export { utilityWasmApi as a, BaseWasmProvider as i, resolveSessionStorage as n, WasmUtilProvider as r, resolveLocalStorage as t };
|
package/dist/selfie.esm.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { l as BrowserStorageProvider } from "./setup-
|
|
2
|
-
import { r as WasmUtilProvider } from "./safeStorage-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-CQNSur1c.esm.js";
|
|
2
|
+
import { r as WasmUtilProvider } from "./safeStorage-Dp9m6aOh.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-Bhpk__dy.esm.js";
|
|
7
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-BRuA7cbI.esm.js";
|
|
8
8
|
import { r as processFace } from "./selfieErrorUtils-C6gC06J7.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-B7vhKLV7.esm.js";
|
|
10
|
+
import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-C4esDm_H.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-
|
|
2
|
-
import { r as WasmUtilProvider } from "./safeStorage-
|
|
1
|
+
import { l as BrowserStorageProvider } from "./setup-CQNSur1c.esm.js";
|
|
2
|
+
import { r as WasmUtilProvider } from "./safeStorage-Dp9m6aOh.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-BRuA7cbI.esm.js";
|
|
6
|
+
import { t as selfieMachine } from "./selfieStateMachine-B7vhKLV7.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-Bhpk__dy.esm.js";
|
|
4
|
+
import { i as prepareOnDeviceFaceUpload, n as isOnDeviceMode, r as postOnDeviceFaceResults, t as defaultPrepareFaceUpload } from "./onDeviceFaceResults-CU5XlhqG.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-C6gC06J7.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-CvdDnFul.esm.js";
|
|
3
|
+
import "./sessionInitializer-DUpE6yBR.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-CY6lWIaQ.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.d.ts
CHANGED
|
@@ -188,6 +188,13 @@ type Features = {
|
|
|
188
188
|
};
|
|
189
189
|
//#endregion
|
|
190
190
|
//#region src/internal/session/sessionInitializer.d.ts
|
|
191
|
+
/**
|
|
192
|
+
* Resolves once the device-fingerprint step of the current session
|
|
193
|
+
* activation has settled (submitted, failed, or skipped) — with the backend's
|
|
194
|
+
* result when there is one. Resolves immediately when no activation is in
|
|
195
|
+
* flight. Pairs with `initializeSession({ awaitFingerprint: false })`.
|
|
196
|
+
*/
|
|
197
|
+
declare function whenSessionFingerprintSettled(): Promise<DeviceFingerprintResult | undefined>;
|
|
191
198
|
type SessionInitOptions = {
|
|
192
199
|
/**
|
|
193
200
|
* Session token returned by `createSession`. Persisted on the HTTP client
|
|
@@ -205,6 +212,14 @@ type SessionInitOptions = {
|
|
|
205
212
|
signal?: AbortSignal;
|
|
206
213
|
/** Set to `true` to preload Flow configuration during session activation. */
|
|
207
214
|
preloadFlow?: boolean;
|
|
215
|
+
/**
|
|
216
|
+
* `false` resolves as soon as the feature config is in, leaving the device
|
|
217
|
+
* fingerprint (thumbmark + IP lookup + submit) to finish in the background;
|
|
218
|
+
* `fingerprintSuccess`/`fingerprintResult` on the result are then not yet
|
|
219
|
+
* known — read them via `whenSessionFingerprintSettled()`. Default `true`
|
|
220
|
+
* keeps the historical contract: the promise settles after the fingerprint.
|
|
221
|
+
*/
|
|
222
|
+
awaitFingerprint?: boolean;
|
|
208
223
|
};
|
|
209
224
|
type SessionInitResult = {
|
|
210
225
|
features: Features;
|
|
@@ -243,4 +258,4 @@ type SessionInitResult = {
|
|
|
243
258
|
*/
|
|
244
259
|
declare function initializeSession(options?: SessionInitOptions): Promise<SessionInitResult>;
|
|
245
260
|
//#endregion
|
|
246
|
-
export { type BootstrapSessionOptions, type CreateSessionOptions, type FinishStatus, type GetFinishStatusFn, IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, type QrValidationErrorCode, type QrValidationResult, type RefreshQrUrlUuidOptions, type Session, type SessionInitOptions, type SessionInitResult, type ValidateQrUuidOptions, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid };
|
|
261
|
+
export { type BootstrapSessionOptions, type CreateSessionOptions, type DeviceFingerprintResult, type FinishStatus, type GetFinishStatusFn, IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, type QrValidationErrorCode, type QrValidationResult, type RefreshQrUrlUuidOptions, type Session, type SessionInitOptions, type SessionInitResult, type ValidateQrUuidOptions, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid, whenSessionFingerprintSettled };
|
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-
|
|
5
|
-
export { IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid };
|
|
1
|
+
import { c as whenSessionFingerprintSettled, i as initializeSession } from "./sessionInitializer-DUpE6yBR.esm.js";
|
|
2
|
+
import { t as IncodeApiError } from "./apiError-CY6lWIaQ.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-DWnBmR2a.esm.js";
|
|
4
|
+
import { n as getFinishStatus } from "./flowCompletionService-cuWgokHI.esm.js";
|
|
5
|
+
export { IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid, whenSessionFingerprintSettled };
|