@incodetech/core 0.0.0-dev-20260807-9907417f → 0.0.0-dev-20260810-1d53aaba
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BrowserDiagnosticsCryptoProvider-BzByrg2n.esm.js → BrowserDiagnosticsCryptoProvider-DVqOKb7m.esm.js} +1 -1
- package/dist/{IFeatureManagementCapability-ErPJywQ_.d.ts → IFeatureManagementCapability-DdEUp6tB.d.ts} +5 -1
- package/dist/{IIdCaptureCapability-Cj_aceph.d.ts → IIdCaptureCapability-DHTT3FC2.d.ts} +6 -0
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +1 -1
- package/dist/{antifraudManager-C4_d-1a0.esm.js → antifraudManager-B8Plzf7a.esm.js} +1 -1
- package/dist/{apiError-GcTTQxue.esm.js → apiError-kW5eUMgX.esm.js} +1 -1
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-DzaxaLf_.esm.js → authenticationManager-Bq5M5Sw-.esm.js} +3 -3
- package/dist/{authenticationStateMachine-CH0yB1n5.esm.js → authenticationStateMachine-Chq-F7Is.esm.js} +2 -2
- package/dist/certificate-issuance.esm.js +1 -1
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +1 -1
- package/dist/{consentManager-lG6fCXOk.esm.js → consentManager-BApTlfA0.esm.js} +1 -1
- package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-DLOyIZzt.d.ts} +5 -5
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-B5bnUpSo.esm.js → crossDocumentDataMatchManager-OmYvyung.esm.js} +1 -1
- package/dist/curp-validation.esm.js +1 -1
- package/dist/{curpValidationManager-CYkSBXCF.esm.js → curpValidationManager-UZxcrsrz.esm.js} +1 -1
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +1 -1
- package/dist/{deepsightLoader-BXNzqgjC.esm.js → deepsightLoader-DLR2ajBH.esm.js} +3 -3
- package/dist/document-capture.esm.js +1 -1
- package/dist/document-upload.esm.js +1 -1
- package/dist/{documentCaptureManager-CPb1ooah.esm.js → documentCaptureManager-DszmcU-l.esm.js} +1 -1
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-DTYPCotP.esm.js → dynamicFormsManager-czLgb-3u.esm.js} +2 -2
- package/dist/{dynamicFormsStateMachine-DqhIXSL0.esm.js → dynamicFormsStateMachine-DZNdhEf_.esm.js} +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-Dw-apOmj.esm.js → ekybManager-DjqSgoBA.esm.js} +2 -2
- package/dist/{ekybStateMachine-1np62ocf.esm.js → ekybStateMachine-B9VqEuUU.esm.js} +1 -1
- package/dist/ekyc.esm.js +1 -1
- package/dist/{ekycManager-BnPKaiV_.esm.js → ekycManager-oTstTJuL.esm.js} +1 -1
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-BjVKOU14.esm.js → electronicSignatureManager-kUqdRuPy.esm.js} +2 -2
- package/dist/email.esm.js +1 -1
- package/dist/{emailManager-D-3pYOas.esm.js → emailManager-tE-YvNtS.esm.js} +1 -1
- package/dist/{events-ethtfu2b.esm.js → events-CxfNJVZW.esm.js} +8 -6
- package/dist/events.d.ts +3 -4
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +6 -6
- package/dist/extensibility.esm.js +26 -26
- package/dist/face-match.esm.js +1 -1
- package/dist/{faceCaptureManagerFactory-C1fWhpb3.esm.js → faceCaptureManagerFactory-DapJHpxR.esm.js} +2 -2
- package/dist/{faceCaptureSetup-CWKYKKei.esm.js → faceCaptureSetup-DNrvk8Vz.esm.js} +2 -2
- package/dist/{faceMatchManager-Dnp-edw5.esm.js → faceMatchManager-BXp2WUT-.esm.js} +1 -1
- package/dist/{feature-management-CFRmD8Nr.esm.js → feature-management-DS_Nj5Gg.esm.js} +157 -23
- package/dist/feature-management.d.ts +90 -10
- package/dist/feature-management.esm.js +2 -2
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-CU1JQDG4.esm.js → fieldComparisonManager-DhnYdYZ2.esm.js} +1 -1
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/flow.d.ts +1 -1
- package/dist/flow.esm.js +4 -4
- package/dist/{flowCompletionService-DjQepG1I.esm.js → flowCompletionService-BW8wJ1Ya.esm.js} +1 -1
- package/dist/{flowServices-DERjSTC9.esm.js → flowServices-De2U4wZB.esm.js} +4 -4
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-JVFoIOGV.esm.js → geolocationManager-QOpupgt7.esm.js} +2 -2
- package/dist/{geolocationStateMachine-DcnyGm4v.esm.js → geolocationStateMachine-CvOLKZFn.esm.js} +1 -1
- package/dist/government-validation.esm.js +1 -1
- package/dist/home.esm.js +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-ocr.esm.js +1 -1
- package/dist/id-selfie-flow.d.ts +2 -2
- package/dist/id-selfie-flow.esm.js +7 -7
- package/dist/id-verification.esm.js +1 -1
- package/dist/id.d.ts +3 -3
- package/dist/id.esm.js +11 -7
- package/dist/{idCaptureDefaults-DrQe0hWr.esm.js → idCaptureDefaults-WeHbQM7W.esm.js} +12 -2
- package/dist/{idCaptureManager-JWz-mYr-.d.ts → idCaptureManager-BjU-Wyow.d.ts} +11 -3
- package/dist/{idCaptureManager-Dvg0GVpq.esm.js → idCaptureManager-CW_PqtYf.esm.js} +32 -6
- package/dist/{idCaptureServices-Cd8X5IYl.esm.js → idCaptureServices-Cztpla_C.esm.js} +62 -19
- package/dist/{idCaptureStateMachine-LnEIroru.esm.js → idCaptureStateMachine-B9oqtIOr.esm.js} +93 -39
- package/dist/{idOcrManager-DWGed-91.esm.js → idOcrManager-CvJZhmBR.esm.js} +1 -1
- package/dist/{idOcrManager-DXc_xRN7.d.ts → idOcrManager-dLuxey6y.d.ts} +1 -1
- package/dist/{idVerificationManager-W8v-boCx.esm.js → idVerificationManager-CduNXhWd.esm.js} +1 -1
- package/dist/identity-reuse.d.ts +1 -1
- package/dist/identity-reuse.esm.js +1 -1
- package/dist/{identityReuseManager-CUVKNTFa.esm.js → identityReuseManager-D5vXknnJ.esm.js} +1 -1
- package/dist/{identityReuseManager-v2TH5g7e.d.ts → identityReuseManager-D6pD4hcZ.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DVtdZdpI.esm.js → invokeOnCaptureCallback-1m1VJ3Q4.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +1 -1
- package/dist/mandatory-consent.esm.js +1 -1
- package/dist/{mandatoryConsentManager-DyPzUmsZ.d.ts → mandatoryConsentManager-B7oBXoBB.d.ts} +5 -5
- package/dist/{mandatoryConsentManager-CFd276xc.esm.js → mandatoryConsentManager-BeELm1zS.esm.js} +1 -1
- package/dist/{onDeviceFaceResults-4V5CfwpH.esm.js → onDeviceFaceResults-AOKW5LFl.esm.js} +3 -3
- package/dist/personhood.esm.js +4 -4
- package/dist/phone.esm.js +1 -1
- package/dist/{phoneManager-SONkmpec.esm.js → phoneManager-Cpiai2IM.esm.js} +1 -1
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-XRbtK8sl.esm.js → recordingService-BvBR_orc.esm.js} +1 -1
- package/dist/redirect-to-mobile.esm.js +1 -1
- package/dist/{redirectToMobileManager-B7EYFwY_.esm.js → redirectToMobileManager-C0dfc7f6.esm.js} +1 -1
- package/dist/{runChildModule-BFB2AaPg.esm.js → runChildModule-BKZeyVoB.esm.js} +2 -2
- package/dist/selfie.esm.js +6 -6
- package/dist/{selfieManager-DPO3nuK4.esm.js → selfieManager-BXhw3-Z_.esm.js} +3 -3
- package/dist/{selfieStateMachine-CqUlaar7.esm.js → selfieStateMachine-C0HzH85W.esm.js} +2 -2
- package/dist/{session-BmUqn2Yv.esm.js → session-CeFbCodp.esm.js} +4 -4
- package/dist/session.esm.js +4 -4
- package/dist/{sessionInitializer-CHm90VzO.esm.js → sessionInitializer-zac1pYo3.esm.js} +4 -4
- package/dist/{setup-qV3Hq0Y2.esm.js → setup-CCGCRaIV.esm.js} +7 -6
- package/dist/{setup-DMFac2Ms.d.ts → setup-DywQeePQ.d.ts} +1 -1
- package/dist/signature.esm.js +1 -1
- package/dist/{signatureManager-BpstxH7R.esm.js → signatureManager-DdPgcmou.esm.js} +1 -1
- package/dist/trueSight-CPe_rGn8.esm.js +1 -0
- package/dist/{trueSightService-QAySpgvt.esm.js → trueSightService-BO9JcrCP.esm.js} +3 -3
- package/dist/trust-graph.esm.js +1 -1
- package/dist/{types-DT9tqQtP2.d.ts → types-M6eb82ra2.d.ts} +28 -1
- package/dist/video-selfie.d.ts +2 -2
- package/dist/video-selfie.esm.js +3 -3
- package/dist/{videoSelfieCameraWarmer-LiiksurI.esm.js → videoSelfieCameraWarmer-ByQI5A9h.esm.js} +3 -3
- package/dist/{videoSelfieStepDetector-OoiAbUo2.d.ts → videoSelfieStepDetector-D3oo2ofo.d.ts} +1 -1
- package/dist/wasm.d.ts +1 -1
- package/dist/wasm.esm.js +1 -1
- package/dist/watchlist-for-business.esm.js +1 -1
- package/dist/watchlist.esm.js +1 -1
- package/dist/{watchlistManager-QakKGrF0.esm.js → watchlistManager-CjSMmbyq.esm.js} +1 -1
- package/dist/workflow.esm.js +16 -16
- package/package.json +3 -3
- package/dist/trueSight-DOaDX17m.esm.js +0 -1
|
@@ -8,8 +8,8 @@ import { t as CameraStream } from "./camera-9wWD-pwg.js";
|
|
|
8
8
|
import { a as RegulationTypes } from "./types-KPvmag_B.js";
|
|
9
9
|
import { n as PermissionStatus } from "./types-BEwVKkLJ.js";
|
|
10
10
|
import { t as DeepsightService } from "./deepsightService-DLVQS_RH.js";
|
|
11
|
-
import { i as Pdf417DecodeResult, n as IIdCaptureCapability, t as DetectionOrientation } from "./IIdCaptureCapability-
|
|
12
|
-
import { A as ManualUploadSide, C as RecordingSession, T as IAnalyticsCapability, a as DetectionArea, c as IdCaptureConfig, d as IdCaptureEvent, g as IdCaptureOutput, h as IdCaptureOnlyConfig, j as ManualUploadTab, l as IdCaptureContext, m as IdCaptureMode, n as CaptureIdResponse, o as DetectionStatus, p as IdCaptureInput, t as AddBarcodeV3Response, u as IdCaptureDependencies, w as UploadIdResponse, x as IdErrorCode, y as IdDocumentType } from "./types-
|
|
11
|
+
import { i as Pdf417DecodeResult, n as IIdCaptureCapability, t as DetectionOrientation } from "./IIdCaptureCapability-DHTT3FC2.js";
|
|
12
|
+
import { A as ManualUploadSide, C as RecordingSession, T as IAnalyticsCapability, a as DetectionArea, c as IdCaptureConfig, d as IdCaptureEvent, g as IdCaptureOutput, h as IdCaptureOnlyConfig, j as ManualUploadTab, l as IdCaptureContext, m as IdCaptureMode, n as CaptureIdResponse, o as DetectionStatus, p as IdCaptureInput, t as AddBarcodeV3Response, u as IdCaptureDependencies, w as UploadIdResponse, x as IdErrorCode, y as IdDocumentType } from "./types-M6eb82ra2.js";
|
|
13
13
|
//#region src/modules/id/idCaptureStateMachine.d.ts
|
|
14
14
|
declare const idCaptureMachine: AnyStateMachine;
|
|
15
15
|
type IdCaptureMachine = StateMachine<IdCaptureContext, IdCaptureEvent, any, any, any, any, any, any, any, IdCaptureInput, any, any, any, any>;
|
|
@@ -171,7 +171,7 @@ declare function addBarcode(params: AddBarcodeParams): Promise<AddBarcodeV3Respo
|
|
|
171
171
|
type DigitalUploadFailReason = 'DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED' | 'ID_TYPE_UNACCEPTABLE' | 'FILE_CHANGED_ERROR' | 'INVALID_FILE_TYPE' | 'NETWORK_ERROR' | 'GENERIC';
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region src/internal/idCapture/idCaptureManagerFactory.d.ts
|
|
174
|
-
type CaptureStatus = 'initializing' | 'detecting' | 'capturing' | 'holdOn' | 'uploading' | 'uploadError' | 'success';
|
|
174
|
+
type CaptureStatus = 'initializing' | 'detecting' | 'capturing' | 'holdOn' | 'resultPreview' | 'uploading' | 'uploadError' | 'success';
|
|
175
175
|
type IdCaptureIdleState = {
|
|
176
176
|
status: 'idle';
|
|
177
177
|
};
|
|
@@ -215,6 +215,7 @@ type IdCaptureCaptureState = {
|
|
|
215
215
|
barcodeFastPathCaptured: boolean;
|
|
216
216
|
uploadProgress?: number;
|
|
217
217
|
ageAssurance: boolean;
|
|
218
|
+
captureFeedbackMode: 'countdown' | 'result-preview';
|
|
218
219
|
uploadErrorMessage?: string;
|
|
219
220
|
uploadErrorDescription?: string;
|
|
220
221
|
/** Whether back capture is needed after front capture completes */
|
|
@@ -335,6 +336,12 @@ declare function createIdCaptureManagerFromActor(actor: AnyIdCaptureActor, visib
|
|
|
335
336
|
load(): void;
|
|
336
337
|
selectDocument(documentType: IdDocumentType): void;
|
|
337
338
|
nextStep(): Promise<void>;
|
|
339
|
+
/**
|
|
340
|
+
* Advances out of `resultPreview`. Deliberately untracked: this fires from
|
|
341
|
+
* the UI's own dwell timer / animationend, not a user action, so it must not
|
|
342
|
+
* emit an `elementClicked`.
|
|
343
|
+
*/
|
|
344
|
+
completeResultPreview(): void;
|
|
338
345
|
requestPermission(): void;
|
|
339
346
|
goToLearnMore(): void;
|
|
340
347
|
back(): void;
|
|
@@ -389,6 +396,7 @@ declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): M
|
|
|
389
396
|
load(): void;
|
|
390
397
|
selectDocument(documentType: IdDocumentType): void;
|
|
391
398
|
nextStep(): Promise<void>;
|
|
399
|
+
completeResultPreview(): void;
|
|
392
400
|
requestPermission(): void;
|
|
393
401
|
goToLearnMore(): void;
|
|
394
402
|
back(): void;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { t as BrowserStorageProvider } from "./BrowserStorageProvider-k-FDkC4W.esm.js";
|
|
2
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
2
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CxfNJVZW.esm.js";
|
|
3
3
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
4
4
|
import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
5
5
|
import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-BqUCwLY8.esm.js";
|
|
6
6
|
import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BX1BiLDK.esm.js";
|
|
7
7
|
import { o as resetWasmMotionPrimedForModule, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-UvUcOSRb.esm.js";
|
|
8
|
-
import { n as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-
|
|
8
|
+
import { n as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-B9oqtIOr.esm.js";
|
|
9
|
+
import { m as resolveIdCaptureThresholds, p as resolveCaptureResultPreviewTreatment } from "./idCaptureServices-Cztpla_C.esm.js";
|
|
9
10
|
//#region src/modules/id/digitalUpload/instrumentation.ts
|
|
10
11
|
const TERMINAL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
|
|
11
12
|
function isHoldingState(value) {
|
|
@@ -120,6 +121,7 @@ function getCaptureStatus(snapshot) {
|
|
|
120
121
|
capturingManual: snapshot.matches({ capture: "capturingManual" }),
|
|
121
122
|
capturingBarcode: snapshot.matches({ capture: "capturingBarcode" }),
|
|
122
123
|
submittingBarcodePreCapture: snapshot.matches({ capture: "submittingBarcodePreCapture" }),
|
|
124
|
+
resultPreview: snapshot.matches({ capture: "resultPreview" }),
|
|
123
125
|
uploading: snapshot.matches({ capture: "uploading" }),
|
|
124
126
|
uploadCompleted: snapshot.matches({ capture: "uploadCompleted" }),
|
|
125
127
|
submittingBarcode: snapshot.matches({ capture: "submittingBarcode" }),
|
|
@@ -131,6 +133,7 @@ function getCaptureStatus(snapshot) {
|
|
|
131
133
|
if (matches.capturingBarcode || matches.submittingBarcodePreCapture) return "holdOn";
|
|
132
134
|
if (matches.capturing || matches.capturingManual) return "capturing";
|
|
133
135
|
if (matches.uploading || matches.uploadCompleted || matches.submittingBarcode) return "uploading";
|
|
136
|
+
if (matches.resultPreview) return "resultPreview";
|
|
134
137
|
if (matches.uploadError) return "uploadError";
|
|
135
138
|
if (matches.success) return "success";
|
|
136
139
|
}
|
|
@@ -223,6 +226,7 @@ function mapCaptureState(snapshot, context) {
|
|
|
223
226
|
barcodeFastPathCaptured: context.barcodeFastPathCaptured,
|
|
224
227
|
uploadProgress: context.uploadProgress ?? 0,
|
|
225
228
|
ageAssurance: context.config.ageAssurance === true,
|
|
229
|
+
captureFeedbackMode: context.captureFeedbackMode,
|
|
226
230
|
uploadErrorMessage: uploadError ? getErrorTitleKey(uploadError, context.currentMode) : void 0,
|
|
227
231
|
uploadErrorDescription: uploadError ? getErrorSubtitleKey(uploadError, uploadResponse, context.currentMode) : void 0,
|
|
228
232
|
needsBackCapture: shouldCaptureBack(context),
|
|
@@ -249,8 +253,17 @@ function mapManualUploadState(snapshot) {
|
|
|
249
253
|
* keeps both slots visible once the front has been processed.
|
|
250
254
|
*/
|
|
251
255
|
const backUploaded = (childCtx?.backUploaded ?? false) || (childCtx?.skipBackFromServer ?? false);
|
|
252
|
-
|
|
256
|
+
/**
|
|
257
|
+
* Manual upload is client-authoritative for the back side: the slot must be
|
|
258
|
+
* shown or hidden before any upload round-trip, so there is no
|
|
259
|
+
* `skipBackIdCapture` to defer to yet. `config.onlyFront` is therefore read
|
|
260
|
+
* directly here — restoring V1 parity (ENG-50532). The camera path is the
|
|
261
|
+
* opposite: it forwards the flag and waits for the server's answer.
|
|
262
|
+
*/
|
|
263
|
+
const onlyFront = config.onlyFront === true;
|
|
264
|
+
const idTabCanContinue = (childCtx?.frontUploaded ?? false) && (onlyFront || backUploaded);
|
|
253
265
|
const canContinue = childCtx?.activeTab === "id" ? idTabCanContinue : childCtx?.passportUploaded ?? false;
|
|
266
|
+
const showBackSlot = !onlyFront;
|
|
254
267
|
return {
|
|
255
268
|
status: "manualUpload",
|
|
256
269
|
phase,
|
|
@@ -258,7 +271,7 @@ function mapManualUploadState(snapshot) {
|
|
|
258
271
|
activeTab: childCtx?.activeTab ?? "id",
|
|
259
272
|
showIdTab,
|
|
260
273
|
showPassportTab,
|
|
261
|
-
showBackSlot
|
|
274
|
+
showBackSlot,
|
|
262
275
|
frontFileName: childCtx?.frontFile?.name,
|
|
263
276
|
backFileName: childCtx?.backFile?.name,
|
|
264
277
|
passportFileName: childCtx?.passportFile?.name,
|
|
@@ -393,6 +406,14 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
|
|
|
393
406
|
}
|
|
394
407
|
actor.send({ type: "NEXT_STEP" });
|
|
395
408
|
},
|
|
409
|
+
/**
|
|
410
|
+
* Advances out of `resultPreview`. Deliberately untracked: this fires from
|
|
411
|
+
* the UI's own dwell timer / animationend, not a user action, so it must not
|
|
412
|
+
* emit an `elementClicked`.
|
|
413
|
+
*/
|
|
414
|
+
completeResultPreview() {
|
|
415
|
+
actor.send({ type: "RESULT_PREVIEW_COMPLETE" });
|
|
416
|
+
},
|
|
396
417
|
requestPermission() {
|
|
397
418
|
trackElementClicked?.("requestPermission");
|
|
398
419
|
actor.send({ type: "REQUEST_PERMISSION" });
|
|
@@ -771,9 +792,14 @@ function createIdCaptureManagerFromActor(actor, visibilityObserver = new Browser
|
|
|
771
792
|
//#region src/modules/id/idCaptureActor.ts
|
|
772
793
|
function createIdCaptureActor(options) {
|
|
773
794
|
const dependencies = options.dependencies ?? { storage: new BrowserStorageProvider() };
|
|
795
|
+
const treatment = resolveCaptureResultPreviewTreatment(options.config);
|
|
774
796
|
return createActor(idCaptureMachine, { input: {
|
|
775
|
-
config:
|
|
776
|
-
|
|
797
|
+
config: {
|
|
798
|
+
...options.config,
|
|
799
|
+
thresholds: resolveIdCaptureThresholds(options.config, treatment?.framesAggregationInterval)
|
|
800
|
+
},
|
|
801
|
+
dependencies,
|
|
802
|
+
captureFeedbackMode: treatment?.mode ?? "countdown"
|
|
777
803
|
} }).start();
|
|
778
804
|
}
|
|
779
805
|
//#endregion
|
|
@@ -1,16 +1,73 @@
|
|
|
1
|
+
import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-DS_Nj5Gg.esm.js";
|
|
1
2
|
import { t as api } from "./api-Bx3gKW_y.esm.js";
|
|
2
3
|
import { t as endpoints } from "./endpoints-CCzL3XD_.esm.js";
|
|
3
4
|
import { r as isDesktop } from "./platform-BJrm5nzZ.esm.js";
|
|
4
|
-
import { h as stopRecording$1, m as startRecording, p as createRecordingSession } from "./onDeviceFaceResults-
|
|
5
|
+
import { h as stopRecording$1, m as startRecording, p as createRecordingSession } from "./onDeviceFaceResults-AOKW5LFl.esm.js";
|
|
5
6
|
import { n as getBackCameraStream } from "./backCameraStream-CUeYm5eu.esm.js";
|
|
6
7
|
import { t as getDeviceClass } from "./getDeviceClass-9y-kbVDw.esm.js";
|
|
7
|
-
import { n as preloadOpenViduProvider } from "./recordingService-
|
|
8
|
-
import { r as IdCaptureProvider } from "./idCaptureDefaults-
|
|
8
|
+
import { n as preloadOpenViduProvider } from "./recordingService-BvBR_orc.esm.js";
|
|
9
|
+
import { n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-WeHbQM7W.esm.js";
|
|
9
10
|
//#region src/modules/id/idCameraStream.ts
|
|
10
11
|
async function getIdCameraStream(deviceId) {
|
|
11
12
|
return getBackCameraStream(deviceId);
|
|
12
13
|
}
|
|
13
14
|
//#endregion
|
|
15
|
+
//#region src/modules/id/idCaptureExperiments.ts
|
|
16
|
+
/**
|
|
17
|
+
* IDC-05 — resolved by core because `framesAggregationInterval` feeds
|
|
18
|
+
* `setThresholds` before detection can run.
|
|
19
|
+
*/
|
|
20
|
+
const CAPTURE_RESULT_PREVIEW = {
|
|
21
|
+
storeParam: "captureResultPreview",
|
|
22
|
+
...defineExperimentParams({
|
|
23
|
+
showCaptureResultPreview: booleanParam(false),
|
|
24
|
+
framesAggregationInterval: numberParam(DEFAULT_ID_CAPTURE_THRESHOLDS.framesAggregationInterval)
|
|
25
|
+
})
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/modules/id/idCaptureThresholds.ts
|
|
29
|
+
function resolveCaptureResultPreviewTreatment(config) {
|
|
30
|
+
if (config.supportsCaptureResultPreview !== true) return void 0;
|
|
31
|
+
const { params } = resolveExperimentOnce(CAPTURE_RESULT_PREVIEW);
|
|
32
|
+
return {
|
|
33
|
+
mode: params.showCaptureResultPreview ? "result-preview" : "countdown",
|
|
34
|
+
framesAggregationInterval: params.framesAggregationInterval
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Single source of truth for the WASM ID-capture thresholds passed to
|
|
39
|
+
* `IIdCaptureCapability.setThresholds`. Resolves `framesAggregationInterval`
|
|
40
|
+
* — the countdown / best-frame aggregation window (canonical default
|
|
41
|
+
* 3000ms) — with precedence:
|
|
42
|
+
*
|
|
43
|
+
* 1. An explicit `config.thresholds.framesAggregationInterval` (host/headless
|
|
44
|
+
* override) always wins — including when allocated to the treatment arm,
|
|
45
|
+
* which then runs the treatment UI on the host's aggregation window.
|
|
46
|
+
* 2. Otherwise, the IDC-05 experiment's `framesAggregationInterval`.
|
|
47
|
+
* 3. Otherwise, the canonical default.
|
|
48
|
+
*
|
|
49
|
+
* `idDetectedTimeout`/`autocaptureTimeout` are derived here too (from
|
|
50
|
+
* `deviceIdleTimeout`/`autoCaptureTimeout`, seconds -> ms), same as before —
|
|
51
|
+
* centralizing the whole threshold shape avoids the two former call sites
|
|
52
|
+
* (`initializeIdCapture`, `runDetectionActor`) each rebuilding it slightly
|
|
53
|
+
* differently.
|
|
54
|
+
*
|
|
55
|
+
* Call this once per capture session, at actor creation
|
|
56
|
+
* (`createIdCaptureActor` / `createIdCaptureOnlyActor`), and store the
|
|
57
|
+
* result back onto `config.thresholds` — so the parameter store is read at
|
|
58
|
+
* most once per session and every downstream consumer sees the same
|
|
59
|
+
* fully-resolved thresholds instead of re-deriving them.
|
|
60
|
+
*/
|
|
61
|
+
function resolveIdCaptureThresholds(config, experimentInterval) {
|
|
62
|
+
return {
|
|
63
|
+
...DEFAULT_ID_CAPTURE_THRESHOLDS,
|
|
64
|
+
...config.thresholds,
|
|
65
|
+
framesAggregationInterval: config.thresholds?.framesAggregationInterval ?? experimentInterval ?? DEFAULT_ID_CAPTURE_THRESHOLDS.framesAggregationInterval,
|
|
66
|
+
idDetectedTimeout: config.thresholds?.idDetectedTimeout ?? (config.deviceIdleTimeout ?? 10) * 1e3,
|
|
67
|
+
autocaptureTimeout: config.thresholds?.autocaptureTimeout ?? (config.autoCaptureTimeout ?? 5) * 1e3
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
14
71
|
//#region src/modules/id/types.ts
|
|
15
72
|
const ID_ERROR_CODES = {
|
|
16
73
|
UPLOAD_ERROR: "UPLOAD_ERROR",
|
|
@@ -53,15 +110,6 @@ function getUploadEndpoint(type, isSecondId) {
|
|
|
53
110
|
}
|
|
54
111
|
const SHARPNESS_THRESHOLD = 10;
|
|
55
112
|
const GLARE_THRESHOLD = 10;
|
|
56
|
-
const DEFAULT_ID_CAPTURE_THRESHOLDS = {
|
|
57
|
-
blurThreshold: .2,
|
|
58
|
-
blurChangeThreshold: .2,
|
|
59
|
-
glareThreshold: .3,
|
|
60
|
-
clsThreshold: .98,
|
|
61
|
-
sideThreshold: .8,
|
|
62
|
-
iouThreshold: .8,
|
|
63
|
-
framesAggregationInterval: 3e3
|
|
64
|
-
};
|
|
65
113
|
const DEFAULT_ID_CAPTURE_SETTINGS = {
|
|
66
114
|
isFixedMask: false,
|
|
67
115
|
isIPhone14OrHigher: false,
|
|
@@ -76,12 +124,7 @@ async function initializeIdCapture(params) {
|
|
|
76
124
|
const { config, deepsightService } = params;
|
|
77
125
|
const provider = new IdCaptureProvider();
|
|
78
126
|
await provider.initialize({});
|
|
79
|
-
provider.setThresholds(
|
|
80
|
-
...DEFAULT_ID_CAPTURE_THRESHOLDS,
|
|
81
|
-
...config.thresholds,
|
|
82
|
-
idDetectedTimeout: config.thresholds?.idDetectedTimeout ?? config.deviceIdleTimeout * 1e3,
|
|
83
|
-
autocaptureTimeout: config.thresholds?.autocaptureTimeout ?? config.autoCaptureTimeout * 1e3
|
|
84
|
-
});
|
|
127
|
+
provider.setThresholds(resolveIdCaptureThresholds(config));
|
|
85
128
|
if (config.settings) provider.setSettings({
|
|
86
129
|
...DEFAULT_ID_CAPTURE_SETTINGS,
|
|
87
130
|
...config.settings
|
|
@@ -350,4 +393,4 @@ async function addBarcode(params) {
|
|
|
350
393
|
return res.data;
|
|
351
394
|
}
|
|
352
395
|
//#endregion
|
|
353
|
-
export { processId as a, stopStream as c, validateUploadResponse as d, ID_ERROR_CODES as f, preloadIdRecordingProvider as i, uploadIdImage as l, barcodeToBase64 as n, startRecordingSession as o,
|
|
396
|
+
export { processId as a, stopStream as c, validateUploadResponse as d, ID_ERROR_CODES as f, getIdCameraStream as g, CAPTURE_RESULT_PREVIEW as h, preloadIdRecordingProvider as i, uploadIdImage as l, resolveIdCaptureThresholds as m, barcodeToBase64 as n, startRecordingSession as o, resolveCaptureResultPreviewTreatment as p, initializeIdCapture as r, stopRecording as s, addBarcode as t, uploadManualIdFile as u };
|
package/dist/{idCaptureStateMachine-LnEIroru.esm.js → idCaptureStateMachine-B9oqtIOr.esm.js}
RENAMED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
2
|
+
import { s as exposeExperimentOnce } from "./feature-management-DS_Nj5Gg.esm.js";
|
|
2
3
|
import { n as revokeObjectURL } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
|
|
3
4
|
import { r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
|
|
4
|
-
import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
5
|
+
import { c as trueSightHintTransition, l as trueSightLog, r as noteTrueSightCaptureActivity } from "./trueSightService-BO9JcrCP.esm.js";
|
|
6
|
+
import { n as eventModuleNames, s as recordExperimentAssignmentOnce } from "./events-CxfNJVZW.esm.js";
|
|
7
|
+
import { t as getDisableIpify } from "./sessionInitializer-zac1pYo3.esm.js";
|
|
8
|
+
import "./trueSight-CPe_rGn8.esm.js";
|
|
7
9
|
import { t as addDeviceStats } from "./stats-B0nFKawG.esm.js";
|
|
8
10
|
import { t as isAndroid } from "./platform-BJrm5nzZ.esm.js";
|
|
9
|
-
import "./session-
|
|
11
|
+
import "./session-CeFbCodp.esm.js";
|
|
10
12
|
import { a as and, n as sendTo, r as assign, s as not, t as setup } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
11
13
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-CtI5S0f4.esm.js";
|
|
12
14
|
import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-UvUcOSRb.esm.js";
|
|
13
|
-
import { _ as StreamCanvasProcessingSession } from "./onDeviceFaceResults-
|
|
15
|
+
import { _ as StreamCanvasProcessingSession } from "./onDeviceFaceResults-AOKW5LFl.esm.js";
|
|
14
16
|
import { t as sleep } from "./ITimerCapability-DgdDzp8G.esm.js";
|
|
15
17
|
import { t as IncodeCanvas } from "./canvas-E1zGkel4.esm.js";
|
|
16
18
|
import { t as getBrowser } from "./getBrowser-DNrQeL4T.esm.js";
|
|
@@ -18,8 +20,7 @@ import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
|
|
|
18
20
|
import { t as StreamCanvasCapture } from "./StreamCanvasCapture-D2XcXCZ4.esm.js";
|
|
19
21
|
import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-KINpmKtI.esm.js";
|
|
20
22
|
import { n as flagIdManualReview } from "./manualReviewService-D4IkipnN.esm.js";
|
|
21
|
-
import {
|
|
22
|
-
import { a as processId, c as stopStream, d as validateUploadResponse, f as ID_ERROR_CODES, i as preloadIdRecordingProvider, l as uploadIdImage, o as startRecordingSession, p as getIdCameraStream, r as initializeIdCapture, s as stopRecording, t as addBarcode, u as uploadManualIdFile } from "./idCaptureServices-Cd8X5IYl.esm.js";
|
|
23
|
+
import { a as processId, c as stopStream, d as validateUploadResponse, f as ID_ERROR_CODES, g as getIdCameraStream, h as CAPTURE_RESULT_PREVIEW, i as preloadIdRecordingProvider, l as uploadIdImage, m as resolveIdCaptureThresholds, o as startRecordingSession, r as initializeIdCapture, s as stopRecording, t as addBarcode, u as uploadManualIdFile } from "./idCaptureServices-Cztpla_C.esm.js";
|
|
23
24
|
//#region src/modules/id/digitalUpload/digitalUploadErrors.ts
|
|
24
25
|
const TERMINAL_FAIL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
|
|
25
26
|
function isKnownFailReason(reason) {
|
|
@@ -799,15 +800,31 @@ const hasUploadValidationErrorGuard = ({ context }) => {
|
|
|
799
800
|
};
|
|
800
801
|
const isFrontModeGuard = ({ context }) => context.currentMode === "front" || context.currentMode === "passport";
|
|
801
802
|
/**
|
|
802
|
-
*
|
|
803
|
-
*
|
|
804
|
-
*
|
|
805
|
-
*
|
|
806
|
-
* `
|
|
807
|
-
*
|
|
808
|
-
*
|
|
803
|
+
* Single client-side authority on whether a back side is needed.
|
|
804
|
+
*
|
|
805
|
+
* `config.onlyFront` is deliberately NOT read here. The flag is forwarded to
|
|
806
|
+
* the backend as `?onlyFront=true` on the front upload
|
|
807
|
+
* (`idCaptureStateMachine` → `uploadIdImage`), and the backend answers with
|
|
808
|
+
* `skipBackIdCapture` after resolving the real per-document policy — which the
|
|
809
|
+
* flow-level flag cannot account for (`perCountryPerDocOverrides`). Honoring
|
|
810
|
+
* `onlyFront` client-side here was the ENG-45236 bug (PR #413): it skipped the
|
|
811
|
+
* back for documents that genuinely need both sides.
|
|
812
|
+
*
|
|
813
|
+
* Note `currentMode === 'passport'` is allowed through: passports are not
|
|
814
|
+
* implicitly single-side and can require a back (PR #269).
|
|
815
|
+
*
|
|
816
|
+
* The rule for when a client-side read IS legitimate (see
|
|
817
|
+
* `docs/features/ID_CAPTURE_FLOWS.md`):
|
|
818
|
+
* 1. read `config.onlyFront` only where the decision must be made before a
|
|
819
|
+
* server answer exists, and
|
|
820
|
+
* 2. where you do, still self-correct once the answer arrives.
|
|
821
|
+
*
|
|
822
|
+
* Two variants qualify under (1): the captureOnly machine
|
|
823
|
+
* (`idCaptureOnlyStateMachine` — no upload, so no answer ever exists) and the
|
|
824
|
+
* manual-upload sub-machine (slot visibility precedes any upload, and it ORs
|
|
825
|
+
* `skipBackFromServer` afterwards to satisfy (2)). This guard is on neither
|
|
826
|
+
* path — the answer is already in hand by the time it runs.
|
|
809
827
|
*/
|
|
810
|
-
const isOnlyFrontGuard = (_args) => false;
|
|
811
828
|
const shouldContinueToBackGuard = ({ context }) => {
|
|
812
829
|
if (context.currentMode !== "front" && context.currentMode !== "passport") return false;
|
|
813
830
|
if (context.config.onlyBack) return false;
|
|
@@ -817,6 +834,17 @@ const shouldContinueToBackGuard = ({ context }) => {
|
|
|
817
834
|
};
|
|
818
835
|
const shouldContinueToFrontGuard = ({ context }) => context.config.usSmartCapture === true && context.currentMode === "back" && context.uploadResponse?.forceFrontIdCapture === true;
|
|
819
836
|
const hasMandatoryConsentGuard = ({ context }) => context.uploadResponse?.showMandatoryConsent === true;
|
|
837
|
+
/**
|
|
838
|
+
* Capture-result-preview feedback mode, resolved once per session by
|
|
839
|
+
* `resolveCaptureResultPreviewTreatment` at actor creation.
|
|
840
|
+
*/
|
|
841
|
+
const isCaptureResultPreviewModeGuard = ({ context }) => context.captureFeedbackMode === "result-preview";
|
|
842
|
+
/**
|
|
843
|
+
* Whether the rendering layer opted into handling `resultPreview` and
|
|
844
|
+
* advancing it with `manager.nextStep()`. Headless consumers that omit this
|
|
845
|
+
* capability retain the direct capture-to-upload path.
|
|
846
|
+
*/
|
|
847
|
+
const supportsCaptureResultPreviewGuard = ({ context }) => context.config.supportsCaptureResultPreview === true;
|
|
820
848
|
const isDeepsightEnabledGuard = ({ context }) => context.dependencies !== void 0;
|
|
821
849
|
const isDeepsightReadyGuard = ({ context }) => context.deepsightService !== void 0;
|
|
822
850
|
const needsDeepsightInitGuard = ({ context }) => context.dependencies !== void 0 && context.deepsightService === void 0 && !context.deepsightInitAttempted;
|
|
@@ -1087,13 +1115,7 @@ const runDetectionActor = fromCallback(({ input, sendBack }) => {
|
|
|
1087
1115
|
iouCheckEnabled: input.config.settings?.iouCheckEnabled ?? true,
|
|
1088
1116
|
fpsLimitEnabled: input.config.settings?.fpsLimitEnabled ?? false
|
|
1089
1117
|
});
|
|
1090
|
-
|
|
1091
|
-
...DEFAULT_ID_CAPTURE_THRESHOLDS,
|
|
1092
|
-
...input.config.thresholds,
|
|
1093
|
-
idDetectedTimeout: (input.config.deviceIdleTimeout ?? 10) * 1e3,
|
|
1094
|
-
autocaptureTimeout: (input.config.autoCaptureTimeout ?? 5) * 1e3
|
|
1095
|
-
};
|
|
1096
|
-
provider.setThresholds(thresholds);
|
|
1118
|
+
provider.setThresholds(resolveIdCaptureThresholds(input.config));
|
|
1097
1119
|
const modelType = input.config.modelVersion ?? "v2";
|
|
1098
1120
|
provider.setModelType(modelType);
|
|
1099
1121
|
provider.setCallbacks({
|
|
@@ -1216,7 +1238,7 @@ const runDetectionActor = fromCallback(({ input, sendBack }) => {
|
|
|
1216
1238
|
storedQualityElements = {};
|
|
1217
1239
|
isCapturing = false;
|
|
1218
1240
|
lastReportedSide = null;
|
|
1219
|
-
provider.
|
|
1241
|
+
provider.resetDetectionState();
|
|
1220
1242
|
}
|
|
1221
1243
|
}
|
|
1222
1244
|
});
|
|
@@ -1316,7 +1338,7 @@ const startRecordingActor = fromPromise(async ({ input }) => {
|
|
|
1316
1338
|
});
|
|
1317
1339
|
const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
|
|
1318
1340
|
if (!input.dependencies) return;
|
|
1319
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
1341
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-DLR2ajBH.esm.js");
|
|
1320
1342
|
return loadDeepsightSession({
|
|
1321
1343
|
ds: input.ds,
|
|
1322
1344
|
storage: input.dependencies.storage,
|
|
@@ -1354,6 +1376,12 @@ function performResetForFrontCapture(context) {
|
|
|
1354
1376
|
function performResetDetection(context) {
|
|
1355
1377
|
context.resetDetection?.();
|
|
1356
1378
|
}
|
|
1379
|
+
function performReportCaptureResultPreviewAssignment(context) {
|
|
1380
|
+
if (context.config.supportsCaptureResultPreview !== true) return;
|
|
1381
|
+
const assignment = exposeExperimentOnce(CAPTURE_RESULT_PREVIEW);
|
|
1382
|
+
if (!assignment) return;
|
|
1383
|
+
recordExperimentAssignmentOnce(eventModuleNames.idCapture, assignment);
|
|
1384
|
+
}
|
|
1357
1385
|
function performStopMediaRecording(context) {
|
|
1358
1386
|
if (context.recordingSession) stopRecording(context.recordingSession);
|
|
1359
1387
|
}
|
|
@@ -1755,6 +1783,9 @@ const idCaptureMachine = setup({
|
|
|
1755
1783
|
trackTutorialId: () => {},
|
|
1756
1784
|
trackContinue: () => {},
|
|
1757
1785
|
trackCameraId: ({ context }) => {},
|
|
1786
|
+
reportCaptureResultPreviewAssignment: ({ context }) => {
|
|
1787
|
+
performReportCaptureResultPreviewAssignment(context);
|
|
1788
|
+
},
|
|
1758
1789
|
preloadRecordingProvider: ({ context }) => {
|
|
1759
1790
|
preloadIdRecordingProvider(context.config);
|
|
1760
1791
|
},
|
|
@@ -1863,10 +1894,11 @@ const idCaptureMachine = setup({
|
|
|
1863
1894
|
hasCapturedImage: hasCapturedImageGuard,
|
|
1864
1895
|
hasUploadValidationError: hasUploadValidationErrorGuard,
|
|
1865
1896
|
isFrontMode: isFrontModeGuard,
|
|
1866
|
-
isOnlyFront: isOnlyFrontGuard,
|
|
1867
1897
|
shouldContinueToBack: shouldContinueToBackGuard,
|
|
1868
1898
|
shouldContinueToFront: shouldContinueToFrontGuard,
|
|
1869
1899
|
hasMandatoryConsent: hasMandatoryConsentGuard,
|
|
1900
|
+
isCaptureResultPreviewMode: isCaptureResultPreviewModeGuard,
|
|
1901
|
+
supportsCaptureResultPreview: supportsCaptureResultPreviewGuard,
|
|
1870
1902
|
isDeepsightEnabled: isDeepsightEnabledGuard,
|
|
1871
1903
|
isDeepsightReady: isDeepsightReadyGuard,
|
|
1872
1904
|
needsDeepsightInit: needsDeepsightInitGuard,
|
|
@@ -1899,6 +1931,7 @@ const idCaptureMachine = setup({
|
|
|
1899
1931
|
const currentMode = input.config.onlyBack ? "back" : !input.config.enableId && input.config.enablePassport ? "passport" : input.config.usSmartCapture ? "back" : "front";
|
|
1900
1932
|
return {
|
|
1901
1933
|
config: input.config,
|
|
1934
|
+
captureFeedbackMode: input.captureFeedbackMode ?? "countdown",
|
|
1902
1935
|
currentMode,
|
|
1903
1936
|
selectedDocumentType: void 0,
|
|
1904
1937
|
stream: void 0,
|
|
@@ -2314,7 +2347,7 @@ const idCaptureMachine = setup({
|
|
|
2314
2347
|
guard: ({ context }) => context.manualCaptureTriggered,
|
|
2315
2348
|
actions: assign({ detectionStatus: () => "manualCapture" })
|
|
2316
2349
|
}],
|
|
2317
|
-
entry: [assign({ detectionStatus: () => "detecting" })],
|
|
2350
|
+
entry: [assign({ detectionStatus: () => "detecting" }), "reportCaptureResultPreviewAssignment"],
|
|
2318
2351
|
invoke: [{
|
|
2319
2352
|
id: "startRecording",
|
|
2320
2353
|
src: "startRecording",
|
|
@@ -2377,6 +2410,14 @@ const idCaptureMachine = setup({
|
|
|
2377
2410
|
target: "submittingBarcode",
|
|
2378
2411
|
guard: and(["hasCapturedImage", "shouldSubmitBarcode"])
|
|
2379
2412
|
},
|
|
2413
|
+
{
|
|
2414
|
+
target: "resultPreview",
|
|
2415
|
+
guard: and([
|
|
2416
|
+
"hasCapturedImage",
|
|
2417
|
+
"isCaptureResultPreviewMode",
|
|
2418
|
+
"supportsCaptureResultPreview"
|
|
2419
|
+
])
|
|
2420
|
+
},
|
|
2380
2421
|
{
|
|
2381
2422
|
target: "uploading",
|
|
2382
2423
|
guard: "hasCapturedImage"
|
|
@@ -2390,6 +2431,7 @@ const idCaptureMachine = setup({
|
|
|
2390
2431
|
}
|
|
2391
2432
|
]
|
|
2392
2433
|
},
|
|
2434
|
+
resultPreview: { on: { RESULT_PREVIEW_COMPLETE: { target: "uploading" } } },
|
|
2393
2435
|
submittingBarcode: { invoke: {
|
|
2394
2436
|
id: "submitBarcode",
|
|
2395
2437
|
src: "submitBarcode",
|
|
@@ -2433,16 +2475,27 @@ const idCaptureMachine = setup({
|
|
|
2433
2475
|
"storeCapturedCanvasInProvider",
|
|
2434
2476
|
"storeCapturedImage"
|
|
2435
2477
|
],
|
|
2436
|
-
always: [
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
}
|
|
2445
|
-
|
|
2478
|
+
always: [
|
|
2479
|
+
{
|
|
2480
|
+
target: "resultPreview",
|
|
2481
|
+
guard: and([
|
|
2482
|
+
"hasCapturedImage",
|
|
2483
|
+
"isCaptureResultPreviewMode",
|
|
2484
|
+
"supportsCaptureResultPreview"
|
|
2485
|
+
])
|
|
2486
|
+
},
|
|
2487
|
+
{
|
|
2488
|
+
target: "uploading",
|
|
2489
|
+
guard: "hasCapturedImage"
|
|
2490
|
+
},
|
|
2491
|
+
{
|
|
2492
|
+
target: "uploadError",
|
|
2493
|
+
actions: assign(({ context }) => ({
|
|
2494
|
+
uploadError: ID_ERROR_CODES.UPLOAD_ERROR,
|
|
2495
|
+
attemptsRemaining: context.attemptsRemaining - 1
|
|
2496
|
+
}))
|
|
2497
|
+
}
|
|
2498
|
+
]
|
|
2446
2499
|
},
|
|
2447
2500
|
uploading: {
|
|
2448
2501
|
entry: assign({ uploadProgress: () => 0 }),
|
|
@@ -2455,9 +2508,10 @@ const idCaptureMachine = setup({
|
|
|
2455
2508
|
input: ({ context, self }) => {
|
|
2456
2509
|
const canvas = context.provider?.getOriginalCapturedCanvas();
|
|
2457
2510
|
if (!canvas) throw new Error(ID_ERROR_CODES.UPLOAD_ERROR);
|
|
2511
|
+
const type = context.currentMode === "back" ? "back" : "front";
|
|
2458
2512
|
return {
|
|
2459
2513
|
canvas,
|
|
2460
|
-
type
|
|
2514
|
+
type,
|
|
2461
2515
|
qualityElements: context.qualityElements,
|
|
2462
2516
|
onProgress: (progress) => {
|
|
2463
2517
|
self.send({
|
|
@@ -2468,7 +2522,7 @@ const idCaptureMachine = setup({
|
|
|
2468
2522
|
deepsightService: context.deepsightService,
|
|
2469
2523
|
stream: context.stream,
|
|
2470
2524
|
isSecondId: context.config.isSecondId ?? false,
|
|
2471
|
-
onlyFront: false,
|
|
2525
|
+
onlyFront: type === "front" && (context.config.onlyFront ?? false),
|
|
2472
2526
|
ageAssurance: context.config.ageAssurance,
|
|
2473
2527
|
dependencies: context.dependencies,
|
|
2474
2528
|
captureResolution: context.captureResolution,
|
|
@@ -2824,7 +2878,7 @@ const idCaptureMachine = setup({
|
|
|
2824
2878
|
src: "manualUploadMachine",
|
|
2825
2879
|
input: ({ context }) => ({
|
|
2826
2880
|
isSecondId: context.config.isSecondId ?? false,
|
|
2827
|
-
onlyFront: false,
|
|
2881
|
+
onlyFront: context.config.onlyFront ?? false,
|
|
2828
2882
|
captureAttempts: context.config.captureAttempts,
|
|
2829
2883
|
extractIdFace: context.config.extractIdFace
|
|
2830
2884
|
}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CxfNJVZW.esm.js";
|
|
2
2
|
import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
3
3
|
import { t as idOcrStateMachine } from "./idOcrStateMachine-Bq_e3l4E.esm.js";
|
|
4
4
|
//#region src/modules/id-ocr/idOcrActor.ts
|
|
@@ -110,7 +110,7 @@ declare const idOcrStateMachine: StateMachine<IdOcrContext, {
|
|
|
110
110
|
type: "shouldProceedWithoutSubmitToSecondId";
|
|
111
111
|
params: unknown;
|
|
112
112
|
};
|
|
113
|
-
}>, never, "error" | "idle" | "success" | "finished" | "
|
|
113
|
+
}>, never, "error" | "idle" | "success" | "finished" | "loading" | "submitting" | "inputting" | "readonly" | "validatingContinue", string, IdOcrInput, NonReducibleUnknown, EventObject, MetaObject, {
|
|
114
114
|
readonly id: "idOcr";
|
|
115
115
|
readonly initial: "idle";
|
|
116
116
|
readonly context: ({ input }: {
|
package/dist/{idVerificationManager-W8v-boCx.esm.js → idVerificationManager-CduNXhWd.esm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CxfNJVZW.esm.js";
|
|
2
2
|
import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
3
3
|
import { t as idVerificationMachine } from "./idVerificationStateMachine-GEQWUPU2.esm.js";
|
|
4
4
|
//#region src/modules/id-verification/idVerificationActor.ts
|
package/dist/identity-reuse.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as identityReuseMachine, d as ReusableDocument, f as SubmitResponse, i as createIdentityReuseManagerFromActor, l as FetchDocumentsResponse, n as IdentityReuseState, o as SCAN_NEW_DOCUMENT, r as createIdentityReuseManager, s as SelectedDocumentId, t as IdentityReuseManager, u as IdentityReuseConfig } from "./identityReuseManager-
|
|
1
|
+
import { c as identityReuseMachine, d as ReusableDocument, f as SubmitResponse, i as createIdentityReuseManagerFromActor, l as FetchDocumentsResponse, n as IdentityReuseState, o as SCAN_NEW_DOCUMENT, r as createIdentityReuseManager, s as SelectedDocumentId, t as IdentityReuseManager, u as IdentityReuseConfig } from "./identityReuseManager-D6pD4hcZ.js";
|
|
2
2
|
export { type FetchDocumentsResponse, type IdentityReuseConfig, type IdentityReuseManager, type IdentityReuseState, type ReusableDocument, SCAN_NEW_DOCUMENT, type SelectedDocumentId, type SubmitResponse, createIdentityReuseManager, createIdentityReuseManagerFromActor, identityReuseMachine };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as identityReuseMachine, t as SCAN_NEW_DOCUMENT } from "./identityReuseStateMachine-AubRPhIi.esm.js";
|
|
2
|
-
import { n as createIdentityReuseManagerFromActor, t as createIdentityReuseManager } from "./identityReuseManager-
|
|
2
|
+
import { n as createIdentityReuseManagerFromActor, t as createIdentityReuseManager } from "./identityReuseManager-D5vXknnJ.esm.js";
|
|
3
3
|
export { SCAN_NEW_DOCUMENT, createIdentityReuseManager, createIdentityReuseManagerFromActor, identityReuseMachine };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CxfNJVZW.esm.js";
|
|
2
2
|
import { c as createManager, o as createActor } from "./xstate.esm-Cf4e0Cfd.esm.js";
|
|
3
3
|
import { n as identityReuseMachine } from "./identityReuseStateMachine-AubRPhIi.esm.js";
|
|
4
4
|
//#region src/modules/identity-reuse/identityReuseActor.ts
|
|
@@ -125,7 +125,7 @@ declare const identityReuseMachine: StateMachine<IdentityReuseContext, {
|
|
|
125
125
|
type: "hasSelection";
|
|
126
126
|
params: unknown;
|
|
127
127
|
};
|
|
128
|
-
}>, never, "error" | "idle" | "finished" | "
|
|
128
|
+
}>, never, "error" | "idle" | "finished" | "loading" | "submitting" | "documentsFound", string, IdentityReuseInput, NonReducibleUnknown, EventObject, MetaObject, {
|
|
129
129
|
readonly id: "identityReuse";
|
|
130
130
|
readonly initial: "idle";
|
|
131
131
|
readonly context: ({ input }: {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as isConfigured, c as setup, o as reset, t as SetupOptions } from "./setup-
|
|
1
|
+
import { a as isConfigured, c as setup, o as reset, t as SetupOptions } from "./setup-DywQeePQ.js";
|
|
2
2
|
export { type SetupOptions, isConfigured, reset, setup };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as reset, o as setup, r as isConfigured } from "./setup-
|
|
1
|
+
import { i as reset, o as setup, r as isConfigured } from "./setup-CCGCRaIV.esm.js";
|
|
2
2
|
export { isConfigured, reset, setup };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { r as MandatoryConsentConfig } from "./types-BX_XkMsQ2.js";
|
|
2
|
-
import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-
|
|
2
|
+
import { a as MandatoryConsentActor, i as createMandatoryConsentManagerFromActor, n as MandatoryConsentState, o as mandatoryConsentMachine, r as createMandatoryConsentManager, t as MandatoryConsentManager } from "./mandatoryConsentManager-B7oBXoBB.js";
|
|
3
3
|
export { type MandatoryConsentActor, type MandatoryConsentConfig, type MandatoryConsentManager, type MandatoryConsentState, createMandatoryConsentManager, createMandatoryConsentManagerFromActor, mandatoryConsentMachine };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-zroQGzwb.esm.js";
|
|
2
|
-
import { n as createMandatoryConsentManagerFromActor, t as createMandatoryConsentManager } from "./mandatoryConsentManager-
|
|
2
|
+
import { n as createMandatoryConsentManagerFromActor, t as createMandatoryConsentManager } from "./mandatoryConsentManager-BeELm1zS.esm.js";
|
|
3
3
|
export { createMandatoryConsentManager, createMandatoryConsentManagerFromActor, mandatoryConsentMachine };
|
package/dist/{mandatoryConsentManager-DyPzUmsZ.d.ts → mandatoryConsentManager-B7oBXoBB.d.ts}
RENAMED
|
@@ -61,18 +61,18 @@ declare const mandatoryConsentMachine: StateMachine<MandatoryConsentContext, {
|
|
|
61
61
|
type: "clearError";
|
|
62
62
|
params: NonReducibleUnknown;
|
|
63
63
|
};
|
|
64
|
-
resetContext: {
|
|
65
|
-
type: "resetContext";
|
|
66
|
-
params: NonReducibleUnknown;
|
|
67
|
-
};
|
|
68
64
|
toggleSigned: {
|
|
69
65
|
type: "toggleSigned";
|
|
70
66
|
params: NonReducibleUnknown;
|
|
71
67
|
};
|
|
68
|
+
resetContext: {
|
|
69
|
+
type: "resetContext";
|
|
70
|
+
params: NonReducibleUnknown;
|
|
71
|
+
};
|
|
72
72
|
}>, {
|
|
73
73
|
type: "canSubmit";
|
|
74
74
|
params: unknown;
|
|
75
|
-
}, never, "error" | "idle" | "closed" | "finished" | "
|
|
75
|
+
}, never, "error" | "idle" | "closed" | "finished" | "loading" | "submitting" | "display", string, MandatoryConsentInput, NonReducibleUnknown, EventObject, MetaObject, {
|
|
76
76
|
readonly id: "mandatoryConsent";
|
|
77
77
|
readonly initial: "idle";
|
|
78
78
|
readonly context: ({ input }: {
|