@incodetech/core 0.0.0-dev-20260320-80a2d6d → 0.0.0-dev-20260323-4991693
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/{addressSearch-BpdtojH_.esm.js → addressSearch-IJq48WDV.esm.js} +2 -2
- package/dist/authentication.esm.js +7 -7
- package/dist/{authenticationManager-Yjdutfo0.esm.js → authenticationManager-DACsi9Bs.esm.js} +4 -10
- package/dist/{backCameraStream-DQY36Tsq.esm.js → backCameraStream-THvMPTG_.esm.js} +1 -1
- package/dist/consent.d.ts +53 -58
- package/dist/consent.esm.js +4 -13
- package/dist/curp-validation.esm.js +18 -59
- package/dist/{deepsightLoader-De-U_lRn.esm.js → deepsightLoader-DfXPJe4B.esm.js} +2 -2
- package/dist/{deepsightService-PlHPx0yD.esm.js → deepsightService-DaDUTB6Q.esm.js} +1 -1
- package/dist/document-capture.d.ts +52 -82
- package/dist/document-capture.esm.js +58 -90
- package/dist/document-upload.d.ts +46 -46
- package/dist/document-upload.esm.js +3 -3
- package/dist/ekyb.esm.js +4 -12
- package/dist/ekyc.esm.js +48 -92
- package/dist/email.esm.js +3 -3
- package/dist/{emailManager-B5pmZ3O4.esm.js → emailManager-DPTdyYgi.esm.js} +5 -16
- package/dist/{events-BKOSYNaw.esm.js → events-BfIbM5SS.esm.js} +49 -3
- package/dist/extensibility.esm.js +11 -11
- package/dist/face-match.esm.js +4 -14
- package/dist/{faceCaptureSetup-BQ7cV8vo.esm.js → faceCaptureSetup-CW_ZDHuU.esm.js} +8 -113
- package/dist/flow.esm.js +2 -2
- package/dist/geolocation.esm.js +5 -21
- package/dist/government-validation.esm.js +2 -2
- package/dist/id.esm.js +6 -6
- package/dist/{idCaptureManager-hbqwL7Qt.esm.js → idCaptureManager-Ctn8I9Rf.esm.js} +41 -126
- package/dist/index.esm.js +6 -6
- package/dist/phone.esm.js +3 -3
- package/dist/{phoneManager-CXYPFfUs.esm.js → phoneManager-BzZI460X.esm.js} +5 -16
- package/dist/{streamingEvents-BNVENF4-.esm.js → recordingsRepository-D5Tfsc2D.esm.js} +2 -15
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/selfie.esm.js +7 -7
- package/dist/{selfieManager-DMnrP5LU.esm.js → selfieManager-BXRLyPy4.esm.js} +7 -15
- package/dist/{src-xUbMTjnz.esm.js → src-D9pJSMO5.esm.js} +12 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { t as getBackCameraStream } from "./backCameraStream-
|
|
3
|
-
import { A as createManager, O as requestCameraAccess, S as StreamCanvasCapture, d as OpenViduRecordingProvider, k as stopCameraStream, p as LocalRecordingProvider, s as FaceDetectionProvider, x as StreamCanvasProcessingSession } from "./src-
|
|
4
|
-
import { a as
|
|
1
|
+
import { _ as assign, g as setup, o as createManagerInstrumentation, v as fromCallback, y as fromPromise } from "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import { t as getBackCameraStream } from "./backCameraStream-THvMPTG_.esm.js";
|
|
3
|
+
import { A as createManager, O as requestCameraAccess, S as StreamCanvasCapture, d as OpenViduRecordingProvider, k as stopCameraStream, p as LocalRecordingProvider, s as FaceDetectionProvider, x as StreamCanvasProcessingSession } from "./src-D9pJSMO5.esm.js";
|
|
4
|
+
import { a as checkPermission, c as getDeviceClass, i as uploadDeepsightVideo, n as startRecording, o as requestPermission, r as stopRecording$1, t as createRecordingSession } from "./recordingsRepository-D5Tfsc2D.esm.js";
|
|
5
5
|
import { r as getToken, t as api } from "./api-3fZO5bmj.esm.js";
|
|
6
6
|
import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
|
|
7
7
|
import { t as addDeviceStats } from "./stats-D76Thmqp.esm.js";
|
|
@@ -325,64 +325,7 @@ async function startRecordingSession(params) {
|
|
|
325
325
|
const connection = await provider.connect({
|
|
326
326
|
sessionToken: session.token,
|
|
327
327
|
stream: clonedStream,
|
|
328
|
-
events: {
|
|
329
|
-
onSessionConnected: (sessionId) => {
|
|
330
|
-
addEvent({
|
|
331
|
-
code: streamingEvents.strSessionDidConnect,
|
|
332
|
-
module: eventModuleNames.selfie,
|
|
333
|
-
payload: {
|
|
334
|
-
message: "Recording session connected",
|
|
335
|
-
sessionId
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
},
|
|
339
|
-
onSessionDisconnected: (sessionId) => {
|
|
340
|
-
addEvent({
|
|
341
|
-
code: streamingEvents.strSessionDidDisconnect,
|
|
342
|
-
module: eventModuleNames.selfie,
|
|
343
|
-
payload: {
|
|
344
|
-
message: "Recording session disconnected",
|
|
345
|
-
sessionId
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
},
|
|
349
|
-
onSessionException: (event) => {
|
|
350
|
-
addEvent({
|
|
351
|
-
code: streamingEvents.strSessionDidFailWithError,
|
|
352
|
-
module: eventModuleNames.selfie,
|
|
353
|
-
payload: {
|
|
354
|
-
message: "Recording session failed due to an error",
|
|
355
|
-
eventName: event.name,
|
|
356
|
-
type: "OpenViduException",
|
|
357
|
-
errorMessage: event.message,
|
|
358
|
-
sessionId: event.sessionId
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
},
|
|
362
|
-
onPublisherCreated: (p) => {
|
|
363
|
-
addEvent({
|
|
364
|
-
code: streamingEvents.strStreamPublisherCreated,
|
|
365
|
-
module: eventModuleNames.selfie,
|
|
366
|
-
payload: {
|
|
367
|
-
message: "Recording publisher created",
|
|
368
|
-
sessionId: p.sessionId,
|
|
369
|
-
streamId: p.streamId
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
},
|
|
373
|
-
onPublisherError: (p) => {
|
|
374
|
-
addEvent({
|
|
375
|
-
code: streamingEvents.strStreamPublisherDidFailWithError,
|
|
376
|
-
module: eventModuleNames.selfie,
|
|
377
|
-
payload: {
|
|
378
|
-
message: "Recording publisher failed due to an error",
|
|
379
|
-
sessionId: p.sessionId,
|
|
380
|
-
streamId: p.streamId,
|
|
381
|
-
error: { message: p.message ?? "Unknown error" }
|
|
382
|
-
}
|
|
383
|
-
});
|
|
384
|
-
}
|
|
385
|
-
}
|
|
328
|
+
events: {}
|
|
386
329
|
});
|
|
387
330
|
await startRecording({
|
|
388
331
|
videoRecordingId: session.videoRecordingId,
|
|
@@ -390,17 +333,6 @@ async function startRecordingSession(params) {
|
|
|
390
333
|
resolution,
|
|
391
334
|
hasAudio
|
|
392
335
|
});
|
|
393
|
-
addEvent({
|
|
394
|
-
code: streamingEvents.strStreamVideoCaptureStart,
|
|
395
|
-
module: eventModuleNames.selfie,
|
|
396
|
-
payload: {
|
|
397
|
-
message: "Recording capture started",
|
|
398
|
-
resolution,
|
|
399
|
-
videoRecordingId: session.videoRecordingId,
|
|
400
|
-
sessionId: session.sessionId,
|
|
401
|
-
streamId: connection.publisher.getStreamId()
|
|
402
|
-
}
|
|
403
|
-
});
|
|
404
336
|
return {
|
|
405
337
|
token: session.token,
|
|
406
338
|
sessionId: session.sessionId,
|
|
@@ -412,40 +344,13 @@ async function startRecordingSession(params) {
|
|
|
412
344
|
}
|
|
413
345
|
async function stopRecording(session) {
|
|
414
346
|
try {
|
|
415
|
-
addEvent({
|
|
416
|
-
code: streamingEvents.strStreamVideoCaptureStop,
|
|
417
|
-
module: eventModuleNames.selfie,
|
|
418
|
-
payload: {
|
|
419
|
-
message: "Recording capture stopped",
|
|
420
|
-
videoRecordingId: session.videoRecordingId,
|
|
421
|
-
sessionId: session.sessionId,
|
|
422
|
-
streamId: session.connection.publisher.getStreamId()
|
|
423
|
-
}
|
|
424
|
-
});
|
|
425
347
|
await stopRecording$1(session.videoRecordingId);
|
|
426
|
-
addEvent({
|
|
427
|
-
code: streamingEvents.strStreamPublisherDestroyed,
|
|
428
|
-
module: eventModuleNames.selfie,
|
|
429
|
-
payload: {
|
|
430
|
-
message: "Recording publisher destroyed",
|
|
431
|
-
sessionId: session.sessionId,
|
|
432
|
-
streamId: session.connection.publisher.getStreamId()
|
|
433
|
-
}
|
|
434
|
-
});
|
|
435
348
|
} finally {
|
|
436
349
|
await session.connection.disconnect();
|
|
437
|
-
addEvent({
|
|
438
|
-
code: streamingEvents.strSessionDidDisconnect,
|
|
439
|
-
module: eventModuleNames.selfie,
|
|
440
|
-
payload: {
|
|
441
|
-
message: "Recording session disconnected",
|
|
442
|
-
sessionId: session.sessionId
|
|
443
|
-
}
|
|
444
|
-
});
|
|
445
350
|
}
|
|
446
351
|
}
|
|
447
352
|
async function initializeDeepsightSession(options) {
|
|
448
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
353
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-DfXPJe4B.esm.js");
|
|
449
354
|
return loadDeepsightSession({
|
|
450
355
|
ds: options.ds,
|
|
451
356
|
storage: options.storage
|
|
@@ -515,10 +420,6 @@ function createRecordingService(params) {
|
|
|
515
420
|
|
|
516
421
|
//#endregion
|
|
517
422
|
//#region src/internal/faceCapture/faceCaptureSetup.ts
|
|
518
|
-
const FACE_CAPTURE_EVENT_CODES = {
|
|
519
|
-
TUTORIAL_SELFIE: "tutorialSelfie",
|
|
520
|
-
CONTINUE: "continue"
|
|
521
|
-
};
|
|
522
423
|
const getAttemptsFromConfig = (config) => {
|
|
523
424
|
return config.captureAttempts ?? config.numberOfAttempts ?? 3;
|
|
524
425
|
};
|
|
@@ -648,13 +549,7 @@ const _faceCaptureMachine = setup({
|
|
|
648
549
|
if ("output" in event) return new StreamCanvasCapture(event.output.stream);
|
|
649
550
|
}
|
|
650
551
|
}),
|
|
651
|
-
trackTutorial: () =>
|
|
652
|
-
addEvent({
|
|
653
|
-
code: FACE_CAPTURE_EVENT_CODES.TUTORIAL_SELFIE,
|
|
654
|
-
module: eventModuleNames.selfie,
|
|
655
|
-
payload: { tutorialSelfie: true }
|
|
656
|
-
});
|
|
657
|
-
},
|
|
552
|
+
trackTutorial: () => void 0,
|
|
658
553
|
trackContinue: () => {},
|
|
659
554
|
resetContext: assign(({ context }) => ({
|
|
660
555
|
stream: void 0,
|
|
@@ -1216,4 +1111,4 @@ const _faceCaptureMachine = setup({
|
|
|
1216
1111
|
const faceCaptureMachine = _faceCaptureMachine;
|
|
1217
1112
|
|
|
1218
1113
|
//#endregion
|
|
1219
|
-
export {
|
|
1114
|
+
export { createFaceCaptureManagerFromActor as a, FACE_ERROR_CODES as i, processFace as n, uploadSelfie as r, faceCaptureMachine as t };
|
package/dist/flow.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { A as createManager } from "./src-
|
|
1
|
+
import { _ as assign, b as createActor, g as setup, o as createManagerInstrumentation, v as fromCallback, y as fromPromise } from "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import { A as createManager } from "./src-D9pJSMO5.esm.js";
|
|
3
3
|
import "./api-3fZO5bmj.esm.js";
|
|
4
4
|
import "./endpoints-Bydn-Ave.esm.js";
|
|
5
5
|
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-Cc1HxYIC.esm.js";
|
package/dist/geolocation.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { A as createManager, F as isAndroid, L as isIOS, b as BrowserGeolocationProvider } from "./src-
|
|
1
|
+
import { _ as assign, b as createActor, g as setup, n as eventModuleNames, o as createManagerInstrumentation, y as fromPromise } from "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import { A as createManager, F as isAndroid, L as isIOS, b as BrowserGeolocationProvider } from "./src-D9pJSMO5.esm.js";
|
|
3
3
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
|
|
5
5
|
|
|
@@ -48,19 +48,7 @@ const geolocationMachine = setup({
|
|
|
48
48
|
coords: void 0,
|
|
49
49
|
location: void 0,
|
|
50
50
|
deviceType: detectDeviceType()
|
|
51
|
-
}))
|
|
52
|
-
trackComplete: () => {
|
|
53
|
-
addEvent({
|
|
54
|
-
code: "complete",
|
|
55
|
-
module: eventModuleNames.geolocation
|
|
56
|
-
});
|
|
57
|
-
},
|
|
58
|
-
trackSkip: () => {
|
|
59
|
-
addEvent({
|
|
60
|
-
code: "skip",
|
|
61
|
-
module: eventModuleNames.geolocation
|
|
62
|
-
});
|
|
63
|
-
}
|
|
51
|
+
}))
|
|
64
52
|
},
|
|
65
53
|
guards: { canSkip: ({ context }) => context.config.allowSkip === true }
|
|
66
54
|
}).createMachine({
|
|
@@ -104,14 +92,10 @@ const geolocationMachine = setup({
|
|
|
104
92
|
actions: assign({ location: () => "Unknown" })
|
|
105
93
|
}
|
|
106
94
|
} },
|
|
107
|
-
locationAcquired: { on: { CONTINUE: {
|
|
108
|
-
target: "finished",
|
|
109
|
-
actions: "trackComplete"
|
|
110
|
-
} } },
|
|
95
|
+
locationAcquired: { on: { CONTINUE: { target: "finished" } } },
|
|
111
96
|
permissionDenied: { on: { SKIP: {
|
|
112
97
|
target: "finished",
|
|
113
|
-
guard: "canSkip"
|
|
114
|
-
actions: "trackSkip"
|
|
98
|
+
guard: "canSkip"
|
|
115
99
|
} } },
|
|
116
100
|
finished: { type: "final" }
|
|
117
101
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { A as createManager, g as BrowserTimerProvider } from "./src-
|
|
1
|
+
import { _ as assign, b as createActor, g as setup, o as createManagerInstrumentation, v as fromCallback, y as fromPromise } from "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import { A as createManager, g as BrowserTimerProvider } from "./src-D9pJSMO5.esm.js";
|
|
3
3
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
|
|
5
5
|
|
package/dist/id.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./events-
|
|
2
|
-
import "./backCameraStream-
|
|
3
|
-
import "./src-
|
|
4
|
-
import "./
|
|
5
|
-
import "./deepsightService-
|
|
1
|
+
import "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import "./backCameraStream-THvMPTG_.esm.js";
|
|
3
|
+
import "./src-D9pJSMO5.esm.js";
|
|
4
|
+
import "./recordingsRepository-D5Tfsc2D.esm.js";
|
|
5
|
+
import "./deepsightService-DaDUTB6Q.esm.js";
|
|
6
6
|
import "./api-3fZO5bmj.esm.js";
|
|
7
7
|
import "./endpoints-Bydn-Ave.esm.js";
|
|
8
|
-
import { a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, i as idCaptureMachine, l as stopStream, o as processId, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage } from "./idCaptureManager-
|
|
8
|
+
import { a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, i as idCaptureMachine, l as stopStream, o as processId, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage } from "./idCaptureManager-Ctn8I9Rf.esm.js";
|
|
9
9
|
import "./stats-D76Thmqp.esm.js";
|
|
10
10
|
import "./id-r_CoQ3r-.esm.js";
|
|
11
11
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { t as getBackCameraStream } from "./backCameraStream-
|
|
3
|
-
import { A as createManager, I as isDesktop, N as getWindowDimensions, S as StreamCanvasCapture, T as IncodeCanvas, _ as BrowserStorageProvider, d as OpenViduRecordingProvider, g as BrowserTimerProvider, h as FingerprintProvider, i as DEFAULT_ID_CAPTURE_THRESHOLDS, m as IpifyProvider, o as IdCaptureProvider, r as DEFAULT_ID_CAPTURE_MODEL_VERSION, v as BrowserInfoProvider, x as StreamCanvasProcessingSession, y as BrowserEnvironmentProvider } from "./src-
|
|
4
|
-
import {
|
|
5
|
-
import { n as isBrowserSimulation } from "./deepsightService-
|
|
1
|
+
import { _ as assign, b as createActor, g as setup, n as eventModuleNames, o as createManagerInstrumentation, p as addEvent, s as getDefaultManagerScreenName, v as fromCallback, x as revokeObjectURL, y as fromPromise } from "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import { t as getBackCameraStream } from "./backCameraStream-THvMPTG_.esm.js";
|
|
3
|
+
import { A as createManager, I as isDesktop, N as getWindowDimensions, S as StreamCanvasCapture, T as IncodeCanvas, _ as BrowserStorageProvider, d as OpenViduRecordingProvider, g as BrowserTimerProvider, h as FingerprintProvider, i as DEFAULT_ID_CAPTURE_THRESHOLDS, m as IpifyProvider, o as IdCaptureProvider, r as DEFAULT_ID_CAPTURE_MODEL_VERSION, v as BrowserInfoProvider, x as StreamCanvasProcessingSession, y as BrowserEnvironmentProvider } from "./src-D9pJSMO5.esm.js";
|
|
4
|
+
import { a as checkPermission, c as getDeviceClass, n as startRecording, o as requestPermission, r as stopRecording$1, t as createRecordingSession } from "./recordingsRepository-D5Tfsc2D.esm.js";
|
|
5
|
+
import { n as isBrowserSimulation } from "./deepsightService-DaDUTB6Q.esm.js";
|
|
6
6
|
import { n as getApi, r as getToken, t as api } from "./api-3fZO5bmj.esm.js";
|
|
7
7
|
import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
|
|
8
8
|
import { t as addDeviceStats } from "./stats-D76Thmqp.esm.js";
|
|
@@ -408,11 +408,6 @@ async function getExtraImages(params) {
|
|
|
408
408
|
const getRealQualityValue = (value) => (1 - value) * 100;
|
|
409
409
|
async function uploadIdImage(params) {
|
|
410
410
|
const { type, image, onProgress, signal, metadata, ageAssurance, glare, sharpness, shouldSkipGlareBack, analyticsProvider, imageData, isSecondId, onlyFront } = params;
|
|
411
|
-
addEvent({
|
|
412
|
-
code: "captureAttemptFinished",
|
|
413
|
-
module: eventModuleNames.id,
|
|
414
|
-
payload: { logs: [] }
|
|
415
|
-
});
|
|
416
411
|
let finalMetadata = metadata;
|
|
417
412
|
if (analyticsProvider && imageData) try {
|
|
418
413
|
await analyticsProvider.analyzeFrame(imageData);
|
|
@@ -497,64 +492,7 @@ async function startRecordingSession(params) {
|
|
|
497
492
|
const connection = await provider.connect({
|
|
498
493
|
sessionToken: session.token,
|
|
499
494
|
stream: clonedStream,
|
|
500
|
-
events: {
|
|
501
|
-
onSessionConnected: (sessionId) => {
|
|
502
|
-
addEvent({
|
|
503
|
-
code: streamingEvents.strSessionDidConnect,
|
|
504
|
-
module: eventModuleNames.id,
|
|
505
|
-
payload: {
|
|
506
|
-
message: "Recording session connected",
|
|
507
|
-
sessionId
|
|
508
|
-
}
|
|
509
|
-
});
|
|
510
|
-
},
|
|
511
|
-
onSessionDisconnected: (sessionId) => {
|
|
512
|
-
addEvent({
|
|
513
|
-
code: streamingEvents.strSessionDidDisconnect,
|
|
514
|
-
module: eventModuleNames.id,
|
|
515
|
-
payload: {
|
|
516
|
-
message: "Recording session disconnected",
|
|
517
|
-
sessionId
|
|
518
|
-
}
|
|
519
|
-
});
|
|
520
|
-
},
|
|
521
|
-
onSessionException: (event) => {
|
|
522
|
-
addEvent({
|
|
523
|
-
code: streamingEvents.strSessionDidFailWithError,
|
|
524
|
-
module: eventModuleNames.id,
|
|
525
|
-
payload: {
|
|
526
|
-
message: "Recording session failed due to an error",
|
|
527
|
-
eventName: event.name,
|
|
528
|
-
type: "OpenViduException",
|
|
529
|
-
errorMessage: event.message,
|
|
530
|
-
sessionId: event.sessionId
|
|
531
|
-
}
|
|
532
|
-
});
|
|
533
|
-
},
|
|
534
|
-
onPublisherCreated: (p) => {
|
|
535
|
-
addEvent({
|
|
536
|
-
code: streamingEvents.strStreamPublisherCreated,
|
|
537
|
-
module: eventModuleNames.id,
|
|
538
|
-
payload: {
|
|
539
|
-
message: "Recording publisher created",
|
|
540
|
-
sessionId: p.sessionId,
|
|
541
|
-
streamId: p.streamId
|
|
542
|
-
}
|
|
543
|
-
});
|
|
544
|
-
},
|
|
545
|
-
onPublisherError: (p) => {
|
|
546
|
-
addEvent({
|
|
547
|
-
code: streamingEvents.strStreamPublisherDidFailWithError,
|
|
548
|
-
module: eventModuleNames.id,
|
|
549
|
-
payload: {
|
|
550
|
-
message: "Recording publisher failed due to an error",
|
|
551
|
-
sessionId: p.sessionId,
|
|
552
|
-
streamId: p.streamId,
|
|
553
|
-
error: { message: p.message ?? "Unknown error" }
|
|
554
|
-
}
|
|
555
|
-
});
|
|
556
|
-
}
|
|
557
|
-
}
|
|
495
|
+
events: {}
|
|
558
496
|
});
|
|
559
497
|
await startRecording({
|
|
560
498
|
videoRecordingId: session.videoRecordingId,
|
|
@@ -562,17 +500,6 @@ async function startRecordingSession(params) {
|
|
|
562
500
|
resolution,
|
|
563
501
|
hasAudio
|
|
564
502
|
});
|
|
565
|
-
addEvent({
|
|
566
|
-
code: streamingEvents.strStreamVideoCaptureStart,
|
|
567
|
-
module: eventModuleNames.id,
|
|
568
|
-
payload: {
|
|
569
|
-
message: "Recording capture started",
|
|
570
|
-
resolution,
|
|
571
|
-
videoRecordingId: session.videoRecordingId,
|
|
572
|
-
sessionId: session.sessionId,
|
|
573
|
-
streamId: connection.publisher.getStreamId()
|
|
574
|
-
}
|
|
575
|
-
});
|
|
576
503
|
return {
|
|
577
504
|
token: session.token,
|
|
578
505
|
sessionId: session.sessionId,
|
|
@@ -585,36 +512,9 @@ async function startRecordingSession(params) {
|
|
|
585
512
|
function stopRecording(session) {
|
|
586
513
|
(async () => {
|
|
587
514
|
try {
|
|
588
|
-
addEvent({
|
|
589
|
-
code: streamingEvents.strStreamVideoCaptureStop,
|
|
590
|
-
module: eventModuleNames.id,
|
|
591
|
-
payload: {
|
|
592
|
-
message: "Recording capture stopped",
|
|
593
|
-
videoRecordingId: session.videoRecordingId,
|
|
594
|
-
sessionId: session.sessionId,
|
|
595
|
-
streamId: session.connection.publisher.getStreamId()
|
|
596
|
-
}
|
|
597
|
-
});
|
|
598
515
|
await stopRecording$1(session.videoRecordingId);
|
|
599
|
-
addEvent({
|
|
600
|
-
code: streamingEvents.strStreamPublisherDestroyed,
|
|
601
|
-
module: eventModuleNames.id,
|
|
602
|
-
payload: {
|
|
603
|
-
message: "Recording publisher destroyed",
|
|
604
|
-
sessionId: session.sessionId,
|
|
605
|
-
streamId: session.connection.publisher.getStreamId()
|
|
606
|
-
}
|
|
607
|
-
});
|
|
608
516
|
} finally {
|
|
609
517
|
await session.connection.disconnect();
|
|
610
|
-
addEvent({
|
|
611
|
-
code: streamingEvents.strSessionDidDisconnect,
|
|
612
|
-
module: eventModuleNames.id,
|
|
613
|
-
payload: {
|
|
614
|
-
message: "Recording session disconnected",
|
|
615
|
-
sessionId: session.sessionId
|
|
616
|
-
}
|
|
617
|
-
});
|
|
618
518
|
}
|
|
619
519
|
})();
|
|
620
520
|
}
|
|
@@ -922,7 +822,7 @@ const checkMotionSensorActor = fromCallback(({ input, sendBack }) => {
|
|
|
922
822
|
});
|
|
923
823
|
const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
|
|
924
824
|
if (!input.dependencies) return;
|
|
925
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
825
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-DfXPJe4B.esm.js");
|
|
926
826
|
return loadDeepsightSession({
|
|
927
827
|
ds: input.ds,
|
|
928
828
|
storage: input.dependencies.storage,
|
|
@@ -961,22 +861,9 @@ function performResetForFrontCapture(context) {
|
|
|
961
861
|
function performResetDetection(context) {
|
|
962
862
|
context.resetDetection?.();
|
|
963
863
|
}
|
|
964
|
-
function performTrackTutorialId() {
|
|
965
|
-
addEvent({
|
|
966
|
-
code: "tutorialVideoStarted",
|
|
967
|
-
module: eventModuleNames.id,
|
|
968
|
-
payload: { tutorialFrontID: true }
|
|
969
|
-
});
|
|
970
|
-
}
|
|
864
|
+
function performTrackTutorialId() {}
|
|
971
865
|
function performTrackContinue() {}
|
|
972
|
-
function performTrackCameraId(context) {
|
|
973
|
-
const isBack = context.currentMode === "back";
|
|
974
|
-
addEvent({
|
|
975
|
-
code: isBack ? "cameraBackId" : "cameraFrontId",
|
|
976
|
-
module: eventModuleNames.id,
|
|
977
|
-
payload: isBack ? { cameraBackId: true } : { cameraFrontId: true }
|
|
978
|
-
});
|
|
979
|
-
}
|
|
866
|
+
function performTrackCameraId(context) {}
|
|
980
867
|
function performStopMediaRecording(context) {
|
|
981
868
|
if (context.recordingSession) stopRecording(context.recordingSession);
|
|
982
869
|
}
|
|
@@ -1316,13 +1203,13 @@ const _idCaptureMachine = setup({
|
|
|
1316
1203
|
frameCapturer: ({ event }) => getFrameCapturerFromEvent(event)
|
|
1317
1204
|
}),
|
|
1318
1205
|
trackTutorialId: () => {
|
|
1319
|
-
performTrackTutorialId();
|
|
1206
|
+
/* @__PURE__ */ performTrackTutorialId();
|
|
1320
1207
|
},
|
|
1321
1208
|
trackContinue: () => {
|
|
1322
1209
|
/* @__PURE__ */ performTrackContinue();
|
|
1323
1210
|
},
|
|
1324
1211
|
trackCameraId: ({ context }) => {
|
|
1325
|
-
performTrackCameraId(context);
|
|
1212
|
+
/* @__PURE__ */ performTrackCameraId(context);
|
|
1326
1213
|
},
|
|
1327
1214
|
resetContext: assign(({ context }) => getResetContextValues(context)),
|
|
1328
1215
|
resetDetection: ({ context }) => {
|
|
@@ -2261,12 +2148,40 @@ function createApi({ actor }) {
|
|
|
2261
2148
|
}
|
|
2262
2149
|
};
|
|
2263
2150
|
}
|
|
2151
|
+
function getTopLevelStateValue(value) {
|
|
2152
|
+
if (typeof value === "string") return value;
|
|
2153
|
+
if (typeof value !== "object" || value === null) return;
|
|
2154
|
+
const [topLevelState] = Object.keys(value);
|
|
2155
|
+
return topLevelState;
|
|
2156
|
+
}
|
|
2157
|
+
const SIDE_AWARE_STATES = new Set([
|
|
2158
|
+
"tutorial",
|
|
2159
|
+
"capture",
|
|
2160
|
+
"frontFinished",
|
|
2161
|
+
"backFinished",
|
|
2162
|
+
"processing",
|
|
2163
|
+
"expired",
|
|
2164
|
+
"finished",
|
|
2165
|
+
"error"
|
|
2166
|
+
]);
|
|
2167
|
+
function getIdCaptureScreenName(snapshot) {
|
|
2168
|
+
const baseScreen = getDefaultManagerScreenName(snapshot);
|
|
2169
|
+
if (baseScreen === void 0) return;
|
|
2170
|
+
const topLevelState = getTopLevelStateValue(snapshot.value);
|
|
2171
|
+
if (topLevelState === void 0 || !SIDE_AWARE_STATES.has(topLevelState)) return baseScreen;
|
|
2172
|
+
const side = snapshot.context.currentMode;
|
|
2173
|
+
if (side !== "front" && side !== "back" && side !== "passport") return baseScreen;
|
|
2174
|
+
return `${side}.${baseScreen}`;
|
|
2175
|
+
}
|
|
2176
|
+
function mapIdCaptureScreenName(snapshot) {
|
|
2177
|
+
return getIdCaptureScreenName(snapshot);
|
|
2178
|
+
}
|
|
2264
2179
|
function createIdCaptureManager(options) {
|
|
2265
2180
|
return createManager({
|
|
2266
2181
|
actor: createIdCaptureActor(options),
|
|
2267
2182
|
mapState,
|
|
2268
2183
|
createApi,
|
|
2269
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.id)
|
|
2184
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.id, { getScreenName: mapIdCaptureScreenName })
|
|
2270
2185
|
});
|
|
2271
2186
|
}
|
|
2272
2187
|
function createIdCaptureManagerFromActor(actor) {
|
|
@@ -2274,7 +2189,7 @@ function createIdCaptureManagerFromActor(actor) {
|
|
|
2274
2189
|
actor,
|
|
2275
2190
|
mapState,
|
|
2276
2191
|
createApi,
|
|
2277
|
-
instrumentation: createManagerInstrumentation(eventModuleNames.id)
|
|
2192
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.id, { getScreenName: mapIdCaptureScreenName })
|
|
2278
2193
|
});
|
|
2279
2194
|
}
|
|
2280
2195
|
|
package/dist/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as videoSelfieEvents, c as
|
|
2
|
-
import "./backCameraStream-
|
|
3
|
-
import { R as isIPad, a as WasmUtilProvider, c as warmupWasm, j as createApi_default, n as buildDefaultWasmConfig, t as DEFAULT_WASM_VERSION, u as ScreenOrientationProvider } from "./src-
|
|
4
|
-
import {
|
|
5
|
-
import "./deepsightService-
|
|
1
|
+
import { a as videoSelfieEvents, c as moduleClosed, d as screenEvent, f as screenOpened, h as subscribeEvent, i as tutorialScreenNamesMapper, l as moduleOpened, m as flushEventQueue, n as eventModuleNames, p as addEvent, r as eventScreenNames, t as cameraScreenNamesMapper, u as screenClosed } from "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import "./backCameraStream-THvMPTG_.esm.js";
|
|
3
|
+
import { R as isIPad, a as WasmUtilProvider, c as warmupWasm, j as createApi_default, n as buildDefaultWasmConfig, t as DEFAULT_WASM_VERSION, u as ScreenOrientationProvider } from "./src-D9pJSMO5.esm.js";
|
|
4
|
+
import { a as checkPermission, c as getDeviceClass, l as getBrowser, o as requestPermission, s as createScreenOrientationObserver } from "./recordingsRepository-D5Tfsc2D.esm.js";
|
|
5
|
+
import "./deepsightService-DaDUTB6Q.esm.js";
|
|
6
6
|
import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-3fZO5bmj.esm.js";
|
|
7
7
|
import "./endpoints-Bydn-Ave.esm.js";
|
|
8
|
-
import { _ as resetSessionInit, a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, g as isSessionInitialized, h as initializeSession, i as idCaptureMachine, l as stopStream, m as getSessionFeatures, o as processId, p as getDisableIpify, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage, v as createSession } from "./idCaptureManager-
|
|
8
|
+
import { _ as resetSessionInit, a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, g as isSessionInitialized, h as initializeSession, i as idCaptureMachine, l as stopStream, m as getSessionFeatures, o as processId, p as getDisableIpify, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage, v as createSession } from "./idCaptureManager-Ctn8I9Rf.esm.js";
|
|
9
9
|
import "./stats-D76Thmqp.esm.js";
|
|
10
10
|
import "./id-r_CoQ3r-.esm.js";
|
|
11
11
|
|
package/dist/phone.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import "./events-
|
|
2
|
-
import "./src-
|
|
1
|
+
import "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import "./src-D9pJSMO5.esm.js";
|
|
3
3
|
import "./api-3fZO5bmj.esm.js";
|
|
4
4
|
import "./endpoints-Bydn-Ave.esm.js";
|
|
5
|
-
import { r as phoneMachine, t as createPhoneManager } from "./phoneManager-
|
|
5
|
+
import { r as phoneMachine, t as createPhoneManager } from "./phoneManager-BzZI460X.esm.js";
|
|
6
6
|
|
|
7
7
|
export { createPhoneManager, phoneMachine };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { A as createManager, g as BrowserTimerProvider } from "./src-
|
|
1
|
+
import { _ as assign, b as createActor, g as setup, n as eventModuleNames, o as createManagerInstrumentation, v as fromCallback, y as fromPromise } from "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import { A as createManager, g as BrowserTimerProvider } from "./src-D9pJSMO5.esm.js";
|
|
3
3
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
|
|
5
5
|
|
|
@@ -152,14 +152,7 @@ const phoneMachine = setup({
|
|
|
152
152
|
attemptsRemaining: context.config.maxOtpAttempts ?? 3,
|
|
153
153
|
resendTimer: 0,
|
|
154
154
|
resendTimerActive: false
|
|
155
|
-
}))
|
|
156
|
-
sendPhoneSubmitEvent: () => {
|
|
157
|
-
addEvent({
|
|
158
|
-
code: "continue",
|
|
159
|
-
module: eventModuleNames.phone,
|
|
160
|
-
screen: eventScreenNames.phoneInput
|
|
161
|
-
});
|
|
162
|
-
}
|
|
155
|
+
}))
|
|
163
156
|
},
|
|
164
157
|
guards: {
|
|
165
158
|
hasPrefill: ({ context }) => context.config.prefill,
|
|
@@ -232,12 +225,8 @@ const phoneMachine = setup({
|
|
|
232
225
|
}),
|
|
233
226
|
onDone: [{
|
|
234
227
|
target: "sendingOtp",
|
|
235
|
-
guard: "hasOtpVerification"
|
|
236
|
-
|
|
237
|
-
}, {
|
|
238
|
-
target: "finished",
|
|
239
|
-
actions: "sendPhoneSubmitEvent"
|
|
240
|
-
}],
|
|
228
|
+
guard: "hasOtpVerification"
|
|
229
|
+
}, { target: "finished" }],
|
|
241
230
|
onError: {
|
|
242
231
|
target: "inputting",
|
|
243
232
|
actions: "setPhoneError"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as queryCameraPermission, M as getDeviceInfo, O as requestCameraAccess, P as getUserAgent, R as isIPad, f as MotionSensorProvider, k as stopCameraStream } from "./src-
|
|
1
|
+
import { C as queryCameraPermission, M as getDeviceInfo, O as requestCameraAccess, P as getUserAgent, R as isIPad, f as MotionSensorProvider, k as stopCameraStream } from "./src-D9pJSMO5.esm.js";
|
|
2
2
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
3
3
|
import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
|
|
4
4
|
|
|
@@ -106,17 +106,4 @@ async function uploadDeepsightVideo(encryptedVideo, token) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
//#endregion
|
|
109
|
-
|
|
110
|
-
const streamingEvents = {
|
|
111
|
-
strSessionDidConnect: "strSessionDidConnect",
|
|
112
|
-
strSessionDidDisconnect: "strSessionDidDisconnect",
|
|
113
|
-
strSessionDidFailWithError: "strSessionDidFailWithError",
|
|
114
|
-
strStreamVideoCaptureStart: "strStreamVideoCaptureStart",
|
|
115
|
-
strStreamVideoCaptureStop: "strStreamVideoCaptureStop",
|
|
116
|
-
strStreamPublisherCreated: "strStreamPublisherCreated",
|
|
117
|
-
strStreamPublisherDestroyed: "strStreamPublisherDestroyed",
|
|
118
|
-
strStreamPublisherDidFailWithError: "strStreamPublisherDidFailWithError"
|
|
119
|
-
};
|
|
120
|
-
|
|
121
|
-
//#endregion
|
|
122
|
-
export { uploadDeepsightVideo as a, createScreenOrientationObserver as c, stopRecording as i, getDeviceClass as l, createRecordingSession as n, checkPermission as o, startRecording as r, requestPermission as s, streamingEvents as t, getBrowser as u };
|
|
109
|
+
export { checkPermission as a, getDeviceClass as c, uploadDeepsightVideo as i, getBrowser as l, startRecording as n, requestPermission as o, stopRecording as r, createScreenOrientationObserver as s, createRecordingSession as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { A as createManager, g as BrowserTimerProvider } from "./src-
|
|
1
|
+
import { _ as assign, b as createActor, g as setup, n as eventModuleNames, o as createManagerInstrumentation, v as fromCallback, y as fromPromise } from "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import { A as createManager, g as BrowserTimerProvider } from "./src-D9pJSMO5.esm.js";
|
|
3
3
|
import { t as api } from "./api-3fZO5bmj.esm.js";
|
|
4
4
|
import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
|
|
5
5
|
|
package/dist/selfie.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import "./events-
|
|
2
|
-
import "./backCameraStream-
|
|
3
|
-
import "./src-
|
|
4
|
-
import "./
|
|
5
|
-
import "./deepsightService-
|
|
1
|
+
import "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import "./backCameraStream-THvMPTG_.esm.js";
|
|
3
|
+
import "./src-D9pJSMO5.esm.js";
|
|
4
|
+
import "./recordingsRepository-D5Tfsc2D.esm.js";
|
|
5
|
+
import "./deepsightService-DaDUTB6Q.esm.js";
|
|
6
6
|
import "./api-3fZO5bmj.esm.js";
|
|
7
7
|
import "./endpoints-Bydn-Ave.esm.js";
|
|
8
8
|
import "./stats-D76Thmqp.esm.js";
|
|
9
|
-
import {
|
|
10
|
-
import { r as selfieMachine, t as createSelfieManager } from "./selfieManager-
|
|
9
|
+
import { n as processFace } from "./faceCaptureSetup-CW_ZDHuU.esm.js";
|
|
10
|
+
import { r as selfieMachine, t as createSelfieManager } from "./selfieManager-BXRLyPy4.esm.js";
|
|
11
11
|
|
|
12
12
|
export { createSelfieManager, processFace, selfieMachine };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as BrowserStorageProvider, a as WasmUtilProvider } from "./src-
|
|
3
|
-
import { a as
|
|
1
|
+
import { _ as assign, b as createActor, n as eventModuleNames, y as fromPromise } from "./events-BfIbM5SS.esm.js";
|
|
2
|
+
import { _ as BrowserStorageProvider, a as WasmUtilProvider } from "./src-D9pJSMO5.esm.js";
|
|
3
|
+
import { a as createFaceCaptureManagerFromActor, i as FACE_ERROR_CODES, n as processFace, r as uploadSelfie, t as faceCaptureMachine } from "./faceCaptureSetup-CW_ZDHuU.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/selfie/selfieErrorUtils.ts
|
|
6
6
|
const FACE_ERROR_CODE_VALUES = Object.values(FACE_ERROR_CODES);
|
|
@@ -32,18 +32,10 @@ const _selfieMachine = faceCaptureMachine.provide({
|
|
|
32
32
|
return processFace("selfie", signal);
|
|
33
33
|
})
|
|
34
34
|
},
|
|
35
|
-
actions: {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
module: eventModuleNames.selfie
|
|
40
|
-
});
|
|
41
|
-
},
|
|
42
|
-
setUploadErrorFromUploadValidation: assign({ uploadError: ({ context }) => validateUploadResponse({
|
|
43
|
-
config: context.config,
|
|
44
|
-
response: context.uploadResponse
|
|
45
|
-
}) ?? FACE_ERROR_CODES.SERVER })
|
|
46
|
-
},
|
|
35
|
+
actions: { setUploadErrorFromUploadValidation: assign({ uploadError: ({ context }) => validateUploadResponse({
|
|
36
|
+
config: context.config,
|
|
37
|
+
response: context.uploadResponse
|
|
38
|
+
}) ?? FACE_ERROR_CODES.SERVER }) },
|
|
47
39
|
guards: {
|
|
48
40
|
hasUploadValidationError: ({ context }) => validateUploadResponse({
|
|
49
41
|
config: context.config,
|