@incodetech/core 0.0.0-dev-20260505-e06a25f → 0.0.0-dev-20260505-4dd3003
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-BTKqWpeB.esm.js → BaseWasmProvider-CkIHbYdx.esm.js} +112 -60
- package/dist/{WasmUtilProvider-DqCiPXV6.esm.js → WasmUtilProvider-DsAa3yqJ.esm.js} +1 -1
- package/dist/{addressSearch-CGORc_Ur.esm.js → addressSearch-B-gRk55b.esm.js} +2 -2
- package/dist/{ae-signature-BHcbLPOX.esm.js → ae-signature-CD2xVkh6.esm.js} +1 -1
- package/dist/ae-signature.d.ts +1 -1
- package/dist/ae-signature.esm.js +4 -4
- package/dist/antifraud.esm.js +3 -3
- package/dist/{antifraudStateMachine-DAo-TkJ8.esm.js → antifraudStateMachine-BpA9DsDL.esm.js} +2 -2
- package/dist/authentication.d.ts +2 -2
- package/dist/authentication.esm.js +9 -9
- package/dist/{authenticationManager-DzBrRrX7.esm.js → authenticationManager-BlExOsgX.esm.js} +7 -7
- package/dist/{authenticationManager-DBgL1B8m.d.ts → authenticationManager-D53H93OW.d.ts} +1 -1
- package/dist/{authenticationStateMachine-Dg19Awyc.esm.js → authenticationStateMachine-B2KkS-0r.esm.js} +4 -4
- package/dist/consent.d.ts +50 -50
- package/dist/consent.esm.js +3 -3
- package/dist/{consentStateMachine-BVxTa1A4.esm.js → consentStateMachine-DSGt1SyM.esm.js} +2 -2
- package/dist/cpf-ocr.d.ts +20 -20
- package/dist/cpf-ocr.esm.js +2 -2
- package/dist/cross-document-data-match.esm.js +2 -2
- package/dist/curp-validation.esm.js +3 -3
- package/dist/{curpValidationStateMachine-Cm2EjX_L.esm.js → curpValidationStateMachine-B_cFIz9T.esm.js} +2 -2
- package/dist/custom-fields.esm.js +2 -2
- package/dist/custom-watchlist.esm.js +3 -3
- package/dist/{deepsightLoader-BnMFKE9b.esm.js → deepsightLoader-nn8-Chjr.esm.js} +2 -2
- package/dist/document-capture.d.ts +77 -77
- package/dist/document-capture.esm.js +3 -3
- package/dist/document-upload.d.ts +46 -46
- package/dist/document-upload.esm.js +2 -2
- package/dist/{documentCaptureStateMachine-Jwp09yGJ.esm.js → documentCaptureStateMachine-DWZUY2Aw.esm.js} +2 -2
- package/dist/ekyb.esm.js +6 -6
- package/dist/{ekybStateMachine-6pezQvlL.esm.js → ekybStateMachine-BLfzFOAD.esm.js} +4 -4
- package/dist/ekyc.esm.js +4 -4
- package/dist/{ekycStateMachine-CWWeCUx5.esm.js → ekycStateMachine-02EweGtj.esm.js} +3 -3
- package/dist/electronic-signature.d.ts +1 -1
- package/dist/electronic-signature.esm.js +3 -3
- package/dist/{electronicSignatureManager-C0UgrX1L.esm.js → electronicSignatureManager-BbRP-Oph.esm.js} +2 -2
- package/dist/email.esm.js +4 -4
- package/dist/{emailManager-_gunG-AE.esm.js → emailManager-C2W-MJQ8.esm.js} +3 -3
- package/dist/{emailStateMachine-DWrTdkZY.esm.js → emailStateMachine-Df_AcoGW.esm.js} +2 -2
- package/dist/{events-237AXtL7.esm.js → events-s0VL5FYh.esm.js} +9 -2
- package/dist/events.d.ts +3 -1
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +3 -3
- package/dist/extensibility.esm.js +18 -18
- package/dist/face-match.esm.js +3 -3
- package/dist/{faceCaptureManagerFactory-CgwUMlyj.d.ts → faceCaptureManagerFactory-Cf6AcIJI.d.ts} +1 -1
- package/dist/faceCaptureManagerFactory-Dix0LYX3.esm.js +288 -0
- package/dist/{faceCaptureSetup-Cclz77d6.esm.js → faceCaptureSetup-GGxPo8Cc.esm.js} +2 -2
- package/dist/{faceMatchStateMachine-Cd70G-3Q.esm.js → faceMatchStateMachine-Cjc-2700.esm.js} +2 -2
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +8 -10
- package/dist/{flowCompletionService-DKHUsKiX.esm.js → flowCompletionService-DhTdMWSB.esm.js} +1 -1
- package/dist/{flowServices-Bh4UKZez.esm.js → flowServices-QTK0C4Ek.esm.js} +2 -2
- package/dist/geolocation.esm.js +3 -3
- package/dist/{geolocationStateMachine-CFsc46Hs.esm.js → geolocationStateMachine-BUp3qs8o.esm.js} +2 -2
- package/dist/government-validation.esm.js +3 -3
- package/dist/{governmentValidationStateMachine-BGGZE44p.esm.js → governmentValidationStateMachine-DBAuZdbq.esm.js} +2 -2
- package/dist/home.d.ts +10 -10
- package/dist/home.esm.js +2 -2
- package/dist/id-ocr.d.ts +52 -52
- package/dist/id-ocr.esm.js +2 -2
- package/dist/id.esm.js +7 -7
- package/dist/{idCaptureManager-D8nzFJJv.esm.js → idCaptureManager-BtqsBcWw.esm.js} +107 -48
- package/dist/{idCaptureStateMachine-B-KOFEK9.esm.js → idCaptureStateMachine-CvdoaLtU.esm.js} +6 -6
- package/dist/identity-reuse.d.ts +43 -43
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{index-BaZskbWt.d.ts → index-B7qp9qsj.d.ts} +119 -119
- package/dist/index.esm.js +5 -5
- package/dist/mandatory-consent.d.ts +52 -52
- package/dist/mandatory-consent.esm.js +3 -3
- package/dist/{mandatoryConsentStateMachine-nVfQa5zS.esm.js → mandatoryConsentStateMachine-BJF3K6w1.esm.js} +2 -2
- package/dist/phone.esm.js +4 -4
- package/dist/{phoneManager-L4XCPUwQ.esm.js → phoneManager-DskgpnGL.esm.js} +3 -3
- package/dist/{phoneStateMachine-Dl0c8Bs4.esm.js → phoneStateMachine-CswpoAaH.esm.js} +2 -2
- package/dist/{qe-signature-D-CUO7mB.esm.js → qe-signature-Dy3nLSvu.esm.js} +1 -1
- package/dist/qe-signature.d.ts +1 -1
- package/dist/qe-signature.esm.js +4 -4
- package/dist/{recordingService-Cen0Qmop.esm.js → recordingService-Nn-BBO6j.esm.js} +4 -4
- package/dist/redirect-to-mobile.esm.js +3 -3
- package/dist/{redirectToMobileStateMachine-DFBsB5IY.esm.js → redirectToMobileStateMachine-DmY7A9iM.esm.js} +2 -2
- package/dist/{runChildModule-BiTJSa1K.esm.js → runChildModule-DP-gEBHS.esm.js} +2 -2
- package/dist/selfie.d.ts +2 -2
- package/dist/selfie.esm.js +9 -9
- package/dist/{selfieManager-DGAsMXpK.esm.js → selfieManager-BI4smYEE.esm.js} +7 -7
- package/dist/{selfieManager-BtyIr64h.d.ts → selfieManager-xZ0EHWY3.d.ts} +1 -1
- package/dist/{selfieStateMachine-C_VXHzeA.esm.js → selfieStateMachine-B-stjSD5.esm.js} +3 -3
- package/dist/{session-DcLfiFln.esm.js → session-oIjERqhS.esm.js} +2 -2
- package/dist/session.esm.js +3 -3
- package/dist/{setup-CGmPXQZb.esm.js → setup-BIkp7Hbm.esm.js} +4 -4
- package/dist/signature.esm.js +3 -3
- package/dist/{signatureStateMachine-C0dnpux6.esm.js → signatureStateMachine-CW8TVU_C.esm.js} +2 -2
- package/dist/wasm.esm.js +5 -5
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.esm.js +3 -3
- package/dist/{watchlistServices-xsf8fmMG.esm.js → watchlistServices-DuWR27Y8.esm.js} +1 -1
- package/dist/workflow.d.ts +114 -114
- package/dist/workflow.esm.js +30 -30
- package/dist/{xstate.esm-CSiDcEjt.esm.js → xstate.esm-cL1KdW6d.esm.js} +16 -16
- package/package.json +1 -1
- package/dist/faceCaptureManagerFactory-DM_o6znS.esm.js +0 -187
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation, r as eventScreenNames } from "./events-s0VL5FYh.esm.js";
|
|
2
|
+
import { o as createManager } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
3
|
+
|
|
4
|
+
//#region src/internal/faceCapture/faceCaptureManagerFactory.ts
|
|
5
|
+
function getPermissionStatus(snapshot) {
|
|
6
|
+
if (!snapshot.matches("permissions")) return;
|
|
7
|
+
if (snapshot.matches({ permissions: "idle" })) return "idle";
|
|
8
|
+
if (snapshot.matches({ permissions: "learnMore" })) return "learnMore";
|
|
9
|
+
if (snapshot.matches({ permissions: "requesting" })) return "requesting";
|
|
10
|
+
if (snapshot.matches({ permissions: "denied" })) return "denied";
|
|
11
|
+
}
|
|
12
|
+
function getCaptureStatus(snapshot) {
|
|
13
|
+
if (snapshot.matches({ capture: "initializing" })) return "initializing";
|
|
14
|
+
if (snapshot.matches({ capture: "detecting" })) return "detecting";
|
|
15
|
+
if (snapshot.matches({ capture: "capturing" })) return "capturing";
|
|
16
|
+
if (snapshot.matches({ capture: "capturingManual" })) return "capturing";
|
|
17
|
+
if (snapshot.matches({ capture: "uploading" })) return "uploading";
|
|
18
|
+
if (snapshot.matches({ capture: "uploadError" })) return "uploadError";
|
|
19
|
+
if (snapshot.matches({ capture: "success" })) return "success";
|
|
20
|
+
}
|
|
21
|
+
function mapState(snapshot) {
|
|
22
|
+
const { context } = snapshot;
|
|
23
|
+
if (snapshot.matches("idle")) return { status: "idle" };
|
|
24
|
+
if (snapshot.matches("loading")) return { status: "loading" };
|
|
25
|
+
if (snapshot.matches("tutorial")) return {
|
|
26
|
+
status: "tutorial",
|
|
27
|
+
ageAssurance: context.config?.ageAssurance === true
|
|
28
|
+
};
|
|
29
|
+
if (snapshot.matches("closed")) return { status: "closed" };
|
|
30
|
+
if (snapshot.matches("permissions")) {
|
|
31
|
+
const permissionStatus = getPermissionStatus(snapshot);
|
|
32
|
+
if (permissionStatus === void 0) return {
|
|
33
|
+
status: "permissions",
|
|
34
|
+
permissionStatus: "idle"
|
|
35
|
+
};
|
|
36
|
+
return {
|
|
37
|
+
status: "permissions",
|
|
38
|
+
permissionStatus
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (snapshot.matches("capture")) return {
|
|
42
|
+
status: "capture",
|
|
43
|
+
captureStatus: getCaptureStatus(snapshot) ?? "initializing",
|
|
44
|
+
stream: context.stream,
|
|
45
|
+
detectionStatus: context.detectionStatus ?? "idle",
|
|
46
|
+
debugFrame: context.debugFrame,
|
|
47
|
+
attemptsRemaining: context.attemptsRemaining ?? 0,
|
|
48
|
+
uploadError: context.uploadError,
|
|
49
|
+
assistedOnboarding: context.config?.assistedOnboarding ?? false,
|
|
50
|
+
ageAssurance: context.config?.ageAssurance === true
|
|
51
|
+
};
|
|
52
|
+
if (snapshot.matches("processing")) return { status: "processing" };
|
|
53
|
+
if (snapshot.matches("finished")) return {
|
|
54
|
+
status: "finished",
|
|
55
|
+
processResponse: context.processResponse
|
|
56
|
+
};
|
|
57
|
+
if (snapshot.matches("error")) {
|
|
58
|
+
const errorValue = context.error;
|
|
59
|
+
return {
|
|
60
|
+
status: "error",
|
|
61
|
+
error: typeof errorValue === "string" ? errorValue : errorValue ? errorValue.message : "Unknown error"
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return { status: "idle" };
|
|
65
|
+
}
|
|
66
|
+
function getFaceCaptureTutorialScreen(snapshot) {
|
|
67
|
+
if (snapshot.context?.config?.ageAssurance === true) return "faceCapture.tutorial.ageAssurance";
|
|
68
|
+
if (typeof snapshot.value === "object" && snapshot.value !== null) {
|
|
69
|
+
const tutorialValue = snapshot.value.tutorial;
|
|
70
|
+
if (typeof tutorialValue === "object" && tutorialValue !== null && "initializingCamera" in tutorialValue) return "faceCapture.tutorial.loading";
|
|
71
|
+
}
|
|
72
|
+
return "faceCapture.tutorial.default";
|
|
73
|
+
}
|
|
74
|
+
function getCapturingScreen(detectionStatus) {
|
|
75
|
+
switch (detectionStatus) {
|
|
76
|
+
case "getReady":
|
|
77
|
+
case "getReadyFinished": return "faceCapture.capturing.getReady";
|
|
78
|
+
case "dark": return "faceCapture.capturing.tooDark";
|
|
79
|
+
case "tooBright": return "faceCapture.capturing.tooBright";
|
|
80
|
+
case "tooClose": return "faceCapture.capturing.moveAway";
|
|
81
|
+
case "tooFar": return "faceCapture.capturing.moveCloser";
|
|
82
|
+
case "moveLeft": return "faceCapture.capturing.moveLeft";
|
|
83
|
+
case "moveRight": return "faceCapture.capturing.moveRight";
|
|
84
|
+
case "blur":
|
|
85
|
+
case "centerFace":
|
|
86
|
+
case "noFace":
|
|
87
|
+
case "tooManyFaces": return "faceCapture.capturing.alignFace";
|
|
88
|
+
case "faceAngle":
|
|
89
|
+
case "lookAtCamera": return "faceCapture.capturing.lookAtCamera";
|
|
90
|
+
case "eyesClosed": return "faceCapture.capturing.eyesClosed";
|
|
91
|
+
case "faceMask": return "faceCapture.capturing.maskDetected";
|
|
92
|
+
case "lenses": return "faceCapture.capturing.glassesDetected";
|
|
93
|
+
case "headWear": return "faceCapture.capturing.hatDetected";
|
|
94
|
+
case "faceOcclusion": return "faceCapture.capturing.faceOcclusion";
|
|
95
|
+
case "manualCapture": return "faceCapture.manualCapture.default";
|
|
96
|
+
case "capturing": return "faceCapture.loading.processing";
|
|
97
|
+
case "detecting":
|
|
98
|
+
case "idle":
|
|
99
|
+
case "offline": return "faceCapture.genericErrors.noConnection";
|
|
100
|
+
case "success":
|
|
101
|
+
case "error":
|
|
102
|
+
default: return "faceCapture.capturing.initiatingState";
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
function getResultErrorScreen(errorCode, attemptsRemaining) {
|
|
106
|
+
const exhaustedSuffix = attemptsRemaining === 0 ? "Exhausted" : "";
|
|
107
|
+
switch (errorCode) {
|
|
108
|
+
case "LENSES_ERROR":
|
|
109
|
+
case "LENSES_DETECTED": return `faceCapture.resultError.lensesDetected${exhaustedSuffix}`;
|
|
110
|
+
case "BRIGHTNESS_ERROR": return `faceCapture.resultError.tooBright${exhaustedSuffix}`;
|
|
111
|
+
case "MASK_ERROR":
|
|
112
|
+
case "FACE_MASK_DETECTED": return `faceCapture.resultError.faceMaskDetected${exhaustedSuffix}`;
|
|
113
|
+
case "FACE_TOO_DARK":
|
|
114
|
+
case "TOO_DARK_ERROR": return `faceCapture.resultError.tooDark${exhaustedSuffix}`;
|
|
115
|
+
case "CLOSED_EYES_ERROR":
|
|
116
|
+
case "CLOSED_EYES_DETECTED": return `faceCapture.resultError.eyesClosed${exhaustedSuffix}`;
|
|
117
|
+
case "HEAD_COVER_ERROR":
|
|
118
|
+
case "HEAD_COVER_DETECTED": return `faceCapture.resultError.headCovered${exhaustedSuffix}`;
|
|
119
|
+
case "FACE_OCCLUDED": return `faceCapture.resultError.faceOcclusion${exhaustedSuffix}`;
|
|
120
|
+
case "TOO_BLURRY_ERROR":
|
|
121
|
+
case "FACE_TOO_BLURRY":
|
|
122
|
+
case "BAD_PHOTO_QUALITY":
|
|
123
|
+
case "SELFIE_IMAGE_LOW_QUALITY": return `faceCapture.resultError.lowQuality${exhaustedSuffix}`;
|
|
124
|
+
case "SERVER_ERROR":
|
|
125
|
+
case "PROCESSING_ERROR":
|
|
126
|
+
case "BAD_REQUEST": return `faceCapture.resultError.processingFailed${exhaustedSuffix}`;
|
|
127
|
+
case "FACE_NOT_FOUND":
|
|
128
|
+
case "MULTIPLE_FACES":
|
|
129
|
+
case "FACE_CROPPING_FAILED":
|
|
130
|
+
case "FACE_TOO_SMALL":
|
|
131
|
+
case "LIVENESS_ERROR":
|
|
132
|
+
default: return `faceCapture.resultError.faceNotAligned${exhaustedSuffix}`;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
function getCaptureSubstateScreen(snapshot) {
|
|
136
|
+
const { value, context } = snapshot;
|
|
137
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
138
|
+
const captureValue = value.capture;
|
|
139
|
+
if (captureValue === void 0) return void 0;
|
|
140
|
+
if (typeof captureValue === "string") switch (captureValue) {
|
|
141
|
+
case "checkingDeepsight":
|
|
142
|
+
case "initializingDeepsight":
|
|
143
|
+
case "checkingStream":
|
|
144
|
+
case "initializing": return "faceCapture.capturing.initiatingState";
|
|
145
|
+
case "detecting": return getCapturingScreen(context?.detectionStatus);
|
|
146
|
+
case "capturing": return "faceCapture.loading.processing";
|
|
147
|
+
case "capturingManual": return "faceCapture.manualCapture.default";
|
|
148
|
+
case "preparingUpload":
|
|
149
|
+
case "uploading":
|
|
150
|
+
case "validatingUpload": return "faceCapture.loading.uploading";
|
|
151
|
+
case "uploadError": return getResultErrorScreen(context?.uploadError, context?.attemptsRemaining);
|
|
152
|
+
case "success": return "faceCapture.resultSuccess.default";
|
|
153
|
+
}
|
|
154
|
+
if (typeof captureValue === "object" && captureValue !== null) {
|
|
155
|
+
const substates = Object.keys(captureValue);
|
|
156
|
+
if (substates.includes("uploading")) return "faceCapture.loading.uploading";
|
|
157
|
+
if (substates.includes("uploadError")) return getResultErrorScreen(context?.uploadError, context?.attemptsRemaining);
|
|
158
|
+
if (substates.includes("success")) return "faceCapture.resultSuccess.default";
|
|
159
|
+
}
|
|
160
|
+
return "faceCapture.capturing.initiatingState";
|
|
161
|
+
}
|
|
162
|
+
function getAuthFaceCaptureSubstateScreen(snapshot) {
|
|
163
|
+
const { value } = snapshot;
|
|
164
|
+
if (typeof value !== "object" || value === null) return void 0;
|
|
165
|
+
const captureValue = value.capture;
|
|
166
|
+
if (captureValue === void 0) return void 0;
|
|
167
|
+
if (typeof captureValue === "string") switch (captureValue) {
|
|
168
|
+
case "preparingUpload":
|
|
169
|
+
case "uploading":
|
|
170
|
+
case "validatingUpload": return eventScreenNames.authFaceUpload;
|
|
171
|
+
case "uploadError": return eventScreenNames.authFaceError;
|
|
172
|
+
case "success": return eventScreenNames.authFaceUploadSuccess;
|
|
173
|
+
case "checkingDeepsight":
|
|
174
|
+
case "initializingDeepsight":
|
|
175
|
+
case "checkingStream":
|
|
176
|
+
case "initializing":
|
|
177
|
+
case "detecting":
|
|
178
|
+
case "capturing":
|
|
179
|
+
case "capturingManual": return eventScreenNames.authFace;
|
|
180
|
+
}
|
|
181
|
+
if (typeof captureValue === "object" && captureValue !== null) {
|
|
182
|
+
const substates = Object.keys(captureValue);
|
|
183
|
+
if (substates.includes("uploading") || substates.includes("validatingUpload")) return eventScreenNames.authFaceUpload;
|
|
184
|
+
if (substates.includes("uploadError")) return eventScreenNames.authFaceError;
|
|
185
|
+
if (substates.includes("success")) return eventScreenNames.authFaceUploadSuccess;
|
|
186
|
+
}
|
|
187
|
+
return eventScreenNames.authFace;
|
|
188
|
+
}
|
|
189
|
+
function getTopLevelState(value) {
|
|
190
|
+
if (typeof value === "string") return value;
|
|
191
|
+
if (typeof value === "object") return Object.keys(value)[0];
|
|
192
|
+
}
|
|
193
|
+
function getAuthFaceScreenName(snapshot) {
|
|
194
|
+
const { value } = snapshot;
|
|
195
|
+
if (value === void 0 || value === null) return void 0;
|
|
196
|
+
const topLevel = getTopLevelState(value);
|
|
197
|
+
if (topLevel === void 0) return void 0;
|
|
198
|
+
switch (topLevel) {
|
|
199
|
+
case "tutorial": return eventScreenNames.authFaceTutorial;
|
|
200
|
+
case "capture": return getAuthFaceCaptureSubstateScreen(snapshot);
|
|
201
|
+
case "finished": return eventScreenNames.authFaceUploadSuccess;
|
|
202
|
+
case "error": return eventScreenNames.authFaceUploadFailed;
|
|
203
|
+
case "idle":
|
|
204
|
+
case "loading":
|
|
205
|
+
case "permissions":
|
|
206
|
+
case "processing":
|
|
207
|
+
case "closed":
|
|
208
|
+
default: return eventScreenNames.authFace;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
function getFaceCaptureScreenName(snapshot, moduleName) {
|
|
212
|
+
if (moduleName === eventModuleNames.authFace || moduleName === eventModuleNames.authentication) return getAuthFaceScreenName(snapshot);
|
|
213
|
+
const { value } = snapshot;
|
|
214
|
+
if (value === void 0 || value === null) return void 0;
|
|
215
|
+
const topLevel = getTopLevelState(value);
|
|
216
|
+
if (topLevel === void 0) return void 0;
|
|
217
|
+
switch (topLevel) {
|
|
218
|
+
case "idle": return "faceCapture.loading.processing";
|
|
219
|
+
case "loading": return "faceCapture.loading.processing";
|
|
220
|
+
case "tutorial": return getFaceCaptureTutorialScreen(snapshot);
|
|
221
|
+
case "permissions": return "faceCapture.tutorial.default";
|
|
222
|
+
case "capture": return getCaptureSubstateScreen(snapshot);
|
|
223
|
+
case "processing": return "faceCapture.loading.processing";
|
|
224
|
+
case "finished": return "faceCapture.resultSuccess.default";
|
|
225
|
+
case "closed": return "faceCapture.closed";
|
|
226
|
+
case "error": return "faceCapture.resultError.processingFailed";
|
|
227
|
+
default: return `faceCapture.${topLevel}`;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished }) {
|
|
231
|
+
const snapshot = actor.getSnapshot();
|
|
232
|
+
snapshot.context.dependencies.trackCaptureAttemptFinished = trackCaptureAttemptFinished;
|
|
233
|
+
return {
|
|
234
|
+
load() {
|
|
235
|
+
actor.send({ type: "LOAD" });
|
|
236
|
+
},
|
|
237
|
+
nextStep() {
|
|
238
|
+
trackElementClicked?.("nextStep");
|
|
239
|
+
actor.send({ type: "NEXT_STEP" });
|
|
240
|
+
},
|
|
241
|
+
requestPermission() {
|
|
242
|
+
trackElementClicked?.("requestPermission");
|
|
243
|
+
actor.send({ type: "REQUEST_PERMISSION" });
|
|
244
|
+
},
|
|
245
|
+
goToLearnMore() {
|
|
246
|
+
trackElementClicked?.("goToLearnMore");
|
|
247
|
+
actor.send({ type: "GO_TO_LEARN_MORE" });
|
|
248
|
+
},
|
|
249
|
+
back() {
|
|
250
|
+
trackElementClicked?.("back");
|
|
251
|
+
actor.send({ type: "BACK" });
|
|
252
|
+
},
|
|
253
|
+
close() {
|
|
254
|
+
trackElementClicked?.("close");
|
|
255
|
+
actor.send({ type: "QUIT" });
|
|
256
|
+
},
|
|
257
|
+
reset() {
|
|
258
|
+
actor.send({ type: "RESET" });
|
|
259
|
+
},
|
|
260
|
+
retryCapture() {
|
|
261
|
+
trackElementClicked?.("retryCapture");
|
|
262
|
+
actor.send({ type: "RETRY_CAPTURE" });
|
|
263
|
+
},
|
|
264
|
+
capture() {
|
|
265
|
+
trackElementClicked?.("capture");
|
|
266
|
+
actor.send({ type: "MANUAL_CAPTURE" });
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
function getFaceCaptureErrorPayload(snapshot) {
|
|
271
|
+
const errorCode = snapshot.context.uploadError;
|
|
272
|
+
if (typeof errorCode !== "string" || errorCode.length === 0) return;
|
|
273
|
+
return { errorCode };
|
|
274
|
+
}
|
|
275
|
+
function createFaceCaptureManagerFromActor(actor, moduleName) {
|
|
276
|
+
return createManager({
|
|
277
|
+
actor,
|
|
278
|
+
mapState,
|
|
279
|
+
createApi,
|
|
280
|
+
instrumentation: createManagerInstrumentation(moduleName, {
|
|
281
|
+
getEventScreenName: (snapshot) => getFaceCaptureScreenName(snapshot, moduleName),
|
|
282
|
+
getErrorPayload: getFaceCaptureErrorPayload
|
|
283
|
+
})
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
//#endregion
|
|
288
|
+
export { createFaceCaptureManagerFromActor as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as getToken } from "./api-3IquGyW5.esm.js";
|
|
2
|
-
import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-
|
|
3
|
-
import { _ as StreamCanvasCapture, a as initializeDeepsightSession, c as stopStream, h as flagFaceManualReview, i as initializeCamera, n as preloadOpenViduProvider, o as sendLabelInspectionEvent, r as encryptSelfieImage, s as startDetection, t as createRecordingService, v as FACE_ERROR_CODES } from "./recordingService-
|
|
2
|
+
import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
3
|
+
import { _ as StreamCanvasCapture, a as initializeDeepsightSession, c as stopStream, h as flagFaceManualReview, i as initializeCamera, n as preloadOpenViduProvider, o as sendLabelInspectionEvent, r as encryptSelfieImage, s as startDetection, t as createRecordingService, v as FACE_ERROR_CODES } from "./recordingService-Nn-BBO6j.esm.js";
|
|
4
4
|
import { n as requestPermission, r as clearCameraPermissionCache, t as checkPermission } from "./permissionServices-DiAThhLg.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/internal/faceCapture/faceCaptureSetup.ts
|
package/dist/{faceMatchStateMachine-Cd70G-3Q.esm.js → faceMatchStateMachine-Cjc-2700.esm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-3IquGyW5.esm.js";
|
|
2
|
-
import { v as endpoints } from "./events-
|
|
3
|
-
import { i as fromPromise, n as assign, t as setup } from "./xstate.esm-
|
|
2
|
+
import { v as endpoints } from "./events-s0VL5FYh.esm.js";
|
|
3
|
+
import { i as fromPromise, n as assign, t as setup } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/face-match/faceMatchServices.ts
|
|
6
6
|
/**
|
package/dist/flow.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { i as FlowModuleConfig, n as Flow, r as FlowModule } from "./types-DFwAu
|
|
|
7
7
|
import { n as GetFinishStatusFn, t as FinishStatus } from "./flowCompletionService-U6Ov6LFb.js";
|
|
8
8
|
import { o as FlowEventSubscribable } from "./index-BIhqszMN.js";
|
|
9
9
|
import { t as ModuleRegistry } from "./types-DxQ9z4r7.js";
|
|
10
|
-
import * as
|
|
10
|
+
import * as xstate961 from "xstate";
|
|
11
11
|
|
|
12
12
|
//#region src/modules/flow/flowUtils.d.ts
|
|
13
13
|
type NormalizeFlowModulesOptions = {
|
|
@@ -55,7 +55,7 @@ type GetFlow = (signal: AbortSignal, options?: GetFlowOptions) => Promise<Flow>;
|
|
|
55
55
|
declare const getFlow: GetFlow;
|
|
56
56
|
//#endregion
|
|
57
57
|
//#region src/modules/flow/noOpFlowModuleMachine.d.ts
|
|
58
|
-
declare const noOpFlowModuleMachine:
|
|
58
|
+
declare const noOpFlowModuleMachine: xstate961.StateMachine<xstate961.MachineContext, xstate961.AnyEventObject, {}, never, never, never, never, "finished", string, xstate961.NonReducibleUnknown, xstate961.NonReducibleUnknown, xstate961.EventObject, xstate961.MetaObject, {
|
|
59
59
|
readonly id: "noOpFlowModule";
|
|
60
60
|
readonly initial: "finished";
|
|
61
61
|
readonly states: {
|
package/dist/flow.esm.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "./api-3IquGyW5.esm.js";
|
|
2
|
-
import
|
|
3
|
-
import "./session-
|
|
2
|
+
import "./events-s0VL5FYh.esm.js";
|
|
3
|
+
import "./session-oIjERqhS.esm.js";
|
|
4
4
|
import "./IpifyProvider-CVIOst3c.esm.js";
|
|
5
5
|
import "./browserSimulation-DMJIC-23.esm.js";
|
|
6
|
-
import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-
|
|
7
|
-
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-
|
|
8
|
-
import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-
|
|
9
|
-
import { t as getFinishStatus } from "./flowCompletionService-
|
|
6
|
+
import { a as createActor, i as fromPromise, n as assign, o as createManager, t as setup } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
7
|
+
import { n as getRequiredWasmPipelines, r as normalizeFlowModules, t as getFlow } from "./flowServices-QTK0C4Ek.esm.js";
|
|
8
|
+
import { n as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-DP-gEBHS.esm.js";
|
|
9
|
+
import { t as getFinishStatus } from "./flowCompletionService-DhTdMWSB.esm.js";
|
|
10
10
|
|
|
11
11
|
//#region src/modules/flow/noOpFlowModuleMachine.ts
|
|
12
12
|
const noOpFlowModuleMachine = setup({}).createMachine({
|
|
@@ -248,8 +248,7 @@ function createFlowManager(options) {
|
|
|
248
248
|
return attachFlowEventEmitter(createManager({
|
|
249
249
|
actor: createFlowActor(options),
|
|
250
250
|
mapState,
|
|
251
|
-
createApi
|
|
252
|
-
instrumentation: createManagerInstrumentation("FLOW")
|
|
251
|
+
createApi
|
|
253
252
|
}));
|
|
254
253
|
}
|
|
255
254
|
|
|
@@ -809,8 +808,7 @@ function createOrchestratedFlowManager(options) {
|
|
|
809
808
|
return attachFlowEventEmitter(createManager({
|
|
810
809
|
actor,
|
|
811
810
|
mapState: (snapshot) => mapOrchestratedFlowState(snapshot, uiOpts),
|
|
812
|
-
createApi: (apiOpts) => createOrchestratedFlowApi(apiOpts, { enableHome })
|
|
813
|
-
instrumentation: createManagerInstrumentation("FLOW")
|
|
811
|
+
createApi: (apiOpts) => createOrchestratedFlowApi(apiOpts, { enableHome })
|
|
814
812
|
}));
|
|
815
813
|
}
|
|
816
814
|
|
package/dist/{flowCompletionService-DKHUsKiX.esm.js → flowCompletionService-DhTdMWSB.esm.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as api } from "./api-3IquGyW5.esm.js";
|
|
2
|
-
import { v as endpoints } from "./events-
|
|
2
|
+
import { v as endpoints } from "./events-s0VL5FYh.esm.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/flow/flowCompletionService.ts
|
|
5
5
|
const getFinishStatus = async (flowId, signal) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-3IquGyW5.esm.js";
|
|
2
|
-
import { v as endpoints } from "./events-
|
|
3
|
-
import { n as getSessionFingerprintResult, r as initializeSession } from "./session-
|
|
2
|
+
import { v as endpoints } from "./events-s0VL5FYh.esm.js";
|
|
3
|
+
import { n as getSessionFingerprintResult, r as initializeSession } from "./session-oIjERqhS.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/flow/flowUtils.ts
|
|
6
6
|
const WASM_MODULE_PIPELINES = {
|
package/dist/geolocation.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./api-3IquGyW5.esm.js";
|
|
2
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import { a as createActor, o as createManager } from "./xstate.esm-
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-s0VL5FYh.esm.js";
|
|
3
|
+
import { a as createActor, o as createManager } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
4
4
|
import "./platform-BtdVAeAg.esm.js";
|
|
5
|
-
import { t as geolocationMachine } from "./geolocationStateMachine-
|
|
5
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-BUp3qs8o.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
|
|
8
8
|
var BrowserGeolocationProvider = class {
|
package/dist/{geolocationStateMachine-CFsc46Hs.esm.js → geolocationStateMachine-BUp3qs8o.esm.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-3IquGyW5.esm.js";
|
|
2
|
-
import { v as endpoints } from "./events-
|
|
3
|
-
import { i as fromPromise, n as assign, t as setup } from "./xstate.esm-
|
|
2
|
+
import { v as endpoints } from "./events-s0VL5FYh.esm.js";
|
|
3
|
+
import { i as fromPromise, n as assign, t as setup } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
4
4
|
import { r as isIOS, t as isAndroid } from "./platform-BtdVAeAg.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/geolocation/geolocationServices.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./api-3IquGyW5.esm.js";
|
|
2
|
-
import { o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import { a as createActor, o as createManager } from "./xstate.esm-
|
|
2
|
+
import { o as createManagerInstrumentation } from "./events-s0VL5FYh.esm.js";
|
|
3
|
+
import { a as createActor, o as createManager } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
4
4
|
import "./BrowserTimerProvider-Bc6BRm6-.esm.js";
|
|
5
|
-
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-
|
|
5
|
+
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-DBAuZdbq.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/government-validation/governmentValidationActor.ts
|
|
8
8
|
function createGovernmentValidationActor(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as api } from "./api-3IquGyW5.esm.js";
|
|
2
|
-
import { v as endpoints } from "./events-
|
|
3
|
-
import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-
|
|
2
|
+
import { v as endpoints } from "./events-s0VL5FYh.esm.js";
|
|
3
|
+
import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
4
4
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-Bc6BRm6-.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/government-validation/governmentValidationServices.ts
|
package/dist/home.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { t as Manager } from "./Manager-CcbnIt3T.js";
|
|
|
2
2
|
import "./camera-CS1twtEg.js";
|
|
3
3
|
import "./types-DdYIMV6w.js";
|
|
4
4
|
import { t as EmptyConfig } from "./types-DFwAuzk2.js";
|
|
5
|
-
import * as
|
|
5
|
+
import * as xstate461 from "xstate";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/home/types.d.ts
|
|
8
8
|
type HomeConfig = EmptyConfig;
|
|
@@ -34,41 +34,41 @@ type HomeContext = {
|
|
|
34
34
|
type HomeInput = {
|
|
35
35
|
config: EmptyConfig;
|
|
36
36
|
};
|
|
37
|
-
declare const homeMachine:
|
|
37
|
+
declare const homeMachine: xstate461.StateMachine<HomeContext, {
|
|
38
38
|
type: "LOAD";
|
|
39
39
|
} | {
|
|
40
40
|
type: "COMPLETE";
|
|
41
41
|
} | {
|
|
42
42
|
type: "RESET";
|
|
43
|
-
}, {}, never, never, never, never, "idle" | "finished" | "main", string, HomeInput,
|
|
43
|
+
}, {}, never, never, never, never, "idle" | "finished" | "main", string, HomeInput, xstate461.NonReducibleUnknown, xstate461.EventObject, xstate461.MetaObject, {
|
|
44
44
|
readonly id: "home";
|
|
45
45
|
readonly initial: "idle";
|
|
46
46
|
readonly context: ({
|
|
47
47
|
input
|
|
48
48
|
}: {
|
|
49
49
|
spawn: {
|
|
50
|
-
<TSrc extends never>(logic: TSrc, ...[options]: never):
|
|
51
|
-
<TLogic extends
|
|
50
|
+
<TSrc extends never>(logic: TSrc, ...[options]: never): xstate461.ActorRefFromLogic<never>;
|
|
51
|
+
<TLogic extends xstate461.AnyActorLogic>(src: TLogic, ...[options]: xstate461.ConditionalRequired<[options?: ({
|
|
52
52
|
id?: never;
|
|
53
53
|
systemId?: string;
|
|
54
|
-
input?:
|
|
54
|
+
input?: xstate461.InputFrom<TLogic> | undefined;
|
|
55
55
|
syncSnapshot?: boolean;
|
|
56
|
-
} & { [K in
|
|
56
|
+
} & { [K in xstate461.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate461.IsNotNever<xstate461.RequiredLogicInput<TLogic>>>): xstate461.ActorRefFromLogic<TLogic>;
|
|
57
57
|
};
|
|
58
58
|
input: HomeInput;
|
|
59
|
-
self:
|
|
59
|
+
self: xstate461.ActorRef<xstate461.MachineSnapshot<HomeContext, {
|
|
60
60
|
type: "LOAD";
|
|
61
61
|
} | {
|
|
62
62
|
type: "COMPLETE";
|
|
63
63
|
} | {
|
|
64
64
|
type: "RESET";
|
|
65
|
-
}, Record<string,
|
|
65
|
+
}, Record<string, xstate461.AnyActorRef | undefined>, xstate461.StateValue, string, unknown, any, any>, {
|
|
66
66
|
type: "LOAD";
|
|
67
67
|
} | {
|
|
68
68
|
type: "COMPLETE";
|
|
69
69
|
} | {
|
|
70
70
|
type: "RESET";
|
|
71
|
-
},
|
|
71
|
+
}, xstate461.AnyEventObject>;
|
|
72
72
|
}) => {
|
|
73
73
|
config: EmptyConfig;
|
|
74
74
|
};
|
package/dist/home.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./api-3IquGyW5.esm.js";
|
|
2
|
-
import { o as createManagerInstrumentation } from "./events-
|
|
3
|
-
import { a as createActor, o as createManager, t as setup } from "./xstate.esm-
|
|
2
|
+
import { o as createManagerInstrumentation } from "./events-s0VL5FYh.esm.js";
|
|
3
|
+
import { a as createActor, o as createManager, t as setup } from "./xstate.esm-cL1KdW6d.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/home/homeStateMachine.ts
|
|
6
6
|
const homeMachine = setup({ types: {
|