@incodetech/core 0.0.0-dev-20260403-eccc51c → 0.0.0-dev-20260407-4677d7f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BaseWasmProvider--AzPfwOm.esm.js → BaseWasmProvider-CQgeReKV.esm.js} +1 -785
- package/dist/MotionSensorProvider-BTDLt08l.esm.js +254 -0
- package/dist/StateMachine-8d441d6x.d.ts +2 -0
- package/dist/{WasmUtilProvider-BonqBWdj.esm.js → WasmUtilProvider-C45HStLj.esm.js} +1 -1
- package/dist/{addressSearch-DC5By0cC.esm.js → addressSearch-C5qzDvkN.esm.js} +15 -8
- package/dist/antifraud.d.ts +1 -1
- package/dist/antifraud.esm.js +3 -3
- package/dist/authentication.d.ts +11 -9
- package/dist/authentication.esm.js +18 -13
- package/dist/{authenticationManager-B4gSCgrO.esm.js → authenticationManager-CW4qxgcq.esm.js} +7 -6
- package/dist/{authenticationManager-Bd10YGSO.d.ts → authenticationManager-CiXsOTdM.d.ts} +2 -2
- package/dist/{backCameraStream-DF_d7hTz.esm.js → backCameraStream-CUo1USCT.esm.js} +2 -2
- package/dist/camera.d.ts +16 -0
- package/dist/camera.esm.js +5 -0
- package/dist/consent.d.ts +52 -52
- package/dist/consent.esm.js +3 -3
- package/dist/curp-validation.d.ts +5 -5
- package/dist/curp-validation.esm.js +3 -3
- package/dist/{deepsightLoader-DKgEdLIS.esm.js → deepsightLoader-Bs5jHgca.esm.js} +10 -7
- package/dist/deepsightService-C3gQ_9Ml.esm.js +493 -0
- package/dist/{deepsightService-Ciu0atv5.d.ts → deepsightService-CMAtxAC9.d.ts} +193 -197
- package/dist/device.d.ts +46 -0
- package/dist/device.esm.js +106 -0
- package/dist/document-capture.d.ts +78 -78
- package/dist/document-capture.esm.js +6 -6
- package/dist/document-upload.d.ts +53 -53
- package/dist/document-upload.esm.js +6 -6
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +11 -10
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +104 -22
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +5 -5
- package/dist/{emailManager-CpAwvP3v.esm.js → emailManager-CZ2IGW0g.esm.js} +4 -4
- package/dist/{emailManager-BQPIJR_O.d.ts → emailManager-DEIxY7l6.d.ts} +2 -2
- package/dist/events-BlVGS-8F.esm.js +472 -0
- package/dist/events.d.ts +232 -0
- package/dist/events.esm.js +4 -0
- package/dist/extensibility.d.ts +15 -13
- package/dist/extensibility.esm.js +25 -20
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +3 -3
- package/dist/{faceCaptureManagerFactory-CdwpYykv.d.ts → faceCaptureManagerFactory-CWj-nXdx.d.ts} +8 -6
- package/dist/{faceCaptureSetup-DbXgtcp7.esm.js → faceCaptureSetup-DIE5cftl.esm.js} +13 -10
- package/dist/flow.d.ts +7 -6
- package/dist/flow.esm.js +8 -8
- package/dist/{flowCompletionService-TnWijsSw.esm.js → flowCompletionService-N6-xypy-.esm.js} +2 -2
- package/dist/{flowServices-CO2sIR3D.esm.js → flowServices-xgqnJ64L.esm.js} +3 -3
- package/dist/geolocation.d.ts +2 -2
- package/dist/geolocation.esm.js +4 -4
- package/dist/getBrowser-B800KRAi.esm.js +41 -0
- package/dist/getDeviceClass-BKd2FOAf.esm.js +14 -0
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +4 -4
- package/dist/http.d.ts +57 -0
- package/dist/http.esm.js +3 -0
- package/dist/id.d.ts +11 -10
- package/dist/id.esm.js +19 -15
- package/dist/{idCaptureManager-IdqsAASp.d.ts → idCaptureManager-H-rkXnbK.d.ts} +7 -6
- package/dist/{idCaptureManager-DaLU1ug7.esm.js → idCaptureManager-SHBRQ-X_.esm.js} +15 -11
- package/dist/index.d.ts +3 -611
- package/dist/index.esm.js +10 -562
- package/dist/{lib-i-4qLKdG.esm.js → lib-Cq5Wc-Hd.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +58 -58
- package/dist/mandatory-consent.esm.js +3 -3
- package/dist/permissionServices-CDqkkway.esm.js +50 -0
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +5 -5
- package/dist/{phoneManager-DA8WUJtl.d.ts → phoneManager-Clfbrs6b.d.ts} +2 -2
- package/dist/{phoneManager-BAPHSXx8.esm.js → phoneManager-CscgaER2.esm.js} +4 -4
- package/dist/{StreamCanvasCapture-DkpkIgyL.esm.js → recordingsRepository-blYn-iKZ.esm.js} +157 -215
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +4 -4
- package/dist/selfie.d.ts +11 -9
- package/dist/selfie.esm.js +18 -13
- package/dist/{selfieManager-BSkzncsa.esm.js → selfieManager-DeGqD5aN.esm.js} +5 -4
- package/dist/{selfieManager-Dft5wZQ_.d.ts → selfieManager-h_hhEefT.d.ts} +2 -2
- package/dist/{session-OglUYC9l.esm.js → session-PLjFj_T3.esm.js} +5 -19
- package/dist/session.d.ts +46 -2
- package/dist/session.esm.js +7 -4
- package/dist/setup-DJ3dFl5k.d.ts +120 -0
- package/dist/setup-fvDWE7f8.esm.js +450 -0
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +3 -3
- package/dist/{stats-BVigf5Rn.esm.js → stats-BZ1kFW4p.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-CiLyvJGb.d.ts → types-T0VjZW3T.d.ts} +1 -1
- package/dist/types-qhLxpptI.d.ts +5 -0
- package/dist/{types-D8Y1faI5.d.ts → types-zH5PDmSe.d.ts} +1 -1
- package/dist/{StateMachine-CM_aOfNL.d.ts → warmup-CEOVQKby.d.ts} +1 -4
- package/dist/wasm.d.ts +15 -0
- package/dist/wasm.esm.js +10 -0
- package/dist/{Manager-C6AGXEq_.esm.js → xstate.esm-BXrcOcSC.esm.js} +103 -507
- package/package.json +18 -2
- package/dist/endpoints-CI5-28jT.esm.js +0 -69
- package/dist/id-CzDAG_kM.esm.js +0 -0
- package/dist/index-BuVKc9bv.d.ts +0 -1
- /package/dist/{Actor-By8WNHi-.d.ts → Actor-C-jivmFF.d.ts} +0 -0
- /package/dist/{BrowserEnvironmentProvider-BECjyw3_.esm.js → BrowserEnvironmentProvider--xQUs3sg.esm.js} +0 -0
- /package/dist/{BrowserTimerProvider-CIqH6hJp.esm.js → BrowserTimerProvider-CkHEwJFa.esm.js} +0 -0
- /package/dist/{Manager-CCT_-HuZ.d.ts → Manager-BqFybBV-.d.ts} +0 -0
- /package/dist/{api-C2uzxrpN.esm.js → api-CyI8qTie.esm.js} +0 -0
- /package/dist/{browserSimulation-DYAk0Ipe.esm.js → browserSimulation-yzDdWSBf.esm.js} +0 -0
- /package/dist/{camera-6XJdOeBF.d.ts → camera-CKsQVNlH.d.ts} +0 -0
- /package/dist/{camera-DAuRUvnp.esm.js → camera-CsT06Zqy.esm.js} +0 -0
- /package/dist/{chunk-D6hkk-hd.esm.js → chunk-BcQWkoAq.esm.js} +0 -0
- /package/dist/{displayErrors-CGJwvrTl.d.ts → displayErrors-CjMXlBnu.d.ts} +0 -0
- /package/dist/{flowCompletionService-BOd4Rk8n.d.ts → flowCompletionService-BV6ThEJ1.d.ts} +0 -0
- /package/dist/{platform-DdhkonXk.esm.js → platform-Dcuv6w60.esm.js} +0 -0
|
@@ -1,6 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region ../infra/src/manager/Manager.ts
|
|
2
|
+
/**
|
|
3
|
+
* Creates a manager that wraps a state machine actor with a clean public API.
|
|
4
|
+
*
|
|
5
|
+
* The manager provides:
|
|
6
|
+
* - `getState()` - Returns the mapped public state
|
|
7
|
+
* - `subscribe()` - Listen to state changes
|
|
8
|
+
* - `stop()` - Stop the actor
|
|
9
|
+
* - Plus any custom API methods from `createApi`
|
|
10
|
+
*
|
|
11
|
+
* @template TMachine - The state machine type
|
|
12
|
+
* @template TMapState - Function type that maps raw snapshot to public state
|
|
13
|
+
* @template TCreateApi - Function type that creates the custom API
|
|
14
|
+
*
|
|
15
|
+
* @param options - Configuration options
|
|
16
|
+
* @param options.actor - The started actor instance
|
|
17
|
+
* @param options.mapState - Function to transform raw snapshot into public state
|
|
18
|
+
* @param options.createApi - Factory function to create custom API methods
|
|
19
|
+
*
|
|
20
|
+
* @returns Combined manager with base methods and custom API
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const manager = createManager({
|
|
25
|
+
* actor: createActor(myMachine).start(),
|
|
26
|
+
* mapState: (snapshot) => ({ status: snapshot.value }),
|
|
27
|
+
* createApi: ({ actor }) => ({
|
|
28
|
+
* doSomething() { actor.send({ type: 'DO_IT' }); }
|
|
29
|
+
* }),
|
|
30
|
+
* });
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
function createManager(options) {
|
|
34
|
+
const { actor, mapState, createApi, instrumentation } = options;
|
|
35
|
+
function getSnapshot() {
|
|
36
|
+
return actor.getSnapshot();
|
|
37
|
+
}
|
|
38
|
+
function getState() {
|
|
39
|
+
return mapState(getSnapshot());
|
|
40
|
+
}
|
|
41
|
+
function subscribe(listener) {
|
|
42
|
+
const subscription = actor.subscribe(() => {
|
|
43
|
+
listener(getState());
|
|
44
|
+
});
|
|
45
|
+
return () => subscription.unsubscribe();
|
|
46
|
+
}
|
|
47
|
+
let currentScreenName = instrumentation.getScreenName(getSnapshot());
|
|
48
|
+
let currentErrorName = instrumentation.getErrorName(getSnapshot());
|
|
49
|
+
let currentErrorPayload = instrumentation.getErrorPayload(getSnapshot());
|
|
50
|
+
const api = createApi({
|
|
51
|
+
actor,
|
|
52
|
+
getSnapshot,
|
|
53
|
+
trackElementClicked: (elementName, payload) => {
|
|
54
|
+
instrumentation.onElementClicked?.(instrumentation.moduleName, currentScreenName, {
|
|
55
|
+
element: elementName,
|
|
56
|
+
action: payload?.action,
|
|
57
|
+
metadata: payload?.metadata
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
trackCaptureAttemptFinished: (payload) => {
|
|
61
|
+
instrumentation.onCaptureAttemptFinished?.(instrumentation.moduleName, currentScreenName, { logs: payload.logs });
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
instrumentation.onModuleOpened(instrumentation.moduleName);
|
|
65
|
+
if (currentScreenName !== void 0) instrumentation.onScreenOpened(instrumentation.moduleName, currentScreenName);
|
|
66
|
+
if (currentErrorName !== void 0) instrumentation.onErrorTriggered(instrumentation.moduleName, currentErrorName, currentErrorPayload);
|
|
67
|
+
const actorSubscription = actor.subscribe((snapshot) => {
|
|
68
|
+
const nextScreenName = instrumentation.getScreenName(snapshot);
|
|
69
|
+
const nextErrorName = instrumentation.getErrorName(snapshot);
|
|
70
|
+
const nextErrorPayload = instrumentation.getErrorPayload(snapshot);
|
|
71
|
+
if (currentScreenName === nextScreenName) {
|
|
72
|
+
if (nextErrorName !== void 0 && nextErrorName !== currentErrorName) instrumentation.onErrorTriggered(instrumentation.moduleName, nextErrorName, nextErrorPayload);
|
|
73
|
+
currentErrorName = nextErrorName;
|
|
74
|
+
currentErrorPayload = nextErrorPayload;
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (currentScreenName !== void 0) instrumentation.onScreenClosed(instrumentation.moduleName, currentScreenName);
|
|
78
|
+
if (nextScreenName !== void 0) instrumentation.onScreenOpened(instrumentation.moduleName, nextScreenName);
|
|
79
|
+
currentScreenName = nextScreenName;
|
|
80
|
+
if (nextErrorName !== void 0 && nextErrorName !== currentErrorName) instrumentation.onErrorTriggered(instrumentation.moduleName, nextErrorName, nextErrorPayload);
|
|
81
|
+
currentErrorName = nextErrorName;
|
|
82
|
+
currentErrorPayload = nextErrorPayload;
|
|
83
|
+
});
|
|
84
|
+
let isStopped = false;
|
|
85
|
+
const base = {
|
|
86
|
+
getState,
|
|
87
|
+
subscribe,
|
|
88
|
+
stop() {
|
|
89
|
+
if (isStopped) return;
|
|
90
|
+
isStopped = true;
|
|
91
|
+
actorSubscription.unsubscribe();
|
|
92
|
+
if (currentScreenName !== void 0) instrumentation.onScreenClosed(instrumentation.moduleName, currentScreenName);
|
|
93
|
+
currentScreenName = void 0;
|
|
94
|
+
currentErrorName = void 0;
|
|
95
|
+
currentErrorPayload = void 0;
|
|
96
|
+
instrumentation.onModuleClosed(instrumentation.moduleName);
|
|
97
|
+
actor.stop();
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
return Object.defineProperties(base, Object.getOwnPropertyDescriptors(api));
|
|
101
|
+
}
|
|
3
102
|
|
|
103
|
+
//#endregion
|
|
4
104
|
//#region ../../node_modules/.pnpm/xstate@5.24.0/node_modules/xstate/dev/dist/xstate-dev.esm.js
|
|
5
105
|
function getGlobal() {
|
|
6
106
|
if (typeof globalThis !== "undefined") return globalThis;
|
|
@@ -3261,508 +3361,4 @@ function setup({ schemas, actors, actions, guards, delays }) {
|
|
|
3261
3361
|
}
|
|
3262
3362
|
|
|
3263
3363
|
//#endregion
|
|
3264
|
-
|
|
3265
|
-
function getTimestamp() {
|
|
3266
|
-
return Date.now();
|
|
3267
|
-
}
|
|
3268
|
-
function revokeObjectURL(url) {
|
|
3269
|
-
URL.revokeObjectURL(url);
|
|
3270
|
-
}
|
|
3271
|
-
|
|
3272
|
-
//#endregion
|
|
3273
|
-
//#region src/internal/events/addEvent.ts
|
|
3274
|
-
const INTERVIEW_EVENTS_MAX_SCREEN_LENGTH = 50;
|
|
3275
|
-
function normalizeScreenForInterviewEventsApi(screenValue) {
|
|
3276
|
-
const limit = INTERVIEW_EVENTS_MAX_SCREEN_LENGTH;
|
|
3277
|
-
if (screenValue.length <= limit) return screenValue;
|
|
3278
|
-
const head = screenValue.slice(0, limit);
|
|
3279
|
-
const lastDot = head.lastIndexOf(".");
|
|
3280
|
-
const lastPlus = head.lastIndexOf("+");
|
|
3281
|
-
const lastBoundary = Math.max(lastDot, lastPlus);
|
|
3282
|
-
if (lastBoundary > 0) return head.slice(0, lastBoundary);
|
|
3283
|
-
return head;
|
|
3284
|
-
}
|
|
3285
|
-
const eventsQueue = [];
|
|
3286
|
-
const eventSubscribers = [];
|
|
3287
|
-
/**
|
|
3288
|
-
* Subscribes to all SDK events for logging, debugging, or custom analytics.
|
|
3289
|
-
* Returns an unsubscribe function.
|
|
3290
|
-
*
|
|
3291
|
-
* @param listener - Callback function that receives each event
|
|
3292
|
-
* @returns Unsubscribe function to remove the listener
|
|
3293
|
-
*
|
|
3294
|
-
* @example
|
|
3295
|
-
* ```typescript
|
|
3296
|
-
* const unsubscribe = subscribeEvent((event) => {
|
|
3297
|
-
* console.log('[Event]', event.code, event.module);
|
|
3298
|
-
* });
|
|
3299
|
-
*
|
|
3300
|
-
* // Later
|
|
3301
|
-
* unsubscribe();
|
|
3302
|
-
* ```
|
|
3303
|
-
*/
|
|
3304
|
-
function subscribeEvent(listener) {
|
|
3305
|
-
eventSubscribers.push(listener);
|
|
3306
|
-
return () => {
|
|
3307
|
-
const index = eventSubscribers.indexOf(listener);
|
|
3308
|
-
if (index > -1) eventSubscribers.splice(index, 1);
|
|
3309
|
-
};
|
|
3310
|
-
}
|
|
3311
|
-
function notifySubscribers(event) {
|
|
3312
|
-
eventSubscribers.forEach((listener) => {
|
|
3313
|
-
try {
|
|
3314
|
-
listener(event);
|
|
3315
|
-
} catch (_error) {}
|
|
3316
|
-
});
|
|
3317
|
-
}
|
|
3318
|
-
/**
|
|
3319
|
-
* Sends an event to the dashboard for tracking.
|
|
3320
|
-
* Fire-and-forget: never blocks, never throws.
|
|
3321
|
-
* Events are queued if SDK is not configured yet.
|
|
3322
|
-
*/
|
|
3323
|
-
function addEvent(event) {
|
|
3324
|
-
notifySubscribers(event);
|
|
3325
|
-
const token = getToken();
|
|
3326
|
-
if (!isApiConfigured() || !token) {
|
|
3327
|
-
eventsQueue.push(event);
|
|
3328
|
-
return;
|
|
3329
|
-
}
|
|
3330
|
-
const screenForApi = event.screen !== void 0 ? normalizeScreenForInterviewEventsApi(event.screen) : void 0;
|
|
3331
|
-
api.post(endpoints.events, [{
|
|
3332
|
-
code: event.code,
|
|
3333
|
-
module: event.module,
|
|
3334
|
-
screen: screenForApi,
|
|
3335
|
-
clientTimestamp: event.clientTimestamp ?? getTimestamp(),
|
|
3336
|
-
payload: event.payload ?? {}
|
|
3337
|
-
}]).catch(() => {});
|
|
3338
|
-
}
|
|
3339
|
-
/**
|
|
3340
|
-
* Flushes any queued events that were sent before SDK was configured.
|
|
3341
|
-
* Called automatically by setup() after token is set.
|
|
3342
|
-
*/
|
|
3343
|
-
function flushEventQueue() {
|
|
3344
|
-
if (!isApiConfigured() || !getToken()) return;
|
|
3345
|
-
const queuedEvents = [...eventsQueue];
|
|
3346
|
-
eventsQueue.length = 0;
|
|
3347
|
-
for (const event of queuedEvents) addEvent(event);
|
|
3348
|
-
}
|
|
3349
|
-
|
|
3350
|
-
//#endregion
|
|
3351
|
-
//#region src/internal/events/helpers.ts
|
|
3352
|
-
function screenEvent(params) {
|
|
3353
|
-
addEvent({
|
|
3354
|
-
code: params.code,
|
|
3355
|
-
module: params.module,
|
|
3356
|
-
screen: params.screen,
|
|
3357
|
-
clientTimestamp: getTimestamp(),
|
|
3358
|
-
payload: params.payload
|
|
3359
|
-
});
|
|
3360
|
-
}
|
|
3361
|
-
function moduleOpened(module, screen, payload) {
|
|
3362
|
-
screenEvent({
|
|
3363
|
-
module,
|
|
3364
|
-
screen,
|
|
3365
|
-
code: "moduleOpened",
|
|
3366
|
-
payload
|
|
3367
|
-
});
|
|
3368
|
-
}
|
|
3369
|
-
function moduleClosed(module, screen, payload) {
|
|
3370
|
-
screenEvent({
|
|
3371
|
-
module,
|
|
3372
|
-
screen,
|
|
3373
|
-
code: "moduleClosed",
|
|
3374
|
-
payload
|
|
3375
|
-
});
|
|
3376
|
-
}
|
|
3377
|
-
function screenOpened(module, screen, payload) {
|
|
3378
|
-
screenEvent({
|
|
3379
|
-
module,
|
|
3380
|
-
screen,
|
|
3381
|
-
code: "screenOpened",
|
|
3382
|
-
payload
|
|
3383
|
-
});
|
|
3384
|
-
}
|
|
3385
|
-
function screenClosed(module, screen, payload) {
|
|
3386
|
-
screenEvent({
|
|
3387
|
-
module,
|
|
3388
|
-
screen,
|
|
3389
|
-
code: "screenClosed",
|
|
3390
|
-
payload
|
|
3391
|
-
});
|
|
3392
|
-
}
|
|
3393
|
-
function errorTriggered(module, screen, payload) {
|
|
3394
|
-
screenEvent({
|
|
3395
|
-
module,
|
|
3396
|
-
screen,
|
|
3397
|
-
code: "errorTriggered",
|
|
3398
|
-
payload
|
|
3399
|
-
});
|
|
3400
|
-
}
|
|
3401
|
-
function elementClicked(module, screen, payload) {
|
|
3402
|
-
screenEvent({
|
|
3403
|
-
module,
|
|
3404
|
-
screen,
|
|
3405
|
-
code: "elementClicked",
|
|
3406
|
-
payload
|
|
3407
|
-
});
|
|
3408
|
-
}
|
|
3409
|
-
function captureAttemptFinished(module, screen, payload) {
|
|
3410
|
-
screenEvent({
|
|
3411
|
-
module,
|
|
3412
|
-
screen,
|
|
3413
|
-
code: "captureAttemptFinished",
|
|
3414
|
-
payload
|
|
3415
|
-
});
|
|
3416
|
-
}
|
|
3417
|
-
|
|
3418
|
-
//#endregion
|
|
3419
|
-
//#region src/internal/events/managerInstrumentation.ts
|
|
3420
|
-
function normalizeSegment(segment) {
|
|
3421
|
-
if (typeof segment !== "string") return "";
|
|
3422
|
-
return segment.trim().replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
3423
|
-
}
|
|
3424
|
-
function normalizeDottedPath(path) {
|
|
3425
|
-
return path.split("+").map((branch) => branch.split(".").map((segment) => normalizeSegment(segment)).filter((segment) => segment.length > 0).join(".")).filter((branch) => branch.length > 0).join("+");
|
|
3426
|
-
}
|
|
3427
|
-
function stateValueToScreenSegment(value) {
|
|
3428
|
-
if (typeof value === "string" || typeof value === "number") {
|
|
3429
|
-
const segment = normalizeSegment(String(value));
|
|
3430
|
-
return segment.length > 0 ? segment : void 0;
|
|
3431
|
-
}
|
|
3432
|
-
if (typeof value !== "object" || value === null) return;
|
|
3433
|
-
const entries = Object.entries(value).sort(([left], [right]) => {
|
|
3434
|
-
if (left < right) return -1;
|
|
3435
|
-
if (left > right) return 1;
|
|
3436
|
-
return 0;
|
|
3437
|
-
});
|
|
3438
|
-
if (entries.length === 0) return;
|
|
3439
|
-
const branches = entries.map(([key, nestedValue]) => {
|
|
3440
|
-
const normalizedKey = normalizeSegment(key);
|
|
3441
|
-
const nestedSegment = stateValueToScreenSegment(nestedValue);
|
|
3442
|
-
if (normalizedKey.length === 0) return nestedSegment;
|
|
3443
|
-
if (nestedSegment === void 0) return normalizedKey;
|
|
3444
|
-
return `${normalizedKey}.${nestedSegment}`;
|
|
3445
|
-
}).filter((branch) => branch !== void 0 && branch.length > 0);
|
|
3446
|
-
if (branches.length === 0) return;
|
|
3447
|
-
return branches.join("+");
|
|
3448
|
-
}
|
|
3449
|
-
function buildScreenName(moduleName, screenName) {
|
|
3450
|
-
const normalizedModuleName = typeof moduleName === "string" ? moduleName.trim() : "";
|
|
3451
|
-
const normalizedScreen = normalizeDottedPath(screenName);
|
|
3452
|
-
if (normalizedModuleName.length === 0) return normalizedScreen;
|
|
3453
|
-
if (normalizedScreen.length === 0) return normalizedModuleName;
|
|
3454
|
-
return `${normalizedModuleName}.${normalizedScreen}`;
|
|
3455
|
-
}
|
|
3456
|
-
function getDefaultManagerScreenName(snapshot) {
|
|
3457
|
-
return stateValueToScreenSegment(snapshot.value);
|
|
3458
|
-
}
|
|
3459
|
-
function getManagerScreenName(moduleName, snapshot, options) {
|
|
3460
|
-
const mappedScreen = options?.getScreenName?.(snapshot) ?? getDefaultManagerScreenName(snapshot);
|
|
3461
|
-
if (mappedScreen === void 0) return;
|
|
3462
|
-
return buildScreenName(moduleName, mappedScreen);
|
|
3463
|
-
}
|
|
3464
|
-
function isErrorLikeSegment(segment) {
|
|
3465
|
-
return segment === "error" || segment.includes("error") || segment.includes("failed") || segment.includes("failure");
|
|
3466
|
-
}
|
|
3467
|
-
function getDefaultManagerErrorName(snapshot) {
|
|
3468
|
-
const screenSegment = stateValueToScreenSegment(snapshot.value);
|
|
3469
|
-
if (screenSegment === void 0) return;
|
|
3470
|
-
const normalizedSegment = normalizeDottedPath(screenSegment);
|
|
3471
|
-
if (normalizedSegment.length === 0) return;
|
|
3472
|
-
if (normalizedSegment === "error") return "error.unknown";
|
|
3473
|
-
if (!isErrorLikeSegment(normalizedSegment)) return;
|
|
3474
|
-
return `error.${normalizedSegment}`;
|
|
3475
|
-
}
|
|
3476
|
-
function createManagerInstrumentation(moduleName, options) {
|
|
3477
|
-
return {
|
|
3478
|
-
moduleName,
|
|
3479
|
-
onModuleOpened: moduleOpened,
|
|
3480
|
-
onModuleClosed: moduleClosed,
|
|
3481
|
-
onScreenOpened: screenOpened,
|
|
3482
|
-
onScreenClosed: screenClosed,
|
|
3483
|
-
onErrorTriggered: errorTriggered,
|
|
3484
|
-
onElementClicked: (moduleName$1, screenName, payload) => elementClicked(moduleName$1, screenName, payload),
|
|
3485
|
-
onCaptureAttemptFinished: (moduleName$1, screenName, payload) => captureAttemptFinished(moduleName$1, screenName, payload),
|
|
3486
|
-
getScreenName: (snapshot) => getManagerScreenName(moduleName, snapshot, { getScreenName: options?.getScreenName }),
|
|
3487
|
-
getErrorName: (snapshot) => {
|
|
3488
|
-
const mappedError = options?.getErrorName?.(snapshot) ?? getDefaultManagerErrorName(snapshot);
|
|
3489
|
-
if (mappedError === void 0) return;
|
|
3490
|
-
return buildScreenName(moduleName, mappedError);
|
|
3491
|
-
},
|
|
3492
|
-
getErrorPayload: (snapshot) => options?.getErrorPayload?.(snapshot)
|
|
3493
|
-
};
|
|
3494
|
-
}
|
|
3495
|
-
|
|
3496
|
-
//#endregion
|
|
3497
|
-
//#region src/internal/events/types.ts
|
|
3498
|
-
const eventModuleNames = {
|
|
3499
|
-
selfie: "SELFIE",
|
|
3500
|
-
authentication: "AUTHENTICATION",
|
|
3501
|
-
authFace: "AUTH_FACE",
|
|
3502
|
-
mlConsent: "ML_CONSENT",
|
|
3503
|
-
combinedConsent: "COMBINED_CONSENT",
|
|
3504
|
-
curpValidation: "CURP_VALIDATION",
|
|
3505
|
-
faceMatch: "FACE_MATCH",
|
|
3506
|
-
qr: "QR",
|
|
3507
|
-
videoSelfie: "VIDEO_ONBOARDING",
|
|
3508
|
-
passport: "ID",
|
|
3509
|
-
front: "ID",
|
|
3510
|
-
back: "ID",
|
|
3511
|
-
id: "ID",
|
|
3512
|
-
document: "DOCUMENT_CAPTURE",
|
|
3513
|
-
creditCard: "CREDIT_CARD_FRONT",
|
|
3514
|
-
creditCardBack: "CREDIT_CARD_BACK",
|
|
3515
|
-
conference: "CONFERENCE",
|
|
3516
|
-
otp: "OTP",
|
|
3517
|
-
signature: "SIGNATURE",
|
|
3518
|
-
ekyc: "EXTERNAL_VERIFICATION",
|
|
3519
|
-
globalWatchList: "GLOBAL_WATCHLIST",
|
|
3520
|
-
customWatchList: "CUSTOM_WATCHLIST",
|
|
3521
|
-
email: "EMAIL",
|
|
3522
|
-
phone: "PHONE",
|
|
3523
|
-
instantVerifyEmail: "INSTANT_VERIFY_EMAIL",
|
|
3524
|
-
instantVerifyConsent: "INSTANT_VERIFY_CONSENT",
|
|
3525
|
-
forms: "FORMS",
|
|
3526
|
-
customModule: "CUSTOM_MODULE",
|
|
3527
|
-
geolocation: "GEOLOCATION",
|
|
3528
|
-
ekyb: "EKYB",
|
|
3529
|
-
antifraud: "ANTIFRAUD"
|
|
3530
|
-
};
|
|
3531
|
-
const eventScreenNames = {
|
|
3532
|
-
faceMatch: "FACE_MATCH",
|
|
3533
|
-
faceCaptureTutorial: "SELFIE_CAPTURE_TUTORIAL",
|
|
3534
|
-
faceCaptureCamera: "SELFIE_CAMERA_CAPTURE",
|
|
3535
|
-
faceCaptureError: "SELFIE_ATTEMPT_FAILED",
|
|
3536
|
-
faceCaptureSuccess: "SELFIE_UPLOAD_SUCCEEDED",
|
|
3537
|
-
faceCaptureUpload: "SELFIE_UPLOAD_PROGRESS",
|
|
3538
|
-
mlConsent: "MACHINE_LEARNING_CONSENT",
|
|
3539
|
-
combinedConsent: "COMBINED_CONSENT",
|
|
3540
|
-
curpEnter: "ENTER_CURP",
|
|
3541
|
-
curpValidate: "VALIDATE_CURP",
|
|
3542
|
-
curpGenerate: "GENERATE_CURP",
|
|
3543
|
-
curpValidation: "CURP_VALIDATION_PROGRESS",
|
|
3544
|
-
curpValidationFailed: "CURP_VALIDATION_FAILED",
|
|
3545
|
-
curpValidationSuccess: "CURP_VALIDATION_SUCCEEDED",
|
|
3546
|
-
qrTutorial: "QR_TUTORIAL",
|
|
3547
|
-
qrScan: "QR_SCAN",
|
|
3548
|
-
smsOtp: "OTP",
|
|
3549
|
-
simpleOTP: "OTP",
|
|
3550
|
-
signatureInput: "SIGNATURE_INPUT",
|
|
3551
|
-
signatureInitialsInput: "INITIALS_INPUT",
|
|
3552
|
-
frontTutorial: "FRONT_ID_CAPTURE_TUTORIAL",
|
|
3553
|
-
frontCameraCapture: "FRONT_ID_CAMERA_CAPTURE",
|
|
3554
|
-
frontHelp: "FRONT_ID_HELP",
|
|
3555
|
-
frontReviewPhoto: "FRONT_ID_REVIEW_PHOTO",
|
|
3556
|
-
frontUploadProgress: "FRONT_ID_UPLOAD_PROGRESS",
|
|
3557
|
-
frontAttemptFailed: "FRONT_ID_ATTEMPT_FAILED",
|
|
3558
|
-
frontUploadSuccess: "FRONT_ID_UPLOAD_SUCCEEDED",
|
|
3559
|
-
backTutorial: "BACK_ID_CAPTURE_TUTORIAL",
|
|
3560
|
-
backCameraCapture: "BACK_ID_CAMERA_CAPTURE",
|
|
3561
|
-
backReviewPhoto: "BACK_ID_REVIEW_PHOTO",
|
|
3562
|
-
backUploadProgress: "BACK_ID_UPLOAD_PROGRESS",
|
|
3563
|
-
backAttemptFailed: "BACK_ID_ATTEMPT_FAILED",
|
|
3564
|
-
backUploadSuccess: "BACK_ID_UPLOAD_SUCCEEDED",
|
|
3565
|
-
backHelp: "BACK_ID_HELP",
|
|
3566
|
-
passportTutorial: "TUTORIAL_PASSPORT",
|
|
3567
|
-
documentTutorial: "DOCUMENT_CAPTURE_TUTORIAL",
|
|
3568
|
-
documentCameraCapture: "DOCUMENT_CAMERA_CAPTURE",
|
|
3569
|
-
documentHelp: "DOCUMENT_HELP",
|
|
3570
|
-
documentReviewPhoto: "DOCUMENT_REVIEW_PHOTO",
|
|
3571
|
-
documentUploadProgress: "DOCUMENT_UPLOAD_IN_PROGRESS",
|
|
3572
|
-
documentAttemptFailed: "DOCUMENT_ATTEMPT_FAILED",
|
|
3573
|
-
documentUploadSuccess: "DOCUMENT_UPLOAD_SUCCEEDED",
|
|
3574
|
-
conferenceWait: "CONFERENCE_WAIT",
|
|
3575
|
-
conferenceVideoChat: "CONFERENCE_VIDEO_CHAT",
|
|
3576
|
-
conferenceMessageChat: "CONFERENCE_MESSAGE_CHAT",
|
|
3577
|
-
videoSelfieTutorial: "VIDEO_SELFIE_TUTORIAL",
|
|
3578
|
-
videoSelfie: "VIDEO_SELFIE",
|
|
3579
|
-
videoSelfieFaceCapture: "VIDEO_SELFIE_FACE_CAPTURE",
|
|
3580
|
-
videoSelfieFaceUploadProgress: "VIDEO_SELFIE_FACE_UPLOAD_PROGRESS",
|
|
3581
|
-
videoSelfieFaceAttemptFailed: "VIDEO_SELFIE_FACE_ATTEMPT_FAILED",
|
|
3582
|
-
videoSelfieFaceUploadSucceeded: "VIDEO_SELFIE_FACE_UPLOAD_SUCCEEDED",
|
|
3583
|
-
videoSelfieFrontIdCapture: "VIDEO_SELFIE_FRONT_ID_CAPTURE",
|
|
3584
|
-
videoSelfieFrontIdUploadProgress: "VIDEO_SELFIE_FRONT_ID_UPLOAD_PROGRESS",
|
|
3585
|
-
videoSelfieFrontIdAttemptFailed: "VIDEO_SELFIE_FRONT_ID_ATTEMPT_FAILED",
|
|
3586
|
-
videoSelfieFrontIdUploadSucceeded: "VIDEO_SELFIE_FRONT_ID_UPLOAD_SUCCEEDED",
|
|
3587
|
-
videoSelfieBackIdCapture: "VIDEO_SELFIE_BACK_ID_CAPTURE",
|
|
3588
|
-
videoSelfieBackIdUploadProgress: "VIDEO_SELFIE_BACK_ID_UPLOAD_PROGRESS",
|
|
3589
|
-
videoSelfieBackIdAttemptFailed: "VIDEO_SELFIE_BACK_ID_ATTEMPT_FAILED",
|
|
3590
|
-
videoSelfieBackIdUploadSucceeded: "VIDEO_SELFIE_BACK_ID_UPLOAD_SUCCEEDED",
|
|
3591
|
-
videoSelfieDocumentCapture: "VIDEO_SELFIE_DOCUMENT_CAPTURE",
|
|
3592
|
-
videoSelfieVoiceQuestion: "VIDEO_SELFIE_VOICE_QUESTION",
|
|
3593
|
-
videoSelfieVoiceFinalQuestion: "VIDEO_SELFIE_VOICE_FINAL_QUESTION",
|
|
3594
|
-
videoSelfieVideoUpload: "VIDEO SELFIE VIDEO UPLOAD",
|
|
3595
|
-
ekycInput: "EKYC_INPUT",
|
|
3596
|
-
ekycProgress: "EKYC_PROGRESS",
|
|
3597
|
-
ekycSucceeded: "EKYC_SUCCEEDED",
|
|
3598
|
-
ekycFailed: "EKYC_FAILED",
|
|
3599
|
-
forms: "FORMS",
|
|
3600
|
-
globalWatchListInput: "GLOBAL_WATCHLIST_INPUT",
|
|
3601
|
-
globalWatchListProgress: "GLOBAL_WATCHLIST_PROGRESS",
|
|
3602
|
-
globalWatchListSuccess: "GLOBAL_WATCHLIST_SUCCEEDED",
|
|
3603
|
-
globalWatchListFailed: "GLOBAL_WATCHLIST_FAILED",
|
|
3604
|
-
customWatchListInput: "CUSTOM_WATCHLIST_INPUT",
|
|
3605
|
-
customWatchListProgress: "CUSTOM_WATCHLIST_PROGRESS",
|
|
3606
|
-
customWatchListSuccess: "CUSTOM_WATCHLIST_SUCCEEDED",
|
|
3607
|
-
customWatchListFailed: "CUSTOM_WATCHLIST_FAILED",
|
|
3608
|
-
emailInput: "EMAIL_INPUT",
|
|
3609
|
-
phoneInput: "PHONE_INPUT",
|
|
3610
|
-
instantVerify: "INSTANT_VERIFY",
|
|
3611
|
-
authFace: "AUTH_FACE",
|
|
3612
|
-
authFaceError: "AUTH_FACE_ATTEMPT_FAILED",
|
|
3613
|
-
authFaceUpload: "AUTH_FACE_UPLOAD_PROGRESS",
|
|
3614
|
-
authFaceUploadSuccess: "AUTH_FACE_UPLOAD_SUCCEEDED",
|
|
3615
|
-
authFaceUploadFailed: "AUTH_FACE_UPLOAD_FAILED",
|
|
3616
|
-
customModuleCallback: "CUSTOM_MODULE_CALLBACK",
|
|
3617
|
-
customModuleProcessing: "CUSTOM_MODULE_PROCESSING",
|
|
3618
|
-
digitalIdFileSelection: "DIGITAL_ID_FILE_SELECTION",
|
|
3619
|
-
digitalIdFileReview: "DIGITAL_ID_FILE_REVIEW",
|
|
3620
|
-
digitalIdUploadProgress: "DIGITAL_ID_UPLOAD_PROGRESS",
|
|
3621
|
-
digitalIdUploadSuccess: "DIGITAL_ID_UPLOAD_SUCCEEDED",
|
|
3622
|
-
digitalIdUploadFailed: "DIGITAL_ID_UPLOAD_FAILED",
|
|
3623
|
-
digitalIdAnalysisProgress: "DIGITAL_ID_ANALYSIS_PROGRESS",
|
|
3624
|
-
digitalIdVerificationSuccess: "DIGITAL_ID_VERIFICATION_SUCCESS",
|
|
3625
|
-
digitalIdVerificationFailed: "DIGITAL_ID_VERIFICATION_FAILED",
|
|
3626
|
-
ekybForm: "EKYB_FORM"
|
|
3627
|
-
};
|
|
3628
|
-
const videoSelfieEvents = {
|
|
3629
|
-
imageTooBlurry: "imageTooBlurry",
|
|
3630
|
-
fillFrame: "fillFrame",
|
|
3631
|
-
checkCameraOrLighting: "checkCameraOrLighting",
|
|
3632
|
-
frontIdCaptureStarted: "frontIdCaptureStarted",
|
|
3633
|
-
lookAtCamera: "lookAtCamera",
|
|
3634
|
-
moveCloser: "moveCloser",
|
|
3635
|
-
lookingForFrontId: "lookingForFrontId",
|
|
3636
|
-
lookingForBackId: "lookingForBackId",
|
|
3637
|
-
cameraSwitchToBack: "cameraSwitchToBack",
|
|
3638
|
-
cameraSwitchToFront: "cameraSwitchToFront",
|
|
3639
|
-
audioStreamOpened: "audioStreamOpened",
|
|
3640
|
-
audioStreamClosed: "audioStreamClosed",
|
|
3641
|
-
videoSelfieVideoUploadInProgress: "videoSelfieVideoUploadInProgress",
|
|
3642
|
-
videoSelfieTosNotAccepted: "videoSelfieTosNotAccepted",
|
|
3643
|
-
videoSelfieTosAccepted: "videoSelfieTosAccepted",
|
|
3644
|
-
videoSelfieStreamCreated: "videoSelfieStreamCreated",
|
|
3645
|
-
videoSelfieStreamDestroyed: "videoSelfieStreamDestroyed",
|
|
3646
|
-
videoSelfieReconnecting: "videoSelfieReconnecting",
|
|
3647
|
-
videoSelfieReconnected: "videoSelfieReconnected"
|
|
3648
|
-
};
|
|
3649
|
-
const tutorialScreenNamesMapper = {
|
|
3650
|
-
passport: eventScreenNames.passportTutorial,
|
|
3651
|
-
front: eventScreenNames.frontTutorial,
|
|
3652
|
-
back: eventScreenNames.backTutorial,
|
|
3653
|
-
selfie: eventScreenNames.faceCaptureTutorial
|
|
3654
|
-
};
|
|
3655
|
-
const cameraScreenNamesMapper = {
|
|
3656
|
-
front: "front",
|
|
3657
|
-
back: "back",
|
|
3658
|
-
passport: "passport",
|
|
3659
|
-
creditCard: "front",
|
|
3660
|
-
creditCardBack: "back",
|
|
3661
|
-
document: "document"
|
|
3662
|
-
};
|
|
3663
|
-
|
|
3664
|
-
//#endregion
|
|
3665
|
-
//#region ../infra/src/manager/Manager.ts
|
|
3666
|
-
/**
|
|
3667
|
-
* Creates a manager that wraps a state machine actor with a clean public API.
|
|
3668
|
-
*
|
|
3669
|
-
* The manager provides:
|
|
3670
|
-
* - `getState()` - Returns the mapped public state
|
|
3671
|
-
* - `subscribe()` - Listen to state changes
|
|
3672
|
-
* - `stop()` - Stop the actor
|
|
3673
|
-
* - Plus any custom API methods from `createApi`
|
|
3674
|
-
*
|
|
3675
|
-
* @template TMachine - The state machine type
|
|
3676
|
-
* @template TMapState - Function type that maps raw snapshot to public state
|
|
3677
|
-
* @template TCreateApi - Function type that creates the custom API
|
|
3678
|
-
*
|
|
3679
|
-
* @param options - Configuration options
|
|
3680
|
-
* @param options.actor - The started actor instance
|
|
3681
|
-
* @param options.mapState - Function to transform raw snapshot into public state
|
|
3682
|
-
* @param options.createApi - Factory function to create custom API methods
|
|
3683
|
-
*
|
|
3684
|
-
* @returns Combined manager with base methods and custom API
|
|
3685
|
-
*
|
|
3686
|
-
* @example
|
|
3687
|
-
* ```ts
|
|
3688
|
-
* const manager = createManager({
|
|
3689
|
-
* actor: createActor(myMachine).start(),
|
|
3690
|
-
* mapState: (snapshot) => ({ status: snapshot.value }),
|
|
3691
|
-
* createApi: ({ actor }) => ({
|
|
3692
|
-
* doSomething() { actor.send({ type: 'DO_IT' }); }
|
|
3693
|
-
* }),
|
|
3694
|
-
* });
|
|
3695
|
-
* ```
|
|
3696
|
-
*/
|
|
3697
|
-
function createManager(options) {
|
|
3698
|
-
const { actor, mapState, createApi, instrumentation } = options;
|
|
3699
|
-
function getSnapshot() {
|
|
3700
|
-
return actor.getSnapshot();
|
|
3701
|
-
}
|
|
3702
|
-
function getState() {
|
|
3703
|
-
return mapState(getSnapshot());
|
|
3704
|
-
}
|
|
3705
|
-
function subscribe(listener) {
|
|
3706
|
-
const subscription = actor.subscribe(() => {
|
|
3707
|
-
listener(getState());
|
|
3708
|
-
});
|
|
3709
|
-
return () => subscription.unsubscribe();
|
|
3710
|
-
}
|
|
3711
|
-
let currentScreenName = instrumentation.getScreenName(getSnapshot());
|
|
3712
|
-
let currentErrorName = instrumentation.getErrorName(getSnapshot());
|
|
3713
|
-
let currentErrorPayload = instrumentation.getErrorPayload(getSnapshot());
|
|
3714
|
-
const api$1 = createApi({
|
|
3715
|
-
actor,
|
|
3716
|
-
getSnapshot,
|
|
3717
|
-
trackElementClicked: (elementName, payload) => {
|
|
3718
|
-
instrumentation.onElementClicked?.(instrumentation.moduleName, currentScreenName, {
|
|
3719
|
-
element: elementName,
|
|
3720
|
-
action: payload?.action,
|
|
3721
|
-
metadata: payload?.metadata
|
|
3722
|
-
});
|
|
3723
|
-
},
|
|
3724
|
-
trackCaptureAttemptFinished: (payload) => {
|
|
3725
|
-
instrumentation.onCaptureAttemptFinished?.(instrumentation.moduleName, currentScreenName, { logs: payload.logs });
|
|
3726
|
-
}
|
|
3727
|
-
});
|
|
3728
|
-
instrumentation.onModuleOpened(instrumentation.moduleName);
|
|
3729
|
-
if (currentScreenName !== void 0) instrumentation.onScreenOpened(instrumentation.moduleName, currentScreenName);
|
|
3730
|
-
if (currentErrorName !== void 0) instrumentation.onErrorTriggered(instrumentation.moduleName, currentErrorName, currentErrorPayload);
|
|
3731
|
-
const actorSubscription = actor.subscribe((snapshot) => {
|
|
3732
|
-
const nextScreenName = instrumentation.getScreenName(snapshot);
|
|
3733
|
-
const nextErrorName = instrumentation.getErrorName(snapshot);
|
|
3734
|
-
const nextErrorPayload = instrumentation.getErrorPayload(snapshot);
|
|
3735
|
-
if (currentScreenName === nextScreenName) {
|
|
3736
|
-
if (nextErrorName !== void 0 && nextErrorName !== currentErrorName) instrumentation.onErrorTriggered(instrumentation.moduleName, nextErrorName, nextErrorPayload);
|
|
3737
|
-
currentErrorName = nextErrorName;
|
|
3738
|
-
currentErrorPayload = nextErrorPayload;
|
|
3739
|
-
return;
|
|
3740
|
-
}
|
|
3741
|
-
if (currentScreenName !== void 0) instrumentation.onScreenClosed(instrumentation.moduleName, currentScreenName);
|
|
3742
|
-
if (nextScreenName !== void 0) instrumentation.onScreenOpened(instrumentation.moduleName, nextScreenName);
|
|
3743
|
-
currentScreenName = nextScreenName;
|
|
3744
|
-
if (nextErrorName !== void 0 && nextErrorName !== currentErrorName) instrumentation.onErrorTriggered(instrumentation.moduleName, nextErrorName, nextErrorPayload);
|
|
3745
|
-
currentErrorName = nextErrorName;
|
|
3746
|
-
currentErrorPayload = nextErrorPayload;
|
|
3747
|
-
});
|
|
3748
|
-
let isStopped = false;
|
|
3749
|
-
const base = {
|
|
3750
|
-
getState,
|
|
3751
|
-
subscribe,
|
|
3752
|
-
stop() {
|
|
3753
|
-
if (isStopped) return;
|
|
3754
|
-
isStopped = true;
|
|
3755
|
-
actorSubscription.unsubscribe();
|
|
3756
|
-
if (currentScreenName !== void 0) instrumentation.onScreenClosed(instrumentation.moduleName, currentScreenName);
|
|
3757
|
-
currentScreenName = void 0;
|
|
3758
|
-
currentErrorName = void 0;
|
|
3759
|
-
currentErrorPayload = void 0;
|
|
3760
|
-
instrumentation.onModuleClosed(instrumentation.moduleName);
|
|
3761
|
-
actor.stop();
|
|
3762
|
-
}
|
|
3763
|
-
};
|
|
3764
|
-
return Object.defineProperties(base, Object.getOwnPropertyDescriptors(api$1));
|
|
3765
|
-
}
|
|
3766
|
-
|
|
3767
|
-
//#endregion
|
|
3768
|
-
export { createActor as C, fromPromise as S, subscribeEvent as _, tutorialScreenNamesMapper as a, assign as b, captureAttemptFinished as c, moduleOpened as d, screenClosed as f, flushEventQueue as g, addEvent as h, eventScreenNames as i, elementClicked as l, screenOpened as m, cameraScreenNamesMapper as n, videoSelfieEvents as o, screenEvent as p, eventModuleNames as r, createManagerInstrumentation as s, createManager as t, moduleClosed as u, revokeObjectURL as v, fromCallback as x, setup as y };
|
|
3364
|
+
export { createActor as a, fromPromise as i, assign as n, createManager as o, fromCallback as r, setup as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/core",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260407-4677d7f",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -81,6 +81,22 @@
|
|
|
81
81
|
"types": "./dist/session.d.ts",
|
|
82
82
|
"import": "./dist/session.esm.js"
|
|
83
83
|
},
|
|
84
|
+
"./wasm": {
|
|
85
|
+
"types": "./dist/wasm.d.ts",
|
|
86
|
+
"import": "./dist/wasm.esm.js"
|
|
87
|
+
},
|
|
88
|
+
"./device": {
|
|
89
|
+
"types": "./dist/device.d.ts",
|
|
90
|
+
"import": "./dist/device.esm.js"
|
|
91
|
+
},
|
|
92
|
+
"./events": {
|
|
93
|
+
"types": "./dist/events.d.ts",
|
|
94
|
+
"import": "./dist/events.esm.js"
|
|
95
|
+
},
|
|
96
|
+
"./http": {
|
|
97
|
+
"types": "./dist/http.d.ts",
|
|
98
|
+
"import": "./dist/http.esm.js"
|
|
99
|
+
},
|
|
84
100
|
"./extensibility": {
|
|
85
101
|
"types": "./dist/extensibility.d.ts",
|
|
86
102
|
"import": "./dist/extensibility.esm.js"
|
|
@@ -111,7 +127,7 @@
|
|
|
111
127
|
},
|
|
112
128
|
"scripts": {
|
|
113
129
|
"build": "tsdown -c tsdown.config.ts",
|
|
114
|
-
"dev": "tsdown -c tsdown.config.ts
|
|
130
|
+
"build:dev": "tsdown -c tsdown.config.ts",
|
|
115
131
|
"test": "vitest run",
|
|
116
132
|
"coverage": "vitest run --coverage",
|
|
117
133
|
"lint": "eslint .",
|